errors

package
v1.1.3 Latest Latest
Warning

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

Go to latest
Published: Jun 29, 2021 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_alert_proto protoreflect.FileDescriptor

Functions

This section is empty.

Types

type AlertError added in v1.1.1

type AlertError interface {
	Error
	BzError() BzError
	AlertMessage() *AlertMessage
}

type AlertMessage added in v1.1.1

type AlertMessage struct {
	ProjectName  string                 `protobuf:"bytes,1,opt,name=project_name,json=projectName,proto3" json:"project_name,omitempty"`
	JournalId    string                 `protobuf:"bytes,2,opt,name=journal_id,json=journalId,proto3" json:"journal_id,omitempty"`
	ErrorVerbose string                 `protobuf:"bytes,3,opt,name=error_verbose,json=errorVerbose,proto3" json:"error_verbose,omitempty"`
	Meta         *AlertMessage_Meta     `protobuf:"bytes,4,opt,name=meta,proto3" json:"meta,omitempty"`
	Ts           *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=ts,proto3" json:"ts,omitempty"`
	// contains filtered or unexported fields
}

func (*AlertMessage) Descriptor deprecated added in v1.1.1

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

Deprecated: Use AlertMessage.ProtoReflect.Descriptor instead.

func (*AlertMessage) GetErrorVerbose added in v1.1.1

func (x *AlertMessage) GetErrorVerbose() string

func (*AlertMessage) GetJournalId added in v1.1.1

func (x *AlertMessage) GetJournalId() string

func (*AlertMessage) GetMeta added in v1.1.1

func (x *AlertMessage) GetMeta() *AlertMessage_Meta

func (*AlertMessage) GetProjectName added in v1.1.1

func (x *AlertMessage) GetProjectName() string

func (*AlertMessage) GetTs added in v1.1.1

func (x *AlertMessage) GetTs() *timestamppb.Timestamp

func (*AlertMessage) Init added in v1.1.3

func (a *AlertMessage) Init() *AlertMessage

func (*AlertMessage) ProtoMessage added in v1.1.1

func (*AlertMessage) ProtoMessage()

func (*AlertMessage) ProtoReflect added in v1.1.1

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

func (*AlertMessage) Reset added in v1.1.1

func (x *AlertMessage) Reset()

func (*AlertMessage) String added in v1.1.1

func (x *AlertMessage) String() string

type AlertMessage_Meta added in v1.1.1

type AlertMessage_Meta struct {
	Url        string `protobuf:"bytes,1,opt,name=url,proto3" json:"url,omitempty"`
	Parameters string `protobuf:"bytes,2,opt,name=parameters,proto3" json:"parameters,omitempty"`
	// contains filtered or unexported fields
}

func (*AlertMessage_Meta) Descriptor deprecated added in v1.1.1

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

Deprecated: Use AlertMessage_Meta.ProtoReflect.Descriptor instead.

func (*AlertMessage_Meta) GetParameters added in v1.1.1

func (x *AlertMessage_Meta) GetParameters() string

func (*AlertMessage_Meta) GetUrl added in v1.1.1

func (x *AlertMessage_Meta) GetUrl() string

func (*AlertMessage_Meta) ProtoMessage added in v1.1.1

func (*AlertMessage_Meta) ProtoMessage()

func (*AlertMessage_Meta) ProtoReflect added in v1.1.1

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

func (*AlertMessage_Meta) Reset added in v1.1.1

func (x *AlertMessage_Meta) Reset()

func (*AlertMessage_Meta) String added in v1.1.1

func (x *AlertMessage_Meta) String() string

type BzError added in v1.1.1

type BzError interface {
	Error
	Enum
	Err() error
}

type Enum added in v1.1.1

type Enum interface {
	Combcode() uint32
	BZCode() uint16
	StatueCode() uint16
	Desc() string
	// contains filtered or unexported methods
}

func NewEnum added in v1.1.2

func NewEnum(bzCode, statusCode uint16, desc string) Enum

type Error

type Error interface {
	error
	// contains filtered or unexported methods
}

func Errorf

func Errorf(format string, args ...interface{}) Error

Errorf create a new error

func New

func New(msg string) Error

New create a new error

func NewAlertError added in v1.1.1

func NewAlertError(enum Enum, err error, projectName string, meta *AlertMessage_Meta) Error

func NewBzError added in v1.1.1

func NewBzError(enum Enum, err error) Error

func Panic added in v1.1.3

func Panic(p interface{}) Error

Panic create a error from panic

func WithStack

func WithStack(err error) Error

WithStack add caller stack information

func Wrap

func Wrap(err error, msg string) Error

Wrap with some extra message into err

func Wrapf

func Wrapf(err error, format string, args ...interface{}) Error

Wrapf with some extra message into err

Jump to

Keyboard shortcuts

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