github.com/kaydxh/golang@v0.0.131/pkg/file-cleanup/disk/disk_cleaner.pb.go (about)

     1  /*
     2   *Copyright (c) 2022, kaydxh
     3   *
     4   *Permission is hereby granted, free of charge, to any person obtaining a copy
     5   *of this software and associated documentation files (the "Software"), to deal
     6   *in the Software without restriction, including without limitation the rights
     7   *to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
     8   *copies of the Software, and to permit persons to whom the Software is
     9   *furnished to do so, subject to the following conditions:
    10   *
    11   *The above copyright notice and this permission notice shall be included in all
    12   *copies or substantial portions of the Software.
    13   *
    14   *THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
    15   *IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
    16   *FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
    17   *AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
    18   *LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
    19   *OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
    20   *SOFTWARE.
    21   */
    22  // Code generated by protoc-gen-go. DO NOT EDIT.
    23  // versions:
    24  // 	protoc-gen-go v1.27.0
    25  // 	protoc        v3.13.0
    26  // source: pkg/file-cleanup/disk/disk_cleaner.proto
    27  
    28  package disk
    29  
    30  import (
    31  	duration "github.com/golang/protobuf/ptypes/duration"
    32  	protoreflect "google.golang.org/protobuf/reflect/protoreflect"
    33  	protoimpl "google.golang.org/protobuf/runtime/protoimpl"
    34  	reflect "reflect"
    35  	sync "sync"
    36  )
    37  
    38  const (
    39  	// Verify that this generated code is sufficiently up-to-date.
    40  	_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
    41  	// Verify that runtime/protoimpl is sufficiently up-to-date.
    42  	_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
    43  )
    44  
    45  type DiskCleaner struct {
    46  	state         protoimpl.MessageState
    47  	sizeCache     protoimpl.SizeCache
    48  	unknownFields protoimpl.UnknownFields
    49  
    50  	Enabled bool `protobuf:"varint,1,opt,name=enabled,proto3" json:"enabled,omitempty"`
    51  	// disk usage >= disk_usage, start to clean file, 0 means nerver clean, range
    52  	// 0-100
    53  	DiskUsage float32 `protobuf:"fixed32,2,opt,name=disk_usage,json=diskUsage,proto3" json:"disk_usage,omitempty"`
    54  	// clearn paths
    55  	Paths []string `protobuf:"bytes,3,rep,name=paths,proto3" json:"paths,omitempty"`
    56  	// ext
    57  	Exts          []string           `protobuf:"bytes,4,rep,name=exts,proto3" json:"exts,omitempty"`
    58  	CheckInterval *duration.Duration `protobuf:"bytes,5,opt,name=check_interval,json=checkInterval,proto3" json:"check_interval,omitempty"`
    59  	BaseExpired   *duration.Duration `protobuf:"bytes,6,opt,name=base_expired,json=baseExpired,proto3" json:"base_expired,omitempty"`
    60  	MinExpired    *duration.Duration `protobuf:"bytes,7,opt,name=min_expired,json=minExpired,proto3" json:"min_expired,omitempty"`
    61  }
    62  
    63  func (x *DiskCleaner) Reset() {
    64  	*x = DiskCleaner{}
    65  	if protoimpl.UnsafeEnabled {
    66  		mi := &file_pkg_file_cleanup_disk_disk_cleaner_proto_msgTypes[0]
    67  		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
    68  		ms.StoreMessageInfo(mi)
    69  	}
    70  }
    71  
    72  func (x *DiskCleaner) String() string {
    73  	return protoimpl.X.MessageStringOf(x)
    74  }
    75  
    76  func (*DiskCleaner) ProtoMessage() {}
    77  
    78  func (x *DiskCleaner) ProtoReflect() protoreflect.Message {
    79  	mi := &file_pkg_file_cleanup_disk_disk_cleaner_proto_msgTypes[0]
    80  	if protoimpl.UnsafeEnabled && x != nil {
    81  		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
    82  		if ms.LoadMessageInfo() == nil {
    83  			ms.StoreMessageInfo(mi)
    84  		}
    85  		return ms
    86  	}
    87  	return mi.MessageOf(x)
    88  }
    89  
    90  // Deprecated: Use DiskCleaner.ProtoReflect.Descriptor instead.
    91  func (*DiskCleaner) Descriptor() ([]byte, []int) {
    92  	return file_pkg_file_cleanup_disk_disk_cleaner_proto_rawDescGZIP(), []int{0}
    93  }
    94  
    95  func (x *DiskCleaner) GetEnabled() bool {
    96  	if x != nil {
    97  		return x.Enabled
    98  	}
    99  	return false
   100  }
   101  
   102  func (x *DiskCleaner) GetDiskUsage() float32 {
   103  	if x != nil {
   104  		return x.DiskUsage
   105  	}
   106  	return 0
   107  }
   108  
   109  func (x *DiskCleaner) GetPaths() []string {
   110  	if x != nil {
   111  		return x.Paths
   112  	}
   113  	return nil
   114  }
   115  
   116  func (x *DiskCleaner) GetExts() []string {
   117  	if x != nil {
   118  		return x.Exts
   119  	}
   120  	return nil
   121  }
   122  
   123  func (x *DiskCleaner) GetCheckInterval() *duration.Duration {
   124  	if x != nil {
   125  		return x.CheckInterval
   126  	}
   127  	return nil
   128  }
   129  
   130  func (x *DiskCleaner) GetBaseExpired() *duration.Duration {
   131  	if x != nil {
   132  		return x.BaseExpired
   133  	}
   134  	return nil
   135  }
   136  
   137  func (x *DiskCleaner) GetMinExpired() *duration.Duration {
   138  	if x != nil {
   139  		return x.MinExpired
   140  	}
   141  	return nil
   142  }
   143  
   144  var File_pkg_file_cleanup_disk_disk_cleaner_proto protoreflect.FileDescriptor
   145  
   146  var file_pkg_file_cleanup_disk_disk_cleaner_proto_rawDesc = []byte{
   147  	0x0a, 0x28, 0x70, 0x6b, 0x67, 0x2f, 0x66, 0x69, 0x6c, 0x65, 0x2d, 0x63, 0x6c, 0x65, 0x61, 0x6e,
   148  	0x75, 0x70, 0x2f, 0x64, 0x69, 0x73, 0x6b, 0x2f, 0x64, 0x69, 0x73, 0x6b, 0x5f, 0x63, 0x6c, 0x65,
   149  	0x61, 0x6e, 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x17, 0x67, 0x6f, 0x2e, 0x70,
   150  	0x6b, 0x67, 0x2e, 0x66, 0x69, 0x6c, 0x65, 0x63, 0x6c, 0x65, 0x61, 0x6e, 0x75, 0x70, 0x2e, 0x64,
   151  	0x69, 0x73, 0x6b, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74,
   152  	0x6f, 0x62, 0x75, 0x66, 0x2f, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72,
   153  	0x6f, 0x74, 0x6f, 0x22, 0xac, 0x02, 0x0a, 0x0b, 0x44, 0x69, 0x73, 0x6b, 0x43, 0x6c, 0x65, 0x61,
   154  	0x6e, 0x65, 0x72, 0x12, 0x18, 0x0a, 0x07, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x18, 0x01,
   155  	0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x12, 0x1d, 0x0a,
   156  	0x0a, 0x64, 0x69, 0x73, 0x6b, 0x5f, 0x75, 0x73, 0x61, 0x67, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28,
   157  	0x02, 0x52, 0x09, 0x64, 0x69, 0x73, 0x6b, 0x55, 0x73, 0x61, 0x67, 0x65, 0x12, 0x14, 0x0a, 0x05,
   158  	0x70, 0x61, 0x74, 0x68, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x05, 0x70, 0x61, 0x74,
   159  	0x68, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x65, 0x78, 0x74, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x09,
   160  	0x52, 0x04, 0x65, 0x78, 0x74, 0x73, 0x12, 0x40, 0x0a, 0x0e, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x5f,
   161  	0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19,
   162  	0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66,
   163  	0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0d, 0x63, 0x68, 0x65, 0x63, 0x6b,
   164  	0x49, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x12, 0x3c, 0x0a, 0x0c, 0x62, 0x61, 0x73, 0x65,
   165  	0x5f, 0x65, 0x78, 0x70, 0x69, 0x72, 0x65, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19,
   166  	0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66,
   167  	0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0b, 0x62, 0x61, 0x73, 0x65, 0x45,
   168  	0x78, 0x70, 0x69, 0x72, 0x65, 0x64, 0x12, 0x3a, 0x0a, 0x0b, 0x6d, 0x69, 0x6e, 0x5f, 0x65, 0x78,
   169  	0x70, 0x69, 0x72, 0x65, 0x64, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f,
   170  	0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75,
   171  	0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0a, 0x6d, 0x69, 0x6e, 0x45, 0x78, 0x70, 0x69, 0x72,
   172  	0x65, 0x64, 0x42, 0x30, 0x5a, 0x2e, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d,
   173  	0x2f, 0x6b, 0x61, 0x79, 0x64, 0x78, 0x68, 0x2f, 0x67, 0x6f, 0x2e, 0x70, 0x6b, 0x67, 0x2e, 0x66,
   174  	0x69, 0x6c, 0x65, 0x63, 0x6c, 0x65, 0x61, 0x6e, 0x75, 0x70, 0x2e, 0x64, 0x69, 0x73, 0x6b, 0x3b,
   175  	0x64, 0x69, 0x73, 0x6b, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
   176  }
   177  
   178  var (
   179  	file_pkg_file_cleanup_disk_disk_cleaner_proto_rawDescOnce sync.Once
   180  	file_pkg_file_cleanup_disk_disk_cleaner_proto_rawDescData = file_pkg_file_cleanup_disk_disk_cleaner_proto_rawDesc
   181  )
   182  
   183  func file_pkg_file_cleanup_disk_disk_cleaner_proto_rawDescGZIP() []byte {
   184  	file_pkg_file_cleanup_disk_disk_cleaner_proto_rawDescOnce.Do(func() {
   185  		file_pkg_file_cleanup_disk_disk_cleaner_proto_rawDescData = protoimpl.X.CompressGZIP(file_pkg_file_cleanup_disk_disk_cleaner_proto_rawDescData)
   186  	})
   187  	return file_pkg_file_cleanup_disk_disk_cleaner_proto_rawDescData
   188  }
   189  
   190  var file_pkg_file_cleanup_disk_disk_cleaner_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
   191  var file_pkg_file_cleanup_disk_disk_cleaner_proto_goTypes = []interface{}{
   192  	(*DiskCleaner)(nil),       // 0: go.pkg.filecleanup.disk.DiskCleaner
   193  	(*duration.Duration)(nil), // 1: google.protobuf.Duration
   194  }
   195  var file_pkg_file_cleanup_disk_disk_cleaner_proto_depIdxs = []int32{
   196  	1, // 0: go.pkg.filecleanup.disk.DiskCleaner.check_interval:type_name -> google.protobuf.Duration
   197  	1, // 1: go.pkg.filecleanup.disk.DiskCleaner.base_expired:type_name -> google.protobuf.Duration
   198  	1, // 2: go.pkg.filecleanup.disk.DiskCleaner.min_expired:type_name -> google.protobuf.Duration
   199  	3, // [3:3] is the sub-list for method output_type
   200  	3, // [3:3] is the sub-list for method input_type
   201  	3, // [3:3] is the sub-list for extension type_name
   202  	3, // [3:3] is the sub-list for extension extendee
   203  	0, // [0:3] is the sub-list for field type_name
   204  }
   205  
   206  func init() { file_pkg_file_cleanup_disk_disk_cleaner_proto_init() }
   207  func file_pkg_file_cleanup_disk_disk_cleaner_proto_init() {
   208  	if File_pkg_file_cleanup_disk_disk_cleaner_proto != nil {
   209  		return
   210  	}
   211  	if !protoimpl.UnsafeEnabled {
   212  		file_pkg_file_cleanup_disk_disk_cleaner_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
   213  			switch v := v.(*DiskCleaner); i {
   214  			case 0:
   215  				return &v.state
   216  			case 1:
   217  				return &v.sizeCache
   218  			case 2:
   219  				return &v.unknownFields
   220  			default:
   221  				return nil
   222  			}
   223  		}
   224  	}
   225  	type x struct{}
   226  	out := protoimpl.TypeBuilder{
   227  		File: protoimpl.DescBuilder{
   228  			GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
   229  			RawDescriptor: file_pkg_file_cleanup_disk_disk_cleaner_proto_rawDesc,
   230  			NumEnums:      0,
   231  			NumMessages:   1,
   232  			NumExtensions: 0,
   233  			NumServices:   0,
   234  		},
   235  		GoTypes:           file_pkg_file_cleanup_disk_disk_cleaner_proto_goTypes,
   236  		DependencyIndexes: file_pkg_file_cleanup_disk_disk_cleaner_proto_depIdxs,
   237  		MessageInfos:      file_pkg_file_cleanup_disk_disk_cleaner_proto_msgTypes,
   238  	}.Build()
   239  	File_pkg_file_cleanup_disk_disk_cleaner_proto = out.File
   240  	file_pkg_file_cleanup_disk_disk_cleaner_proto_rawDesc = nil
   241  	file_pkg_file_cleanup_disk_disk_cleaner_proto_goTypes = nil
   242  	file_pkg_file_cleanup_disk_disk_cleaner_proto_depIdxs = nil
   243  }