userapi

package
v1.2.30 Latest Latest
Warning

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

Go to latest
Published: Feb 19, 2024 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Overview

Package userapi contains the methods required to manage platform users.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Create

func Create(params CreateParams) (*models.User, error)

Create creates a new user.

func Delete

func Delete(params DeleteParams) error

Delete deletes a user given a username

func Enable

func Enable(params EnableParams) (*models.User, error)

Enable enables or disables an existing user.

func Get

func Get(params GetParams) (*models.User, error)

Get returns information about a specified user.

func GetCurrent

func GetCurrent(params GetCurrentParams) (*models.User, error)

GetCurrent returns information about the current user.

func List

func List(params ListParams) (*models.UserList, error)

List returns a list of all users.

func Update

func Update(params UpdateParams) (*models.User, error)

Update updates an existing user.

func UpdateCurrent

func UpdateCurrent(params UpdateParams) (*models.User, error)

UpdateCurrent updates the current user.

func ValidateRoles

func ValidateRoles(roles []string) error

ValidateRoles ensures the parameters are usable by the consuming function.

Types

type CreateParams

type CreateParams struct {
	*api.API

	Password                  []byte
	Roles                     []string
	UserName, FullName, Email string
}

CreateParams is consumed by Create

func (CreateParams) Validate

func (params CreateParams) Validate() error

Validate ensures the parameters are usable by the consuming function.

type DeleteParams

type DeleteParams struct {
	*api.API

	UserName string
}

DeleteParams is consumed by Delete

func (DeleteParams) Validate

func (params DeleteParams) Validate() error

Validate ensures the parameters are usable by the consuming function.

type EnableParams

type EnableParams struct {
	*api.API

	Enabled  bool
	UserName string
}

EnableParams is consumed by Enable

func (EnableParams) Validate

func (params EnableParams) Validate() error

Validate ensures the parameters are usable by the consuming function.

type GetCurrentParams

type GetCurrentParams struct {
	*api.API
}

GetCurrentParams is consumed by GetCurrent

func (GetCurrentParams) Validate

func (params GetCurrentParams) Validate() error

Validate ensures the parameters are usable by the consuming function.

type GetParams

type GetParams struct {
	*api.API

	UserName string
}

GetParams is consumed by Get

func (GetParams) Validate

func (params GetParams) Validate() error

Validate ensures the parameters are usable by the consuming function.

type ListParams

type ListParams struct {
	*api.API

	IncludeDisabled bool
}

ListParams is consumed by List

func (ListParams) Validate

func (params ListParams) Validate() error

Validate ensures the parameters are usable by the consuming function.

type UpdateParams

type UpdateParams struct {
	*api.API

	Password                  []byte
	Roles                     []string
	FullName, Email, UserName string
}

UpdateParams is consumed by Update

func (UpdateParams) Validate

func (params UpdateParams) Validate() error

Validate ensures the parameters are usable by the consuming function.

Directories

Path Synopsis
Package userauthapi contains the self service logic required to manage a user's authentication settings, such as API keys.
Package userauthapi contains the self service logic required to manage a user's authentication settings, such as API keys.
adminapi
Package userauthadminapi contains the logic required to manage a user's authentication settings, such as API keys.
Package userauthadminapi contains the logic required to manage a user's authentication settings, such as API keys.

Jump to

Keyboard shortcuts

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