Documentation ¶
Index ¶
- Constants
- Variables
- func Handler(core *vault.Core) http.Handler
- func TestListener(tb testing.TB) (net.Listener, string)
- func TestServer(tb testing.TB, core *vault.Core) (net.Listener, string)
- func TestServerAuth(tb testing.TB, addr string, token string)
- func TestServerWithListener(tb testing.TB, ln net.Listener, addr string, core *vault.Core)
- type ErrorResponse
- type GenerateRootInitRequest
- type GenerateRootStatusResponse
- type GenerateRootUpdateRequest
- type HealthResponse
- type InitRequest
- type InitResponse
- type InitStatusResponse
- type LeaderResponse
- type PrepareRequestFunc
- type RekeyRequest
- type RekeyStatusResponse
- type RekeyUpdateRequest
- type RekeyUpdateResponse
- type SealStatusResponse
- type UnsealRequest
Constants ¶
View Source
const ( // AuthHeaderName is the name of the header containing the token. AuthHeaderName = "X-Vault-Token" // WrapTTLHeaderName is the name of the header containing a directive to // wrap the response WrapTTLHeaderName = "X-Vault-Wrap-TTL" // WrapFormatHeaderName is the name of the header containing the format to // wrap in; has no effect if the wrap TTL is not set WrapFormatHeaderName = "X-Vault-Wrap-Format" // NoRequestForwardingHeaderName is the name of the header telling Vault // not to use request forwarding NoRequestForwardingHeaderName = "X-Vault-No-Request-Forwarding" // MFAHeaderName represents the HTTP header which carries the credentials // required to perform MFA on any path. MFAHeaderName = "X-Vault-MFA" // PolicyOverrideHeaderName is the header set to request overriding // soft-mandatory Sentinel policies. PolicyOverrideHeaderName = "X-Vault-Policy-Override" // MaxRequestSize is the maximum accepted request size. This is to prevent // a denial of service attack where no Content-Length is provided and the server // is fed ever more data until it exhausts memory. MaxRequestSize = 32 * 1024 * 1024 )
Variables ¶
View Source
var (
ReplicationStaleReadTimeout = 2 * time.Second
)
Functions ¶
Types ¶
type ErrorResponse ¶
type ErrorResponse struct {
Errors []string `json:"errors"`
}
type GenerateRootInitRequest ¶ added in v0.5.0
type GenerateRootStatusResponse ¶ added in v0.5.0
type GenerateRootStatusResponse struct { Nonce string `json:"nonce"` Started bool `json:"started"` Progress int `json:"progress"` Required int `json:"required"` Complete bool `json:"complete"` EncodedToken string `json:"encoded_token"` EncodedRootToken string `json:"encoded_root_token"` PGPFingerprint string `json:"pgp_fingerprint"` }
type GenerateRootUpdateRequest ¶ added in v0.5.0
type HealthResponse ¶
type HealthResponse struct { Initialized bool `json:"initialized"` Sealed bool `json:"sealed"` Standby bool `json:"standby"` ReplicationPerformanceMode string `json:"replication_performance_mode"` ReplicationDRMode string `json:"replication_dr_mode"` ServerTimeUTC int64 `json:"server_time_utc"` Version string `json:"version"` ClusterName string `json:"cluster_name,omitempty"` ClusterID string `json:"cluster_id,omitempty"` }
type InitRequest ¶
type InitResponse ¶
type InitStatusResponse ¶
type InitStatusResponse struct {
Initialized bool `json:"initialized"`
}
type LeaderResponse ¶
type PrepareRequestFunc ¶ added in v0.6.0
type RekeyRequest ¶ added in v0.2.0
type RekeyStatusResponse ¶ added in v0.2.0
type RekeyUpdateRequest ¶ added in v0.2.0
type RekeyUpdateResponse ¶ added in v0.2.0
type SealStatusResponse ¶
type SealStatusResponse struct { Type string `json:"type"` Sealed bool `json:"sealed"` T int `json:"t"` N int `json:"n"` Progress int `json:"progress"` Nonce string `json:"nonce"` Version string `json:"version"` ClusterName string `json:"cluster_name,omitempty"` ClusterID string `json:"cluster_id,omitempty"` }
type UnsealRequest ¶
Click to show internal directories.
Click to hide internal directories.