errors

package
v1.1.1 Latest Latest
Warning

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

Go to latest
Published: Jun 25, 2021 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_alert_proto protoreflect.FileDescriptor

Functions

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 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

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) 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 {
	BZCode() int
	StatueCode() int
	Desc() string
}

type Error

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

func NewAlertError added in v1.1.1

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

func NewBzError added in v1.1.1

func NewBzError(enum Enum, err error) Error

Jump to

Keyboard shortcuts

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