Help us shape the future of Go! Take the 2026 Go Developer Survey

api

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Oct 13, 2020 License: MPL-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_controller_api_v1_error_proto protoreflect.FileDescriptor

Functions

This section is empty.

Types

type Error

type Error struct {

	// The HTTP Status code applicable to this error.
	Status int32 `protobuf:"varint,1,opt,name=status,proto3" json:"status,omitempty"`
	// An application-specific error string.
	Code string `protobuf:"bytes,2,opt,name=code,proto3" json:"code,omitempty"`
	// A human-readable explanation specific to this occurrence of the error.
	Message string `protobuf:"bytes,3,opt,name=message,proto3" json:"message,omitempty"`
	// Additional metadata regarding the error. Depending on the error, different fields will be populated.
	Details *ErrorDetails `protobuf:"bytes,4,opt,name=details,proto3" json:"details,omitempty"`
	// contains filtered or unexported fields
}

Error is returned by the JSON API when an error occurs.

func (*Error) Descriptor deprecated

func (*Error) Descriptor() ([]byte, []int)

Deprecated: Use Error.ProtoReflect.Descriptor instead.

func (*Error) GetCode

func (x *Error) GetCode() string

func (*Error) GetDetails

func (x *Error) GetDetails() *ErrorDetails

func (*Error) GetMessage

func (x *Error) GetMessage() string

func (*Error) GetStatus

func (x *Error) GetStatus() int32

func (*Error) ProtoMessage

func (*Error) ProtoMessage()

func (*Error) ProtoReflect

func (x *Error) ProtoReflect() protoreflect.Message

func (*Error) Reset

func (x *Error) Reset()

func (*Error) String

func (x *Error) String() string

type ErrorDetails

type ErrorDetails struct {

	// The TraceId that can be used for OpenTelemetry.
	TraceId string `protobuf:"bytes,1,opt,name=TraceId,proto3" json:"TraceId,omitempty"`
	// A request ID.
	RequestId string `protobuf:"bytes,2,opt,name=request_id,proto3" json:"request_id,omitempty"`
	// An Error ID.
	ErrorId string `protobuf:"bytes,3,opt,name=error_id,proto3" json:"error_id,omitempty"`
	// Request-field-specific error details.
	RequestFields []*FieldError `protobuf:"bytes,4,rep,name=request_fields,proto3" json:"request_fields,omitempty"`
	// contains filtered or unexported fields
}

func (*ErrorDetails) Descriptor deprecated

func (*ErrorDetails) Descriptor() ([]byte, []int)

Deprecated: Use ErrorDetails.ProtoReflect.Descriptor instead.

func (*ErrorDetails) GetErrorId

func (x *ErrorDetails) GetErrorId() string

func (*ErrorDetails) GetRequestFields

func (x *ErrorDetails) GetRequestFields() []*FieldError

func (*ErrorDetails) GetRequestId

func (x *ErrorDetails) GetRequestId() string

func (*ErrorDetails) GetTraceId

func (x *ErrorDetails) GetTraceId() string

func (*ErrorDetails) ProtoMessage

func (*ErrorDetails) ProtoMessage()

func (*ErrorDetails) ProtoReflect

func (x *ErrorDetails) ProtoReflect() protoreflect.Message

func (*ErrorDetails) Reset

func (x *ErrorDetails) Reset()

func (*ErrorDetails) String

func (x *ErrorDetails) String() string

type FieldError

type FieldError struct {

	// The name of the field.
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	// The description of the error.
	Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"`
	// contains filtered or unexported fields
}

FieldErrors contains error information on a per field basis.

func (*FieldError) Descriptor deprecated

func (*FieldError) Descriptor() ([]byte, []int)

Deprecated: Use FieldError.ProtoReflect.Descriptor instead.

func (*FieldError) GetDescription

func (x *FieldError) GetDescription() string

func (*FieldError) GetName

func (x *FieldError) GetName() string

func (*FieldError) ProtoMessage

func (*FieldError) ProtoMessage()

func (*FieldError) ProtoReflect

func (x *FieldError) ProtoReflect() protoreflect.Message

func (*FieldError) Reset

func (x *FieldError) Reset()

func (*FieldError) String

func (x *FieldError) String() string

Directories

Path Synopsis
resources
Package services is a reverse proxy.
Package services is a reverse proxy.

Jump to

Keyboard shortcuts

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