Documentation ¶
Index ¶
- type ModifyUserRequest
- type User
- type UsersService
- func (s *UsersService) CloseUserConnections(ctx context.Context, id string) (*http.Response, error)
- func (s *UsersService) DeleteUser(ctx context.Context, id string) (*http.Response, error)
- func (s *UsersService) GetUser(ctx context.Context, userIDOrEmail string) (*User, *http.Response, error)
- func (s *UsersService) ListUsers(ctx context.Context) ([]User, *http.Response, error)
- func (s *UsersService) Me(ctx context.Context) (*User, *http.Response, error)
- func (s *UsersService) ModifyUser(ctx context.Context, id string, request *ModifyUserRequest) (*http.Response, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ModifyUserRequest ¶ added in v0.3.0
ModifyUserRequest is used to modify a user
type User ¶
type User struct { service.Subject OrganizationID string `json:"organizationId"` FullName string `json:"fullName"` Email string `json:"email"` IsAdmin bool `json:"isAdmin"` TimeCreated types.Timestamp `json:"timeCreated"` LastLogin *types.Timestamp `json:"lastLogin"` }
User is a BastionZero user belonging to an organization
func (*User) GetSubjectType ¶
func (u *User) GetSubjectType() subjecttype.SubjectType
type UsersService ¶
UsersService handles communication with the users endpoints of the BastionZero API.
BastionZero API docs: https://cloud.bastionzero.com/api/#tag--Users
func (*UsersService) CloseUserConnections ¶ added in v0.3.0
CloseUserConnections closes all connections of the specified user.
BastionZero API docs: https://cloud.bastionzero.com/api/#patch-/api/v2/users/-id-/close-connections
func (*UsersService) DeleteUser ¶ added in v0.3.0
DeleteUser deletes the specified user.
BastionZero API docs: https://cloud.bastionzero.com/api/#delete-/api/v2/users/-id-
func (*UsersService) GetUser ¶
func (s *UsersService) GetUser(ctx context.Context, userIDOrEmail string) (*User, *http.Response, error)
GetUser fetches the specified user by ID or email address.
BastionZero API docs: https://cloud.bastionzero.com/api/#get-/api/v2/users/-id-, https://cloud.bastionzero.com/api/#get-/api/v2/users/-email-
func (*UsersService) ListUsers ¶
ListUsers lists all users in your organization.
BastionZero API docs: https://cloud.bastionzero.com/api/#get-/api/v2/users
func (*UsersService) Me ¶ added in v0.3.0
Me fetches your user information (current subject).
BastionZero API docs: https://cloud.bastionzero.com/api/#get-/api/v2/users/me
func (*UsersService) ModifyUser ¶ added in v0.3.0
func (s *UsersService) ModifyUser(ctx context.Context, id string, request *ModifyUserRequest) (*http.Response, error)
ModifyUser updates the specified user.
BastionZero API docs: https://cloud.bastionzero.com/api/#patch-/api/v2/users/-id-