aliyunwaf

package
v0.4.21 Latest Latest
Warning

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

Go to latest
Published: Apr 8, 2026 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// 服务类型:云产品接入。
	SERVICE_TYPE_CLOUDRESOURCE = "cloudresource"
	// 服务类型:CNAME 接入。
	SERVICE_TYPE_CNAME = "cname"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Deployer

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

func NewDeployer

func NewDeployer(config *DeployerConfig) (*Deployer, error)

func (*Deployer) Deploy

func (d *Deployer) Deploy(ctx context.Context, certPEM, privkeyPEM string) (*deployer.DeployResult, error)

func (*Deployer) SetLogger

func (d *Deployer) SetLogger(logger *slog.Logger)

type DeployerConfig

type DeployerConfig struct {
	// 阿里云 AccessKeyId。
	AccessKeyId string `json:"accessKeyId"`
	// 阿里云 AccessKeySecret。
	AccessKeySecret string `json:"accessKeySecret"`
	// 阿里云资源组 ID。
	ResourceGroupId string `json:"resourceGroupId,omitempty"`
	// 阿里云地域。
	Region string `json:"region"`
	// 服务版本。
	// 可取值 "3.0"。
	ServiceVersion string `json:"serviceVersion"`
	// 服务类型。
	ServiceType string `json:"serviceType"`
	// WAF 实例 ID。
	InstanceId string `json:"instanceId"`
	// 云产品类型。
	// 服务类型为 [SERVICE_TYPE_CLOUDRESOURCE] 时必填。
	ResourceProduct string `json:"resourceProduct,omitempty"`
	// 云产品资源 ID。
	// 服务类型为 [SERVICE_TYPE_CLOUDRESOURCE] 时必填。
	ResourceId string `json:"resourceId,omitempty"`
	// 云产品资源端口。
	// 服务类型为 [SERVICE_TYPE_CLOUDRESOURCE] 时必填。
	ResourcePort int32 `json:"resourcePort,omitempty"`
	// 扩展域名(支持泛域名)。
	Domain string `json:"domain,omitempty"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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