Documentation
¶
Index ¶
- Variables
- type CACert
- type Certificate
- type CertificateChain
- type CertificateFormat
- type CertificateRevokeResponse
- type Client
- func (c *Client) DownloadCertificate(certificateID string, certFormat CertificateFormat) ([]*x509.Certificate, error)
- func (c *Client) DownloadCertificateForOrder(orderID string, certFormat CertificateFormat) ([]*x509.Certificate, error)
- func (c *Client) GetDomain(domainID string) (*Domain, error)
- func (c *Client) GetOrder(orderID string) (*Order, error)
- func (c *Client) GetOrganization(organizationID string) (*Organization, error)
- func (c *Client) GetOrganizationByName(organizationName string) (*Organization, error)
- func (c *Client) ListDomains(containerID string) ([]Domain, error)
- func (c *Client) ListOrganizations() ([]Organization, error)
- func (c *Client) ListProducts() ([]Product, error)
- func (c *Client) RevokeCertificate(certificateID string) (*CertificateRevokeResponse, error)
- func (c *Client) SubmitOrder(order Order, orderType OrderType) (*Order, error)
- type Container
- type DCV
- type DCVInvitations
- type Domain
- type Error
- type Options
- type Order
- type OrderRequest
- type OrderType
- type Organization
- type PaymentMethod
- type Product
- type ServerPlatform
- type ServerPlatformType
- type SignatureHash
- type Status
- type User
- type Validation
Constants ¶
This section is empty.
Variables ¶
View Source
var CertificateFormats = struct { Default, PEM, DefaultPEM, PEMAll, PEMNoIntermediate, PEMNoRoot, P7B, CRT CertificateFormat }{ "default", "pem", "default_pem", "pem_all", "pem_nointermediate", "pem_noroot", "p7b", "crt", }
CertificateFormats is the set of formats for a certificate. Additional documentation can be found here: https://dev.digicert.com/glossary/#certificate-formats
View Source
var OrderTypes = struct { SSLPlus, PrivateSSLPlus, PrivateSSLWildcard OrderType }{ "ssl_plus", "private_ssl_plus", "private_ssl_wildcard", }
View Source
var PaymentMethods = struct { Balance, Card, Profile, WireTransfer PaymentMethod }{ "balance", "card", "profile", "wire_transfer", }
View Source
var ServerPlatformTypes = struct { Nginx, Other ServerPlatformType }{ 45, 57, }
ServerPlatformTypes is the collection of available ServerPlatformType. The full list of supported server platforms can be found here: https://www.digicert.com/services/v2/documentation/appendix-server-platforms
View Source
var SignatureHashes = struct { SHA256, SHA384, SHA512, SHA1 SignatureHash }{ "sha256", "sha384", "sha512", "sha1", }
View Source
var Stati = struct { Pending, Approved, Rejected Status }{ "pending", "approved", "rejected", }
Functions ¶
This section is empty.
Types ¶
type Certificate ¶
type Certificate struct { CommonName string `json:"common_name"` DNSNames []string `json:"dns_names"` CSR string `json:"csr,omitempty"` ServerPlatform ServerPlatform `json:"server_platform"` SignatureHash SignatureHash `json:"signature_hash"` CaCertID string `json:"ca_cert_id,omitempty"` OrganizationUnits []string `json:"organization_units,omitempty"` Organization *Organization `json:"organization,omitempty"` ProfileOption string `json:"profile_option,omitempty"` ID int `json:"id,omitempty"` Thumbprint string `json:"thumbprint,omitempty"` SerialNumber string `json:"serial_number,omitempty"` DateCreated *time.Time `json:"date_created,omitempty"` ValidFrom string `json:"valid_from,omitempty"` ValidTill string `json:"valid_till,omitempty"` KeySize int `json:"key_size,omitempty"` CACert *CACert `json:"ca_cert,omitempty"` }
type CertificateChain ¶
type CertificateChain struct { SubjectCommonName string `json:"subject_common_name"` Pem string `json:"pem"` }
func (CertificateChain) DecodePEM ¶
func (cc CertificateChain) DecodePEM() ([]*x509.Certificate, error)
type CertificateFormat ¶
type CertificateFormat string
func (CertificateFormat) String ¶
func (cf CertificateFormat) String() string
type Client ¶
type Client struct { *Options // contains filtered or unexported fields }
Client is the client for the DigiCert cert-central API.
func (*Client) DownloadCertificate ¶
func (c *Client) DownloadCertificate(certificateID string, certFormat CertificateFormat) ([]*x509.Certificate, error)
func (*Client) DownloadCertificateForOrder ¶
func (c *Client) DownloadCertificateForOrder(orderID string, certFormat CertificateFormat) ([]*x509.Certificate, error)
func (*Client) GetOrganization ¶
func (c *Client) GetOrganization(organizationID string) (*Organization, error)
func (*Client) GetOrganizationByName ¶
func (c *Client) GetOrganizationByName(organizationName string) (*Organization, error)
func (*Client) ListOrganizations ¶
func (c *Client) ListOrganizations() ([]Organization, error)
func (*Client) ListProducts ¶
func (*Client) RevokeCertificate ¶
func (c *Client) RevokeCertificate(certificateID string) (*CertificateRevokeResponse, error)
type DCV ¶
type DCV struct { Method string `json:"method,omitempty"` NameScope string `json:"name_scope,omitempty"` DcvInvitations []DCVInvitations `json:"dcv_invitations,omitempty"` }
type DCVInvitations ¶
type Domain ¶
type Domain struct { ID int `json:"id"` Name string `json:"name"` IsActive bool `json:"is_active,omitempty"` DateCreated *time.Time `json:"date_created,omitempty"` Organization *Organization `json:"organization,omitempty"` Validations []Validation `json:"validations,omitempty"` DCV *DCV `json:"dcv,omitempty"` Container *Container `json:"container,omitempty"` }
type Error ¶
type Order ¶
type Order struct { Certificate Certificate `json:"certificate,omitempty"` Organization *Organization `json:"organization,omitempty"` ValidityYears int `json:"validity_years,omitempty"` CustomExpirationDate string `json:"custom_expiration_date,omitempty"` Comments string `json:"comments,omitempty"` ProcessorComment string `json:"processor_comment,omitempty"` DisableRenewalNotifications bool `json:"disable_renewal_notifications,omitempty"` RenewalOfOrderID int `json:"renewal_of_order_id,omitempty"` PaymentMethod PaymentMethod `json:"payment_method,omitempty"` SkipApproval bool `json:"skip_approval,omitempty"` Product *Product `json:"product,omitempty"` OrganizationContact *User `json:"organization_contact,omitempty"` TechnicalContact *User `json:"technical_contact,omitempty"` User *User `json:"user,omitempty"` CsProvisioningMethod string `json:"cs_provisioning_method,omitempty"` DisableCT bool `json:"disable_ct,omitempty"` Requests []OrderRequest `json:"requests,omitempty"` ID int `json:"id"` Domains []Domain `json:"domains,omitempty"` CertificateID int `json:"certificate_id,omitempty"` CertificateChain []CertificateChain `json:"certificate_chain,omitempty"` }
func (Order) DecodeCertificateChain ¶
func (o Order) DecodeCertificateChain() ([]*x509.Certificate, error)
type OrderRequest ¶
type Organization ¶
type Organization struct { ID int `json:"id"` Status string `json:"status"` Name string `json:"name"` AssumedName string `json:"assumed_name,omitempty"` DisplayName string `json:"display_name,omitempty"` IsActive bool `json:"is_active,omitempty"` Address string `json:"address"` Address2 string `json:"address2,omitempty"` City string `json:"city"` State string `json:"state"` Zip string `json:"zip"` Country string `json:"country"` Telephone string `json:"telephone,omitempty"` Container *Container `json:"container,omitempty"` Validations []Validation `json:"validations,omitempty"` EvApprovers []User `json:"ev_approvers,omitempty"` OrganizationContact *User `json:"organization_contact,omitempty"` Contacts []User `json:"contacts,omitempty"` }
type PaymentMethod ¶
type PaymentMethod string
func (PaymentMethod) String ¶
func (p PaymentMethod) String() string
type Product ¶
type Product struct { GroupName string `json:"group_name,omitempty"` NameID string `json:"name_id,omitempty"` Name string `json:"name,omitempty"` Type string `json:"type,omitempty"` ValidationType string `json:"validation_type,omitempty"` ValidationName string `json:"validation_name,omitempty"` ValidationDescription string `json:"validation_description,omitempty"` }
type ServerPlatform ¶
type ServerPlatform struct { ID int `json:"id"` Name string `json:"name,omitempty"` InstallURL string `json:"install_url,omitempty"` CsrURL string `json:"csr_url,omitempty"` }
ServerPlatform ...
func ServerPlatformForType ¶
func ServerPlatformForType(platform ServerPlatformType) ServerPlatform
type ServerPlatformType ¶
type ServerPlatformType int
func (ServerPlatformType) Int ¶
func (s ServerPlatformType) Int() int
type SignatureHash ¶
type SignatureHash string
func (SignatureHash) String ¶
func (s SignatureHash) String() string
type User ¶
type User struct { ID int `json:"id"` FirstName string `json:"first_name,omitempty"` LastName string `json:"last_name,omitempty"` Email string `json:"email,omitempty"` JobTitle string `json:"job_title,omitempty"` Telephone string `json:"telephone,omitempty"` Name string `json:"name,omitempty"` ContactType string `json:"contact_type,omitempty"` }
type Validation ¶
type Validation struct { Type string `json:"type"` Name string `json:"name"` Description string `json:"description"` DateCreated *time.Time `json:"date_created,omitempty"` ValidatedUntil *time.Time `json:"validated_until,omitempty"` Status string `json:"status"` DcvStatus string `json:"dcv_status,omitempty"` VerifiedUsers []User `json:"verified_users,omitempty"` }
Click to show internal directories.
Click to hide internal directories.