Documentation ¶
Index ¶
- type APIClient
- func (api *APIClient) Admin(user, token string) bool
- func (api *APIClient) Audit(date, token string) (a []core.Audit, msg string, err error)
- func (api *APIClient) CSRs(token string) (c []core.CSR, msg string, err error)
- func (api *APIClient) Client(host, token string) (c core.Client, msg string, err error)
- func (api *APIClient) ClientAction(hosts []string, action, delay, token string) (string, error)
- func (api *APIClient) ClientPackageAction(host, action, delay, token string, list []string) (string, error)
- func (api *APIClient) Clients(token string) (c []core.Client, msg string, err error)
- func (api *APIClient) ClientsSlice(token string) ([]string, string, error)
- func (api *APIClient) CreateGroup(group *core.Group, token string) (string, error)
- func (api *APIClient) CreateUser(user, password, enabled, admin, token string) (string, error)
- func (api *APIClient) DelCSRs(token string) (string, error)
- func (api *APIClient) DeleteGroup(name, token string) (string, error)
- func (api *APIClient) DeleteUser(user, token string) (string, error)
- func (api *APIClient) Group(name, token string) (g core.Group, msg string, err error)
- func (api *APIClient) GroupClients(name, token string) (c []core.Client, msg string, err error)
- func (api *APIClient) GroupMemberClients(name, token string) (m map[string]bool, msg string, err error)
- func (api *APIClient) GroupMemberPackages(name, token string) (pack []core.PackageList, msg string, err error)
- func (api *APIClient) GroupMemberUsers(name, token string) (m map[string]bool, msg string, err error)
- func (api *APIClient) Groups(token string) (g []core.Group, msg string, err error)
- func (api *APIClient) Login(user, password, method string) (msg, token string, err error)
- func (api *APIClient) Logout(token string) (err error)
- func (api *APIClient) Methods() (s []string, msg string, err error)
- func (api *APIClient) PackageClients(name, pack, token string) (c []core.PackageClient, msg string, err error)
- func (api *APIClient) SetComment(host, comment, token string) (string, error)
- func (api *APIClient) SignCSRs(host, token string) (string, error)
- func (api *APIClient) Stats(token string) (s core.Stats, msg string, err error)
- func (api *APIClient) Unlock(user string, token string) (string, error)
- func (api *APIClient) UpdateGroup(group *core.Group, token string) (string, error)
- func (api *APIClient) UpdateUser(user, password, enabled, admin, token string) (string, error)
- func (api *APIClient) User(user, token string) (u core.User, msg string, err error)
- func (api *APIClient) UserGroups(token string) (g []core.Group, msg string, err error)
- func (api *APIClient) Users(token string) (u []core.User, msg string, err error)
- func (api *APIClient) UsersSlice(token string) ([]string, string, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type APIClient ¶
APIClient struct
func NewAPIClient ¶
NewAPIClient returns a new api client
func (*APIClient) ClientAction ¶
ClientAction calls the api to submit a client action
func (*APIClient) ClientPackageAction ¶
func (api *APIClient) ClientPackageAction(host, action, delay, token string, list []string) (string, error)
ClientPackageAction calls the api to submit a client package action
func (*APIClient) ClientsSlice ¶
ClientsSlice returns a string slice of all clients
func (*APIClient) CreateGroup ¶
CreateGroup calls the api to create a group
func (*APIClient) CreateUser ¶
CreateUser calls the api to create a user
func (*APIClient) DeleteGroup ¶
DeleteGroup calls the api to delete a group
func (*APIClient) DeleteUser ¶
DeleteUser calls the api to delete a user
func (*APIClient) GroupClients ¶
GroupClients calls the api to get clients of a group
func (*APIClient) GroupMemberClients ¶
func (api *APIClient) GroupMemberClients(name, token string) (m map[string]bool, msg string, err error)
GroupMemberClients calls the api to get clients of a group
func (*APIClient) GroupMemberPackages ¶
func (api *APIClient) GroupMemberPackages(name, token string) (pack []core.PackageList, msg string, err error)
GroupMemberPackages calls the api to get all packages of a group
func (*APIClient) GroupMemberUsers ¶
func (api *APIClient) GroupMemberUsers(name, token string) (m map[string]bool, msg string, err error)
GroupMemberUsers calls the api to get users of a group
func (*APIClient) PackageClients ¶
func (api *APIClient) PackageClients(name, pack, token string) (c []core.PackageClient, msg string, err error)
PackageClients calls the api to get clients of a group
func (*APIClient) SetComment ¶
SetComment calls the api to set a client comment
func (*APIClient) UpdateGroup ¶
UpdateGroup calls the api to update a group
func (*APIClient) UpdateUser ¶
UpdateUser calls the api to update a user
func (*APIClient) UserGroups ¶
UserGroups calls the api to get groups of a user