api

package
v0.2403.1 Latest Latest
Warning

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

Go to latest
Published: Nov 29, 2024 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Overview

Package api defines the EnclaveRPC interface.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Body added in v0.2300.0

type Body struct {
	Success cbor.RawMessage `json:",omitempty"`
	Error   *string         `json:",omitempty"`
}

Body is an EnclaveRPC response body.

type Frame

type Frame struct {
	Session            []byte `json:"session,omitempty"`
	UntrustedPlaintext string `json:"untrusted_plaintext,omitempty"`
	Payload            []byte `json:"payload,omitempty"`
}

Frame is an EnclaveRPC frame.

It is the Go analog of the Rust RPC frame defined in runtime/src/enclave_rpc/types.rs.

type Kind added in v0.2300.0

type Kind uint8

Kind is the RPC call kind.

const (
	KindNoiseSession  Kind = 0
	KindInsecureQuery Kind = 1
	KindLocalQuery    Kind = 2
)

Supported RPC call kinds.

func (Kind) String added in v0.2400.0

func (k Kind) String() string

String returns a string representation of RPC call kind.

type Message added in v0.2300.0

type Message struct {
	Response *Response `json:"response"`
}

Message is an EnclaveRPC protocol message.

type PeerFeedback added in v0.2201.7

type PeerFeedback uint8

PeerFeedback is the feedback on the peer that handled the last RPC call.

const (
	PeerFeedbackSuccess PeerFeedback = 0
	PeerFeedbackFailure PeerFeedback = 1
	PeerFeedbackBadPeer PeerFeedback = 2
)

func (PeerFeedback) String added in v0.2201.7

func (pf PeerFeedback) String() string

String returns a string representation of peer feedback.

type Request added in v0.2300.0

type Request struct {
	Method string      `json:"method"`
	Args   interface{} `json:"args"`
}

Request is an EnclaveRPC request.

type Response added in v0.2300.0

type Response struct {
	Body Body `json:"body"`
}

Response is an EnclaveRPC response.

Jump to

Keyboard shortcuts

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