axisnow

package
v0.4.32 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 31, 2026 License: MIT Imports: 9 Imported by: 0

Documentation

Overview

A simple SDK client for AxisNow. API documentation: https://developers.axisnow.io/api-reference/main/client/v1/#/

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AddCertificateRequest

type AddCertificateRequest struct {
	Name        *string `json:"name,omitempty"`
	Type        *string `json:"type,omitempty"`
	Certificate *string `json:"certificate,omitempty"`
	PrivateKey  *string `json:"private_key,omitempty"`
}

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 CertificateIssuer struct {
	Country          string `json:"country,omitempty"`
	Organization     string `json:"organization,omitempty"`
	OrganizationUnit string `json:"organization_unit,omitempty"`
	CommonName       string `json:"common_name,omitempty"`
}

type CertificateSubject

type CertificateSubject struct {
	Organization     string `json:"organization,omitempty"`
	OrganizationUnit string `json:"organization_unit,omitempty"`
	CommonName       string `json:"common_name,omitempty"`
}

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)

func (*Client) SetTimeout

func (c *Client) SetTimeout(timeout time.Duration) *Client

type ListCertificatesRequest

type ListCertificatesRequest struct {
	Filter  *string `json:"filter,omitempty"   url:"filter,omitempty"`
	Page    *int    `json:"page,omitempty"     url:"page,omitempty"`
	PerPage *int    `json:"per_page,omitempty" url:"per_page,omitempty"`
}

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 Options

type Options struct {
	ApiToken string
}

type OptionsFunc

type OptionsFunc func(*Options)

func WithApiToken

func WithApiToken(apiToken string) OptionsFunc

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL