Documentation
¶
Overview ¶
Code generated by github.com/ukfast/sdk-go/pkg/gen/model_paginated. DO NOT EDIT.
Code generated by github.com/ukfast/sdk-go/pkg/gen/response. DO NOT EDIT.
Index ¶
- type Certificate
- type CertificateContent
- type CertificateNotFoundError
- type CertificatePrivateKey
- type CertificateStatus
- type CertificateValidation
- type GetCertificateContentResponseBody
- type GetCertificateContentSliceResponseBody
- type GetCertificatePrivateKeyResponseBody
- type GetCertificatePrivateKeySliceResponseBody
- type GetCertificateResponseBody
- type GetCertificateSliceResponseBody
- type GetCertificateValidationResponseBody
- type GetCertificateValidationSliceResponseBody
- type PaginatedCertificate
- type SSLService
- type Service
- func (s *Service) GetCertificate(certificateID int) (Certificate, error)
- func (s *Service) GetCertificateContent(certificateID int) (CertificateContent, error)
- func (s *Service) GetCertificatePrivateKey(certificateID int) (CertificatePrivateKey, error)
- func (s *Service) GetCertificates(parameters connection.APIRequestParameters) ([]Certificate, error)
- func (s *Service) GetCertificatesPaginated(parameters connection.APIRequestParameters) (*PaginatedCertificate, error)
- func (s *Service) ValidateCertificate(req ValidateRequest) (CertificateValidation, error)
- type ValidateRequest
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 CertificateValidation ¶ added in v1.3.15
type CertificateValidation struct { Domains []string `json:"domains"` ExpiresAt connection.DateTime `json:"expires_at"` }
CertificateValidation represents the results of certificate validation
type GetCertificateContentResponseBody ¶
type GetCertificateContentResponseBody struct { connection.APIResponseBody Data CertificateContent `json:"data"` }
GetCertificateContentResponseBody represents an API response body containing CertificateContent data
type GetCertificateContentSliceResponseBody ¶ added in v1.3.17
type GetCertificateContentSliceResponseBody struct { connection.APIResponseBody Data []CertificateContent `json:"data"` }
GetCertificateContentSliceResponseBody represents an API response body containing []CertificateContent data
type GetCertificatePrivateKeyResponseBody ¶ added in v1.3.17
type GetCertificatePrivateKeyResponseBody struct { connection.APIResponseBody Data CertificatePrivateKey `json:"data"` }
GetCertificatePrivateKeyResponseBody represents an API response body containing CertificatePrivateKey data
type GetCertificatePrivateKeySliceResponseBody ¶ added in v1.3.17
type GetCertificatePrivateKeySliceResponseBody struct { connection.APIResponseBody Data []CertificatePrivateKey `json:"data"` }
GetCertificatePrivateKeySliceResponseBody represents an API response body containing []CertificatePrivateKey data
type GetCertificateResponseBody ¶
type GetCertificateResponseBody struct { connection.APIResponseBody Data Certificate `json:"data"` }
GetCertificateResponseBody represents an API response body containing Certificate data
type GetCertificateSliceResponseBody ¶ added in v1.3.17
type GetCertificateSliceResponseBody struct { connection.APIResponseBody Data []Certificate `json:"data"` }
GetCertificateSliceResponseBody represents an API response body containing []Certificate data
type GetCertificateValidationResponseBody ¶ added in v1.3.17
type GetCertificateValidationResponseBody struct { connection.APIResponseBody Data CertificateValidation `json:"data"` }
GetCertificateValidationResponseBody represents an API response body containing CertificateValidation data
type GetCertificateValidationSliceResponseBody ¶ added in v1.3.17
type GetCertificateValidationSliceResponseBody struct { connection.APIResponseBody Data []CertificateValidation `json:"data"` }
GetCertificateValidationSliceResponseBody represents an API response body containing []CertificateValidation data
type PaginatedCertificate ¶ added in v1.1.0
type PaginatedCertificate struct { *connection.PaginatedBase Items []Certificate }
PaginatedCertificate represents a paginated collection of Certificate
func NewPaginatedCertificate ¶ added in v1.1.0
func NewPaginatedCertificate(getFunc connection.PaginatedGetFunc, parameters connection.APIRequestParameters, pagination connection.APIResponseMetadataPagination, items []Certificate) *PaginatedCertificate
NewPaginatedCertificate returns a pointer to an initialized PaginatedCertificate struct
type SSLService ¶
type SSLService interface { GetCertificates(parameters connection.APIRequestParameters) ([]Certificate, error) GetCertificatesPaginated(parameters connection.APIRequestParameters) (*PaginatedCertificate, error) GetCertificate(certificateID int) (Certificate, error) GetCertificateContent(certificateID int) (CertificateContent, error) GetCertificatePrivateKey(certificateID int) (CertificatePrivateKey, error) ValidateCertificate(req ValidateRequest) (CertificateValidation, 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) (*PaginatedCertificate, error)
GetCertificatesPaginated retrieves a paginated list of certificates
func (*Service) ValidateCertificate ¶ added in v1.3.15
func (s *Service) ValidateCertificate(req ValidateRequest) (CertificateValidation, error)
ValidateCertificate validates a certificate
type ValidateRequest ¶ added in v1.3.15
type ValidateRequest struct { Key string `json:"key"` Certificate string `json:"certificate"` CABundle string `json:"ca_bundle"` }
ValidateRequest represents a request to validate a certificate