http

package
v0.4.0-rc1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 20, 2015 License: MPL-2.0 Imports: 13 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const AuthHeaderName = "X-Vault-Token"

AuthHeaderName is the name of the header containing the token.

Variables

This section is empty.

Functions

func Handler

func Handler(core *vault.Core) http.Handler

Handler returns an http.Handler for the API. This can be used on its own to mount the Vault API within another web server.

func TestListener

func TestListener(t *testing.T) (net.Listener, string)

func TestServer

func TestServer(t *testing.T, core *vault.Core) (net.Listener, string)

func TestServerAuth

func TestServerAuth(t *testing.T, addr string, token string)

func TestServerWithListener

func TestServerWithListener(t *testing.T, ln net.Listener, addr string, core *vault.Core)

Types

type Auth

type Auth struct {
	ClientToken   string            `json:"client_token"`
	Policies      []string          `json:"policies"`
	Metadata      map[string]string `json:"metadata"`
	LeaseDuration int               `json:"lease_duration"`
	Renewable     bool              `json:"renewable"`
}

type ErrorResponse

type ErrorResponse struct {
	Errors []string `json:"errors"`
}

type HealthResponse

type HealthResponse struct {
	Initialized bool `json:"initialized"`
	Sealed      bool `json:"sealed"`
	Standby     bool `json:"standby"`
}

type InitRequest

type InitRequest struct {
	SecretShares    int      `json:"secret_shares"`
	SecretThreshold int      `json:"secret_threshold"`
	PGPKeys         []string `json:"pgp_keys"`
}

type InitResponse

type InitResponse struct {
	Keys      []string `json:"keys"`
	RootToken string   `json:"root_token"`
}

type InitStatusResponse

type InitStatusResponse struct {
	Initialized bool `json:"initialized"`
}

type LeaderResponse

type LeaderResponse struct {
	HAEnabled     bool   `json:"ha_enabled"`
	IsSelf        bool   `json:"is_self"`
	LeaderAddress string `json:"leader_address"`
}

type LogicalResponse

type LogicalResponse struct {
	LeaseID       string                 `json:"lease_id"`
	Renewable     bool                   `json:"renewable"`
	LeaseDuration int                    `json:"lease_duration"`
	Data          map[string]interface{} `json:"data"`
	Warnings      []string               `json:"warnings"`
	Auth          *Auth                  `json:"auth"`
}

type RekeyRequest added in v0.2.0

type RekeyRequest struct {
	SecretShares    int      `json:"secret_shares"`
	SecretThreshold int      `json:"secret_threshold"`
	PGPKeys         []string `json:"pgp_keys"`
}

type RekeyStatusResponse added in v0.2.0

type RekeyStatusResponse struct {
	Started  bool `json:"started"`
	T        int  `json:"t"`
	N        int  `json:"n"`
	Progress int  `json:"progress"`
	Required int  `json:"required"`
}

type RekeyUpdateRequest added in v0.2.0

type RekeyUpdateRequest struct {
	Key string
}

type RekeyUpdateResponse added in v0.2.0

type RekeyUpdateResponse struct {
	Complete bool     `json:"complete"`
	Keys     []string `json:"keys"`
}

type SealStatusResponse

type SealStatusResponse struct {
	Sealed   bool `json:"sealed"`
	T        int  `json:"t"`
	N        int  `json:"n"`
	Progress int  `json:"progress"`
}

type UnsealRequest

type UnsealRequest struct {
	Key   string
	Reset bool
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL