letsencrypt

package
v0.0.0-...-260b785 Latest Latest
Warning

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

Go to latest
Published: Jan 28, 2024 License: Apache-2.0 Imports: 24 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var StorageKeys certmagic.KeyBuilder

StorageKeys is used to store certmagic keys

Functions

This section is empty.

Types

type Config

type Config struct {
	Email              string
	WhitelistedDomains []string
	StoreType          StoreType
}

Config describes the configuration for let's encrypt

type KubeStore

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

KubeStore object for storing kube info

func NewKubeStore

func NewKubeStore() (*KubeStore, error)

NewKubeStore creates a new instance kube store

func (*KubeStore) Delete

func (s *KubeStore) Delete(key string) error

Delete deletes specified key from kube store

func (*KubeStore) Exists

func (s *KubeStore) Exists(key string) bool

Exists check if specified key exists in kube store

func (*KubeStore) List

func (s *KubeStore) List(prefix string, recursive bool) ([]string, error)

List return all key having prefix

func (*KubeStore) Load

func (s *KubeStore) Load(key string) ([]byte, error)

Load loads specified key from kube store

func (*KubeStore) Lock

func (s *KubeStore) Lock(ctx context.Context, key string) error

Lock implements a lock mechanism

func (*KubeStore) Stat

func (s *KubeStore) Stat(key string) (certmagic.KeyInfo, error)

Stat returns stat for specified key

func (*KubeStore) Store

func (s *KubeStore) Store(key string, value []byte) error

Store stores specified key & value in kube store

func (*KubeStore) String

func (s *KubeStore) String() string

func (*KubeStore) Unlock

func (s *KubeStore) Unlock(key string) error

Unlock releases the lock for name.

type LetsEncrypt

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

LetsEncrypt manages letsencrypt certificates

func New

func New() (*LetsEncrypt, error)

New creates a new letsencrypt module

func (*LetsEncrypt) AddExistingCertificate

func (l *LetsEncrypt) AddExistingCertificate(certFile, keyFile string) error

AddExistingCertificate lets the user add an existing certificate. This certificate will not be automatically renewed via let's encrypt

func (*LetsEncrypt) DeleteProjectDomains

func (l *LetsEncrypt) DeleteProjectDomains(project string) error

DeleteProjectDomains deletes a projects associated domains

func (*LetsEncrypt) LetsEncryptHTTPChallengeHandler

func (l *LetsEncrypt) LetsEncryptHTTPChallengeHandler(h http.Handler) http.Handler

LetsEncryptHTTPChallengeHandler handle the http challenge

func (*LetsEncrypt) SetLetsEncryptEmail

func (l *LetsEncrypt) SetLetsEncryptEmail(email string)

SetLetsEncryptEmail sets config email

func (*LetsEncrypt) SetProjectDomains

func (l *LetsEncrypt) SetProjectDomains(project string, c *config.LetsEncrypt) error

SetProjectDomains sets the config required by lets encrypt

func (*LetsEncrypt) TLSConfig

func (l *LetsEncrypt) TLSConfig() *tls.Config

TLSConfig returns the tls config to be used by the http server

type Storage

type Storage struct {
	sync.RWMutex
	// contains filtered or unexported fields
}

Storage is the object for storing space cloud storage information

func NewScStore

func NewScStore() *Storage

NewScStore returns a new instance of space cloud storage

func (*Storage) Delete

func (s *Storage) Delete(key string) error

Delete deletes specified key from space cloud storage

func (*Storage) Exists

func (s *Storage) Exists(key string) bool

Exists checks if key exists in space cloud storage

func (*Storage) List

func (s *Storage) List(prefix string, recursive bool) ([]string, error)

List returns all keys matching prefix

func (*Storage) Load

func (s *Storage) Load(key string) ([]byte, error)

Load gets the value for specifed key

func (*Storage) Lock

func (s *Storage) Lock(ctx context.Context, key string) error

Lock obtains a lock named by the given key. It blocks until the lock can be obtained or an error is returned.

func (*Storage) Stat

func (s *Storage) Stat(key string) (certmagic.KeyInfo, error)

Stat get stats for a particular key

func (*Storage) Store

func (s *Storage) Store(key string, value []byte) error

Store sets the key value in space cloud storage

func (*Storage) String

func (s *Storage) String() string

func (*Storage) Unlock

func (s *Storage) Unlock(key string) error

Unlock releases the lock for name.

type StoreType

type StoreType string

StoreType describes the store used by the lets encrypt module

const (
	// StoreLocal is used when the local filesystem us used as a store
	StoreLocal StoreType = "local"

	// StoreSC is used when SC is supposed to be used as a store
	StoreSC StoreType = "sc"

	// StoreKube is used when kubernetes is supposed to be used as a store
	StoreKube StoreType = "kube"
)

Jump to

Keyboard shortcuts

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