operation

package
v0.0.0-...-7b7c10a Latest Latest
Warning

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

Go to latest
Published: Sep 16, 2022 License: Apache-2.0 Imports: 36 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AriesConfig

type AriesConfig struct {
	KMS              kms.KeyManager
	Crypto           crypto.Crypto
	WebKMS           func(string, webkms.HTTPClient, ...webkms.Opt) kms.KeyManager
	WebCrypto        func(string, webcrypto.HTTPClient, ...webkms.Opt) crypto.Crypto
	DIDResolvers     []zcapld2.DIDResolver
	PublicDIDCreator func(kms.KeyManager) (*did.DocResolution, error)
}

AriesConfig holds all configurations for aries-framework-go dependencies.

type Config

type Config struct {
	StoreProvider  storage.Provider
	Aries          *AriesConfig
	HTTPClient     *http.Client
	EDVClient      func(string, ...edv.Option) vault.ConfidentialStorageDocReader
	BaseURL        string
	DIDDomain      string
	DocumentLoader ld.DocumentLoader
}

Config defines configuration for vault operations.

type Identity

type Identity struct {
	DIDDoc           *did.Doc
	AuthKeyID        string // Key in the did doc's authentication section.
	DelegationKeyID  string // Used to sign zcaps when delegating access.
	DelegationKeyURL string // Points to DelegationKeyID. This is the verification method used when signing zcaps.
	InvocationKeyID  string // TODO - this is the key that should be authorized by third parties to invoke capabilities.
}

Identity is the Confidential Storage Hub's identity.

type Operation

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

Operation defines handlers for vault service.

func New

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

New returns operation instance.

func (*Operation) Compare

func (o *Operation) Compare(w http.ResponseWriter, r *http.Request)

Compare swagger:route POST /hubstore/compare comparisonReq

Performs a comparison.

Consumes:

  • application/json

Produces:

  • application/json

Responses:

200: comparisonResp
500: Error

func (*Operation) CreateAuthorization

func (o *Operation) CreateAuthorization(w http.ResponseWriter, _ *http.Request)

CreateAuthorization swagger:route POST /hubstore/profiles/{profileID}/authorizations createAuthorizationReq

Creates an Authorization.

Consumes:

  • application/json

Produces:

  • application/json

Responses:

201: createAuthorizationResp
403: Error
500: Error

func (*Operation) CreateProfile

func (o *Operation) CreateProfile(w http.ResponseWriter, r *http.Request)

CreateProfile swagger:route POST /hubstore/profiles createProfileReq

Creates a Profile.

Produces:

  • application/json

Responses:

201: createProfileResp
500: Error

func (*Operation) CreateQuery

func (o *Operation) CreateQuery(w http.ResponseWriter, r *http.Request)

CreateQuery swagger:route POST /hubstore/profiles/{profileID}/queries createQueryReq

Creates a Query.

Consumes:

  • application/json

Produces:

  • application/json

Responses:

201: createQueryResp
400: Error
403: Error
500: Error

func (*Operation) Extract

func (o *Operation) Extract(w http.ResponseWriter, r *http.Request)

Extract swagger:route POST /hubstore/extract extractionReq

Extracts the contents of a document.

Consumes:

  • application/json

Produces:

  • application/json

Responses:

200: extractionResp
400: Error
500: Error

func (*Operation) GetRESTHandlers

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

GetRESTHandlers get all controller API handler available for this service.

func (*Operation) HandleEqOp

func (o *Operation) HandleEqOp(w http.ResponseWriter, op *openapi.EqOp)

HandleEqOp handles a ComparisonRequest using the EqOp operator.

func (*Operation) ReadDocQuery

func (o *Operation) ReadDocQuery(query *openapi.DocQuery) ([]byte, error)

ReadDocQuery resolves a DocQuery to the contents of a Confidential Storage document.

type Query

type Query struct {
	ID        string
	ProfileID string
	Spec      json.RawMessage
}

Query is a resource under a profile that specifies a query spec.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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