userstore

package
v2.42.0 Latest Latest
Warning

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

Go to latest
Published: Dec 10, 2025 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type APIClient

type APIClient struct {
	ID                string                 `json:"id"`
	Secret            string                 `json:"secret"`
	Name              string                 `json:"name"`
	Created           string                 `json:"created,omitempty"`
	Updated           string                 `json:"updated,omitempty"`
	UpdatedBy         string                 `json:"updated_by,omitempty"`
	Author            string                 `json:"author,omitempty"`
	Roles             []rolestore.RoleHandle `json:"roles"`
	OAuthClientID     string                 `json:"oauth_client_id,omitempty"`
	OAuthClientSecret string                 `json:"oauth_client_secret,omitempty"`
}

APIClient api client definition.

type APIClientCreate

type APIClientCreate struct {
	Name  string                 `json:"name"`
	Roles []rolestore.RoleHandle `json:"roles"`
}

APIClientCreate api client create request definition.

type APIClientSearch

type APIClientSearch struct {
	Keywords string `json:"keywords"`
	SortDir  string `json:"sortdir"`
	SortKey  string `json:"sortkey"`
	Limit    *int   `json:"limit,omitempty"`
	Offset   *int   `json:"offset,omitempty"`
}

APIClientSearch api client search request definition.

type Attributes

type Attributes struct {
	Key   string `json:"key"`
	Value string `json:"value"`
}

Attributes user attribute definition.

type ExtenderClient

type ExtenderClient struct {
	Type                          string   `json:"type"`
	Name                          string   `json:"name"`
	RoutingPrefix                 string   `json:"routing_prefix"`
	WebProxyExtenderRoutePatterns []string `json:"web_proxy_extender_route_patterns,omitempty"`
	WebProxyExtenderRoutes        []string `json:"web_proxy_extender_routes,omitempty"`
	ExtenderMode                  string   `json:"extender_mode"`
	ExtenderSSHAddress            string   `json:"extender_ssh_address,omitempty"`
	ExtenderSSHPort               int      `json:"extender_ssh_port,omitempty"`
	ExtenderPublicKey             string   `json:"extender_public_key,omitempty"`
}

type LocalUser

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"`
	Principal              string            `json:"username,omitempty"`
	WindowsAccount         string            `json:"windows_account,omitempty"`
	UnixAccount            string            `json:"unix_account,omitempty"`
	FullName               string            `json:"full_name,omitempty"`
	DisplayName            string            `json:"display_name,omitempty"`
	FirstName              string            `json:"first_name,omitempty"`
	LastName               string            `json:"last_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               LocalUserPassword `json:"password"`
	PasswordChangeRequired bool              `json:"password_change_required"`
	Attributes             []Attributes      `json:"attributes"`
}

LocalUser local user definition.

type LocalUserParams

type LocalUserParams struct {
	UserID   string `url:"id,omitempty"`
	Username string `url:"username,omitempty"`
}

LocalUserParams local user query parameters definition.

type LocalUserPassword

type LocalUserPassword struct {
	Password string `json:"password,omitempty"`
	Created  string `json:"created,omitempty"`
}

LocalUserPassword local user password definition.

type TrustedClient

type TrustedClient struct {
	ID                            string   `json:"id"`
	Type                          string   `json:"type"`
	Secret                        string   `json:"secret"`
	Name                          string   `json:"name"`
	AccessGroupID                 string   `json:"access_group_id"`
	Created                       string   `json:"created,omitempty"`
	Updated                       string   `json:"updated,omitempty"`
	UpdatedBy                     string   `json:"updated_by,omitempty"`
	Author                        string   `json:"author,omitempty"`
	Permissions                   []string `json:"permissions"`
	Subnets                       []string `json:"subnets"`
	Enabled                       bool     `json:"enabled"`
	Registered                    bool     `json:"registered"`
	AllowRepeatedRegistration     bool     `json:"allow_repeated_registration"`
	ExtenderAddress               []string `json:"extender_address"`
	OAuthClientID                 string   `json:"oauth_client_id,omitempty"`
	OAuthClientSecret             string   `json:"oauth_client_secret,omitempty"`
	GroupID                       string   `json:"group_id"`
	WebProxyAddress               string   `json:"web_proxy_address,omitempty"`
	WebProxyPort                  string   `json:"web_proxy_port,omitempty"`
	WebProxyExtenderRoutePatterns []string `json:"web_proxy_extender_route_patterns,omitempty"`
	Data                          string   `json:"data,omitempty"`
	RoutingPrefix                 string   `json:"routing_prefix"`
	ExtenderMode                  string   `json:"extender_mode"`
	ExtenderSSHAddress            string   `json:"extender_ssh_address,omitempty"`
	ExtenderSSHPort               int      `json:"extender_ssh_port,omitempty"`
	ExtenderPublicKey             string   `json:"extender_public_key,omitempty"`
}

TrustedClient trusted client definition.

type UserStore

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

UserStore is a local user store client instance.

func New

func New(api restapi.Connector) *UserStore

New local user store client constructor.

func (*UserStore) CreateAPIClient

func (c *UserStore) CreateAPIClient(client *APIClientCreate) (response.Identifier, error)

CreateAPIClient create api client.

func (*UserStore) CreateTrustedClient

func (c *UserStore) CreateTrustedClient(client *TrustedClient) (response.Identifier, error)

CreateTrustedClient created trusted client.

func (*UserStore) CreateUser

func (c *UserStore) CreateUser(user *LocalUser) (response.Identifier, error)

CreateUser create local user.

func (*UserStore) DeleteAPIClient

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

DeleteAPIClient delete api client.

func (*UserStore) DeleteTrustedClient

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

DeleteTrustedClient delete trusted client.

func (*UserStore) DeleteUser

func (c *UserStore) DeleteUser(userID string) error

DeleteUser delete local user.

func (*UserStore) GetAPIClient

func (c *UserStore) GetAPIClient(clientID string) (*APIClient, error)

GetAPIClient get api client by id.

func (*UserStore) GetAPIClients

func (c *UserStore) GetAPIClients(opts ...filters.Option) (*response.ResultSet[APIClient], error)

MARK: API Client GetAPIClients get registered api clients.

func (*UserStore) GetExtenderClients

func (c *UserStore) GetExtenderClients() (*response.ResultSet[ExtenderClient], error)

MARK: Extender Clients GetExtenderClients get extender clients.

func (*UserStore) GetTrustedClient

func (c *UserStore) GetTrustedClient(clientID string) (*TrustedClient, error)

GetTrustedClient get trusted client by id.

func (*UserStore) GetTrustedClients

func (c *UserStore) GetTrustedClients() (*response.ResultSet[TrustedClient], error)

MARK: Trusted Clients GetTrustedClients get trusted clients.

func (*UserStore) GetUser

func (c *UserStore) GetUser(userID string) (*LocalUser, error)

GetUser get local user by id.

func (*UserStore) GetUserTags

func (c *UserStore) GetUserTags(opts ...filters.Option) (*response.ResultSet[string], error)

GetUserTags get local user tags.

func (*UserStore) GetUsers

func (c *UserStore) GetUsers(opts ...filters.Option) (*response.ResultSet[LocalUser], error)

MARK: Users GetUsers get local users.

func (*UserStore) SearchAPIClients

func (c *UserStore) SearchAPIClients(search *APIClientSearch) (*response.ResultSet[APIClient], error)

SearchAPIClients search api clients.

func (*UserStore) Status

func (c *UserStore) Status() (*response.ServiceStatus, error)

MARK: Status Status get local user store microservice status.

func (*UserStore) UpdateAPIClient

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

UpdateAPIClient update api client.

func (*UserStore) UpdateTrustedClient

func (c *UserStore) UpdateTrustedClient(clientID string, client *TrustedClient) error

UpdateTrustedClient update trusted client.

func (*UserStore) UpdateUser

func (c *UserStore) UpdateUser(userID string, user *LocalUser) error

UpdateUser update local user.

func (*UserStore) UpdateUserPassword

func (c *UserStore) UpdateUserPassword(userID string, password LocalUserPassword) error

UpdateUserPassword update local user password.

Jump to

Keyboard shortcuts

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