Documentation
¶
Index ¶
- type ACMEAccountCreateRequestBody
- type ACMEAccountCreateResponseBody
- type ACMEAccountData
- type ACMEAccountDeleteResponseBody
- type ACMEAccountGetResponseBody
- type ACMEAccountGetResponseData
- type ACMEAccountListResponseBody
- type ACMEAccountListResponseData
- type ACMEAccountUpdateRequestBody
- type ACMEAccountUpdateResponseBody
- type Client
- func (c *Client) Create(ctx context.Context, data *ACMEAccountCreateRequestBody) error
- func (c *Client) Delete(ctx context.Context, accountName string) error
- func (c *Client) ExpandPath(path string) string
- func (c *Client) Get(ctx context.Context, name string) (*ACMEAccountGetResponseData, error)
- func (c *Client) List(ctx context.Context) ([]*ACMEAccountListResponseData, error)
- func (c *Client) Tasks() *tasks.Client
- func (c *Client) Update(ctx context.Context, accountName string, data *ACMEAccountUpdateRequestBody) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ACMEAccountCreateRequestBody ¶
type ACMEAccountCreateRequestBody struct {
// Contact is the contact email addresses.
Contact string `url:"contact"`
// Directory is the URL of the ACME CA directory endpoint.
Directory string `url:"directory,omitempty"`
// EABHMACKey is the HMAC key for External Account Binding.
EABHMACKey string `url:"eab-hmac-key,omitempty"`
// EABKID is the Key Identifier for External Account Binding.
EABKID string `url:"eab-kid,omitempty"`
// Name is the ACME account config file name.
Name string `url:"name,omitempty"`
// TOS is the URL of CA TermsOfService - setting this indicates agreement.
TOS string `url:"tos_url,omitempty"`
}
ACMEAccountCreateRequestBody contains the body for creating a new ACME account.
type ACMEAccountCreateResponseBody ¶
type ACMEAccountCreateResponseBody struct {
Data *string `json:"data,omitempty"`
}
ACMEAccountCreateResponseBody contains the body from an ACME account create request.
type ACMEAccountData ¶
type ACMEAccountData struct {
// An array of contact email addresses.
Contact []string `json:"contact"`
// Timestamp of the account creation.
CreatedAt string `json:"createdAt"`
// Status of the account. Can be one of "valid", "deactivated" or "revoked".
Status string `json:"status"`
}
ACMEAccountData contains the data from a ACME account.
type ACMEAccountDeleteResponseBody ¶
type ACMEAccountDeleteResponseBody struct {
Data *string `json:"data,omitempty"`
}
ACMEAccountDeleteResponseBody contains the body from an ACME account delete request.
type ACMEAccountGetResponseBody ¶
type ACMEAccountGetResponseBody struct {
Data *ACMEAccountGetResponseData `json:"data,omitempty"`
}
ACMEAccountGetResponseBody contains the body from a ACME account get response.
type ACMEAccountGetResponseData ¶
type ACMEAccountGetResponseData struct {
// Account is the ACME account data.
Account ACMEAccountData `json:"account"`
// Directory is the URL of the ACME CA directory endpoint.
Directory string `json:"directory"`
// Location is the location of the ACME account.
Location string `json:"location"`
// TOS is the terms of service URL.
TOS string `json:"tos"`
}
ACMEAccountGetResponseData contains the data from a ACME account get response.
type ACMEAccountListResponseBody ¶
type ACMEAccountListResponseBody struct {
Data []*ACMEAccountListResponseData `json:"data,omitempty"`
}
ACMEAccountListResponseBody contains the body from a ACME account list response.
type ACMEAccountListResponseData ¶
type ACMEAccountListResponseData struct {
Name string `json:"name"`
}
ACMEAccountListResponseData contains the data from a ACME account list response.
type ACMEAccountUpdateRequestBody ¶
type ACMEAccountUpdateRequestBody struct {
// Contact is the contact email addresses.
Contact string `url:"contact,omitempty"`
// Name is the ACME account config file name.
Name string `url:"name,omitempty"`
}
ACMEAccountUpdateRequestBody contains the body for updating an existing ACME account.
type ACMEAccountUpdateResponseBody ¶
type ACMEAccountUpdateResponseBody struct {
Data *string `json:"data,omitempty"`
}
ACMEAccountUpdateResponseBody contains the body from an ACME account update request.
type Client ¶
Client is an interface for accessing the Proxmox ACME management API.
func (*Client) Create ¶
func (c *Client) Create(ctx context.Context, data *ACMEAccountCreateRequestBody) error
Create creates a new ACME account.
func (*Client) ExpandPath ¶
ExpandPath expands a relative path to the Proxmox ACME management API path.
func (*Client) List ¶
func (c *Client) List(ctx context.Context) ([]*ACMEAccountListResponseData, error)
List returns a list of ACME accounts.