cdnfly

package
v0.3.13 Latest Latest
Warning

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

Go to latest
Published: May 20, 2025 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BaseResponse

type BaseResponse interface {
	GetCode() string
	GetMessage() string
}

type Client

type Client struct {
	// contains filtered or unexported fields
}

func NewClient

func NewClient(apiHost, apiKey, apiSecret string) *Client

func (*Client) CreateCertificate

func (c *Client) CreateCertificate(req *CreateCertificateRequest) (*CreateCertificateResponse, error)

func (*Client) GetSite

func (c *Client) GetSite(req *GetSiteRequest) (*GetSiteResponse, error)

func (*Client) UpdateCertificate

func (c *Client) UpdateCertificate(req *UpdateCertificateRequest) (*UpdateCertificateResponse, error)

func (*Client) UpdateSite

func (c *Client) UpdateSite(req *UpdateSiteRequest) (*UpdateSiteResponse, error)

func (*Client) WithTLSConfig added in v0.3.11

func (c *Client) WithTLSConfig(config *tls.Config) *Client

func (*Client) WithTimeout

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

type CreateCertificateRequest

type CreateCertificateRequest struct {
	Name        string  `json:"name"`
	Description *string `json:"des,omitempty"`
	Type        string  `json:"type"`
	Cert        string  `json:"cert"`
	Key         string  `json:"key"`
}

type CreateCertificateResponse

type CreateCertificateResponse struct {
	Data string `json:"data"`
	// contains filtered or unexported fields
}

func (*CreateCertificateResponse) GetCode

func (r *CreateCertificateResponse) GetCode() string

func (*CreateCertificateResponse) GetMessage

func (r *CreateCertificateResponse) GetMessage() string

type GetSiteRequest

type GetSiteRequest struct {
	Id string `json:"-"`
}

type GetSiteResponse

type GetSiteResponse struct {
	Data *struct {
		Id          int64  `json:"id"`
		Name        string `json:"name"`
		Domain      string `json:"domain"`
		HttpsListen string `json:"https_listen"`
	} `json:"data,omitempty"`
	// contains filtered or unexported fields
}

func (*GetSiteResponse) GetCode

func (r *GetSiteResponse) GetCode() string

func (*GetSiteResponse) GetMessage

func (r *GetSiteResponse) GetMessage() string

type UpdateCertificateRequest

type UpdateCertificateRequest struct {
	Id          string  `json:"-"`
	Name        *string `json:"name,omitempty"`
	Description *string `json:"des,omitempty"`
	Type        *string `json:"type,omitempty"`
	Cert        *string `json:"cert,omitempty"`
	Key         *string `json:"key,omitempty"`
	Enable      *bool   `json:"enable,omitempty"`
}

type UpdateCertificateResponse

type UpdateCertificateResponse struct {
	// contains filtered or unexported fields
}

func (*UpdateCertificateResponse) GetCode

func (r *UpdateCertificateResponse) GetCode() string

func (*UpdateCertificateResponse) GetMessage

func (r *UpdateCertificateResponse) GetMessage() string

type UpdateSiteRequest

type UpdateSiteRequest struct {
	Id          string  `json:"-"`
	HttpsListen *string `json:"https_listen,omitempty"`
	Enable      *bool   `json:"enable,omitempty"`
}

type UpdateSiteResponse

type UpdateSiteResponse struct {
	// contains filtered or unexported fields
}

func (*UpdateSiteResponse) GetCode

func (r *UpdateSiteResponse) GetCode() string

func (*UpdateSiteResponse) GetMessage

func (r *UpdateSiteResponse) GetMessage() string

Jump to

Keyboard shortcuts

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