storage

package
v5.1.5 Latest Latest
Warning

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

Go to latest
Published: Apr 4, 2024 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CertificatesInfo added in v5.1.0

type CertificatesInfo struct {
	NotAfter, NotBefore *time.Time
	DNS, IPs, Issuers   string
}

Information about stored certificates to be returned by the API.

func ParseCertificatesInfo added in v5.1.0

func ParseCertificatesInfo(bundle []byte) (*CertificatesInfo, error)

type FileType

type FileType string
const (
	GeneralType          FileType = "general"
	MapsType             FileType = "maps"
	SSLType              FileType = "certs"
	SpoeType             FileType = "spoe"
	SpoeTransactionsType FileType = "spoe-transactions"
	BackupsType          FileType = "backups"
	TransactionsType     FileType = "transactions"
)

type Storage

type Storage interface {
	GetAll() ([]string, error)
	Get(name string) (string, int64, error)
	GetContents(name string) (string, error)
	GetRawContents(name string) (io.ReadCloser, error)
	GetCertificatesInfo(name string) (*CertificatesInfo, error)
	Delete(name string) error
	Replace(name string, config string) (string, error)
	Create(name string, contents io.ReadCloser) (string, int64, error)
}

func New

func New(dirname string, fileType FileType) (Storage, error)

Jump to

Keyboard shortcuts

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