trustvectorpb

package
v0.0.0-...-6f410cc Latest Latest
Warning

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

Go to latest
Published: Sep 15, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Service_Create_FullMethodName = "/trustvector.Service/Create"
	Service_Get_FullMethodName    = "/trustvector.Service/Get"
	Service_Update_FullMethodName = "/trustvector.Service/Update"
	Service_Flush_FullMethodName  = "/trustvector.Service/Flush"
	Service_Delete_FullMethodName = "/trustvector.Service/Delete"
)

Variables

View Source
var File_trustvector_proto protoreflect.FileDescriptor
View Source
var Service_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "trustvector.Service",
	HandlerType: (*ServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Create",
			Handler:    _Service_Create_Handler,
		},
		{
			MethodName: "Update",
			Handler:    _Service_Update_Handler,
		},
		{
			MethodName: "Flush",
			Handler:    _Service_Flush_Handler,
		},
		{
			MethodName: "Delete",
			Handler:    _Service_Delete_Handler,
		},
	},
	Streams: []grpc.StreamDesc{
		{
			StreamName:    "Get",
			Handler:       _Service_Get_Handler,
			ServerStreams: true,
		},
	},
	Metadata: "trustvector.proto",
}

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

Functions

func RegisterServiceServer

func RegisterServiceServer(s grpc.ServiceRegistrar, srv ServiceServer)

Types

type CreateRequest

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

func (*CreateRequest) Descriptor deprecated

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

Deprecated: Use CreateRequest.ProtoReflect.Descriptor instead.

func (*CreateRequest) GetId

func (x *CreateRequest) GetId() string

func (*CreateRequest) ProtoMessage

func (*CreateRequest) ProtoMessage()

func (*CreateRequest) ProtoReflect

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

func (*CreateRequest) Reset

func (x *CreateRequest) Reset()

func (*CreateRequest) String

func (x *CreateRequest) String() string

type CreateResponse

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

func (*CreateResponse) Descriptor deprecated

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

Deprecated: Use CreateResponse.ProtoReflect.Descriptor instead.

func (*CreateResponse) GetId

func (x *CreateResponse) GetId() string

func (*CreateResponse) ProtoMessage

func (*CreateResponse) ProtoMessage()

func (*CreateResponse) ProtoReflect

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

func (*CreateResponse) Reset

func (x *CreateResponse) Reset()

func (*CreateResponse) String

func (x *CreateResponse) String() string

type DeleteRequest

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

func (*DeleteRequest) Descriptor deprecated

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

Deprecated: Use DeleteRequest.ProtoReflect.Descriptor instead.

func (*DeleteRequest) GetId

func (x *DeleteRequest) GetId() string

func (*DeleteRequest) ProtoMessage

func (*DeleteRequest) ProtoMessage()

func (*DeleteRequest) ProtoReflect

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

func (*DeleteRequest) Reset

func (x *DeleteRequest) Reset()

func (*DeleteRequest) String

func (x *DeleteRequest) String() string

type DeleteResponse

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

func (*DeleteResponse) Descriptor deprecated

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

Deprecated: Use DeleteResponse.ProtoReflect.Descriptor instead.

func (*DeleteResponse) ProtoMessage

func (*DeleteResponse) ProtoMessage()

func (*DeleteResponse) ProtoReflect

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

func (*DeleteResponse) Reset

func (x *DeleteResponse) Reset()

func (*DeleteResponse) String

func (x *DeleteResponse) String() string

type Destination

type Destination struct {

	// Destination location scheme.
	Scheme string `protobuf:"bytes,1,opt,name=scheme,proto3" json:"scheme,omitempty"`
	// Scheme-specific parameters.
	Params *anypb.Any `protobuf:"bytes,2,opt,name=params,proto3" json:"params,omitempty"`
	// contains filtered or unexported fields
}

Trust vector destination, i.e. where to publish.

func (*Destination) Descriptor deprecated

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

Deprecated: Use Destination.ProtoReflect.Descriptor instead.

func (*Destination) GetParams

func (x *Destination) GetParams() *anypb.Any

func (*Destination) GetScheme

func (x *Destination) GetScheme() string

func (*Destination) ProtoMessage

func (*Destination) ProtoMessage()

func (*Destination) ProtoReflect

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

func (*Destination) Reset

func (x *Destination) Reset()

func (*Destination) String

func (x *Destination) String() string

type Entry

type Entry struct {
	Trustee string  `protobuf:"bytes,1,opt,name=trustee,proto3" json:"trustee,omitempty"`
	Value   float64 `protobuf:"fixed64,2,opt,name=value,proto3" json:"value,omitempty"`
	// contains filtered or unexported fields
}

func (*Entry) Descriptor deprecated

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

Deprecated: Use Entry.ProtoReflect.Descriptor instead.

func (*Entry) GetTrustee

func (x *Entry) GetTrustee() string

func (*Entry) GetValue

func (x *Entry) GetValue() float64

func (*Entry) ProtoMessage

func (*Entry) ProtoMessage()

func (*Entry) ProtoReflect

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

func (*Entry) Reset

func (x *Entry) Reset()

func (*Entry) String

func (x *Entry) String() string

type FlushRequest

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

func (*FlushRequest) Descriptor deprecated

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

Deprecated: Use FlushRequest.ProtoReflect.Descriptor instead.

func (*FlushRequest) GetId

func (x *FlushRequest) GetId() string

func (*FlushRequest) ProtoMessage

func (*FlushRequest) ProtoMessage()

func (*FlushRequest) ProtoReflect

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

func (*FlushRequest) Reset

func (x *FlushRequest) Reset()

func (*FlushRequest) String

func (x *FlushRequest) String() string

type FlushResponse

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

func (*FlushResponse) Descriptor deprecated

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

Deprecated: Use FlushResponse.ProtoReflect.Descriptor instead.

func (*FlushResponse) ProtoMessage

func (*FlushResponse) ProtoMessage()

func (*FlushResponse) ProtoReflect

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

func (*FlushResponse) Reset

func (x *FlushResponse) Reset()

func (*FlushResponse) String

func (x *FlushResponse) String() string

type GetRequest

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

func (*GetRequest) Descriptor deprecated

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

Deprecated: Use GetRequest.ProtoReflect.Descriptor instead.

func (*GetRequest) GetId

func (x *GetRequest) GetId() string

func (*GetRequest) ProtoMessage

func (*GetRequest) ProtoMessage()

func (*GetRequest) ProtoReflect

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

func (*GetRequest) Reset

func (x *GetRequest) Reset()

func (*GetRequest) String

func (x *GetRequest) String() string

type GetResponse

type GetResponse struct {

	// Types that are assignable to Part:
	//
	//	*GetResponse_Header
	//	*GetResponse_Entry
	Part isGetResponse_Part `protobuf_oneof:"part"`
	// contains filtered or unexported fields
}

func (*GetResponse) Descriptor deprecated

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

Deprecated: Use GetResponse.ProtoReflect.Descriptor instead.

func (*GetResponse) GetEntry

func (x *GetResponse) GetEntry() *Entry

func (*GetResponse) GetHeader

func (x *GetResponse) GetHeader() *Header

func (*GetResponse) GetPart

func (m *GetResponse) GetPart() isGetResponse_Part

func (*GetResponse) ProtoMessage

func (*GetResponse) ProtoMessage()

func (*GetResponse) ProtoReflect

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

func (*GetResponse) Reset

func (x *GetResponse) Reset()

func (*GetResponse) String

func (x *GetResponse) String() string

type GetResponse_Entry

type GetResponse_Entry struct {
	Entry *Entry `protobuf:"bytes,2,opt,name=entry,proto3,oneof"`
}

type GetResponse_Header

type GetResponse_Header struct {
	Header *Header `protobuf:"bytes,1,opt,name=header,proto3,oneof"`
}
type Header struct {
	Id              *string  `protobuf:"bytes,1,opt,name=id,proto3,oneof" json:"id,omitempty"`
	TimestampQwords []uint64 `protobuf:"varint,2,rep,packed,name=timestamp_qwords,json=timestampQwords,proto3" json:"timestamp_qwords,omitempty"`
	// contains filtered or unexported fields
}

func (*Header) Descriptor deprecated

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

Deprecated: Use Header.ProtoReflect.Descriptor instead.

func (*Header) GetId

func (x *Header) GetId() string

func (*Header) GetTimestampQwords

func (x *Header) GetTimestampQwords() []uint64

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 ServiceClient

type ServiceClient interface {
	// Create a new trust vector (for pre-trust and global trust), return its ID.
	Create(ctx context.Context, in *CreateRequest, opts ...grpc.CallOption) (*CreateResponse, error)
	// Get the full contents of a trust vector.
	// The header is setn first (includes metadata such as timestamp),
	// followed by non-zero entries.
	Get(ctx context.Context, in *GetRequest, opts ...grpc.CallOption) (Service_GetClient, error)
	// Update a trust vector.
	// Entries for the same vector with the same timestamp can be batched
	// in the same request.
	// Updates cannot go back in time:
	// An update older than the target vector is rejected.
	Update(ctx context.Context, in *UpdateRequest, opts ...grpc.CallOption) (*UpdateResponse, error)
	// Flush a trust vector, i.e. remove (zero out) all its entries.
	Flush(ctx context.Context, in *FlushRequest, opts ...grpc.CallOption) (*FlushResponse, error)
	// Delete a trust vector altogether.
	Delete(ctx context.Context, in *DeleteRequest, opts ...grpc.CallOption) (*DeleteResponse, error)
}

ServiceClient is the client API for Service 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.

func NewServiceClient

func NewServiceClient(cc grpc.ClientConnInterface) ServiceClient

type ServiceServer

type ServiceServer interface {
	// Create a new trust vector (for pre-trust and global trust), return its ID.
	Create(context.Context, *CreateRequest) (*CreateResponse, error)
	// Get the full contents of a trust vector.
	// The header is setn first (includes metadata such as timestamp),
	// followed by non-zero entries.
	Get(*GetRequest, Service_GetServer) error
	// Update a trust vector.
	// Entries for the same vector with the same timestamp can be batched
	// in the same request.
	// Updates cannot go back in time:
	// An update older than the target vector is rejected.
	Update(context.Context, *UpdateRequest) (*UpdateResponse, error)
	// Flush a trust vector, i.e. remove (zero out) all its entries.
	Flush(context.Context, *FlushRequest) (*FlushResponse, error)
	// Delete a trust vector altogether.
	Delete(context.Context, *DeleteRequest) (*DeleteResponse, error)
	// contains filtered or unexported methods
}

ServiceServer is the server API for Service service. All implementations must embed UnimplementedServiceServer for forward compatibility

type Service_GetClient

type Service_GetClient interface {
	Recv() (*GetResponse, error)
	grpc.ClientStream
}

type Service_GetServer

type Service_GetServer interface {
	Send(*GetResponse) error
	grpc.ServerStream
}

type UnimplementedServiceServer

type UnimplementedServiceServer struct {
}

UnimplementedServiceServer must be embedded to have forward compatible implementations.

func (UnimplementedServiceServer) Create

func (UnimplementedServiceServer) Delete

func (UnimplementedServiceServer) Flush

func (UnimplementedServiceServer) Get

func (UnimplementedServiceServer) Update

type UnsafeServiceServer

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

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

type UpdateRequest

type UpdateRequest struct {
	Header  *Header  `protobuf:"bytes,1,opt,name=header,proto3" json:"header,omitempty"`
	Entries []*Entry `protobuf:"bytes,2,rep,name=entries,proto3" json:"entries,omitempty"`
	// contains filtered or unexported fields
}

func (*UpdateRequest) Descriptor deprecated

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

Deprecated: Use UpdateRequest.ProtoReflect.Descriptor instead.

func (*UpdateRequest) GetEntries

func (x *UpdateRequest) GetEntries() []*Entry

func (*UpdateRequest) GetHeader

func (x *UpdateRequest) GetHeader() *Header

func (*UpdateRequest) ProtoMessage

func (*UpdateRequest) ProtoMessage()

func (*UpdateRequest) ProtoReflect

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

func (*UpdateRequest) Reset

func (x *UpdateRequest) Reset()

func (*UpdateRequest) String

func (x *UpdateRequest) String() string

type UpdateResponse

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

func (*UpdateResponse) Descriptor deprecated

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

Deprecated: Use UpdateResponse.ProtoReflect.Descriptor instead.

func (*UpdateResponse) ProtoMessage

func (*UpdateResponse) ProtoMessage()

func (*UpdateResponse) ProtoReflect

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

func (*UpdateResponse) Reset

func (x *UpdateResponse) Reset()

func (*UpdateResponse) String

func (x *UpdateResponse) String() string

Jump to

Keyboard shortcuts

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