loggerv1alpha1

package
v0.16.3 Latest Latest
Warning

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

Go to latest
Published: Dec 4, 2023 License: GPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_logger_v1alpha1_log_proto protoreflect.FileDescriptor
View Source
var LoggerAPI_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "logger.v1alpha1.LoggerAPI",
	HandlerType: (*LoggerAPIServer)(nil),
	Methods:     []grpc.MethodDesc{},
	Streams: []grpc.StreamDesc{
		{
			StreamName:    "Write",
			Handler:       _LoggerAPI_Write_Handler,
			ClientStreams: true,
		},
		{
			StreamName:    "Read",
			Handler:       _LoggerAPI_Read_Handler,
			ServerStreams: true,
		},
		{
			StreamName:    "WatchList",
			Handler:       _LoggerAPI_WatchList_Handler,
			ServerStreams: true,
		},
	},
	Metadata: "logger/v1alpha1/log.proto",
}

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

Functions

func RegisterLoggerAPIServer

func RegisterLoggerAPIServer(s grpc.ServiceRegistrar, srv LoggerAPIServer)

Types

type LoggerAPIClient

type LoggerAPIClient interface {
	Write(ctx context.Context, opts ...grpc.CallOption) (LoggerAPI_WriteClient, error)
	Read(ctx context.Context, in *ReadRequest, opts ...grpc.CallOption) (LoggerAPI_ReadClient, error)
	WatchList(ctx context.Context, in *WatchListRequest, opts ...grpc.CallOption) (LoggerAPI_WatchListClient, error)
}

LoggerAPIClient is the client API for LoggerAPI 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 NewLoggerAPIClient

func NewLoggerAPIClient(cc grpc.ClientConnInterface) LoggerAPIClient

type LoggerAPIServer

type LoggerAPIServer interface {
	Write(LoggerAPI_WriteServer) error
	Read(*ReadRequest, LoggerAPI_ReadServer) error
	WatchList(*WatchListRequest, LoggerAPI_WatchListServer) error
	// contains filtered or unexported methods
}

LoggerAPIServer is the server API for LoggerAPI service. All implementations must embed UnimplementedLoggerAPIServer for forward compatibility

type LoggerAPI_ReadClient

type LoggerAPI_ReadClient interface {
	Recv() (*ReadResponse, error)
	grpc.ClientStream
}

type LoggerAPI_ReadServer

type LoggerAPI_ReadServer interface {
	Send(*ReadResponse) error
	grpc.ServerStream
}

type LoggerAPI_WatchListClient

type LoggerAPI_WatchListClient interface {
	Recv() (*WatchListResponse, error)
	grpc.ClientStream
}

type LoggerAPI_WatchListServer

type LoggerAPI_WatchListServer interface {
	Send(*WatchListResponse) error
	grpc.ServerStream
}

type LoggerAPI_WriteClient

type LoggerAPI_WriteClient interface {
	Send(*WriteRequest) error
	CloseAndRecv() (*WriteResponse, error)
	grpc.ClientStream
}

type LoggerAPI_WriteServer

type LoggerAPI_WriteServer interface {
	SendAndClose(*WriteResponse) error
	Recv() (*WriteRequest, error)
	grpc.ServerStream
}

type ReadRequest

type ReadRequest struct {
	Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"`
	LogName string `protobuf:"bytes,2,opt,name=log_name,json=logName,proto3" json:"log_name,omitempty"`
	// / timestamp of the log (in nanoseconds)
	Timestamp uint64 `protobuf:"varint,3,opt,name=timestamp,proto3" json:"timestamp,omitempty"`
	// signedHash = sign(hash('read:'+address + '/' + log_name + '/' + timestamp))
	SignedHash []byte `protobuf:"bytes,4,opt,name=signed_hash,json=signedHash,proto3" json:"signed_hash,omitempty"`
	// contains filtered or unexported fields
}

func (*ReadRequest) Descriptor deprecated

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

Deprecated: Use ReadRequest.ProtoReflect.Descriptor instead.

func (*ReadRequest) GetAddress

func (x *ReadRequest) GetAddress() string

func (*ReadRequest) GetLogName

func (x *ReadRequest) GetLogName() string

func (*ReadRequest) GetSignedHash

func (x *ReadRequest) GetSignedHash() []byte

func (*ReadRequest) GetTimestamp

func (x *ReadRequest) GetTimestamp() uint64

func (*ReadRequest) ProtoMessage

func (*ReadRequest) ProtoMessage()

func (*ReadRequest) ProtoReflect

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

func (*ReadRequest) Reset

func (x *ReadRequest) Reset()

func (*ReadRequest) String

func (x *ReadRequest) String() string

type ReadResponse

type ReadResponse struct {

	// / data is the actual log
	Data []byte `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"`
	// / timestamp of the log (in nanoseconds)
	Timestamp int64 `protobuf:"varint,2,opt,name=timestamp,proto3" json:"timestamp,omitempty"`
	// contains filtered or unexported fields
}

func (*ReadResponse) Descriptor deprecated

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

Deprecated: Use ReadResponse.ProtoReflect.Descriptor instead.

func (*ReadResponse) GetData

func (x *ReadResponse) GetData() []byte

func (*ReadResponse) GetTimestamp

func (x *ReadResponse) GetTimestamp() int64

func (*ReadResponse) ProtoMessage

func (*ReadResponse) ProtoMessage()

func (*ReadResponse) ProtoReflect

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

func (*ReadResponse) Reset

func (x *ReadResponse) Reset()

func (*ReadResponse) String

func (x *ReadResponse) String() string

type UnimplementedLoggerAPIServer

type UnimplementedLoggerAPIServer struct {
}

UnimplementedLoggerAPIServer must be embedded to have forward compatible implementations.

func (UnimplementedLoggerAPIServer) Read

func (UnimplementedLoggerAPIServer) WatchList

func (UnimplementedLoggerAPIServer) Write

type UnsafeLoggerAPIServer

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

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

type WatchListRequest

type WatchListRequest struct {
	Address   string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"`
	Timestamp uint64 `protobuf:"varint,2,opt,name=timestamp,proto3" json:"timestamp,omitempty"`
	// signedHash = sign(hash('watchList:'+address + '/' + timestamp))
	SignedHash []byte `protobuf:"bytes,3,opt,name=signed_hash,json=signedHash,proto3" json:"signed_hash,omitempty"`
	// contains filtered or unexported fields
}

func (*WatchListRequest) Descriptor deprecated

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

Deprecated: Use WatchListRequest.ProtoReflect.Descriptor instead.

func (*WatchListRequest) GetAddress

func (x *WatchListRequest) GetAddress() string

func (*WatchListRequest) GetSignedHash

func (x *WatchListRequest) GetSignedHash() []byte

func (*WatchListRequest) GetTimestamp

func (x *WatchListRequest) GetTimestamp() uint64

func (*WatchListRequest) ProtoMessage

func (*WatchListRequest) ProtoMessage()

func (*WatchListRequest) ProtoReflect

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

func (*WatchListRequest) Reset

func (x *WatchListRequest) Reset()

func (*WatchListRequest) String

func (x *WatchListRequest) String() string

type WatchListResponse

type WatchListResponse struct {
	LogNames []string `protobuf:"bytes,1,rep,name=log_names,json=logNames,proto3" json:"log_names,omitempty"`
	// contains filtered or unexported fields
}

func (*WatchListResponse) Descriptor deprecated

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

Deprecated: Use WatchListResponse.ProtoReflect.Descriptor instead.

func (*WatchListResponse) GetLogNames

func (x *WatchListResponse) GetLogNames() []string

func (*WatchListResponse) ProtoMessage

func (*WatchListResponse) ProtoMessage()

func (*WatchListResponse) ProtoReflect

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

func (*WatchListResponse) Reset

func (x *WatchListResponse) Reset()

func (*WatchListResponse) String

func (x *WatchListResponse) String() string

type WriteRequest

type WriteRequest struct {

	// / log_name is used as key for the logs
	LogName string `protobuf:"bytes,1,opt,name=log_name,json=logName,proto3" json:"log_name,omitempty"`
	// / user represents the owner of the logs
	User string `protobuf:"bytes,2,opt,name=user,proto3" json:"user,omitempty"`
	// / data is the actual log
	Data []byte `protobuf:"bytes,3,opt,name=data,proto3" json:"data,omitempty"`
	// / timestamp of the log (in nanoseconds)
	Timestamp int64 `protobuf:"varint,4,opt,name=timestamp,proto3" json:"timestamp,omitempty"`
	// contains filtered or unexported fields
}

func (*WriteRequest) Descriptor deprecated

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

Deprecated: Use WriteRequest.ProtoReflect.Descriptor instead.

func (*WriteRequest) GetData

func (x *WriteRequest) GetData() []byte

func (*WriteRequest) GetLogName

func (x *WriteRequest) GetLogName() string

func (*WriteRequest) GetTimestamp

func (x *WriteRequest) GetTimestamp() int64

func (*WriteRequest) GetUser

func (x *WriteRequest) GetUser() string

func (*WriteRequest) ProtoMessage

func (*WriteRequest) ProtoMessage()

func (*WriteRequest) ProtoReflect

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

func (*WriteRequest) Reset

func (x *WriteRequest) Reset()

func (*WriteRequest) String

func (x *WriteRequest) String() string

type WriteResponse

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

func (*WriteResponse) Descriptor deprecated

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

Deprecated: Use WriteResponse.ProtoReflect.Descriptor instead.

func (*WriteResponse) ProtoMessage

func (*WriteResponse) ProtoMessage()

func (*WriteResponse) ProtoReflect

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

func (*WriteResponse) Reset

func (x *WriteResponse) Reset()

func (*WriteResponse) String

func (x *WriteResponse) String() string

Jump to

Keyboard shortcuts

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