Versions in this module Expand all Collapse all v1 v1.7.0 May 13, 2022 Changes in this version type NRClient + func (nr *NRClient) GetAllUserUnderAccount(ctx context.Context, nrAccountID int64) ([]NRUser, error) v1.6.3 Mar 18, 2022 Changes in this version + const DeleteUsers v1.6.2 Mar 17, 2022 Changes in this version + const UserBaseRoleAdmin + const UserBaseRoleRestricted + const UserBaseRoleUser + const UserTypeBasic + const UserTypeFull + var ErrUserNotFound = errors.New("user not found") + type BaseRole string + type BulkCreateUserSummary struct + Data ParamCreateUser + Err error + Success bool + type NRAccount struct + ID int64 + Name string + type NRClient struct + func New(opt Option) *NRClient + func (nr *NRClient) BulkCreateUser(ctx context.Context, data ...ParamCreateUser) []BulkCreateUserSummary + func (nr *NRClient) CreateUser(ctx context.Context, param ParamCreateUser) error + func (nr *NRClient) FindUserAccount(ctx context.Context, email string) ([]NRUser, error) + func (nr *NRClient) GetAccountList(ctx context.Context) ([]NRAccount, error) + func (nr *NRClient) GetAddOnRoles(ctx context.Context, nrAccountID int64) ([]NRUserRoles, error) + func (nr *NRClient) GetUserUnderAccount(ctx context.Context, email string, nrAccountID int64) (NRUser, error) + func (nr *NRClient) RemoveUserFromAccount(ctx context.Context, email string, nrAccountID int64) error + func (nr *NRClient) UpdateUserAddOnRoles(ctx context.Context, nrAccountID int64, userID int64, roles []int64) error + type NRUser struct + AccountID int64 + AccountName string + Email string + FullName string + LastAccessAt int64 + LastAccessTime time.Time + Roles []NRUserRoles + Status string + Title interface{} + UserID int64 + UserTierID int + type NRUserRoles struct + AccountID interface{} + BatchIds []int + DisplayName string + GrantCount int + ID int64 + Name string + Type string + type Option struct + APIKey string + NRLoginCookies string + Timeout time.Duration + type ParamCreateUser struct + AccountID int64 + AddOnRoles []int64 + BaseRole BaseRole + Email string + FullName string + UserType UserType + type UserType int