baiduyun

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Nov 23, 2024 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const (
	BAIDUYUN_ACCESSKEY = "BAIDUYUN_ACCESSKEY"
	BAIDUYUN_SECRETKEY = "BAIDUYUN_SECRETKEY"
	BAIDUYUN_REGION    = "BAIDUYUN_REGION"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type BaiduYun

type BaiduYun struct {
	AccessKey  string
	SecretKey  string
	CertClient *cert.Client
	// contains filtered or unexported fields
}

func NewBaiduYun

func NewBaiduYun(accessKey, secretKey string) (*BaiduYun, error)

func NewBaiduYunFromEnv

func NewBaiduYunFromEnv() (b *BaiduYun, err error)

func (*BaiduYun) AddCdn

func (b *BaiduYun) AddCdn(domain string, baidu *config.Baidu) error

func (*BaiduYun) AddCert

func (b *BaiduYun) AddCert(privateKey string, certificate string) (*cert.CreateCertResult, error)

func (*BaiduYun) CdnList

func (b *BaiduYun) CdnList() ([]string, error)

func (*BaiduYun) CheckDomainInList

func (b *BaiduYun) CheckDomainInList(domain string) (bool, error)

CheckDomainInList 判断域名是否在Cdn中

func (*BaiduYun) DeleteCert

func (b *BaiduYun) DeleteCert(certId string) error

func (*BaiduYun) GetCdnHttpsConfig

func (b *BaiduYun) GetCdnHttpsConfig(domain string) (*api.HTTPSConfig, error)

func (*BaiduYun) GetCertList

func (b *BaiduYun) GetCertList() (*cert.ListCertResult, error)

func (*BaiduYun) GetCertListDetail

func (b *BaiduYun) GetCertListDetail() (*cert.ListCertDetailResult, error)

GetCertListDetail 证书列表详情

func (*BaiduYun) IsValidCdn

func (b *BaiduYun) IsValidCdn(domain string) (bool, error)

func (*BaiduYun) SetIPv6 added in v1.0.2

func (b *BaiduYun) SetIPv6(domain string, enable bool) error

func (*BaiduYun) SetSNI added in v1.0.2

func (b *BaiduYun) SetSNI(domain string) error

func (*BaiduYun) UpdateCdn added in v1.0.2

func (b *BaiduYun) UpdateCdn(domain string, baidu *config.Baidu) error

func (*BaiduYun) UpdateCdnHTTPSCert

func (b *BaiduYun) UpdateCdnHTTPSCert(domain string, certId string, http2 bool) error

type Response

type Response struct {
	TotalCount int                      `json:"totalCount"`
	Result     []map[string]interface{} `json:"result"`
}

type SNI added in v1.0.2

type SNI struct {
	Enabled bool   `json:"enabled,omitempty"`
	Domain  string `json:"domain,omitempty"`
}

Jump to

Keyboard shortcuts

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