Documentation
¶
Index ¶
- Variables
- func ClearIdPlaceholder(ctx context.Context)
- func Errorf(reason kmip.ResultReason, format string, args ...any) error
- func GetIdOrPlaceholder(ctx context.Context, reqId string) (string, error)
- func GetProtocolVersion(ctx context.Context) kmip.ProtocolVersion
- func IdPlaceholder(ctx context.Context) string
- func NewHTTPHandler(hdl RequestHandler) http.Handler
- func PeerCertificates(ctx context.Context) []*x509.Certificate
- func RemoteAddr(ctx context.Context) string
- func SetIdPlaceholder(ctx context.Context, id string)
- type BatchExecutor
- func (exec *BatchExecutor) HandleRequest(ctx context.Context, req *kmip.RequestMessage) *kmip.ResponseMessage
- func (exec *BatchExecutor) Route(op kmip.Operation, hdl OperationHandler)
- func (exec *BatchExecutor) SetSupportedProtocolVersions(versions ...kmip.ProtocolVersion)
- func (exec *BatchExecutor) Use(m ...Middleware)
- type Error
- type Middleware
- type Next
- type OperationHandler
- type RequestHandler
- type Server
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrOperationNotSupported = Errorf(kmip.ResultReasonOperationNotSupported, "Operation not supported") ErrFeatureNotSupported = Errorf(kmip.ResultReasonFeatureNotSupported, "Feature not supported") ErrMissingData = Errorf(kmip.ResultReasonMissingData, "Missing data") ErrItemNotFound = Errorf(kmip.ResultReasonItemNotFound, "Item not found") ErrPermissionDenied = Errorf(kmip.ResultReasonPermissionDenied, "Permission denied") ErrInvalidMessage = Errorf(kmip.ResultReasonInvalidMessage, "Invalid message") ErrInvalidField = Errorf(kmip.ResultReasonInvalidField, "Invalid field") )
View Source
var ErrShutdown = errors.New("Server is shutting down")
Functions ¶
func ClearIdPlaceholder ¶
func GetIdOrPlaceholder ¶
func GetProtocolVersion ¶
func IdPlaceholder ¶
func NewHTTPHandler ¶
func NewHTTPHandler(hdl RequestHandler) http.Handler
func PeerCertificates ¶
func PeerCertificates(ctx context.Context) []*x509.Certificate
func RemoteAddr ¶
func SetIdPlaceholder ¶
Types ¶
type BatchExecutor ¶
type BatchExecutor struct {
// contains filtered or unexported fields
}
func NewBatchExecutor ¶
func NewBatchExecutor() *BatchExecutor
func (*BatchExecutor) HandleRequest ¶
func (exec *BatchExecutor) HandleRequest(ctx context.Context, req *kmip.RequestMessage) *kmip.ResponseMessage
func (*BatchExecutor) Route ¶
func (exec *BatchExecutor) Route(op kmip.Operation, hdl OperationHandler)
func (*BatchExecutor) SetSupportedProtocolVersions ¶
func (exec *BatchExecutor) SetSupportedProtocolVersions(versions ...kmip.ProtocolVersion)
func (*BatchExecutor) Use ¶
func (exec *BatchExecutor) Use(m ...Middleware)
type Middleware ¶
type Middleware func(next Next, ctx context.Context, msg *kmip.RequestMessage) (*kmip.ResponseMessage, error)
func DebugMiddleware ¶
func DebugMiddleware(out io.Writer, marshal func(data any) []byte) Middleware
type OperationHandler ¶
type OperationHandler interface {
HandleOperation(ctx context.Context, req kmip.OperationPayload) (kmip.OperationPayload, error)
}
func HandleFunc ¶
func HandleFunc[Req, Resp kmip.OperationPayload](h func(ctx context.Context, req Req) (Resp, error)) OperationHandler
type RequestHandler ¶
Click to show internal directories.
Click to hide internal directories.