grpc

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

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

Go to latest
Published: Oct 23, 2023 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ChunkGetter_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "recryptor.ChunkGetter",
	HandlerType: (*ChunkGetterServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "GetChunk",
			Handler:    _ChunkGetter_GetChunk_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "chunk_getter.proto",
}

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

View Source
var File_chunk_getter_proto protoreflect.FileDescriptor
View Source
var File_rate_limiter_proto protoreflect.FileDescriptor
View Source
var RateLimiter_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "recryptor.RateLimiter",
	HandlerType: (*RateLimiterServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "CanServe",
			Handler:    _RateLimiter_CanServe_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "rate_limiter.proto",
}

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

Functions

func RegisterChunkGetterServer

func RegisterChunkGetterServer(s grpc.ServiceRegistrar, srv ChunkGetterServer)

func RegisterRateLimiterServer

func RegisterRateLimiterServer(s grpc.ServiceRegistrar, srv RateLimiterServer)

Types

type ChunkGetterClient

type ChunkGetterClient interface {
	GetChunk(ctx context.Context, in *GetChunkRequest, opts ...grpc.CallOption) (*GetChunkReply, error)
}

ChunkGetterClient is the client API for ChunkGetter 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.

type ChunkGetterServer

type ChunkGetterServer interface {
	GetChunk(context.Context, *GetChunkRequest) (*GetChunkReply, error)
	// contains filtered or unexported methods
}

ChunkGetterServer is the server API for ChunkGetter service. All implementations must embed UnimplementedChunkGetterServer for forward compatibility

type DecryptTaskToken

type DecryptTaskToken struct {
	ExpireTime    int64  `protobuf:"varint,1,opt,name=expireTime,proto3" json:"expireTime,omitempty"`
	FileId        []byte `protobuf:"bytes,2,opt,name=fileId,proto3" json:"fileId,omitempty"`
	RecryptorSalt []byte `protobuf:"bytes,3,opt,name=recryptorSalt,proto3" json:"recryptorSalt,omitempty"`
	Secret        []byte `protobuf:"bytes,4,opt,name=secret,proto3" json:"secret,omitempty"`
	RemoteAddr    string `protobuf:"bytes,5,opt,name=remoteAddr,proto3" json:"remoteAddr,omitempty"`
	ViewerAccount []byte `protobuf:"bytes,6,opt,name=viewerAccount,proto3" json:"viewerAccount,omitempty"`
	Contract      []byte `protobuf:"bytes,7,opt,name=contract,proto3" json:"contract,omitempty"`
	// contains filtered or unexported fields
}

func (*DecryptTaskToken) Descriptor deprecated

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

Deprecated: Use DecryptTaskToken.ProtoReflect.Descriptor instead.

func (*DecryptTaskToken) GetContract

func (x *DecryptTaskToken) GetContract() []byte

func (*DecryptTaskToken) GetExpireTime

func (x *DecryptTaskToken) GetExpireTime() int64

func (*DecryptTaskToken) GetFileId

func (x *DecryptTaskToken) GetFileId() []byte

func (*DecryptTaskToken) GetRecryptorSalt

func (x *DecryptTaskToken) GetRecryptorSalt() []byte

func (*DecryptTaskToken) GetRemoteAddr

func (x *DecryptTaskToken) GetRemoteAddr() string

func (*DecryptTaskToken) GetSecret

func (x *DecryptTaskToken) GetSecret() []byte

func (*DecryptTaskToken) GetViewerAccount

func (x *DecryptTaskToken) GetViewerAccount() []byte

func (*DecryptTaskToken) ProtoMessage

func (*DecryptTaskToken) ProtoMessage()

func (*DecryptTaskToken) ProtoReflect

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

func (*DecryptTaskToken) Reset

func (x *DecryptTaskToken) Reset()

func (*DecryptTaskToken) String

func (x *DecryptTaskToken) String() string

type GetChunkReply

type GetChunkReply struct {
	ErrStr     string `protobuf:"bytes,1,opt,name=errStr,proto3" json:"errStr,omitempty"`
	Chunk      []byte `protobuf:"bytes,2,opt,name=chunk,proto3" json:"chunk,omitempty"`
	TotalBytes int64  `protobuf:"varint,3,opt,name=totalBytes,proto3" json:"totalBytes,omitempty"`
	// contains filtered or unexported fields
}

func (*GetChunkReply) Descriptor deprecated

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

Deprecated: Use GetChunkReply.ProtoReflect.Descriptor instead.

func (*GetChunkReply) GetChunk

func (x *GetChunkReply) GetChunk() []byte

func (*GetChunkReply) GetErrStr

func (x *GetChunkReply) GetErrStr() string

func (*GetChunkReply) GetTotalBytes

func (x *GetChunkReply) GetTotalBytes() int64

func (*GetChunkReply) ProtoMessage

func (*GetChunkReply) ProtoMessage()

func (*GetChunkReply) ProtoReflect

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

func (*GetChunkReply) Reset

func (x *GetChunkReply) Reset()

func (*GetChunkReply) String

func (x *GetChunkReply) String() string

type GetChunkRequest

type GetChunkRequest struct {
	Token *DecryptTaskToken `protobuf:"bytes,1,opt,name=token,proto3" json:"token,omitempty"`
	Path  string            `protobuf:"bytes,2,opt,name=path,proto3" json:"path,omitempty"`
	Index int64             `protobuf:"varint,3,opt,name=index,proto3" json:"index,omitempty"`
	// contains filtered or unexported fields
}

func (*GetChunkRequest) Descriptor deprecated

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

Deprecated: Use GetChunkRequest.ProtoReflect.Descriptor instead.

func (*GetChunkRequest) GetIndex

func (x *GetChunkRequest) GetIndex() int64

func (*GetChunkRequest) GetPath

func (x *GetChunkRequest) GetPath() string

func (*GetChunkRequest) GetToken

func (x *GetChunkRequest) GetToken() *DecryptTaskToken

func (*GetChunkRequest) ProtoMessage

func (*GetChunkRequest) ProtoMessage()

func (*GetChunkRequest) ProtoReflect

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

func (*GetChunkRequest) Reset

func (x *GetChunkRequest) Reset()

func (*GetChunkRequest) String

func (x *GetChunkRequest) String() string

type RateLimitReply

type RateLimitReply struct {
	Ok bool `protobuf:"varint,1,opt,name=ok,proto3" json:"ok,omitempty"`
	// contains filtered or unexported fields
}

func (*RateLimitReply) Descriptor deprecated

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

Deprecated: Use RateLimitReply.ProtoReflect.Descriptor instead.

func (*RateLimitReply) GetOk

func (x *RateLimitReply) GetOk() bool

func (*RateLimitReply) ProtoMessage

func (*RateLimitReply) ProtoMessage()

func (*RateLimitReply) ProtoReflect

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

func (*RateLimitReply) Reset

func (x *RateLimitReply) Reset()

func (*RateLimitReply) String

func (x *RateLimitReply) String() string

type RateLimitRequest

type RateLimitRequest struct {
	RemoteAddr string `protobuf:"bytes,1,opt,name=remoteAddr,proto3" json:"remoteAddr,omitempty"`
	Path       string `protobuf:"bytes,2,opt,name=path,proto3" json:"path,omitempty"`
	Query      string `protobuf:"bytes,3,opt,name=query,proto3" json:"query,omitempty"`
	Token      []byte `protobuf:"bytes,4,opt,name=token,proto3" json:"token,omitempty"`
	Guide      []byte `protobuf:"bytes,5,opt,name=guide,proto3" json:"guide,omitempty"`
	// contains filtered or unexported fields
}

func (*RateLimitRequest) Descriptor deprecated

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

Deprecated: Use RateLimitRequest.ProtoReflect.Descriptor instead.

func (*RateLimitRequest) GetGuide

func (x *RateLimitRequest) GetGuide() []byte

func (*RateLimitRequest) GetPath

func (x *RateLimitRequest) GetPath() string

func (*RateLimitRequest) GetQuery

func (x *RateLimitRequest) GetQuery() string

func (*RateLimitRequest) GetRemoteAddr

func (x *RateLimitRequest) GetRemoteAddr() string

func (*RateLimitRequest) GetToken

func (x *RateLimitRequest) GetToken() []byte

func (*RateLimitRequest) ProtoMessage

func (*RateLimitRequest) ProtoMessage()

func (*RateLimitRequest) ProtoReflect

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

func (*RateLimitRequest) Reset

func (x *RateLimitRequest) Reset()

func (*RateLimitRequest) String

func (x *RateLimitRequest) String() string

type RateLimiterClient

type RateLimiterClient interface {
	CanServe(ctx context.Context, in *RateLimitRequest, opts ...grpc.CallOption) (*RateLimitReply, error)
}

RateLimiterClient is the client API for RateLimiter 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.

type RateLimiterServer

type RateLimiterServer interface {
	CanServe(context.Context, *RateLimitRequest) (*RateLimitReply, error)
	// contains filtered or unexported methods
}

RateLimiterServer is the server API for RateLimiter service. All implementations must embed UnimplementedRateLimiterServer for forward compatibility

type UnimplementedChunkGetterServer

type UnimplementedChunkGetterServer struct {
}

UnimplementedChunkGetterServer must be embedded to have forward compatible implementations.

func (UnimplementedChunkGetterServer) GetChunk

type UnimplementedRateLimiterServer

type UnimplementedRateLimiterServer struct {
}

UnimplementedRateLimiterServer must be embedded to have forward compatible implementations.

func (UnimplementedRateLimiterServer) CanServe

type UnsafeChunkGetterServer

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

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

type UnsafeRateLimiterServer

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

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

Jump to

Keyboard shortcuts

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