didexchange

package
v0.0.0-...-57c6170 Latest Latest
Warning

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

Go to latest
Published: Mar 1, 2023 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	OperationID                  = "/connections"
	CreateInvitationPath         = OperationID + "/create-invitation"
	CreateImplicitInvitationPath = OperationID + "/create-implicit-invitation"
	ReceiveInvitationPath        = OperationID + "/receive-invitation"
	AcceptInvitationPath         = OperationID + "/{id}/accept-invitation"
	Connections                  = OperationID
	ConnectionsByID              = OperationID + "/{id}"
	AcceptExchangeRequest        = OperationID + "/{id}/accept-request"
	CreateConnection             = OperationID + "/create"
	RemoveConnection             = OperationID + "/{id}/remove"
)

constants for endpoints of DIDExchange.

Variables

This section is empty.

Functions

This section is empty.

Types

type Operation

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

Operation is controller REST service controller for DID Exchange.

func New

func New(ctx provider, notifier command.Notifier, defaultLabel string, autoAccept bool) (*Operation, error)

New returns new DID Exchange rest client protocol instance.

func (*Operation) AcceptExchangeRequest

func (c *Operation) AcceptExchangeRequest(rw http.ResponseWriter, req *http.Request)

AcceptExchangeRequest swagger:route POST /connections/{id}/accept-request did-exchange acceptRequest

Accepts a stored connection request.

Responses:

default: genericError
    200: acceptExchangeResponse

func (*Operation) AcceptInvitation

func (c *Operation) AcceptInvitation(rw http.ResponseWriter, req *http.Request)

AcceptInvitation swagger:route POST /connections/{id}/accept-invitation did-exchange acceptInvitation

Accept a stored connection invitation....

Responses:

default: genericError
    200: acceptInvitationResponse

func (*Operation) CreateConnection

func (c *Operation) CreateConnection(rw http.ResponseWriter, req *http.Request)

CreateConnection swagger:route POST /connections/create did-exchange createConnection

Saves the connection record.

Responses:

default: genericError
200: createConnectionResp

func (*Operation) CreateImplicitInvitation

func (c *Operation) CreateImplicitInvitation(rw http.ResponseWriter, req *http.Request)

CreateImplicitInvitation swagger:route POST /connections/create-implicit-invitation did-exchange implicitInvitation

Create implicit invitation using inviter DID.

Responses:

default: genericError
    200: implicitInvitationResponse

func (*Operation) CreateInvitation

func (c *Operation) CreateInvitation(rw http.ResponseWriter, req *http.Request)

CreateInvitation swagger:route POST /connections/create-invitation did-exchange createInvitation

Creates a new connection invitation....

Responses:

default: genericError
    200: createInvitationResponse

func (*Operation) GetRESTHandlers

func (c *Operation) GetRESTHandlers() []rest.Handler

GetRESTHandlers get all controller API handler available for this protocol service.

func (*Operation) QueryConnectionByID

func (c *Operation) QueryConnectionByID(rw http.ResponseWriter, req *http.Request)

QueryConnectionByID swagger:route GET /connections/{id} did-exchange getConnection

Fetch a single connection record.

Responses:

default: genericError
    200: queryConnectionResponse

func (*Operation) QueryConnections

func (c *Operation) QueryConnections(rw http.ResponseWriter, req *http.Request)

QueryConnections swagger:route GET /connections did-exchange queryConnections

query agent to agent connections.

Responses:

default: genericError
    200: queryConnectionsResponse

func (*Operation) ReceiveInvitation

func (c *Operation) ReceiveInvitation(rw http.ResponseWriter, req *http.Request)

ReceiveInvitation swagger:route POST /connections/receive-invitation did-exchange receiveInvitation

Receive a new connection invitation....

Responses:

default: genericError
    200: receiveInvitationResponse

func (*Operation) RemoveConnection

func (c *Operation) RemoveConnection(rw http.ResponseWriter, req *http.Request)

RemoveConnection swagger:route POST /connections/{id}/remove did-exchange removeConnection

Removes given connection record.

Responses:

default: genericError
200: removeConnectionResponse

type RemoveConnectionRequest

type RemoveConnectionRequest struct {
	// The ID of the connection record to remove
	//
	// in: path
	// required: true
	ID string `json:"id"`
}

RemoveConnectionRequest model

This is used for removing connection request

swagger:parameters removeConnection

type RemoveConnectionResponse

type RemoveConnectionResponse struct {
	// in: body
	Body struct{}
}

RemoveConnectionResponse model

response of remove connection action

swagger:response removeConnectionResponse

Jump to

Keyboard shortcuts

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