Documentation
¶
Index ¶
- Constants
- Variables
- func StartHttpService() error
- func StartService() error
- type ClientConfig
- type Config
- type DatabaseConfig
- type EtcdConfig
- type HandlerServiceFunc
- type HttpServer
- type HttpServerConfig
- type HttpService
- func (h *HttpService) AddUser(reqData []byte) (interface{}, error)
- func (h *HttpService) DelUser(reqData []byte) (interface{}, error)
- func (h *HttpService) GetUser(reqData []byte) (interface{}, error)
- func (h *HttpService) GetUserIdByPhoneNumber(reqData []byte) (interface{}, error)
- func (h *HttpService) GetUsersByName(reqData []byte) (interface{}, error)
- func (h *HttpService) ModifyUserInfo(reqData []byte) (interface{}, error)
- type LogConfig
- type ServerConfig
- type Service
- func (s *Service) AddUser(ctx context.Context, req *userpb.AddUserRequest) (*userpb.AddUserResponse, error)
- func (s *Service) AddUserInfo(ctx context.Context, req *userpb.AddUserInfoRequest) (*userpb.AddUserInfoResponse, error)
- func (s *Service) DecryptWxUserInfo(ctx context.Context, req *userpb.DecryptWxUserInfoRequest) (*userpb.DecryptWxUserInfoResponse, error)
- func (s *Service) DelUser(ctx context.Context, req *userpb.DelUserRequest) (*userpb.DelUserResponse, error)
- func (s *Service) GetUser(ctx context.Context, req *userpb.GetUserRequest) (*userpb.GetUserResponse, error)
- func (s *Service) GetUserIdByPhoneNumber(ctx context.Context, req *userpb.GetUserIdByPhoneNumberRequest) (*userpb.GetUserIdByPhoneNumberResponse, error)
- func (s *Service) GetUsersByName(ctx context.Context, req *userpb.GetUsersByNameRequest) (*userpb.GetUsersByNameResponse, error)
- func (s *Service) Login(ctx context.Context, req *userpb.LoginRequest) (*userpb.LoginResponse, error)
- func (s *Service) ModifyUserInfo(ctx context.Context, req *userpb.ModifyUserInfoRequest) (*userpb.ModifyUserInfoResponse, error)
- type WxUserInfo
Constants ¶
View Source
const ( APPID = "wx374a0f37b50eb5ce" APPSECRET = "1ffa637e5224634a85228c825289c548" )
Variables ¶
View Source
var (
App = &Service{}
)
Functions ¶
func StartHttpService ¶
func StartHttpService() error
func StartService ¶
func StartService() error
Types ¶
type ClientConfig ¶
type ClientConfig struct {
AntServiceName string `yaml:"antServiceName" json:"antServiceName"`
}
type Config ¶
type Config struct { Log *LogConfig `yaml:"log" json:"log"` Etcd *EtcdConfig `yaml:"etcd" json:"etcd"` Server *ServerConfig `yaml:"server" json:"server"` HttpServer *HttpServerConfig `yaml:"httpServer" json:"httpServer"` Database *DatabaseConfig `yaml:"database" json:"database"` Client *ClientConfig `yaml:"client" json:"client"` }
type DatabaseConfig ¶
type EtcdConfig ¶
type EtcdConfig struct {
Endpoints []string `yaml:"endpoints" json:"endpoints"`
}
type HandlerServiceFunc ¶
type HttpServer ¶
func (*HttpServer) StartHttpServer ¶
func (h *HttpServer) StartHttpServer(httpService *HttpService)
type HttpServerConfig ¶
type HttpServerConfig struct {
Port string `yaml:"port" json:"port"`
}
type HttpService ¶
type HttpService struct {
ServiceApp *Service
}
func (*HttpService) AddUser ¶
func (h *HttpService) AddUser(reqData []byte) (interface{}, error)
func (*HttpService) DelUser ¶
func (h *HttpService) DelUser(reqData []byte) (interface{}, error)
func (*HttpService) GetUser ¶
func (h *HttpService) GetUser(reqData []byte) (interface{}, error)
func (*HttpService) GetUserIdByPhoneNumber ¶
func (h *HttpService) GetUserIdByPhoneNumber(reqData []byte) (interface{}, error)
func (*HttpService) GetUsersByName ¶
func (h *HttpService) GetUsersByName(reqData []byte) (interface{}, error)
func (*HttpService) ModifyUserInfo ¶
func (h *HttpService) ModifyUserInfo(reqData []byte) (interface{}, error)
type ServerConfig ¶
type Service ¶
type Service struct { Config *Config // contains filtered or unexported fields }
func (*Service) AddUser ¶
func (s *Service) AddUser(ctx context.Context, req *userpb.AddUserRequest) (*userpb.AddUserResponse, error)
func (*Service) AddUserInfo ¶
func (s *Service) AddUserInfo(ctx context.Context, req *userpb.AddUserInfoRequest) (*userpb.AddUserInfoResponse, error)
func (*Service) DecryptWxUserInfo ¶
func (s *Service) DecryptWxUserInfo(ctx context.Context, req *userpb.DecryptWxUserInfoRequest) (*userpb.DecryptWxUserInfoResponse, error)
func (*Service) DelUser ¶
func (s *Service) DelUser(ctx context.Context, req *userpb.DelUserRequest) (*userpb.DelUserResponse, error)
func (*Service) GetUser ¶
func (s *Service) GetUser(ctx context.Context, req *userpb.GetUserRequest) (*userpb.GetUserResponse, error)
func (*Service) GetUserIdByPhoneNumber ¶
func (s *Service) GetUserIdByPhoneNumber(ctx context.Context, req *userpb.GetUserIdByPhoneNumberRequest) (*userpb.GetUserIdByPhoneNumberResponse, error)
func (*Service) GetUsersByName ¶
func (s *Service) GetUsersByName(ctx context.Context, req *userpb.GetUsersByNameRequest) (*userpb.GetUsersByNameResponse, error)
func (*Service) Login ¶
func (s *Service) Login(ctx context.Context, req *userpb.LoginRequest) (*userpb.LoginResponse, error)
func (*Service) ModifyUserInfo ¶
func (s *Service) ModifyUserInfo(ctx context.Context, req *userpb.ModifyUserInfoRequest) (*userpb.ModifyUserInfoResponse, error)
Click to show internal directories.
Click to hide internal directories.