operation

package
v0.1.6 Latest Latest
Warning

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

Go to latest
Published: Mar 6, 2021 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

View Source
const (

	// KMSBasePath is the base path for all KMS endpoints.
	KMSBasePath = "/kms"
)

Endpoints.

Variables

This section is empty.

Functions

func CapabilityInvocationAction

func CapabilityInvocationAction(r *http.Request) (string, error)

CapabilityInvocationAction returns the action to invoke on the capability given the request.

Types

type Config

type Config struct {
	AuthService      authService
	KMSService       kms.Service
	CryptoBoxCreator func(keyManager arieskms.KeyManager) (arieskms.CryptoBox, error)
	JSONLDLoader     ld.DocumentLoader
	Logger           log.Logger
	Tracer           trace.Tracer
	BaseURL          string
	VDRResolver      zcapld.VDRResolver
}

Config defines configuration for KMS operations.

type Handler

type Handler interface {
	Path() string
	Method() string
	Handle() http.HandlerFunc
	Name() string
}

Handler defines an HTTP handler for the API endpoint.

type Operation

type Operation struct {
	// contains filtered or unexported fields
}

Operation holds dependencies for handlers.

func New

func New(config *Config) (*Operation, error)

New returns a new Operation instance.

func (*Operation) GetRESTHandlers

func (o *Operation) GetRESTHandlers() []Handler

GetRESTHandlers gets handlers available for the kms REST API.

func (*Operation) ZCAPLDMiddleware

func (o *Operation) ZCAPLDMiddleware(h http.Handler) http.Handler

ZCAPLDMiddleware returns the ZCAPLD middleware that authorizes requests.

type UpdateCapabilityReq

type UpdateCapabilityReq struct {
	EDVCapability json.RawMessage `json:"edvCapability,omitempty"`
}

UpdateCapabilityReq update capability request.

Jump to

Keyboard shortcuts

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