Documentation ¶
Index ¶
- Variables
- func Equal(err1 error, err2 error) bool
- type Child
- func (*Child) Descriptor() ([]byte, []int)
- func (m *Child) GetCode() int32
- func (m *Child) GetDetail() string
- func (m *Child) Marshal() (dAtA []byte, err error)
- func (m *Child) MarshalTo(dAtA []byte) (int, error)
- func (m *Child) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*Child) ProtoMessage()
- func (m *Child) Reset()
- func (m *Child) Size() (n int)
- func (m *Child) String() string
- func (m *Child) Unmarshal(dAtA []byte) error
- func (m *Child) XXX_DiscardUnknown()
- func (m *Child) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Child) XXX_Merge(src proto.Message)
- func (m *Child) XXX_Size() int
- func (m *Child) XXX_Unmarshal(b []byte) error
- type Error
- func BadGateway(id, format string, a ...interface{}) *Error
- func BadRequest(id, format string, a ...interface{}) *Error
- func Conflict(id, format string, a ...interface{}) *Error
- func Forbidden(id, format string, a ...interface{}) *Error
- func FromErr(err error) *Error
- func GatewayTimeout(id, format string, a ...interface{}) *Error
- func InternalServerError(id, format string, a ...interface{}) *Error
- func MethodNotAllowed(id, format string, a ...interface{}) *Error
- func New(id, detail string, code int32) *Error
- func NotFound(id, format string, a ...interface{}) *Error
- func NotImplemented(id, format string, a ...interface{}) *Error
- func Parse(err string) *Error
- func ServiceUnavailable(id, format string, a ...interface{}) *Error
- func Timeout(id, format string, a ...interface{}) *Error
- func Unauthorized(id, format string, a ...interface{}) *Error
- func (*Error) Descriptor() ([]byte, []int)
- func (e *Error) Error() string
- func (m *Error) GetChild() *Child
- func (m *Error) GetCode() int32
- func (m *Error) GetDetail() string
- func (m *Error) GetId() string
- func (m *Error) GetPosition() string
- func (m *Error) GetStacks() []*Stack
- func (m *Error) GetStatus() string
- func (m *Error) Marshal() (dAtA []byte, err error)
- func (m *Error) MarshalTo(dAtA []byte) (int, error)
- func (m *Error) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*Error) ProtoMessage()
- func (m *Error) Reset()
- func (m *Error) Size() (n int)
- func (m *Error) String() string
- func (m *Error) Unmarshal(dAtA []byte) error
- func (e *Error) WithChild(code int32, format string, a ...interface{}) *Error
- func (e *Error) WithPos() *Error
- func (e *Error) WithStack(code int32, detail string, pos ...bool) *Error
- func (m *Error) XXX_DiscardUnknown()
- func (m *Error) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Error) XXX_Merge(src proto.Message)
- func (m *Error) XXX_Size() int
- func (m *Error) XXX_Unmarshal(b []byte) error
- type Stack
- func (*Stack) Descriptor() ([]byte, []int)
- func (m *Stack) GetCode() int32
- func (m *Stack) GetDetail() string
- func (m *Stack) GetPosition() string
- func (m *Stack) Marshal() (dAtA []byte, err error)
- func (m *Stack) MarshalTo(dAtA []byte) (int, error)
- func (m *Stack) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*Stack) ProtoMessage()
- func (m *Stack) Reset()
- func (m *Stack) Size() (n int)
- func (m *Stack) String() string
- func (m *Stack) Unmarshal(dAtA []byte) error
- func (m *Stack) XXX_DiscardUnknown()
- func (m *Stack) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Stack) XXX_Merge(src proto.Message)
- func (m *Stack) XXX_Size() int
- func (m *Stack) XXX_Unmarshal(b []byte) error
Constants ¶
This section is empty.
Variables ¶
Functions ¶
Types ¶
type Child ¶ added in v0.6.1
type Child struct { Code int32 `protobuf:"varint,1,opt,name=code,proto3" json:"code,omitempty"` Detail string `protobuf:"bytes,2,opt,name=detail,proto3" json:"detail,omitempty"` }
func (*Child) Descriptor ¶ added in v0.6.1
func (*Child) MarshalToSizedBuffer ¶ added in v0.6.1
func (*Child) ProtoMessage ¶ added in v0.6.1
func (*Child) ProtoMessage()
func (*Child) XXX_DiscardUnknown ¶ added in v0.6.1
func (m *Child) XXX_DiscardUnknown()
func (*Child) XXX_Marshal ¶ added in v0.6.1
func (*Child) XXX_Unmarshal ¶ added in v0.6.1
type Error ¶
type Error struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` Code int32 `protobuf:"varint,2,opt,name=code,proto3" json:"code,omitempty"` Detail string `protobuf:"bytes,3,opt,name=detail,proto3" json:"detail,omitempty"` Status string `protobuf:"bytes,4,opt,name=status,proto3" json:"status,omitempty"` Position string `protobuf:"bytes,5,opt,name=position,proto3" json:"position,omitempty"` Child *Child `protobuf:"bytes,6,opt,name=child,proto3" json:"child,omitempty"` Stacks []*Stack `protobuf:"bytes,7,rep,name=stacks,proto3" json:"stacks,omitempty"` }
func BadGateway ¶
BadGateway generates a 502 error
func BadRequest ¶
BadRequest generates a 400 error.
func GatewayTimeout ¶
GatewayTimeout generates a 504 error
func InternalServerError ¶
InternalServerError generates a 500 error.
func MethodNotAllowed ¶
MethodNotAllowed generates a 405 error.
func NotImplemented ¶
NotImplemented generates a 501 error
func Parse ¶
Parse tries to parse a JSON string into an error. If that fails, it will set the given string as the error detail.
func ServiceUnavailable ¶
ServiceUnavailable generates a 503 error
func Unauthorized ¶
Unauthorized generates a 401 error.
func (*Error) Descriptor ¶
func (*Error) GetPosition ¶
func (*Error) ProtoMessage ¶
func (*Error) ProtoMessage()
func (*Error) XXX_DiscardUnknown ¶
func (m *Error) XXX_DiscardUnknown()
func (*Error) XXX_Marshal ¶
func (*Error) XXX_Unmarshal ¶
type Stack ¶ added in v0.6.0
type Stack struct { Code int32 `protobuf:"varint,1,opt,name=code,proto3" json:"code,omitempty"` Detail string `protobuf:"bytes,2,opt,name=detail,proto3" json:"detail,omitempty"` Position string `protobuf:"bytes,3,opt,name=position,proto3" json:"position,omitempty"` }
func (*Stack) Descriptor ¶ added in v0.6.0
func (*Stack) GetPosition ¶ added in v0.6.0
func (*Stack) MarshalToSizedBuffer ¶ added in v0.6.0
func (*Stack) ProtoMessage ¶ added in v0.6.0
func (*Stack) ProtoMessage()
func (*Stack) XXX_DiscardUnknown ¶ added in v0.6.0
func (m *Stack) XXX_DiscardUnknown()
func (*Stack) XXX_Marshal ¶ added in v0.6.0
func (*Stack) XXX_Unmarshal ¶ added in v0.6.0
Click to show internal directories.
Click to hide internal directories.