diff --git a/proto/vulcanize/registry/v1beta1/attributes.proto b/proto/vulcanize/registry/v1beta1/attributes.proto index c5d27020..64e49e5b 100644 --- a/proto/vulcanize/registry/v1beta1/attributes.proto +++ b/proto/vulcanize/registry/v1beta1/attributes.proto @@ -5,29 +5,109 @@ import "gogoproto/gogo.proto"; option go_package = "github.com/cerc-io/laconicd/x/registry/types"; -message ServiceProviderRegistration { +message HashReference{ + string ref =1 [(gogoproto.jsontag) = "/"]; +} + +message ServiceProviderRecord { string bond_id = 1 [(gogoproto.moretags) = "json:\"bondId\" yaml:\"bondId\""]; string laconic_id = 2 [(gogoproto.moretags) = "json:\"laconicId\" yaml:\"laconicId\""]; X500 x500 = 3 [(gogoproto.moretags) = "json:\"x500\" yaml:\"x500\""]; string type = 4 [(gogoproto.moretags) = "json:\"type\" yaml:\"type\""]; string version = 6 [(gogoproto.moretags) = "json:\"version\" yaml:\"version\""]; + + message X500 { + string common_name = 1 [(gogoproto.moretags) = "json:\"commonName\" yaml:\"commonName\""]; + string organization_unit = 2 [(gogoproto.moretags) = "json:\"organizationUnit\" yaml:\"organizationUnit\""]; + string organization_name = 3 [(gogoproto.moretags) = "json:\"organizationName\" yaml:\"organizationName\""]; + string locality_name = 4 [(gogoproto.moretags) = "json:\"localityName\" yaml:\"localityName\""]; + string state_name = 5 [(gogoproto.moretags) = "json:\"stateName\" yaml:\"stateName\""]; + string country = 6 [(gogoproto.moretags) = "json:\"country\" yaml:\"country\""]; + } } -message X500 { - string common_name = 1 [(gogoproto.moretags) = "json:\"commonName\" yaml:\"commonName\""]; - string organization_unit = 2 [(gogoproto.moretags) = "json:\"organizationUnit\" yaml:\"organizationUnit\""]; - string organization_name = 3 [(gogoproto.moretags) = "json:\"organizationName\" yaml:\"organizationName\""]; - string locality_name = 4 [(gogoproto.moretags) = "json:\"localityName\" yaml:\"localityName\""]; - string state_name = 5 [(gogoproto.moretags) = "json:\"stateName\" yaml:\"stateName\""]; - string country = 6 [(gogoproto.moretags) = "json:\"country\" yaml:\"country\""]; -} + message WebsiteRegistrationRecord { string url = 1 [(gogoproto.moretags) = "json:\"url\" yaml:\"url\""]; - string repo_registration_record_cid = 2 - [(gogoproto.moretags) = "json:\"repoRegistrationRecordCID\" yaml:\"repoRegistrationRecordCID\""]; - string build_artifact_cid = 3 [(gogoproto.moretags) = "json:\"buildArtifactCID\" yaml:\"buildArtifactCID\""]; - string tls_cert_cid = 4 [(gogoproto.moretags) = "json:\"TLSCertCID\" yaml:\"TLSCertCID\""]; + HashReference repo_reference = 2 + [(gogoproto.moretags) = "json:\"repoReference\" yaml:\"repoReference\""]; + HashReference build_artifact_ref = 3 [(gogoproto.moretags) = "json:\"buildArtifactRef\" yaml:\"buildArtifactRef\""]; + HashReference tls_cert_ref = 4 [(gogoproto.moretags) = "json:\"tlsCertRef\" yaml:\"tlsCertRef\""]; string type = 5 [(gogoproto.moretags) = "json:\"type\" yaml:\"type\""]; string version = 6 [(gogoproto.moretags) = "json:\"version\" yaml:\"version\""]; +} + +message GitRepository{ + string name =1 [(gogoproto.moretags) = "json:\"name\" yaml:\"name\""]; + string repo_reference=2 [(gogoproto.moretags) = "json:\"repo_reference\" yaml:\"repo_reference\""]; + string description=3 [(gogoproto.moretags) = "json:\"description\" yaml:\"description\""]; + string version = 4 [(gogoproto.moretags) = "json:\"version\" yaml:\"version\""]; + string type =5 [(gogoproto.moretags) = "json:\"type\" yaml:\"type\""]; +} + +message Binary{ + HashReference hash_reference=1; + string targeted_arch=2; + string runtime_version=3; + HashReference repo_reference=4; + string version=5; + string type=6; +} + +message DockerImage{ + string image_id=1; + HashReference binary_reference=2; + HashReference repo_reference=3; + string version=4; + string type=5; +} + +message WatcherRegistrationRecord{ + WatcherMetadata metadata =1; + HashReference repo_reference=2; + WASMBinary wasm=3; + string version=4; + string type=5; + + message WatcherMetadata{ + string version=1; + HashReference chain_reference=2; + } + + message WASMBinary{ + HashReference hash_reference=1; + WASMBinaryMetadata metadata=2; + } + + message WASMBinaryMetadata{ + string compiler_version=1; + string execution_engine_version=2; + } +} + +message ResponderContract{ + HashReference service_provider_ref=1; + HashReference auction_ref=2; + HashReference watcher_ref=3; + string version=4; + string type=5; +} + +message JSPackage{ + HashReference repo_reference=1; + HashReference js_package_ref=2; + string version=3; + string type=4; + string name =5; +} + +message ChainRegistrationRecord{ + string name=1; + repeated string ipld_types=2; + string type=3; + string version=4; + string chain_id=5; + string network_id=6; + HashReference genesis_hash=7; } \ No newline at end of file diff --git a/x/registry/client/testutil/grpc.go b/x/registry/client/testutil/grpc.go index 143dab90..b14e47bb 100644 --- a/x/registry/client/testutil/grpc.go +++ b/x/registry/client/testutil/grpc.go @@ -60,7 +60,7 @@ func (s *IntegrationTestSuite) TestGRPCQueryParams() { } } -//nolint: all +//nolint:all func (s *IntegrationTestSuite) TestGRPCQueryWhoIs() { val := s.network.Validators[0] sr := s.Require() @@ -180,7 +180,7 @@ func (s *IntegrationTestSuite) TestGRPCQueryLookup() { } } -//nolint: all +//nolint:all func (s *IntegrationTestSuite) TestGRPCQueryRecordExpiryQueue() { val := s.network.Validators[0] sr := s.Require() @@ -209,7 +209,7 @@ func (s *IntegrationTestSuite) TestGRPCQueryRecordExpiryQueue() { func(bondId string) { dir, err := os.Getwd() sr.NoError(err) - payloadPath := dir + "/service_provider_example.yml" + payloadPath := dir + "/../../helpers/examples/service_provider_example.yml" args := []string{ fmt.Sprintf("--%s=%s", flags.FlagFrom, accountName), fmt.Sprintf("--%s=true", flags.FlagSkipConfirmation), @@ -252,7 +252,7 @@ func (s *IntegrationTestSuite) TestGRPCQueryRecordExpiryQueue() { } } -//nolint: all +//nolint:all func (s *IntegrationTestSuite) TestGRPCQueryAuthorityExpiryQueue() { val := s.network.Validators[0] sr := s.Require() @@ -324,7 +324,7 @@ func (s *IntegrationTestSuite) TestGRPCQueryAuthorityExpiryQueue() { } } -//nolint: all +//nolint:all func (s *IntegrationTestSuite) TestGRPCQueryListRecords() { val := s.network.Validators[0] sr := s.Require() @@ -353,7 +353,7 @@ func (s *IntegrationTestSuite) TestGRPCQueryListRecords() { func(bondId string) { dir, err := os.Getwd() sr.NoError(err) - payloadPath := dir + "/service_provider_example.yml" + payloadPath := dir + "/../../helpers/examples/service_provider_example.yml" args := []string{ fmt.Sprintf("--%s=%s", flags.FlagFrom, accountName), fmt.Sprintf("--%s=true", flags.FlagSkipConfirmation), @@ -626,7 +626,7 @@ func createRecord(bondID string, s *IntegrationTestSuite) { dir, err := os.Getwd() sr.NoError(err) - payloadPath := dir + "/service_provider_example.yml" + payloadPath := dir + "/../../helpers/examples/service_provider_example.yml" args := []string{ fmt.Sprintf("--%s=%s", flags.FlagFrom, accountName), fmt.Sprintf("--%s=true", flags.FlagSkipConfirmation), diff --git a/x/registry/client/testutil/query.go b/x/registry/client/testutil/query.go index f2b09b89..5e6e6ca8 100644 --- a/x/registry/client/testutil/query.go +++ b/x/registry/client/testutil/query.go @@ -79,7 +79,7 @@ func (s *IntegrationTestSuite) TestGetCmdQueryForRecords() { bondID := GetBondID(s) dir, err := os.Getwd() sr.NoError(err) - payloadPath := dir + "/service_provider_example.yml" + payloadPath := dir + "/../../helpers/examples/service_provider_example.yml" args := []string{ payloadPath, bondID, fmt.Sprintf("--%s=%s", flags.FlagFrom, accountName), diff --git a/x/registry/client/testutil/service_provider_example.yml b/x/registry/client/testutil/service_provider_example.yml deleted file mode 100644 index 87ea35ca..00000000 --- a/x/registry/client/testutil/service_provider_example.yml +++ /dev/null @@ -1,13 +0,0 @@ - -record: - type: ServiceProviderRegistration - bond_id: madeUpBondID - laconic_id: madeUpLaconicID - version: 1.0.0 - x500: - common_name: cerc-io - organization_unit: xyz - organization_name: abc - state_name: california - country: US - locality_name: local \ No newline at end of file diff --git a/x/registry/client/testutil/tx.go b/x/registry/client/testutil/tx.go index 4da1bdc2..5efe9bbe 100644 --- a/x/registry/client/testutil/tx.go +++ b/x/registry/client/testutil/tx.go @@ -198,7 +198,7 @@ func (s *IntegrationTestSuite) TestGetCmdSetRecord() { bondID := GetBondID(s) dir, err := os.Getwd() sr.NoError(err) - payloadPath := dir + "/service_provider_example.yml" + payloadPath := dir + "/../../helpers/examples/watcher_registration_example.yml" tc.args = append([]string{payloadPath, bondID}, tc.args...) } @@ -580,7 +580,7 @@ func (s *IntegrationTestSuite) TestGetCmdDissociateBond() { bondID := GetBondID(s) dir, err := os.Getwd() sr.NoError(err) - payloadPath := dir + "/service_provider_example.yml" + payloadPath := dir + "/../../helpers/examples/service_provider_example.yml" args := []string{ payloadPath, bondID, @@ -822,7 +822,7 @@ func (s *IntegrationTestSuite) TestGetCmdAssociateBond() { bondID := GetBondID(s) dir, err := os.Getwd() sr.NoError(err) - payloadPath := dir + "/service_provider_example.yml" + payloadPath := dir + "/../../helpers/examples/service_provider_example.yml" txArgs := []string{ payloadPath, bondID, diff --git a/x/registry/client/testutil/website_registration_example.yml b/x/registry/client/testutil/website_registration_example.yml deleted file mode 100644 index b640b3e0..00000000 --- a/x/registry/client/testutil/website_registration_example.yml +++ /dev/null @@ -1,7 +0,0 @@ -record: - type: WebsiteRegistrationRecord - url: https://cerc.io - repo_registration_record_cid: QmSnuWmxptJZdLJpKRarxBMS2Ju2oANVrgbr2xWbie9b2D - build_artifact_cid: QmP8jTG1m9GSDJLCbeWhVSVgEzCPPwXRdCRuJtQ5Tz9Kc9 - tls_cert_cid: QmbWqxBEKC3P8tqsKc98xmWNzrzDtRLMiMPL8wBuTGsMnR - version: 1.0.0 \ No newline at end of file diff --git a/x/registry/helpers/examples/binary_example.yml b/x/registry/helpers/examples/binary_example.yml new file mode 100644 index 00000000..ad8db108 --- /dev/null +++ b/x/registry/helpers/examples/binary_example.yml @@ -0,0 +1,9 @@ +record: + hash_reference: + /: QmP8jTG1m9GSDJLCbeWhVSVgEzCPPwXRdCRuJtQ5Tz9Kc9 + targeted_arch: x86_64 + runtime_version: go 1.18 + repo_reference: + /: QmSnuWmxptJZdLJpKRarxBMS2Ju2oANVrgbr2xWbie9b2D + version: 1.0.0 + type: Binary \ No newline at end of file diff --git a/x/registry/helpers/examples/chain_registration_example.yml b/x/registry/helpers/examples/chain_registration_example.yml new file mode 100644 index 00000000..648c5c4f --- /dev/null +++ b/x/registry/helpers/examples/chain_registration_example.yml @@ -0,0 +1,13 @@ +record: + name: Laconic + ipld_types: + - type3 + - type11 + - schema2 + - codec5 + type: ChainRegistrationRecord + version: 0.11.2 + chain_id: laconic_9000-1 + network_id: "1392" + genesis_hash: + /: QmSnuWmxptJZdLJpKRarxBMS2Ju2oANVrgbr2xWbie9b2D \ No newline at end of file diff --git a/x/registry/helpers/examples/docker_image_example.yml b/x/registry/helpers/examples/docker_image_example.yml new file mode 100644 index 00000000..b7ecd09e --- /dev/null +++ b/x/registry/helpers/examples/docker_image_example.yml @@ -0,0 +1,8 @@ +record: + image_id: 77af4d6b9913 + binary_reference: + /: QmP8jTG1m9GSDJLCbeWhVSVgEzCPPwXRdCRuJtQ5Tz9Kc9 + repo_reference: + /: QmSnuWmxptJZdLJpKRarxBMS2Ju2oANVrgbr2xWbie9b2D + version: 1.0.0 + type: DockerImage \ No newline at end of file diff --git a/x/registry/helpers/examples/git_repo_example.yml b/x/registry/helpers/examples/git_repo_example.yml new file mode 100644 index 00000000..5cae5c96 --- /dev/null +++ b/x/registry/helpers/examples/git_repo_example.yml @@ -0,0 +1,6 @@ +record: + name: cosmos-sdk + repo_reference: https://github.com/cosmos/cosmos-sdk + description: This is a description string + version: 0.46.7 + type: GitRepository \ No newline at end of file diff --git a/x/registry/client/testutil/example1.yml b/x/registry/helpers/examples/js_package_example.yml similarity index 55% rename from x/registry/client/testutil/example1.yml rename to x/registry/helpers/examples/js_package_example.yml index 3f7b4863..9b06fbc4 100644 --- a/x/registry/client/testutil/example1.yml +++ b/x/registry/helpers/examples/js_package_example.yml @@ -1,7 +1,8 @@ record: - attr1: value1 - attr2: value2 - link1: - /: QmSnuWmxptJZdLJpKRarxBMS2Ju2oANVrgbr2xWbie9b2D - link2: + repo_reference: /: QmP8jTG1m9GSDJLCbeWhVSVgEzCPPwXRdCRuJtQ5Tz9Kc9 + js_package_ref: + /: QmSnuWmxptJZdLJpKRarxBMS2Ju2oANVrgbr2xWbie9b2D + version: 1.0.0 + type: JSPackage + name: test-JSPackage \ No newline at end of file diff --git a/x/registry/helpers/examples/responder_contract_example.yml b/x/registry/helpers/examples/responder_contract_example.yml new file mode 100644 index 00000000..e503cc39 --- /dev/null +++ b/x/registry/helpers/examples/responder_contract_example.yml @@ -0,0 +1,9 @@ +record: + service_provider_ref: + /: QmP8jTG1m9GSDJLCbeWhVSVgEzCPPwXRdCRuJtQ5Tz9Kc9 + auction_ref: + /: QmSnuWmxptJZdLJpKRarxBMS2Ju2oANVrgbr2xWbie9b2D + watcher_ref: + /: QmbWqxBEKC3P8tqsKc98xmWNzrzDtRLMiMPL8wBuTGsMnR + version: 1.0.0 + type: ResponderContract \ No newline at end of file diff --git a/x/registry/helpers/examples/service_provider_example.yml b/x/registry/helpers/examples/service_provider_example.yml index 87ea35ca..741cc5ea 100644 --- a/x/registry/helpers/examples/service_provider_example.yml +++ b/x/registry/helpers/examples/service_provider_example.yml @@ -1,6 +1,6 @@ record: - type: ServiceProviderRegistration + type: ServiceProviderRecord bond_id: madeUpBondID laconic_id: madeUpLaconicID version: 1.0.0 diff --git a/x/registry/helpers/examples/watcher_registration_example.yml b/x/registry/helpers/examples/watcher_registration_example.yml new file mode 100644 index 00000000..50b7d687 --- /dev/null +++ b/x/registry/helpers/examples/watcher_registration_example.yml @@ -0,0 +1,15 @@ +record: + metadata: + version: 0.32.0 + chain_reference: + /: QmP8jTG1m9GSDJLCbeWhVSVgEzCPPwXRdCRuJtQ5Tz9Kc9 + repo_reference: + /: QmSnuWmxptJZdLJpKRarxBMS2Ju2oANVrgbr2xWbie9b2D + wasm: + hash_reference: + /: QmbWqxBEKC3P8tqsKc98xmWNzrzDtRLMiMPL8wBuTGsMnR + metadata: + compiler_version: 1.15.0 + execution_engine_version: 0.16.1 + version: 1.0.0 + type: WatcherRegistrationRecord \ No newline at end of file diff --git a/x/registry/helpers/examples/website_registration_example.yml b/x/registry/helpers/examples/website_registration_example.yml index 419f62fd..8091d44a 100644 --- a/x/registry/helpers/examples/website_registration_example.yml +++ b/x/registry/helpers/examples/website_registration_example.yml @@ -1,7 +1,10 @@ record: type: WebsiteRegistrationRecord url: https://cerc.io - repo_registration_record_cid: QmSnuWmxptJZdLJpKRarxBMS2Ju2oANVrgbr2xWbie9b2D - build_artifact_cid: QmP8jTG1m9GSDJLCbeWhVSVgEzCPPwXRdCRuJtQ5Tz9Kc9 - tls_cerc_cid: QmbWqxBEKC3P8tqsKc98xmWNzrzDtRLMiMPL8wBuTGsMnR + repo_reference: + /: QmSnuWmxptJZdLJpKRarxBMS2Ju2oANVrgbr2xWbie9b2D + build_artifact_ref: + /: QmP8jTG1m9GSDJLCbeWhVSVgEzCPPwXRdCRuJtQ5Tz9Kc9 + tls_cert_ref: + /: QmbWqxBEKC3P8tqsKc98xmWNzrzDtRLMiMPL8wBuTGsMnR version: 1.0.0 \ No newline at end of file diff --git a/x/registry/keeper/grpc_query_test.go b/x/registry/keeper/grpc_query_test.go index 4e580432..2b27da78 100644 --- a/x/registry/keeper/grpc_query_test.go +++ b/x/registry/keeper/grpc_query_test.go @@ -4,6 +4,7 @@ import ( "context" "fmt" "os" + "strings" "github.com/cerc-io/laconicd/x/registry/client/cli" "github.com/cerc-io/laconicd/x/registry/helpers" @@ -37,7 +38,14 @@ func (suite *KeeperTestSuite) TestGrpcGetRecordLists() { sr := suite.Require() var recordId string examples := []string{ + "/../helpers/examples/binary_example.yml", + "/../helpers/examples/chain_registration_example.yml", + "/../helpers/examples/docker_image_example.yml", + "/../helpers/examples/git_repo_example.yml", + "/../helpers/examples/js_package_example.yml", + "/../helpers/examples/responder_contract_example.yml", "/../helpers/examples/service_provider_example.yml", + "/../helpers/examples/watcher_registration_example.yml", "/../helpers/examples/website_registration_example.yml", } testCases := []struct { @@ -59,14 +67,14 @@ func (suite *KeeperTestSuite) TestGrpcGetRecordLists() { ®istrytypes.QueryListRecordsRequest{}, true, false, - 2, + len(examples), }, { "Filter with type", ®istrytypes.QueryListRecordsRequest{ Attributes: []*registrytypes.QueryListRecordsRequest_KeyValueInput{ { - Key: "type", + Key: "type---", Value: ®istrytypes.QueryListRecordsRequest_ValueInput{ Type: "string", String_: "WebsiteRegistrationRecord", @@ -80,11 +88,11 @@ func (suite *KeeperTestSuite) TestGrpcGetRecordLists() { 1, }, { - "Filter with attributes ServiceProviderRegistration", + "Filter with attributes ServiceProviderRecord", ®istrytypes.QueryListRecordsRequest{ Attributes: []*registrytypes.QueryListRecordsRequest_KeyValueInput{ { - Key: "x500state_name", + Key: "x500---state_name---", Value: ®istrytypes.QueryListRecordsRequest_ValueInput{ Type: "string", String_: "california", @@ -97,6 +105,42 @@ func (suite *KeeperTestSuite) TestGrpcGetRecordLists() { false, 1, }, + { + "Filter with attributes WatcherRegistrationRecord", + ®istrytypes.QueryListRecordsRequest{ + Attributes: []*registrytypes.QueryListRecordsRequest_KeyValueInput{ + { + Key: "metadata---chain_reference---/---", + Value: ®istrytypes.QueryListRecordsRequest_ValueInput{ + Type: "string", + String_: "QmP8jTG1m9GSDJLCbeWhVSVgEzCPPwXRdCRuJtQ5Tz9Kc9", + }, + }, + }, + All: true, + }, + true, + false, + 1, + }, + { + "Filter with attributes version", + ®istrytypes.QueryListRecordsRequest{ + Attributes: []*registrytypes.QueryListRecordsRequest_KeyValueInput{ + { + Key: "version---", + Value: ®istrytypes.QueryListRecordsRequest_ValueInput{ + Type: "string", + String_: "1.0.0", + }, + }, + }, + All: true, + }, + true, + false, + 7, + }, } for _, test := range testCases { suite.Run(fmt.Sprintf("Case %s ", test.msg), func() { @@ -133,11 +177,7 @@ func (suite *KeeperTestSuite) TestGrpcGetRecordLists() { sr.NoError(err) recAttr := helpers.UnMarshalMapFromJSONBytes(bz) for _, attr := range test.req.GetAttributes() { - if attr.Key[:4] == "x500" { - sr.Equal(keeper.GetAttributeValue(attr.Value), recAttr["x500"].(map[string]interface{})[attr.Key[4:]]) - } else { - sr.Equal(keeper.GetAttributeValue(attr.Value), recAttr[attr.Key]) - } + sr.Equal(keeper.GetAttributeValue(attr.Value), getAttributesFromRecord(recAttr, attr.Key)) } } } @@ -228,6 +268,17 @@ func (suite *KeeperTestSuite) TestGrpcGetRecordLists() { } } +func getAttributesFromRecord(recordAttr map[string]interface{}, key string) interface{} { + keys := strings.Split(key, "---") + for i, str := range keys { + if i == len(keys)-2 { + return recordAttr[str].(string) + } + recordAttr = recordAttr[str].(map[string]interface{}) + } + return nil +} + func (suite *KeeperTestSuite) TestGrpcQueryRegistryModuleBalance() { grpcClient, ctx := suite.queryClient, suite.ctx sr := suite.Require() diff --git a/x/registry/keeper/keeper.go b/x/registry/keeper/keeper.go index d44b13df..58714050 100644 --- a/x/registry/keeper/keeper.go +++ b/x/registry/keeper/keeper.go @@ -4,6 +4,7 @@ import ( "bytes" "encoding/json" "fmt" + "reflect" // #nosec G702 This is also used in eip712 antehandler code. No new risk introduced. "sort" "time" @@ -317,55 +318,44 @@ func (k Keeper) PutRecord(ctx sdk.Context, record types.Record) { } func (k Keeper) ProcessAttributes(ctx sdk.Context, record types.RecordType) error { - switch record.Attributes["type"] { - case "ServiceProviderRegistration": - { - // #nosec G705 - for key := range record.Attributes { - if key == "x500" { - // #nosec G705 - for x500Key, x500Val := range record.Attributes[key].(map[string]interface{}) { - indexKey := GetAttributesIndexKey(fmt.Sprintf("x500%s", x500Key), x500Val) - if err := k.SetAttributeMapping(ctx, indexKey, record.ID); err != nil { - return err - } - } - } else { - indexKey := GetAttributesIndexKey(key, record.Attributes[key]) - if err := k.SetAttributeMapping(ctx, indexKey, record.ID); err != nil { - return err - } - } - } - } - case "WebsiteRegistrationRecord": - { - // #nosec G705 - for key := range record.Attributes { - indexKey := GetAttributesIndexKey(key, record.Attributes[key]) - if err := k.SetAttributeMapping(ctx, indexKey, record.ID); err != nil { - return err - } - } - } - default: - return fmt.Errorf("unsupported record type %s", record.Attributes["type"]) + if err := k.insertAttributes(ctx, record.ID, record.Attributes, ""); err != nil { + return err } expiryTimeKey := GetAttributesIndexKey(ExpiryTimeAttributeName, record.ExpiryTime) - if err := k.SetAttributeMapping(ctx, expiryTimeKey, record.ID); err != nil { + if err := k.setAttributeMapping(ctx, expiryTimeKey, record.ID); err != nil { return err } return nil } +func (k Keeper) insertAttributes(ctx sdk.Context, recordID string, attr interface{}, keyPrefix string) error { + if reflect.TypeOf(attr).Kind() == reflect.Map { + val := attr.(map[string]interface{}) + // #nosec G705 + for key := range val { + newKeyPrefix := fmt.Sprint(keyPrefix + key + "---") + if err := k.insertAttributes(ctx, recordID, val[key], newKeyPrefix); err != nil { + return err + } + } + } else { + indexKey := GetAttributesIndexKey(keyPrefix, attr) + if err := k.setAttributeMapping(ctx, indexKey, recordID); err != nil { + return err + } + } + + return nil +} + func GetAttributesIndexKey(key string, value interface{}) []byte { keyString := fmt.Sprintf("%s%s", key, value) return append(PrefixAttributesIndex, []byte(keyString)...) } -func (k Keeper) SetAttributeMapping(ctx sdk.Context, key []byte, recordID string) error { +func (k Keeper) setAttributeMapping(ctx sdk.Context, key []byte, recordID string) error { store := ctx.KVStore(k.storeKey) var recordIds []string if store.Has(key) { diff --git a/x/registry/types/attributes.pb.go b/x/registry/types/attributes.pb.go index e0f61a9e..e6c8554f 100644 --- a/x/registry/types/attributes.pb.go +++ b/x/registry/types/attributes.pb.go @@ -23,26 +23,22 @@ var _ = math.Inf // proto package needs to be updated. const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package -type ServiceProviderRegistration struct { - BondId string `protobuf:"bytes,1,opt,name=bond_id,json=bondId,proto3" json:"bond_id,omitempty" json:"bondId" yaml:"bondId"` - LaconicId string `protobuf:"bytes,2,opt,name=laconic_id,json=laconicId,proto3" json:"laconic_id,omitempty" json:"laconicId" yaml:"laconicId"` - X500 *X500 `protobuf:"bytes,3,opt,name=x500,proto3" json:"x500,omitempty" json:"x500" yaml:"x500"` - Type string `protobuf:"bytes,4,opt,name=type,proto3" json:"type,omitempty" json:"type" yaml:"type"` - Version string `protobuf:"bytes,6,opt,name=version,proto3" json:"version,omitempty" json:"version" yaml:"version"` +type HashReference struct { + Ref string `protobuf:"bytes,1,opt,name=ref,proto3" json:"/"` } -func (m *ServiceProviderRegistration) Reset() { *m = ServiceProviderRegistration{} } -func (m *ServiceProviderRegistration) String() string { return proto.CompactTextString(m) } -func (*ServiceProviderRegistration) ProtoMessage() {} -func (*ServiceProviderRegistration) Descriptor() ([]byte, []int) { +func (m *HashReference) Reset() { *m = HashReference{} } +func (m *HashReference) String() string { return proto.CompactTextString(m) } +func (*HashReference) ProtoMessage() {} +func (*HashReference) Descriptor() ([]byte, []int) { return fileDescriptor_f305abc771332c96, []int{0} } -func (m *ServiceProviderRegistration) XXX_Unmarshal(b []byte) error { +func (m *HashReference) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *ServiceProviderRegistration) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *HashReference) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_ServiceProviderRegistration.Marshal(b, m, deterministic) + return xxx_messageInfo_HashReference.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -52,54 +48,102 @@ func (m *ServiceProviderRegistration) XXX_Marshal(b []byte, deterministic bool) return b[:n], nil } } -func (m *ServiceProviderRegistration) XXX_Merge(src proto.Message) { - xxx_messageInfo_ServiceProviderRegistration.Merge(m, src) +func (m *HashReference) XXX_Merge(src proto.Message) { + xxx_messageInfo_HashReference.Merge(m, src) } -func (m *ServiceProviderRegistration) XXX_Size() int { +func (m *HashReference) XXX_Size() int { return m.Size() } -func (m *ServiceProviderRegistration) XXX_DiscardUnknown() { - xxx_messageInfo_ServiceProviderRegistration.DiscardUnknown(m) +func (m *HashReference) XXX_DiscardUnknown() { + xxx_messageInfo_HashReference.DiscardUnknown(m) } -var xxx_messageInfo_ServiceProviderRegistration proto.InternalMessageInfo +var xxx_messageInfo_HashReference proto.InternalMessageInfo -func (m *ServiceProviderRegistration) GetBondId() string { +func (m *HashReference) GetRef() string { + if m != nil { + return m.Ref + } + return "" +} + +type ServiceProviderRecord struct { + BondId string `protobuf:"bytes,1,opt,name=bond_id,json=bondId,proto3" json:"bond_id,omitempty" json:"bondId" yaml:"bondId"` + LaconicId string `protobuf:"bytes,2,opt,name=laconic_id,json=laconicId,proto3" json:"laconic_id,omitempty" json:"laconicId" yaml:"laconicId"` + X500 *ServiceProviderRecord_X500 `protobuf:"bytes,3,opt,name=x500,proto3" json:"x500,omitempty" json:"x500" yaml:"x500"` + Type string `protobuf:"bytes,4,opt,name=type,proto3" json:"type,omitempty" json:"type" yaml:"type"` + Version string `protobuf:"bytes,6,opt,name=version,proto3" json:"version,omitempty" json:"version" yaml:"version"` +} + +func (m *ServiceProviderRecord) Reset() { *m = ServiceProviderRecord{} } +func (m *ServiceProviderRecord) String() string { return proto.CompactTextString(m) } +func (*ServiceProviderRecord) ProtoMessage() {} +func (*ServiceProviderRecord) Descriptor() ([]byte, []int) { + return fileDescriptor_f305abc771332c96, []int{1} +} +func (m *ServiceProviderRecord) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ServiceProviderRecord) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_ServiceProviderRecord.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *ServiceProviderRecord) XXX_Merge(src proto.Message) { + xxx_messageInfo_ServiceProviderRecord.Merge(m, src) +} +func (m *ServiceProviderRecord) XXX_Size() int { + return m.Size() +} +func (m *ServiceProviderRecord) XXX_DiscardUnknown() { + xxx_messageInfo_ServiceProviderRecord.DiscardUnknown(m) +} + +var xxx_messageInfo_ServiceProviderRecord proto.InternalMessageInfo + +func (m *ServiceProviderRecord) GetBondId() string { if m != nil { return m.BondId } return "" } -func (m *ServiceProviderRegistration) GetLaconicId() string { +func (m *ServiceProviderRecord) GetLaconicId() string { if m != nil { return m.LaconicId } return "" } -func (m *ServiceProviderRegistration) GetX500() *X500 { +func (m *ServiceProviderRecord) GetX500() *ServiceProviderRecord_X500 { if m != nil { return m.X500 } return nil } -func (m *ServiceProviderRegistration) GetType() string { +func (m *ServiceProviderRecord) GetType() string { if m != nil { return m.Type } return "" } -func (m *ServiceProviderRegistration) GetVersion() string { +func (m *ServiceProviderRecord) GetVersion() string { if m != nil { return m.Version } return "" } -type X500 struct { +type ServiceProviderRecord_X500 struct { CommonName string `protobuf:"bytes,1,opt,name=common_name,json=commonName,proto3" json:"common_name,omitempty" json:"commonName" yaml:"commonName"` OrganizationUnit string `protobuf:"bytes,2,opt,name=organization_unit,json=organizationUnit,proto3" json:"organization_unit,omitempty" json:"organizationUnit" yaml:"organizationUnit"` OrganizationName string `protobuf:"bytes,3,opt,name=organization_name,json=organizationName,proto3" json:"organization_name,omitempty" json:"organizationName" yaml:"organizationName"` @@ -108,18 +152,18 @@ type X500 struct { Country string `protobuf:"bytes,6,opt,name=country,proto3" json:"country,omitempty" json:"country" yaml:"country"` } -func (m *X500) Reset() { *m = X500{} } -func (m *X500) String() string { return proto.CompactTextString(m) } -func (*X500) ProtoMessage() {} -func (*X500) Descriptor() ([]byte, []int) { - return fileDescriptor_f305abc771332c96, []int{1} +func (m *ServiceProviderRecord_X500) Reset() { *m = ServiceProviderRecord_X500{} } +func (m *ServiceProviderRecord_X500) String() string { return proto.CompactTextString(m) } +func (*ServiceProviderRecord_X500) ProtoMessage() {} +func (*ServiceProviderRecord_X500) Descriptor() ([]byte, []int) { + return fileDescriptor_f305abc771332c96, []int{1, 0} } -func (m *X500) XXX_Unmarshal(b []byte) error { +func (m *ServiceProviderRecord_X500) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *X500) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *ServiceProviderRecord_X500) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_X500.Marshal(b, m, deterministic) + return xxx_messageInfo_ServiceProviderRecord_X500.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -129,54 +173,54 @@ func (m *X500) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return b[:n], nil } } -func (m *X500) XXX_Merge(src proto.Message) { - xxx_messageInfo_X500.Merge(m, src) +func (m *ServiceProviderRecord_X500) XXX_Merge(src proto.Message) { + xxx_messageInfo_ServiceProviderRecord_X500.Merge(m, src) } -func (m *X500) XXX_Size() int { +func (m *ServiceProviderRecord_X500) XXX_Size() int { return m.Size() } -func (m *X500) XXX_DiscardUnknown() { - xxx_messageInfo_X500.DiscardUnknown(m) +func (m *ServiceProviderRecord_X500) XXX_DiscardUnknown() { + xxx_messageInfo_ServiceProviderRecord_X500.DiscardUnknown(m) } -var xxx_messageInfo_X500 proto.InternalMessageInfo +var xxx_messageInfo_ServiceProviderRecord_X500 proto.InternalMessageInfo -func (m *X500) GetCommonName() string { +func (m *ServiceProviderRecord_X500) GetCommonName() string { if m != nil { return m.CommonName } return "" } -func (m *X500) GetOrganizationUnit() string { +func (m *ServiceProviderRecord_X500) GetOrganizationUnit() string { if m != nil { return m.OrganizationUnit } return "" } -func (m *X500) GetOrganizationName() string { +func (m *ServiceProviderRecord_X500) GetOrganizationName() string { if m != nil { return m.OrganizationName } return "" } -func (m *X500) GetLocalityName() string { +func (m *ServiceProviderRecord_X500) GetLocalityName() string { if m != nil { return m.LocalityName } return "" } -func (m *X500) GetStateName() string { +func (m *ServiceProviderRecord_X500) GetStateName() string { if m != nil { return m.StateName } return "" } -func (m *X500) GetCountry() string { +func (m *ServiceProviderRecord_X500) GetCountry() string { if m != nil { return m.Country } @@ -184,12 +228,12 @@ func (m *X500) GetCountry() string { } type WebsiteRegistrationRecord struct { - Url string `protobuf:"bytes,1,opt,name=url,proto3" json:"url,omitempty" json:"url" yaml:"url"` - RepoRegistrationRecordCid string `protobuf:"bytes,2,opt,name=repo_registration_record_cid,json=repoRegistrationRecordCid,proto3" json:"repo_registration_record_cid,omitempty" json:"repoRegistrationRecordCID" yaml:"repoRegistrationRecordCID"` - BuildArtifactCid string `protobuf:"bytes,3,opt,name=build_artifact_cid,json=buildArtifactCid,proto3" json:"build_artifact_cid,omitempty" json:"buildArtifactCID" yaml:"buildArtifactCID"` - TlsCertCid string `protobuf:"bytes,4,opt,name=tls_cert_cid,json=tlsCertCid,proto3" json:"tls_cert_cid,omitempty" json:"TLSCertCID" yaml:"TLSCertCID"` - Type string `protobuf:"bytes,5,opt,name=type,proto3" json:"type,omitempty" json:"type" yaml:"type"` - Version string `protobuf:"bytes,6,opt,name=version,proto3" json:"version,omitempty" json:"version" yaml:"version"` + Url string `protobuf:"bytes,1,opt,name=url,proto3" json:"url,omitempty" json:"url" yaml:"url"` + RepoReference *HashReference `protobuf:"bytes,2,opt,name=repo_reference,json=repoReference,proto3" json:"repo_reference,omitempty" json:"repoReference" yaml:"repoReference"` + BuildArtifactRef *HashReference `protobuf:"bytes,3,opt,name=build_artifact_ref,json=buildArtifactRef,proto3" json:"build_artifact_ref,omitempty" json:"buildArtifactRef" yaml:"buildArtifactRef"` + TlsCertRef *HashReference `protobuf:"bytes,4,opt,name=tls_cert_ref,json=tlsCertRef,proto3" json:"tls_cert_ref,omitempty" json:"tlsCertRef" yaml:"tlsCertRef"` + Type string `protobuf:"bytes,5,opt,name=type,proto3" json:"type,omitempty" json:"type" yaml:"type"` + Version string `protobuf:"bytes,6,opt,name=version,proto3" json:"version,omitempty" json:"version" yaml:"version"` } func (m *WebsiteRegistrationRecord) Reset() { *m = WebsiteRegistrationRecord{} } @@ -232,25 +276,25 @@ func (m *WebsiteRegistrationRecord) GetUrl() string { return "" } -func (m *WebsiteRegistrationRecord) GetRepoRegistrationRecordCid() string { +func (m *WebsiteRegistrationRecord) GetRepoReference() *HashReference { if m != nil { - return m.RepoRegistrationRecordCid + return m.RepoReference } - return "" + return nil } -func (m *WebsiteRegistrationRecord) GetBuildArtifactCid() string { +func (m *WebsiteRegistrationRecord) GetBuildArtifactRef() *HashReference { if m != nil { - return m.BuildArtifactCid + return m.BuildArtifactRef } - return "" + return nil } -func (m *WebsiteRegistrationRecord) GetTlsCertCid() string { +func (m *WebsiteRegistrationRecord) GetTlsCertRef() *HashReference { if m != nil { - return m.TlsCertCid + return m.TlsCertRef } - return "" + return nil } func (m *WebsiteRegistrationRecord) GetType() string { @@ -267,10 +311,741 @@ func (m *WebsiteRegistrationRecord) GetVersion() string { return "" } +type GitRepository struct { + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty" json:"name" yaml:"name"` + RepoReference string `protobuf:"bytes,2,opt,name=repo_reference,json=repoReference,proto3" json:"repo_reference,omitempty" json:"repo_reference" yaml:"repo_reference"` + Description string `protobuf:"bytes,3,opt,name=description,proto3" json:"description,omitempty" json:"description" yaml:"description"` + Version string `protobuf:"bytes,4,opt,name=version,proto3" json:"version,omitempty" json:"version" yaml:"version"` + Type string `protobuf:"bytes,5,opt,name=type,proto3" json:"type,omitempty" json:"type" yaml:"type"` +} + +func (m *GitRepository) Reset() { *m = GitRepository{} } +func (m *GitRepository) String() string { return proto.CompactTextString(m) } +func (*GitRepository) ProtoMessage() {} +func (*GitRepository) Descriptor() ([]byte, []int) { + return fileDescriptor_f305abc771332c96, []int{3} +} +func (m *GitRepository) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *GitRepository) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_GitRepository.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *GitRepository) XXX_Merge(src proto.Message) { + xxx_messageInfo_GitRepository.Merge(m, src) +} +func (m *GitRepository) XXX_Size() int { + return m.Size() +} +func (m *GitRepository) XXX_DiscardUnknown() { + xxx_messageInfo_GitRepository.DiscardUnknown(m) +} + +var xxx_messageInfo_GitRepository proto.InternalMessageInfo + +func (m *GitRepository) GetName() string { + if m != nil { + return m.Name + } + return "" +} + +func (m *GitRepository) GetRepoReference() string { + if m != nil { + return m.RepoReference + } + return "" +} + +func (m *GitRepository) GetDescription() string { + if m != nil { + return m.Description + } + return "" +} + +func (m *GitRepository) GetVersion() string { + if m != nil { + return m.Version + } + return "" +} + +func (m *GitRepository) GetType() string { + if m != nil { + return m.Type + } + return "" +} + +type Binary struct { + HashReference *HashReference `protobuf:"bytes,1,opt,name=hash_reference,json=hashReference,proto3" json:"hash_reference,omitempty"` + TargetedArch string `protobuf:"bytes,2,opt,name=targeted_arch,json=targetedArch,proto3" json:"targeted_arch,omitempty"` + RuntimeVersion string `protobuf:"bytes,3,opt,name=runtime_version,json=runtimeVersion,proto3" json:"runtime_version,omitempty"` + RepoReference *HashReference `protobuf:"bytes,4,opt,name=repo_reference,json=repoReference,proto3" json:"repo_reference,omitempty"` + Version string `protobuf:"bytes,5,opt,name=version,proto3" json:"version,omitempty"` + Type string `protobuf:"bytes,6,opt,name=type,proto3" json:"type,omitempty"` +} + +func (m *Binary) Reset() { *m = Binary{} } +func (m *Binary) String() string { return proto.CompactTextString(m) } +func (*Binary) ProtoMessage() {} +func (*Binary) Descriptor() ([]byte, []int) { + return fileDescriptor_f305abc771332c96, []int{4} +} +func (m *Binary) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Binary) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Binary.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *Binary) XXX_Merge(src proto.Message) { + xxx_messageInfo_Binary.Merge(m, src) +} +func (m *Binary) XXX_Size() int { + return m.Size() +} +func (m *Binary) XXX_DiscardUnknown() { + xxx_messageInfo_Binary.DiscardUnknown(m) +} + +var xxx_messageInfo_Binary proto.InternalMessageInfo + +func (m *Binary) GetHashReference() *HashReference { + if m != nil { + return m.HashReference + } + return nil +} + +func (m *Binary) GetTargetedArch() string { + if m != nil { + return m.TargetedArch + } + return "" +} + +func (m *Binary) GetRuntimeVersion() string { + if m != nil { + return m.RuntimeVersion + } + return "" +} + +func (m *Binary) GetRepoReference() *HashReference { + if m != nil { + return m.RepoReference + } + return nil +} + +func (m *Binary) GetVersion() string { + if m != nil { + return m.Version + } + return "" +} + +func (m *Binary) GetType() string { + if m != nil { + return m.Type + } + return "" +} + +type DockerImage struct { + ImageId string `protobuf:"bytes,1,opt,name=image_id,json=imageId,proto3" json:"image_id,omitempty"` + BinaryReference *HashReference `protobuf:"bytes,2,opt,name=binary_reference,json=binaryReference,proto3" json:"binary_reference,omitempty"` + RepoReference *HashReference `protobuf:"bytes,3,opt,name=repo_reference,json=repoReference,proto3" json:"repo_reference,omitempty"` + Version string `protobuf:"bytes,4,opt,name=version,proto3" json:"version,omitempty"` + Type string `protobuf:"bytes,5,opt,name=type,proto3" json:"type,omitempty"` +} + +func (m *DockerImage) Reset() { *m = DockerImage{} } +func (m *DockerImage) String() string { return proto.CompactTextString(m) } +func (*DockerImage) ProtoMessage() {} +func (*DockerImage) Descriptor() ([]byte, []int) { + return fileDescriptor_f305abc771332c96, []int{5} +} +func (m *DockerImage) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *DockerImage) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_DockerImage.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *DockerImage) XXX_Merge(src proto.Message) { + xxx_messageInfo_DockerImage.Merge(m, src) +} +func (m *DockerImage) XXX_Size() int { + return m.Size() +} +func (m *DockerImage) XXX_DiscardUnknown() { + xxx_messageInfo_DockerImage.DiscardUnknown(m) +} + +var xxx_messageInfo_DockerImage proto.InternalMessageInfo + +func (m *DockerImage) GetImageId() string { + if m != nil { + return m.ImageId + } + return "" +} + +func (m *DockerImage) GetBinaryReference() *HashReference { + if m != nil { + return m.BinaryReference + } + return nil +} + +func (m *DockerImage) GetRepoReference() *HashReference { + if m != nil { + return m.RepoReference + } + return nil +} + +func (m *DockerImage) GetVersion() string { + if m != nil { + return m.Version + } + return "" +} + +func (m *DockerImage) GetType() string { + if m != nil { + return m.Type + } + return "" +} + +type WatcherRegistrationRecord struct { + Metadata *WatcherRegistrationRecord_WatcherMetadata `protobuf:"bytes,1,opt,name=metadata,proto3" json:"metadata,omitempty"` + RepoReference *HashReference `protobuf:"bytes,2,opt,name=repo_reference,json=repoReference,proto3" json:"repo_reference,omitempty"` + Wasm *WatcherRegistrationRecord_WASMBinary `protobuf:"bytes,3,opt,name=wasm,proto3" json:"wasm,omitempty"` + Version string `protobuf:"bytes,4,opt,name=version,proto3" json:"version,omitempty"` + Type string `protobuf:"bytes,5,opt,name=type,proto3" json:"type,omitempty"` +} + +func (m *WatcherRegistrationRecord) Reset() { *m = WatcherRegistrationRecord{} } +func (m *WatcherRegistrationRecord) String() string { return proto.CompactTextString(m) } +func (*WatcherRegistrationRecord) ProtoMessage() {} +func (*WatcherRegistrationRecord) Descriptor() ([]byte, []int) { + return fileDescriptor_f305abc771332c96, []int{6} +} +func (m *WatcherRegistrationRecord) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *WatcherRegistrationRecord) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_WatcherRegistrationRecord.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *WatcherRegistrationRecord) XXX_Merge(src proto.Message) { + xxx_messageInfo_WatcherRegistrationRecord.Merge(m, src) +} +func (m *WatcherRegistrationRecord) XXX_Size() int { + return m.Size() +} +func (m *WatcherRegistrationRecord) XXX_DiscardUnknown() { + xxx_messageInfo_WatcherRegistrationRecord.DiscardUnknown(m) +} + +var xxx_messageInfo_WatcherRegistrationRecord proto.InternalMessageInfo + +func (m *WatcherRegistrationRecord) GetMetadata() *WatcherRegistrationRecord_WatcherMetadata { + if m != nil { + return m.Metadata + } + return nil +} + +func (m *WatcherRegistrationRecord) GetRepoReference() *HashReference { + if m != nil { + return m.RepoReference + } + return nil +} + +func (m *WatcherRegistrationRecord) GetWasm() *WatcherRegistrationRecord_WASMBinary { + if m != nil { + return m.Wasm + } + return nil +} + +func (m *WatcherRegistrationRecord) GetVersion() string { + if m != nil { + return m.Version + } + return "" +} + +func (m *WatcherRegistrationRecord) GetType() string { + if m != nil { + return m.Type + } + return "" +} + +type WatcherRegistrationRecord_WatcherMetadata struct { + Version string `protobuf:"bytes,1,opt,name=version,proto3" json:"version,omitempty"` + ChainReference *HashReference `protobuf:"bytes,2,opt,name=chain_reference,json=chainReference,proto3" json:"chain_reference,omitempty"` +} + +func (m *WatcherRegistrationRecord_WatcherMetadata) Reset() { + *m = WatcherRegistrationRecord_WatcherMetadata{} +} +func (m *WatcherRegistrationRecord_WatcherMetadata) String() string { + return proto.CompactTextString(m) +} +func (*WatcherRegistrationRecord_WatcherMetadata) ProtoMessage() {} +func (*WatcherRegistrationRecord_WatcherMetadata) Descriptor() ([]byte, []int) { + return fileDescriptor_f305abc771332c96, []int{6, 0} +} +func (m *WatcherRegistrationRecord_WatcherMetadata) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *WatcherRegistrationRecord_WatcherMetadata) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_WatcherRegistrationRecord_WatcherMetadata.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *WatcherRegistrationRecord_WatcherMetadata) XXX_Merge(src proto.Message) { + xxx_messageInfo_WatcherRegistrationRecord_WatcherMetadata.Merge(m, src) +} +func (m *WatcherRegistrationRecord_WatcherMetadata) XXX_Size() int { + return m.Size() +} +func (m *WatcherRegistrationRecord_WatcherMetadata) XXX_DiscardUnknown() { + xxx_messageInfo_WatcherRegistrationRecord_WatcherMetadata.DiscardUnknown(m) +} + +var xxx_messageInfo_WatcherRegistrationRecord_WatcherMetadata proto.InternalMessageInfo + +func (m *WatcherRegistrationRecord_WatcherMetadata) GetVersion() string { + if m != nil { + return m.Version + } + return "" +} + +func (m *WatcherRegistrationRecord_WatcherMetadata) GetChainReference() *HashReference { + if m != nil { + return m.ChainReference + } + return nil +} + +type WatcherRegistrationRecord_WASMBinary struct { + HashReference *HashReference `protobuf:"bytes,1,opt,name=hash_reference,json=hashReference,proto3" json:"hash_reference,omitempty"` + Metadata *WatcherRegistrationRecord_WASMBinaryMetadata `protobuf:"bytes,2,opt,name=metadata,proto3" json:"metadata,omitempty"` +} + +func (m *WatcherRegistrationRecord_WASMBinary) Reset() { *m = WatcherRegistrationRecord_WASMBinary{} } +func (m *WatcherRegistrationRecord_WASMBinary) String() string { return proto.CompactTextString(m) } +func (*WatcherRegistrationRecord_WASMBinary) ProtoMessage() {} +func (*WatcherRegistrationRecord_WASMBinary) Descriptor() ([]byte, []int) { + return fileDescriptor_f305abc771332c96, []int{6, 1} +} +func (m *WatcherRegistrationRecord_WASMBinary) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *WatcherRegistrationRecord_WASMBinary) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_WatcherRegistrationRecord_WASMBinary.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *WatcherRegistrationRecord_WASMBinary) XXX_Merge(src proto.Message) { + xxx_messageInfo_WatcherRegistrationRecord_WASMBinary.Merge(m, src) +} +func (m *WatcherRegistrationRecord_WASMBinary) XXX_Size() int { + return m.Size() +} +func (m *WatcherRegistrationRecord_WASMBinary) XXX_DiscardUnknown() { + xxx_messageInfo_WatcherRegistrationRecord_WASMBinary.DiscardUnknown(m) +} + +var xxx_messageInfo_WatcherRegistrationRecord_WASMBinary proto.InternalMessageInfo + +func (m *WatcherRegistrationRecord_WASMBinary) GetHashReference() *HashReference { + if m != nil { + return m.HashReference + } + return nil +} + +func (m *WatcherRegistrationRecord_WASMBinary) GetMetadata() *WatcherRegistrationRecord_WASMBinaryMetadata { + if m != nil { + return m.Metadata + } + return nil +} + +type WatcherRegistrationRecord_WASMBinaryMetadata struct { + CompilerVersion string `protobuf:"bytes,1,opt,name=compiler_version,json=compilerVersion,proto3" json:"compiler_version,omitempty"` + ExecutionEngineVersion string `protobuf:"bytes,2,opt,name=execution_engine_version,json=executionEngineVersion,proto3" json:"execution_engine_version,omitempty"` +} + +func (m *WatcherRegistrationRecord_WASMBinaryMetadata) Reset() { + *m = WatcherRegistrationRecord_WASMBinaryMetadata{} +} +func (m *WatcherRegistrationRecord_WASMBinaryMetadata) String() string { + return proto.CompactTextString(m) +} +func (*WatcherRegistrationRecord_WASMBinaryMetadata) ProtoMessage() {} +func (*WatcherRegistrationRecord_WASMBinaryMetadata) Descriptor() ([]byte, []int) { + return fileDescriptor_f305abc771332c96, []int{6, 2} +} +func (m *WatcherRegistrationRecord_WASMBinaryMetadata) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *WatcherRegistrationRecord_WASMBinaryMetadata) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_WatcherRegistrationRecord_WASMBinaryMetadata.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *WatcherRegistrationRecord_WASMBinaryMetadata) XXX_Merge(src proto.Message) { + xxx_messageInfo_WatcherRegistrationRecord_WASMBinaryMetadata.Merge(m, src) +} +func (m *WatcherRegistrationRecord_WASMBinaryMetadata) XXX_Size() int { + return m.Size() +} +func (m *WatcherRegistrationRecord_WASMBinaryMetadata) XXX_DiscardUnknown() { + xxx_messageInfo_WatcherRegistrationRecord_WASMBinaryMetadata.DiscardUnknown(m) +} + +var xxx_messageInfo_WatcherRegistrationRecord_WASMBinaryMetadata proto.InternalMessageInfo + +func (m *WatcherRegistrationRecord_WASMBinaryMetadata) GetCompilerVersion() string { + if m != nil { + return m.CompilerVersion + } + return "" +} + +func (m *WatcherRegistrationRecord_WASMBinaryMetadata) GetExecutionEngineVersion() string { + if m != nil { + return m.ExecutionEngineVersion + } + return "" +} + +type ResponderContract struct { + ServiceProviderRef *HashReference `protobuf:"bytes,1,opt,name=service_provider_ref,json=serviceProviderRef,proto3" json:"service_provider_ref,omitempty"` + AuctionRef *HashReference `protobuf:"bytes,2,opt,name=auction_ref,json=auctionRef,proto3" json:"auction_ref,omitempty"` + WatcherRef *HashReference `protobuf:"bytes,3,opt,name=watcher_ref,json=watcherRef,proto3" json:"watcher_ref,omitempty"` + Version string `protobuf:"bytes,4,opt,name=version,proto3" json:"version,omitempty"` + Type string `protobuf:"bytes,5,opt,name=type,proto3" json:"type,omitempty"` +} + +func (m *ResponderContract) Reset() { *m = ResponderContract{} } +func (m *ResponderContract) String() string { return proto.CompactTextString(m) } +func (*ResponderContract) ProtoMessage() {} +func (*ResponderContract) Descriptor() ([]byte, []int) { + return fileDescriptor_f305abc771332c96, []int{7} +} +func (m *ResponderContract) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ResponderContract) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_ResponderContract.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *ResponderContract) XXX_Merge(src proto.Message) { + xxx_messageInfo_ResponderContract.Merge(m, src) +} +func (m *ResponderContract) XXX_Size() int { + return m.Size() +} +func (m *ResponderContract) XXX_DiscardUnknown() { + xxx_messageInfo_ResponderContract.DiscardUnknown(m) +} + +var xxx_messageInfo_ResponderContract proto.InternalMessageInfo + +func (m *ResponderContract) GetServiceProviderRef() *HashReference { + if m != nil { + return m.ServiceProviderRef + } + return nil +} + +func (m *ResponderContract) GetAuctionRef() *HashReference { + if m != nil { + return m.AuctionRef + } + return nil +} + +func (m *ResponderContract) GetWatcherRef() *HashReference { + if m != nil { + return m.WatcherRef + } + return nil +} + +func (m *ResponderContract) GetVersion() string { + if m != nil { + return m.Version + } + return "" +} + +func (m *ResponderContract) GetType() string { + if m != nil { + return m.Type + } + return "" +} + +type JSPackage struct { + RepoReference *HashReference `protobuf:"bytes,1,opt,name=repo_reference,json=repoReference,proto3" json:"repo_reference,omitempty"` + JsPackageRef *HashReference `protobuf:"bytes,2,opt,name=js_package_ref,json=jsPackageRef,proto3" json:"js_package_ref,omitempty"` + Version string `protobuf:"bytes,3,opt,name=version,proto3" json:"version,omitempty"` + Type string `protobuf:"bytes,4,opt,name=type,proto3" json:"type,omitempty"` + Name string `protobuf:"bytes,5,opt,name=name,proto3" json:"name,omitempty"` +} + +func (m *JSPackage) Reset() { *m = JSPackage{} } +func (m *JSPackage) String() string { return proto.CompactTextString(m) } +func (*JSPackage) ProtoMessage() {} +func (*JSPackage) Descriptor() ([]byte, []int) { + return fileDescriptor_f305abc771332c96, []int{8} +} +func (m *JSPackage) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *JSPackage) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_JSPackage.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *JSPackage) XXX_Merge(src proto.Message) { + xxx_messageInfo_JSPackage.Merge(m, src) +} +func (m *JSPackage) XXX_Size() int { + return m.Size() +} +func (m *JSPackage) XXX_DiscardUnknown() { + xxx_messageInfo_JSPackage.DiscardUnknown(m) +} + +var xxx_messageInfo_JSPackage proto.InternalMessageInfo + +func (m *JSPackage) GetRepoReference() *HashReference { + if m != nil { + return m.RepoReference + } + return nil +} + +func (m *JSPackage) GetJsPackageRef() *HashReference { + if m != nil { + return m.JsPackageRef + } + return nil +} + +func (m *JSPackage) GetVersion() string { + if m != nil { + return m.Version + } + return "" +} + +func (m *JSPackage) GetType() string { + if m != nil { + return m.Type + } + return "" +} + +func (m *JSPackage) GetName() string { + if m != nil { + return m.Name + } + return "" +} + +type ChainRegistrationRecord struct { + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + IpldTypes []string `protobuf:"bytes,2,rep,name=ipld_types,json=ipldTypes,proto3" json:"ipld_types,omitempty"` + Type string `protobuf:"bytes,3,opt,name=type,proto3" json:"type,omitempty"` + Version string `protobuf:"bytes,4,opt,name=version,proto3" json:"version,omitempty"` + ChainId string `protobuf:"bytes,5,opt,name=chain_id,json=chainId,proto3" json:"chain_id,omitempty"` + NetworkId string `protobuf:"bytes,6,opt,name=network_id,json=networkId,proto3" json:"network_id,omitempty"` + GenesisHash *HashReference `protobuf:"bytes,7,opt,name=genesis_hash,json=genesisHash,proto3" json:"genesis_hash,omitempty"` +} + +func (m *ChainRegistrationRecord) Reset() { *m = ChainRegistrationRecord{} } +func (m *ChainRegistrationRecord) String() string { return proto.CompactTextString(m) } +func (*ChainRegistrationRecord) ProtoMessage() {} +func (*ChainRegistrationRecord) Descriptor() ([]byte, []int) { + return fileDescriptor_f305abc771332c96, []int{9} +} +func (m *ChainRegistrationRecord) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ChainRegistrationRecord) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_ChainRegistrationRecord.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *ChainRegistrationRecord) XXX_Merge(src proto.Message) { + xxx_messageInfo_ChainRegistrationRecord.Merge(m, src) +} +func (m *ChainRegistrationRecord) XXX_Size() int { + return m.Size() +} +func (m *ChainRegistrationRecord) XXX_DiscardUnknown() { + xxx_messageInfo_ChainRegistrationRecord.DiscardUnknown(m) +} + +var xxx_messageInfo_ChainRegistrationRecord proto.InternalMessageInfo + +func (m *ChainRegistrationRecord) GetName() string { + if m != nil { + return m.Name + } + return "" +} + +func (m *ChainRegistrationRecord) GetIpldTypes() []string { + if m != nil { + return m.IpldTypes + } + return nil +} + +func (m *ChainRegistrationRecord) GetType() string { + if m != nil { + return m.Type + } + return "" +} + +func (m *ChainRegistrationRecord) GetVersion() string { + if m != nil { + return m.Version + } + return "" +} + +func (m *ChainRegistrationRecord) GetChainId() string { + if m != nil { + return m.ChainId + } + return "" +} + +func (m *ChainRegistrationRecord) GetNetworkId() string { + if m != nil { + return m.NetworkId + } + return "" +} + +func (m *ChainRegistrationRecord) GetGenesisHash() *HashReference { + if m != nil { + return m.GenesisHash + } + return nil +} + func init() { - proto.RegisterType((*ServiceProviderRegistration)(nil), "vulcanize.registry.v1beta1.ServiceProviderRegistration") - proto.RegisterType((*X500)(nil), "vulcanize.registry.v1beta1.X500") + proto.RegisterType((*HashReference)(nil), "vulcanize.registry.v1beta1.HashReference") + proto.RegisterType((*ServiceProviderRecord)(nil), "vulcanize.registry.v1beta1.ServiceProviderRecord") + proto.RegisterType((*ServiceProviderRecord_X500)(nil), "vulcanize.registry.v1beta1.ServiceProviderRecord.X500") proto.RegisterType((*WebsiteRegistrationRecord)(nil), "vulcanize.registry.v1beta1.WebsiteRegistrationRecord") + proto.RegisterType((*GitRepository)(nil), "vulcanize.registry.v1beta1.GitRepository") + proto.RegisterType((*Binary)(nil), "vulcanize.registry.v1beta1.Binary") + proto.RegisterType((*DockerImage)(nil), "vulcanize.registry.v1beta1.DockerImage") + proto.RegisterType((*WatcherRegistrationRecord)(nil), "vulcanize.registry.v1beta1.WatcherRegistrationRecord") + proto.RegisterType((*WatcherRegistrationRecord_WatcherMetadata)(nil), "vulcanize.registry.v1beta1.WatcherRegistrationRecord.WatcherMetadata") + proto.RegisterType((*WatcherRegistrationRecord_WASMBinary)(nil), "vulcanize.registry.v1beta1.WatcherRegistrationRecord.WASMBinary") + proto.RegisterType((*WatcherRegistrationRecord_WASMBinaryMetadata)(nil), "vulcanize.registry.v1beta1.WatcherRegistrationRecord.WASMBinaryMetadata") + proto.RegisterType((*ResponderContract)(nil), "vulcanize.registry.v1beta1.ResponderContract") + proto.RegisterType((*JSPackage)(nil), "vulcanize.registry.v1beta1.JSPackage") + proto.RegisterType((*ChainRegistrationRecord)(nil), "vulcanize.registry.v1beta1.ChainRegistrationRecord") } func init() { @@ -278,52 +1053,93 @@ func init() { } var fileDescriptor_f305abc771332c96 = []byte{ - // 661 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x54, 0x4f, 0x6f, 0xd4, 0x3e, - 0x10, 0x6d, 0xba, 0xdb, 0x56, 0x75, 0xfb, 0x93, 0xfa, 0xb3, 0x40, 0x6c, 0x5b, 0xd8, 0x6c, 0x17, - 0xa1, 0x56, 0x2a, 0x6c, 0xb6, 0x54, 0x95, 0x10, 0x9c, 0xfa, 0x07, 0x44, 0x25, 0x84, 0x8a, 0x0b, - 0x02, 0x71, 0x09, 0x8e, 0x63, 0x16, 0xa3, 0x6c, 0x5c, 0x39, 0xce, 0xaa, 0xcb, 0x07, 0xe0, 0xcc, - 0xc7, 0xe2, 0xd8, 0x23, 0xa7, 0x08, 0xb5, 0x27, 0x0e, 0x5c, 0xf2, 0x09, 0x90, 0xed, 0x24, 0xeb, - 0x36, 0x2a, 0x47, 0x6e, 0x33, 0x6f, 0xde, 0x7b, 0x33, 0xc9, 0xd8, 0x06, 0x9b, 0xa3,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 0x66, 0x48, 0x82, 0x59, 0xfd, 0x16, 0x6f, 0xff, 0x09, 0x00, 0x00, 0xff, 0xff, 0x86, 0xbb, 0x04, - 0x2e, 0xec, 0x05, 0x00, 0x00, + // 1315 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x58, 0xcf, 0x6f, 0x13, 0xc7, + 0x17, 0x67, 0x63, 0x27, 0xc1, 0xcf, 0xf9, 0xc5, 0x08, 0xbe, 0x38, 0x41, 0xc4, 0xc1, 0x08, 0x91, + 0x28, 0x5f, 0xec, 0x00, 0xa2, 0x42, 0xed, 0xa5, 0x04, 0x68, 0x09, 0x2d, 0x6d, 0x34, 0x50, 0xa8, + 0xda, 0xc3, 0x76, 0xbc, 0x3b, 0xb1, 0x07, 0xec, 0x1d, 0x6b, 0x76, 0x9c, 0xe0, 0x5e, 0x90, 0x7a, + 0xee, 0xa1, 0xb7, 0xfe, 0x0b, 0xfd, 0x0b, 0x7a, 0xea, 0xb1, 0x87, 0x1e, 0x91, 0x7a, 0xa9, 0x7a, + 0xb0, 0x2a, 0x38, 0xb5, 0xa7, 0xca, 0x7f, 0x40, 0x55, 0xcd, 0x8f, 0xdd, 0x1d, 0xdb, 0x01, 0xc9, + 0xa4, 0xed, 0x6d, 0xe6, 0xf3, 0xe6, 0x7d, 0xde, 0x9b, 0xcf, 0xbc, 0x79, 0x9e, 0x35, 0x6c, 0xee, + 0x77, 0x5b, 0x01, 0x89, 0xd8, 0x97, 0xb4, 0x26, 0x68, 0x83, 0xc5, 0x52, 0xf4, 0x6a, 0xfb, 0x97, + 0xeb, 0x54, 0x92, 0xcb, 0x35, 0x22, 0xa5, 0x60, 0xf5, 0xae, 0xa4, 0x71, 0xb5, 0x23, 0xb8, 0xe4, + 0x68, 0x25, 0x5d, 0x5c, 0x4d, 0x16, 0x57, 0xed, 0xe2, 0x95, 0x93, 0x0d, 0xde, 0xe0, 0x7a,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x7a, 0xcf, 0x5f, + 0xac, 0x7a, 0xbf, 0xbd, 0x58, 0xf5, 0xbe, 0x79, 0xb9, 0x7a, 0xec, 0xf9, 0xcb, 0xd5, 0x63, 0xbf, + 0xbc, 0x5c, 0x3d, 0xf6, 0xd9, 0xff, 0x1b, 0x4c, 0x36, 0xbb, 0xf5, 0x6a, 0xc0, 0xdb, 0xb5, 0x80, + 0x8a, 0xe0, 0x12, 0xe3, 0x35, 0xfb, 0x19, 0x1c, 0xd6, 0x9e, 0x66, 0xff, 0x0f, 0x68, 0x39, 0xea, + 0x33, 0xfa, 0x0b, 0xff, 0xea, 0xdf, 0x01, 0x00, 0x00, 0xff, 0xff, 0x43, 0x94, 0x1c, 0x5c, 0x42, + 0x10, 0x00, 0x00, } -func (m *ServiceProviderRegistration) Marshal() (dAtA []byte, err error) { +func (m *HashReference) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -333,12 +1149,42 @@ func (m *ServiceProviderRegistration) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *ServiceProviderRegistration) MarshalTo(dAtA []byte) (int, error) { +func (m *HashReference) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *ServiceProviderRegistration) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *HashReference) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Ref) > 0 { + i -= len(m.Ref) + copy(dAtA[i:], m.Ref) + i = encodeVarintAttributes(dAtA, i, uint64(len(m.Ref))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *ServiceProviderRecord) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ServiceProviderRecord) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ServiceProviderRecord) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int @@ -386,7 +1232,7 @@ func (m *ServiceProviderRegistration) MarshalToSizedBuffer(dAtA []byte) (int, er return len(dAtA) - i, nil } -func (m *X500) Marshal() (dAtA []byte, err error) { +func (m *ServiceProviderRecord_X500) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -396,12 +1242,12 @@ func (m *X500) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *X500) MarshalTo(dAtA []byte) (int, error) { +func (m *ServiceProviderRecord_X500) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *X500) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *ServiceProviderRecord_X500) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int @@ -485,24 +1331,39 @@ func (m *WebsiteRegistrationRecord) MarshalToSizedBuffer(dAtA []byte) (int, erro i-- dAtA[i] = 0x2a } - if len(m.TlsCertCid) > 0 { - i -= len(m.TlsCertCid) - copy(dAtA[i:], m.TlsCertCid) - i = encodeVarintAttributes(dAtA, i, uint64(len(m.TlsCertCid))) + if m.TlsCertRef != nil { + { + size, err := m.TlsCertRef.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintAttributes(dAtA, i, uint64(size)) + } i-- dAtA[i] = 0x22 } - if len(m.BuildArtifactCid) > 0 { - i -= len(m.BuildArtifactCid) - copy(dAtA[i:], m.BuildArtifactCid) - i = encodeVarintAttributes(dAtA, i, uint64(len(m.BuildArtifactCid))) + if m.BuildArtifactRef != nil { + { + size, err := m.BuildArtifactRef.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintAttributes(dAtA, i, uint64(size)) + } i-- dAtA[i] = 0x1a } - if len(m.RepoRegistrationRecordCid) > 0 { - i -= len(m.RepoRegistrationRecordCid) - copy(dAtA[i:], m.RepoRegistrationRecordCid) - i = encodeVarintAttributes(dAtA, i, uint64(len(m.RepoRegistrationRecordCid))) + if m.RepoReference != nil { + { + size, err := m.RepoReference.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintAttributes(dAtA, i, uint64(size)) + } i-- dAtA[i] = 0x12 } @@ -516,6 +1377,626 @@ func (m *WebsiteRegistrationRecord) MarshalToSizedBuffer(dAtA []byte) (int, erro return len(dAtA) - i, nil } +func (m *GitRepository) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *GitRepository) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *GitRepository) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Type) > 0 { + i -= len(m.Type) + copy(dAtA[i:], m.Type) + i = encodeVarintAttributes(dAtA, i, uint64(len(m.Type))) + i-- + dAtA[i] = 0x2a + } + if len(m.Version) > 0 { + i -= len(m.Version) + copy(dAtA[i:], m.Version) + i = encodeVarintAttributes(dAtA, i, uint64(len(m.Version))) + i-- + dAtA[i] = 0x22 + } + if len(m.Description) > 0 { + i -= len(m.Description) + copy(dAtA[i:], m.Description) + i = encodeVarintAttributes(dAtA, i, uint64(len(m.Description))) + i-- + dAtA[i] = 0x1a + } + if len(m.RepoReference) > 0 { + i -= len(m.RepoReference) + copy(dAtA[i:], m.RepoReference) + i = encodeVarintAttributes(dAtA, i, uint64(len(m.RepoReference))) + i-- + dAtA[i] = 0x12 + } + if len(m.Name) > 0 { + i -= len(m.Name) + copy(dAtA[i:], m.Name) + i = encodeVarintAttributes(dAtA, i, uint64(len(m.Name))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *Binary) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Binary) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Binary) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Type) > 0 { + i -= len(m.Type) + copy(dAtA[i:], m.Type) + i = encodeVarintAttributes(dAtA, i, uint64(len(m.Type))) + i-- + dAtA[i] = 0x32 + } + if len(m.Version) > 0 { + i -= len(m.Version) + copy(dAtA[i:], m.Version) + i = encodeVarintAttributes(dAtA, i, uint64(len(m.Version))) + i-- + dAtA[i] = 0x2a + } + if m.RepoReference != nil { + { + size, err := m.RepoReference.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintAttributes(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x22 + } + if len(m.RuntimeVersion) > 0 { + i -= len(m.RuntimeVersion) + copy(dAtA[i:], m.RuntimeVersion) + i = encodeVarintAttributes(dAtA, i, uint64(len(m.RuntimeVersion))) + i-- + dAtA[i] = 0x1a + } + if len(m.TargetedArch) > 0 { + i -= len(m.TargetedArch) + copy(dAtA[i:], m.TargetedArch) + i = encodeVarintAttributes(dAtA, i, uint64(len(m.TargetedArch))) + i-- + dAtA[i] = 0x12 + } + if m.HashReference != nil { + { + size, err := m.HashReference.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintAttributes(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *DockerImage) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *DockerImage) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *DockerImage) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Type) > 0 { + i -= len(m.Type) + copy(dAtA[i:], m.Type) + i = encodeVarintAttributes(dAtA, i, uint64(len(m.Type))) + i-- + dAtA[i] = 0x2a + } + if len(m.Version) > 0 { + i -= len(m.Version) + copy(dAtA[i:], m.Version) + i = encodeVarintAttributes(dAtA, i, uint64(len(m.Version))) + i-- + dAtA[i] = 0x22 + } + if m.RepoReference != nil { + { + size, err := m.RepoReference.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintAttributes(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + } + if m.BinaryReference != nil { + { + size, err := m.BinaryReference.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintAttributes(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + if len(m.ImageId) > 0 { + i -= len(m.ImageId) + copy(dAtA[i:], m.ImageId) + i = encodeVarintAttributes(dAtA, i, uint64(len(m.ImageId))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *WatcherRegistrationRecord) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *WatcherRegistrationRecord) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *WatcherRegistrationRecord) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Type) > 0 { + i -= len(m.Type) + copy(dAtA[i:], m.Type) + i = encodeVarintAttributes(dAtA, i, uint64(len(m.Type))) + i-- + dAtA[i] = 0x2a + } + if len(m.Version) > 0 { + i -= len(m.Version) + copy(dAtA[i:], m.Version) + i = encodeVarintAttributes(dAtA, i, uint64(len(m.Version))) + i-- + dAtA[i] = 0x22 + } + if m.Wasm != nil { + { + size, err := m.Wasm.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintAttributes(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + } + if m.RepoReference != nil { + { + size, err := m.RepoReference.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintAttributes(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + if m.Metadata != nil { + { + size, err := m.Metadata.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintAttributes(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *WatcherRegistrationRecord_WatcherMetadata) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *WatcherRegistrationRecord_WatcherMetadata) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *WatcherRegistrationRecord_WatcherMetadata) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.ChainReference != nil { + { + size, err := m.ChainReference.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintAttributes(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + if len(m.Version) > 0 { + i -= len(m.Version) + copy(dAtA[i:], m.Version) + i = encodeVarintAttributes(dAtA, i, uint64(len(m.Version))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *WatcherRegistrationRecord_WASMBinary) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *WatcherRegistrationRecord_WASMBinary) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *WatcherRegistrationRecord_WASMBinary) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Metadata != nil { + { + size, err := m.Metadata.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintAttributes(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + if m.HashReference != nil { + { + size, err := m.HashReference.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintAttributes(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *WatcherRegistrationRecord_WASMBinaryMetadata) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *WatcherRegistrationRecord_WASMBinaryMetadata) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *WatcherRegistrationRecord_WASMBinaryMetadata) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.ExecutionEngineVersion) > 0 { + i -= len(m.ExecutionEngineVersion) + copy(dAtA[i:], m.ExecutionEngineVersion) + i = encodeVarintAttributes(dAtA, i, uint64(len(m.ExecutionEngineVersion))) + i-- + dAtA[i] = 0x12 + } + if len(m.CompilerVersion) > 0 { + i -= len(m.CompilerVersion) + copy(dAtA[i:], m.CompilerVersion) + i = encodeVarintAttributes(dAtA, i, uint64(len(m.CompilerVersion))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *ResponderContract) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ResponderContract) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ResponderContract) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Type) > 0 { + i -= len(m.Type) + copy(dAtA[i:], m.Type) + i = encodeVarintAttributes(dAtA, i, uint64(len(m.Type))) + i-- + dAtA[i] = 0x2a + } + if len(m.Version) > 0 { + i -= len(m.Version) + copy(dAtA[i:], m.Version) + i = encodeVarintAttributes(dAtA, i, uint64(len(m.Version))) + i-- + dAtA[i] = 0x22 + } + if m.WatcherRef != nil { + { + size, err := m.WatcherRef.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintAttributes(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + } + if m.AuctionRef != nil { + { + size, err := m.AuctionRef.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintAttributes(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + if m.ServiceProviderRef != nil { + { + size, err := m.ServiceProviderRef.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintAttributes(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *JSPackage) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *JSPackage) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *JSPackage) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Name) > 0 { + i -= len(m.Name) + copy(dAtA[i:], m.Name) + i = encodeVarintAttributes(dAtA, i, uint64(len(m.Name))) + i-- + dAtA[i] = 0x2a + } + if len(m.Type) > 0 { + i -= len(m.Type) + copy(dAtA[i:], m.Type) + i = encodeVarintAttributes(dAtA, i, uint64(len(m.Type))) + i-- + dAtA[i] = 0x22 + } + if len(m.Version) > 0 { + i -= len(m.Version) + copy(dAtA[i:], m.Version) + i = encodeVarintAttributes(dAtA, i, uint64(len(m.Version))) + i-- + dAtA[i] = 0x1a + } + if m.JsPackageRef != nil { + { + size, err := m.JsPackageRef.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintAttributes(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + if m.RepoReference != nil { + { + size, err := m.RepoReference.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintAttributes(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *ChainRegistrationRecord) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ChainRegistrationRecord) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ChainRegistrationRecord) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.GenesisHash != nil { + { + size, err := m.GenesisHash.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintAttributes(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x3a + } + if len(m.NetworkId) > 0 { + i -= len(m.NetworkId) + copy(dAtA[i:], m.NetworkId) + i = encodeVarintAttributes(dAtA, i, uint64(len(m.NetworkId))) + i-- + dAtA[i] = 0x32 + } + if len(m.ChainId) > 0 { + i -= len(m.ChainId) + copy(dAtA[i:], m.ChainId) + i = encodeVarintAttributes(dAtA, i, uint64(len(m.ChainId))) + i-- + dAtA[i] = 0x2a + } + if len(m.Version) > 0 { + i -= len(m.Version) + copy(dAtA[i:], m.Version) + i = encodeVarintAttributes(dAtA, i, uint64(len(m.Version))) + i-- + dAtA[i] = 0x22 + } + if len(m.Type) > 0 { + i -= len(m.Type) + copy(dAtA[i:], m.Type) + i = encodeVarintAttributes(dAtA, i, uint64(len(m.Type))) + i-- + dAtA[i] = 0x1a + } + if len(m.IpldTypes) > 0 { + for iNdEx := len(m.IpldTypes) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.IpldTypes[iNdEx]) + copy(dAtA[i:], m.IpldTypes[iNdEx]) + i = encodeVarintAttributes(dAtA, i, uint64(len(m.IpldTypes[iNdEx]))) + i-- + dAtA[i] = 0x12 + } + } + if len(m.Name) > 0 { + i -= len(m.Name) + copy(dAtA[i:], m.Name) + i = encodeVarintAttributes(dAtA, i, uint64(len(m.Name))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + func encodeVarintAttributes(dAtA []byte, offset int, v uint64) int { offset -= sovAttributes(v) base := offset @@ -527,7 +2008,20 @@ func encodeVarintAttributes(dAtA []byte, offset int, v uint64) int { dAtA[offset] = uint8(v) return base } -func (m *ServiceProviderRegistration) Size() (n int) { +func (m *HashReference) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Ref) + if l > 0 { + n += 1 + l + sovAttributes(uint64(l)) + } + return n +} + +func (m *ServiceProviderRecord) Size() (n int) { if m == nil { return 0 } @@ -556,7 +2050,7 @@ func (m *ServiceProviderRegistration) Size() (n int) { return n } -func (m *X500) Size() (n int) { +func (m *ServiceProviderRecord_X500) Size() (n int) { if m == nil { return 0 } @@ -599,16 +2093,16 @@ func (m *WebsiteRegistrationRecord) Size() (n int) { if l > 0 { n += 1 + l + sovAttributes(uint64(l)) } - l = len(m.RepoRegistrationRecordCid) - if l > 0 { + if m.RepoReference != nil { + l = m.RepoReference.Size() n += 1 + l + sovAttributes(uint64(l)) } - l = len(m.BuildArtifactCid) - if l > 0 { + if m.BuildArtifactRef != nil { + l = m.BuildArtifactRef.Size() n += 1 + l + sovAttributes(uint64(l)) } - l = len(m.TlsCertCid) - if l > 0 { + if m.TlsCertRef != nil { + l = m.TlsCertRef.Size() n += 1 + l + sovAttributes(uint64(l)) } l = len(m.Type) @@ -622,13 +2116,281 @@ func (m *WebsiteRegistrationRecord) Size() (n int) { return n } +func (m *GitRepository) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Name) + if l > 0 { + n += 1 + l + sovAttributes(uint64(l)) + } + l = len(m.RepoReference) + if l > 0 { + n += 1 + l + sovAttributes(uint64(l)) + } + l = len(m.Description) + if l > 0 { + n += 1 + l + sovAttributes(uint64(l)) + } + l = len(m.Version) + if l > 0 { + n += 1 + l + sovAttributes(uint64(l)) + } + l = len(m.Type) + if l > 0 { + n += 1 + l + sovAttributes(uint64(l)) + } + return n +} + +func (m *Binary) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.HashReference != nil { + l = m.HashReference.Size() + n += 1 + l + sovAttributes(uint64(l)) + } + l = len(m.TargetedArch) + if l > 0 { + n += 1 + l + sovAttributes(uint64(l)) + } + l = len(m.RuntimeVersion) + if l > 0 { + n += 1 + l + sovAttributes(uint64(l)) + } + if m.RepoReference != nil { + l = m.RepoReference.Size() + n += 1 + l + sovAttributes(uint64(l)) + } + l = len(m.Version) + if l > 0 { + n += 1 + l + sovAttributes(uint64(l)) + } + l = len(m.Type) + if l > 0 { + n += 1 + l + sovAttributes(uint64(l)) + } + return n +} + +func (m *DockerImage) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.ImageId) + if l > 0 { + n += 1 + l + sovAttributes(uint64(l)) + } + if m.BinaryReference != nil { + l = m.BinaryReference.Size() + n += 1 + l + sovAttributes(uint64(l)) + } + if m.RepoReference != nil { + l = m.RepoReference.Size() + n += 1 + l + sovAttributes(uint64(l)) + } + l = len(m.Version) + if l > 0 { + n += 1 + l + sovAttributes(uint64(l)) + } + l = len(m.Type) + if l > 0 { + n += 1 + l + sovAttributes(uint64(l)) + } + return n +} + +func (m *WatcherRegistrationRecord) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Metadata != nil { + l = m.Metadata.Size() + n += 1 + l + sovAttributes(uint64(l)) + } + if m.RepoReference != nil { + l = m.RepoReference.Size() + n += 1 + l + sovAttributes(uint64(l)) + } + if m.Wasm != nil { + l = m.Wasm.Size() + n += 1 + l + sovAttributes(uint64(l)) + } + l = len(m.Version) + if l > 0 { + n += 1 + l + sovAttributes(uint64(l)) + } + l = len(m.Type) + if l > 0 { + n += 1 + l + sovAttributes(uint64(l)) + } + return n +} + +func (m *WatcherRegistrationRecord_WatcherMetadata) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Version) + if l > 0 { + n += 1 + l + sovAttributes(uint64(l)) + } + if m.ChainReference != nil { + l = m.ChainReference.Size() + n += 1 + l + sovAttributes(uint64(l)) + } + return n +} + +func (m *WatcherRegistrationRecord_WASMBinary) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.HashReference != nil { + l = m.HashReference.Size() + n += 1 + l + sovAttributes(uint64(l)) + } + if m.Metadata != nil { + l = m.Metadata.Size() + n += 1 + l + sovAttributes(uint64(l)) + } + return n +} + +func (m *WatcherRegistrationRecord_WASMBinaryMetadata) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.CompilerVersion) + if l > 0 { + n += 1 + l + sovAttributes(uint64(l)) + } + l = len(m.ExecutionEngineVersion) + if l > 0 { + n += 1 + l + sovAttributes(uint64(l)) + } + return n +} + +func (m *ResponderContract) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.ServiceProviderRef != nil { + l = m.ServiceProviderRef.Size() + n += 1 + l + sovAttributes(uint64(l)) + } + if m.AuctionRef != nil { + l = m.AuctionRef.Size() + n += 1 + l + sovAttributes(uint64(l)) + } + if m.WatcherRef != nil { + l = m.WatcherRef.Size() + n += 1 + l + sovAttributes(uint64(l)) + } + l = len(m.Version) + if l > 0 { + n += 1 + l + sovAttributes(uint64(l)) + } + l = len(m.Type) + if l > 0 { + n += 1 + l + sovAttributes(uint64(l)) + } + return n +} + +func (m *JSPackage) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.RepoReference != nil { + l = m.RepoReference.Size() + n += 1 + l + sovAttributes(uint64(l)) + } + if m.JsPackageRef != nil { + l = m.JsPackageRef.Size() + n += 1 + l + sovAttributes(uint64(l)) + } + l = len(m.Version) + if l > 0 { + n += 1 + l + sovAttributes(uint64(l)) + } + l = len(m.Type) + if l > 0 { + n += 1 + l + sovAttributes(uint64(l)) + } + l = len(m.Name) + if l > 0 { + n += 1 + l + sovAttributes(uint64(l)) + } + return n +} + +func (m *ChainRegistrationRecord) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Name) + if l > 0 { + n += 1 + l + sovAttributes(uint64(l)) + } + if len(m.IpldTypes) > 0 { + for _, s := range m.IpldTypes { + l = len(s) + n += 1 + l + sovAttributes(uint64(l)) + } + } + l = len(m.Type) + if l > 0 { + n += 1 + l + sovAttributes(uint64(l)) + } + l = len(m.Version) + if l > 0 { + n += 1 + l + sovAttributes(uint64(l)) + } + l = len(m.ChainId) + if l > 0 { + n += 1 + l + sovAttributes(uint64(l)) + } + l = len(m.NetworkId) + if l > 0 { + n += 1 + l + sovAttributes(uint64(l)) + } + if m.GenesisHash != nil { + l = m.GenesisHash.Size() + n += 1 + l + sovAttributes(uint64(l)) + } + return n +} + func sovAttributes(x uint64) (n int) { return (math_bits.Len64(x|1) + 6) / 7 } func sozAttributes(x uint64) (n int) { return sovAttributes(uint64((x << 1) ^ uint64((int64(x) >> 63)))) } -func (m *ServiceProviderRegistration) Unmarshal(dAtA []byte) error { +func (m *HashReference) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -651,10 +2413,92 @@ func (m *ServiceProviderRegistration) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: ServiceProviderRegistration: wiretype end group for non-group") + return fmt.Errorf("proto: HashReference: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: ServiceProviderRegistration: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: HashReference: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Ref", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAttributes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthAttributes + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthAttributes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Ref = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipAttributes(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthAttributes + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ServiceProviderRecord) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAttributes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ServiceProviderRecord: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ServiceProviderRecord: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -751,7 +2595,7 @@ func (m *ServiceProviderRegistration) Unmarshal(dAtA []byte) error { return io.ErrUnexpectedEOF } if m.X500 == nil { - m.X500 = &X500{} + m.X500 = &ServiceProviderRecord_X500{} } if err := m.X500.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err @@ -842,7 +2686,7 @@ func (m *ServiceProviderRegistration) Unmarshal(dAtA []byte) error { } return nil } -func (m *X500) Unmarshal(dAtA []byte) error { +func (m *ServiceProviderRecord_X500) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -1147,9 +2991,9 @@ func (m *WebsiteRegistrationRecord) Unmarshal(dAtA []byte) error { iNdEx = postIndex case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field RepoRegistrationRecordCid", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field RepoReference", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowAttributes @@ -1159,29 +3003,33 @@ func (m *WebsiteRegistrationRecord) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if msglen < 0 { return ErrInvalidLengthAttributes } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthAttributes } if postIndex > l { return io.ErrUnexpectedEOF } - m.RepoRegistrationRecordCid = string(dAtA[iNdEx:postIndex]) + if m.RepoReference == nil { + m.RepoReference = &HashReference{} + } + if err := m.RepoReference.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } iNdEx = postIndex case 3: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field BuildArtifactCid", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field BuildArtifactRef", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowAttributes @@ -1191,29 +3039,33 @@ func (m *WebsiteRegistrationRecord) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if msglen < 0 { return ErrInvalidLengthAttributes } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthAttributes } if postIndex > l { return io.ErrUnexpectedEOF } - m.BuildArtifactCid = string(dAtA[iNdEx:postIndex]) + if m.BuildArtifactRef == nil { + m.BuildArtifactRef = &HashReference{} + } + if err := m.BuildArtifactRef.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } iNdEx = postIndex case 4: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field TlsCertCid", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field TlsCertRef", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowAttributes @@ -1223,23 +3075,27 @@ func (m *WebsiteRegistrationRecord) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if msglen < 0 { return ErrInvalidLengthAttributes } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthAttributes } if postIndex > l { return io.ErrUnexpectedEOF } - m.TlsCertCid = string(dAtA[iNdEx:postIndex]) + if m.TlsCertRef == nil { + m.TlsCertRef = &HashReference{} + } + if err := m.TlsCertRef.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } iNdEx = postIndex case 5: if wireType != 2 { @@ -1326,6 +3182,1978 @@ func (m *WebsiteRegistrationRecord) Unmarshal(dAtA []byte) error { } return nil } +func (m *GitRepository) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAttributes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: GitRepository: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: GitRepository: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAttributes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthAttributes + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthAttributes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Name = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field RepoReference", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAttributes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthAttributes + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthAttributes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.RepoReference = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Description", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAttributes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthAttributes + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthAttributes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Description = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Version", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAttributes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthAttributes + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthAttributes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Version = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAttributes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthAttributes + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthAttributes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Type = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipAttributes(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthAttributes + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Binary) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAttributes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Binary: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Binary: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field HashReference", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAttributes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthAttributes + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthAttributes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.HashReference == nil { + m.HashReference = &HashReference{} + } + if err := m.HashReference.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field TargetedArch", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAttributes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthAttributes + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthAttributes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.TargetedArch = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field RuntimeVersion", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAttributes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthAttributes + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthAttributes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.RuntimeVersion = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field RepoReference", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAttributes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthAttributes + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthAttributes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.RepoReference == nil { + m.RepoReference = &HashReference{} + } + if err := m.RepoReference.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Version", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAttributes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthAttributes + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthAttributes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Version = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAttributes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthAttributes + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthAttributes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Type = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipAttributes(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthAttributes + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *DockerImage) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAttributes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: DockerImage: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: DockerImage: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ImageId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAttributes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthAttributes + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthAttributes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ImageId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field BinaryReference", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAttributes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthAttributes + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthAttributes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.BinaryReference == nil { + m.BinaryReference = &HashReference{} + } + if err := m.BinaryReference.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field RepoReference", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAttributes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthAttributes + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthAttributes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.RepoReference == nil { + m.RepoReference = &HashReference{} + } + if err := m.RepoReference.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Version", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAttributes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthAttributes + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthAttributes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Version = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAttributes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthAttributes + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthAttributes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Type = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipAttributes(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthAttributes + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *WatcherRegistrationRecord) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAttributes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: WatcherRegistrationRecord: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: WatcherRegistrationRecord: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Metadata", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAttributes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthAttributes + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthAttributes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Metadata == nil { + m.Metadata = &WatcherRegistrationRecord_WatcherMetadata{} + } + if err := m.Metadata.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field RepoReference", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAttributes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthAttributes + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthAttributes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.RepoReference == nil { + m.RepoReference = &HashReference{} + } + if err := m.RepoReference.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Wasm", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAttributes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthAttributes + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthAttributes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Wasm == nil { + m.Wasm = &WatcherRegistrationRecord_WASMBinary{} + } + if err := m.Wasm.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Version", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAttributes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthAttributes + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthAttributes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Version = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAttributes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthAttributes + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthAttributes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Type = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipAttributes(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthAttributes + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *WatcherRegistrationRecord_WatcherMetadata) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAttributes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: WatcherMetadata: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: WatcherMetadata: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Version", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAttributes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthAttributes + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthAttributes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Version = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ChainReference", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAttributes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthAttributes + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthAttributes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.ChainReference == nil { + m.ChainReference = &HashReference{} + } + if err := m.ChainReference.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipAttributes(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthAttributes + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *WatcherRegistrationRecord_WASMBinary) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAttributes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: WASMBinary: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: WASMBinary: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field HashReference", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAttributes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthAttributes + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthAttributes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.HashReference == nil { + m.HashReference = &HashReference{} + } + if err := m.HashReference.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Metadata", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAttributes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthAttributes + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthAttributes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Metadata == nil { + m.Metadata = &WatcherRegistrationRecord_WASMBinaryMetadata{} + } + if err := m.Metadata.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipAttributes(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthAttributes + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *WatcherRegistrationRecord_WASMBinaryMetadata) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAttributes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: WASMBinaryMetadata: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: WASMBinaryMetadata: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field CompilerVersion", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAttributes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthAttributes + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthAttributes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.CompilerVersion = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ExecutionEngineVersion", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAttributes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthAttributes + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthAttributes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ExecutionEngineVersion = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipAttributes(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthAttributes + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ResponderContract) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAttributes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ResponderContract: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ResponderContract: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ServiceProviderRef", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAttributes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthAttributes + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthAttributes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.ServiceProviderRef == nil { + m.ServiceProviderRef = &HashReference{} + } + if err := m.ServiceProviderRef.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field AuctionRef", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAttributes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthAttributes + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthAttributes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.AuctionRef == nil { + m.AuctionRef = &HashReference{} + } + if err := m.AuctionRef.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field WatcherRef", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAttributes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthAttributes + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthAttributes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.WatcherRef == nil { + m.WatcherRef = &HashReference{} + } + if err := m.WatcherRef.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Version", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAttributes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthAttributes + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthAttributes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Version = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAttributes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthAttributes + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthAttributes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Type = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipAttributes(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthAttributes + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *JSPackage) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAttributes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: JSPackage: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: JSPackage: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field RepoReference", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAttributes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthAttributes + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthAttributes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.RepoReference == nil { + m.RepoReference = &HashReference{} + } + if err := m.RepoReference.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field JsPackageRef", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAttributes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthAttributes + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthAttributes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.JsPackageRef == nil { + m.JsPackageRef = &HashReference{} + } + if err := m.JsPackageRef.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Version", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAttributes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthAttributes + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthAttributes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Version = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAttributes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthAttributes + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthAttributes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Type = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAttributes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthAttributes + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthAttributes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Name = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipAttributes(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthAttributes + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ChainRegistrationRecord) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAttributes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ChainRegistrationRecord: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ChainRegistrationRecord: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAttributes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthAttributes + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthAttributes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Name = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field IpldTypes", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAttributes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthAttributes + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthAttributes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.IpldTypes = append(m.IpldTypes, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAttributes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthAttributes + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthAttributes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Type = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Version", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAttributes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthAttributes + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthAttributes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Version = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ChainId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAttributes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthAttributes + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthAttributes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ChainId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NetworkId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAttributes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthAttributes + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthAttributes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.NetworkId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 7: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field GenesisHash", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAttributes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthAttributes + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthAttributes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.GenesisHash == nil { + m.GenesisHash = &HashReference{} + } + if err := m.GenesisHash.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipAttributes(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthAttributes + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} func skipAttributes(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 diff --git a/x/registry/types/codec.go b/x/registry/types/codec.go index 1a9dd50e..b154eaea 100644 --- a/x/registry/types/codec.go +++ b/x/registry/types/codec.go @@ -40,9 +40,9 @@ func RegisterInterfaces(registry types.InterfaceRegistry) { ) registry.RegisterInterface( - "vulcanize.registry.v1beta1.ServiceProvideRegistration", + "vulcanize.registry.v1beta1.ServiceProviderRecord", (*Attributes)(nil), - &ServiceProviderRegistration{}, + &ServiceProviderRecord{}, ) registry.RegisterInterface( @@ -50,6 +50,48 @@ func RegisterInterfaces(registry types.InterfaceRegistry) { (*Attributes)(nil), &WebsiteRegistrationRecord{}, ) + + registry.RegisterInterface( + "vulcanize.registry.v1beta1.GitRepository", + (*Attributes)(nil), + &GitRepository{}, + ) + + registry.RegisterInterface( + "vulcanize.registry.v1beta1.Binary", + (*Attributes)(nil), + &Binary{}, + ) + + registry.RegisterInterface( + "vulcanize.registry.v1beta1.DockerImage", + (*Attributes)(nil), + &DockerImage{}, + ) + + registry.RegisterInterface( + "vulcanize.registry.v1beta1.WatcherRegistrationRecord", + (*Attributes)(nil), + &WatcherRegistrationRecord{}, + ) + + registry.RegisterInterface( + "vulcanize.registry.v1beta1.ResponderContract", + (*Attributes)(nil), + &ResponderContract{}, + ) + + registry.RegisterInterface( + "vulcanize.registry.v1beta1.JSPackage", + (*Attributes)(nil), + &JSPackage{}, + ) + + registry.RegisterInterface( + "vulcanize.registry.v1beta1.ChainRegistrationRecord", + (*Attributes)(nil), + &ChainRegistrationRecord{}, + ) msgservice.RegisterMsgServiceDesc(registry, &_Msg_serviceDesc) } diff --git a/x/registry/types/types.go b/x/registry/types/types.go index 69f770f2..5603556b 100644 --- a/x/registry/types/types.go +++ b/x/registry/types/types.go @@ -50,9 +50,9 @@ func payLoadAttributes(recordPayLoad map[string]interface{}) (*codectypes.Any, e bz := helpers.MarshalMapToJSONBytes(recordPayLoad) switch recordType.(string) { - case "ServiceProviderRegistration": + case "ServiceProviderRecord": { - var attributes ServiceProviderRegistration + var attributes ServiceProviderRecord err := json.Unmarshal(bz, &attributes) if err != nil { return &codectypes.Any{}, err @@ -68,6 +68,69 @@ func payLoadAttributes(recordPayLoad map[string]interface{}) (*codectypes.Any, e } return codectypes.NewAnyWithValue(&attributes) } + case "GitRepository": + { + var attributes GitRepository + err := json.Unmarshal(bz, &attributes) + if err != nil { + return &codectypes.Any{}, err + } + return codectypes.NewAnyWithValue(&attributes) + } + case "Binary": + { + var attributes Binary + err := json.Unmarshal(bz, &attributes) + if err != nil { + return &codectypes.Any{}, err + } + return codectypes.NewAnyWithValue(&attributes) + } + case "DockerImage": + { + var attributes DockerImage + err := json.Unmarshal(bz, &attributes) + if err != nil { + return &codectypes.Any{}, err + } + return codectypes.NewAnyWithValue(&attributes) + } + case "WatcherRegistrationRecord": + { + var attributes WatcherRegistrationRecord + err := json.Unmarshal(bz, &attributes) + if err != nil { + return &codectypes.Any{}, err + } + return codectypes.NewAnyWithValue(&attributes) + } + case "ResponderContract": + { + var attributes ResponderContract + err := json.Unmarshal(bz, &attributes) + if err != nil { + return &codectypes.Any{}, err + } + return codectypes.NewAnyWithValue(&attributes) + } + case "JSPackage": + { + var attributes JSPackage + err := json.Unmarshal(bz, &attributes) + if err != nil { + return &codectypes.Any{}, err + } + return codectypes.NewAnyWithValue(&attributes) + } + case "ChainRegistrationRecord": + { + var attributes ChainRegistrationRecord + err := json.Unmarshal(bz, &attributes) + if err != nil { + return &codectypes.Any{}, err + } + return codectypes.NewAnyWithValue(&attributes) + } default: return &codectypes.Any{}, fmt.Errorf("unsupported record type %s", recordType.(string)) } @@ -114,9 +177,9 @@ func GetJSONBytesFromAny(any codectypes.Any) ([]byte, error) { var bz []byte s := strings.Split(any.TypeUrl, ".") switch s[len(s)-1] { - case "ServiceProviderRegistration": + case "ServiceProviderRecord": { - var attributes ServiceProviderRegistration + var attributes ServiceProviderRecord err := proto.Unmarshal(any.Value, &attributes) if err != nil { panic("Proto unmarshal error") @@ -135,6 +198,97 @@ func GetJSONBytesFromAny(any codectypes.Any) ([]byte, error) { panic("Proto unmarshal error") } + bz, err = json.Marshal(attributes) + if err != nil { + panic("JSON marshal error") + } + } + case "GitRepository": + { + var attributes GitRepository + err := proto.Unmarshal(any.Value, &attributes) + if err != nil { + panic("Proto unmarshal error") + } + + bz, err = json.Marshal(attributes) + if err != nil { + panic("JSON marshal error") + } + } + case "Binary": + { + var attributes Binary + err := proto.Unmarshal(any.Value, &attributes) + if err != nil { + panic("Proto unmarshal error") + } + + bz, err = json.Marshal(attributes) + if err != nil { + panic("JSON marshal error") + } + } + case "DockerImage": + { + var attributes DockerImage + err := proto.Unmarshal(any.Value, &attributes) + if err != nil { + panic("Proto unmarshal error") + } + + bz, err = json.Marshal(attributes) + if err != nil { + panic("JSON marshal error") + } + } + case "WatcherRegistrationRecord": + { + var attributes WatcherRegistrationRecord + err := proto.Unmarshal(any.Value, &attributes) + if err != nil { + panic("Proto unmarshal error") + } + + bz, err = json.Marshal(attributes) + if err != nil { + panic("JSON marshal error") + } + } + case "ResponderContract": + { + var attributes ResponderContract + err := proto.Unmarshal(any.Value, &attributes) + if err != nil { + panic("Proto unmarshal error") + } + + bz, err = json.Marshal(attributes) + if err != nil { + panic("JSON marshal error") + } + } + case "JSPackage": + { + var attributes JSPackage + err := proto.Unmarshal(any.Value, &attributes) + if err != nil { + panic("Proto unmarshal error") + } + + bz, err = json.Marshal(attributes) + if err != nil { + panic("JSON marshal error") + } + } + case "ChainRegistrationRecord": + { + var attributes ChainRegistrationRecord + err := proto.Unmarshal(any.Value, &attributes) + if err != nil { + panic("Proto unmarshal error") + } + bz, err = json.Marshal(attributes) if err != nil { panic("JSON marshal error")