 Documentation
      ¶
      Documentation
      ¶
    
    
  
    
  
    Index ¶
- type ChangePasswordRequest
- type Client
- func (c *Client) ChangePassword(ctx context.Context, req ChangePasswordRequest) error
- func (c *Client) CreateTicket(ctx context.Context, req CreateTicketRequest) (CreateTicketResponse, error)
- func (c *Client) GetTicket(ctx context.Context) error
- func (c *Client) Index(ctx context.Context) ([]IndexResponse, error)
- func (c *Client) Permissions(ctx context.Context, req PermissionsRequest) (map[string]interface{}, error)
- func (c *Client) ReadAcl(ctx context.Context) ([]ReadAclResponse, error)
- func (c *Client) UpdateAcl(ctx context.Context, req UpdateAclRequest) error
 
- type CreateTicketRequest
- type CreateTicketResponse
- type HTTPClient
- type IndexResponse
- type PermissionsRequest
- type ReadAclResponse
- type Type
- type UpdateAclRequest
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ChangePasswordRequest ¶
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) 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 ¶
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) (map[string]interface{}, error)
Permissions Retrieve effective permissions of given user/token.
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    *util.PVEBool `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 HTTPClient ¶
type IndexResponse ¶
type IndexResponse struct {
	Subdir string `url:"subdir" json:"subdir"`
}
    type PermissionsRequest ¶
type ReadAclResponse ¶
type ReadAclResponse struct {
	Path   string `url:"path" json:"path"` // Access control path
	Roleid string `url:"roleid" json:"roleid"`
	Type   Type   `url:"type" json:"type"`
	Ugid   string `url:"ugid" json:"ugid"`
	// The following parameters are optional
	Propagate *util.PVEBool `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    *util.PVEBool `url:"delete,omitempty" json:"delete,omitempty"`       // Remove permissions (instead of adding it).
	Groups    *string       `url:"groups,omitempty" json:"groups,omitempty"`       // List of groups.
	Propagate *util.PVEBool `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.
}
     Click to show internal directories. 
   Click to hide internal directories.