rpc

package
v0.4.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 16, 2020 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LogWrapper

func LogWrapper(next server.HandlerFunc) server.HandlerFunc

Types

type Error

type Error struct {
	Code    int
	Message string
}

func (Error) String

func (e Error) String() string

type Guard

type Guard interface {
	APIKeyValid(key string) (string, error)
}

type UsersHandler

type UsersHandler struct {
	errors.AllErrCheck
	// contains filtered or unexported fields
}

func NewHandler

func NewHandler(g Guard, um UsersModel) (*UsersHandler, error)

func (*UsersHandler) APIKeyValid

func (h *UsersHandler) APIKeyValid(ctx context.Context, APIKey string) (context.Context, error)

func (*UsersHandler) GetDetails

func (h *UsersHandler) GetDetails(ctx context.Context, req *api.GetDetailsReq, resp *api.User) error

func (*UsersHandler) Wrapper

type UsersModel

type UsersModel interface {
	errors.AllErrChecker
	GetUserDetails(JWT string, userID string) (*model.User, error)
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL