Documentation
¶
Overview ¶
A simple SDK client for DigitalOcean. API documentation: https://docs.digitalocean.com/reference/api/
Index ¶
- type Certificate
- type Client
- func (c *Client) CreateCertificate(req *CreateCertificateRequest) (*CreateCertificateResponse, error)
- func (c *Client) CreateCertificateWithContext(ctx context.Context, req *CreateCertificateRequest) (*CreateCertificateResponse, error)
- func (c *Client) ListCertificates(req *ListCertificatesRequest) (*ListCertificatesResponse, error)
- func (c *Client) ListCertificatesWithContext(ctx context.Context, req *ListCertificatesRequest) (*ListCertificatesResponse, error)
- func (c *Client) SetTimeout(timeout time.Duration) *Client
- type CreateCertificateRequest
- type CreateCertificateResponse
- type ListCertificatesRequest
- type ListCertificatesResponse
- type Options
- type OptionsFunc
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Certificate ¶
type Certificate struct {
ID string `json:"id,omitempty"`
Name string `json:"name,omitempty"`
DNSNames []string `json:"dns_names,omitempty"`
NotAfter string `json:"not_after,omitempty"`
SHA1Fingerprint string `json:"sha1_fingerprint,omitempty"`
Created string `json:"created_at,omitempty"`
State string `json:"state,omitempty"`
Type string `json:"type,omitempty"`
}
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func NewClient ¶
func NewClient(optFns ...OptionsFunc) (*Client, error)
func (*Client) CreateCertificate ¶
func (c *Client) CreateCertificate(req *CreateCertificateRequest) (*CreateCertificateResponse, error)
func (*Client) CreateCertificateWithContext ¶
func (c *Client) CreateCertificateWithContext(ctx context.Context, req *CreateCertificateRequest) (*CreateCertificateResponse, error)
func (*Client) ListCertificates ¶
func (c *Client) ListCertificates(req *ListCertificatesRequest) (*ListCertificatesResponse, error)
func (*Client) ListCertificatesWithContext ¶
func (c *Client) ListCertificatesWithContext(ctx context.Context, req *ListCertificatesRequest) (*ListCertificatesResponse, error)
type CreateCertificateRequest ¶
type CreateCertificateRequest struct {
Name *string `json:"name,omitempty"`
DNSNames []*string `json:"dns_names,omitempty"`
Type *string `json:"type,omitempty"`
CertificateChain *string `json:"certificate_chain,omitempty"`
LeafCertificate *string `json:"leaf_certificate,omitempty"`
PrivateKey *string `json:"private_key,omitempty"`
}
type CreateCertificateResponse ¶
type CreateCertificateResponse struct {
Certificate *Certificate `json:"certificate,omitempty"`
// contains filtered or unexported fields
}
func (*CreateCertificateResponse) GetMessage ¶
func (r *CreateCertificateResponse) GetMessage() string
type ListCertificatesRequest ¶
type ListCertificatesResponse ¶
type ListCertificatesResponse struct {
Certificates []*Certificate `json:"certificates,omitempty"`
// contains filtered or unexported fields
}
func (*ListCertificatesResponse) GetMessage ¶
func (r *ListCertificatesResponse) GetMessage() string
type OptionsFunc ¶
type OptionsFunc func(*Options)
func WithAccessToken ¶
func WithAccessToken(accessToken string) OptionsFunc
Click to show internal directories.
Click to hide internal directories.