types

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Mar 31, 2025 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewCertificate

func NewCertificate() *certificate

NewCertificate creates a new instance of a certificate object.

func NewCertificateAuthority

func NewCertificateAuthority(caKey *key) *certificateAuthority

NewCertificateAuthority generates a new certificate authority object given a key.

func NewKey

func NewKey() *key

NewKey creates a new instance of a key object.

Types

type CertificateInput

type CertificateInput struct {
	Force                      bool
	KubernetesServiceName      string
	KubernetesServiceNamespace string

	KeyBits   int
	ValidDays int

	CommonName              string
	Organization            string
	Country                 string
	State                   string
	City                    string
	SubjectAlternativeNames []string

	CertificateFilePath string
	KeyFilePath         string
}

CertificateInput represents the input needed to work with certificate objects.

func (*CertificateInput) SetCertificateFields added in v0.1.0

func (input *CertificateInput) SetCertificateFields(cert *x509.Certificate)

SetCertificateFields sets x509 certificate object fields from a CertificateInput object.

type KeyBits

type KeyBits int
const (
	Bits2048 KeyBits = 2048
	Bits4096 KeyBits = 4096
)

func ValidKeyBits

func ValidKeyBits() []KeyBits

ValidKeyBits is a maintained list of valid key bits.

func (KeyBits) IsValid

func (bits KeyBits) IsValid() bool

IsValid determines if a KeyBits is valid.

Jump to

Keyboard shortcuts

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