userstore

package
v1.34.0 Latest Latest
Warning

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

Go to latest
Published: Mar 25, 2024 License: Apache-2.0 Imports: 3 Imported by: 1

Documentation

Index

Constants

View Source
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 ClientType

type ClientType string

ClientType is a type of trusted clients

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 Extender

func Extender(name string) TrustedClient

Extender creates new trusted client

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 New

func New(api restapi.Connector) *UserStore

New creates a new user-store client instance

func (*UserStore) APIClient added in v0.3.0

func (store *UserStore) APIClient(clientID string) (*APIClient, error)

APIClient returns details about API client

func (*UserStore) APIClients added in v0.3.0

func (store *UserStore) APIClients() ([]APIClient, error)

APIClients returns list of all registered api clients

func (*UserStore) CreateAPIClient added in v0.3.0

func (store *UserStore) CreateAPIClient(name string, roles []string) (string, error)

CreateAPIClient creates new API client

func (*UserStore) CreateLocalUser added in v0.6.0

func (store *UserStore) CreateLocalUser(newUser LocalUser) (string, error)

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

func (store *UserStore) DeleteAPIClient(clientID string) error

DeleteAPIClient removes existing API client

func (*UserStore) DeleteLocalUser added in v0.6.0

func (store *UserStore) DeleteLocalUser(userID string) error

DeleteLocalUser delete a local user

func (*UserStore) DeleteTrustedClient

func (store *UserStore) DeleteTrustedClient(clientID string) error

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) LocalUser added in v0.6.0

func (store *UserStore) LocalUser(userID string) (*LocalUser, error)

LocalUser returns details about the local user

func (*UserStore) LocalUserTags added in v0.6.0

func (store *UserStore) LocalUserTags(offset, limit int, sortdir, query string) ([]string, error)

LocalUserTags returns local user tags

func (*UserStore) LocalUsers added in v0.6.0

func (store *UserStore) LocalUsers(offset, limit int, userID, username string) ([]LocalUser, error)

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

func (store *UserStore) UpdateAPIClient(clientID string, client *APIClient) error

UpdateAPIClient update existing api client

func (*UserStore) UpdateLocalUser added in v0.6.0

func (store *UserStore) UpdateLocalUser(userID string, localUser *LocalUser) error

UpdateLocalUser update existing local user

func (*UserStore) UpdateLocalUserPassword added in v0.6.0

func (store *UserStore) UpdateLocalUserPassword(userID string, password *Password) error

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

Jump to

Keyboard shortcuts

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