Documentation
¶
Index ¶
- Constants
- type CreateUpdateUser
- type ResponseId
- type User
- type UsersClient
- func (c *UsersClient) CreateUser(createUser CreateUpdateUser) (*ResponseId, error)
- func (c *UsersClient) DeleteUser(userId int32) error
- func (c *UsersClient) GetUser(userId int32) (*User, error)
- func (c *UsersClient) ListUsers() ([]User, error)
- func (c *UsersClient) SuspendUser(userId int32) error
- func (c *UsersClient) UnSuspendUser(userId int32) error
- func (c *UsersClient) UpdateUser(userId int32, updateUser CreateUpdateUser) (*ResponseId, error)
Constants ¶
View Source
const ( UserRoleReadOnly = "USER_ROLE_READONLY" UserRoleRegular = "USER_ROLE_REGULAR" UserRoleAccountAdmin = "USER_ROLE_ACCOUNT_ADMIN" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CreateUpdateUser ¶ added in v1.12.0
type ResponseId ¶ added in v1.12.0
type ResponseId struct {
Id int32 `json:"id"`
}
type UsersClient ¶
func New ¶
func New(apiToken string, baseUrl string) (*UsersClient, error)
New Creates a new entry point into the users functions, accepts the user's logz.io API token and base url
func (*UsersClient) CreateUser ¶
func (c *UsersClient) CreateUser(createUser CreateUpdateUser) (*ResponseId, error)
func (*UsersClient) DeleteUser ¶
func (c *UsersClient) DeleteUser(userId int32) error
func (*UsersClient) ListUsers ¶
func (c *UsersClient) ListUsers() ([]User, error)
func (*UsersClient) SuspendUser ¶
func (c *UsersClient) SuspendUser(userId int32) error
func (*UsersClient) UnSuspendUser ¶
func (c *UsersClient) UnSuspendUser(userId int32) error
func (*UsersClient) UpdateUser ¶
func (c *UsersClient) UpdateUser(userId int32, updateUser CreateUpdateUser) (*ResponseId, error)
NOTE: The logz.io API user update API function will not update the username field
Click to show internal directories.
Click to hide internal directories.