Documentation
¶
Index ¶
- Constants
- func New() handler.Handler
- func NewWithPath(path string) handler.Handler
- type LocalPath
- func (l LocalPath) Decode(path string) (data handler.Data, err error)
- func (l LocalPath) Description() string
- func (l LocalPath) Encode(data handler.Data) ([]byte, error)
- func (l LocalPath) Erase(vaultAddr *url.URL) (err error)
- func (l LocalPath) Get(vaultAddr *url.URL) (token string, err error)
- func (l LocalPath) List() (items []handler.Data, err error)
- func (l LocalPath) Name() string
- func (l LocalPath) Path() string
- func (l LocalPath) Purge(dryRun bool) (items []handler.Data, err error)
- func (l LocalPath) Store(token string, vaultAddr *url.URL) (err error)
Constants ¶
const ( // NameLocalPath is the name of the handler NameLocalPath = "LocalPath" // VaultTokenPath is the default token path where we will store the data regarding the vault tokens VaultTokenPath = "%s/.vault-tokens" )
Variables ¶
This section is empty.
Functions ¶
func New ¶
New create a new vault token handler with the default vault path specified as VaultTokenPath
func NewWithPath ¶
NewWithPath create a new vault token handler with a specified vault path
Types ¶
type LocalPath ¶
type LocalPath struct {
TokenDirectory string
}
LocalPath is a vault token handler implementing handler.Handler, this handler is used to handle vault tokens based on the vault address.
func (LocalPath) Description ¶
Description return the description of the handler
func (LocalPath) Erase ¶
Erase removes a token associated with the vaultAddr, and returns error if it fails to erase the vault token in the handler, otherwise nil
func (LocalPath) Get ¶
Get retrieves a token associated with the vaultAddr from LocalPath.TokenDirectory, returns an error if there is an issue with creating, reading the data from the directory
func (LocalPath) List ¶ added in v0.1.3
List the available tokens currently stored if supported by the handler