Documentation
¶
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 GetRecommendationsResponseBody
- type GetRecommendationsSliceResponseBody
- type GetReportResponseBody
- type GetReportSliceResponseBody
- type PaginatedCertificate
- type RecommendationLevel
- type Recommendations
- type Report
- 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) GetRecommendations(domainName string) (Recommendations, error)
- func (s *Service) GetReport(domainName string) (Report, 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 +genie:model_response +genie:model_paginated
type CertificateContent ¶
type CertificateContent struct { Server string `json:"server"` Intermediate string `json:"intermediate"` }
CertificateContent represents the content of an SSL certificate +genie:model_response
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 +genie:model_response
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 +genie:model_response
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 GetRecommendationsResponseBody ¶ added in v1.3.26
type GetRecommendationsResponseBody struct { connection.APIResponseBody Data Recommendations `json:"data"` }
GetRecommendationsResponseBody represents an API response body containing Recommendations data
type GetRecommendationsSliceResponseBody ¶ added in v1.3.26
type GetRecommendationsSliceResponseBody struct { connection.APIResponseBody Data []Recommendations `json:"data"` }
GetRecommendationsSliceResponseBody represents an API response body containing []Recommendations data
type GetReportResponseBody ¶ added in v1.3.26
type GetReportResponseBody struct { connection.APIResponseBody Data Report `json:"data"` }
GetReportResponseBody represents an API response body containing Report data
type GetReportSliceResponseBody ¶ added in v1.3.26
type GetReportSliceResponseBody struct { connection.APIResponseBody Data []Report `json:"data"` }
GetReportSliceResponseBody represents an API response body containing []Report 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 RecommendationLevel ¶ added in v1.3.26
type RecommendationLevel string
const ( RecommendationLevelLow RecommendationLevel = "low" RecommendationLevelMedium RecommendationLevel = "medium" RecommendationLevelHigh RecommendationLevel = "high" )
func (RecommendationLevel) String ¶ added in v1.3.26
func (s RecommendationLevel) String() string
type Recommendations ¶ added in v1.3.26
type Recommendations struct { Level RecommendationLevel `json:"level"` Messages []string `json:"messages"` }
Recommendations represents SSL recommendations +genie:model_response
type Report ¶ added in v1.3.26
type Report struct { Certificate struct { Name string `json:"name"` ValidFrom connection.DateTime `json:"valid_from"` ValidTo connection.DateTime `json:"valid_to"` Issuer string `json:"issuer"` SerialNumber string `json:"serial_number"` SignatureAlgorithm string `json:"signature_algorithm"` CoversDomain bool `json:"covers_domain"` DomainsSecured []string `json:"domains_secured"` MultiDomain bool `json:"multi_domain"` Wildcard bool `json:"wildcard"` Expiring bool `json:"expiring"` Expired bool `json:"expired"` SecureSha bool `json:"secure_sha"` } `json:"certificate"` Server struct { IP string `json:"ip"` Hostname string `json:"hostname"` Port string `json:"port"` CurrentTime connection.DateTime `json:"current_time"` ServertTime connection.DateTime `json:"server_time"` Software string `json:"software"` OpenSSLVersion string `json:"openssl_version"` SSLVersions struct { TLS struct { // contains filtered or unexported fields } `json:"tls"` SSL struct { // contains filtered or unexported fields } `json:"ssl"` } `json:"ssl_versions"` } `json:"server"` Vulnerabilities struct { Heartbleed bool `json:"heartbleed"` Poodle bool `json:"poodle"` } `json:"vulnerabilities"` Findings []string `json:"findings"` Chain struct { Certificates []struct { Name string `json:"name"` ValidFrom connection.DateTime `json:"valid_from"` ValidTo connection.DateTime `json:"valid_to"` Issuer string `json:"issuer"` SerialNumber string `json:"serial_number"` SignatureAlgorithm string `json:"signature_algorithm"` ChainIntact bool `json:"chain_intact"` CertificateType string `json:"certificate_type"` } `json:"certificates"` } `json:"chain"` ChainIntact bool `json:"chain_intact"` }
Report represents an SSL report +genie:model_response
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) GetReport(domainName string) (Report, error) GetRecommendations(domainName string) (Recommendations, 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) GetRecommendations ¶ added in v1.3.26
func (s *Service) GetRecommendations(domainName string) (Recommendations, error)
GetRecommendations retrieves SSL recommendations for a domain
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