lib

package
v1.1.12 Latest Latest
Warning

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

Go to latest
Published: Jun 12, 2021 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CertificateCreate

func CertificateCreate(
	logger *logos.Logger,
	kvClient *keyvault.BaseClient,
	vaultURL string,
	timeout time.Duration,
	certName string,
	cfgCertCreateParams CfgCertificateCreateParameters,
	flagCertCreateParams FlagCertificateCreateParameters,
	newVersionOk bool,
	skipConfirmation bool,
) error

func CertificateList

func CertificateList(logger *logos.Logger, kvClient *keyvault.BaseClient, vaultURL string, timeout time.Duration) error

func CertificateNewVersion

func CertificateNewVersion(
	logger *logos.Logger,
	kvClient *keyvault.BaseClient,
	vaultURL string,
	certName string,
	timeout time.Duration,
	skipConfirmation bool,
) error

func LogAutorestRequest

func LogAutorestRequest(logger *logos.Logger) autorest.PrepareDecorator

func LogAutorestResponse

func LogAutorestResponse(logger *logos.Logger) autorest.RespondDecorator

func OverwriteKVCertCreateParamsWithCreateFlags

func OverwriteKVCertCreateParamsWithCreateFlags(
	ccp *keyvault.CertificateCreateParameters,
	flagCertCreateParams FlagCertificateCreateParameters)

func ParseTags

func ParseTags(flagTags []string) (map[string]*string, error)

func PrepareKV

func PrepareKV(logger *logos.Logger) (*keyvault.BaseClient, error)

Types

type CfgCertificateCreateParameters

type CfgCertificateCreateParameters struct {
	CertificateAttributes struct {
		Enabled bool `yaml:"enabled"`
	} `yaml:"certificate_attributes"`
	CertificatePolicy struct {
		KeyProperties struct {
			Exportable bool   `yaml:"exportable"`
			KeyType    string `yaml:"key_type"`
			KeySize    int32  `yaml:"key_size"`
			ReuseKey   bool   `yaml:"reuse_key"`
		} `yaml:"key_properties"`
		SecretProperties struct {
			ContentType string `yaml:"content_type"`
		} `yaml:"secret_properties"`
		X509CertificateProperties struct {
			Subject                 string   `yaml:"subject"`
			SubjectAlternativeNames []string `yaml:"subject_alternative_names"`
			ValidityInMonths        int32    `yaml:"validity_in_months"`
		} `yaml:"x509_certificate_properties"`
		LifetimeActions []struct {
			Trigger struct {
				LifetimePercentage *int32 `yaml:"lifetime_percentage"`
				DaysBeforeExpiry   *int32 `yaml:"days_before_expiry"`
			} `yaml:"trigger"`
			Action string `yaml:"action"`
		} `yaml:"lifetime_actions"`
		IssuerParameters struct {
			Name string `yaml:"name"`
		} `yaml:"issuer_parameters"`
	} `yaml:"certificate_policy"`
	Tags map[string]string `yaml:"tags"`
}

type FlagCertificateCreateParameters

type FlagCertificateCreateParameters struct {
	Subject          string
	Sans             []string
	Tags             map[string]*string
	ValidityInMonths int32
	Enabled          bool
	IssuerName       string
}

Jump to

Keyboard shortcuts

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