cloud

package
v3.18.4+incompatible Latest Latest
Warning

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

Go to latest
Published: Mar 26, 2019 License: Apache-2.0 Imports: 16 Imported by: 9

Documentation

Index

Constants

View Source
const (
	EQ    Operator = "EQ"
	FIND           = "FIND"
	GT             = "GT"
	GTE            = "GTE"
	IN             = "IN"
	LT             = "LT"
	LTE            = "LTE"
	MATCH          = "MATCH"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Certificate

type Certificate struct {
	Id                   string   `json:"id"`
	ManagedCertificateId string   `json:"managedCertificateId"`
	CertificateRequestId string   `json:"certificateRequestId"`
	SubjectCN            []string `json:"subjectCN"`
}

type CertificateSearchResponse

type CertificateSearchResponse struct {
	Count        int           `json:"count"`
	Certificates []Certificate `json:"certificates"`
}

func ParseCertificateSearchResponse

func ParseCertificateSearchResponse(httpStatusCode int, body []byte) (searchResult *CertificateSearchResponse, err error)

type CertificateStatusErrorInformation

type CertificateStatusErrorInformation struct {
	Type    string   `json:"type,omitempty"`
	Code    int      `json:"code,omitempty"`
	Message string   `json:"message,omitempty"`
	Args    []string `json:"args,omitempty"`
}

type Connector

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

Connector contains the base data needed to communicate with the Venafi Cloud servers

func NewConnector

func NewConnector(verbose bool, trust *x509.CertPool) *Connector

NewConnector creates a new Venafi Cloud Connector object used to communicate with Venafi Cloud

func (*Connector) Authenticate

func (c *Connector) Authenticate(auth *endpoint.Authentication) (err error)

Authenticate authenticates the user with Venafi Cloud using the provided API Key

func (*Connector) GenerateRequest

func (c *Connector) GenerateRequest(config *endpoint.ZoneConfiguration, req *certificate.Request) (err error)

GenerateRequest generates a CertificateRequest based on the zone configuration, and returns the request along with the private key.

func (*Connector) GetType

func (c *Connector) GetType() endpoint.ConnectorType

func (*Connector) ImportCertificate

func (c *Connector) ImportCertificate(req *certificate.ImportRequest) (*certificate.ImportResponse, error)

func (*Connector) Ping

func (c *Connector) Ping() (err error)

Ping attempts to connect to the Venafi Cloud API and returns an errror if it cannot

func (*Connector) ReadPolicyConfiguration

func (c *Connector) ReadPolicyConfiguration(zone string) (policy *endpoint.Policy, err error)

func (*Connector) ReadZoneConfiguration

func (c *Connector) ReadZoneConfiguration(zone string) (config *endpoint.ZoneConfiguration, err error)

ReadZoneConfiguration reads the Zone information needed for generating and requesting a certificate from Venafi Cloud

func (*Connector) Register

func (c *Connector) Register(email string) (err error)

Register registers a new user with Venafi Cloud

func (*Connector) RenewCertificate

func (c *Connector) RenewCertificate(renewReq *certificate.RenewalRequest) (requestID string, err error)

RenewCertificate attempts to renew the certificate

func (*Connector) RequestCertificate

func (c *Connector) RequestCertificate(req *certificate.Request, zone string) (requestID string, err error)

RequestCertificate submits the CSR to the Venafi Cloud API for processing

func (*Connector) RetrieveCertificate

func (c *Connector) RetrieveCertificate(req *certificate.Request) (certificates *certificate.PEMCollection, err error)

RetrieveCertificate retrieves the certificate for the specified ID

func (*Connector) RevokeCertificate

func (c *Connector) RevokeCertificate(revReq *certificate.RevocationRequest) (err error)

RevokeCertificate attempts to revoke the certificate

func (*Connector) SetBaseURL

func (c *Connector) SetBaseURL(url string) error

SetBaseURL allows overriding the default URL used to communicate with Venafi Cloud

func (*Connector) SetZone

func (c *Connector) SetZone(z string)

type Expression

type Expression struct {
	Operands []Operand `json:"operands,omitempty"`
}

type Field

type Field string

type Operand

type Operand struct {
	Field    Field       `json:"field"`
	Operator Operator    `json:"operator"`
	Value    interface{} `json:"value"`
}

type Operator

type Operator string

type Paging

type Paging struct {
	PageNumber int `json:"pageNumber"`
	PageSize   int `json:"pageSize"`
}

type SearchRequest

type SearchRequest struct {
	Expression *Expression  `json:"expression"`
	Ordering   *interface{} `json:"ordering,omitempty"`
	Paging     *Paging      `json:"paging,omitempty"`
}

Jump to

Keyboard shortcuts

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