btwaf

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 string) (*Client, error)

func (*Client) ConfigSetCert

func (c *Client) ConfigSetCert(req *ConfigSetCertRequest) (*ConfigSetCertResponse, error)

func (*Client) ConfigSetCertWithContext

func (c *Client) ConfigSetCertWithContext(ctx context.Context, req *ConfigSetCertRequest) (*ConfigSetCertResponse, error)

func (*Client) GetSiteList

func (c *Client) GetSiteList(req *GetSiteListRequest) (*GetSiteListResponse, error)

func (*Client) GetSiteListWithContext

func (c *Client) GetSiteListWithContext(ctx context.Context, req *GetSiteListRequest) (*GetSiteListResponse, error)

func (*Client) ModifySite

func (c *Client) ModifySite(req *ModifySiteRequest) (*ModifySiteResponse, error)

func (*Client) ModifySiteWithContext

func (c *Client) ModifySiteWithContext(ctx context.Context, req *ModifySiteRequest) (*ModifySiteResponse, error)

func (*Client) SetTLSConfig

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

func (*Client) SetTimeout

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

type ConfigSetCertRequest

type ConfigSetCertRequest struct {
	CertContent *string `json:"certContent,omitempty"`
	KeyContent  *string `json:"keyContent,omitempty"`
}

type ConfigSetCertResponse

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

func (*ConfigSetCertResponse) GetCode

func (r *ConfigSetCertResponse) GetCode() int32

type GetSiteListRequest

type GetSiteListRequest struct {
	SiteName *string `json:"site_name,omitempty"`
	Page     *int32  `json:"p,omitempty"`
	PageSize *int32  `json:"p_size,omitempty"`
}

type GetSiteListResponse

type GetSiteListResponse struct {
	Result *struct {
		List  []*SiteRecord `json:"list"`
		Total int32         `json:"total"`
	} `json:"res,omitempty"`
	// contains filtered or unexported fields
}

func (*GetSiteListResponse) GetCode

func (r *GetSiteListResponse) GetCode() int32

type ModifySiteRequest

type ModifySiteRequest struct {
	SiteId *string            `json:"site_id,omitempty"`
	Type   *string            `json:"types,omitempty"`
	Server *SiteServerInfoMod `json:"server,omitempty"`
}

type ModifySiteResponse

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

func (*ModifySiteResponse) GetCode

func (r *ModifySiteResponse) GetCode() int32

type SiteRecord

type SiteRecord struct {
	SiteId      string   `json:"site_id"`
	SiteName    string   `json:"site_name"`
	Type        string   `json:"types"`
	Status      int32    `json:"status"`
	ServerNames []string `json:"server_name"`
	CreateTime  int64    `json:"create_time"`
	UpdateTime  int64    `json:"update_time"`
}

type SiteServerInfoMod added in v0.3.27

type SiteServerInfoMod struct {
	ListenSSLPorts *[]string          `json:"listen_ssl_port,omitempty"`
	SSL            *SiteServerSSLInfo `json:"ssl,omitempty"`
}

type SiteServerSSLInfo

type SiteServerSSLInfo struct {
	IsSSL      *int32  `json:"is_ssl,omitempty"`
	FullChain  *string `json:"full_chain,omitempty"`
	PrivateKey *string `json:"private_key,omitempty"`
}

Jump to

Keyboard shortcuts

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