Documentation ¶
Index ¶
- Constants
- type Command
- func (c *Command) CreateConnectionV2(rw io.Writer, req io.Reader) command.Error
- func (c *Command) GetHandlers() []command.Handler
- func (c *Command) RotateDID(rw io.Writer, req io.Reader) command.Error
- func (c *Command) RotateDIDGivenConnIDCmd(connID string) command.Exec
- func (c *Command) SetConnectionToDIDCommV2(_ io.Writer, req io.Reader) command.Error
- type CreateConnectionRequest
- type IDMessage
- type RotateDIDRequest
- type RotateDIDResponse
Constants ¶
const ( CommandName = "connection" RotateDIDCommandMethod = "RotateDID" CreateV2CommandMethod = "CreateConnectionV2" SetToV2CommandMethod = "SetConnectionToDIDCommV2" )
constants for connection management endpoints.
const ( // InvalidRequestErrorCode is typically a code for validation errors // for invalid connection controller requests. InvalidRequestErrorCode = command.Code(iota + command.Connection) // CreateConnectionErrorCode is for failures in create connection command. CreateConnectionErrorCode // SetToDIDCommV2ErrorCode is for failures in create peer DID command. SetToDIDCommV2ErrorCode // RotateDIDErrorCode is for failures in rotate DID command. RotateDIDErrorCode )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Command ¶
type Command struct {
// contains filtered or unexported fields
}
Command provides controller API for connection commands.
func (*Command) CreateConnectionV2 ¶
CreateConnectionV2 creates a DIDComm v2 connection.
func (*Command) GetHandlers ¶
GetHandlers returns list of all commands supported by this controller command.
func (*Command) RotateDIDGivenConnIDCmd ¶
RotateDIDGivenConnIDCmd takes a connection ID and returns a command.Exec that rotates the given connection's DID.
type CreateConnectionRequest ¶
type CreateConnectionRequest struct { MyDID string `json:"my_did"` TheirDID string `json:"their_did"` }
CreateConnectionRequest request to create a didcomm v2 connection.
type IDMessage ¶
type IDMessage struct {
ConnectionID string `json:"id"`
}
IDMessage is either a request or response message, holding connection ID. Used for: - response from creating a didcomm v2 connection. - request to set a connection to didcomm v2.
type RotateDIDRequest ¶
type RotateDIDRequest struct { ID string `json:"id"` KID string `json:"kid"` NewDID string `json:"new_did"` CreatePeerDID bool `json:"create_peer_did"` }
RotateDIDRequest request to rotate MyDID in the connection with the given ID.
type RotateDIDResponse ¶
type RotateDIDResponse struct {
NewDID string `json:"new_did"`
}
RotateDIDResponse response from a DID rotation call, with the new DID that the connection was rotated to.