Documentation ¶
Index ¶
- func Delete[T any](ctx context.Context, c *Client, path string, payload interface{}) (*T, *http.Response, error)
- func DeleteWithoutJSONResponse(ctx context.Context, c *Client, path string) (*http.Response, error)
- func Get[T any](ctx context.Context, c *Client, path string) (*T, *http.Response, error)
- func GetWithoutJSONResponse(ctx context.Context, c *Client, path string) (*http.Response, error)
- func Post[T any](ctx context.Context, c *Client, path string, payload interface{}) (*T, *http.Response, error)
- func PostWithoutJSONResponse(ctx context.Context, c *Client, path string, payload interface{}) (*http.Response, error)
- func PutWithoutJSONResponse(ctx context.Context, c *Client, path string, payload interface{}) (*http.Response, error)
- type ACMEService
- func (c *ACMEService) AddDomains(request acme.AddOrRemoveDomainsRequest, id int) (*acme.AddDomainsResponse, error)
- func (c *ACMEService) CreateAccount(request acme.CreateACMERequest) (*int, error)
- func (c *ACMEService) DeleteAccount(id int) error
- func (c *ACMEService) DeleteDomains(request acme.AddOrRemoveDomainsRequest, id int) (*acme.RemoveDomainsResponse, error)
- func (c *ACMEService) Details(id int) (*acme.ListACMEItem, error)
- func (c *ACMEService) List(request acme.ListRequest) (*[]acme.ListACMEItem, error)
- func (c *ACMEService) ListServers() (*[]acme.ListACMEServerItem, error)
- type Client
- type ClientService
- func (c *ClientService) Collect(orderNumber int, format string) (*string, error)
- func (c *ClientService) Enroll(req client.EnrollmentRequest) (*client.EnrollmentResponse, error)
- func (c *ClientService) List(q *client.ListClientRequest) (*[]client.ListItem, error)
- func (c *ClientService) ListByEmail(email string) (*[]client.ListItem, error)
- func (c *ClientService) Profiles() (*[]client.ListProfileItem, error)
- func (c *ClientService) RevokeByEmail(req client.RevokeByEmailRequest) error
- func (c *ClientService) RevokeBySerial(req client.RevokeBySerialRequest) error
- type DomainService
- type DomainValidationService
- func (c *DomainValidationService) Clear(domain string) (*dcv.ClearResponse, error)
- func (c *DomainValidationService) List(q *dcv.ListDcvRequest) (*[]dcv.ListItem, int, error)
- func (c *DomainValidationService) StartCNAME(domain string) (*dcv.StartCNAMEResponse, error)
- func (c *DomainValidationService) Status(domain string) (*dcv.StatusResponse, error)
- func (c *DomainValidationService) SubmitCNAME(domain string) (*dcv.SubmitCNAMEResponse, error)
- type ErrorResponse
- type OrganizationService
- type PersonService
- type Response
- type RevokeRequest
- type SSLService
- func (c *SSLService) Collect(sslID int, format string) (*string, error)
- func (c *SSLService) Details(id int) (*ssl.Details, error)
- func (c *SSLService) Enroll(req ssl.EnrollmentRequest) (*ssl.EnrollmentResponse, error)
- func (c *SSLService) List(q *ssl.ListSSLRequest) (*[]ssl.ListItem, int, error)
- func (c *SSLService) Profiles() (*[]ssl.ListProfileItem, error)
- func (c *SSLService) Revoke(serial, reason string) error
- func (c *SSLService) RevokeBySslID(sslid, reason string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Delete ¶
func Delete[T any](ctx context.Context, c *Client, path string, payload interface{}) (*T, *http.Response, error)
Delete executes a DELETE-Request and deserializes the returned JSON information using the provided type.
func DeleteWithoutJSONResponse ¶
DeleteWithoutJSONResponse executes a DELETE-Request without expecting a JSON response. Custom handling of the response can be done using the returned http.Response.
func Get ¶
Get executes a GET-Requests and deserializes the returned JSON information using the provided type.
func GetWithoutJSONResponse ¶
GetWithoutJSONResponse executes a GET-Request without expecting a JSON response. Custom handling of the response can be done using the returned http.Response.
func Post ¶
func Post[T any](ctx context.Context, c *Client, path string, payload interface{}) (*T, *http.Response, error)
Post executes a POST-Requests and deserializes the returned JSON information using the provided type.
func PostWithoutJSONResponse ¶
func PostWithoutJSONResponse(ctx context.Context, c *Client, path string, payload interface{}) (*http.Response, error)
PostWithoutJSONResponse executes a POST-Request without expecting a JSON response. Custom handling of the response can be done using the returned http.Response.
func PutWithoutJSONResponse ¶
func PutWithoutJSONResponse(ctx context.Context, c *Client, path string, payload interface{}) (*http.Response, error)
DeleteWithoutJSONResponse executes a DELETE-Request without expecting a JSON response. Custom handling of the response can be done using the returned http.Response.
Types ¶
type ACMEService ¶
type ACMEService struct {
Client *Client
}
ACMEService provides some methods handling sectigo ACME actions.
func (*ACMEService) AddDomains ¶
func (c *ACMEService) AddDomains(request acme.AddOrRemoveDomainsRequest, id int) (*acme.AddDomainsResponse, error)
AddDomains adds new domains to an existing acme account.
func (*ACMEService) CreateAccount ¶
func (c *ACMEService) CreateAccount(request acme.CreateACMERequest) (*int, error)
CreateAccount creates a new ACME account
func (*ACMEService) DeleteAccount ¶
func (c *ACMEService) DeleteAccount(id int) error
DeleteAccount deletes domains from an existing acme account.
func (*ACMEService) DeleteDomains ¶
func (c *ACMEService) DeleteDomains(request acme.AddOrRemoveDomainsRequest, id int) (*acme.RemoveDomainsResponse, error)
DeleteDomains deletes domains from an existing acme account.
func (*ACMEService) Details ¶
func (c *ACMEService) Details(id int) (*acme.ListACMEItem, error)
Details gets the information for a single acme accounts.
func (*ACMEService) List ¶
func (c *ACMEService) List(request acme.ListRequest) (*[]acme.ListACMEItem, error)
List enumerates all acme accounts.
func (*ACMEService) ListServers ¶
func (c *ACMEService) ListServers() (*[]acme.ListACMEServerItem, error)
ListServers enumerates all acme accounts.
type Client ¶
type Client struct { // BaseURL for API requests. BaseURL string ClientService *ClientService DomainService *DomainService AcmeService *ACMEService DomainValidationService *DomainValidationService SslService *SSLService PersonService *PersonService OrganizationService *OrganizationService // contains filtered or unexported fields }
Client is the main wrapper around the different sectigo services.
type ClientService ¶
type ClientService struct {
Client *Client
}
ClientService provides some methods handling sectigo client certificate actions.
func (*ClientService) Collect ¶
func (c *ClientService) Collect(orderNumber int, format string) (*string, error)
Collect downloads the certificate for the given ordernumber and format. Possible formats are:
- 'x509' for Certificate (w/ chain), PEM encoded - 'x509CO' for Certificate only, PEM encoded - 'base64' for PKCS#7, PEM encoded - 'bin' for PKCS#7 - 'x509IO' for Root/Intermediate(s) only, PEM encoded - 'x509IOR' for Intermediate(s)/Root only, PEM encoded - 'pem' for Certificate (w/ chain), PEM encoded - 'pemco' for Certificate only, PEM encoded - 'pemia' for Certificate (w/ issuer after), PEM encoded - 'pkcs12' for Certificate and Private key, PKCS#12
Depending on configuration at sectigo some options could be unavailable (e.g. pkcs12 requires access to the private key).
func (*ClientService) Enroll ¶
func (c *ClientService) Enroll(req client.EnrollmentRequest) (*client.EnrollmentResponse, error)
Enroll submits an CSR to the server.
func (*ClientService) List ¶
func (c *ClientService) List(q *client.ListClientRequest) (*[]client.ListItem, error)
List enumerates all existing certificates.
func (*ClientService) ListByEmail ¶
func (c *ClientService) ListByEmail(email string) (*[]client.ListItem, error)
ListByEmail enumerates all existing certificates owned by one user.
func (*ClientService) Profiles ¶
func (c *ClientService) Profiles() (*[]client.ListProfileItem, error)
Profiles enumerates all client certificate profiles.
func (*ClientService) RevokeByEmail ¶
func (c *ClientService) RevokeByEmail(req client.RevokeByEmailRequest) error
RevokeByEmail revokes all certificates associated with an email.
func (*ClientService) RevokeBySerial ¶
func (c *ClientService) RevokeBySerial(req client.RevokeBySerialRequest) error
RevokeBySerial revokes the certificate with the matching serial.
type DomainService ¶
type DomainService struct {
Client *Client
}
DomainService provides some methods handling sectigo domain actions.
func (*DomainService) CreateDomain ¶
func (c *DomainService) CreateDomain(request domain.CreateRequest) error
CreateDomain creates a new domain.
type DomainValidationService ¶
type DomainValidationService struct {
Client *Client
}
DomainValidationService provides some methods handling sectigo domain validation actions.
func (*DomainValidationService) Clear ¶
func (c *DomainValidationService) Clear(domain string) (*dcv.ClearResponse, error)
Clear resets the status of the DCV request.
func (*DomainValidationService) List ¶
func (c *DomainValidationService) List(q *dcv.ListDcvRequest) (*[]dcv.ListItem, int, error)
List enumerates all domain validation requests.
func (*DomainValidationService) StartCNAME ¶
func (c *DomainValidationService) StartCNAME(domain string) (*dcv.StartCNAMEResponse, error)
StartCNAME starts the validation using the CNAME method.
func (*DomainValidationService) Status ¶
func (c *DomainValidationService) Status(domain string) (*dcv.StatusResponse, error)
Status queries the status of a single domain.
func (*DomainValidationService) SubmitCNAME ¶
func (c *DomainValidationService) SubmitCNAME(domain string) (*dcv.SubmitCNAMEResponse, error)
SubmitCNAME submits the completion of the validation using the CNAME method.
type ErrorResponse ¶
type ErrorResponse struct { Response // human-readable message. Code int `json:"code,omitempty"` Description string `json:"description,omitempty"` }
ErrorResponse provides the error information returned by sectigo.
func (*ErrorResponse) Error ¶
func (r *ErrorResponse) Error() string
Error implements the error interface.
type OrganizationService ¶
type OrganizationService struct {
Client *Client
}
OrganizationService provides some methods handling sectigo organization actions.
type PersonService ¶
type PersonService struct {
Client *Client
}
PersonService provides some methods handling sectigo person actions.
func (*PersonService) CreatePerson ¶
func (c *PersonService) CreatePerson(q person.CreateRequest) error
CreatePerson creates a new person using the provided information.
func (*PersonService) DeletePerson ¶
func (c *PersonService) DeletePerson(id int) error
DeletePerson deletes a person using the provided id.
func (*PersonService) List ¶
func (c *PersonService) List(q *person.ListParams) (*[]person.ListItem, error)
List enumerates all persons using the provided (optional) filters.
func (*PersonService) UpdatePerson ¶
func (c *PersonService) UpdatePerson(id int, q person.UpdateRequest) error
UpdatePerson updates a person using the provided id and information.
type RevokeRequest ¶
type RevokeRequest struct {
Reason string `json:"reason"`
}
RevokeRequest represents the information on a certificate revocation.
type SSLService ¶
type SSLService struct {
Client *Client
}
SSLService provides some methods handling sectigo ssl certificate actions.
func (*SSLService) Collect ¶
func (c *SSLService) Collect(sslID int, format string) (*string, error)
Collect downloads the certificate for the given sslId and format.
Possible formats are: 'x509' - for Certificate (w/ chain), PEM encoded, 'x509CO' - for Certificate only, PEM encoded, 'base64' - for PKCS#7, PEM encoded, 'bin' - for PKCS#7 'x509IO' - for Root/Intermediate(s) only, PEM encoded, 'x509IOR' - for Intermediate(s)/Root only, PEM encoded, 'pem' - for Certificate (w/ chain), PEM encoded, 'pemco' - for Certificate only, PEM encoded, 'pemia' - for Certificate (w/ issuer after), PEM encoded, 'x509' - for Certificate (w/ chain), PEM encoded, 'pkcs12' - for Certificate and Private key, PKCS#12
Depending on configuration at sectigo some options could be unavailable (e.g. pkcs12 requires access to the private key).
func (*SSLService) Details ¶
func (c *SSLService) Details(id int) (*ssl.Details, error)
Details queries details on a single certificate using the (internal) sectigo ID.
func (*SSLService) Enroll ¶
func (c *SSLService) Enroll(req ssl.EnrollmentRequest) (*ssl.EnrollmentResponse, error)
Enroll submits an CSR to the server.
func (*SSLService) List ¶
func (c *SSLService) List(q *ssl.ListSSLRequest) (*[]ssl.ListItem, int, error)
List enumerates all ssl certificates.
func (*SSLService) Profiles ¶
func (c *SSLService) Profiles() (*[]ssl.ListProfileItem, error)
Profiles enumerates all ssl certificate profiles.
func (*SSLService) Revoke ¶
func (c *SSLService) Revoke(serial, reason string) error
Revoke revokes a single certificate by the serial and the reason.
func (*SSLService) RevokeBySslID ¶
func (c *SSLService) RevokeBySslID(sslid, reason string) error
RevokeBySslID revokes a single certificate by the sslid and the reason.