github.com/creachadair/ffs@v0.17.3/index/indexpb/index.pb.go (about)

     1  // Copyright 2021 Michael J. Fromberger. All Rights Reserved.
     2  //
     3  // Licensed under the Apache License, Version 2.0 (the "License");
     4  // you may not use this file except in compliance with the License.
     5  // You may obtain a copy of the License at
     6  //
     7  //     http://www.apache.org/licenses/LICENSE-2.0
     8  //
     9  // Unless required by applicable law or agreed to in writing, software
    10  // distributed under the License is distributed on an "AS IS" BASIS,
    11  // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    12  // See the License for the specific language governing permissions and
    13  // limitations under the License.
    14  
    15  // This schema defines a storage encoding for a Bloom filter index.
    16  
    17  // Code generated by protoc-gen-go. DO NOT EDIT.
    18  // versions:
    19  // 	protoc-gen-go v1.36.10
    20  // 	protoc        v6.33.0
    21  // source: index.proto
    22  
    23  package indexpb
    24  
    25  import (
    26  	protoreflect "google.golang.org/protobuf/reflect/protoreflect"
    27  	protoimpl "google.golang.org/protobuf/runtime/protoimpl"
    28  	reflect "reflect"
    29  	sync "sync"
    30  	unsafe "unsafe"
    31  )
    32  
    33  const (
    34  	// Verify that this generated code is sufficiently up-to-date.
    35  	_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
    36  	// Verify that runtime/protoimpl is sufficiently up-to-date.
    37  	_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
    38  )
    39  
    40  type Index_HashFunc int32
    41  
    42  const (
    43  	Index_DEFAULT Index_HashFunc = 0
    44  )
    45  
    46  // Enum value maps for Index_HashFunc.
    47  var (
    48  	Index_HashFunc_name = map[int32]string{
    49  		0: "DEFAULT",
    50  	}
    51  	Index_HashFunc_value = map[string]int32{
    52  		"DEFAULT": 0,
    53  	}
    54  )
    55  
    56  func (x Index_HashFunc) Enum() *Index_HashFunc {
    57  	p := new(Index_HashFunc)
    58  	*p = x
    59  	return p
    60  }
    61  
    62  func (x Index_HashFunc) String() string {
    63  	return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
    64  }
    65  
    66  func (Index_HashFunc) Descriptor() protoreflect.EnumDescriptor {
    67  	return file_index_proto_enumTypes[0].Descriptor()
    68  }
    69  
    70  func (Index_HashFunc) Type() protoreflect.EnumType {
    71  	return &file_index_proto_enumTypes[0]
    72  }
    73  
    74  func (x Index_HashFunc) Number() protoreflect.EnumNumber {
    75  	return protoreflect.EnumNumber(x)
    76  }
    77  
    78  // Deprecated: Use Index_HashFunc.Descriptor instead.
    79  func (Index_HashFunc) EnumDescriptor() ([]byte, []int) {
    80  	return file_index_proto_rawDescGZIP(), []int{0, 0}
    81  }
    82  
    83  // An Index is the storage encoding of a Bloom filter index.
    84  type Index struct {
    85  	state         protoimpl.MessageState `protogen:"open.v1"`
    86  	NumKeys       uint64                 `protobuf:"varint,1,opt,name=num_keys,json=numKeys,proto3" json:"num_keys,omitempty"`                                  // total number of keys indexed
    87  	Seeds         []uint64               `protobuf:"varint,2,rep,packed,name=seeds,proto3" json:"seeds,omitempty"`                                              // hash seeds used for lookup
    88  	NumSegments   uint64                 `protobuf:"varint,5,opt,name=num_segments,json=numSegments,proto3" json:"num_segments,omitempty"`                      // number of bit vector segments
    89  	SegmentData   []byte                 `protobuf:"bytes,6,opt,name=segment_data,json=segmentData,proto3" json:"segment_data,omitempty"`                       // zlib-compressed segment data
    90  	HashFunc      Index_HashFunc         `protobuf:"varint,4,opt,name=hash_func,json=hashFunc,proto3,enum=ffs.index.Index_HashFunc" json:"hash_func,omitempty"` // which hash function was used
    91  	unknownFields protoimpl.UnknownFields
    92  	sizeCache     protoimpl.SizeCache
    93  }
    94  
    95  func (x *Index) Reset() {
    96  	*x = Index{}
    97  	mi := &file_index_proto_msgTypes[0]
    98  	ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
    99  	ms.StoreMessageInfo(mi)
   100  }
   101  
   102  func (x *Index) String() string {
   103  	return protoimpl.X.MessageStringOf(x)
   104  }
   105  
   106  func (*Index) ProtoMessage() {}
   107  
   108  func (x *Index) ProtoReflect() protoreflect.Message {
   109  	mi := &file_index_proto_msgTypes[0]
   110  	if x != nil {
   111  		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
   112  		if ms.LoadMessageInfo() == nil {
   113  			ms.StoreMessageInfo(mi)
   114  		}
   115  		return ms
   116  	}
   117  	return mi.MessageOf(x)
   118  }
   119  
   120  // Deprecated: Use Index.ProtoReflect.Descriptor instead.
   121  func (*Index) Descriptor() ([]byte, []int) {
   122  	return file_index_proto_rawDescGZIP(), []int{0}
   123  }
   124  
   125  func (x *Index) GetNumKeys() uint64 {
   126  	if x != nil {
   127  		return x.NumKeys
   128  	}
   129  	return 0
   130  }
   131  
   132  func (x *Index) GetSeeds() []uint64 {
   133  	if x != nil {
   134  		return x.Seeds
   135  	}
   136  	return nil
   137  }
   138  
   139  func (x *Index) GetNumSegments() uint64 {
   140  	if x != nil {
   141  		return x.NumSegments
   142  	}
   143  	return 0
   144  }
   145  
   146  func (x *Index) GetSegmentData() []byte {
   147  	if x != nil {
   148  		return x.SegmentData
   149  	}
   150  	return nil
   151  }
   152  
   153  func (x *Index) GetHashFunc() Index_HashFunc {
   154  	if x != nil {
   155  		return x.HashFunc
   156  	}
   157  	return Index_DEFAULT
   158  }
   159  
   160  var File_index_proto protoreflect.FileDescriptor
   161  
   162  const file_index_proto_rawDesc = "" +
   163  	"\n" +
   164  	"\vindex.proto\x12\tffs.index\"\xd5\x01\n" +
   165  	"\x05Index\x12\x19\n" +
   166  	"\bnum_keys\x18\x01 \x01(\x04R\anumKeys\x12\x14\n" +
   167  	"\x05seeds\x18\x02 \x03(\x04R\x05seeds\x12!\n" +
   168  	"\fnum_segments\x18\x05 \x01(\x04R\vnumSegments\x12!\n" +
   169  	"\fsegment_data\x18\x06 \x01(\fR\vsegmentData\x126\n" +
   170  	"\thash_func\x18\x04 \x01(\x0e2\x19.ffs.index.Index.HashFuncR\bhashFunc\"\x17\n" +
   171  	"\bHashFunc\x12\v\n" +
   172  	"\aDEFAULT\x10\x00J\x04\b\x03\x10\x04B*Z(github.com/creachadair/ffs/index/indexpbb\x06proto3"
   173  
   174  var (
   175  	file_index_proto_rawDescOnce sync.Once
   176  	file_index_proto_rawDescData []byte
   177  )
   178  
   179  func file_index_proto_rawDescGZIP() []byte {
   180  	file_index_proto_rawDescOnce.Do(func() {
   181  		file_index_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_index_proto_rawDesc), len(file_index_proto_rawDesc)))
   182  	})
   183  	return file_index_proto_rawDescData
   184  }
   185  
   186  var file_index_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
   187  var file_index_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
   188  var file_index_proto_goTypes = []any{
   189  	(Index_HashFunc)(0), // 0: ffs.index.Index.HashFunc
   190  	(*Index)(nil),       // 1: ffs.index.Index
   191  }
   192  var file_index_proto_depIdxs = []int32{
   193  	0, // 0: ffs.index.Index.hash_func:type_name -> ffs.index.Index.HashFunc
   194  	1, // [1:1] is the sub-list for method output_type
   195  	1, // [1:1] is the sub-list for method input_type
   196  	1, // [1:1] is the sub-list for extension type_name
   197  	1, // [1:1] is the sub-list for extension extendee
   198  	0, // [0:1] is the sub-list for field type_name
   199  }
   200  
   201  func init() { file_index_proto_init() }
   202  func file_index_proto_init() {
   203  	if File_index_proto != nil {
   204  		return
   205  	}
   206  	type x struct{}
   207  	out := protoimpl.TypeBuilder{
   208  		File: protoimpl.DescBuilder{
   209  			GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
   210  			RawDescriptor: unsafe.Slice(unsafe.StringData(file_index_proto_rawDesc), len(file_index_proto_rawDesc)),
   211  			NumEnums:      1,
   212  			NumMessages:   1,
   213  			NumExtensions: 0,
   214  			NumServices:   0,
   215  		},
   216  		GoTypes:           file_index_proto_goTypes,
   217  		DependencyIndexes: file_index_proto_depIdxs,
   218  		EnumInfos:         file_index_proto_enumTypes,
   219  		MessageInfos:      file_index_proto_msgTypes,
   220  	}.Build()
   221  	File_index_proto = out.File
   222  	file_index_proto_goTypes = nil
   223  	file_index_proto_depIdxs = nil
   224  }