protos

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Oct 2, 2025 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ViewService_ProcessCommand_FullMethodName = "/protos.ViewService/ProcessCommand"
	ViewService_StreamCommand_FullMethodName  = "/protos.ViewService/StreamCommand"
)

Variables

View Source
var File_commands_proto protoreflect.FileDescriptor
View Source
var File_service_proto protoreflect.FileDescriptor
View Source
var ViewService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "protos.ViewService",
	HandlerType: (*ViewServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "ProcessCommand",
			Handler:    _ViewService_ProcessCommand_Handler,
		},
	},
	Streams: []grpc.StreamDesc{
		{
			StreamName:    "StreamCommand",
			Handler:       _ViewService_StreamCommand_Handler,
			ServerStreams: true,
			ClientStreams: true,
		},
	},
	Metadata: "service.proto",
}

ViewService_ServiceDesc is the grpc.ServiceDesc for ViewService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)

Functions

func RegisterViewServiceServer

func RegisterViewServiceServer(s grpc.ServiceRegistrar, srv ViewServiceServer)

Types

type CallView

type CallView struct {
	Fid   string `protobuf:"bytes,1,opt,name=fid,proto3" json:"fid,omitempty"`
	Input []byte `protobuf:"bytes,2,opt,name=input,proto3" json:"input,omitempty"`
	// contains filtered or unexported fields
}

InitiateView is used to initiate a view

func (*CallView) Descriptor deprecated

func (*CallView) Descriptor() ([]byte, []int)

Deprecated: Use CallView.ProtoReflect.Descriptor instead.

func (*CallView) GetFid

func (x *CallView) GetFid() string

func (*CallView) GetInput

func (x *CallView) GetInput() []byte

func (*CallView) ProtoMessage

func (*CallView) ProtoMessage()

func (*CallView) ProtoReflect

func (x *CallView) ProtoReflect() protoreflect.Message

func (*CallView) Reset

func (x *CallView) Reset()

func (*CallView) String

func (x *CallView) String() string

type CallViewResponse

type CallViewResponse struct {
	Result []byte `protobuf:"bytes,1,opt,name=result,proto3" json:"result,omitempty"`
	// contains filtered or unexported fields
}

func (*CallViewResponse) Descriptor deprecated

func (*CallViewResponse) Descriptor() ([]byte, []int)

Deprecated: Use CallViewResponse.ProtoReflect.Descriptor instead.

func (*CallViewResponse) GetResult

func (x *CallViewResponse) GetResult() []byte

func (*CallViewResponse) ProtoMessage

func (*CallViewResponse) ProtoMessage()

func (*CallViewResponse) ProtoReflect

func (x *CallViewResponse) ProtoReflect() protoreflect.Message

func (*CallViewResponse) Reset

func (x *CallViewResponse) Reset()

func (*CallViewResponse) String

func (x *CallViewResponse) String() string

type Command

type Command struct {

	// Header is the header of this command
	Header *Header `protobuf:"bytes,1,opt,name=header,proto3" json:"header,omitempty"`
	// Payload is the payload of this command. It can assume one of the following value
	//
	// Types that are assignable to Payload:
	//
	//	*Command_InitiateView
	//	*Command_CallView
	Payload isCommand_Payload `protobuf_oneof:"payload"`
	// contains filtered or unexported fields
}

Command describes the type of operation that a client is requesting.

func (*Command) Descriptor deprecated

func (*Command) Descriptor() ([]byte, []int)

Deprecated: Use Command.ProtoReflect.Descriptor instead.

func (*Command) GetCallView

func (x *Command) GetCallView() *CallView

func (*Command) GetHeader

func (x *Command) GetHeader() *Header

func (*Command) GetInitiateView

func (x *Command) GetInitiateView() *InitiateView

func (*Command) GetPayload

func (m *Command) GetPayload() isCommand_Payload

func (*Command) ProtoMessage

func (*Command) ProtoMessage()

func (*Command) ProtoReflect

func (x *Command) ProtoReflect() protoreflect.Message

func (*Command) Reset

func (x *Command) Reset()

func (*Command) String

func (x *Command) String() string

type CommandResponse

type CommandResponse struct {

	// Header of the response.
	Header *CommandResponseHeader `protobuf:"bytes,1,opt,name=header,proto3" json:"header,omitempty"`
	// Payload of the response.
	//
	// Types that are assignable to Payload:
	//
	//	*CommandResponse_Err
	//	*CommandResponse_InitiateViewResponse
	//	*CommandResponse_CallViewResponse
	Payload isCommandResponse_Payload `protobuf_oneof:"payload"`
	// contains filtered or unexported fields
}

A CommnandResponse is returned from a server to the command submitter.

func (*CommandResponse) Descriptor deprecated

func (*CommandResponse) Descriptor() ([]byte, []int)

Deprecated: Use CommandResponse.ProtoReflect.Descriptor instead.

func (*CommandResponse) GetCallViewResponse

func (x *CommandResponse) GetCallViewResponse() *CallViewResponse

func (*CommandResponse) GetErr

func (x *CommandResponse) GetErr() *Error

func (*CommandResponse) GetHeader

func (x *CommandResponse) GetHeader() *CommandResponseHeader

func (*CommandResponse) GetInitiateViewResponse

func (x *CommandResponse) GetInitiateViewResponse() *InitiateViewResponse

func (*CommandResponse) GetPayload

func (m *CommandResponse) GetPayload() isCommandResponse_Payload

func (*CommandResponse) ProtoMessage

func (*CommandResponse) ProtoMessage()

func (*CommandResponse) ProtoReflect

func (x *CommandResponse) ProtoReflect() protoreflect.Message

func (*CommandResponse) Reset

func (x *CommandResponse) Reset()

func (*CommandResponse) String

func (x *CommandResponse) String() string

type CommandResponseHeader

type CommandResponseHeader struct {

	// Timestamp is the time that the message
	// was created as  defined by the sender
	Timestamp *timestamppb.Timestamp `protobuf:"bytes,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"`
	// CommandHash is the hash computed on the concatenation of the SignedCommand's command and signature fields.
	// If not specified differently, SHA256 is used
	// The hash is used to link a response with its request, both for bookeeping purposes on an
	// asynchronous system and for security reasons (accountability, non-repudiation)
	CommandHash []byte `protobuf:"bytes,2,opt,name=command_hash,json=commandHash,proto3" json:"command_hash,omitempty"`
	// Creator is the identity of the party creating this message
	Creator []byte `protobuf:"bytes,3,opt,name=creator,proto3" json:"creator,omitempty"`
	// contains filtered or unexported fields
}

func (*CommandResponseHeader) Descriptor deprecated

func (*CommandResponseHeader) Descriptor() ([]byte, []int)

Deprecated: Use CommandResponseHeader.ProtoReflect.Descriptor instead.

func (*CommandResponseHeader) GetCommandHash

func (x *CommandResponseHeader) GetCommandHash() []byte

func (*CommandResponseHeader) GetCreator

func (x *CommandResponseHeader) GetCreator() []byte

func (*CommandResponseHeader) GetTimestamp

func (x *CommandResponseHeader) GetTimestamp() *timestamppb.Timestamp

func (*CommandResponseHeader) ProtoMessage

func (*CommandResponseHeader) ProtoMessage()

func (*CommandResponseHeader) ProtoReflect

func (x *CommandResponseHeader) ProtoReflect() protoreflect.Message

func (*CommandResponseHeader) Reset

func (x *CommandResponseHeader) Reset()

func (*CommandResponseHeader) String

func (x *CommandResponseHeader) String() string

type CommandResponse_CallViewResponse

type CommandResponse_CallViewResponse struct {
	CallViewResponse *CallViewResponse `protobuf:"bytes,4,opt,name=callViewResponse,proto3,oneof"`
}

type CommandResponse_Err

type CommandResponse_Err struct {
	Err *Error `protobuf:"bytes,2,opt,name=err,proto3,oneof"`
}

type CommandResponse_InitiateViewResponse

type CommandResponse_InitiateViewResponse struct {
	InitiateViewResponse *InitiateViewResponse `protobuf:"bytes,3,opt,name=initiateViewResponse,proto3,oneof"`
}

type Command_CallView

type Command_CallView struct {
	CallView *CallView `protobuf:"bytes,3,opt,name=callView,proto3,oneof"`
}

type Command_InitiateView

type Command_InitiateView struct {
	InitiateView *InitiateView `protobuf:"bytes,2,opt,name=initiateView,proto3,oneof"`
}

type Error

type Error struct {

	// Message associated with this response.
	Message string `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"`
	// Payload that can be used to include metadata with this response.
	Payload []byte `protobuf:"bytes,2,opt,name=payload,proto3" json:"payload,omitempty"`
	// contains filtered or unexported fields
}

Error reports an application error

func (*Error) Descriptor deprecated

func (*Error) Descriptor() ([]byte, []int)

Deprecated: Use Error.ProtoReflect.Descriptor instead.

func (*Error) GetMessage

func (x *Error) GetMessage() string

func (*Error) GetPayload

func (x *Error) GetPayload() []byte

func (*Error) ProtoMessage

func (*Error) ProtoMessage()

func (*Error) ProtoReflect

func (x *Error) ProtoReflect() protoreflect.Message

func (*Error) Reset

func (x *Error) Reset()

func (*Error) String

func (x *Error) String() string
type Header struct {

	// Timestamp is the local time when the message was created
	// by the sender
	Timestamp *timestamppb.Timestamp `protobuf:"bytes,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"`
	// Nonce is a sufficiently long random value
	// used to ensure the request has enough entropy.
	Nonce []byte `protobuf:"bytes,3,opt,name=nonce,proto3" json:"nonce,omitempty"`
	// Creator of the message.
	Creator []byte `protobuf:"bytes,4,opt,name=creator,proto3" json:"creator,omitempty"`
	// TlsCertHash represents the hash of the client's TLS certificate
	// when mutual TLS is enabled
	TlsCertHash []byte `protobuf:"bytes,5,opt,name=tls_cert_hash,json=tlsCertHash,proto3" json:"tls_cert_hash,omitempty"`
	// contains filtered or unexported fields
}

Header is a generic replay prevention and identity message to include in a signed command

func (*Header) Descriptor deprecated

func (*Header) Descriptor() ([]byte, []int)

Deprecated: Use Header.ProtoReflect.Descriptor instead.

func (*Header) GetCreator

func (x *Header) GetCreator() []byte

func (*Header) GetNonce

func (x *Header) GetNonce() []byte

func (*Header) GetTimestamp

func (x *Header) GetTimestamp() *timestamppb.Timestamp

func (*Header) GetTlsCertHash

func (x *Header) GetTlsCertHash() []byte

func (*Header) ProtoMessage

func (*Header) ProtoMessage()

func (*Header) ProtoReflect

func (x *Header) ProtoReflect() protoreflect.Message

func (*Header) Reset

func (x *Header) Reset()

func (*Header) String

func (x *Header) String() string

type InitiateView

type InitiateView struct {
	Fid   string `protobuf:"bytes,1,opt,name=fid,proto3" json:"fid,omitempty"`
	Input []byte `protobuf:"bytes,2,opt,name=input,proto3" json:"input,omitempty"`
	// contains filtered or unexported fields
}

InitiateView is used to initiate a view

func (*InitiateView) Descriptor deprecated

func (*InitiateView) Descriptor() ([]byte, []int)

Deprecated: Use InitiateView.ProtoReflect.Descriptor instead.

func (*InitiateView) GetFid

func (x *InitiateView) GetFid() string

func (*InitiateView) GetInput

func (x *InitiateView) GetInput() []byte

func (*InitiateView) ProtoMessage

func (*InitiateView) ProtoMessage()

func (*InitiateView) ProtoReflect

func (x *InitiateView) ProtoReflect() protoreflect.Message

func (*InitiateView) Reset

func (x *InitiateView) Reset()

func (*InitiateView) String

func (x *InitiateView) String() string

type InitiateViewResponse

type InitiateViewResponse struct {
	Cid string `protobuf:"bytes,1,opt,name=cid,proto3" json:"cid,omitempty"`
	// contains filtered or unexported fields
}

func (*InitiateViewResponse) Descriptor deprecated

func (*InitiateViewResponse) Descriptor() ([]byte, []int)

Deprecated: Use InitiateViewResponse.ProtoReflect.Descriptor instead.

func (*InitiateViewResponse) GetCid

func (x *InitiateViewResponse) GetCid() string

func (*InitiateViewResponse) ProtoMessage

func (*InitiateViewResponse) ProtoMessage()

func (*InitiateViewResponse) ProtoReflect

func (x *InitiateViewResponse) ProtoReflect() protoreflect.Message

func (*InitiateViewResponse) Reset

func (x *InitiateViewResponse) Reset()

func (*InitiateViewResponse) String

func (x *InitiateViewResponse) String() string

type SignedCommand

type SignedCommand struct {

	// Command is the serialised version of a Command message
	Command []byte `protobuf:"bytes,1,opt,name=command,proto3" json:"command,omitempty"`
	// Signature is the signature over command
	Signature []byte `protobuf:"bytes,2,opt,name=signature,proto3" json:"signature,omitempty"`
	// contains filtered or unexported fields
}

SignedCommand is a command that carries the signature of the command's creator.

func (*SignedCommand) Descriptor deprecated

func (*SignedCommand) Descriptor() ([]byte, []int)

Deprecated: Use SignedCommand.ProtoReflect.Descriptor instead.

func (*SignedCommand) GetCommand

func (x *SignedCommand) GetCommand() []byte

func (*SignedCommand) GetSignature

func (x *SignedCommand) GetSignature() []byte

func (*SignedCommand) ProtoMessage

func (*SignedCommand) ProtoMessage()

func (*SignedCommand) ProtoReflect

func (x *SignedCommand) ProtoReflect() protoreflect.Message

func (*SignedCommand) Reset

func (x *SignedCommand) Reset()

func (*SignedCommand) String

func (x *SignedCommand) String() string

type SignedCommandResponse

type SignedCommandResponse struct {

	// Response is the serialised version of a CommandResponse message
	Response []byte `protobuf:"bytes,1,opt,name=response,proto3" json:"response,omitempty"`
	// Signature is the signature over command
	Signature []byte `protobuf:"bytes,2,opt,name=signature,proto3" json:"signature,omitempty"`
	// contains filtered or unexported fields
}

SignedCommandResponse is a signed command response

func (*SignedCommandResponse) Descriptor deprecated

func (*SignedCommandResponse) Descriptor() ([]byte, []int)

Deprecated: Use SignedCommandResponse.ProtoReflect.Descriptor instead.

func (*SignedCommandResponse) GetResponse

func (x *SignedCommandResponse) GetResponse() []byte

func (*SignedCommandResponse) GetSignature

func (x *SignedCommandResponse) GetSignature() []byte

func (*SignedCommandResponse) ProtoMessage

func (*SignedCommandResponse) ProtoMessage()

func (*SignedCommandResponse) ProtoReflect

func (x *SignedCommandResponse) ProtoReflect() protoreflect.Message

func (*SignedCommandResponse) Reset

func (x *SignedCommandResponse) Reset()

func (*SignedCommandResponse) String

func (x *SignedCommandResponse) String() string

type UnimplementedViewServiceServer

type UnimplementedViewServiceServer struct{}

UnimplementedViewServiceServer must be embedded to have forward compatible implementations.

NOTE: this should be embedded by value instead of pointer to avoid a nil pointer dereference when methods are called.

func (UnimplementedViewServiceServer) ProcessCommand

type UnsafeViewServiceServer

type UnsafeViewServiceServer interface {
	// contains filtered or unexported methods
}

UnsafeViewServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to ViewServiceServer will result in compilation errors.

type ViewServiceClient

type ViewServiceClient interface {
	// ProcessCommand processes the passed command ensuring proper access control.
	// The returned response allows the client to understand if the
	// operation was successfully executed and if not, the response
	// reports the reason of the failure.
	ProcessCommand(ctx context.Context, in *SignedCommand, opts ...grpc.CallOption) (*SignedCommandResponse, error)
	StreamCommand(ctx context.Context, opts ...grpc.CallOption) (grpc.BidiStreamingClient[SignedCommand, SignedCommandResponse], error)
}

ViewServiceClient is the client API for ViewService service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.

ViewService provides support to view management

type ViewServiceServer

type ViewServiceServer interface {
	// ProcessCommand processes the passed command ensuring proper access control.
	// The returned response allows the client to understand if the
	// operation was successfully executed and if not, the response
	// reports the reason of the failure.
	ProcessCommand(context.Context, *SignedCommand) (*SignedCommandResponse, error)
	StreamCommand(grpc.BidiStreamingServer[SignedCommand, SignedCommandResponse]) error
	// contains filtered or unexported methods
}

ViewServiceServer is the server API for ViewService service. All implementations must embed UnimplementedViewServiceServer for forward compatibility.

ViewService provides support to view management

type ViewService_StreamCommandClient

type ViewService_StreamCommandClient = grpc.BidiStreamingClient[SignedCommand, SignedCommandResponse]

This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.

type ViewService_StreamCommandServer

type ViewService_StreamCommandServer = grpc.BidiStreamingServer[SignedCommand, SignedCommandResponse]

This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.

Jump to

Keyboard shortcuts

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