Documentation ¶
Index ¶
- Constants
- type ConfigService
- func (s *ConfigService) Config() interface{}
- func (s *ConfigService) Name() string
- func (s *ConfigService) NewID(ctx micro.Context) string
- func (s *ConfigService) NewPassword() string
- func (s *ConfigService) OnInit(ctx micro.Context) error
- func (s *ConfigService) OnValid(ctx micro.Context) error
- func (s *ConfigService) Recycle()
- func (s *ConfigService) SecPassword(p string) string
- type InfoBatchGetTask
- type InfoGetTask
- type InfoSetTask
- type LoginTask
- type Server
- func (s *Server) BatchGet(ctx micro.Context, task *UserBatchGetTask) ([]*User, error)
- func (s *Server) Create(ctx micro.Context, task *UserCreateTask) (*User, error)
- func (s *Server) Get(ctx micro.Context, task *UserGetTask) (*User, error)
- func (s *Server) InfoBatchGet(ctx micro.Context, task *InfoBatchGetTask) ([]interface{}, error)
- func (s *Server) InfoGet(ctx micro.Context, task *InfoGetTask) (interface{}, error)
- func (s *Server) InfoSet(ctx micro.Context, task *InfoSetTask) (interface{}, error)
- func (s *Server) Login(ctx micro.Context, task *LoginTask) (*User, error)
- func (s *Server) Set(ctx micro.Context, task *UserSetTask) (*User, error)
- type User
- type UserBatchGetTask
- type UserCreateTask
- type UserGetTask
- type UserSetTask
Constants ¶
View Source
const ( ERRNO_OK = 200 ERRNO_NOT_FOUND = 404 ERRNO_INTERNAL_SERVER = 500 ERRNO_INPUT_DATA = 400 ERRNO_INDEX_VALUE = 600 ERRNO_LOGIN = 601 )
View Source
const (
SERVICE_CONFIG = "abi-app-user"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ConfigService ¶
type ConfigService struct { Secret string `json:"secret"` Db string `json:"db"` Collection string `json:"collection"` // contains filtered or unexported fields }
func GetConfigService ¶
func GetConfigService(ctx micro.Context, name string) (*ConfigService, error)
func (*ConfigService) NewPassword ¶
func (s *ConfigService) NewPassword() string
func (*ConfigService) OnValid ¶
func (s *ConfigService) OnValid(ctx micro.Context) error
* * 校验服务是否可用 *
func (*ConfigService) Recycle ¶
func (s *ConfigService) Recycle()
func (*ConfigService) SecPassword ¶
func (s *ConfigService) SecPassword(p string) string
type InfoBatchGetTask ¶
type InfoGetTask ¶
type InfoSetTask ¶
type Server ¶
type Server struct { }
func (*Server) InfoBatchGet ¶
func (s *Server) InfoBatchGet(ctx micro.Context, task *InfoBatchGetTask) ([]interface{}, error)
func (*Server) InfoGet ¶
func (s *Server) InfoGet(ctx micro.Context, task *InfoGetTask) (interface{}, error)
type UserBatchGetTask ¶
type UserBatchGetTask struct {
Ids string `json:"ids"`
}
type UserCreateTask ¶
type UserGetTask ¶
Click to show internal directories.
Click to hide internal directories.