generator

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Apr 3, 2022 License: MIT Imports: 27 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ReadCert

func ReadCert(certFile, certType string) (*[]byte, error)

Types

type Cert

type Cert struct {
	Host struct {
		Dns   []string `yaml:"dns"`
		Ip    []string `yaml:"ip"`
		Email []string `yaml:"email"`
		Uri   []string `yaml:"uri"`
	} `yaml:"host"`
	Valid struct {
		From string        `yaml:"from"`
		For  time.Duration `yaml:"for"`
	} `yaml:"valid"`
	Is struct {
		CA           bool `yaml:"ca"`
		Intermediate bool `yaml:"intermediate"`
		Client       bool `yaml:"client"`
	} `yaml:"is"`
	Encryption struct {
		RsaBits    int    `yaml:"rsa-bits"`
		EcdsaCurve string `yaml:"ecdsa-curve"`
		Ed25519Key bool   `yaml:"ed-25519-key"`
	} `yaml:"encryption"`
	Csr string `yaml:"csr"`
	Ca  struct {
		Cert string `yaml:"cert"`
		Key  string `yaml:"key"`
	} `yaml:"ca"`
	Parent struct {
		Cert string `yaml:"cert"`
		Key  string `yaml:"key"`
	} `yaml:"parent"`
	Subject struct {
		CommonName         string   `yaml:"common-name"`
		Organization       []string `yaml:"organization"`
		OrganizationalUnit []string `yaml:"org-unit"`
		Country            []string `yaml:"country"`
		State              []string `yaml:"state"`
		City               []string `yaml:"city"`
		Address            []string `yaml:"address"`
		Zip                []string `yaml:"zip"`
		Email              string   `yaml:"email"`
	} `yaml:"subject"`
	Output string `yaml:"output"`
	// contains filtered or unexported fields
}

type Generator

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

func New

func New(certFile string) (*Generator, error)

func (*Generator) Generate

func (cg *Generator) Generate(ctx context.Context) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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