certificate

package
v0.8.2 Latest Latest
Warning

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

Go to latest
Published: Jul 10, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Certificate

type Certificate struct {
	// contains filtered or unexported fields
}

func New

func New(config config.Config) *Certificate

New returns an instance of the Certificate API client

func (*Certificate) CreateCertificate

func (g *Certificate) CreateCertificate(req CreateCertificateRequest) (response CreateCertificateResponse, err error)

CreateCertificate creates a certificate

func (*Certificate) DeleteCertificate

func (g *Certificate) DeleteCertificate(certificateId string) (response ErrorResponse, err error)

DeleteCertificate revokes a certificate

func (*Certificate) GetCertificate

func (g *Certificate) GetCertificate(certificateId string) (certificate CertificateType, err error)

GetCertificate request details of an issued certificates

func (*Certificate) GetCertificateData

func (g *Certificate) GetCertificateData(certificateId string) (data []byte, err error)

GetCertificateData requests certificate data for the specified ID.

func (*Certificate) GetIntermediateCertificate

func (g *Certificate) GetIntermediateCertificate(typ string) (data []byte, err error)

GetIntermediateCertificate requests intermediate certificate for the specified type, which can be one of "cert_std", "cert_free", "cert_bus", "cert_pro".

func (*Certificate) ListCertificates

func (g *Certificate) ListCertificates() (certificates []CertificateType, err error)

ListCertificates requests the list of issued certificates

func (*Certificate) ListPackages

func (g *Certificate) ListPackages() (packages []Package, err error)

ListPackages lists certificate package types

type CertificateContact

type CertificateContact struct {
	City       string `json:"city,omitempty"`
	Country    string `json:"country,omitempty"`
	Email      string `json:"email,omitempty"`
	Family     string `json:"family,omitempty"`
	Given      string `json:"given,omitempty"`
	OrgName    string `json:"orgname,omitempty"`
	State      string `json:"state,omitempty"`
	StreetAddr string `json:"street_addr,omitempty"`
	Zip        string `json:"zip,omitempty"`
}

type CertificateDates

type CertificateDates struct {
	CreatedAt         *time.Time `json:"created_at,omitempty"`
	EndsAt            *time.Time `json:"ends_at,omitempty"`
	StartedAt         *time.Time `json:"started_at,omitempty"`
	SubcriptionEndsAt *time.Time `json:"subscription_ends_at,omitempty"`
	UpdatedAt         *time.Time `json:"updated_at,omitempty"`
}

type CertificateType

type CertificateType struct {
	ID              string              `json:"id"`
	CN              string              `json:"cn"`
	CNUnicode       string              `json:"cn_unicode"`
	AltNames        []string            `json:"altnames"`
	AltNamesUnicode []string            `json:"altnames_unicode"`
	Contact         *CertificateContact `json:"contact"`
	Dates           *CertificateDates   `json:"dates"`
	Package         *Package            `json:"package"`
	Software        int                 `json:"software"`
	Status          string              `json:"status"`
}

type CreateCertificateRequest

type CreateCertificateRequest struct {
	CN      string `json:"cn"`
	Package string `json:"package"`
}

type CreateCertificateResponse

type CreateCertificateResponse struct {
	Href    string `json:"href"`
	ID      string `json:"id"`
	Message string `json:"message"`
}

type ErrorResponse

type ErrorResponse struct {
	Cause   string `json:"cause,omitempty"`
	Code    int    `json:"code,omitempty"`
	Message string `json:"message,omitempty"`
	Object  string `json:"object,omitempty"`
}

type Package

type Package struct {
	Name       string `json:"name"`
	NameLabel  string `json:"name_label"`
	Href       string `json:"href"`
	MaxDomains int    `json:"max_domains"`
	Type       string `json:"type"`
	TypeLabel  string `json:"type_label"`
	Wildcard   bool   `json:"wildcard"`
}

Jump to

Keyboard shortcuts

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