feat: build wahrwelt A/D toolkit
This commit is contained in:
1 parent
303438d206
commit
653924d8c6
564 files changed
+36310
-49998
No files matched your search
@@ -0,0 +1,226 @@
|
||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.28.1
|
||||
// protoc (unknown)
|
||||
// source: fileserver/api.proto
|
||||
|
||||
package fileserver
|
||||
|
||||
import (
|
||||
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
||||
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
||||
reflect "reflect"
|
||||
sync "sync"
|
||||
)
|
||||
|
||||
const (
|
||||
// Verify that this generated code is sufficiently up-to-date.
|
||||
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
|
||||
// Verify that runtime/protoimpl is sufficiently up-to-date.
|
||||
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
|
||||
)
|
||||
|
||||
type FileInfo struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Uuid string `protobuf:"bytes,1,opt,name=uuid,proto3" json:"uuid,omitempty"`
|
||||
}
|
||||
|
||||
func (x *FileInfo) Reset() {
|
||||
*x = FileInfo{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_fileserver_api_proto_msgTypes[0]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *FileInfo) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*FileInfo) ProtoMessage() {}
|
||||
|
||||
func (x *FileInfo) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_fileserver_api_proto_msgTypes[0]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use FileInfo.ProtoReflect.Descriptor instead.
|
||||
func (*FileInfo) Descriptor() ([]byte, []int) {
|
||||
return file_fileserver_api_proto_rawDescGZIP(), []int{0}
|
||||
}
|
||||
|
||||
func (x *FileInfo) GetUuid() string {
|
||||
if x != nil {
|
||||
return x.Uuid
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
type FileStream struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Chunk []byte `protobuf:"bytes,1,opt,name=chunk,proto3" json:"chunk,omitempty"`
|
||||
}
|
||||
|
||||
func (x *FileStream) Reset() {
|
||||
*x = FileStream{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_fileserver_api_proto_msgTypes[1]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *FileStream) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*FileStream) ProtoMessage() {}
|
||||
|
||||
func (x *FileStream) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_fileserver_api_proto_msgTypes[1]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use FileStream.ProtoReflect.Descriptor instead.
|
||||
func (*FileStream) Descriptor() ([]byte, []int) {
|
||||
return file_fileserver_api_proto_rawDescGZIP(), []int{1}
|
||||
}
|
||||
|
||||
func (x *FileStream) GetChunk() []byte {
|
||||
if x != nil {
|
||||
return x.Chunk
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
var File_fileserver_api_proto protoreflect.FileDescriptor
|
||||
|
||||
var file_fileserver_api_proto_rawDesc = []byte{
|
||||
0x0a, 0x14, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2f, 0x61, 0x70, 0x69,
|
||||
0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0a, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x65, 0x72, 0x76,
|
||||
0x65, 0x72, 0x22, 0x1e, 0x0a, 0x08, 0x46, 0x69, 0x6c, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x12,
|
||||
0x0a, 0x04, 0x75, 0x75, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x75, 0x75,
|
||||
0x69, 0x64, 0x22, 0x22, 0x0a, 0x0a, 0x46, 0x69, 0x6c, 0x65, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d,
|
||||
0x12, 0x14, 0x0a, 0x05, 0x63, 0x68, 0x75, 0x6e, 0x6b, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52,
|
||||
0x05, 0x63, 0x68, 0x75, 0x6e, 0x6b, 0x32, 0x8b, 0x01, 0x0a, 0x07, 0x53, 0x65, 0x72, 0x76, 0x69,
|
||||
0x63, 0x65, 0x12, 0x3e, 0x0a, 0x0a, 0x55, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x46, 0x69, 0x6c, 0x65,
|
||||
0x12, 0x16, 0x2e, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x46, 0x69,
|
||||
0x6c, 0x65, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x1a, 0x14, 0x2e, 0x66, 0x69, 0x6c, 0x65, 0x73,
|
||||
0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x46, 0x69, 0x6c, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x22, 0x00,
|
||||
0x28, 0x01, 0x12, 0x40, 0x0a, 0x0c, 0x44, 0x6f, 0x77, 0x6e, 0x6c, 0x6f, 0x61, 0x64, 0x46, 0x69,
|
||||
0x6c, 0x65, 0x12, 0x14, 0x2e, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e,
|
||||
0x46, 0x69, 0x6c, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x1a, 0x16, 0x2e, 0x66, 0x69, 0x6c, 0x65, 0x73,
|
||||
0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x46, 0x69, 0x6c, 0x65, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d,
|
||||
0x22, 0x00, 0x30, 0x01, 0x42, 0x95, 0x01, 0x0a, 0x0e, 0x63, 0x6f, 0x6d, 0x2e, 0x66, 0x69, 0x6c,
|
||||
0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x42, 0x08, 0x41, 0x70, 0x69, 0x50, 0x72, 0x6f, 0x74,
|
||||
0x6f, 0x50, 0x01, 0x5a, 0x31, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f,
|
||||
0x63, 0x34, 0x74, 0x2d, 0x62, 0x75, 0x74, 0x2d, 0x73, 0x34, 0x64, 0x2f, 0x6e, 0x65, 0x6f, 0x2f,
|
||||
0x76, 0x32, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x2f, 0x66, 0x69, 0x6c, 0x65,
|
||||
0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0xa2, 0x02, 0x03, 0x46, 0x58, 0x58, 0xaa, 0x02, 0x0a, 0x46,
|
||||
0x69, 0x6c, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0xca, 0x02, 0x0a, 0x46, 0x69, 0x6c, 0x65,
|
||||
0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0xe2, 0x02, 0x16, 0x46, 0x69, 0x6c, 0x65, 0x73, 0x65, 0x72,
|
||||
0x76, 0x65, 0x72, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea,
|
||||
0x02, 0x0a, 0x46, 0x69, 0x6c, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x62, 0x06, 0x70, 0x72,
|
||||
0x6f, 0x74, 0x6f, 0x33,
|
||||
}
|
||||
|
||||
var (
|
||||
file_fileserver_api_proto_rawDescOnce sync.Once
|
||||
file_fileserver_api_proto_rawDescData = file_fileserver_api_proto_rawDesc
|
||||
)
|
||||
|
||||
func file_fileserver_api_proto_rawDescGZIP() []byte {
|
||||
file_fileserver_api_proto_rawDescOnce.Do(func() {
|
||||
file_fileserver_api_proto_rawDescData = protoimpl.X.CompressGZIP(file_fileserver_api_proto_rawDescData)
|
||||
})
|
||||
return file_fileserver_api_proto_rawDescData
|
||||
}
|
||||
|
||||
var file_fileserver_api_proto_msgTypes = make([]protoimpl.MessageInfo, 2)
|
||||
var file_fileserver_api_proto_goTypes = []interface{}{
|
||||
(*FileInfo)(nil), // 0: fileserver.FileInfo
|
||||
(*FileStream)(nil), // 1: fileserver.FileStream
|
||||
}
|
||||
var file_fileserver_api_proto_depIdxs = []int32{
|
||||
1, // 0: fileserver.Service.UploadFile:input_type -> fileserver.FileStream
|
||||
0, // 1: fileserver.Service.DownloadFile:input_type -> fileserver.FileInfo
|
||||
0, // 2: fileserver.Service.UploadFile:output_type -> fileserver.FileInfo
|
||||
1, // 3: fileserver.Service.DownloadFile:output_type -> fileserver.FileStream
|
||||
2, // [2:4] is the sub-list for method output_type
|
||||
0, // [0:2] is the sub-list for method input_type
|
||||
0, // [0:0] is the sub-list for extension type_name
|
||||
0, // [0:0] is the sub-list for extension extendee
|
||||
0, // [0:0] is the sub-list for field type_name
|
||||
}
|
||||
|
||||
func init() { file_fileserver_api_proto_init() }
|
||||
func file_fileserver_api_proto_init() {
|
||||
if File_fileserver_api_proto != nil {
|
||||
return
|
||||
}
|
||||
if !protoimpl.UnsafeEnabled {
|
||||
file_fileserver_api_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*FileInfo); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_fileserver_api_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*FileStream); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
}
|
||||
type x struct{}
|
||||
out := protoimpl.TypeBuilder{
|
||||
File: protoimpl.DescBuilder{
|
||||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||
RawDescriptor: file_fileserver_api_proto_rawDesc,
|
||||
NumEnums: 0,
|
||||
NumMessages: 2,
|
||||
NumExtensions: 0,
|
||||
NumServices: 1,
|
||||
},
|
||||
GoTypes: file_fileserver_api_proto_goTypes,
|
||||
DependencyIndexes: file_fileserver_api_proto_depIdxs,
|
||||
MessageInfos: file_fileserver_api_proto_msgTypes,
|
||||
}.Build()
|
||||
File_fileserver_api_proto = out.File
|
||||
file_fileserver_api_proto_rawDesc = nil
|
||||
file_fileserver_api_proto_goTypes = nil
|
||||
file_fileserver_api_proto_depIdxs = nil
|
||||
}
|
||||
@@ -0,0 +1,202 @@
|
||||
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
|
||||
// versions:
|
||||
// - protoc-gen-go-grpc v1.2.0
|
||||
// - protoc (unknown)
|
||||
// source: fileserver/api.proto
|
||||
|
||||
package fileserver
|
||||
|
||||
import (
|
||||
context "context"
|
||||
grpc "google.golang.org/grpc"
|
||||
codes "google.golang.org/grpc/codes"
|
||||
status "google.golang.org/grpc/status"
|
||||
)
|
||||
|
||||
// This is a compile-time assertion to ensure that this generated file
|
||||
// is compatible with the grpc package it is being compiled against.
|
||||
// Requires gRPC-Go v1.32.0 or later.
|
||||
const _ = grpc.SupportPackageIsVersion7
|
||||
|
||||
// ServiceClient is the client API for Service 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 ServiceClient interface {
|
||||
UploadFile(ctx context.Context, opts ...grpc.CallOption) (Service_UploadFileClient, error)
|
||||
DownloadFile(ctx context.Context, in *FileInfo, opts ...grpc.CallOption) (Service_DownloadFileClient, error)
|
||||
}
|
||||
|
||||
type serviceClient struct {
|
||||
cc grpc.ClientConnInterface
|
||||
}
|
||||
|
||||
func NewServiceClient(cc grpc.ClientConnInterface) ServiceClient {
|
||||
return &serviceClient{cc}
|
||||
}
|
||||
|
||||
func (c *serviceClient) UploadFile(ctx context.Context, opts ...grpc.CallOption) (Service_UploadFileClient, error) {
|
||||
stream, err := c.cc.NewStream(ctx, &Service_ServiceDesc.Streams[0], "/fileserver.Service/UploadFile", opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
x := &serviceUploadFileClient{stream}
|
||||
return x, nil
|
||||
}
|
||||
|
||||
type Service_UploadFileClient interface {
|
||||
Send(*FileStream) error
|
||||
CloseAndRecv() (*FileInfo, error)
|
||||
grpc.ClientStream
|
||||
}
|
||||
|
||||
type serviceUploadFileClient struct {
|
||||
grpc.ClientStream
|
||||
}
|
||||
|
||||
func (x *serviceUploadFileClient) Send(m *FileStream) error {
|
||||
return x.ClientStream.SendMsg(m)
|
||||
}
|
||||
|
||||
func (x *serviceUploadFileClient) CloseAndRecv() (*FileInfo, error) {
|
||||
if err := x.ClientStream.CloseSend(); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
m := new(FileInfo)
|
||||
if err := x.ClientStream.RecvMsg(m); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return m, nil
|
||||
}
|
||||
|
||||
func (c *serviceClient) DownloadFile(ctx context.Context, in *FileInfo, opts ...grpc.CallOption) (Service_DownloadFileClient, error) {
|
||||
stream, err := c.cc.NewStream(ctx, &Service_ServiceDesc.Streams[1], "/fileserver.Service/DownloadFile", opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
x := &serviceDownloadFileClient{stream}
|
||||
if err := x.ClientStream.SendMsg(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if err := x.ClientStream.CloseSend(); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return x, nil
|
||||
}
|
||||
|
||||
type Service_DownloadFileClient interface {
|
||||
Recv() (*FileStream, error)
|
||||
grpc.ClientStream
|
||||
}
|
||||
|
||||
type serviceDownloadFileClient struct {
|
||||
grpc.ClientStream
|
||||
}
|
||||
|
||||
func (x *serviceDownloadFileClient) Recv() (*FileStream, error) {
|
||||
m := new(FileStream)
|
||||
if err := x.ClientStream.RecvMsg(m); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return m, nil
|
||||
}
|
||||
|
||||
// ServiceServer is the server API for Service service.
|
||||
// All implementations must embed UnimplementedServiceServer
|
||||
// for forward compatibility
|
||||
type ServiceServer interface {
|
||||
UploadFile(Service_UploadFileServer) error
|
||||
DownloadFile(*FileInfo, Service_DownloadFileServer) error
|
||||
mustEmbedUnimplementedServiceServer()
|
||||
}
|
||||
|
||||
// UnimplementedServiceServer must be embedded to have forward compatible implementations.
|
||||
type UnimplementedServiceServer struct {
|
||||
}
|
||||
|
||||
func (UnimplementedServiceServer) UploadFile(Service_UploadFileServer) error {
|
||||
return status.Errorf(codes.Unimplemented, "method UploadFile not implemented")
|
||||
}
|
||||
func (UnimplementedServiceServer) DownloadFile(*FileInfo, Service_DownloadFileServer) error {
|
||||
return status.Errorf(codes.Unimplemented, "method DownloadFile not implemented")
|
||||
}
|
||||
func (UnimplementedServiceServer) mustEmbedUnimplementedServiceServer() {}
|
||||
|
||||
// UnsafeServiceServer may be embedded to opt out of forward compatibility for this service.
|
||||
// Use of this interface is not recommended, as added methods to ServiceServer will
|
||||
// result in compilation errors.
|
||||
type UnsafeServiceServer interface {
|
||||
mustEmbedUnimplementedServiceServer()
|
||||
}
|
||||
|
||||
func RegisterServiceServer(s grpc.ServiceRegistrar, srv ServiceServer) {
|
||||
s.RegisterService(&Service_ServiceDesc, srv)
|
||||
}
|
||||
|
||||
func _Service_UploadFile_Handler(srv interface{}, stream grpc.ServerStream) error {
|
||||
return srv.(ServiceServer).UploadFile(&serviceUploadFileServer{stream})
|
||||
}
|
||||
|
||||
type Service_UploadFileServer interface {
|
||||
SendAndClose(*FileInfo) error
|
||||
Recv() (*FileStream, error)
|
||||
grpc.ServerStream
|
||||
}
|
||||
|
||||
type serviceUploadFileServer struct {
|
||||
grpc.ServerStream
|
||||
}
|
||||
|
||||
func (x *serviceUploadFileServer) SendAndClose(m *FileInfo) error {
|
||||
return x.ServerStream.SendMsg(m)
|
||||
}
|
||||
|
||||
func (x *serviceUploadFileServer) Recv() (*FileStream, error) {
|
||||
m := new(FileStream)
|
||||
if err := x.ServerStream.RecvMsg(m); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return m, nil
|
||||
}
|
||||
|
||||
func _Service_DownloadFile_Handler(srv interface{}, stream grpc.ServerStream) error {
|
||||
m := new(FileInfo)
|
||||
if err := stream.RecvMsg(m); err != nil {
|
||||
return err
|
||||
}
|
||||
return srv.(ServiceServer).DownloadFile(m, &serviceDownloadFileServer{stream})
|
||||
}
|
||||
|
||||
type Service_DownloadFileServer interface {
|
||||
Send(*FileStream) error
|
||||
grpc.ServerStream
|
||||
}
|
||||
|
||||
type serviceDownloadFileServer struct {
|
||||
grpc.ServerStream
|
||||
}
|
||||
|
||||
func (x *serviceDownloadFileServer) Send(m *FileStream) error {
|
||||
return x.ServerStream.SendMsg(m)
|
||||
}
|
||||
|
||||
// Service_ServiceDesc is the grpc.ServiceDesc for Service service.
|
||||
// It's only intended for direct use with grpc.RegisterService,
|
||||
// and not to be introspected or modified (even as a copy)
|
||||
var Service_ServiceDesc = grpc.ServiceDesc{
|
||||
ServiceName: "fileserver.Service",
|
||||
HandlerType: (*ServiceServer)(nil),
|
||||
Methods: []grpc.MethodDesc{},
|
||||
Streams: []grpc.StreamDesc{
|
||||
{
|
||||
StreamName: "UploadFile",
|
||||
Handler: _Service_UploadFile_Handler,
|
||||
ClientStreams: true,
|
||||
},
|
||||
{
|
||||
StreamName: "DownloadFile",
|
||||
Handler: _Service_DownloadFile_Handler,
|
||||
ServerStreams: true,
|
||||
},
|
||||
},
|
||||
Metadata: "fileserver/api.proto",
|
||||
}
|
||||
Reference in new issue
Block a user