Documentation ¶
Index ¶
- type ChangeUserPasswordInput
- type CreatePolicyInput
- type CreateRoleInput
- type CreateUserInput
- type DeletePolicyInput
- type DeleteRoleInput
- type DeleteUserInput
- type GetPolicyInput
- type GetRoleInput
- type GetRoleTagsInput
- type GetUserInput
- type IdentityClient
- type ListPoliciesInput
- type ListRolesInput
- type ListUsersInput
- type PoliciesClient
- func (c *PoliciesClient) Create(ctx context.Context, input *CreatePolicyInput) (*Policy, error)
- func (c *PoliciesClient) Delete(ctx context.Context, input *DeletePolicyInput) error
- func (c *PoliciesClient) Get(ctx context.Context, input *GetPolicyInput) (*Policy, error)
- func (c *PoliciesClient) List(ctx context.Context, _ *ListPoliciesInput) ([]*Policy, error)
- func (c *PoliciesClient) Update(ctx context.Context, input *UpdatePolicyInput) (*Policy, error)
- type Policy
- type Role
- type RoleTags
- type RolesClient
- func (c *RolesClient) Create(ctx context.Context, input *CreateRoleInput) (*Role, error)
- func (c *RolesClient) Delete(ctx context.Context, input *DeleteRoleInput) error
- func (c *RolesClient) Get(ctx context.Context, input *GetRoleInput) (*Role, error)
- func (c *RolesClient) GetRoleTags(ctx context.Context, input *GetRoleTagsInput) (*RoleTags, error)
- func (c *RolesClient) List(ctx context.Context, _ *ListRolesInput) ([]*Role, error)
- func (c *RolesClient) SetRoleTags(ctx context.Context, input *SetRoleTagsInput) (*RoleTags, error)
- func (c *RolesClient) Update(ctx context.Context, input *UpdateRoleInput) (*Role, error)
- type SetRoleTagsInput
- type UpdatePolicyInput
- type UpdateRoleInput
- type UpdateUserInput
- type User
- type UsersClient
- func (c *UsersClient) ChangeUserPassword(ctx context.Context, input *ChangeUserPasswordInput) (*User, error)
- func (c *UsersClient) Create(ctx context.Context, input *CreateUserInput) (*User, error)
- func (c *UsersClient) Delete(ctx context.Context, input *DeleteUserInput) error
- func (c *UsersClient) Get(ctx context.Context, input *GetUserInput) (*User, error)
- func (c *UsersClient) List(ctx context.Context, _ *ListUsersInput) ([]*User, error)
- func (c *UsersClient) Update(ctx context.Context, input *UpdateUserInput) (*User, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ChangeUserPasswordInput ¶
type ChangeUserPasswordInput struct { // The unique ID of the user for which to change the password. Required. UserID string // User password. Required. Password string `json:"password"` // User password confirmation. Required. PasswordConfirmation string `json:"password_confirmation"` }
ChangeUserPasswordInput represents the options that can be specified when changing an existing user password.
type CreatePolicyInput ¶
type CreateRoleInput ¶
type CreateRoleInput struct { // Name of the role. Required. Name string `json:"name"` // This account's policies to be given to this role. Optional. Policies []string `json:"policies,omitempty"` // This account's user logins to be added to this role. Optional. Members []string `json:"members,omitempty"` // This account's user logins to be added to this role and have // it enabled by default. Optional. DefaultMembers []string `json:"default_members,omitempty"` }
CreateRoleInput represents the options that can be specified when creating a new role.
type CreateUserInput ¶
type CreateUserInput struct { Email string `json:"email"` Login string `json:"login"` Password string `json:"password"` CompanyName string `json:"companyName,omitempty"` FirstName string `json:"firstName,omitempty"` LastName string `json:"lastName,omitempty"` Address string `json:"address,omitempty"` PostalCode string `json:"postalCode,omitempty"` City string `json:"city,omitempty"` State string `json:"state,omitempty"` Country string `json:"country,omitempty"` Phone string `json:"phone,omitempty"` }
type DeletePolicyInput ¶
type DeletePolicyInput struct {
PolicyID string
}
type DeleteRoleInput ¶
type DeleteRoleInput struct {
RoleID string
}
type DeleteUserInput ¶
type DeleteUserInput struct {
UserID string
}
type GetPolicyInput ¶
type GetPolicyInput struct {
PolicyID string
}
type GetRoleInput ¶
type GetRoleInput struct {
RoleID string
}
type GetRoleTagsInput ¶
type GetRoleTagsInput struct { // A type of the resource. Required. ResourceType string // An unique identifier of an individual resource. // Optional. ResourceID string }
GetRoleTagsInput represents the options that can be specified when querying for a list of currently set role tags for either a whole group of resources or an individual resource of the same type.
type GetUserInput ¶
type GetUserInput struct {
UserID string
}
type IdentityClient ¶
func NewClient ¶
func NewClient(config *triton.ClientConfig) (*IdentityClient, error)
NewClient returns a new client for working with Identity endpoints and resources within CloudAPI
func (*IdentityClient) Policies ¶
func (c *IdentityClient) Policies() *PoliciesClient
Policies returns a Policies client used for accessing functions pertaining to Policy functionality in the Triton API.
func (*IdentityClient) Roles ¶
func (c *IdentityClient) Roles() *RolesClient
Roles returns a Roles client used for accessing functions pertaining to Role functionality in the Triton API.
func (*IdentityClient) SetHeader ¶
func (c *IdentityClient) SetHeader(header *http.Header)
SetHeaders allows a consumer of the current client to set custom headers for the next backend HTTP request sent to CloudAPI
func (*IdentityClient) Users ¶
func (c *IdentityClient) Users() *UsersClient
Users returns a Users client used for accessing functions pertaining to User functionality in the Triton API.
type ListPoliciesInput ¶
type ListPoliciesInput struct{}
type ListRolesInput ¶
type ListRolesInput struct{}
type ListUsersInput ¶
type ListUsersInput struct{}
type PoliciesClient ¶
type PoliciesClient struct {
// contains filtered or unexported fields
}
func (*PoliciesClient) Create ¶
func (c *PoliciesClient) Create(ctx context.Context, input *CreatePolicyInput) (*Policy, error)
func (*PoliciesClient) Delete ¶
func (c *PoliciesClient) Delete(ctx context.Context, input *DeletePolicyInput) error
func (*PoliciesClient) Get ¶
func (c *PoliciesClient) Get(ctx context.Context, input *GetPolicyInput) (*Policy, error)
func (*PoliciesClient) List ¶
func (c *PoliciesClient) List(ctx context.Context, _ *ListPoliciesInput) ([]*Policy, error)
func (*PoliciesClient) Update ¶
func (c *PoliciesClient) Update(ctx context.Context, input *UpdatePolicyInput) (*Policy, error)
type RoleTags ¶
type RoleTags struct { // Path to the resource. Name string `json:"name"` // The list of role tags assigned to this resource. RoleTags []string `json:"role-tag"` }
RoleTags represents a set of results after an operation of either querying or setting role tags.
type RolesClient ¶
type RolesClient struct {
// contains filtered or unexported fields
}
func (*RolesClient) Create ¶
func (c *RolesClient) Create(ctx context.Context, input *CreateRoleInput) (*Role, error)
func (*RolesClient) Delete ¶
func (c *RolesClient) Delete(ctx context.Context, input *DeleteRoleInput) error
func (*RolesClient) Get ¶
func (c *RolesClient) Get(ctx context.Context, input *GetRoleInput) (*Role, error)
func (*RolesClient) GetRoleTags ¶
func (c *RolesClient) GetRoleTags(ctx context.Context, input *GetRoleTagsInput) (*RoleTags, error)
GetRoleTags retrieves a list of currently set role tags for either a whole group of resources or an individual resource of the same type. To retrieve a list of role tags currently set for an individual resource an unique identifier (ID) of this resource has to be provided in an additon to the resource type. Returns an object with a set of results, or an error otherwise.
func (*RolesClient) List ¶
func (c *RolesClient) List(ctx context.Context, _ *ListRolesInput) ([]*Role, error)
func (*RolesClient) SetRoleTags ¶
func (c *RolesClient) SetRoleTags(ctx context.Context, input *SetRoleTagsInput) (*RoleTags, error)
SetRoleTags sets a given list of role tags for either a whole group of resources or an individual resource of the same type. To set a given list of role tags for an individual resource an unique identifier (ID) of this resource has to be provided in an addition to the resource type. Returns an object with a set of results, or an error otherwise.
func (*RolesClient) Update ¶
func (c *RolesClient) Update(ctx context.Context, input *UpdateRoleInput) (*Role, error)
type SetRoleTagsInput ¶
type SetRoleTagsInput struct { // A type of the resource. Required. ResourceType string `json:"-"` // An unique identifier of an individual resource. // Optional. ResourceID string `json:"-"` // The list of role tags assigned to this resource. // Required. RoleTags []string `json:"role-tag"` }
SetRoleTagsInput represents the options that can be specified when setting a given list of role tags for either a whole group of resources or an individual resource of the same type.
type UpdatePolicyInput ¶
type UpdatePolicyInput struct { PolicyID string `json:"id"` Name string `json:"name,omitempty"` Rules []string `json:"rules,omitempty"` Description string `json:"description,omitempty"` }
UpdatePolicyInput represents the options that can be specified when updating a policy. Anything but ID can be modified.
type UpdateRoleInput ¶
type UpdateRoleInput struct { // ID of the role to modify. Required. RoleID string `json:"id"` // Name of the role. Required. Name string `json:"name"` // This account's policies to be given to this role. Optional. Policies []string `json:"policies,omitempty"` // This account's user logins to be added to this role. Optional. Members []string `json:"members,omitempty"` // This account's user logins to be added to this role and have // it enabled by default. Optional. DefaultMembers []string `json:"default_members,omitempty"` }
UpdateRoleInput represents the options that can be specified when updating a role. Anything but ID can be modified.
type UpdateUserInput ¶
type UpdateUserInput struct { UserID string Email string `json:"email,omitempty"` Login string `json:"login,omitempty"` CompanyName string `json:"companyName,omitempty"` FirstName string `json:"firstName,omitempty"` LastName string `json:"lastName,omitempty"` Address string `json:"address,omitempty"` PostalCode string `json:"postalCode,omitempty"` City string `json:"city,omitempty"` State string `json:"state,omitempty"` Country string `json:"country,omitempty"` Phone string `json:"phone,omitempty"` }
type User ¶
type User struct { ID string `json:"id"` Login string `json:"login"` EmailAddress string `json:"email"` CompanyName string `json:"companyName"` FirstName string `json:"firstName"` LastName string `json:"lastName"` Address string `json:"address"` PostalCode string `json:"postCode"` City string `json:"city"` State string `json:"state"` Country string `json:"country"` Phone string `json:"phone"` Roles []string `json:"roles"` DefaultRoles []string `json:"defaultRoles"` CreatedAt time.Time `json:"created"` UpdatedAt time.Time `json:"updated"` }
type UsersClient ¶
func (*UsersClient) ChangeUserPassword ¶
func (c *UsersClient) ChangeUserPassword(ctx context.Context, input *ChangeUserPasswordInput) (*User, error)
ChangeUserPassword updates password for an existing user. Returns updated user object, or an error otherwise.
func (*UsersClient) Create ¶
func (c *UsersClient) Create(ctx context.Context, input *CreateUserInput) (*User, error)
func (*UsersClient) Delete ¶
func (c *UsersClient) Delete(ctx context.Context, input *DeleteUserInput) error
func (*UsersClient) Get ¶
func (c *UsersClient) Get(ctx context.Context, input *GetUserInput) (*User, error)
func (*UsersClient) List ¶
func (c *UsersClient) List(ctx context.Context, _ *ListUsersInput) ([]*User, error)
func (*UsersClient) Update ¶
func (c *UsersClient) Update(ctx context.Context, input *UpdateUserInput) (*User, error)