cas

package
v0.9.206 Latest Latest
Warning

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

Go to latest
Published: Dec 9, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	UriPrefix = "/v3/openapi"
)

Variables

View Source
var (
	OrderTypes = map[string]string{
		"NEW":          "新购",
		"NEW_INTERNAL": "内部用户新购",
		"RENEW":        "续费",
		"BIG_RESOURCE": "大客户",
	}

	CertFileTypes = map[string]string{
		"PEM":         "PEM",
		"PEM_APACHE":  "PEM_APACHE",
		"PEM_NGINX":   "PEM_NGINX",
		"PEM_HAPROXY": "PEM_HAPROXY",
		"JKS_TOMCAT":  "JKS_TOMCAT",
		"JKS":         "JKS",
		"PKCS12":      "PKCS12",
	}
)

Functions

This section is empty.

Types

type ApplyCertReq

type ApplyCertReq struct {
	Company         string   `json:"company,omitempty"`
	Address         string   `json:"address,omitempty"`
	PostalCode      string   `json:"postalCode,omitempty"`
	Region          Region   `json:"region,omitempty"`
	Password        string   `json:"password,omitempty"`
	Algorithm       string   `json:"algorithm,omitempty"`
	Strength        string   `json:"strength,omitempty"`
	Crs             string   `json:"csr,omitempty"`
	Domain          string   `json:"domain,omitempty"`
	VerifyMode      string   `json:"verifyMode,omitempty"`
	MultiDomain     []string `json:"multiDomain,omitempty"`
	Department      string   `json:"department,omitempty"`
	CompanyPhone    string   `json:"companyPhone,omitempty"`
	OrderGivenName  string   `json:"orderGivenName,omitempty"`
	OrderFamilyName string   `json:"orderFamilyName,omitempty"`
	OrderPosition   string   `json:"orderPosition,omitempty"`
	OrderEmail      string   `json:"orderEmail,omitempty"`
	OrderPhone      string   `json:"orderPhone,omitempty"`
	TechGivenName   string   `json:"techGivenName,omitempty"`
	TechFamilyName  string   `json:"techFamilyName,omitempty"`
	TechPosition    string   `json:"techPosition,omitempty"`
	TechEmail       string   `json:"techEmail,omitempty"`
	TechPhone       string   `json:"techPhone,omitempty"`
}

type CertContactResp

type CertContactResp struct {
	Company       string `json:"company,omitempty"`
	Address       string `json:"address,omitempty"`
	PostalCode    string `json:"postalCode,omitempty"`
	Region        Region `json:"region,omitempty"`
	Department    string `json:"department,omitempty"`
	CompanyPhone  string `json:"companyPhone,omitempty"`
	OrderName     string `json:"orderName,omitempty"`
	OrderPosition string `json:"orderPosition,omitempty"`
	OrderEmail    string `json:"orderEmail,omitempty"`
	OrderPhone    string `json:"orderPhone,omitempty"`
	TechName      string `json:"techName,omitempty"`
	TechPosition  string `json:"techPosition,omitempty"`
	TechEmail     string `json:"techEmail,omitempty"`
	TechPhone     string `json:"techPhone,omitempty"`
}

type CertDetailResp

type CertDetailResp struct {
	ProductName       string   `json:"productName,omitempty"`
	CertType          string   `json:"certType,omitempty"`
	ProductType       string   `json:"productType,omitempty"`
	ApplyTime         string   `json:"applyTime,omitempty"`
	DownloadSupported bool     `json:"downloadSupported,omitempty"`
	BindDomains       []string `json:"bindDomains,omitempty"`
	Duration          int      `json:"duration,omitempty"`
	FromBaidu         bool     `json:"fromBaidu,omitempty"`
	ProductId         string   `json:"productId,omitempty"`
	Brand             string   `json:"brand,omitempty"`
	DomainNumber      int      `json:"domainNumber,omitempty"`
	WildcardNumber    int      `json:"wildcardNumber,omitempty"`
	ProcessStatus     string   `json:"processStatus,omitempty"`
	DomainName        string   `json:"domainName,omitempty"`
}

type ChangeCertUserReq

type ChangeCertUserReq struct {
	Params []string `json:"params,omitempty"`
}

type CheckFreeSslResp

type CheckFreeSslResp struct {
	FreeCount        int  `json:"freeCount,omitempty"`
	EnablePurchaseDV bool `json:"enablePurchaseDV,omitempty"`
}

type Client

type Client struct {
	*bce.BceClient
}

Client of CAS service is a kind of BceClient, so derived from BceClient

func NewClient

func NewClient(ak, sk, endPoint string) (*Client, error)

func (*Client) ApplyCert

func (c *Client) ApplyCert(req *ApplyCertReq, certId string) error

ApplyCert apply certificate

func (*Client) CancelCertApplication

func (c *Client) CancelCertApplication(certId string) error

CancelCertApplication cancel ssl application

func (*Client) ChangeCertUser

func (c *Client) ChangeCertUser(req *ChangeCertUserReq, newUserId string) error

ChangeCertUser change certificate user

func (*Client) CheckFreeSsl

func (c *Client) CheckFreeSsl() (*CheckFreeSslResp, error)

CheckFreeSsl check user free ssl quota

func (*Client) CreateNewOrder

func (c *Client) CreateNewOrder(req *CreateNewOrderReq) (*CreateNewOrderResp, error)

CreateNewOrder create new ssl order

func (*Client) DeleteCertApplication

func (c *Client) DeleteCertApplication(certId string) error

DeleteCertApplication cancel ssl application, Used to delete failed or expired certificates and release free DV certificate quotas.

func (*Client) DownloadCert

func (c *Client) DownloadCert(body *DownloadCertReq, certId string) (io.ReadCloser, error)

DownloadCert download certificate, Used to download certificates that have been successfully issued. Do not support downloading reissued certificates

func (*Client) DownloadLetterTemplate

func (c *Client) DownloadLetterTemplate(certId string) (io.ReadCloser, error)

DownloadLetterTemplate Provide the function of downloading confirmation letter templates for certificates that require submission of confirmation letters

func (*Client) GetCertContact

func (c *Client) GetCertContact(certId string) (*CertContactResp, error)

GetCertContact get certificate contact

func (*Client) GetCertDetail

func (c *Client) GetCertDetail(certId string) (*CertDetailResp, error)

GetCertDetail get certificate detail

func (*Client) GetCertPki

func (c *Client) GetCertPki(certId string) (*PkiResp, error)

GetCertPki get PKI

func (*Client) GetSslList

func (c *Client) GetSslList(req *GetSslListReq) (*QuerySslListResp, error)

GetSslList get user ssl list

func (*Client) QuerySslPrice

func (c *Client) QuerySslPrice(req *QuerySslPriceReq) (*QuerySslPriceResp, error)

QuerySslPrice query ssl price

func (*Client) UploadLetter

func (c *Client) UploadLetter(body *bce.Body, certId string) error

UploadLetter upload confirmation letter

type CreateNewOrderReq

type CreateNewOrderReq struct {
	AutoApply      bool   `json:"autoApply,omitempty"`
	CertType       string `json:"certType,omitempty"`
	ProductType    string `json:"productType,omitempty"`
	Brand          string `json:"brand,omitempty"`
	DomainNumber   int    `json:"domainNumber,omitempty"`
	WildcardNumber int    `json:"wildcardNumber,omitempty"`
	PurchaseLength int    `json:"purchaseLength,omitempty"`
	OrderType      string `json:"orderType,omitempty"`
}

type CreateNewOrderResp

type CreateNewOrderResp struct {
	BceOrderId string   `json:"bceOrderId,omitempty"`
	CertIds    []string `json:"certIds,omitempty"`
}

type DownloadCertReq

type DownloadCertReq struct {
	Format        string `json:"format,omitempty"`
	OrderPassword string `json:"orderPassword,omitempty"`
	FilePassword  string `json:"filePassword,omitempty"`
}

type GetSslListReq

type GetSslListReq struct {
	PageNo   int    `json:"pageNo,omitempty"`
	PageSize int    `json:"pageSize,omitempty"`
	Brand    string `json:"brand,omitempty"`
	CertType string `json:"certType,omitempty"`
	Status   string `json:"status,omitempty"`
}

type PkiResp

type PkiResp struct {
	Company    string `json:"company,omitempty"`
	Address    string `json:"address,omitempty"`
	Region     Region `json:"region,omitempty"`
	Algorithm  string `json:"algorithm,omitempty"`
	Strength   string `json:"strength,omitempty"`
	CsrPem     string `json:"csrPem,omitempty"`
	CertPem    string `json:"certPem,omitempty"`
	CertCaPem  string `json:"certCaPem,omitempty"`
	ExpireTime string `json:"expireTime,omitempty"`
	DomainName string `json:"domainName,omitempty"`
	Department string `json:"department,omitempty"`
	StartTime  string `json:"startTime,omitempty"`
}

type ProductIdReq

type ProductIdReq struct {
	ProductId string `json:"productId,omitempty"`
}

type QuerySslList

type QuerySslList struct {
	CertType       string `json:"certType,omitempty"`
	ProductType    string `json:"productType,omitempty"`
	ExpireTime     string `json:"expireTime,omitempty"`
	CreateTime     string `json:"createTime,omitempty"`
	Duration       int    `json:"duration,omitempty"`
	ProductId      string `json:"productId,omitempty"`
	Brand          string `json:"brand,omitempty"`
	DomainNumber   int    `json:"domainNumber,omitempty"`
	WildcardNumber int    `json:"wildcardNumber,omitempty"`
	Status         string `json:"status,omitempty"`
	DomainName     string `json:"domainName,omitempty"`
}

type QuerySslListResp

type QuerySslListResp struct {
	TotalCount int            `json:"totalCount,omitempty"`
	Result     []QuerySslList `json:"result,omitempty"`
}

type QuerySslPriceReq

type QuerySslPriceReq struct {
	CertType       string `json:"certType,omitempty"`
	ProductType    string `json:"productType,omitempty"`
	OrderType      string `json:"orderType,omitempty"`
	Brand          string `json:"brand,omitempty"`
	DomainNumber   int    `json:"domainNumber,omitempty"`
	WildcardNumber int    `json:"wildcardNumber,omitempty"`
	PurchaseLength int    `json:"purchaseLength,omitempty"`
}

type QuerySslPriceResp

type QuerySslPriceResp struct {
	Price string `json:"price"`
}

type Region

type Region struct {
	Province string `json:"province,omitempty"`
	City     string `json:"city,omitempty"`
	Country  string `json:"country,omitempty"`
}

Jump to

Keyboard shortcuts

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