Documentation ¶
Index ¶
- func BadRequestErr() *core.Error
- func EncodeToken(tokenID string) (string, error)
- func ForbiddenErr() *core.Error
- func InternalServerErr() *core.Error
- type Claims
- type Config
- type ContentType
- type CoreRPC
- type ErrorRPCState
- type Permissions
- type ProductRPC
- type RPC
- type RPCContext
- type RPCHandler
- type RPCRequest
- type RPCResponse
- type Route
- type System
- type TokenRPC
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BadRequestErr ¶
func EncodeToken ¶
func ForbiddenErr ¶
func InternalServerErr ¶
Types ¶
type Claims ¶
type Claims struct { TokenID string `json:"tokenID"` jwt.StandardClaims }
func DecodeToken ¶
type ContentType ¶
type ContentType int32
const ( ContentType_Bytes ContentType = iota ContentType_JSON )
type CoreRPC ¶
type CoreRPC struct { RPC // contains filtered or unexported fields }
func NewCoreRPC ¶
type ErrorRPCState ¶
type ErrorRPCState struct {
core.ErrorReply
}
type Permissions ¶
type ProductRPC ¶
type ProductRPC struct { RPC // contains filtered or unexported fields }
func NewProductRPC ¶
func NewProductRPC(s *System) *ProductRPC
type RPCContext ¶
type RPCContext struct { Req RPCRequest Res RPCResponse }
type RPCHandler ¶
type RPCHandler func(*RPCContext)
func RequiredAuth ¶
func RequiredAuth() RPCHandler
func RequiredPermissions ¶
func RequiredPermissions(permissions ...string) RPCHandler
type RPCRequest ¶
type RPCResponse ¶
type RPCResponse struct { ContentType ContentType Header nats.Header Data interface{} Error error }
type Route ¶
type Route struct {
// contains filtered or unexported fields
}
func (*Route) Handle ¶
func (r *Route) Handle(apiPath string, handlers ...RPCHandler)
func (*Route) Use ¶
func (r *Route) Use(handlers ...RPCHandler)
Source Files ¶
Click to show internal directories.
Click to hide internal directories.