api

package
v0.0.0-...-1577591 Latest Latest
Warning

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

Go to latest
Published: Apr 24, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Replik_GetStatus_FullMethodName   = "/api.Replik/GetStatus"
	Replik_GetFileList_FullMethodName = "/api.Replik/GetFileList"
	Replik_GetFile_FullMethodName     = "/api.Replik/GetFile"
)

Variables

View Source
var File_replik_proto protoreflect.FileDescriptor
View Source
var Replik_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "api.Replik",
	HandlerType: (*ReplikServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "GetStatus",
			Handler:    _Replik_GetStatus_Handler,
		},
		{
			MethodName: "GetFileList",
			Handler:    _Replik_GetFileList_Handler,
		},
	},
	Streams: []grpc.StreamDesc{
		{
			StreamName:    "GetFile",
			Handler:       _Replik_GetFile_Handler,
			ServerStreams: true,
		},
	},
	Metadata: "replik.proto",
}

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

Functions

func RegisterReplikServer

func RegisterReplikServer(s grpc.ServiceRegistrar, srv ReplikServer)

Types

type Chunk

type Chunk struct {
	Data []byte `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"`
	Size int64  `protobuf:"varint,2,opt,name=size,proto3" json:"size,omitempty"`
	// contains filtered or unexported fields
}

func (*Chunk) Descriptor deprecated

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

Deprecated: Use Chunk.ProtoReflect.Descriptor instead.

func (*Chunk) GetData

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

func (*Chunk) GetSize

func (x *Chunk) GetSize() int64

func (*Chunk) ProtoMessage

func (*Chunk) ProtoMessage()

func (*Chunk) ProtoReflect

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

func (*Chunk) Reset

func (x *Chunk) Reset()

func (*Chunk) String

func (x *Chunk) String() string

type Empty

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

func (*Empty) Descriptor deprecated

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

Deprecated: Use Empty.ProtoReflect.Descriptor instead.

func (*Empty) ProtoMessage

func (*Empty) ProtoMessage()

func (*Empty) ProtoReflect

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

func (*Empty) Reset

func (x *Empty) Reset()

func (*Empty) String

func (x *Empty) String() string

type File

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

func (*File) Descriptor deprecated

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

Deprecated: Use File.ProtoReflect.Descriptor instead.

func (*File) GetPath

func (x *File) GetPath() string

func (*File) ProtoMessage

func (*File) ProtoMessage()

func (*File) ProtoReflect

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

func (*File) Reset

func (x *File) Reset()

func (*File) String

func (x *File) String() string

type FileList

type FileList struct {
	Files []*File `protobuf:"bytes,1,rep,name=files,proto3" json:"files,omitempty"`
	// contains filtered or unexported fields
}

func (*FileList) Descriptor deprecated

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

Deprecated: Use FileList.ProtoReflect.Descriptor instead.

func (*FileList) GetFiles

func (x *FileList) GetFiles() []*File

func (*FileList) ProtoMessage

func (*FileList) ProtoMessage()

func (*FileList) ProtoReflect

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

func (*FileList) Reset

func (x *FileList) Reset()

func (*FileList) String

func (x *FileList) String() string

type FileListRequest

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

func (*FileListRequest) Descriptor deprecated

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

Deprecated: Use FileListRequest.ProtoReflect.Descriptor instead.

func (*FileListRequest) GetPath

func (x *FileListRequest) GetPath() string

func (*FileListRequest) ProtoMessage

func (*FileListRequest) ProtoMessage()

func (*FileListRequest) ProtoReflect

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

func (*FileListRequest) Reset

func (x *FileListRequest) Reset()

func (*FileListRequest) String

func (x *FileListRequest) String() string

type FileRequest

type FileRequest struct {
	Path  string `protobuf:"bytes,1,opt,name=path,proto3" json:"path,omitempty"`
	Index int64  `protobuf:"varint,2,opt,name=index,proto3" json:"index,omitempty"` // start index
	// contains filtered or unexported fields
}

func (*FileRequest) Descriptor deprecated

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

Deprecated: Use FileRequest.ProtoReflect.Descriptor instead.

func (*FileRequest) GetIndex

func (x *FileRequest) GetIndex() int64

func (*FileRequest) GetPath

func (x *FileRequest) GetPath() string

func (*FileRequest) ProtoMessage

func (*FileRequest) ProtoMessage()

func (*FileRequest) ProtoReflect

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

func (*FileRequest) Reset

func (x *FileRequest) Reset()

func (*FileRequest) String

func (x *FileRequest) String() string

type ReplikClient

type ReplikClient interface {
	GetStatus(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*Status, error)
	GetFileList(ctx context.Context, in *FileListRequest, opts ...grpc.CallOption) (*FileList, error)
	GetFile(ctx context.Context, in *FileRequest, opts ...grpc.CallOption) (Replik_GetFileClient, error)
}

ReplikClient is the client API for Replik 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 NewReplikClient

func NewReplikClient(cc grpc.ClientConnInterface) ReplikClient

type ReplikServer

type ReplikServer interface {
	GetStatus(context.Context, *Empty) (*Status, error)
	GetFileList(context.Context, *FileListRequest) (*FileList, error)
	GetFile(*FileRequest, Replik_GetFileServer) error
	// contains filtered or unexported methods
}

ReplikServer is the server API for Replik service. All implementations must embed UnimplementedReplikServer for forward compatibility

type Replik_GetFileClient

type Replik_GetFileClient interface {
	Recv() (*Chunk, error)
	grpc.ClientStream
}

type Replik_GetFileServer

type Replik_GetFileServer interface {
	Send(*Chunk) error
	grpc.ServerStream
}

type Status

type Status struct {

	// TODO make better
	Status string `protobuf:"bytes,1,opt,name=status,proto3" json:"status,omitempty"`
	// contains filtered or unexported fields
}

func (*Status) Descriptor deprecated

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

Deprecated: Use Status.ProtoReflect.Descriptor instead.

func (*Status) GetStatus

func (x *Status) GetStatus() string

func (*Status) ProtoMessage

func (*Status) ProtoMessage()

func (*Status) ProtoReflect

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

func (*Status) Reset

func (x *Status) Reset()

func (*Status) String

func (x *Status) String() string

type UnimplementedReplikServer

type UnimplementedReplikServer struct {
}

UnimplementedReplikServer must be embedded to have forward compatible implementations.

func (UnimplementedReplikServer) GetFile

func (UnimplementedReplikServer) GetFileList

func (UnimplementedReplikServer) GetStatus

type UnsafeReplikServer

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

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

Jump to

Keyboard shortcuts

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