Documentation ¶
Index ¶
- func WithAPIEndpoint(apiEndpoint string) func(*client)
- func WithDownloadEndpoint(downloadEndpoint string) func(*client)
- func WithForm(form string) func(*client)
- func WithHTTPClient(hClient http.Client) func(*client)
- func WithToken(token string) func(*client)
- type Client
- type DownloadCertificateResponse
- type PostCertificateResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func WithAPIEndpoint ¶
func WithAPIEndpoint(apiEndpoint string) func(*client)
WithAPIEndpoint returns a client with the API Endpoint field populated.
func WithDownloadEndpoint ¶
func WithDownloadEndpoint(downloadEndpoint string) func(*client)
WithDownloadEndpoint returns a client with the Download Endpoint field populated.
func WithForm ¶
func WithForm(form string) func(*client)
WithForm returns a client with the Form field populated.
func WithHTTPClient ¶
WithHTTPClient returns a client with the API Endpoint field populated.
Types ¶
type Client ¶
type Client interface { // PostCertificate sends a POST request to cert to create a new certificate and returns the GUID. PostCertificate(ctx context.Context, log logr.Logger, csrBytes []byte) (string, error) // DownloadCertificate downloads a certificate from the Cert API. DownloadCertificate(ctx context.Context, log logr.Logger, guid string) (DownloadCertificateResponse, error) }
Client is the interface to interact with Cert API service.
type DownloadCertificateResponse ¶
type DownloadCertificateResponse struct {
Data string `json:"data"`
}
DownloadCertificateResponse represents the response received when downloading a certificate.
type PostCertificateResponse ¶
type PostCertificateResponse struct {
Guid string `json:"taskId"`
}
PostCertificateResponse represents the structure of the JSON response body for obtaining a certificate.
Click to show internal directories.
Click to hide internal directories.