Documentation ¶
Index ¶
- Constants
- func IsErrno(err error, errno int32) bool
- type App
- type AppApproveTask
- type AppCreateTask
- type AppGetTask
- type AppMemberAddTask
- type AppMemberRemoveTask
- type AppSetTask
- type AppUnapproveTask
- type AppVerDoneTask
- type AppVerInfoGetTask
- type AppVerUpResult
- type AppVerUpTask
- type ConfigService
- func (s *ConfigService) Config() interface{}
- func (s *ConfigService) Name() string
- func (s *ConfigService) NewCode() string
- func (s *ConfigService) NewID(ctx micro.Context) string
- func (s *ConfigService) NewSecret() string
- func (s *ConfigService) NewToken() string
- func (s *ConfigService) OnInit(ctx micro.Context) error
- func (s *ConfigService) OnValid(ctx micro.Context) error
- func (s *ConfigService) Recycle()
- func (s *ConfigService) Sign(secret string, data map[string]interface{}) string
- type Container
- type ContainerAppGetResult
- type ContainerAppGetTask
- type ContainerCreateTask
- type ContainerGetTask
- type ContainerInfoGetResult
- type ContainerInfoGetTask
- type ContainerMemberAddTask
- type ContainerMemberRemoveTask
- type ContainerSetTask
- type LoginResult
- type LoginTask
- type Member
- type SendMailTask
- type Server
- func (s *Server) AppApprove(ctx micro.Context, task *AppApproveTask) (interface{}, error)
- func (s *Server) AppCreate(ctx micro.Context, task *AppCreateTask) (*App, error)
- func (s *Server) AppGet(ctx micro.Context, task *AppGetTask) (*App, error)
- func (s *Server) AppMemberAdd(ctx micro.Context, task *AppMemberAddTask) (*Member, error)
- func (s *Server) AppMemberRemove(ctx micro.Context, task *AppMemberAddTask) (interface{}, error)
- func (s *Server) AppSet(ctx micro.Context, task *AppSetTask) (*App, error)
- func (s *Server) AppUnapprove(ctx micro.Context, task *AppUnapproveTask) (interface{}, error)
- func (s *Server) AppVerDone(ctx micro.Context, task *AppVerDoneTask) (interface{}, error)
- func (s *Server) AppVerInfoGet(ctx micro.Context, task *AppVerInfoGetTask) (interface{}, error)
- func (s *Server) AppVerUp(ctx micro.Context, task *AppVerUpTask) (*AppVerUpResult, error)
- func (s *Server) ContainerAppGet(ctx micro.Context, task *ContainerAppGetTask) (*ContainerAppGetResult, error)
- func (s *Server) ContainerCreate(ctx micro.Context, task *ContainerCreateTask) (*Container, error)
- func (s *Server) ContainerGet(ctx micro.Context, task *ContainerGetTask) (*Container, error)
- func (s *Server) ContainerInfoGet(ctx micro.Context, task *ContainerInfoGetTask) (*ContainerInfoGetResult, error)
- func (s *Server) ContainerMemberAdd(ctx micro.Context, task *ContainerMemberAddTask) (*Member, error)
- func (s *Server) ContainerMemberRemove(ctx micro.Context, task *ContainerMemberAddTask) (interface{}, error)
- func (s *Server) ContainerSet(ctx micro.Context, task *ContainerSetTask) (*Container, error)
- func (s *Server) Login(ctx micro.Context, task *LoginTask) (*LoginResult, error)
- func (s *Server) MailSend(ctx micro.Context, task *SendMailTask) (interface{}, error)
- func (s *Server) UserGet(ctx micro.Context, task *UserGetTask) (*User, error)
- type User
- type UserGetTask
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 ERRNO_AGAIN = 602 ERRNO_NO_PERMISSION = 603 ERRNO_SIGN = 604 ERRNO_MEMBER = 605 ERRNO_APP_VER = 606 )
View Source
const ( SERVICE_SMTP = "smtp" SERVICE_REDIS = "redis" SERVICE_HTTP = "http" SERVICE_OSS = "oss" )
View Source
const ( ROLE_OWNER = "owner" ROLE_READ_WRITE = "readwrite" ROLE_READ_ONLY = "readonly" )
View Source
const (
SERVICE_CONFIG = "abi-app-store"
)
Variables ¶
This section is empty.
Functions ¶
Types ¶
type AppApproveTask ¶
type AppCreateTask ¶
type AppCreateTask struct { Token string `json:"token"` Info interface{} `json:"info,omitempty"` }
type AppGetTask ¶
type AppMemberAddTask ¶
type AppMemberRemoveTask ¶
type AppSetTask ¶
type AppUnapproveTask ¶
type AppVerDoneTask ¶
type AppVerInfoGetTask ¶
type AppVerUpResult ¶
type AppVerUpResult struct {
Url string `json:"url"`
}
type AppVerUpTask ¶
type ConfigService ¶
type ConfigService struct { Db string `json:"db"` Collection string `json:"collection"` Prefix string `json:"prefix"` CodeLength int `json:"code-length"` EmailSubject string `json:"email-subject"` EmailBody string `json:"email-body"` EmailBodyType string `json:"email-body-type"` EmailExpires int `json:"email-expires"` //邮件超时时间(秒) EmailReExpires int `json:"email-re-expires"` //重发邮件间隔时间(秒) EmailEnabled bool `json:"email-enabled"` TokenExpires int `json:"token-expires"` UserSvc string `json:"user-svc"` CacheExpires int `json:"cache-expires"` AppUpExpires int `json:"app-up-expires"` AppGetExpires int `json:"app-get-expires"` // contains filtered or unexported fields }
func GetConfigService ¶
func GetConfigService(ctx micro.Context, name string) (*ConfigService, error)
func (*ConfigService) NewCode ¶
func (s *ConfigService) NewCode() string
func (*ConfigService) NewSecret ¶
func (s *ConfigService) NewSecret() string
func (*ConfigService) NewToken ¶
func (s *ConfigService) NewToken() string
func (*ConfigService) OnValid ¶
func (s *ConfigService) OnValid(ctx micro.Context) error
* * 校验服务是否可用 *
func (*ConfigService) Recycle ¶
func (s *ConfigService) Recycle()
type ContainerAppGetResult ¶
type ContainerAppGetResult struct { Info interface{} `json:"info,omitempty"` Url string `json:"url,omitempty"` }
type ContainerAppGetTask ¶
type ContainerCreateTask ¶
type ContainerCreateTask struct { Token string `json:"token"` Info interface{} `json:"info"` }
type ContainerGetTask ¶
type ContainerInfoGetResult ¶
type ContainerInfoGetResult struct { Info interface{} `json:"info,omitempty"` Ver int `json:"ver"` }
type ContainerInfoGetTask ¶
type ContainerMemberAddTask ¶
type ContainerSetTask ¶
type LoginResult ¶
type SendMailTask ¶
type SendMailTask struct {
Email string `json:"email"`
}
type Server ¶
type Server struct { }
func (*Server) AppApprove ¶
func (s *Server) AppApprove(ctx micro.Context, task *AppApproveTask) (interface{}, error)
func (*Server) AppMemberAdd ¶
func (*Server) AppMemberRemove ¶
func (s *Server) AppMemberRemove(ctx micro.Context, task *AppMemberAddTask) (interface{}, error)
func (*Server) AppUnapprove ¶
func (s *Server) AppUnapprove(ctx micro.Context, task *AppUnapproveTask) (interface{}, error)
func (*Server) AppVerDone ¶
func (s *Server) AppVerDone(ctx micro.Context, task *AppVerDoneTask) (interface{}, error)
func (*Server) AppVerInfoGet ¶
func (s *Server) AppVerInfoGet(ctx micro.Context, task *AppVerInfoGetTask) (interface{}, error)
func (*Server) AppVerUp ¶
func (s *Server) AppVerUp(ctx micro.Context, task *AppVerUpTask) (*AppVerUpResult, error)
func (*Server) ContainerAppGet ¶
func (s *Server) ContainerAppGet(ctx micro.Context, task *ContainerAppGetTask) (*ContainerAppGetResult, error)
func (*Server) ContainerCreate ¶
func (*Server) ContainerGet ¶
func (*Server) ContainerInfoGet ¶
func (s *Server) ContainerInfoGet(ctx micro.Context, task *ContainerInfoGetTask) (*ContainerInfoGetResult, error)
func (*Server) ContainerMemberAdd ¶
func (*Server) ContainerMemberRemove ¶
func (s *Server) ContainerMemberRemove(ctx micro.Context, task *ContainerMemberAddTask) (interface{}, error)
func (*Server) ContainerSet ¶
type UserGetTask ¶
type UserGetTask struct {
Token string `json:"token"`
}
Source Files ¶
Click to show internal directories.
Click to hide internal directories.