Documentation
¶
Index ¶
- Constants
- type APIClient
- type ClientType
- type TrustedClient
- type UserStore
- func (store *UserStore) APIClient(id string) (*APIClient, error)
- func (store *UserStore) APIClients() ([]APIClient, error)
- func (store *UserStore) CreateAPIClient(name string, roles []string) (string, error)
- func (store *UserStore) CreateTrustedClient(client TrustedClient) (string, error)
- func (store *UserStore) DeleteAPIClient(id string) error
- func (store *UserStore) DeleteTrustedClient(id string) error
- func (store *UserStore) TrustedClient(id string) (*TrustedClient, error)
- func (store *UserStore) TrustedClients() ([]TrustedClient, error)
Constants ¶
View Source
const (
EXTENDER = ClientType("EXTENDER")
)
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 TrustedClient ¶
type TrustedClient struct {
ID string `json:"id,omitempty"`
Type ClientType `json:"type,omitempty"`
Secret string `json:"secret,omitempty"`
Name string `json:"name,omitempty"`
Permissions []string `json:"permissions,omitempty"`
Registered bool `json:"registered,omitempty"`
Enabled bool `json:"enabled,omitempty"`
}
TrustedClient definition
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) 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) DeleteTrustedClient ¶
DeleteTrustedClient removes the client
func (*UserStore) TrustedClient ¶
func (store *UserStore) TrustedClient(id string) (*TrustedClient, error)
TrustedClient returns details about the client
func (*UserStore) TrustedClients ¶
func (store *UserStore) TrustedClients() ([]TrustedClient, error)
TrustedClients fetches all known trusted clients
Click to show internal directories.
Click to hide internal directories.