digitalocean

package
v0.4.27 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 15, 2026 License: MIT Imports: 8 Imported by: 0

Documentation

Overview

A simple SDK client for DigitalOcean. API documentation: https://docs.digitalocean.com/reference/api/

Index

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)

func (*Client) SetTimeout

func (c *Client) SetTimeout(timeout time.Duration) *Client

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) GetId

func (r *CreateCertificateResponse) GetId() string

func (*CreateCertificateResponse) GetMessage

func (r *CreateCertificateResponse) GetMessage() string

type ListCertificatesRequest

type ListCertificatesRequest struct {
	Name    *string `json:"name,omitempty"     url:"name,omitempty"`
	Page    *int    `json:"page,omitempty"     url:"page,omitempty"`
	PerPage *int    `json:"per_page,omitempty" url:"per_page,omitempty"`
}

type ListCertificatesResponse

type ListCertificatesResponse struct {
	Certificates []*Certificate `json:"certificates,omitempty"`
	// contains filtered or unexported fields
}

func (*ListCertificatesResponse) GetId

func (r *ListCertificatesResponse) GetId() string

func (*ListCertificatesResponse) GetMessage

func (r *ListCertificatesResponse) GetMessage() string

type Options

type Options struct {
	AccessToken string
}

type OptionsFunc

type OptionsFunc func(*Options)

func WithAccessToken

func WithAccessToken(accessToken string) OptionsFunc

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL