Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ID ¶
type ID struct { IdentityConfig // contains filtered or unexported fields }
func (*ID) Cert ¶
func (id *ID) Cert() *tls.Certificate
func (*ID) ClientTLSConfig ¶
func (*ID) ServerCert ¶
func (id *ID) ServerCert() *tls.Certificate
func (*ID) ServerTLSConfig ¶
type Identity ¶
type Identity interface { Cert() *tls.Certificate ServerCert() *tls.Certificate CA() *x509.CertPool ServerTLSConfig() *tls.Config ClientTLSConfig() *tls.Config }
func LoadIdentity ¶
func LoadIdentity(cfg IdentityConfig) (Identity, error)
type IdentityConfig ¶
type IdentityConfig struct { Key string `json:"key" yaml:"key" mapstructure:"key"` Cert string `json:"cert" yaml:"cert" mapstructure:"cert"` ServerCert string `json:"server_cert,omitempty" yaml:"server_cert,omitempty" mapstructure:"server_cert,omitempty"` ServerKey string `json:"server_key,omitempty" yaml:"server_key,omitempty" mapstructure:"server_key,omitempty"` CA string `json:"ca,omitempty" yaml:"ca,omitempty" mapstructure:"ca"` }
type TokenId ¶
func LoadClientIdentity ¶
func LoadServerIdentity ¶
func NewIdentity ¶
func (*TokenId) ClientTLSConfig ¶
func (*TokenId) ServerTLSConfig ¶
func (*TokenId) ShallowCloneWithNewToken ¶
Click to show internal directories.
Click to hide internal directories.