added gen proto files

This commit is contained in:
Pavel 2025-04-21 12:37:03 +03:00
parent 43af28681e
commit 38a68a31b9
2 changed files with 314 additions and 0 deletions

@ -0,0 +1,213 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.25.0-devel
// protoc v3.14.0
// source: storer.proto
package s3deleter
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 DeleteFilesRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Urls []string `protobuf:"bytes,1,rep,name=urls,proto3" json:"urls,omitempty"`
}
func (x *DeleteFilesRequest) Reset() {
*x = DeleteFilesRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_storer_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *DeleteFilesRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*DeleteFilesRequest) ProtoMessage() {}
func (x *DeleteFilesRequest) ProtoReflect() protoreflect.Message {
mi := &file_storer_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 DeleteFilesRequest.ProtoReflect.Descriptor instead.
func (*DeleteFilesRequest) Descriptor() ([]byte, []int) {
return file_storer_proto_rawDescGZIP(), []int{0}
}
func (x *DeleteFilesRequest) GetUrls() []string {
if x != nil {
return x.Urls
}
return nil
}
type DeleteFilesResponse struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Errors []string `protobuf:"bytes,1,rep,name=errors,proto3" json:"errors,omitempty"`
}
func (x *DeleteFilesResponse) Reset() {
*x = DeleteFilesResponse{}
if protoimpl.UnsafeEnabled {
mi := &file_storer_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *DeleteFilesResponse) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*DeleteFilesResponse) ProtoMessage() {}
func (x *DeleteFilesResponse) ProtoReflect() protoreflect.Message {
mi := &file_storer_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 DeleteFilesResponse.ProtoReflect.Descriptor instead.
func (*DeleteFilesResponse) Descriptor() ([]byte, []int) {
return file_storer_proto_rawDescGZIP(), []int{1}
}
func (x *DeleteFilesResponse) GetErrors() []string {
if x != nil {
return x.Errors
}
return nil
}
var File_storer_proto protoreflect.FileDescriptor
var file_storer_proto_rawDesc = []byte{
0x0a, 0x0c, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x09,
0x73, 0x33, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x72, 0x22, 0x28, 0x0a, 0x12, 0x44, 0x65, 0x6c,
0x65, 0x74, 0x65, 0x46, 0x69, 0x6c, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12,
0x12, 0x0a, 0x04, 0x75, 0x72, 0x6c, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x04, 0x75,
0x72, 0x6c, 0x73, 0x22, 0x2d, 0x0a, 0x13, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x46, 0x69, 0x6c,
0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x65, 0x72,
0x72, 0x6f, 0x72, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x06, 0x65, 0x72, 0x72, 0x6f,
0x72, 0x73, 0x32, 0x59, 0x0a, 0x09, 0x53, 0x33, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x72, 0x12,
0x4c, 0x0a, 0x0b, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x46, 0x69, 0x6c, 0x65, 0x73, 0x12, 0x1d,
0x2e, 0x73, 0x33, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x72, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74,
0x65, 0x46, 0x69, 0x6c, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e,
0x73, 0x33, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x72, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65,
0x46, 0x69, 0x6c, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x18, 0x5a,
0x16, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x72, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x73, 0x33,
0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x72, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (
file_storer_proto_rawDescOnce sync.Once
file_storer_proto_rawDescData = file_storer_proto_rawDesc
)
func file_storer_proto_rawDescGZIP() []byte {
file_storer_proto_rawDescOnce.Do(func() {
file_storer_proto_rawDescData = protoimpl.X.CompressGZIP(file_storer_proto_rawDescData)
})
return file_storer_proto_rawDescData
}
var file_storer_proto_msgTypes = make([]protoimpl.MessageInfo, 2)
var file_storer_proto_goTypes = []interface{}{
(*DeleteFilesRequest)(nil), // 0: s3deleter.DeleteFilesRequest
(*DeleteFilesResponse)(nil), // 1: s3deleter.DeleteFilesResponse
}
var file_storer_proto_depIdxs = []int32{
0, // 0: s3deleter.S3Deleter.DeleteFiles:input_type -> s3deleter.DeleteFilesRequest
1, // 1: s3deleter.S3Deleter.DeleteFiles:output_type -> s3deleter.DeleteFilesResponse
1, // [1:2] is the sub-list for method output_type
0, // [0:1] 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_storer_proto_init() }
func file_storer_proto_init() {
if File_storer_proto != nil {
return
}
if !protoimpl.UnsafeEnabled {
file_storer_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*DeleteFilesRequest); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_storer_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*DeleteFilesResponse); 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_storer_proto_rawDesc,
NumEnums: 0,
NumMessages: 2,
NumExtensions: 0,
NumServices: 1,
},
GoTypes: file_storer_proto_goTypes,
DependencyIndexes: file_storer_proto_depIdxs,
MessageInfos: file_storer_proto_msgTypes,
}.Build()
File_storer_proto = out.File
file_storer_proto_rawDesc = nil
file_storer_proto_goTypes = nil
file_storer_proto_depIdxs = nil
}

@ -0,0 +1,101 @@
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
package s3deleter
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
// S3DeleterClient is the client API for S3Deleter 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 S3DeleterClient interface {
DeleteFiles(ctx context.Context, in *DeleteFilesRequest, opts ...grpc.CallOption) (*DeleteFilesResponse, error)
}
type s3DeleterClient struct {
cc grpc.ClientConnInterface
}
func NewS3DeleterClient(cc grpc.ClientConnInterface) S3DeleterClient {
return &s3DeleterClient{cc}
}
func (c *s3DeleterClient) DeleteFiles(ctx context.Context, in *DeleteFilesRequest, opts ...grpc.CallOption) (*DeleteFilesResponse, error) {
out := new(DeleteFilesResponse)
err := c.cc.Invoke(ctx, "/s3deleter.S3Deleter/DeleteFiles", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// S3DeleterServer is the server API for S3Deleter service.
// All implementations must embed UnimplementedS3DeleterServer
// for forward compatibility
type S3DeleterServer interface {
DeleteFiles(context.Context, *DeleteFilesRequest) (*DeleteFilesResponse, error)
mustEmbedUnimplementedS3DeleterServer()
}
// UnimplementedS3DeleterServer must be embedded to have forward compatible implementations.
type UnimplementedS3DeleterServer struct {
}
func (UnimplementedS3DeleterServer) DeleteFiles(context.Context, *DeleteFilesRequest) (*DeleteFilesResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method DeleteFiles not implemented")
}
func (UnimplementedS3DeleterServer) mustEmbedUnimplementedS3DeleterServer() {}
// UnsafeS3DeleterServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to S3DeleterServer will
// result in compilation errors.
type UnsafeS3DeleterServer interface {
mustEmbedUnimplementedS3DeleterServer()
}
func RegisterS3DeleterServer(s grpc.ServiceRegistrar, srv S3DeleterServer) {
s.RegisterService(&S3Deleter_ServiceDesc, srv)
}
func _S3Deleter_DeleteFiles_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(DeleteFilesRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(S3DeleterServer).DeleteFiles(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/s3deleter.S3Deleter/DeleteFiles",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(S3DeleterServer).DeleteFiles(ctx, req.(*DeleteFilesRequest))
}
return interceptor(ctx, in, info, handler)
}
// S3Deleter_ServiceDesc is the grpc.ServiceDesc for S3Deleter service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var S3Deleter_ServiceDesc = grpc.ServiceDesc{
ServiceName: "s3deleter.S3Deleter",
HandlerType: (*S3DeleterServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "DeleteFiles",
Handler: _S3Deleter_DeleteFiles_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "storer.proto",
}