errdetails

package
v1.7.15 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 5, 2024 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Overview

Package errdetails provides error detail for gRPC status

Index

Constants

View Source
const (
	ValdResourceOwner          = "vdaas.org vald team <vald@vdaas.org>"
	ValdGRPCResourceTypePrefix = "github.com/vdaas/vald/apis/grpc/v1"
)

Variables

View Source
var (
	DebugInfoMessageName                    = string(new(DebugInfo).ProtoReflect().Descriptor().FullName().Name())
	ErrorInfoMessageName                    = string(new(ErrorInfo).ProtoReflect().Descriptor().FullName().Name())
	BadRequestMessageName                   = string(new(BadRequest).ProtoReflect().Descriptor().FullName().Name())
	BadRequestFieldViolationMessageName     = string(new(BadRequestFieldViolation).ProtoReflect().Descriptor().FullName().Name())
	LocalizedMessageMessageName             = string(new(LocalizedMessage).ProtoReflect().Descriptor().FullName().Name())
	PreconditionFailureMessageName          = string(new(PreconditionFailure).ProtoReflect().Descriptor().FullName().Name())
	PreconditionFailureViolationMessageName = string(new(PreconditionFailureViolation).ProtoReflect().Descriptor().FullName().Name())
	HelpMessageName                         = string(new(Help).ProtoReflect().Descriptor().FullName().Name())
	HelpLinkMessageName                     = string(new(HelpLink).ProtoReflect().Descriptor().FullName().Name())
	QuotaFailureMessageName                 = string(new(QuotaFailure).ProtoReflect().Descriptor().FullName().Name())
	QuotaFailureViolationMessageName        = string(new(QuotaFailureViolation).ProtoReflect().Descriptor().FullName().Name())
	RequestInfoMessageName                  = string(new(RequestInfo).ProtoReflect().Descriptor().FullName().Name())
	ResourceInfoMessageName                 = string(new(ResourceInfo).ProtoReflect().Descriptor().FullName().Name())
	RetryInfoMessageName                    = string(new(RetryInfo).ProtoReflect().Descriptor().FullName().Name())
)

Functions

func AnyToErrorDetail added in v1.2.1

func AnyToErrorDetail(a *types.Any) proto.Message

func Serialize

func Serialize(objs ...any) string

Types

type BadRequest

type BadRequest = errdetails.BadRequest

type BadRequestFieldViolation

type BadRequestFieldViolation = errdetails.BadRequest_FieldViolation

type DebugInfo

type DebugInfo = errdetails.DebugInfo

func DebugInfoFromInfoDetail added in v1.2.1

func DebugInfoFromInfoDetail(v *info.Detail) (debug *DebugInfo)

type Detail added in v1.2.1

type Detail struct {
	TypeURL string        `json:"type_url,omitempty" yaml:"type_url"`
	Message proto.Message `json:"message,omitempty"  yaml:"message"`
}

func (*Detail) MarshalJSON added in v1.7.14

func (d *Detail) MarshalJSON() (body []byte, err error)

type ErrorInfo

type ErrorInfo = errdetails.ErrorInfo

type Help

type Help = errdetails.Help
type HelpLink = errdetails.Help_Link

type LocalizedMessage

type LocalizedMessage = errdetails.LocalizedMessage

type PreconditionFailure

type PreconditionFailure = errdetails.PreconditionFailure

type PreconditionFailureViolation

type PreconditionFailureViolation = errdetails.PreconditionFailure_Violation

type QuotaFailure

type QuotaFailure = errdetails.QuotaFailure

type QuotaFailureViolation

type QuotaFailureViolation = errdetails.QuotaFailure_Violation

type RequestInfo

type RequestInfo = errdetails.RequestInfo

type ResourceInfo

type ResourceInfo = errdetails.ResourceInfo

type RetryInfo

type RetryInfo = errdetails.RetryInfo

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL