storage

package
v0.0.0-...-983d1bf Latest Latest
Warning

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

Go to latest
Published: Feb 6, 2022 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
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) Descriptor() ([]byte, []int)

Deprecated: Use GetReplay.ProtoReflect.Descriptor instead.

func (*GetReplay) GetData

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

func (*GetReplay) GetResult

func (x *GetReplay) GetResult() bool

func (*GetReplay) ProtoMessage

func (*GetReplay) ProtoMessage()

func (*GetReplay) ProtoReflect

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

func (*GetReplay) Reset

func (x *GetReplay) Reset()

func (*GetReplay) String

func (x *GetReplay) String() string

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) Descriptor() ([]byte, []int)

Deprecated: Use LenReplay.ProtoReflect.Descriptor instead.

func (*LenReplay) GetLength

func (x *LenReplay) GetLength() int32

func (*LenReplay) ProtoMessage

func (*LenReplay) ProtoMessage()

func (*LenReplay) ProtoReflect

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

func (*LenReplay) Reset

func (x *LenReplay) Reset()

func (*LenReplay) String

func (x *LenReplay) String() string

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) Descriptor() ([]byte, []int)

Deprecated: Use Page.ProtoReflect.Descriptor instead.

func (*Page) GetCreatedAt

func (x *Page) GetCreatedAt() *timestamp.Timestamp

func (*Page) GetData

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

func (*Page) GetHash

func (x *Page) GetHash() string

func (*Page) ProtoMessage

func (*Page) ProtoMessage()

func (*Page) ProtoReflect

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

func (*Page) Reset

func (x *Page) Reset()

func (*Page) String

func (x *Page) String() string

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) Len

func (UnimplementedStorageServer) Store

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.

Jump to

Keyboard shortcuts

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