qiniu

package
v0.0.0-...-68c81e1 Latest Latest
Warning

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

Go to latest
Published: Aug 7, 2024 License: LGPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const APIHost = "http://api.qiniu.com"

Variables

This section is empty.

Functions

This section is empty.

Types

type Cert

type Cert struct {
	Name       string `json:"name"`
	CommonName string `json:"common_name"`
	CA         string `json:"ca"`
	Pri        string `json:"pri"`
}

type CertInfo

type CertInfo struct {
	CodeErr
	Cert struct {
		CertID           string    `json:"certid"`
		Name             string    `json:"name"`
		UID              int       `json:"uid"`
		CommonName       string    `json:"common_name"`
		DNSNames         []string  `json:"dnsnames"`
		CreateTime       TimeStamp `json:"create_time"`
		NotBefore        TimeStamp `json:"not_before"`
		NotAfter         TimeStamp `json:"not_after"`
		OrderID          string    `json:"orderid"`
		ProductShortName string    `json:"product_short_name"`
		ProductType      string    `json:"product_type"`
		Encrypt          string    `json:"encrypt"`
		EncryptParameter string    `json:"encryptParameter"`
		Enable           bool      `json:"enable"`
		Ca               string    `json:"ca"`
		Pri              string    `json:"pri"`
	} `json:"cert"`
}

type Client

type Client struct {
	*qbox.Mac
}

func New

func New(accessKey, secretKey string) *Client

func (*Client) DeleteCert

func (c *Client) DeleteCert(certID string) (*CodeErr, error)

func (*Client) DomainSSLize

func (c *Client) DomainSSLize(domain, certID string) (*CodeErr, error)

func (*Client) GetCertInfo

func (c *Client) GetCertInfo(certID string) (*CertInfo, error)

func (*Client) GetDomainInfo

func (c *Client) GetDomainInfo(domain string) (*DomainInfo, error)

func (*Client) Request

func (c *Client) Request(method string, path string, body interface{}) (resData []byte,
	err error)

func (*Client) UpdateHttpsConf

func (c *Client) UpdateHttpsConf(domain, certID string) (*CodeErr, error)

func (*Client) UploadCert

func (c *Client) UploadCert(cert Cert) (*UploadCertResp, error)

type CodeErr

type CodeErr struct {
	Code  int    `json:"code"`
	Error string `json:"error"`
}

type DomainInfo

type DomainInfo struct {
	CodeErr
	Name               string    `json:"name"`
	PareDomain         string    `json:"pareDomain"`
	Type               string    `json:"type"`
	Cname              string    `json:"cname"`
	TestURLPath        string    `json:"testURLPath"`
	Protocol           string    `json:"protocol"`
	Platform           string    `json:"platform"`
	GeoCover           string    `json:"geoCover"`
	QiniuPrivate       bool      `json:"qiniuPrivate"`
	OperationType      string    `json:"operationType"`
	OperatingState     string    `json:"operatingState"`
	OperatingStateDesc string    `json:"operatingStateDesc"`
	CreateAt           time.Time `json:"createAt"`
	ModifyAt           time.Time `json:"modifyAt"`
	HTTPS              struct {
		CertID     string `json:"certId"`
		ForceHTTPS bool   `json:"forceHttps"`
	} `json:"https"`
	CouldOperateBySelf bool   `json:"couldOperateBySelf"`
	RegisterNo         string `json:"registerNo"`
}

type HTTPSConf

type HTTPSConf struct {
	CertID     string `json:"certid"`
	ForceHttps bool   `json:"forceHttps"`
}

type TimeStamp

type TimeStamp struct {
	time.Time
}

func (*TimeStamp) UnmarshalJSON

func (t *TimeStamp) UnmarshalJSON(b []byte) error

type UploadCertResp

type UploadCertResp struct {
	CodeErr
	CertID string `json:"certID"`
}

Jump to

Keyboard shortcuts

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