Documentation ¶
Overview ¶
cert.go - the certificate APIs definition supported by the Cert service
Package cert defines the Cert services of BCE. The supported APIs are all defined in sub-package
Index ¶
- Constants
- type CertInServiceMeta
- type CertificateDetailMeta
- type CertificateMeta
- type Client
- func (c *Client) CreateCert(args *CreateCertArgs) (*CreateCertResult, error)
- func (c *Client) DeleteCert(id string) error
- func (c *Client) GetCertDetail(id string) (*CertificateDetailMeta, error)
- func (c *Client) GetCertMeta(id string) (*CertificateMeta, error)
- func (c *Client) ListCertDetail() (*ListCertDetailResult, error)
- func (c *Client) ListCerts() (*ListCertResult, error)
- func (c *Client) UpdateCertData(id string, args *UpdateCertDataArgs) error
- func (c *Client) UpdateCertName(id string, args *UpdateCertNameArgs) error
- type CreateCertArgs
- type CreateCertResult
- type ListCertDetailResult
- type ListCertResult
- type UpdateCertDataArgs
- type UpdateCertNameArgs
Constants ¶
const ( URI_PREFIX = bce.URI_PREFIX + "v1" DEFAULT_ENDPOINT = "certificate.baidubce.com" REQUEST_CERT_URL = "/certificate" REQUEST_CERT_LIST_DETAIL_URL = "/certificate/detail" REQUEST_DETAIL_URL = "/detail" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CertInServiceMeta ¶ added in v0.9.183
type CertificateDetailMeta ¶ added in v0.9.183
type CertificateDetailMeta struct { CertId string `json:"certId"` CertName string `json:"certName"` CertCommonName string `json:"certCommonName"` CertFingerprint string `json:"certFingerprint"` CertStartTime string `json:"certStartTime"` CertStopTime string `json:"certStopTime"` CertCreateTime string `json:"certCreateTime"` CertUpdateTime string `json:"certUpdateTime"` CertType int `json:"certType"` CertDNSNames string `json:"certDNSNames"` Resources []CertInServiceMeta `json:"resources"` Status string `json:"status"` Expired bool `json:"expired"` }
type CertificateMeta ¶
type CertificateMeta struct { CertId string `json:"certId"` CertName string `json:"certName"` CertCommonName string `json:"certCommonName"` CertFingerprint string `json:"certFingerprint"` CertStartTime string `json:"certStartTime"` CertStopTime string `json:"certStopTime"` CertCreateTime string `json:"certCreateTime"` CertUpdateTime string `json:"certUpdateTime"` CertType int `json:"certType"` }
type Client ¶
Client of Cert service is a kind of BceClient, so derived from BceClient
func (*Client) CreateCert ¶
func (c *Client) CreateCert(args *CreateCertArgs) (*CreateCertResult, error)
CreateCert - create a cert with the specific parameters
PARAMS:
- args: the arguments to create a cert
RETURNS:
- *CreateCertResult: the result of create Cert, contains new Cert's ID
- error: nil if success otherwise the specific error
func (*Client) DeleteCert ¶
DeleteCert - delete a specific cert
PARAMS:
- id: the specific cert's ID
RETURNS:
- error: nil if success otherwise the specific error
func (*Client) GetCertDetail ¶ added in v0.9.183
func (c *Client) GetCertDetail(id string) (*CertificateDetailMeta, error)
GetCertDetail - get a specific cert's meta detail
PARAMS:
- id: the specific cert's ID
RETURNS:
- *CertificateDetailMeta: the specific cert's meta detail
- error: nil if success otherwise the specific error
func (*Client) GetCertMeta ¶
func (c *Client) GetCertMeta(id string) (*CertificateMeta, error)
GetCertMeta - get a specific cert's meta
PARAMS:
- id: the specific cert's ID
RETURNS:
- *CertificateMeta: the specific cert's meta with
- error: nil if success otherwise the specific error
func (*Client) ListCertDetail ¶ added in v0.9.183
func (c *Client) ListCertDetail() (*ListCertDetailResult, error)
ListCertDetail - list all certs detail
RETURNS:
- *ListCertDetailResult: the result of list all certs detail, contains all certs' meta detail
- error: nil if success otherwise the specific error
func (*Client) ListCerts ¶
func (c *Client) ListCerts() (*ListCertResult, error)
ListCerts - list all certs
RETURNS:
- *ListCertResult: the result of list all certs, contains all certs' meta
- error: nil if success otherwise the specific error
func (*Client) UpdateCertData ¶
func (c *Client) UpdateCertData(id string, args *UpdateCertDataArgs) error
UpdateCertData - update a specific cert's data, include update key
PARAMS:
- id: the specific cert's ID
- args: the arguments to update a specific cert
RETURNS:
- error: nil if success otherwise the specific error
func (*Client) UpdateCertName ¶
func (c *Client) UpdateCertName(id string, args *UpdateCertNameArgs) error
UpdateCertName - update a cert's name
PARAMS:
- id: the specific cert's ID
- args: the arguments to update a cert's name
RETURNS:
- error: nil if success otherwise the specific error
type CreateCertArgs ¶
type CreateCertResult ¶
type ListCertDetailResult ¶ added in v0.9.183
type ListCertDetailResult struct {
Certs []CertificateDetailMeta `json:"certs"`
}
type ListCertResult ¶
type ListCertResult struct {
Certs []CertificateMeta `json:"certs"`
}
type UpdateCertDataArgs ¶
type UpdateCertNameArgs ¶
type UpdateCertNameArgs struct {
CertName string `json:"certName"`
}