error

package
v0.1.63 Latest Latest
Warning

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

Go to latest
Published: Sep 7, 2021 License: Apache-2.0 Imports: 7 Imported by: 5

README

ProtoC

prerequisites

proto requirments.


cd c:/work/github/protocolbuffers
git clone https://github.com/protocolbuffers/protobuf.git


cd c:/work/github/gogo
git clone https://github.com/gogo/protobuf.git

cd c:/work/github/fluffy-bunny/grpcdotnetgo/example


cd example

go get -u github.com/fluffy-bunny/protoc-gen-go-di/cmd/protoc-gen-go-di

cd pkg
protoc --proto_path=. --proto_path=../vendor --go_out=. --go_opt=paths=source_relative  proto\error\error.proto

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_proto_error_error_proto protoreflect.FileDescriptor

Functions

func E

func E(args ...interface{}) error

E is a useful func for instantiating corev1.Errors.

func WrapErr

func WrapErr(err error, msg string) error

WrapErr returns a corev1.Error for the given error and msg.

Types

type Error

type Error struct {
	Message      string            `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"`
	Code         int32             `protobuf:"varint,2,opt,name=code,proto3" json:"code,omitempty"`
	NestedErrors map[string]string `` /* 185-byte string literal not displayed */
	Details      []string          `protobuf:"bytes,4,rep,name=details,proto3" json:"details,omitempty"`
	// contains filtered or unexported fields
}

func (*Error) Descriptor deprecated

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

Deprecated: Use Error.ProtoReflect.Descriptor instead.

func (*Error) Error

func (e *Error) Error() string

Error implements the error interface.

func (*Error) GetCode

func (x *Error) GetCode() int32

func (*Error) GetDetails

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

func (*Error) GetMessage

func (x *Error) GetMessage() string

func (*Error) GetNestedErrors

func (x *Error) GetNestedErrors() map[string]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 IError

type IError interface {
	GetError() *Error
}

Jump to

Keyboard shortcuts

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