Version: v0.2.3 Latest Latest

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

Go to latest
Published: Nov 6, 2020 License: Apache-2.0 Imports: 8 Imported by: 0




This section is empty.


This section is empty.


This section is empty.


type Config

type Config struct {
	CommonName         string `yaml:"commonName" flags:"common-name,set cert subject CommonName,cn"`
	Organization       string `yaml:"organization" flags:"organization,set cert subject Organization,org"`
	OrganizationalUnit string `yaml:"organizationalUnit" flags:"organizational-unit,set cert subject OrganizationalUnit,ou"`

	Country       string `yaml:"country" flags:"country,set cert subject Country,c"`
	Locality      string `yaml:"locality" flags:"locality,set cert subject Locality"`
	Province      string `yaml:"province" flags:"province,set cert subject Province"`
	StreetAddress string `yaml:"streetAddress" flags:"street-address,set cert subject StreetAddress"`
	PostalCode    string `yaml:"postalCode" flags:"postal-code,set cert subject PostalCode"`

func DefaultConfig

func DefaultConfig(cnsuffix string, basecfg *Config) *Config

func FromGeoip added in v0.1.0

func FromGeoip(geo *ipapi.Result) *Config

func FromPkixName

func FromPkixName(n pkix.Name) *Config

func FromProtoStruct

func FromProtoStruct(s *pb.DistinguishedName) *Config

func (*Config) CompatibleWith added in v0.1.0

func (a *Config) CompatibleWith(b *Config) error

func (*Config) IsEmpty added in v0.1.0

func (cfg *Config) IsEmpty() bool

func (*Config) ToPkixName

func (cfg *Config) ToPkixName() (n pkix.Name)

func (*Config) ToProtoStruct

func (c *Config) ToProtoStruct() *pb.DistinguishedName

func (*Config) Verify

func (cfg *Config) Verify() error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL