cert

package
v0.0.0-...-9ffa3d9 Latest Latest
Warning

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

Go to latest
Published: Aug 29, 2022 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AzureKeyVaultSource

type AzureKeyVaultSource struct {
	// contains filtered or unexported fields
}

func NewAzureKeyVaultSource

func NewAzureKeyVaultSource(
	client azure.KeyVaultClient, certificateName string,
) (AzureKeyVaultSource, error)

func (AzureKeyVaultSource) Get

func (source AzureKeyVaultSource) Get(ctx context.Context) (
	*x509.Certificate, error,
)

type FileType

type FileType int

ENUM(pem, der)

const (
	// FileTypePem is a FileType of type Pem.
	FileTypePem FileType = iota
	// FileTypeDer is a FileType of type Der.
	FileTypeDer
)

func ParseFileType

func ParseFileType(name string) (FileType, error)

ParseFileType attempts to convert a string to a FileType.

func (FileType) MarshalText

func (x FileType) MarshalText() ([]byte, error)

MarshalText implements the text marshaller method.

func (FileType) String

func (x FileType) String() string

String implements the Stringer interface.

func (*FileType) UnmarshalText

func (x *FileType) UnmarshalText(text []byte) error

UnmarshalText implements the text unmarshaller method.

type HttpsSource

type HttpsSource struct {
	// contains filtered or unexported fields
}

func NewHttpsSource

func NewHttpsSource(url *url.URL, client *http.Client) (HttpsSource, error)

func (HttpsSource) Get

func (source HttpsSource) Get(ctx context.Context) (*x509.Certificate, error)

type LocalSource

type LocalSource struct {
	// contains filtered or unexported fields
}

func NewLocalSource

func NewLocalSource(filePath string, sourceType FileType) (LocalSource, error)

func (LocalSource) Get

func (source LocalSource) Get(ctx context.Context) (*x509.Certificate, error)

type Source

type Source interface {
	Get(ctx context.Context) (*x509.Certificate, error)
}

Jump to

Keyboard shortcuts

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