Documentation ¶
Index ¶
- type Duration
- type Storage
- func (s *Storage) Delete(_ context.Context, key string) error
- func (s *Storage) Exists(_ context.Context, key string) bool
- func (s *Storage) List(ctx context.Context, prefix string, recursive bool) ([]string, error)
- func (s *Storage) Load(_ context.Context, key string) ([]byte, error)
- func (s *Storage) Lock(ctx context.Context, key string) error
- func (s *Storage) Stat(_ context.Context, key string) (certmagic.KeyInfo, error)
- func (s *Storage) Store(_ context.Context, key string, value []byte) error
- func (s *Storage) Unlock(_ context.Context, key string) error
- type StorageConfigInterface
- type Time
- type URL
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Storage ¶
type Storage struct {
// contains filtered or unexported fields
}
Storage is the main object passed to CertMagic that implements the "Storage" interface.
func NewStorage ¶
func NewStorage(config StorageConfigInterface) *Storage
func (*Storage) List ¶
List will recursively list all items at prefix if recursive==true. If not, it will just return a list of items that are NOT "directories" in Vault. Note that Vault's kv-v2 engine doesn't really have the idea of directories, they are more like paths in a tree (I guess?).
Caveats:
- When recursive==false, we ONLY include item that do NOT have a trailing slash
- When recursive==true, we include ALL items from the specified prefix that do NOT have a trailing slash
type StorageConfigInterface ¶
type StorageConfigInterface interface { GetLogger() *zap.SugaredLogger GetVaultBaseUrl() string GetToken() string GetApproleLoginPath() string GetApproleLogoutPath() string GetApproleRoleId() string GetApproleSecretId() string GetSecretsPath() string GetPathPrefix() string GetInsecureSkipVerify() bool GetLockTimeout() Duration GetLockPollingInterval() Duration }
Click to show internal directories.
Click to hide internal directories.