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 Config

type Config struct {
	VDR             vdr.Registry
	KeyManager      kms.KeyManager
	TLSConfig       *tls.Config
	DIDMethod       string
	StoreProvider   storage.Provider
	CSHBaseURL      string
	VaultBaseURL    string
	DIDDomain       string
	DIDAnchorOrigin string
	DocumentLoader  ld.DocumentLoader
}

Config defines configuration for comparator operations.

type Operation

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

Operation defines handlers for comparator 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 /compare compareReq

Performs a comparison.

Consumes:

  • application/json

Produces:

  • application/json

Responses:

200: comparisonResp
500: Error

func (*Operation) CreateAuthorization

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

CreateAuthorization swagger:route POST /authorizations createAuthzReq

Creates an Authorization.

Consumes:

  • application/json

Produces:

  • application/json

Responses:

201: createAuthorizationResp
403: Error
500: Error

func (*Operation) Extract

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

Extract swagger:route POST /extract extractReq

Extracts the contents of a document.

Produces:

  • application/json

Responses:

200: extractionResp
500: Error

func (*Operation) GetConfig

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

GetConfig swagger:route GET /config configReq

Get config.

Produces:

  • application/json

Responses:

200: configResp
500: Error

func (*Operation) GetRESTHandlers

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

GetRESTHandlers get all controller API handler available for this service.

func (*Operation) HandleAuthz

func (o *Operation) HandleAuthz(w http.ResponseWriter, authz *models.Authorization)

HandleAuthz handles a CreateAuthzReq.

func (*Operation) HandleEqOp

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

HandleEqOp handles a ComparisonRequest using the EqOp operator.

func (*Operation) HandleExtract

func (o *Operation) HandleExtract(w http.ResponseWriter, extract *models.Extract)

HandleExtract handles extract req.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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