Documentation ¶
Index ¶
- func GetOffsetAndLimit(offset, limit int64) (int64, int64)
- func Init() error
- func NewBadRequest(err error, message string) error
- func NewBadRequestStatus(err error, message string, status int) error
- func NewNotFound(err error) error
- func RegisterController(c Controller)
- func RegisterInterceptors(i Interceptor)
- func Serve(ctx context.Context) error
- type Controller
- type GWError
- type Interceptor
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetOffsetAndLimit ¶
GetOffsetAndLimit return the offset and limit variable from the request, if not available return the default value
func NewBadRequest ¶
NewBadRequest is the bad request
func NewBadRequestStatus ¶
NewBadRequestStatus is the bad request
func RegisterController ¶
func RegisterController(c Controller)
func RegisterInterceptors ¶
func RegisterInterceptors(i Interceptor)
Types ¶
type Controller ¶
type GWError ¶
type GWError interface { error // Status is the http status code Status() int // Message to outside user Message() string // Fields return the fields or nil Fields() map[string]string }
GWError is used for the error returned from the grpc implementation it can handle custom errors
type Interceptor ¶
type Interceptor struct { Unary grpc.UnaryServerInterceptor Stream grpc.StreamServerInterceptor }
Click to show internal directories.
Click to hide internal directories.