 Documentation
      ¶
      Documentation
      ¶
    
    
  
    
  
    Index ¶
- func Equal(err1 error, err2 error) bool
- type Child
- 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
 
- type Stack
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Child ¶
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) ProtoMessage ¶
func (*Child) ProtoMessage()
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) ProtoMessage ¶
func (*Error) ProtoMessage()
type Stack ¶
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) ProtoMessage ¶
func (*Stack) ProtoMessage()
 Click to show internal directories. 
   Click to hide internal directories.