Documentation ¶
Index ¶
- Constants
- Variables
- type API
- type AuthData
- type AuthMetadata
- type AuthProvider
- type AuthResponse
- type EnvVar
- type ErrorResponse
- type File
- type LoggingAPI
- type MountPath
- type MountPathEntity
- type Option
- type PolicyName
- type PolicyNameEntity
- type RequestAPI
- type RequestType
- type RoleName
- type RoleNameEntity
- type RolePoliciesEntity
- type SecretPath
- type SecretPathEntity
- type StringSource
- type Value
- type VaultHTTPError
- type VaultTTL
Constants ¶
View Source
const ( // Year is the number of hours per year. Year = daysInYear * hoursInDay * time.Hour // Week is the number of hours per week. Week = daysInWeek * hoursInDay * time.Hour // Day is the number of hours per day. Day = hoursInDay * time.Hour // Hour is one hour. Hour = time.Hour // Minute is one minute. Minute = time.Minute // Second is one second. Second = time.Second )
Variables ¶
View Source
var ErrAPIError = erx.New("Vault API", "failed to interact with Vault API")
ErrAPIError is returned for any error encountered while interacting with the Vault API.
View Source
var ErrDoesNotExist = erx.New("Vault API", "vault object does not exist")
ErrDoesNotExist is returned by all apis when a vault object doesn't exist.
View Source
var ErrHTTPError = erx.New("Vault API", "failed to send or receive HTTP request")
ErrHTTPError is returned for any error encountered while sending or receiving HTTP requests.
View Source
var ErrSetupFailed = erx.New("Vault API", "failed to initialize Vault API")
ErrSetupFailed is returned when the Vault API instanced failed to initialize.
Functions ¶
This section is empty.
Types ¶
type API ¶
type API interface { RequestAPI LoggingAPI }
type AuthMetadata ¶
type AuthProvider ¶
type AuthProvider interface {
Authenticate(core API) (*AuthResponse, error)
}
type AuthResponse ¶
type AuthResponse struct {
Auth AuthData `json:"auth"`
}
type ErrorResponse ¶
type ErrorResponse struct {
Errors []string `json:"errors"`
}
type LoggingAPI ¶
type MountPathEntity ¶
type Option ¶
type Option func(api *api) error
func WithAuthProvider ¶
func WithAuthProvider(provider AuthProvider) Option
func WithCACerts ¶
func WithTokenAuth ¶
func WithTokenAuth() Option
type PolicyName ¶
type PolicyName string
func (PolicyName) GetPolicyName ¶
func (p PolicyName) GetPolicyName() (string, error)
type PolicyNameEntity ¶
type RequestAPI ¶
type RequestAPI interface { MakeRequest(method RequestType, path string, request httpclient.Encodable, response httpclient.Decodeable) error GetVaultAddress(path ...string) string }
type RequestType ¶
type RequestType string
const ( // MethodGet is a http GET request. MethodGet RequestType = "GET" // MethodDelete is a http DELETE request. MethodDelete RequestType = "DELETE" // MethodPost is a http POST request. MethodPost RequestType = "POST" // MethodPut is a http PUT request. MethodPut RequestType = "PUT" // MethodList is a http LIST request. MethodList RequestType = "LIST" )
type RoleNameEntity ¶
type RolePoliciesEntity ¶
type RolePoliciesEntity interface {
GetRolePolicies() ([]PolicyName, error)
}
type SecretPath ¶
type SecretPath string
func (SecretPath) GetSecretPath ¶
func (k SecretPath) GetSecretPath() (string, error)
type SecretPathEntity ¶
type StringSource ¶
type VaultHTTPError ¶
Click to show internal directories.
Click to hide internal directories.