Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var RequestOpts golangsdk.RequestOpts = golangsdk.RequestOpts{ MoreHeaders: map[string]string{"Content-Type": "application/json", "X-Language": "en-us"}, }
Functions ¶
This section is empty.
Types ¶
type Authentification ¶
type Authentification struct {
RecordName string `json:"record_name"`
RecordType string `json:"record_type"`
RecordValue string `json:"record_value"`
Domain string `json:"domain"`
}
Part 2: The response from query escrowed certificate.
This struct defines the authentication information of the domain. API that will be used to Obtain Certificate Information
type CertificateDetail ¶
type CertificateDetail struct {
Certificate string `json:"certificate" required:"true"`
CertificateChain string `json:"certificate_chain" required:"true"`
PrivateKey string `json:"private_key" required:"true"`
}
-- Part 3: -- The response from exported certificate.
The struct defines the detail information about the imported certificate.
type CertificateEscrowInfo ¶
type CertificateEscrowInfo struct {
Id string `json:"id"`
Status string `json:"status"`
OrderId string `json:"order_id"`
Name string `json:"name"`
CertificateType string `json:"type"`
Brand string `json:"brand"`
PushSupport string `json:"push_support"`
RevokeReason string `json:"revoke_reason"`
SignatureAlgrithm string `json:"signature_algrithm"`
IssueTime string `json:"issue_time"`
NotBefore string `json:"not_before"`
NotAfter string `json:"not_after"`
ValidityPeriod int `json:"validity_period,omitempty"`
ValidationMethod string `json:"validation_method"`
DomainType string `json:"domain_type"`
Domain string `json:"domain"`
Sans string `json:"sans"`
DomainCount int `json:"domain_count,omitempty"`
WildcardCount int `json:"wildcard_count,omitempty"`
Authentifications []Authentification `json:"authentification,omitempty"`
}
The struct defines the detail information about the escrow certificate information.
type CertificateImportInfo ¶
type CertificateImportInfo struct {
CertificateId string `json:"certificate_id"`
}
Part 1: The response of the import operation.
The struct defines the information about the imported certificate.
type DeleteResult ¶
Part 5: The response from deleting certificate.
func Delete ¶
func Delete(c *golangsdk.ServiceClient, id string) (r DeleteResult)
Delete the imported certificate based on its unique ID.
type ExportResult ¶
func Export ¶
func Export(c *golangsdk.ServiceClient, id string) (r ExportResult)
Get the certification key、private key and certification chain by id.
func (ExportResult) Extract ¶
func (r ExportResult) Extract() (*CertificateDetail, error)
type GetResult ¶
func Get ¶
func Get(c *golangsdk.ServiceClient, id string) (r GetResult)
Obtain information about the imported certificate by ID. Contain no certificate key or private key.
func (GetResult) Extract ¶
func (r GetResult) Extract() (*CertificateEscrowInfo, error)
type ImportOpts ¶
type ImportOpts struct {
Name string `json:"name,omitempty" required:"true"`
Certificate string `json:"certificate" required:"true"`
CertificateChain string `json:"certificate_chain" required:"true"`
PrivateKey string `json:"private_key" required:"true"`
}
ImportOpts is the struct be used in the Import operation
func (ImportOpts) ToCertificateImportMap ¶
func (opts ImportOpts) ToCertificateImportMap() (map[string]interface{}, error)
ToCertificateImportMap casts a CreateOpts struct to a map.
type ImportOptsBuilder ¶
ImportOptsBuilder is the interface options structs have to satisfy in order to be used in the Import operation in this package.
type ImportResult ¶
func Import ¶
func Import(c *golangsdk.ServiceClient, opts ImportOptsBuilder) (r ImportResult)
Import the certification into Huawei Cloud
func (ImportResult) Extract ¶
func (r ImportResult) Extract() (*CertificateImportInfo, error)
type PushOpts ¶
type PushOpts struct {
TargetProject string `json:"target_project"`
TargetService string `json:"target_service" required:"true"`
}
PushOpts is the struct be used in the Import operation
func (PushOpts) ToCertificatePushMap ¶
ToCertificatePushMap casts a PushOpts struct to a map.
type PushOptsBuilder ¶
PushOptsBuilder is the interface options structs have to satisfy in order to be used in the Push operation in this package.
type PushResult ¶
Part 4: The response from pushing certificate.
func Push ¶
func Push(c *golangsdk.ServiceClient, id string, opts PushOptsBuilder) (r PushResult)
Push the certification of imported to services