Help us shape the future of Go! Take the 2026 Go Developer Survey

certstorage

package
v1.27.1 Latest Latest
Warning

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

Go to latest
Published: Oct 27, 2026 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Account

type Account struct {
	Email        string                 `json:"email"`
	Registration *registration.Resource `json:"registration"`
	Key          crypto.PrivateKey      `json:"-"`
}

func (*Account) GetEmail

func (a *Account) GetEmail() string

GetEmail returns the email address for the account.

func (*Account) GetPrivateKey

func (a *Account) GetPrivateKey() crypto.PrivateKey

GetPrivateKey returns the private RSA account key.

func (*Account) GetRegistration

func (a *Account) GetRegistration() *registration.Resource

GetRegistration returns the server registration.

type Option

type Option func(*options)

func FilePerm

func FilePerm(perm os.FileMode) Option

type Storage

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

func New

func New(root string, opts ...Option) (*Storage, error)

func (*Storage) LoadAccount

func (s *Storage) LoadAccount() (*Account, error)

func (*Storage) LoadCertificate

func (s *Storage) LoadCertificate() (*tls.Certificate, error)

func (*Storage) SaveAccount

func (s *Storage) SaveAccount(account *Account) error

func (*Storage) SaveCertificate

func (s *Storage) SaveCertificate(cert *tls.Certificate) error

Jump to

Keyboard shortcuts

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