Documentation ¶
Index ¶
- type ACLGetResponseBody
- type ACLGetResponseData
- type ACLUpdateRequestBody
- type Client
- func (c *Client) ChangeUserPassword(ctx context.Context, id, password string) error
- func (c *Client) CreateGroup(ctx context.Context, d *GroupCreateRequestBody) error
- func (c *Client) CreateRole(ctx context.Context, d *RoleCreateRequestBody) error
- func (c *Client) CreateUser(ctx context.Context, d *UserCreateRequestBody) error
- func (c *Client) DeleteGroup(ctx context.Context, id string) error
- func (c *Client) DeleteRole(ctx context.Context, id string) error
- func (c *Client) DeleteUser(ctx context.Context, id string) error
- func (c *Client) ExpandPath(path string) string
- func (c *Client) GetACL(ctx context.Context) ([]*ACLGetResponseData, error)
- func (c *Client) GetGroup(ctx context.Context, id string) (*GroupGetResponseData, error)
- func (c *Client) GetRole(ctx context.Context, id string) (*types.CustomPrivileges, error)
- func (c *Client) GetUser(ctx context.Context, id string) (*UserGetResponseData, error)
- func (c *Client) ListGroups(ctx context.Context) ([]*GroupListResponseData, error)
- func (c *Client) ListRoles(ctx context.Context) ([]*RoleListResponseData, error)
- func (c *Client) ListUsers(ctx context.Context) ([]*UserListResponseData, error)
- func (c *Client) UpdateACL(ctx context.Context, d *ACLUpdateRequestBody) error
- func (c *Client) UpdateGroup(ctx context.Context, id string, d *GroupUpdateRequestBody) error
- func (c *Client) UpdateRole(ctx context.Context, id string, d *RoleUpdateRequestBody) error
- func (c *Client) UpdateUser(ctx context.Context, id string, d *UserUpdateRequestBody) error
- type GroupCreateRequestBody
- type GroupGetResponseBody
- type GroupGetResponseData
- type GroupListResponseBody
- type GroupListResponseData
- type GroupUpdateRequestBody
- type RoleCreateRequestBody
- type RoleGetResponseBody
- type RoleListResponseBody
- type RoleListResponseData
- type RoleUpdateRequestBody
- type UserChangePasswordRequestBody
- type UserCreateRequestBody
- type UserGetResponseBody
- type UserGetResponseData
- type UserListResponseBody
- type UserListResponseData
- type UserUpdateRequestBody
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ACLGetResponseBody ¶
type ACLGetResponseBody struct {
Data []*ACLGetResponseData `json:"data,omitempty"`
}
ACLGetResponseBody contains the body from an access control list response.
type ACLGetResponseData ¶
type ACLGetResponseData struct { Path string `json:"path"` Propagate *types.CustomBool `json:"propagate,omitempty"` RoleID string `json:"roleid"` Type string `json:"type"` UserOrGroupID string `json:"ugid"` }
ACLGetResponseData contains the data from an access control list response.
type ACLUpdateRequestBody ¶
type ACLUpdateRequestBody struct { Delete *types.CustomBool `json:"delete,omitempty" url:"delete,omitempty,int"` Groups []string `json:"groups,omitempty" url:"groups,omitempty,comma"` Path string `json:"path" url:"path"` Propagate *types.CustomBool `json:"propagate,omitempty" url:"propagate,omitempty,int"` Roles []string `json:"roles" url:"roles,comma"` Users []string `json:"users,omitempty" url:"users,omitempty,comma"` }
ACLUpdateRequestBody contains the data for an access control list update request.
type Client ¶
Client is an interface for performing requests against the Proxmox 'access' API.
func (*Client) ChangeUserPassword ¶
ChangeUserPassword changes a user's password.
func (*Client) CreateGroup ¶
func (c *Client) CreateGroup(ctx context.Context, d *GroupCreateRequestBody) error
CreateGroup creates an access group.
func (*Client) CreateRole ¶
func (c *Client) CreateRole(ctx context.Context, d *RoleCreateRequestBody) error
CreateRole creates an access role.
func (*Client) CreateUser ¶
func (c *Client) CreateUser(ctx context.Context, d *UserCreateRequestBody) error
CreateUser creates a user.
func (*Client) DeleteGroup ¶
DeleteGroup deletes an access group.
func (*Client) DeleteRole ¶
DeleteRole deletes an access role.
func (*Client) DeleteUser ¶
DeleteUser deletes an user.
func (*Client) ExpandPath ¶
ExpandPath expands a path relative to the client's base path.
func (*Client) GetACL ¶
func (c *Client) GetACL(ctx context.Context) ([]*ACLGetResponseData, error)
GetACL retrieves the access control list.
func (*Client) ListGroups ¶
func (c *Client) ListGroups(ctx context.Context) ([]*GroupListResponseData, error)
ListGroups retrieves a list of access groups.
func (*Client) ListRoles ¶
func (c *Client) ListRoles(ctx context.Context) ([]*RoleListResponseData, error)
ListRoles retrieves a list of access roles.
func (*Client) ListUsers ¶
func (c *Client) ListUsers(ctx context.Context) ([]*UserListResponseData, error)
ListUsers retrieves a list of users.
func (*Client) UpdateACL ¶
func (c *Client) UpdateACL(ctx context.Context, d *ACLUpdateRequestBody) error
UpdateACL updates the access control list.
func (*Client) UpdateGroup ¶
UpdateGroup updates an access group.
func (*Client) UpdateRole ¶
UpdateRole updates an access role.
func (*Client) UpdateUser ¶
UpdateUser updates a user.
type GroupCreateRequestBody ¶
type GroupCreateRequestBody struct { Comment *string `json:"comment,omitempty" url:"comment,omitempty"` ID string `json:"groupid" url:"groupid"` }
GroupCreateRequestBody contains the data for an access group create request.
type GroupGetResponseBody ¶
type GroupGetResponseBody struct {
Data *GroupGetResponseData `json:"data,omitempty"`
}
GroupGetResponseBody contains the body from an access group get response.
type GroupGetResponseData ¶
type GroupGetResponseData struct { Comment *string `json:"comment,omitempty"` Members []string `json:"members"` }
GroupGetResponseData contains the data from an access group get response.
type GroupListResponseBody ¶
type GroupListResponseBody struct {
Data []*GroupListResponseData `json:"data,omitempty"`
}
GroupListResponseBody contains the body from an access group list response.
type GroupListResponseData ¶
type GroupListResponseData struct { Comment *string `json:"comment,omitempty"` ID string `json:"groupid"` }
GroupListResponseData contains the data from an access group list response.
type GroupUpdateRequestBody ¶
type GroupUpdateRequestBody struct {
Comment *string `json:"comment,omitempty" url:"comment,omitempty"`
}
GroupUpdateRequestBody contains the data for an access group update request.
type RoleCreateRequestBody ¶
type RoleCreateRequestBody struct { ID string `json:"roleid" url:"roleid"` Privileges types.CustomPrivileges `json:"privs" url:"privs,comma"` }
RoleCreateRequestBody contains the data for an access group create request.
type RoleGetResponseBody ¶
type RoleGetResponseBody struct {
Data *types.CustomPrivileges `json:"data,omitempty"`
}
RoleGetResponseBody contains the body from an access group get response.
type RoleListResponseBody ¶
type RoleListResponseBody struct {
Data []*RoleListResponseData `json:"data,omitempty"`
}
RoleListResponseBody contains the body from an access group list response.
type RoleListResponseData ¶
type RoleListResponseData struct { ID string `json:"roleid"` Privileges *types.CustomPrivileges `json:"privs,omitempty"` Special *types.CustomBool `json:"special,omitempty"` }
RoleListResponseData contains the data from an access group list response.
type RoleUpdateRequestBody ¶
type RoleUpdateRequestBody struct {
Privileges types.CustomPrivileges `json:"privs" url:"privs,comma"`
}
RoleUpdateRequestBody contains the data for an access group update request.
type UserChangePasswordRequestBody ¶
type UserChangePasswordRequestBody struct { ID string `json:"userid" url:"userid"` Password string `json:"password" url:"password"` }
UserChangePasswordRequestBody contains the data for a user password change request.
type UserCreateRequestBody ¶
type UserCreateRequestBody struct { Comment *string `json:"comment,omitempty" url:"comment,omitempty"` Email *string `json:"email,omitempty" url:"email,omitempty"` Enabled *types.CustomBool `json:"enable,omitempty" url:"enable,omitempty,int"` ExpirationDate *int64 `json:"expire,omitempty" url:"expire,omitempty"` FirstName *string `json:"firstname,omitempty" url:"firstname,omitempty"` Groups []string `json:"groups,omitempty" url:"groups,omitempty,comma"` ID string `json:"userid" url:"userid"` Keys *string `json:"keys,omitempty" url:"keys,omitempty"` LastName *string `json:"lastname,omitempty" url:"lastname,omitempty"` Password string `json:"password" url:"password,omitempty"` }
UserCreateRequestBody contains the data for a user create request.
type UserGetResponseBody ¶
type UserGetResponseBody struct {
Data *UserGetResponseData `json:"data,omitempty"`
}
UserGetResponseBody contains the body from a user get response.
type UserGetResponseData ¶
type UserGetResponseData struct { Comment *string `json:"comment,omitempty"` Email *string `json:"email,omitempty"` Enabled *types.CustomBool `json:"enable,omitempty"` ExpirationDate *int64 `json:"expire,omitempty"` FirstName *string `json:"firstname,omitempty"` Groups *[]string `json:"groups,omitempty"` Keys *string `json:"keys,omitempty"` LastName *string `json:"lastname,omitempty"` }
UserGetResponseData contains the data from an user get response.
type UserListResponseBody ¶
type UserListResponseBody struct {
Data []*UserListResponseData `json:"data,omitempty"`
}
UserListResponseBody contains the body from a user list response.
type UserListResponseData ¶
type UserListResponseData struct { Comment *string `json:"comment,omitempty"` Email *string `json:"email,omitempty"` Enabled *types.CustomBool `json:"enable,omitempty"` ExpirationDate *int64 `json:"expire,omitempty"` FirstName *string `json:"firstname,omitempty"` Groups *[]string `json:"groups,omitempty"` ID string `json:"userid"` Keys *string `json:"keys,omitempty"` LastName *string `json:"lastname,omitempty"` }
UserListResponseData contains the data from an user list response.
type UserUpdateRequestBody ¶
type UserUpdateRequestBody struct { Append *types.CustomBool `json:"append,omitempty" url:"append,omitempty"` Comment *string `json:"comment,omitempty" url:"comment,omitempty"` Email *string `json:"email,omitempty" url:"email,omitempty"` Enabled *types.CustomBool `json:"enable,omitempty" url:"enable,omitempty,int"` ExpirationDate *int64 `json:"expire,omitempty" url:"expire,omitempty,int"` FirstName *string `json:"firstname,omitempty" url:"firstname,omitempty"` Groups []string `json:"groups,omitempty" url:"groups,omitempty,comma"` Keys *string `json:"keys,omitempty" url:"keys,omitempty"` LastName *string `json:"lastname,omitempty" url:"lastname,omitempty"` }
UserUpdateRequestBody contains the data for an user update request.