Skip to content

Commit

Permalink
Merge pull request #5 from DIMO-Network/as-3174-seperate-object-key-a…
Browse files Browse the repository at this point in the history
…nd-db-meta-data

Update name indexer and send back cloudevents
  • Loading branch information
KevinJoiner authored Dec 2, 2024
2 parents 23764bd + 992b395 commit 6fb4593
Show file tree
Hide file tree
Showing 14 changed files with 1,361 additions and 619 deletions.
108 changes: 89 additions & 19 deletions docs/docs.go
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,10 @@ const docTemplate = `{
"200": {
"description": "Returns list of index keys",
"schema": {
"$ref": "#/definitions/internal_fetch_httphandler.indexKeysResponse"
"type": "array",
"items": {
"$ref": "#/definitions/indexrepo.CloudEventMetadata"
}
}
},
"400": {
Expand Down Expand Up @@ -175,7 +178,7 @@ const docTemplate = `{
"200": {
"description": "Returns the latest index key",
"schema": {
"$ref": "#/definitions/internal_fetch_httphandler.indexKeyResponse"
"$ref": "#/definitions/indexrepo.CloudEventMetadata"
}
},
"400": {
Expand Down Expand Up @@ -255,7 +258,7 @@ const docTemplate = `{
"200": {
"description": "Returns latest object data",
"schema": {
"$ref": "#/definitions/indexrepo.DataObject"
"$ref": "#/definitions/cloudevent.CloudEvent-json_RawMessage"
}
},
"400": {
Expand Down Expand Up @@ -337,7 +340,7 @@ const docTemplate = `{
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/indexrepo.DataObject"
"$ref": "#/definitions/cloudevent.CloudEvent-json_RawMessage"
}
}
},
Expand All @@ -364,36 +367,103 @@ const docTemplate = `{
}
},
"definitions": {
"indexrepo.DataObject": {
"cloudevent.CloudEvent-json_RawMessage": {
"type": "object",
"properties": {
"data": {
"description": "Data contains domain-specific information about the event.",
"type": "array",
"items": {
"type": "integer"
}
},
"indexKey": {
"datacontenttype": {
"description": "DataContentType is an optional MIME type for the data field. We almost\nalways serialize to JSON and in that case this field is implicitly\n\"application/json\".",
"type": "string"
}
}
},
"internal_fetch_httphandler.indexKeyResponse": {
"type": "object",
"properties": {
"indexKey": {
},
"dataschema": {
"description": "DataSchema is an optional URI pointing to a schema for the data field.",
"type": "string"
},
"dataversion": {
"description": "DataVersion is the version of the data type.",
"type": "string"
},
"id": {
"description": "ID is an identifier for the event. The combination of ID and Source must\nbe unique.",
"type": "string"
},
"producer": {
"description": "Producer is a specific instance, process or device that creates the data structure describing the CloudEvent.",
"type": "string"
},
"source": {
"description": "Source is the context in which the event happened. In a distributed system it might consist of multiple Producers.",
"type": "string"
},
"specversion": {
"description": "SpecVersion is the version of CloudEvents specification used.\nThis is always hardcoded \"1.0\".",
"type": "string"
},
"subject": {
"description": "Subject is an optional field identifying the subject of the event within\nthe context of the event producer. In practice, we always set this.",
"type": "string"
},
"time": {
"description": "Time is an optional field giving the time at which the event occurred. In\npractice, we always set this.",
"type": "string"
},
"type": {
"description": "Type describes the type of event. It should generally be a reverse-DNS\nname.",
"type": "string"
}
}
},
"internal_fetch_httphandler.indexKeysResponse": {
"indexrepo.CloudEventMetadata": {
"type": "object",
"properties": {
"indexKeys": {
"type": "array",
"items": {
"type": "string"
}
"datacontenttype": {
"description": "DataContentType is an optional MIME type for the data field. We almost\nalways serialize to JSON and in that case this field is implicitly\n\"application/json\".",
"type": "string"
},
"dataschema": {
"description": "DataSchema is an optional URI pointing to a schema for the data field.",
"type": "string"
},
"dataversion": {
"description": "DataVersion is the version of the data type.",
"type": "string"
},
"id": {
"description": "ID is an identifier for the event. The combination of ID and Source must\nbe unique.",
"type": "string"
},
"key": {
"type": "string"
},
"producer": {
"description": "Producer is a specific instance, process or device that creates the data structure describing the CloudEvent.",
"type": "string"
},
"source": {
"description": "Source is the context in which the event happened. In a distributed system it might consist of multiple Producers.",
"type": "string"
},
"specversion": {
"description": "SpecVersion is the version of CloudEvents specification used.\nThis is always hardcoded \"1.0\".",
"type": "string"
},
"subject": {
"description": "Subject is an optional field identifying the subject of the event within\nthe context of the event producer. In practice, we always set this.",
"type": "string"
},
"time": {
"description": "Time is an optional field giving the time at which the event occurred. In\npractice, we always set this.",
"type": "string"
},
"type": {
"description": "Type describes the type of event. It should generally be a reverse-DNS\nname.",
"type": "string"
}
}
}
Expand Down
108 changes: 89 additions & 19 deletions docs/swagger.json
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,10 @@
"200": {
"description": "Returns list of index keys",
"schema": {
"$ref": "#/definitions/internal_fetch_httphandler.indexKeysResponse"
"type": "array",
"items": {
"$ref": "#/definitions/indexrepo.CloudEventMetadata"
}
}
},
"400": {
Expand Down Expand Up @@ -166,7 +169,7 @@
"200": {
"description": "Returns the latest index key",
"schema": {
"$ref": "#/definitions/internal_fetch_httphandler.indexKeyResponse"
"$ref": "#/definitions/indexrepo.CloudEventMetadata"
}
},
"400": {
Expand Down Expand Up @@ -246,7 +249,7 @@
"200": {
"description": "Returns latest object data",
"schema": {
"$ref": "#/definitions/indexrepo.DataObject"
"$ref": "#/definitions/cloudevent.CloudEvent-json_RawMessage"
}
},
"400": {
Expand Down Expand Up @@ -328,7 +331,7 @@
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/indexrepo.DataObject"
"$ref": "#/definitions/cloudevent.CloudEvent-json_RawMessage"
}
}
},
Expand All @@ -355,36 +358,103 @@
}
},
"definitions": {
"indexrepo.DataObject": {
"cloudevent.CloudEvent-json_RawMessage": {
"type": "object",
"properties": {
"data": {
"description": "Data contains domain-specific information about the event.",
"type": "array",
"items": {
"type": "integer"
}
},
"indexKey": {
"datacontenttype": {
"description": "DataContentType is an optional MIME type for the data field. We almost\nalways serialize to JSON and in that case this field is implicitly\n\"application/json\".",
"type": "string"
}
}
},
"internal_fetch_httphandler.indexKeyResponse": {
"type": "object",
"properties": {
"indexKey": {
},
"dataschema": {
"description": "DataSchema is an optional URI pointing to a schema for the data field.",
"type": "string"
},
"dataversion": {
"description": "DataVersion is the version of the data type.",
"type": "string"
},
"id": {
"description": "ID is an identifier for the event. The combination of ID and Source must\nbe unique.",
"type": "string"
},
"producer": {
"description": "Producer is a specific instance, process or device that creates the data structure describing the CloudEvent.",
"type": "string"
},
"source": {
"description": "Source is the context in which the event happened. In a distributed system it might consist of multiple Producers.",
"type": "string"
},
"specversion": {
"description": "SpecVersion is the version of CloudEvents specification used.\nThis is always hardcoded \"1.0\".",
"type": "string"
},
"subject": {
"description": "Subject is an optional field identifying the subject of the event within\nthe context of the event producer. In practice, we always set this.",
"type": "string"
},
"time": {
"description": "Time is an optional field giving the time at which the event occurred. In\npractice, we always set this.",
"type": "string"
},
"type": {
"description": "Type describes the type of event. It should generally be a reverse-DNS\nname.",
"type": "string"
}
}
},
"internal_fetch_httphandler.indexKeysResponse": {
"indexrepo.CloudEventMetadata": {
"type": "object",
"properties": {
"indexKeys": {
"type": "array",
"items": {
"type": "string"
}
"datacontenttype": {
"description": "DataContentType is an optional MIME type for the data field. We almost\nalways serialize to JSON and in that case this field is implicitly\n\"application/json\".",
"type": "string"
},
"dataschema": {
"description": "DataSchema is an optional URI pointing to a schema for the data field.",
"type": "string"
},
"dataversion": {
"description": "DataVersion is the version of the data type.",
"type": "string"
},
"id": {
"description": "ID is an identifier for the event. The combination of ID and Source must\nbe unique.",
"type": "string"
},
"key": {
"type": "string"
},
"producer": {
"description": "Producer is a specific instance, process or device that creates the data structure describing the CloudEvent.",
"type": "string"
},
"source": {
"description": "Source is the context in which the event happened. In a distributed system it might consist of multiple Producers.",
"type": "string"
},
"specversion": {
"description": "SpecVersion is the version of CloudEvents specification used.\nThis is always hardcoded \"1.0\".",
"type": "string"
},
"subject": {
"description": "Subject is an optional field identifying the subject of the event within\nthe context of the event producer. In practice, we always set this.",
"type": "string"
},
"time": {
"description": "Time is an optional field giving the time at which the event occurred. In\npractice, we always set this.",
"type": "string"
},
"type": {
"description": "Type describes the type of event. It should generally be a reverse-DNS\nname.",
"type": "string"
}
}
}
Expand Down
Loading

0 comments on commit 6fb4593

Please sign in to comment.