cdnfly

package
v0.4.9 Latest Latest
Warning

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

Go to latest
Published: Dec 11, 2025 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

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

func NewClient

func NewClient(serverUrl, apiKey, apiSecret string) (*Client, error)

func (*Client) CreateCert

func (c *Client) CreateCert(req *CreateCertRequest) (*CreateCertResponse, error)

func (*Client) CreateCertWithContext

func (c *Client) CreateCertWithContext(ctx context.Context, req *CreateCertRequest) (*CreateCertResponse, error)

func (*Client) GetSite

func (c *Client) GetSite(siteId string) (*GetSiteResponse, error)

func (*Client) GetSiteWithContext

func (c *Client) GetSiteWithContext(ctx context.Context, siteId string) (*GetSiteResponse, error)

func (*Client) SetTLSConfig

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

func (*Client) SetTimeout

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

func (*Client) UpdateCert

func (c *Client) UpdateCert(certId string, req *UpdateCertRequest) (*UpdateCertResponse, error)

func (*Client) UpdateCertWithContext

func (c *Client) UpdateCertWithContext(ctx context.Context, certId string, req *UpdateCertRequest) (*UpdateCertResponse, error)

func (*Client) UpdateSite

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

func (*Client) UpdateSiteWithContext

func (c *Client) UpdateSiteWithContext(ctx context.Context, siteId string, req *UpdateSiteRequest) (*UpdateSiteResponse, error)

type CreateCertRequest

type CreateCertRequest struct {
	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"`
}

type CreateCertResponse

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

func (*CreateCertResponse) GetCode

func (r *CreateCertResponse) GetCode() string

func (*CreateCertResponse) GetMessage

func (r *CreateCertResponse) GetMessage() string

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 UpdateCertRequest

type UpdateCertRequest struct {
	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 UpdateCertResponse

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

func (*UpdateCertResponse) GetCode

func (r *UpdateCertResponse) GetCode() string

func (*UpdateCertResponse) GetMessage

func (r *UpdateCertResponse) GetMessage() string

type UpdateSiteRequest

type UpdateSiteRequest struct {
	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