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 CertificateMeta
- type Client
- func (c *Client) CreateCert(args *CreateCertArgs) (*CreateCertResult, error)
- func (c *Client) DeleteCert(id string) error
- func (c *Client) GetCertMeta(id string) (*CertificateMeta, 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 ListCertResult
- type UpdateCertDataArgs
- type UpdateCertNameArgs
Constants ¶
View Source
const ( URI_PREFIX = bce.URI_PREFIX + "v1" DEFAULT_ENDPOINT = "certificate.baidubce.com" REQUEST_CERT_URL = "/certificate" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
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) 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) 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 ListCertResult ¶
type ListCertResult struct {
Certs []CertificateMeta `json:"certs"`
}
type UpdateCertDataArgs ¶
type UpdateCertNameArgs ¶
type UpdateCertNameArgs struct {
CertName string `json:"certName"`
}
Click to show internal directories.
Click to hide internal directories.