File
Blob: spec/protocol/keyless.pb.go
| 1 | // Code generated by protoc-gen-go. DO NOT EDIT. |
| 2 | // versions: |
| 3 | // protoc-gen-go v1.36.11 |
| 4 | // protoc v7.34.0 |
| 5 | // source: spec/proto/keyless.proto |
| 6 | |
| 7 | package protocol |
| 8 | |
| 9 | import ( |
| 10 | protoreflect "google.golang.org/protobuf/reflect/protoreflect" |
| 11 | protoimpl "google.golang.org/protobuf/runtime/protoimpl" |
| 12 | reflect "reflect" |
| 13 | sync "sync" |
| 14 | unsafe "unsafe" |
| 15 | ) |
| 16 | |
| 17 | const ( |
| 18 | // Verify that this generated code is sufficiently up-to-date. |
| 19 | _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) |
| 20 | // Verify that runtime/protoimpl is sufficiently up-to-date. |
| 21 | _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) |
| 22 | ) |
| 23 | |
| 24 | type KeylessSignRequest_HashAlgorithm int32 |
| 25 | |
| 26 | const ( |
| 27 | KeylessSignRequest_UNKNOWN KeylessSignRequest_HashAlgorithm = 0 |
| 28 | KeylessSignRequest_SHA256 KeylessSignRequest_HashAlgorithm = 1 |
| 29 | KeylessSignRequest_SHA384 KeylessSignRequest_HashAlgorithm = 2 |
| 30 | KeylessSignRequest_SHA512 KeylessSignRequest_HashAlgorithm = 3 |
| 31 | ) |
| 32 | |
| 33 | // Enum value maps for KeylessSignRequest_HashAlgorithm. |
| 34 | var ( |
| 35 | KeylessSignRequest_HashAlgorithm_name = map[int32]string{ |
| 36 | 0: "UNKNOWN", |
| 37 | 1: "SHA256", |
| 38 | 2: "SHA384", |
| 39 | 3: "SHA512", |
| 40 | } |
| 41 | KeylessSignRequest_HashAlgorithm_value = map[string]int32{ |
| 42 | "UNKNOWN": 0, |
| 43 | "SHA256": 1, |
| 44 | "SHA384": 2, |
| 45 | "SHA512": 3, |
| 46 | } |
| 47 | ) |
| 48 | |
| 49 | func (x KeylessSignRequest_HashAlgorithm) Enum() *KeylessSignRequest_HashAlgorithm { |
| 50 | p := new(KeylessSignRequest_HashAlgorithm) |
| 51 | *p = x |
| 52 | return p |
| 53 | } |
| 54 | |
| 55 | func (x KeylessSignRequest_HashAlgorithm) String() string { |
| 56 | return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) |
| 57 | } |
| 58 | |
| 59 | func (KeylessSignRequest_HashAlgorithm) Descriptor() protoreflect.EnumDescriptor { |
| 60 | return file_spec_proto_keyless_proto_enumTypes[0].Descriptor() |
| 61 | } |
| 62 | |
| 63 | func (KeylessSignRequest_HashAlgorithm) Type() protoreflect.EnumType { |
| 64 | return &file_spec_proto_keyless_proto_enumTypes[0] |
| 65 | } |
| 66 | |
| 67 | func (x KeylessSignRequest_HashAlgorithm) Number() protoreflect.EnumNumber { |
| 68 | return protoreflect.EnumNumber(x) |
| 69 | } |
| 70 | |
| 71 | // Deprecated: Use KeylessSignRequest_HashAlgorithm.Descriptor instead. |
| 72 | func (KeylessSignRequest_HashAlgorithm) EnumDescriptor() ([]byte, []int) { |
| 73 | return file_spec_proto_keyless_proto_rawDescGZIP(), []int{2, 0} |
| 74 | } |
| 75 | |
| 76 | type KeylessGetCertificateRequest struct { |
| 77 | state protoimpl.MessageState `protogen:"open.v1"` |
| 78 | Proof *ProofOfWork `protobuf:"bytes,1,opt,name=proof,proto3" json:"proof,omitempty"` |
| 79 | Hostname string `protobuf:"bytes,2,opt,name=hostname,proto3" json:"hostname,omitempty"` |
| 80 | unknownFields protoimpl.UnknownFields |
| 81 | sizeCache protoimpl.SizeCache |
| 82 | } |
| 83 | |
| 84 | func (x *KeylessGetCertificateRequest) Reset() { |
| 85 | *x = KeylessGetCertificateRequest{} |
| 86 | mi := &file_spec_proto_keyless_proto_msgTypes[0] |
| 87 | ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) |
| 88 | ms.StoreMessageInfo(mi) |
| 89 | } |
| 90 | |
| 91 | func (x *KeylessGetCertificateRequest) String() string { |
| 92 | return protoimpl.X.MessageStringOf(x) |
| 93 | } |
| 94 | |
| 95 | func (*KeylessGetCertificateRequest) ProtoMessage() {} |
| 96 | |
| 97 | func (x *KeylessGetCertificateRequest) ProtoReflect() protoreflect.Message { |
| 98 | mi := &file_spec_proto_keyless_proto_msgTypes[0] |
| 99 | if x != nil { |
| 100 | ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) |
| 101 | if ms.LoadMessageInfo() == nil { |
| 102 | ms.StoreMessageInfo(mi) |
| 103 | } |
| 104 | return ms |
| 105 | } |
| 106 | return mi.MessageOf(x) |
| 107 | } |
| 108 | |
| 109 | // Deprecated: Use KeylessGetCertificateRequest.ProtoReflect.Descriptor instead. |
| 110 | func (*KeylessGetCertificateRequest) Descriptor() ([]byte, []int) { |
| 111 | return file_spec_proto_keyless_proto_rawDescGZIP(), []int{0} |
| 112 | } |
| 113 | |
| 114 | func (x *KeylessGetCertificateRequest) GetProof() *ProofOfWork { |
| 115 | if x != nil { |
| 116 | return x.Proof |
| 117 | } |
| 118 | return nil |
| 119 | } |
| 120 | |
| 121 | func (x *KeylessGetCertificateRequest) GetHostname() string { |
| 122 | if x != nil { |
| 123 | return x.Hostname |
| 124 | } |
| 125 | return "" |
| 126 | } |
| 127 | |
| 128 | type KeylessGetCertificateResponse struct { |
| 129 | state protoimpl.MessageState `protogen:"open.v1"` |
| 130 | Certificates [][]byte `protobuf:"bytes,1,rep,name=certificates,proto3" json:"certificates,omitempty"` |
| 131 | unknownFields protoimpl.UnknownFields |
| 132 | sizeCache protoimpl.SizeCache |
| 133 | } |
| 134 | |
| 135 | func (x *KeylessGetCertificateResponse) Reset() { |
| 136 | *x = KeylessGetCertificateResponse{} |
| 137 | mi := &file_spec_proto_keyless_proto_msgTypes[1] |
| 138 | ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) |
| 139 | ms.StoreMessageInfo(mi) |
| 140 | } |
| 141 | |
| 142 | func (x *KeylessGetCertificateResponse) String() string { |
| 143 | return protoimpl.X.MessageStringOf(x) |
| 144 | } |
| 145 | |
| 146 | func (*KeylessGetCertificateResponse) ProtoMessage() {} |
| 147 | |
| 148 | func (x *KeylessGetCertificateResponse) ProtoReflect() protoreflect.Message { |
| 149 | mi := &file_spec_proto_keyless_proto_msgTypes[1] |
| 150 | if x != nil { |
| 151 | ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) |
| 152 | if ms.LoadMessageInfo() == nil { |
| 153 | ms.StoreMessageInfo(mi) |
| 154 | } |
| 155 | return ms |
| 156 | } |
| 157 | return mi.MessageOf(x) |
| 158 | } |
| 159 | |
| 160 | // Deprecated: Use KeylessGetCertificateResponse.ProtoReflect.Descriptor instead. |
| 161 | func (*KeylessGetCertificateResponse) Descriptor() ([]byte, []int) { |
| 162 | return file_spec_proto_keyless_proto_rawDescGZIP(), []int{1} |
| 163 | } |
| 164 | |
| 165 | func (x *KeylessGetCertificateResponse) GetCertificates() [][]byte { |
| 166 | if x != nil { |
| 167 | return x.Certificates |
| 168 | } |
| 169 | return nil |
| 170 | } |
| 171 | |
| 172 | type KeylessSignRequest struct { |
| 173 | state protoimpl.MessageState `protogen:"open.v1"` |
| 174 | Proof *ProofOfWork `protobuf:"bytes,1,opt,name=proof,proto3" json:"proof,omitempty"` |
| 175 | Hostname string `protobuf:"bytes,2,opt,name=hostname,proto3" json:"hostname,omitempty"` |
| 176 | Digest []byte `protobuf:"bytes,3,opt,name=digest,proto3" json:"digest,omitempty"` |
| 177 | Algo KeylessSignRequest_HashAlgorithm `protobuf:"varint,4,opt,name=algo,proto3,enum=protocol.KeylessSignRequest_HashAlgorithm" json:"algo,omitempty"` |
| 178 | unknownFields protoimpl.UnknownFields |
| 179 | sizeCache protoimpl.SizeCache |
| 180 | } |
| 181 | |
| 182 | func (x *KeylessSignRequest) Reset() { |
| 183 | *x = KeylessSignRequest{} |
| 184 | mi := &file_spec_proto_keyless_proto_msgTypes[2] |
| 185 | ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) |
| 186 | ms.StoreMessageInfo(mi) |
| 187 | } |
| 188 | |
| 189 | func (x *KeylessSignRequest) String() string { |
| 190 | return protoimpl.X.MessageStringOf(x) |
| 191 | } |
| 192 | |
| 193 | func (*KeylessSignRequest) ProtoMessage() {} |
| 194 | |
| 195 | func (x *KeylessSignRequest) ProtoReflect() protoreflect.Message { |
| 196 | mi := &file_spec_proto_keyless_proto_msgTypes[2] |
| 197 | if x != nil { |
| 198 | ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) |
| 199 | if ms.LoadMessageInfo() == nil { |
| 200 | ms.StoreMessageInfo(mi) |
| 201 | } |
| 202 | return ms |
| 203 | } |
| 204 | return mi.MessageOf(x) |
| 205 | } |
| 206 | |
| 207 | // Deprecated: Use KeylessSignRequest.ProtoReflect.Descriptor instead. |
| 208 | func (*KeylessSignRequest) Descriptor() ([]byte, []int) { |
| 209 | return file_spec_proto_keyless_proto_rawDescGZIP(), []int{2} |
| 210 | } |
| 211 | |
| 212 | func (x *KeylessSignRequest) GetProof() *ProofOfWork { |
| 213 | if x != nil { |
| 214 | return x.Proof |
| 215 | } |
| 216 | return nil |
| 217 | } |
| 218 | |
| 219 | func (x *KeylessSignRequest) GetHostname() string { |
| 220 | if x != nil { |
| 221 | return x.Hostname |
| 222 | } |
| 223 | return "" |
| 224 | } |
| 225 | |
| 226 | func (x *KeylessSignRequest) GetDigest() []byte { |
| 227 | if x != nil { |
| 228 | return x.Digest |
| 229 | } |
| 230 | return nil |
| 231 | } |
| 232 | |
| 233 | func (x *KeylessSignRequest) GetAlgo() KeylessSignRequest_HashAlgorithm { |
| 234 | if x != nil { |
| 235 | return x.Algo |
| 236 | } |
| 237 | return KeylessSignRequest_UNKNOWN |
| 238 | } |
| 239 | |
| 240 | type KeylessSignResponse struct { |
| 241 | state protoimpl.MessageState `protogen:"open.v1"` |
| 242 | Signature []byte `protobuf:"bytes,1,opt,name=signature,proto3" json:"signature,omitempty"` |
| 243 | unknownFields protoimpl.UnknownFields |
| 244 | sizeCache protoimpl.SizeCache |
| 245 | } |
| 246 | |
| 247 | func (x *KeylessSignResponse) Reset() { |
| 248 | *x = KeylessSignResponse{} |
| 249 | mi := &file_spec_proto_keyless_proto_msgTypes[3] |
| 250 | ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) |
| 251 | ms.StoreMessageInfo(mi) |
| 252 | } |
| 253 | |
| 254 | func (x *KeylessSignResponse) String() string { |
| 255 | return protoimpl.X.MessageStringOf(x) |
| 256 | } |
| 257 | |
| 258 | func (*KeylessSignResponse) ProtoMessage() {} |
| 259 | |
| 260 | func (x *KeylessSignResponse) ProtoReflect() protoreflect.Message { |
| 261 | mi := &file_spec_proto_keyless_proto_msgTypes[3] |
| 262 | if x != nil { |
| 263 | ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) |
| 264 | if ms.LoadMessageInfo() == nil { |
| 265 | ms.StoreMessageInfo(mi) |
| 266 | } |
| 267 | return ms |
| 268 | } |
| 269 | return mi.MessageOf(x) |
| 270 | } |
| 271 | |
| 272 | // Deprecated: Use KeylessSignResponse.ProtoReflect.Descriptor instead. |
| 273 | func (*KeylessSignResponse) Descriptor() ([]byte, []int) { |
| 274 | return file_spec_proto_keyless_proto_rawDescGZIP(), []int{3} |
| 275 | } |
| 276 | |
| 277 | func (x *KeylessSignResponse) GetSignature() []byte { |
| 278 | if x != nil { |
| 279 | return x.Signature |
| 280 | } |
| 281 | return nil |
| 282 | } |
| 283 | |
| 284 | var File_spec_proto_keyless_proto protoreflect.FileDescriptor |
| 285 | |
| 286 | const file_spec_proto_keyless_proto_rawDesc = "" + |
| 287 | "\n" + |
| 288 | "\x18spec/proto/keyless.proto\x12\bprotocol\x1a\x14spec/proto/pow.proto\"g\n" + |
| 289 | "\x1cKeylessGetCertificateRequest\x12+\n" + |
| 290 | "\x05proof\x18\x01 \x01(\v2\x15.protocol.ProofOfWorkR\x05proof\x12\x1a\n" + |
| 291 | "\bhostname\x18\x02 \x01(\tR\bhostname\"C\n" + |
| 292 | "\x1dKeylessGetCertificateResponse\x12\"\n" + |
| 293 | "\fcertificates\x18\x01 \x03(\fR\fcertificates\"\xf7\x01\n" + |
| 294 | "\x12KeylessSignRequest\x12+\n" + |
| 295 | "\x05proof\x18\x01 \x01(\v2\x15.protocol.ProofOfWorkR\x05proof\x12\x1a\n" + |
| 296 | "\bhostname\x18\x02 \x01(\tR\bhostname\x12\x16\n" + |
| 297 | "\x06digest\x18\x03 \x01(\fR\x06digest\x12>\n" + |
| 298 | "\x04algo\x18\x04 \x01(\x0e2*.protocol.KeylessSignRequest.HashAlgorithmR\x04algo\"@\n" + |
| 299 | "\rHashAlgorithm\x12\v\n" + |
| 300 | "\aUNKNOWN\x10\x00\x12\n" + |
| 301 | "\n" + |
| 302 | "\x06SHA256\x10\x01\x12\n" + |
| 303 | "\n" + |
| 304 | "\x06SHA384\x10\x02\x12\n" + |
| 305 | "\n" + |
| 306 | "\x06SHA512\x10\x03\"3\n" + |
| 307 | "\x13KeylessSignResponse\x12\x1c\n" + |
| 308 | "\tsignature\x18\x01 \x01(\fR\tsignature2\xb8\x01\n" + |
| 309 | "\x0eKeylessService\x12a\n" + |
| 310 | "\x0eGetCertificate\x12&.protocol.KeylessGetCertificateRequest\x1a'.protocol.KeylessGetCertificateResponse\x12C\n" + |
| 311 | "\x04Sign\x12\x1c.protocol.KeylessSignRequest\x1a\x1d.protocol.KeylessSignResponseB+H\x01Z'go.miragespace.co/specter/spec/protocolb\x06proto3" |
| 312 | |
| 313 | var ( |
| 314 | file_spec_proto_keyless_proto_rawDescOnce sync.Once |
| 315 | file_spec_proto_keyless_proto_rawDescData []byte |
| 316 | ) |
| 317 | |
| 318 | func file_spec_proto_keyless_proto_rawDescGZIP() []byte { |
| 319 | file_spec_proto_keyless_proto_rawDescOnce.Do(func() { |
| 320 | file_spec_proto_keyless_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_spec_proto_keyless_proto_rawDesc), len(file_spec_proto_keyless_proto_rawDesc))) |
| 321 | }) |
| 322 | return file_spec_proto_keyless_proto_rawDescData |
| 323 | } |
| 324 | |
| 325 | var file_spec_proto_keyless_proto_enumTypes = make([]protoimpl.EnumInfo, 1) |
| 326 | var file_spec_proto_keyless_proto_msgTypes = make([]protoimpl.MessageInfo, 4) |
| 327 | var file_spec_proto_keyless_proto_goTypes = []any{ |
| 328 | (KeylessSignRequest_HashAlgorithm)(0), // 0: protocol.KeylessSignRequest.HashAlgorithm |
| 329 | (*KeylessGetCertificateRequest)(nil), // 1: protocol.KeylessGetCertificateRequest |
| 330 | (*KeylessGetCertificateResponse)(nil), // 2: protocol.KeylessGetCertificateResponse |
| 331 | (*KeylessSignRequest)(nil), // 3: protocol.KeylessSignRequest |
| 332 | (*KeylessSignResponse)(nil), // 4: protocol.KeylessSignResponse |
| 333 | (*ProofOfWork)(nil), // 5: protocol.ProofOfWork |
| 334 | } |
| 335 | var file_spec_proto_keyless_proto_depIdxs = []int32{ |
| 336 | 5, // 0: protocol.KeylessGetCertificateRequest.proof:type_name -> protocol.ProofOfWork |
| 337 | 5, // 1: protocol.KeylessSignRequest.proof:type_name -> protocol.ProofOfWork |
| 338 | 0, // 2: protocol.KeylessSignRequest.algo:type_name -> protocol.KeylessSignRequest.HashAlgorithm |
| 339 | 1, // 3: protocol.KeylessService.GetCertificate:input_type -> protocol.KeylessGetCertificateRequest |
| 340 | 3, // 4: protocol.KeylessService.Sign:input_type -> protocol.KeylessSignRequest |
| 341 | 2, // 5: protocol.KeylessService.GetCertificate:output_type -> protocol.KeylessGetCertificateResponse |
| 342 | 4, // 6: protocol.KeylessService.Sign:output_type -> protocol.KeylessSignResponse |
| 343 | 5, // [5:7] is the sub-list for method output_type |
| 344 | 3, // [3:5] is the sub-list for method input_type |
| 345 | 3, // [3:3] is the sub-list for extension type_name |
| 346 | 3, // [3:3] is the sub-list for extension extendee |
| 347 | 0, // [0:3] is the sub-list for field type_name |
| 348 | } |
| 349 | |
| 350 | func init() { file_spec_proto_keyless_proto_init() } |
| 351 | func file_spec_proto_keyless_proto_init() { |
| 352 | if File_spec_proto_keyless_proto != nil { |
| 353 | return |
| 354 | } |
| 355 | file_spec_proto_pow_proto_init() |
| 356 | type x struct{} |
| 357 | out := protoimpl.TypeBuilder{ |
| 358 | File: protoimpl.DescBuilder{ |
| 359 | GoPackagePath: reflect.TypeOf(x{}).PkgPath(), |
| 360 | RawDescriptor: unsafe.Slice(unsafe.StringData(file_spec_proto_keyless_proto_rawDesc), len(file_spec_proto_keyless_proto_rawDesc)), |
| 361 | NumEnums: 1, |
| 362 | NumMessages: 4, |
| 363 | NumExtensions: 0, |
| 364 | NumServices: 1, |
| 365 | }, |
| 366 | GoTypes: file_spec_proto_keyless_proto_goTypes, |
| 367 | DependencyIndexes: file_spec_proto_keyless_proto_depIdxs, |
| 368 | EnumInfos: file_spec_proto_keyless_proto_enumTypes, |
| 369 | MessageInfos: file_spec_proto_keyless_proto_msgTypes, |
| 370 | }.Build() |
| 371 | File_spec_proto_keyless_proto = out.File |
| 372 | file_spec_proto_keyless_proto_goTypes = nil |
| 373 | file_spec_proto_keyless_proto_depIdxs = nil |
| 374 | } |