Documentation ¶
Index ¶
- Constants
- type APIClient
- type ClientType
- type FilterUser
- type LocalUser
- type Params
- type Password
- type TrustedClient
- type UserStore
- func (store *UserStore) APIClient(clientID string) (*APIClient, error)
- func (store *UserStore) APIClients() ([]APIClient, error)
- func (store *UserStore) CreateAPIClient(name string, roles []string) (string, error)
- func (store *UserStore) CreateLocalUser(newUser LocalUser) (string, error)
- func (store *UserStore) CreateTrustedClient(client TrustedClient) (string, error)
- func (store *UserStore) DeleteAPIClient(clientID string) error
- func (store *UserStore) DeleteLocalUser(userID string) error
- func (store *UserStore) DeleteTrustedClient(clientID string) error
- func (store *UserStore) ExtenderClients() ([]TrustedClient, error)
- func (store *UserStore) LocalUser(userID string) (*LocalUser, error)
- func (store *UserStore) LocalUserTags(offset, limit int, sortdir, query string) ([]string, error)
- func (store *UserStore) LocalUsers(offset, limit int, userID, username string) ([]LocalUser, error)
- func (store *UserStore) TrustedClient(clientID string) (*TrustedClient, error)
- func (store *UserStore) TrustedClients() ([]TrustedClient, error)
- func (store *UserStore) UpdateAPIClient(clientID string, client *APIClient) error
- func (store *UserStore) UpdateLocalUser(userID string, localUser *LocalUser) error
- func (store *UserStore) UpdateLocalUserPassword(userID string, password *Password) error
- func (store *UserStore) UpdateTrustedClient(clientID string, client *TrustedClient) error
Constants ¶
const ( ClientExtender = ClientType("EXTENDER") ClientHostProvisioning = ClientType("HOST_PROVISIONING") )
ClientType supported values
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type APIClient ¶ added in v0.3.0
type APIClient struct { ID string `json:"id,omitempty"` Name string `json:"name,omitempty"` Secret string `json:"secret,omitempty"` AuthClientID string `json:"oauth_client_id"` AuthClientSecret string `json:"oauth_client_secret"` Roles []rolestore.RoleRef `json:"roles,omitempty"` Created string `json:"created,omitempty"` Author string `json:"author,omitempty"` }
APIClient definition
type FilterUser ¶ added in v0.6.0
type FilterUser struct { Params UserID string `json:"id,omitempty"` Username string `json:"username,omitempty"` }
FilterUser struct for local users queries.
type LocalUser ¶ added in v0.6.0
type LocalUser struct { ID string `json:"id,omitempty"` Created string `json:"created,omitempty"` Updated string `json:"updated,omitempty"` UpdatedBy string `json:"updated_by,omitempty"` Author string `json:"author,omitempty"` Comment string `json:"comment,omitempty"` Tags []string `json:"tags,omitempty"` Username string `json:"username,omitempty"` GivenName string `json:"given_name,omitempty"` FullName string `json:"full_name,omitempty"` JobTitle string `json:"job_title,omitempty"` Company string `json:"company,omitempty"` Department string `json:"department,omitempty"` Email string `json:"email,omitempty"` Telephone string `json:"telephone,omitempty"` Locale string `json:"locale,omitempty"` Password Password `json:"password,omitempty"` }
LocalUser definition
type Params ¶ added in v0.6.0
type Params struct { Offset int `json:"offset,omitempty"` Limit int `json:"limit,omitempty"` Sortdir string `json:"sortdir,omitempty"` Query string `json:"query,omitempty"` }
Params struct for pagination queries.
type Password ¶ added in v0.6.0
type Password struct {
Password string `json:"password,omitempty"`
}
Password definition
type TrustedClient ¶
type TrustedClient struct { ID string `json:"id,omitempty"` Secret string `json:"secret,omitempty"` Name string `json:"name,omitempty"` WebProxyAddress string `json:"web_proxy_address,omitempty"` Registered bool `json:"registered,omitempty"` Enabled bool `json:"enabled,omitempty"` Type ClientType `json:"type,omitempty"` Permissions []string `json:"permissions,omitempty"` ExtenderAddress []string `json:"extender_address,omitempty"` Subnets []string `json:"subnets,omitempty"` RoutingPrefix string `json:"routing_prefix,omitempty"` AccessGroupId string `json:"access_group_id,omitempty"` }
TrustedClient definition
func HostProvisioning ¶ added in v0.4.0
func HostProvisioning(name string) TrustedClient
HostProvisioning creates new trusted client
type UserStore ¶
type UserStore struct {
// contains filtered or unexported fields
}
UserStore is a role-store client instance.
func (*UserStore) APIClients ¶ added in v0.3.0
APIClients returns list of all registered api clients
func (*UserStore) CreateAPIClient ¶ added in v0.3.0
CreateAPIClient creates new API client
func (*UserStore) CreateLocalUser ¶ added in v0.6.0
CreateLocalUser create a new local PrivX user
func (*UserStore) CreateTrustedClient ¶
func (store *UserStore) CreateTrustedClient(client TrustedClient) (string, error)
CreateTrustedClient registers new client to PrivX
func (*UserStore) DeleteAPIClient ¶ added in v0.3.0
DeleteAPIClient removes existing API client
func (*UserStore) DeleteLocalUser ¶ added in v0.6.0
DeleteLocalUser delete a local user
func (*UserStore) DeleteTrustedClient ¶
DeleteTrustedClient removes the client
func (*UserStore) ExtenderClients ¶ added in v0.6.0
func (store *UserStore) ExtenderClients() ([]TrustedClient, error)
ExtenderClients returns a list of extender client names and types
func (*UserStore) LocalUserTags ¶ added in v0.6.0
LocalUserTags returns local user tags
func (*UserStore) LocalUsers ¶ added in v0.6.0
LocalUsers returns user details from all known local users
func (*UserStore) TrustedClient ¶
func (store *UserStore) TrustedClient(clientID string) (*TrustedClient, error)
TrustedClient returns details about the client
func (*UserStore) TrustedClients ¶
func (store *UserStore) TrustedClients() ([]TrustedClient, error)
TrustedClients fetches all known trusted clients
func (*UserStore) UpdateAPIClient ¶ added in v0.6.0
UpdateAPIClient update existing api client
func (*UserStore) UpdateLocalUser ¶ added in v0.6.0
UpdateLocalUser update existing local user
func (*UserStore) UpdateLocalUserPassword ¶ added in v0.6.0
UpdateLocalUserPassword update existing local user password
func (*UserStore) UpdateTrustedClient ¶ added in v0.6.0
func (store *UserStore) UpdateTrustedClient(clientID string, client *TrustedClient) error
UpdateTrustedClient update existing trusted client