usermanagement

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Feb 25, 2023 License: MIT Imports: 7 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Department

type Department struct {
	ID       int    `json:"id"`
	Name     string `json:"name,omitempty"`
	IdpID    int    `json:"idpId"`
	Comments string `json:"comments,omitempty"`
	Deleted  bool   `json:"deleted"`
}

type Groups

type Groups struct {
	ID       int    `json:"id"`
	Name     string `json:"name,omitempty"`
	IdpID    int    `json:"idpId"`
	Comments string `json:"comments,omitempty"`
}

type Service

type Service struct {
	Client *zia.Client
}

func New

func New(c *zia.Client) *Service

func (*Service) Create

func (service *Service) Create(userID *Users) (*Users, error)

func (*Service) Delete

func (service *Service) Delete(userID int) (*http.Response, error)

func (*Service) Get

func (service *Service) Get(userID int) (*Users, error)

func (*Service) GetAll added in v0.0.4

func (service *Service) GetAll() ([]Department, error)

func (*Service) GetAllUsers added in v0.0.11

func (service *Service) GetAllUsers() ([]Users, error)

func (*Service) GetDepartments

func (service *Service) GetDepartments(departmentID int) (*Department, error)

func (*Service) GetDepartmentsByName

func (service *Service) GetDepartmentsByName(departmentName string) (*Department, error)

func (*Service) GetGroupByName

func (service *Service) GetGroupByName(groupName string) (*Groups, error)

func (*Service) GetGroups

func (service *Service) GetGroups(groupID int) (*Groups, error)

func (*Service) GetUserByName

func (service *Service) GetUserByName(userName string) (*Users, error)

func (*Service) Update

func (service *Service) Update(userID int, users *Users) (*Users, *http.Response, error)

type Users

type Users struct {
	ID            int                       `json:"id"`
	Name          string                    `json:"name,omitempty"`
	Email         string                    `json:"email,omitempty"`
	Groups        []common.IDNameExtensions `json:"groups,omitempty"`
	Department    *common.UserDepartment    `json:"department,omitempty"`
	Comments      string                    `json:"comments,omitempty"`
	TempAuthEmail string                    `json:"tempAuthEmail,omitempty"`
	Password      string                    `json:"password,omitempty"`
	AdminUser     bool                      `json:"adminUser"`
	Type          string                    `json:"type,omitempty"`
	Deleted       bool                      `json:"deleted"`
}

Jump to

Keyboard shortcuts

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