usermanagement

package
v1.6.4 Latest Latest
Warning

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

Go to latest
Published: Jul 9, 2023 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Department

type Department struct {
	// Department ID
	ID int `json:"id"`

	// Department name
	Name string `json:"name,omitempty"`

	// Identity provider (IdP) ID
	IdpID int `json:"idpId"`

	// Additional information about this department
	Comments string `json:"comments,omitempty"`
	Deleted  bool   `json:"deleted"`
}

type EnrollResult

type EnrollResult struct {
	UserID int `json:"userId"`
}

type EnrollUserRequest

type EnrollUserRequest struct {
	AuthMethods []string `json:"authMethods"`
	Password    string   `json:"password"`
}

type Groups

type Groups struct {
	// Unique identfier for the group
	ID int `json:"id"`

	// Group name
	Name string `json:"name,omitempty"`

	// Unique identfier for the identity provider (IdP)
	IdpID int `json:"idpId"`

	// Additional information about the group
	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(user *Users) (*Users, error)

func (*Service) Delete

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

func (*Service) EnrollUser

func (service *Service) EnrollUser(userID int, request EnrollUserRequest) (*EnrollResult, error)

func (*Service) Get

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

func (*Service) GetAll

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

func (*Service) GetAllUsers

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 {
	// User ID
	ID int `json:"id"`

	// User name. This appears when choosing users for policies.
	Name string `json:"name,omitempty"`

	// User email consists of a user name and domain name. It does not have to be a valid email address, but it must be unique and its domain must belong to the organization.
	Email string `json:"email,omitempty"`

	// List of Groups a user belongs to. Groups are used in policies.
	Groups []common.IDNameExtensions `json:"groups,omitempty"`

	// Department a user belongs to
	Department *common.UserDepartment `json:"department,omitempty"`

	// Additional information about this user.
	Comments string `json:"comments,omitempty"`

	// Temporary Authentication Email. If you enabled one-time tokens or links, enter the email address to which the Zscaler service sends the tokens or links. If this is empty, the service sends the email to the User email.
	TempAuthEmail string `json:"tempAuthEmail,omitempty"`

	// Accepted Authentication Methods. Support values are "BASIC" and "DIGEST"
	AuthMethods []string `json:"authMethods,omitempty"`

	// User's password. Applicable only when authentication type is Hosted DB. Password strength must follow what is defined in the auth settings.
	Password string `json:"password,omitempty"`

	// True if this user is an Admin user
	AdminUser bool `json:"adminUser"`

	// User type. Provided only if this user is not an end user.
	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