Documentation ¶
Index ¶
- type ChangePasswordRequest
- type ChangePasswordResponse
- type Client
- func (c *Client) ChangePassword(ctx context.Context, req *ChangePasswordRequest) (*ChangePasswordResponse, error)
- func (c *Client) CreateTicket(ctx context.Context, req *CreateTicketRequest) (*CreateTicketResponse, error)
- func (c *Client) GetTicket(ctx context.Context) (*GetTicketResponse, error)
- func (c *Client) Index(ctx context.Context) (*IndexResponse, error)
- func (c *Client) Permissions(ctx context.Context, req *PermissionsRequest) (*PermissionsResponse, error)
- func (c *Client) ReadAcl(ctx context.Context) (*ReadAclResponse, error)
- func (c *Client) UpdateAcl(ctx context.Context, req *UpdateAclRequest) (*UpdateAclResponse, error)
- type CreateTicketRequest
- type CreateTicketResponse
- type GetTicketResponse
- type HTTPClient
- type IndexResponse
- type PermissionsRequest
- type PermissionsResponse
- type ReadAclResponse
- type UpdateAclRequest
- type UpdateAclResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ChangePasswordRequest ¶
type ChangePasswordResponse ¶
type ChangePasswordResponse map[string]interface{}
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func New ¶
func New(c HTTPClient) *Client
func (*Client) ChangePassword ¶
func (c *Client) ChangePassword(ctx context.Context, req *ChangePasswordRequest) (*ChangePasswordResponse, error)
ChangePassword Change user password.
func (*Client) CreateTicket ¶
func (c *Client) CreateTicket(ctx context.Context, req *CreateTicketRequest) (*CreateTicketResponse, error)
CreateTicket Create or verify authentication ticket.
func (*Client) GetTicket ¶
func (c *Client) GetTicket(ctx context.Context) (*GetTicketResponse, error)
GetTicket Dummy. Useful for formatters which want to provide a login page.
func (*Client) Index ¶
func (c *Client) Index(ctx context.Context) (*IndexResponse, error)
Index Directory index.
func (*Client) Permissions ¶
func (c *Client) Permissions(ctx context.Context, req *PermissionsRequest) (*PermissionsResponse, error)
Permissions Retrieve effective permissions of given user/token.
func (*Client) ReadAcl ¶
func (c *Client) ReadAcl(ctx context.Context) (*ReadAclResponse, error)
ReadAcl Get Access Control List (ACLs).
func (*Client) UpdateAcl ¶
func (c *Client) UpdateAcl(ctx context.Context, req *UpdateAclRequest) (*UpdateAclResponse, error)
UpdateAcl Update Access Control List (add or remove permissions).
type CreateTicketRequest ¶
type CreateTicketRequest struct { Password string `url:"password",json:"password"` // The secret password. This can also be a valid ticket. Username string `url:"username",json:"username"` // User name // The following parameters are optional NewFormat *bool `url:"new-format,omitempty",json:"new-format,omitempty"` // With webauthn the format of half-authenticated tickts changed. New clients should pass 1 here and not worry about the old format. The old format is deprecated and will be retired with PVE-8.0 Otp *string `url:"otp,omitempty",json:"otp,omitempty"` // One-time password for Two-factor authentication. Path *string `url:"path,omitempty",json:"path,omitempty"` // Verify ticket, and check if user have access 'privs' on 'path' Privs *string `url:"privs,omitempty",json:"privs,omitempty"` // Verify ticket, and check if user have access 'privs' on 'path' Realm *string `url:"realm,omitempty",json:"realm,omitempty"` // You can optionally pass the realm using this parameter. Normally the realm is simply added to the username <username>@<relam>. TfaChallenge *string `url:"tfa-challenge,omitempty",json:"tfa-challenge,omitempty"` // The signed TFA challenge string the user wants to respond to. }
type CreateTicketResponse ¶
type CreateTicketResponse struct { Username string `url:"username",json:"username"` // The following parameters are optional Clustername *string `url:"clustername,omitempty",json:"clustername,omitempty"` Csrfpreventiontoken *string `url:"CSRFPreventionToken,omitempty",json:"CSRFPreventionToken,omitempty"` Ticket *string `url:"ticket,omitempty",json:"ticket,omitempty"` }
type GetTicketResponse ¶
type GetTicketResponse map[string]interface{}
type HTTPClient ¶
type IndexResponse ¶
type IndexResponse []*struct { Subdir string `url:"subdir",json:"subdir"` }
type PermissionsRequest ¶
type PermissionsRequest map[string]interface{}
type PermissionsResponse ¶
type PermissionsResponse map[string]interface{}
type ReadAclResponse ¶
type ReadAclResponse []*struct { Path string `url:"path",json:"path"` // Access control path Roleid string `url:"roleid",json:"roleid"` Type string `url:"type",json:"type"` Ugid string `url:"ugid",json:"ugid"` // The following parameters are optional Propagate *bool `url:"propagate,omitempty",json:"propagate,omitempty"` // Allow to propagate (inherit) permissions. }
type UpdateAclRequest ¶
type UpdateAclRequest struct { Path string `url:"path",json:"path"` // Access control path Roles string `url:"roles",json:"roles"` // List of roles. // The following parameters are optional Delete *bool `url:"delete,omitempty",json:"delete,omitempty"` // Remove permissions (instead of adding it). Groups *string `url:"groups,omitempty",json:"groups,omitempty"` // List of groups. Propagate *bool `url:"propagate,omitempty",json:"propagate,omitempty"` // Allow to propagate (inherit) permissions. Tokens *string `url:"tokens,omitempty",json:"tokens,omitempty"` // List of API tokens. Users *string `url:"users,omitempty",json:"users,omitempty"` // List of users. }
type UpdateAclResponse ¶
type UpdateAclResponse map[string]interface{}
Click to show internal directories.
Click to hide internal directories.