certificates

package
v0.0.0-...-d823fe1 Latest Latest
Warning

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

Go to latest
Published: Aug 31, 2021 License: Apache-2.0 Imports: 2 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
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

type DeleteResult struct {
	golangsdk.ErrResult
}

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

type ExportResult struct {
	golangsdk.Result
}

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

type GetResult struct {
	golangsdk.Result
}

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

type ImportOptsBuilder interface {
	ToCertificateImportMap() (map[string]interface{}, error)
}

ImportOptsBuilder is the interface options structs have to satisfy in order to be used in the Import operation in this package.

type ImportResult

type ImportResult struct {
	golangsdk.Result
}

func Import

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

func (opts PushOpts) ToCertificatePushMap() (map[string]interface{}, error)

ToCertificatePushMap casts a PushOpts struct to a map.

type PushOptsBuilder

type PushOptsBuilder interface {
	ToCertificatePushMap() (map[string]interface{}, error)
}

PushOptsBuilder is the interface options structs have to satisfy in order to be used in the Push operation in this package.

type PushResult

type PushResult struct {
	golangsdk.ErrResult
}

Part 4: The response from pushing certificate.

func Push

Push the certification of imported to services

Jump to

Keyboard shortcuts

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