Documentation
¶
Index ¶
- type Client
- func (c *Client) Create(ctx context.Context, req *CreateRequest) (*CreateResponse, error)
- func (c *Client) Delete(ctx context.Context, req *DeleteRequest) (*DeleteResponse, error)
- func (c *Client) Find(ctx context.Context, req *FindRequest) (*FindResponse, error)
- func (c *Client) Index(ctx context.Context, req *IndexRequest) (*IndexResponse, error)
- func (c *Client) ReadUserTfaTypeTfa(ctx context.Context, req *ReadUserTfaTypeTfaRequest) (*ReadUserTfaTypeTfaResponse, error)
- func (c *Client) Update(ctx context.Context, req *UpdateRequest) (*UpdateResponse, error)
- type CreateRequest
- type CreateResponse
- type DeleteRequest
- type DeleteResponse
- type FindRequest
- type FindResponse
- type HTTPClient
- type IndexRequest
- type IndexResponse
- type ReadUserTfaTypeTfaRequest
- type ReadUserTfaTypeTfaResponse
- type UpdateRequest
- type UpdateResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func New ¶
func New(c HTTPClient) *Client
func (*Client) Create ¶
func (c *Client) Create(ctx context.Context, req *CreateRequest) (*CreateResponse, error)
Create Create new user.
func (*Client) Delete ¶
func (c *Client) Delete(ctx context.Context, req *DeleteRequest) (*DeleteResponse, error)
Delete Delete user.
func (*Client) Find ¶
func (c *Client) Find(ctx context.Context, req *FindRequest) (*FindResponse, error)
Find Get user configuration.
func (*Client) Index ¶
func (c *Client) Index(ctx context.Context, req *IndexRequest) (*IndexResponse, error)
Index User index.
func (*Client) ReadUserTfaTypeTfa ¶
func (c *Client) ReadUserTfaTypeTfa(ctx context.Context, req *ReadUserTfaTypeTfaRequest) (*ReadUserTfaTypeTfaResponse, error)
ReadUserTfaTypeTfa Get user TFA types (Personal and Realm).
func (*Client) Update ¶
func (c *Client) Update(ctx context.Context, req *UpdateRequest) (*UpdateResponse, error)
Update Update user configuration.
type CreateRequest ¶
type CreateRequest struct { Userid string `url:"userid",json:"userid"` // User ID // The following parameters are optional Comment *string `url:"comment,omitempty",json:"comment,omitempty"` Email *string `url:"email,omitempty",json:"email,omitempty"` Enable *bool `url:"enable,omitempty",json:"enable,omitempty"` // Enable the account (default). You can set this to '0' to disable the account Expire *int `url:"expire,omitempty",json:"expire,omitempty"` // Account expiration date (seconds since epoch). '0' means no expiration date. Firstname *string `url:"firstname,omitempty",json:"firstname,omitempty"` Groups *string `url:"groups,omitempty",json:"groups,omitempty"` Keys *string `url:"keys,omitempty",json:"keys,omitempty"` // Keys for two factor auth (yubico). Lastname *string `url:"lastname,omitempty",json:"lastname,omitempty"` Password *string `url:"password,omitempty",json:"password,omitempty"` // Initial password. }
type CreateResponse ¶
type CreateResponse map[string]interface{}
type DeleteRequest ¶
type DeleteRequest struct {
Userid string `url:"userid",json:"userid"` // User ID
}
type DeleteResponse ¶
type DeleteResponse map[string]interface{}
type FindRequest ¶
type FindRequest struct {
Userid string `url:"userid",json:"userid"` // User ID
}
type FindResponse ¶
type FindResponse struct { // The following parameters are optional Comment *string `url:"comment,omitempty",json:"comment,omitempty"` Email *string `url:"email,omitempty",json:"email,omitempty"` Enable *bool `url:"enable,omitempty",json:"enable,omitempty"` // Enable the account (default). You can set this to '0' to disable the account Expire *int `url:"expire,omitempty",json:"expire,omitempty"` // Account expiration date (seconds since epoch). '0' means no expiration date. Firstname *string `url:"firstname,omitempty",json:"firstname,omitempty"` Groups []string `url:"groups,omitempty",json:"groups,omitempty"` Keys *string `url:"keys,omitempty",json:"keys,omitempty"` // Keys for two factor auth (yubico). Lastname *string `url:"lastname,omitempty",json:"lastname,omitempty"` Tokens map[string]interface{} `url:"tokens,omitempty",json:"tokens,omitempty"` }
type HTTPClient ¶
type IndexRequest ¶
type IndexResponse ¶
type IndexResponse []*struct { Userid string `url:"userid",json:"userid"` // User ID // The following parameters are optional Comment *string `url:"comment,omitempty",json:"comment,omitempty"` Email *string `url:"email,omitempty",json:"email,omitempty"` Enable *bool `url:"enable,omitempty",json:"enable,omitempty"` // Enable the account (default). You can set this to '0' to disable the account Expire *int `url:"expire,omitempty",json:"expire,omitempty"` // Account expiration date (seconds since epoch). '0' means no expiration date. Firstname *string `url:"firstname,omitempty",json:"firstname,omitempty"` Groups *string `url:"groups,omitempty",json:"groups,omitempty"` Keys *string `url:"keys,omitempty",json:"keys,omitempty"` // Keys for two factor auth (yubico). Lastname *string `url:"lastname,omitempty",json:"lastname,omitempty"` RealmType *string `url:"realm-type,omitempty",json:"realm-type,omitempty"` // The type of the users realm Tokens []*struct { Tokenid string `url:"tokenid",json:"tokenid"` // User-specific token identifier. // The following parameters are optional Comment *string `url:"comment,omitempty",json:"comment,omitempty"` Expire *int `url:"expire,omitempty",json:"expire,omitempty"` // API token expiration date (seconds since epoch). '0' means no expiration date. Privsep *bool `url:"privsep,omitempty",json:"privsep,omitempty"` // Restrict API token privileges with separate ACLs (default), or give full privileges of corresponding user. } `url:"tokens,omitempty",json:"tokens,omitempty"` }
type ReadUserTfaTypeTfaResponse ¶
type ReadUserTfaTypeTfaResponse struct { // The following parameters are optional Realm *string `url:"realm,omitempty",json:"realm,omitempty"` // The type of TFA the users realm has set, if any. Types []string `url:"types,omitempty",json:"types,omitempty"` // Array of the user configured TFA types, if any. Only available if 'multiple' was not passed. User *string `url:"user,omitempty",json:"user,omitempty"` // The type of TFA the user has set, if any. Only set if 'multiple' was not passed. }
type UpdateRequest ¶
type UpdateRequest struct { Userid string `url:"userid",json:"userid"` // User ID // The following parameters are optional Append *bool `url:"append,omitempty",json:"append,omitempty"` Comment *string `url:"comment,omitempty",json:"comment,omitempty"` Email *string `url:"email,omitempty",json:"email,omitempty"` Enable *bool `url:"enable,omitempty",json:"enable,omitempty"` // Enable the account (default). You can set this to '0' to disable the account Expire *int `url:"expire,omitempty",json:"expire,omitempty"` // Account expiration date (seconds since epoch). '0' means no expiration date. Firstname *string `url:"firstname,omitempty",json:"firstname,omitempty"` Groups *string `url:"groups,omitempty",json:"groups,omitempty"` Keys *string `url:"keys,omitempty",json:"keys,omitempty"` // Keys for two factor auth (yubico). Lastname *string `url:"lastname,omitempty",json:"lastname,omitempty"` }
type UpdateResponse ¶
type UpdateResponse map[string]interface{}
Click to show internal directories.
Click to hide internal directories.