Documentation
¶
Index ¶
- type APIDetail
- type APIEnvironment
- type APIMessage
- type BackendAPIModel
- type CRDNSCNAMEVerification
- type CRDNSCredential
- type CRDNSCreds
- type CRDNSKeys
- type CRDNSProvider
- type CertReqDNS
- type CertReqHTTP
- type Client
- func (c *Client) CreateBackend(backend NewBackendAPIModel, environment APIEnvironment) (*BackendAPIModel, error)
- func (c *Client) CreateCustomCertificate(cert SSLCustomCertificate) (*SSLCertificate, error)
- func (c *Client) CreateDNSCertReq(certreq interface{}) (*CertReqDNS, error)
- func (c *Client) CreateDNSCredential(dns_credential NewCRDNSCredential) (*CRDNSCredential, error)
- func (c *Client) CreateHTTPCertReq(certreq interface{}) (*CertReqHTTP, error)
- func (c *Client) CreateSite(site SiteNewAPIModel) (*SiteAPIModel, bool, error)
- func (c *Client) CreateVclconf(vclconf NewVCLConfAPIModel, environment APIEnvironment) (*VCLConfAPIModel, error)
- func (c *Client) DeleteBackend(backendID int, environment APIEnvironment) error
- func (c *Client) DeleteCRCredential(id int) error
- func (c *Client) DeleteCustomCertificate(certID int) error
- func (c *Client) DeleteSite(siteID int) error
- func (c *Client) DeteleDNSCertReq(id int) error
- func (c *Client) GetActiveVCLConf(environment APIEnvironment) (*VCLConfAPIModel, error)
- func (c *Client) GetBackend(backendID int, environment APIEnvironment) (*BackendAPIModel, error)
- func (c *Client) GetBackendByName(name string, environment APIEnvironment) (*BackendAPIModel, error)
- func (c *Client) GetBackends(environment APIEnvironment) ([]BackendAPIModel, error)
- func (c *Client) GetCRDNSCredential(id int) (CRDNSCredential, error)
- func (c *Client) GetCRDNSProviders() ([]CRDNSProvider, error)
- func (c *Client) GetCertReqDNS(id int) (CertReqDNS, error)
- func (c *Client) GetCertReqHTTP(id int) (CertReqHTTP, error)
- func (c *Client) GetCertificate(certID int) (*SSLCertificate, error)
- func (c *Client) GetCertificates() ([]SSLCertificate, error)
- func (c *Client) GetDNSCNAMEVerification() (string, error)
- func (c *Client) GetIPRanges() ([]string, error)
- func (c *Client) GetIfExists(body []byte, site_domain string) *SiteAPIModel
- func (c *Client) GetSite(siteID int) (*SiteAPIModel, error)
- func (c *Client) GetSiteVerifyString(site_domain string) string
- func (c *Client) GetSites() ([]SiteAPIModel, error)
- func (c *Client) GetVclConfs(offset int, environment APIEnvironment) ([]VCLConfAPIModel, error)
- func (c *Client) MustGetAPIEnvironmentPath(environment APIEnvironment) string
- func (c *Client) UpdateBackend(backend BackendAPIModel, environment APIEnvironment) (*BackendAPIModel, error)
- func (c *Client) UpdateCustomCertificate(cert SSLCustomCertificate) (*SSLCertificate, error)
- func (c *Client) UpdateDNSCertReq(certreq_id int, credential_id int) error
- func (c *Client) UpdateDNSCredential(dns_credential NewCRDNSCredential, id int) (*CRDNSCredential, error)
- type NewBackendAPIModel
- type NewCRDNSCredential
- type NewCRDNSCreds
- type NewVCLConfAPIModel
- type SSLCertificate
- type SSLCustomCertificate
- type SiteAPIModel
- type SiteNewAPIModel
- type SiteVerifyStringAPIModelRequest
- type SiteVerifyStringAPIModelResponse
- type TokenStruct
- type VCLConfAPIModel
- type VCLConfCreator
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type APIEnvironment ¶ added in v0.1.3
type APIEnvironment int
Environment
const ( ProdEnv APIEnvironment = 0 StagingEnv APIEnvironment = 1 )
type BackendAPIModel ¶
type BackendAPIModel struct { ID int `json:"id"` Company int `json:"company"` Name string `json:"name"` Origin string `json:"origin"` Ssl bool `json:"ssl"` Port int `json:"port"` HCHost string `json:"host"` HCPath string `json:"health_check"` HCStatusCode int `json:"status_code"` }
Backends
type CRDNSCNAMEVerification ¶ added in v0.5.0
type CRDNSCNAMEVerification struct {
CNAME string `json:"cname"`
}
type CRDNSCredential ¶ added in v0.5.0
type CRDNSCredential struct { ID int `json:"id"` Alias string `json:"alias"` Creds []CRDNSCreds `json:"creds"` }
type CRDNSCreds ¶ added in v0.5.0
type CRDNSProvider ¶ added in v0.5.0
type CertReqDNS ¶ added in v0.5.0
type CertReqHTTP ¶ added in v0.5.0
type CertReqHTTP struct { ID int `json:"id"` CommonName string `json:"cn"` SAN string `json:"san"` Standalone bool `json:"standalone"` CreatedAt string `json:"created_at"` UpdatedAt string `json:"last_modified_at"` // as pointers since they can be null CertificateID *int `json:"certificate"` Log *string `json:"error_text"` }
HTTP Certificate Requests
type Client ¶
type Client struct { HTTPClient *http.Client Token TokenStruct HostURL string CompanyId int ClientId string ClientSecret string VerifySSL bool UserAgent string }
func (*Client) CreateBackend ¶
func (c *Client) CreateBackend(backend NewBackendAPIModel, environment APIEnvironment) (*BackendAPIModel, error)
func (*Client) CreateCustomCertificate ¶ added in v0.2.0
func (c *Client) CreateCustomCertificate(cert SSLCustomCertificate) (*SSLCertificate, error)
func (*Client) CreateDNSCertReq ¶ added in v0.5.0
func (c *Client) CreateDNSCertReq(certreq interface{}) (*CertReqDNS, error)
func (*Client) CreateDNSCredential ¶ added in v0.5.0
func (c *Client) CreateDNSCredential(dns_credential NewCRDNSCredential) (*CRDNSCredential, error)
func (*Client) CreateHTTPCertReq ¶ added in v0.5.0
func (c *Client) CreateHTTPCertReq(certreq interface{}) (*CertReqHTTP, error)
func (*Client) CreateSite ¶
func (c *Client) CreateSite(site SiteNewAPIModel) (*SiteAPIModel, bool, error)
func (*Client) CreateVclconf ¶ added in v0.1.2
func (c *Client) CreateVclconf(vclconf NewVCLConfAPIModel, environment APIEnvironment) (*VCLConfAPIModel, error)
func (*Client) DeleteBackend ¶
func (c *Client) DeleteBackend(backendID int, environment APIEnvironment) error
func (*Client) DeleteCRCredential ¶ added in v0.5.0
func (*Client) DeleteCustomCertificate ¶ added in v0.2.0
func (*Client) DeleteSite ¶
func (*Client) DeteleDNSCertReq ¶ added in v0.5.0
func (*Client) GetActiveVCLConf ¶ added in v0.1.1
func (c *Client) GetActiveVCLConf(environment APIEnvironment) (*VCLConfAPIModel, error)
func (*Client) GetBackend ¶
func (c *Client) GetBackend(backendID int, environment APIEnvironment) (*BackendAPIModel, error)
func (*Client) GetBackendByName ¶ added in v0.3.0
func (c *Client) GetBackendByName(name string, environment APIEnvironment) (*BackendAPIModel, error)
func (*Client) GetBackends ¶
func (c *Client) GetBackends(environment APIEnvironment) ([]BackendAPIModel, error)
func (*Client) GetCRDNSCredential ¶ added in v0.5.0
func (c *Client) GetCRDNSCredential(id int) (CRDNSCredential, error)
func (*Client) GetCRDNSProviders ¶ added in v0.5.0
func (c *Client) GetCRDNSProviders() ([]CRDNSProvider, error)
func (*Client) GetCertReqDNS ¶ added in v0.5.0
func (c *Client) GetCertReqDNS(id int) (CertReqDNS, error)
func (*Client) GetCertReqHTTP ¶ added in v0.5.0
func (c *Client) GetCertReqHTTP(id int) (CertReqHTTP, error)
func (*Client) GetCertificate ¶ added in v0.2.0
func (c *Client) GetCertificate(certID int) (*SSLCertificate, error)
func (*Client) GetCertificates ¶ added in v0.1.5
func (c *Client) GetCertificates() ([]SSLCertificate, error)
func (*Client) GetDNSCNAMEVerification ¶ added in v0.5.0
func (*Client) GetIPRanges ¶ added in v0.2.6
func (*Client) GetIfExists ¶
func (c *Client) GetIfExists(body []byte, site_domain string) *SiteAPIModel
func (*Client) GetSiteVerifyString ¶
func (*Client) GetSites ¶
func (c *Client) GetSites() ([]SiteAPIModel, error)
func (*Client) GetVclConfs ¶ added in v0.1.1
func (c *Client) GetVclConfs(offset int, environment APIEnvironment) ([]VCLConfAPIModel, error)
func (*Client) MustGetAPIEnvironmentPath ¶ added in v0.3.0
func (c *Client) MustGetAPIEnvironmentPath(environment APIEnvironment) string
func (*Client) UpdateBackend ¶
func (c *Client) UpdateBackend(backend BackendAPIModel, environment APIEnvironment) (*BackendAPIModel, error)
func (*Client) UpdateCustomCertificate ¶ added in v0.2.0
func (c *Client) UpdateCustomCertificate(cert SSLCustomCertificate) (*SSLCertificate, error)
func (*Client) UpdateDNSCertReq ¶ added in v0.5.0
func (*Client) UpdateDNSCredential ¶ added in v0.5.0
func (c *Client) UpdateDNSCredential(dns_credential NewCRDNSCredential, id int) (*CRDNSCredential, error)
type NewBackendAPIModel ¶
type NewCRDNSCredential ¶ added in v0.5.0
type NewCRDNSCredential struct { Alias string `json:"alias"` Creds []NewCRDNSCreds `json:"creds"` }
type NewCRDNSCreds ¶ added in v0.5.0
type NewVCLConfAPIModel ¶ added in v0.1.2
type NewVCLConfAPIModel struct {
VCLCode string `json:"config_body"`
}
type SSLCertificate ¶ added in v0.1.5
type SSLCertificate struct { ID int `json:"id"` Company int `json:"company"` CommonName string `json:"name"` Domains []string `json:"domains"` Expiration string `json:"expiration"` Autogenerated bool `json:"autogenerated"` Standalone bool `json:"standalone"` DNSChallenge bool `json:"dns_challenge"` PublicKey string `json:"cert"` PrivateKey string `json:"key"` }
Certificates
type SSLCustomCertificate ¶ added in v0.2.0
type SiteAPIModel ¶
type SiteAPIModel struct { ID int `json:"id"` Company int `json:"company"` Url string `json:"url"` Active bool `json:"active"` Ssl bool `json:"ssl"` }
Sites
type SiteNewAPIModel ¶
type SiteNewAPIModel struct {
Url string `json:"url"`
}
type SiteVerifyStringAPIModelRequest ¶
type SiteVerifyStringAPIModelRequest struct {
Domain string `json:"domain"`
}
type SiteVerifyStringAPIModelResponse ¶
type SiteVerifyStringAPIModelResponse struct {
Txt string `json:"txt"`
}
type TokenStruct ¶
type VCLConfAPIModel ¶ added in v0.1.1
type VCLConfAPIModel struct { ID int `json:"id"` Company int `json:"company"` VCLCode string `json:"config_body"` UploadDate string `json:"upload_dt"` ProductionDate string `json:"production_dt"` Validated bool `json:"validated"` Active bool `json:"active"` Deployed bool `json:"deployed"` CreatorUser VCLConfCreator `json:"creator_user"` }
Click to show internal directories.
Click to hide internal directories.