dname

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: Sep 28, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

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) Clone added in v0.3.0

func (c *Config) Clone() *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
y or Y : Canonical URL