Help us shape the future of Go! Take the 2026 Go Developer Survey

outofbandv2

package
v0.3.2 Latest Latest
Warning

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

Go to latest
Published: May 9, 2023 License: Apache-2.0 Imports: 11 Imported by: 7

Documentation

Index

Constants

View Source
const (
	// InvalidRequestErrorCode is typically a code for validation errors
	// for invalid outofband controller requests.
	InvalidRequestErrorCode = command.Code(iota + command.OutofbandV2)
	// CreateInvitationErrorCode is for failures in create invitation command.
	CreateInvitationErrorCode
	// AcceptInvitationErrorCode is for failures in accept invitation command.
	AcceptInvitationErrorCode
)
View Source
const (
	// command name.
	CommandName      = "outofbandv2"
	CreateInvitation = "CreateInvitation"
	AcceptInvitation = "AcceptInvitation"
)

constants for out-of-band v2.

Variables

This section is empty.

Functions

This section is empty.

Types

type AcceptInvitationArgs

type AcceptInvitationArgs struct {
	Invitation        *outofbandv2.Invitation `json:"invitation"`
	MyLabel           string                  `json:"my_label"`
	RouterConnections []string                `json:"my_router_connections"`
}

AcceptInvitationArgs model

This is used for accepting an invitation.

type AcceptInvitationResponse

type AcceptInvitationResponse struct {
	ConnectionID string `json:"connection_id"`
}

AcceptInvitationResponse model

Represents a AcceptInvitation response message.

type Command

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

Command is controller command for outofband.

func New

func New(ctx outofbandv2.Provider) (*Command, error)

New returns new outofband controller command instance.

func (*Command) AcceptInvitation

func (c *Command) AcceptInvitation(rw io.Writer, req io.Reader) command.Error

AcceptInvitation from another agent and return the ID of the new connection records.

func (*Command) CreateInvitation

func (c *Command) CreateInvitation(rw io.Writer, req io.Reader) command.Error

CreateInvitation creates an out-of-bandv2 invitation. Protocols is an optional list of protocol identifier URIs that can be used to form connections. A default will be set if none are provided.

func (*Command) GetHandlers

func (c *Command) GetHandlers() []command.Handler

GetHandlers returns list of all commands supported by this controller command.

type CreateInvitationArgs

type CreateInvitationArgs struct {
	Label string                     `json:"label"`
	Body  outofbandv2.InvitationBody `json:"body"`
	From  string                     `json:"from"`
	// Attachments are intended to provide the possibility to include files, links or even JSON payload to the message.
	Attachments []*decorator.AttachmentV2 `json:"attachments"`
}

CreateInvitationArgs model

This is used for creating an invitation.

type CreateInvitationResponse

type CreateInvitationResponse struct {
	Invitation *outofbandv2.Invitation `json:"invitation"`
}

CreateInvitationResponse model

Represents a CreateInvitation response message.

Jump to

Keyboard shortcuts

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