Documentation
¶
Index ¶
- Constants
- func GetPathFromCertHref(certHref string) (string, error)
- type APIError
- type CAResponse
- type CAsResponse
- type CSRResponse
- type CSRStatusResponse
- type CertificateDownloadResponse
- type Client
- func (c *Client) CheckCSRStatus(path string) (*CSRStatusResponse, error)
- func (c *Client) DownloadCertificate(path string) (*CertificateDownloadResponse, error)
- func (c *Client) DownloadCertificateInPEM(path string) ([]byte, error)
- func (c *Client) GetCA(path string) (*CAResponse, error)
- func (c *Client) GetCAs() (*CAsResponse, error)
- func (c *Client) RenewCertificate(path string, duration *metav1.Duration, profileID string) (*RenewCertificateResponse, error)
- func (c *Client) SendCSR(pem []byte, CA *CAResponse, duration *metav1.Duration, profileID string) (*CSRResponse, error)
- func (c *Client) StartHealthChecker(interval time.Duration)
- func (c *Client) StopHealthChecker()
- type ClientError
- type ExternalClient
- type RenewCertificateResponse
- type ServerURL
Constants ¶
View Source
const ( CAsPath = "/v1/cas" CSRPath = "/v1/requests" )
Variables ¶
This section is empty.
Functions ¶
func GetPathFromCertHref ¶
Types ¶
type APIError ¶
type CAResponse ¶
type CAsResponse ¶
type CAsResponse struct { TotalCount int `json:"totalCount"` Href string `json:"href"` CAList []CAResponse `json:"cas"` }
type CSRResponse ¶
type CSRStatusResponse ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client is a client used to communicate with the NCM API.
func (*Client) CheckCSRStatus ¶
func (c *Client) CheckCSRStatus(path string) (*CSRStatusResponse, error)
func (*Client) DownloadCertificate ¶
func (c *Client) DownloadCertificate(path string) (*CertificateDownloadResponse, error)
func (*Client) DownloadCertificateInPEM ¶
func (*Client) GetCAs ¶
func (c *Client) GetCAs() (*CAsResponse, error)
func (*Client) RenewCertificate ¶
func (*Client) SendCSR ¶
func (c *Client) SendCSR(pem []byte, CA *CAResponse, duration *metav1.Duration, profileID string) (*CSRResponse, error)
func (*Client) StartHealthChecker ¶
func (*Client) StopHealthChecker ¶
func (c *Client) StopHealthChecker()
type ClientError ¶
func (*ClientError) Error ¶
func (c *ClientError) Error() string
type ExternalClient ¶
type ExternalClient interface { GetCAs() (*CAsResponse, error) GetCA(path string) (*CAResponse, error) SendCSR(pem []byte, CA *CAResponse, duration *metav1.Duration, profileID string) (*CSRResponse, error) CheckCSRStatus(path string) (*CSRStatusResponse, error) DownloadCertificate(path string) (*CertificateDownloadResponse, error) DownloadCertificateInPEM(path string) ([]byte, error) RenewCertificate(path string, duration *metav1.Duration, profileID string) (*RenewCertificateResponse, error) StartHealthChecker(interval time.Duration) StopHealthChecker() }
Click to show internal directories.
Click to hide internal directories.