Documentation ¶
Index ¶
- Variables
- type AdminTokenWriteRequest
- type AdminTokenWriteResponse
- type CheckInitStateRequest
- type CheckInitStateResponse
- type ErrorCode
- type FallbackResponse
- type InitRequest
- type InitResponse
- type RootKeyCacheRequest
- type RootKeyCacheResponse
- type RootKeyReadRequest
- type RootKeyReadResponse
- type Secret
- type SecretDeleteRequest
- type SecretDeleteResponse
- type SecretListRequest
- type SecretListResponse
- type SecretPutRequest
- type SecretPutResponse
- type SecretReadRequest
- type SecretReadResponse
- type SecretResponseMetadata
- type SecretUndeleteRequest
- type SecretUndeleteResponse
Constants ¶
This section is empty.
Variables ¶
var ErrAlreadyInitialized = ErrorCode("already_initialized")
var ErrBadInput = ErrorCode("bad_request")
var ErrLowEntropy = ErrorCode("low_entropy")
var ErrNotFound = ErrorCode("not_found")
var ErrServerFault = ErrorCode("server_fault")
Functions ¶
This section is empty.
Types ¶
type AdminTokenWriteRequest ¶
type AdminTokenWriteRequest struct {
Data string `json:"data"`
}
AdminTokenWriteRequest is to persist the admin token in memory. Admin token can be persisted only once. It is used to receive a short-lived session token.
type AdminTokenWriteResponse ¶
type AdminTokenWriteResponse struct {
Err ErrorCode `json:"err,omitempty"`
}
AdminTokenWriteResponse is to persist the admin token in memory.
type CheckInitStateRequest ¶ added in v0.2.0
type CheckInitStateRequest struct { }
CheckInitStateRequest is to check if the SPIKE Keep is initialized.
type CheckInitStateResponse ¶ added in v0.2.0
type CheckInitStateResponse struct { State data.InitState `json:"state"` Err ErrorCode `json:"err,omitempty"` }
CheckInitStateResponse is to check if the SPIKE Keep is initialized.
type FallbackResponse ¶ added in v0.2.0
type FallbackResponse struct {
Err ErrorCode `json:"err,omitempty"`
}
FallbackResponse is a generic response for any error.
type InitRequest ¶ added in v0.2.0
type InitRequest struct { }
InitRequest is to initialize SPIKE as a superuser.
type InitResponse ¶ added in v0.2.0
type InitResponse struct { RecoveryToken string `json:"token"` Err ErrorCode `json:"err,omitempty"` }
InitResponse is to initialize SPIKE as a superuser.
type RootKeyCacheRequest ¶
type RootKeyCacheRequest struct {
RootKey string `json:"rootKey"`
}
RootKeyCacheRequest is to cache the generated root key in SPIKE Keep. If the root key is lost due to a crash, it will be retrieved from SPIKE Keep.
type RootKeyCacheResponse ¶
type RootKeyCacheResponse struct {
Err ErrorCode `json:"error,omitempty"`
}
RootKeyCacheResponse is to cache the generated root key in SPIKE Keep.
type RootKeyReadRequest ¶
type RootKeyReadRequest struct{}
RootKeyReadRequest is a request to get the root key back from remote cache.
type RootKeyReadResponse ¶
type RootKeyReadResponse struct { RootKey string `json:"rootKey"` Err ErrorCode `json:"err,omitempty"` }
RootKeyReadResponse is a response to get the root key back from remote cache.
type SecretDeleteRequest ¶
type SecretDeleteRequest struct { Path string `json:"path"` Versions []int `json:"versions"` // Empty means latest version }
SecretDeleteRequest for soft-deleting secret versions
type SecretDeleteResponse ¶
type SecretDeleteResponse struct { Metadata SecretResponseMetadata `json:"metadata"` Err ErrorCode `json:"err,omitempty"` }
SecretDeleteResponse after soft-delete
type SecretListResponse ¶
SecretListResponse for listing secrets
type SecretPutRequest ¶
type SecretPutRequest struct { Path string `json:"path"` Values map[string]string `json:"values"` Err ErrorCode `json:"err,omitempty"` }
SecretPutRequest for creating/updating secrets
type SecretPutResponse ¶
type SecretPutResponse struct { SecretResponseMetadata Err ErrorCode `json:"err,omitempty"` }
SecretPutResponse is after successful secret write
type SecretReadRequest ¶
type SecretReadRequest struct { Path string `json:"path"` Version int `json:"version,omitempty"` // Optional specific version }
SecretReadRequest is for getting secrets
type SecretReadResponse ¶
type SecretReadResponse struct { Secret Data map[string]string `json:"data"` Err ErrorCode `json:"err,omitempty"` }
SecretReadResponse is for getting secrets
type SecretResponseMetadata ¶
type SecretResponseMetadata struct { CreatedTime time.Time `json:"created_time"` Version int `json:"version"` DeletedTime *time.Time `json:"deleted_time,omitempty"` }
SecretResponseMetadata is meta information about secrets for internal tracking.
type SecretUndeleteRequest ¶
SecretUndeleteRequest for recovering soft-deleted versions
type SecretUndeleteResponse ¶
type SecretUndeleteResponse struct { Metadata SecretResponseMetadata `json:"metadata"` Err ErrorCode `json:"err,omitempty"` }
SecretUndeleteResponse after recovery