users

package
Version: v2.0.0-...-04819b0 Latest Latest
Warning

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

Go to latest
Published: Aug 18, 2021 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// ServiceName - The name of service.
	ServiceName = "Users"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type GetUserCommandInput

type GetUserCommandInput struct {
	Id string
}

GetUserCommandInput - Inputs for GetUserCommand

type GetUsersCommandInput

type GetUsersCommandInput struct {
	Page          string
	NumberPerPage string
	Filter        string
	Username      string
	SortKey       string
	Order         string
}

GetUsersCommandInput - Inputs for GetUsersCommand

type UpdateUserCommandInput

type UpdateUserCommandInput struct {
	Body models.UserView
	Id   string
}

UpdateUserCommandInput - Inputs for UpdateUserCommand

type UpdateUserPasswordCommandInput

type UpdateUserPasswordCommandInput struct {
	Body models.UserPasswordView
	Id   string
}

UpdateUserPasswordCommandInput - Inputs for UpdateUserPasswordCommand

type UsersAPI

type UsersAPI interface {
	GetUsersCommand(input *GetUsersCommandInput) (output *models.UsersView, resp *http.Response, err error)
	GetUserCommand(input *GetUserCommandInput) (output *models.UserView, resp *http.Response, err error)
	UpdateUserCommand(input *UpdateUserCommandInput) (output *models.UserView, resp *http.Response, err error)
	UpdateUserPasswordCommand(input *UpdateUserPasswordCommandInput) (output *models.UserPasswordView, resp *http.Response, err error)
}

type UsersService

type UsersService struct {
	*client.Client
}

UsersService provides the API operations for making requests to Users endpoint.

func New

func New(cfg *config.Config) *UsersService

New createa a new instance of the UsersService client.

Example:

cfg := config.NewConfig().WithUsername("Administrator").WithPassword("2Access").WithEndpoint(paURL)

//Create a UsersService from the configuration
svc := users.New(cfg)

func (*UsersService) GetUserCommand

func (s *UsersService) GetUserCommand(input *GetUserCommandInput) (output *models.UserView, resp *http.Response, err error)

GetUserCommand - Get a User RequestType: GET Input: input *GetUserCommandInput

func (*UsersService) GetUsersCommand

func (s *UsersService) GetUsersCommand(input *GetUsersCommandInput) (output *models.UsersView, resp *http.Response, err error)

GetUsersCommand - Get all Users RequestType: GET Input: input *GetUsersCommandInput

func (*UsersService) UpdateUserCommand

func (s *UsersService) UpdateUserCommand(input *UpdateUserCommandInput) (output *models.UserView, resp *http.Response, err error)

UpdateUserCommand - Update a User RequestType: PUT Input: input *UpdateUserCommandInput

func (*UsersService) UpdateUserPasswordCommand

func (s *UsersService) UpdateUserPasswordCommand(input *UpdateUserPasswordCommandInput) (output *models.UserPasswordView, resp *http.Response, err error)

UpdateUserPasswordCommand - Update a User's Password RequestType: PUT Input: input *UpdateUserPasswordCommandInput

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL