api

package
v1.0.29 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 6, 2020 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	AgentUri        = "http://%s:31024/api/operation/tenant/agents"
	UserDeleteUri   = "http://%s:31024/api/operation/tenant/users/%s"
	OrgUsersUri     = "http://%s:31024/api/operation/tenant/org/%s/users?query=%s"
	LoginByEmailUri = "http://%s:31024/api/security/loginByEmail"
	OrgsUri         = "http://%s:31024/api/security/security/org/topOrg"
	OrgUri          = "http://%s:31024/api/security/security/org"
	UserUri         = "http://%s:31024/api/security/security/users"
	TouchUri        = "http://%s:31024/api/security/touch"
)

Variables

View Source
var (
	ErrWrongUserOrPassword = errors.New("用户名或密码错误")
	ErrDuplicated          = errors.New("软电话号或邮箱重复")
	ErrUnknown             = errors.New("未知错误")
)

Functions

This section is empty.

Types

type Operation

type Operation struct {
	// contains filtered or unexported fields
}

func NewOperation

func NewOperation(host, session string) Operation

func (*Operation) CreateAgent

func (o *Operation) CreateAgent(body []byte) error

func (*Operation) DeleteUser added in v1.0.19

func (o *Operation) DeleteUser(id string) error

func (*Operation) GetAgent

func (o *Operation) GetAgent(email string) ([]byte, error)

func (*Operation) GetLastId

func (o *Operation) GetLastId(prefix int) (int, error)

func (*Operation) GetOrgUsers

func (o *Operation) GetOrgUsers(orgID, query string) ([]byte, error)

func (*Operation) GetOrgs

func (o *Operation) GetOrgs() ([]byte, error)

func (*Operation) PutAgent

func (o *Operation) PutAgent(body []byte) error

type Security

type Security struct {
	// contains filtered or unexported fields
}

func NewSecurity

func NewSecurity(host, email, password string) (Security, string, error)

func (Security) CreateOrg

func (s Security) CreateOrg(body []byte) error

func (*Security) CreateUser

func (s *Security) CreateUser(body []byte) error

func (Security) Heartbeat

func (s Security) Heartbeat()

每分钟维持session心跳

func (*Security) LoginByEmail

func (s *Security) LoginByEmail(host, email, password string) (string, error)

func (*Security) PutUser

func (s *Security) PutUser(body []byte) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL