Documentation ¶
Index ¶
- func GRPCCodeFromStatus(status int) codes.Code
- func HTTPStatusFromCode(code codes.Code) int
- func NotEmpty(err error, skips ...int) bool
- func SetNotEmptyExit(t bool)
- func SetTrack(t bool)
- type Error
- func BadRequest(format string, a ...interface{}) *Error
- func Conflict(format string, a ...interface{}) *Error
- func Forbidden(format string, a ...interface{}) *Error
- func FromError(err error) *Error
- func Internal(format string, a ...interface{}) *Error
- func New(status int, format string, a ...interface{}) *Error
- func NotFound(format string, a ...interface{}) *Error
- func NotImplemented(format string, a ...interface{}) *Error
- func OK(format string, a ...interface{}) *Error
- func Unauthorized(format string, a ...interface{}) *Error
- func (e *Error) Error() string
- func (e *Error) GRPCStatus() *status.Status
- func (e *Error) GetMetadata(key string) interface{}
- func (e *Error) MarshalJSON() ([]byte, error)
- func (e *Error) Message() string
- func (e *Error) Metadata() Metadata
- func (e *Error) Status() int
- func (e Error) WithMetadata(md Metadata) *Error
- type GRPCError
- type Metadata
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GRPCCodeFromStatus ¶ added in v0.0.13
func HTTPStatusFromCode ¶ added in v0.0.13
func SetNotEmptyExit ¶ added in v0.0.12
func SetNotEmptyExit(t bool)
Types ¶
type Error ¶
type Error struct {
// contains filtered or unexported fields
}
func BadRequest ¶
func NotImplemented ¶ added in v0.0.13
func Unauthorized ¶
func (*Error) GRPCStatus ¶ added in v0.0.13
func (*Error) GetMetadata ¶ added in v0.0.13
func (*Error) MarshalJSON ¶ added in v0.0.13
func (Error) WithMetadata ¶ added in v0.0.13
Click to show internal directories.
Click to hide internal directories.