Versions in this module Expand all Collapse all v0 v0.23.0 Nov 10, 2023 Changes in this version + const PathIdentityDescribe + const PathIdentityList + const PathIdentitySelfDescribe + const PathKeyCreate + const PathKeyDecrypt + const PathKeyDelete + const PathKeyDescribe + const PathKeyEncrypt + const PathKeyGenerate + const PathKeyImport + const PathKeyList + const PathListAPIs + const PathLogAudit + const PathLogError + const PathMetrics + const PathPolicyDescribe + const PathPolicyList + const PathPolicyRead + const PathReady + const PathStatus + const PathVersion + func Fail(r *Response, code int, msg string) error + func Failf(r *Response, code int, format string, a ...any) error + func Failr(r *Response, err Error) error + func ReadBody(r *Request, v any) error + func Reply(r *Response, code int) + func ReplyWith(r *Response, code int, data any) error + type AuditLogEvent struct + Request AuditLogRequest + Response AuditLogResponse + Time time.Time + type AuditLogRequest struct + APIPath string + IP string + Identity string + type AuditLogResponse struct + StatusCode int + Time int64 + type Authenticator interface + Authenticate func(*http.Request) (*Request, Error) + var InsecureSkipVerify Authenticator = insecureSkipVerify{} + type DecryptKeyRequest struct + Ciphertext []byte + Context []byte + type DecryptKeyResponse struct + Plaintext []byte + type DescribeIdentityResponse struct + CreatedAt time.Time + CreatedBy string + IsAdmin bool + Policy string + type DescribeKeyResponse struct + Algorithm string + CreatedAt time.Time + CreatedBy string + Name string + type DescribePolicyResponse struct + CreatedAt time.Time + CreatedBy string + Name string + type DescribeRouteResponse struct + MaxBody int64 + Method string + Path string + Timeout int64 + type EncryptKeyRequest struct + Context []byte + Plaintext []byte + type EncryptKeyResponse struct + Ciphertext []byte + type Error interface + Status func() int + func IsError(err error) (Error, bool) + func NewError(code int, msg string) Error + func ReadError(resp *http.Response) Error + type ErrorLogEvent struct + Message string + type GenerateKeyRequest struct + Context []byte + type GenerateKeyResponse struct + Ciphertext []byte + Plaintext []byte + type Handler interface + ServeAPI func(*Response, *Request) + type HandlerFunc func(*Response, *Request) + func (f HandlerFunc) ServeAPI(resp *Response, req *Request) + type ImportKeyRequest struct + Bytes []byte + Cipher string + type ListAPIsResponse []DescribeRouteResponse + type ListIdentitiesResponse struct + ContinueAt string + Identities []string + type ListKeysResponse struct + ContinueAt string + Names []string + type ListPoliciesResponse struct + ContinueAt string + Names []string + type LogWriter struct + func NewLogWriter(w io.Writer) *LogWriter + func (w *LogWriter) Write(p []byte) (int, error) + type Multicast struct + func (m *Multicast) Add(w io.Writer) + func (m *Multicast) Num() int + func (m *Multicast) Remove(w io.Writer) + func (m *Multicast) Write(p []byte) (n int, err error) + type ReadPolicyResponse struct + Allow map[string]struct{} + CreatedAt time.Time + CreatedBy string + Deny map[string]struct{} + Name string + type Request struct + Identity kes.Identity + Received time.Time + Resource string + func (r *Request) LogValue() slog.Value + type Response struct + func (r *Response) Fail(code int, msg string) error + func (r *Response) Failf(code int, format string, v ...any) error + func (r *Response) Failr(err Error) error + func (r *Response) Reply(code int) + type Route struct + Auth Authenticator + Handler Handler + MaxBody mem.Size + Method string + Path string + Timeout time.Duration + func (ro Route) ServeHTTP(w http.ResponseWriter, r *http.Request) + type SelfDescribeIdentityResponse struct + CreatedAt time.Time + CreatedBy string + Identity string + IsAdmin bool + Policy *ReadPolicyResponse + type StatusResponse struct + Arch string + CPUs int + HeapAlloc uint64 + KeyStoreLatency int64 + KeyStoreUnreachable bool + OS string + StackAlloc uint64 + UpTime uint64 + UsableCPUs int + Version string + type VersionResponse struct + Commit string + Version string