ssl

package
v1.0.27 Latest Latest
Warning

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

Go to latest
Published: Apr 15, 2019 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Certificate

type Certificate struct {
	ID               int                 `json:"id"`
	Name             string              `json:"name"`
	Status           CertificateStatus   `json:"status"`
	CommonName       string              `json:"common_name"`
	AlternativeNames []string            `json:"alternative_names"`
	ValidDays        int                 `json:"valid_days"`
	OrderedDate      connection.DateTime `json:"ordered_date"`
	RenewalDate      connection.DateTime `json:"renewal_date"`
}

Certificate represents an SSL certificate

type CertificateContent

type CertificateContent struct {
	Server       string `json:"server"`
	Intermediate string `json:"intermediate"`
}

CertificateContent represents the content of an SSL certificate

type CertificateNotFoundError

type CertificateNotFoundError struct {
	ID int
}

CertificateNotFoundError indicates a virtual machine was not found

func (*CertificateNotFoundError) Error

func (e *CertificateNotFoundError) Error() string

type CertificatePrivateKey

type CertificatePrivateKey struct {
	Key string `json:"key"`
}

CertificatePrivateKey represents an SSL certificate private key

type CertificateStatus

type CertificateStatus string
const (
	CertificateStatusCompleted      CertificateStatus = "Completed"
	CertificateStatusProcessing     CertificateStatus = "Processing"
	CertificateStatusExpired        CertificateStatus = "Expired"
	CertificateStatusExpiring       CertificateStatus = "Expiring"
	CertificateStatusPendingInstall CertificateStatus = "Pending Install"
)

func (CertificateStatus) String

func (s CertificateStatus) String() string

type GetCertificateContentResponseBody

type GetCertificateContentResponseBody struct {
	connection.APIResponseBody

	Data CertificateContent `json:"data"`
}

GetCertificateContentResponseBody represents the API response body from the GetCertificateContent resource

type GetCertificateKeyResponseBody

type GetCertificateKeyResponseBody struct {
	connection.APIResponseBody

	Data CertificatePrivateKey `json:"data"`
}

GetCertificateKeyResponseBody represents the API response body from the GetCertificateKey resource

type GetCertificateResponseBody

type GetCertificateResponseBody struct {
	connection.APIResponseBody

	Data Certificate `json:"data"`
}

GetCertificateResponseBody represents the API response body from the GetCertificate resource

type GetCertificatesResponseBody

type GetCertificatesResponseBody struct {
	connection.APIResponseBody

	Data []Certificate `json:"data"`
}

GetCertificatesResponseBody represents the API response body from the GetCertificates resource

type SSLService

type SSLService interface {
	GetCertificates(parameters connection.APIRequestParameters) ([]Certificate, error)
	GetCertificate(certificateID int) (Certificate, error)
	GetCertificateContent(certificateID int) (CertificateContent, error)
	GetCertificatePrivateKey(certificateID int) (CertificatePrivateKey, error)
}

SSLService is an interface for managing SSL certificates

type Service

type Service struct {
	// contains filtered or unexported fields
}

Service implements SSLService for managing SSL certificates via the UKFast API

func NewService

func NewService(connection connection.Connection) *Service

NewService returns a new instance of SSLService

func (*Service) GetCertificate

func (s *Service) GetCertificate(certificateID int) (Certificate, error)

GetCertificate retrieves a single certificate by id

func (*Service) GetCertificateContent

func (s *Service) GetCertificateContent(certificateID int) (CertificateContent, error)

GetCertificateContent retrieves the content of an SSL certificate

func (*Service) GetCertificatePrivateKey

func (s *Service) GetCertificatePrivateKey(certificateID int) (CertificatePrivateKey, error)

GetCertificatePrivateKey retrieves an SSL certificate private key

func (*Service) GetCertificates

func (s *Service) GetCertificates(parameters connection.APIRequestParameters) ([]Certificate, error)

GetCertificates retrieves a list of certificates

func (*Service) GetCertificatesPaginated

func (s *Service) GetCertificatesPaginated(parameters connection.APIRequestParameters) ([]Certificate, error)

GetCertificatesPaginated retrieves a paginated list of certificates

Jump to

Keyboard shortcuts

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