Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Config ¶
Config is the main configuration structure for Secretless. It lists and configures the protocol listeners and handlers.
type Handler ¶
type Handler struct { Name string Type string ListenerName string `yaml:"listener"` Debug bool Match []string `yaml:"match"` Patterns []*regexp.Regexp `yaml:"-"` Credentials []StoredSecret }
Handler processes an inbound message and connects to a specified backend using Credentials which it fetches from a provider.
func (Handler) HasCredential ¶
HasCredential indicates whether a Handler has the specified credential.
type Listener ¶
type Listener struct { Address string CACertFiles []string `yaml:"caCertFiles"` Debug bool Name string Protocol string Socket string }
Listener listens on a port on socket for inbound connections, which are handed off to Handlers.
func (Listener) LinkedHandlers ¶
LinkedHandlers filters the handlers passed to it, returning only those attached to this Listener
type StoredSecret ¶
type StoredSecret struct { // How client code will refer to the secret's actual value at runtime. // Specifically, the key to the secret's value in the map[string][]byte // returned by a Resolver. Name string Provider string // The identifier within the context of a Provider. Ie, how a provider // refers to this secret. Eg, a database primary key. ID string }
StoredSecret represents not the value of a "secret," but the abstract concept of "a secret stored somewhere".
Note that "Name" will be the key that maps to this secret's actual value in the map[string][]byte when the "StoredSecret" itself is looked up by a Resolver.