Documentation ¶
Index ¶
- type Certificate
- func (c *Certificate) CreatePool() error
- func (c *Certificate) GenerateClientCert() error
- func (c *Certificate) GenerateServerCert() error
- func (c *Certificate) GetClientCredentials() credentials.TransportCredentials
- func (c *Certificate) GetServerCredentials() credentials.TransportCredentials
- func (c *Certificate) IsEmpty() bool
- func (c *Certificate) Validate() error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Certificate ¶
type Certificate struct {
// contains filtered or unexported fields
}
Certificate is a manager for a certificate. Is it intended to be used as a client OR server but not both at the same time.
func NewCertificate ¶
func NewCertificate(caCertFile, certFile, keyFile string) (*Certificate, error)
NewCertificate generates a client agnostic certificate manager
func NewClientCertificate ¶
func NewClientCertificate(caCertFile, certFile, keyFile string) (*Certificate, error)
NewClientCertificate generates a new client certificate
func NewServerCertificate ¶
func NewServerCertificate(caCertFile, certFile, keyFile string) (*Certificate, error)
NewCertificate generates a new certificate holder
func (*Certificate) CreatePool ¶
func (c *Certificate) CreatePool() error
func (*Certificate) GenerateClientCert ¶
func (c *Certificate) GenerateClientCert() error
GenerateClientCert generates the client certificate
func (*Certificate) GenerateServerCert ¶
func (c *Certificate) GenerateServerCert() error
GenerateServerCert generates the server certificate
func (*Certificate) GetClientCredentials ¶
func (c *Certificate) GetClientCredentials() credentials.TransportCredentials
GenerateClientCert generates the client tls certificate
func (*Certificate) GetServerCredentials ¶
func (c *Certificate) GetServerCredentials() credentials.TransportCredentials
GetCredentials for the server
func (*Certificate) IsEmpty ¶
func (c *Certificate) IsEmpty() bool
IsEmpty determines if the certificate is empty
func (*Certificate) Validate ¶
func (c *Certificate) Validate() error
Validate all fields are defined
Click to show internal directories.
Click to hide internal directories.