Documentation ¶
Index ¶
- Constants
- Variables
- func MakeHttpHandler(log kitlog.Logger, s Service) *mux.Router
- func RegisterRPCService(log kitlog.Logger, repo rel.Repository, config *viper.Viper)
- type Endpoints
- type RpcService
- func (s *RpcService) Delete(userID *int, reply *int) error
- func (s *RpcService) FindByAccount(account string, reply *user.User) error
- func (s *RpcService) FindByID(userID *int, reply *user.User) error
- func (s *RpcService) Insert(args *user.User, reply *int) error
- func (s *RpcService) Update(args *user.User, reply *int) error
- type Service
Constants ¶
View Source
const ( Success = 1 Fail = 0 )
Variables ¶
View Source
var ( ErrInvalidUser = errors.New("invalid user") ErrInvalidToken = errors.New("invalid token") )
Functions ¶
func RegisterRPCService ¶
Types ¶
type Endpoints ¶
func MakeEndpoints ¶
type RpcService ¶
type RpcService struct { Repo rel.Repository Log kitlog.Logger // contains filtered or unexported fields }
func (*RpcService) FindByAccount ¶
func (s *RpcService) FindByAccount(account string, reply *user.User) error
Click to show internal directories.
Click to hide internal directories.