Documentation
¶
Index ¶
- Variables
- func RegisterStorageServer(s *grpc.Server, srv StorageServer)
- type GetReplay
- type GetRequest
- type LenReplay
- type LenRequest
- type Page
- type StorageClient
- type StorageServer
- type StoreReply
- type StoreRequest
- func (*StoreRequest) Descriptor() ([]byte, []int)deprecated
- func (x *StoreRequest) GetApi() string
- func (x *StoreRequest) GetPage() *Page
- func (*StoreRequest) ProtoMessage()
- func (x *StoreRequest) ProtoReflect() protoreflect.Message
- func (x *StoreRequest) Reset()
- func (x *StoreRequest) String() string
- type UnimplementedStorageServer
- type UnsafeStorageServer
Constants ¶
This section is empty.
Variables ¶
var File_api_proto_storage_proto protoreflect.FileDescriptor
Functions ¶
func RegisterStorageServer ¶
func RegisterStorageServer(s *grpc.Server, srv StorageServer)
Types ¶
type GetReplay ¶
type GetReplay struct { Data []byte `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"` Result bool `protobuf:"varint,2,opt,name=result,proto3" json:"result,omitempty"` // contains filtered or unexported fields }
Tre replay message
func (*GetReplay) Descriptor
deprecated
func (*GetReplay) ProtoMessage ¶
func (*GetReplay) ProtoMessage()
func (*GetReplay) ProtoReflect ¶
func (x *GetReplay) ProtoReflect() protoreflect.Message
type GetRequest ¶
type GetRequest struct { Hash string `protobuf:"bytes,1,opt,name=hash,proto3" json:"hash,omitempty"` // contains filtered or unexported fields }
The request message
func (*GetRequest) Descriptor
deprecated
func (*GetRequest) Descriptor() ([]byte, []int)
Deprecated: Use GetRequest.ProtoReflect.Descriptor instead.
func (*GetRequest) GetHash ¶
func (x *GetRequest) GetHash() 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 LenReplay ¶
type LenReplay struct { Length int32 `protobuf:"varint,1,opt,name=length,proto3" json:"length,omitempty"` // contains filtered or unexported fields }
func (*LenReplay) Descriptor
deprecated
func (*LenReplay) ProtoMessage ¶
func (*LenReplay) ProtoMessage()
func (*LenReplay) ProtoReflect ¶
func (x *LenReplay) ProtoReflect() protoreflect.Message
type LenRequest ¶
type LenRequest struct {
// contains filtered or unexported fields
}
func (*LenRequest) Descriptor
deprecated
func (*LenRequest) Descriptor() ([]byte, []int)
Deprecated: Use LenRequest.ProtoReflect.Descriptor instead.
func (*LenRequest) ProtoMessage ¶
func (*LenRequest) ProtoMessage()
func (*LenRequest) ProtoReflect ¶
func (x *LenRequest) ProtoReflect() protoreflect.Message
func (*LenRequest) Reset ¶
func (x *LenRequest) Reset()
func (*LenRequest) String ¶
func (x *LenRequest) String() string
type Page ¶
type Page struct { // Hash of uri Hash string `protobuf:"bytes,1,opt,name=hash,proto3" json:"hash,omitempty"` Data []byte `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"` // Date and time to remind the storage CreatedAt *timestamp.Timestamp `protobuf:"bytes,3,opt,name=createdAt,proto3" json:"createdAt,omitempty"` // contains filtered or unexported fields }
func (*Page) Descriptor
deprecated
func (*Page) GetCreatedAt ¶
func (*Page) ProtoMessage ¶
func (*Page) ProtoMessage()
func (*Page) ProtoReflect ¶
func (x *Page) ProtoReflect() protoreflect.Message
type StorageClient ¶
type StorageClient interface { // Sends a store request message Store(ctx context.Context, in *StoreRequest, opts ...grpc.CallOption) (*StoreReply, error) // Get a request from storage Get(ctx context.Context, in *GetRequest, opts ...grpc.CallOption) (*GetReplay, error) // Len(ctx context.Context, in *LenRequest, opts ...grpc.CallOption) (*LenReplay, error) }
StorageClient is the client API for Storage 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 NewStorageClient ¶
func NewStorageClient(cc grpc.ClientConnInterface) StorageClient
type StorageServer ¶
type StorageServer interface { // Sends a store request message Store(context.Context, *StoreRequest) (*StoreReply, error) // Get a request from storage Get(context.Context, *GetRequest) (*GetReplay, error) // Len(context.Context, *LenRequest) (*LenReplay, error) // contains filtered or unexported methods }
StorageServer is the server API for Storage service. All implementations must embed UnimplementedStorageServer for forward compatibility
type StoreReply ¶
type StoreReply struct { Api string `protobuf:"bytes,1,opt,name=api,proto3" json:"api,omitempty"` // contains filtered or unexported fields }
The response message containing body
func (*StoreReply) Descriptor
deprecated
func (*StoreReply) Descriptor() ([]byte, []int)
Deprecated: Use StoreReply.ProtoReflect.Descriptor instead.
func (*StoreReply) GetApi ¶
func (x *StoreReply) GetApi() string
func (*StoreReply) ProtoMessage ¶
func (*StoreReply) ProtoMessage()
func (*StoreReply) ProtoReflect ¶
func (x *StoreReply) ProtoReflect() protoreflect.Message
func (*StoreReply) Reset ¶
func (x *StoreReply) Reset()
func (*StoreReply) String ¶
func (x *StoreReply) String() string
type StoreRequest ¶
type StoreRequest struct { Api string `protobuf:"bytes,1,opt,name=api,proto3" json:"api,omitempty"` // Page entity to add Page *Page `protobuf:"bytes,2,opt,name=page,proto3" json:"page,omitempty"` // contains filtered or unexported fields }
The request message containing body.
func (*StoreRequest) Descriptor
deprecated
func (*StoreRequest) Descriptor() ([]byte, []int)
Deprecated: Use StoreRequest.ProtoReflect.Descriptor instead.
func (*StoreRequest) GetApi ¶
func (x *StoreRequest) GetApi() string
func (*StoreRequest) GetPage ¶
func (x *StoreRequest) GetPage() *Page
func (*StoreRequest) ProtoMessage ¶
func (*StoreRequest) ProtoMessage()
func (*StoreRequest) ProtoReflect ¶
func (x *StoreRequest) ProtoReflect() protoreflect.Message
func (*StoreRequest) Reset ¶
func (x *StoreRequest) Reset()
func (*StoreRequest) String ¶
func (x *StoreRequest) String() string
type UnimplementedStorageServer ¶
type UnimplementedStorageServer struct { }
UnimplementedStorageServer must be embedded to have forward compatible implementations.
func (UnimplementedStorageServer) Get ¶
func (UnimplementedStorageServer) Get(context.Context, *GetRequest) (*GetReplay, error)
func (UnimplementedStorageServer) Len ¶
func (UnimplementedStorageServer) Len(context.Context, *LenRequest) (*LenReplay, error)
func (UnimplementedStorageServer) Store ¶
func (UnimplementedStorageServer) Store(context.Context, *StoreRequest) (*StoreReply, error)
type UnsafeStorageServer ¶
type UnsafeStorageServer interface {
// contains filtered or unexported methods
}
UnsafeStorageServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to StorageServer will result in compilation errors.