Documentation
¶
Index ¶
- func GRPCServerTLSCreds(config TLSCredsConfig) (credentials.TransportCredentials, error)
- func GatewayAsClientTLSCreds(config TLSCredsConfig) (credentials.TransportCredentials, error)
- func GatewayServerTLSConfig(config TLSCredsConfig) (*tls.Config, error)
- type CertGenConfig
- type Generator
- type TLSCredsConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GRPCServerTLSCreds ¶
func GRPCServerTLSCreds(config TLSCredsConfig) (credentials.TransportCredentials, error)
GRPCServerTLSCreds gets TLS credentials for a GRPC server
func GatewayAsClientTLSCreds ¶
func GatewayAsClientTLSCreds(config TLSCredsConfig) (credentials.TransportCredentials, error)
GatewayAsClientTLSCreds returns transport credentials so an HTTP gateway can connect to the GRPC server
func GatewayServerTLSConfig ¶
func GatewayServerTLSConfig(config TLSCredsConfig) (*tls.Config, error)
GatewayServerTLSConfig returns a TLS config for the gateway server
Types ¶
type CertGenConfig ¶
type CertGenConfig struct { CommonName string CertKeyPath string CertPath string CACertPath string DefaultTLSGenDir string }
CertGenConfig contains details about how cert generation should happen
type Generator ¶
type Generator struct {
// contains filtered or unexported fields
}
Generator generates certs without any external dependencies
func NewGenerator ¶
NewGenerator creates a new cert generator
func (*Generator) MakeDevCert ¶
func (c *Generator) MakeDevCert(genConfig *CertGenConfig) error
MakeDevCert creates a development certificate request and private key. It persists it in the work dir and returns the CSR.
type TLSCredsConfig ¶
type TLSCredsConfig struct { TLSCertPath string `json:"tls_cert_path"` TLSKeyPath string `json:"tls_key_path"` TLSCACertPath string `json:"tls_ca_cert_path"` }
TLSCredsConfig contains paths to certificates
Click to show internal directories.
Click to hide internal directories.