Documentation
¶
Overview ¶
A simple SDK client for AxisNow. API documentation: https://developers.axisnow.io/api-reference/main/client/v1/#/
Index ¶
- type AddCertificateRequest
- type AddCertificateResponse
- type Certificate
- type CertificateIssuer
- type CertificateSubject
- type Client
- func (c *Client) AddCertificate(req *AddCertificateRequest) (*AddCertificateResponse, error)
- func (c *Client) AddCertificateWithContext(ctx context.Context, req *AddCertificateRequest) (*AddCertificateResponse, error)
- func (c *Client) ListCertificates(req *ListCertificatesRequest) (*ListCertificatesResponse, error)
- func (c *Client) ListCertificatesWithContext(ctx context.Context, req *ListCertificatesRequest) (*ListCertificatesResponse, error)
- func (c *Client) SetTimeout(timeout time.Duration) *Client
- type ListCertificatesRequest
- type ListCertificatesResponse
- type Options
- type OptionsFunc
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AddCertificateRequest ¶
type AddCertificateResponse ¶
type AddCertificateResponse struct {
Result *Certificate `json:"result,omitempty"`
// contains filtered or unexported fields
}
func (*AddCertificateResponse) GetAPIError ¶
func (r *AddCertificateResponse) GetAPIError() error
func (*AddCertificateResponse) GetSuccess ¶
func (r *AddCertificateResponse) GetSuccess() bool
type Certificate ¶
type Certificate struct {
UUID string `json:"uuid,omitempty"`
Name string `json:"name,omitempty"`
Type string `json:"type,omitempty"`
SubjectName []string `json:"subject_name,omitempty"`
Issuer CertificateIssuer `json:"issuer,omitempty"`
Subject CertificateSubject `json:"subject,omitempty"`
IssueTime int64 `json:"issue_time,omitempty"`
ExpireTime int64 `json:"expire_time,omitempty"`
Certificate string `json:"certificate,omitempty"`
ReferencedCount int `json:"referenced_count,omitempty"`
CreatedAt string `json:"created_at,omitempty"`
UpdatedAt string `json:"updated_at,omitempty"`
}
type CertificateIssuer ¶
type CertificateSubject ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func NewClient ¶
func NewClient(optFns ...OptionsFunc) (*Client, error)
func (*Client) AddCertificate ¶
func (c *Client) AddCertificate(req *AddCertificateRequest) (*AddCertificateResponse, error)
func (*Client) AddCertificateWithContext ¶
func (c *Client) AddCertificateWithContext(ctx context.Context, req *AddCertificateRequest) (*AddCertificateResponse, error)
func (*Client) ListCertificates ¶
func (c *Client) ListCertificates(req *ListCertificatesRequest) (*ListCertificatesResponse, error)
func (*Client) ListCertificatesWithContext ¶
func (c *Client) ListCertificatesWithContext(ctx context.Context, req *ListCertificatesRequest) (*ListCertificatesResponse, error)
type ListCertificatesRequest ¶
type ListCertificatesResponse ¶
type ListCertificatesResponse struct {
ResultInfo *struct {
Page int `json:"page"`
PerPage int `json:"per_page"`
Count int `json:"count"`
TotalCount int `json:"total_count"`
SubscribedTotal int `json:"subscribed_total"`
} `json:"result_info,omitempty"`
Results []*Certificate `json:"result,omitempty"`
// contains filtered or unexported fields
}
func (*ListCertificatesResponse) GetAPIError ¶
func (r *ListCertificatesResponse) GetAPIError() error
func (*ListCertificatesResponse) GetSuccess ¶
func (r *ListCertificatesResponse) GetSuccess() bool
type OptionsFunc ¶
type OptionsFunc func(*Options)
func WithApiToken ¶
func WithApiToken(apiToken string) OptionsFunc
Click to show internal directories.
Click to hide internal directories.