tls

package
v1.1.1 Latest Latest
Warning

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

Go to latest
Published: Nov 25, 2021 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CertificateFileName = "edge-orchestration.crt"
	KeyFileName         = "edge-orchestration.key"
)

File names of certificate and private key

Variables

This section is empty.

Functions

func GetCertFilePath

func GetCertFilePath() string

GetCertFilePath gets a certificate file path

func GetIdentity

func GetIdentity() string

GetIdentity gets identity

func GetKey

func GetKey(id string) ([]byte, error)

GetKey gets key using id

func SetCertFilePath

func SetCertFilePath(path string)

SetCertFilePath stores a certificate file path

func SetHandler added in v1.1.0

func SetHandler(h Handler)

SetHandler sets handler

Types

type CertificateSetter

type CertificateSetter interface {
	SetCertificateFilePath(path string)
}

CertificateSetter interface provides setting the certificate file path

type Handler added in v1.1.0

type Handler interface {
	GetIdentity() string
	GetKey(identity string) ([]byte, error)
}

Handler provides interfaces for the tls

type HasCertificate

type HasCertificate struct {
	IsSetCert bool
}

HasCertificate indicates presence of the certificate

func (*HasCertificate) GetCertificateFilePath

func (h *HasCertificate) GetCertificateFilePath() string

GetCertificateFilePath gets a certificate via handler

func (*HasCertificate) SetCertificateFilePath

func (h *HasCertificate) SetCertificateFilePath(path string)

SetCertificateFilePath stores a certificate via handler

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL