Documentation
¶
Index ¶
- Constants
- 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(ID *string, reply *int) error
- func (s *RpcService) FindByID(ID *int, reply *app.App) error
- func (s *RpcService) Insert(args *app.App, reply *int) error
- func (s *RpcService) InsertAppUser(args *app.AppUser, reply *int) error
- func (s *RpcService) Update(args *app.App, reply *int) error
- type Service
Constants ¶
View Source
const ( Success = 1 Fail = 0 )
Variables ¶
This section is empty.
Functions ¶
func RegisterRPCService ¶
Types ¶
type Endpoints ¶
type Endpoints struct { CreateAppEndpoint endpoint.Endpoint AppInfoEndpoint endpoint.Endpoint RemoveAppEndpoint endpoint.Endpoint UpdateAppEndpoint endpoint.Endpoint }
func MakeEndpoints ¶
type RpcService ¶
type RpcService struct { Repo rel.Repository Log kitlog.Logger // contains filtered or unexported fields }
func (*RpcService) InsertAppUser ¶
func (s *RpcService) InsertAppUser(args *app.AppUser, reply *int) error
type Service ¶
type Service interface { CreateApp(req *createAppRequest) (res *createAppResponse, err error) AppInfo(req *appInfoRequest) (res *appInfoResponse, err error) UpdateApp(req *updateAppRequest) (result *int, err error) RemoveApp(req *removeAppRequest) (result *int, err error) }
r.Methods("POST").Path("/create").Handler(createAppHandler)
r.Methods("POST").Path("/remove").Handler(removeAppHandler) r.Methods("POST").Path("/info").Handler(appInfoHandler) r.Methods("POST").Path("/update").Handler(updateAppHandler)
Click to show internal directories.
Click to hide internal directories.