commandpb

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: Apr 7, 2023 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_goes_command_error_proto protoreflect.FileDescriptor

Functions

func AsError

func AsError[Code constraints.Integer](err *Error) *command.Err[Code]

Types

type Error

type Error struct {
	Code    int64          `protobuf:"varint,1,opt,name=code,proto3" json:"code,omitempty"`
	Message string         `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"`
	Details []*ErrorDetail `protobuf:"bytes,3,rep,name=details,proto3" json:"details,omitempty"`
	// contains filtered or unexported fields
}

func NewError

func NewError[Code constraints.Integer](err *command.Err[Code]) *Error

func (*Error) AsError

func (err *Error) AsError() *command.Err[int]

func (*Error) Descriptor deprecated

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

Deprecated: Use Error.ProtoReflect.Descriptor instead.

func (*Error) GetCode

func (x *Error) GetCode() int64

func (*Error) GetDetails

func (x *Error) GetDetails() []*ErrorDetail

func (*Error) GetMessage

func (x *Error) GetMessage() string

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 ErrorDetail

type ErrorDetail struct {
	Detail *anypb.Any `protobuf:"bytes,1,opt,name=detail,proto3" json:"detail,omitempty"`
	// contains filtered or unexported fields
}

func NewErrorDetail

func NewErrorDetail(detail *command.ErrDetail) *ErrorDetail

func (*ErrorDetail) AsErrorDetail

func (detail *ErrorDetail) AsErrorDetail() *command.ErrDetail

func (*ErrorDetail) Descriptor deprecated

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

Deprecated: Use ErrorDetail.ProtoReflect.Descriptor instead.

func (*ErrorDetail) GetDetail

func (x *ErrorDetail) GetDetail() *anypb.Any

func (*ErrorDetail) ProtoMessage

func (*ErrorDetail) ProtoMessage()

func (*ErrorDetail) ProtoReflect

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

func (*ErrorDetail) Reset

func (x *ErrorDetail) Reset()

func (*ErrorDetail) String

func (x *ErrorDetail) String() string

Jump to

Keyboard shortcuts

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