diff --git a/.config/api-client-metadata.json b/.config/api-client-metadata.json index 4ba3fd11..55941afa 100644 --- a/.config/api-client-metadata.json +++ b/.config/api-client-metadata.json @@ -7,5 +7,15 @@ "repo": "bf2fc6cc711aee1a0c2a/kas-fleet-manager", "base": "main" } + }, + "kafka-admin/v1": { + "apiGroup": "kafkaadmin", + "apiVersion": "v1internal", + "release_level": "internal", + "source": { + "repo": "bf2fc6cc711aee1a0c2a/kafka-admin-api", + "base": "main" + }, + "openApiOutputFileName": "kafka-admin.yml" } } \ No newline at end of file diff --git a/.openapi/kafka-admin.yml b/.openapi/kafka-admin.yml new file mode 100644 index 00000000..6a69a84d --- /dev/null +++ b/.openapi/kafka-admin.yml @@ -0,0 +1,781 @@ +openapi: 3.0.0 +info: + title: Kafka Admin REST API + version: 0.1.0 + description: An API to provide REST endpoints for query Kafka for admin operations + license: + name: Apache 2.0 + url: 'https://www.apache.org/licenses/LICENSE-2.0' +servers: + - url: 'https://api.openshift.com' + description: Main (production) server + - url: 'https://api.stage.openshift.com' + description: Staging server + - url: 'http://localhost:8000' + description: localhost +paths: + /topics: + get: + parameters: + - name: limit + description: Maximum number of topics to return + schema: + format: int32 + type: integer + in: query + required: false + - name: filter + description: Filter to apply when returning the list of topics + schema: + type: string + in: query + - name: offset + description: The page offset when returning the limit of requested topics. + schema: + format: int32 + type: integer + in: query + - name: order + description: >- + Order of the items sorting. If "asc" is set as a value, ascending order is used, + descending otherwise. + schema: + type: string + in: query + required: false + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/TopicsList' + description: List of topics matching the users query paramters. + '400': + content: + application/json: {} + description: Unable to retreive topics. + '401': + content: + application/json: {} + description: 'Unauthorized, unable to retrive topics.' + '500': + content: + application/json: {} + description: Internal server error. + '503': + content: + application/json: {} + description: Unable to connect to the Kafka cluster. + # security: + # - Bearer: [] + operationId: getTopicsList + summary: List of topics + description: >- + Returns a list of all of the available topics, or the list of topics that meet the users URL + Query Parameters. + post: + requestBody: + description: Topic to create. + content: + application/json: + schema: + $ref: '#/components/schemas/NewTopicInput' + examples: + NewTopicInput: + value: + name: my-topic + settings: + numPartitions: 3 + replicationFactor: 4 + config: + - key: min.insync.replicas + value: '1' + - key: max.message.bytes + value: '1050000' + required: true + responses: + '201': + content: + application/json: + schema: + $ref: '#/components/schemas/Topic' + description: Topic created successfully. + '400': + description: Unable to create topic. + '401': + description: 'Unauthorized, Unable to create topic.' + '409': + description: Entry already exisits + '500': + description: Internal server error. + '503': + description: Unable to connect to the Kafka cluster. + # security: + # - Bearer: [] + operationId: createTopic + summary: Creates a new topic + description: Creates a new topic for Kafka. + '/topics/{topicName}': + get: + parameters: + - name: topicName + description: The topic name to retrieve. + schema: + type: string + in: path + required: true + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/Topic' + description: Kakfa topic details. + '401': + content: + application/json: {} + description: 'Unauthorized, unable to retrieve topics.' + '404': + content: + application/json: {} + description: Topic not found. + '500': + content: + application/json: {} + description: Internal server error. + '503': + content: + application/json: {} + description: Unable to connect to the Kafka cluster. + # security: + # - Bearer: [] + operationId: getTopic + summary: Retrieves the topic with the specified name. + description: Topic + delete: + parameters: + - name: topicName + description: The topic name to delete. + schema: + type: string + in: path + required: true + responses: + '200': + description: Topic deleted successfully. + '401': + description: 'Unathorized, unable to delete topic.' + '404': + description: Topic not found. + '500': + description: Internal server error. + '503': + description: Unable to connect to the Kafka cluster. + # security: + # - Bearer: [] + operationId: deleteTopic + summary: Deletes a topic + description: Deletes the topic with the specified name. + patch: + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/UpdateTopicInput' + required: true + parameters: + - name: topicName + description: The topic name which is its unique id. + schema: + type: string + in: path + required: true + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/Topic' + description: Topic updated successfully. + '400': + description: Unable to update topic. + '401': + description: 'Unauthroized, unable to update topic.' + '404': + description: Topic not found. + '500': + description: Internal server error. + '503': + description: Unable to connect to the Kafka cluster. + # security: + # - Bearer: [] + operationId: updateTopic + summary: Updates the topic with the specified name. + description: updates the topic with the new data. + parameters: + - name: topicName + description: The topic name which is its unique id. + schema: + type: string + in: path + required: true + '/consumer-groups/{consumerGroupId}': + get: + parameters: + - name: consumerGroupId + description: The unique ID of the consumer group + schema: + type: string + in: path + required: true + - examples: + Consumer group: + value: + groupId: consumer_group_1 + consumers: + - groupId: consumer_group_1 + topic: topic-1 + partition: 0 + memberId: consumer_group_member1 + offset: 5 + lag: 0 + logEndOffset: 5 + - groupId: consumer_group_1 + topic: topic-1 + partition: 1 + memberId: consumer_group_member2 + offset: 3 + lag: 0 + logEndOffset: 3 + - groupId: consumer_group_1 + topic: topic-1 + partition: 2 + memberId: consumer_group_member3 + offset: 6 + lag: 1 + logEndOffset: 5 + name: topic + description: Filter consumer groups for a specific topic + schema: + type: string + in: query + required: false + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/ConsumerGroup' + description: Consumer group details. + '401': + content: + application/json: {} + description: >- + Unauthorized, request has not been applied because it lacks valid authentication + credentials. + '403': + content: + application/json: {} + description: User is forbidden this view this consumer group. + '404': + content: + application/json: {} + description: Consumer group not found. + '500': + content: + application/json: {} + description: Internal server error. + '503': + content: + application/json: {} + description: Unable to connect to the Kafka cluster. + # security: + # - Bearer: [] + operationId: getConsumerGroupById + summary: Get a single consumer group by its unique ID. + delete: + parameters: + - name: consumerGroupId + description: The unique ID of the cobsumer group. + schema: + type: string + in: path + required: true + responses: + '204': + description: The consumer group was deleted successfully. + '401': + content: + application/json: {} + description: >- + Unauthorized, request has not been applied because it lacks valid authentication + credentials. + '403': + content: + application/json: {} + description: Forbidden to delete this consumer group. + '404': + content: + application/json: {} + description: The consumer group does not exist. + '423': + content: + application/json: {} + description: User cannot delete consumer group with active members. + '500': + content: + application/json: {} + description: Internal Server Error. + '503': + content: + application/json: {} + description: Unable to connect to the Kafka cluster. + # security: + # - Bearer: [] + operationId: deleteConsumerGroupById + summary: Delete a consumer group. + description: 'Delete a consumer group, along with its consumers.' + parameters: + - name: consumerGroupId + description: The unique name of the topic. + schema: + type: string + in: path + required: true + /consumer-groups: + summary: API endpoints for consumer groups under a Kafka topic + get: + parameters: + - name: limit + description: Maximum number of consumer groups to returnd + schema: + type: integer + in: query + - name: offset + description: The page offset when returning the list of consumer groups + schema: + type: integer + in: query + - name: topic + description: Filter to apply when returning the list of consumer groups + schema: + type: string + in: query + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/ConsumerGroupList' + examples: + List of consumer groups: + value: + count: 1 + limit: 10 + offset: 0 + items: + - groupId: consumer_group_1 + consumers: + - groupId: consumer_group_1 + topic: topic-1 + partition: 0 + memberId: consumer_group_member1 + offset: 5 + lag: 0 + logEndOffset: 5 + - groupId: consumer_group_1 + topic: topic-1 + partition: 1 + memberId: consumer_group_member2 + offset: 3 + lag: 0 + logEndOffset: 3 + - groupId: consumer_group_1 + topic: topic-1 + partition: 2 + memberId: consumer_group_member3 + offset: 6 + lag: 1 + logEndOffset: 5 + description: List of consumer groups matching the request parameters. + '400': + content: + application/json: {} + description: >- + The server cannot or will not process the request due to something that is perceived + to be a client error such as malformed request syntax. + '401': + content: + application/json: {} + description: >- + Unauthorized, request has not been applied because it lacks valid authentication + credentials. + '403': + content: + application/json: {} + description: User is forbidden to retrieve the list of consumer groups. + '500': + content: + application/json: {} + description: An internal server error occurred. + '503': + content: + application/json: {} + description: Unable to connect to the Kafka cluster. + # security: + # - Bearer: [] + operationId: getConsumerGroupList + summary: List of consumer groups in the Kafka instance. + description: Returns a list of all consumer groups for a particular Kafka instance. + /: {} +components: + schemas: + Topic: + title: Root Type for NewTopicInput + description: Kafka Topic (A feed where records are stored and published) + type: object + properties: + name: + description: The name of the topic. + type: string + config: + description: Topic configuration entry. + type: array + items: + $ref: '#/components/schemas/ConfigEntry' + partitions: + description: Partitions for this topic. + type: array + items: + $ref: '#/components/schemas/Partition' + example: + name: my-topic + config: + - key: min.insync.replicas + value: '1' + - key: max.message.bytes + value: '1050000' + partitions: + - id: 0 + replicas: + - id: 0 + - id: 1 + isr: + - id: 0 + - id: 1 + leader: + id: 0 + - id: 1 + replicas: + - id: 0 + - id: 1 + isr: + - id: 0 + - id: 1 + leader: + id: 1 + Partition: + description: Kafka topic partition + required: + - id + type: object + properties: + id: + description: Uniquie id for the partition + type: integer + replicas: + description: List of replicas for the partition + type: array + items: + $ref: '#/components/schemas/Node' + isr: + description: List isync-replicas for this partition. + type: array + items: + $ref: '#/components/schemas/Node' + leader: + $ref: '#/components/schemas/Node' + description: Node that is the leader for this partition. + example: + id: 0 + replicas: + - id: 0 + - id: 1 + isr: + - id: 0 + - id: 1 + leader: + id: 1 + ConfigEntry: + description: Key value pair indicating possible configuration options for a topic. + type: object + properties: + key: + description: The key indicating what configuration entry you would like to set for the topic. + type: string + value: + description: Value to indicate the setting on the topic configuration entry. + type: string + example: + key: min.insync.replicas + value: '1' + TopicsList: + description: A list of topics. + required: + - items + - offset + - limit + - count + type: object + properties: + offset: + description: The page offset + type: integer + limit: + description: number of entries per page + type: integer + count: + description: Total number of topics + type: integer + items: + description: List of topics + type: array + items: + $ref: '#/components/schemas/Topic' + example: + items: + - name: my-topic + config: + - key: min.insync.replicas + value: '1' + - key: max.message.bytes + value: '1050000' + partitions: + - id: 0 + replicas: + - id: 0 + - id: 1 + isr: + - id: 0 + - id: 1 + leader: + id: 0 + - id: 1 + replicas: + - id: 0 + - id: 1 + isr: + - id: 0 + - id: 1 + leader: + id: 1 + offset: 25 + limit: 90 + count: 94 + TopicSettings: + title: Root Type for NewTopicInput + description: Kafka Topic (A feed where records are stored and published) + required: + - numPartitions + type: object + properties: + numPartitions: + description: Number of partitions for this topic. + type: integer + config: + description: Topic configuration entry. + type: array + items: + $ref: '#/components/schemas/ConfigEntry' + example: + numPartitions: 2 + config: + - key: min.insync.replicas + value: '1' + - key: max.message.bytes + value: '1050000' + Node: + description: Kafka server / broker. + type: object + NewTopicInput: + description: Input object to create a new topic. + required: + - name + - settings + type: object + properties: + name: + description: 'The topic name, this value must be unique.' + type: string + settings: + $ref: '#/components/schemas/TopicSettings' + description: >- + The settings that are applicable to this topic. This includes partitions, + configuration information, and number of replicas. + example: + name: my-topic + settings: + numPartitions: 3 + config: + - key: min.insync.replicas + value: '1' + - key: max.message.bytes + value: '1050000' + ConsumerGroup: + description: A group of Kafka consumers + required: + - groupId + - consumers + type: object + properties: + groupId: + description: Unique identifier for the consumer group + type: string + consumers: + description: The list of consumers associated with this consumer group + type: array + items: + $ref: '#/components/schemas/Consumer' + example: + id: consumer_group_1 + consumers: + - groupId: consumer_group_1 + topic: topic-1 + partition: 0 + memberId: consumer_group_member1 + offset: 5 + lag: 0 + logEndOffset: 5 + - groupId: consumer_group_1 + topic: topic-1 + partition: 1 + memberId: consumer_group_member2 + offset: 3 + lag: 0 + logEndOffset: 3 + - groupId: consumer_group_1 + topic: topic-1 + partition: 2 + memberId: consumer_group_member3 + offset: 6 + lag: 1 + logEndOffset: 5 + Consumer: + description: >- + A Kafka consumer is responsible for reading records from one or more topics and one or more + partitions of a topic. + required: + - groupId + - topic + - partition + - offset + - lag + type: object + properties: + groupId: + description: Unique identifier for the consumer group to which this consumer belongs. + type: string + topic: + description: The unique topic name to which this consumer belongs + type: string + partition: + description: The partition number to which this consumer group is assigned to. + type: integer + offset: + description: Offset denotes the position of the consumer in a partition. + type: number + logEndOffset: + description: The log end offset is the offset of the last message written to a log. + type: number + lag: + description: >- + Offset Lag is the delta between the last produced message and the last consumer's + committed offset. + type: integer + memberId: + description: >- + The member ID is a unique identifier given to a consumer by the coordinator upon + initially joining the group. + type: string + example: + groupId: consumer_group_1 + topic: topic-1 + partition: 0 + memberId: consumer_group_1-0 + offset: 5 + lag: 0 + logEndOffset: 5 + ConsumerGroupList: + description: A list of consumer groups + required: + - items + - count + - limit + - offset + type: object + properties: + items: + description: Consumer group list items + type: array + items: + $ref: '#/components/schemas/ConsumerGroup' + count: + description: The total number of consumer groups. + type: number + limit: + description: The number of consumer groups per page. + type: number + offset: + description: The page offset + type: integer + example: + count: 1 + limit: 10 + offset: 0 + items: + - groupId: consumer_group_1 + consumers: + - groupId: consumer_group_1 + topic: topic-1 + partition: 0 + memberId: consumer_group_member1 + offset: 5 + lag: 0 + logEndOffset: 5 + - groupId: consumer_group_1 + topic: topic-1 + partition: 1 + memberId: consumer_group_member2 + offset: 3 + lag: 0 + logEndOffset: 3 + - groupId: consumer_group_1 + topic: topic-1 + partition: 2 + memberId: consumer_group_member3 + offset: 6 + lag: 1 + logEndOffset: 5 + UpdateTopicInput: + title: Root Type for UpdateTopicInput + description: Kafka Topic (A feed where records are stored and published) + type: object + properties: + config: + description: Topic configuration entry. + type: array + items: + $ref: '#/components/schemas/ConfigEntry' + example: + config: + - + key: min.insync.replicas + value: '1' + - + key: max.message.bytes + value: '1050000' + securitySchemes: + Bearer: + flows: {} + type: oauth2 + description: Access token used with OAuth 2.0 \ No newline at end of file diff --git a/go.mod b/go.mod index f0ff4942..827cb443 100644 --- a/go.mod +++ b/go.mod @@ -1,5 +1,3 @@ module github.com/redhat-developer/app-services-sdk-go go 1.13 - -require golang.org/x/oauth2 v0.0.0-20210514164344-f6687ab2804c diff --git a/go.sum b/go.sum index ab0770af..e69de29b 100644 --- a/go.sum +++ b/go.sum @@ -1,362 +0,0 @@ -cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= -cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= -cloud.google.com/go v0.38.0/go.mod h1:990N+gfupTy94rShfmMCWGDn0LpTmnzTp2qbd1dvSRU= -cloud.google.com/go v0.44.1/go.mod h1:iSa0KzasP4Uvy3f1mN/7PiObzGgflwredwwASm/v6AU= -cloud.google.com/go v0.44.2/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY= -cloud.google.com/go v0.45.1/go.mod h1:RpBamKRgapWJb87xiFSdk4g1CME7QZg3uwTez+TSTjc= -cloud.google.com/go v0.46.3/go.mod h1:a6bKKbmY7er1mI7TEI4lsAkts/mkhTSZK8w33B4RAg0= -cloud.google.com/go v0.50.0/go.mod h1:r9sluTvynVuxRIOHXQEHMFffphuXHOMZMycpNR5e6To= -cloud.google.com/go v0.52.0/go.mod h1:pXajvRH/6o3+F9jDHZWQ5PbGhn+o8w9qiu/CffaVdO4= -cloud.google.com/go v0.53.0/go.mod h1:fp/UouUEsRkN6ryDKNW/Upv/JBKnv6WDthjR6+vze6M= -cloud.google.com/go v0.54.0/go.mod h1:1rq2OEkV3YMf6n/9ZvGWI3GWw0VoqH/1x2nd8Is/bPc= -cloud.google.com/go v0.56.0/go.mod h1:jr7tqZxxKOVYizybht9+26Z/gUq7tiRzu+ACVAMbKVk= -cloud.google.com/go v0.57.0/go.mod h1:oXiQ6Rzq3RAkkY7N6t3TcE6jE+CIBBbA36lwQ1JyzZs= -cloud.google.com/go v0.62.0/go.mod h1:jmCYTdRCQuc1PHIIJ/maLInMho30T/Y0M4hTdTShOYc= -cloud.google.com/go v0.65.0/go.mod h1:O5N8zS7uWy9vkA9vayVHs65eM1ubvY4h553ofrNHObY= -cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o= -cloud.google.com/go/bigquery v1.3.0/go.mod h1:PjpwJnslEMmckchkHFfq+HTD2DmtT67aNFKH1/VBDHE= -cloud.google.com/go/bigquery v1.4.0/go.mod h1:S8dzgnTigyfTmLBfrtrhyYhwRxG72rYxvftPBK2Dvzc= -cloud.google.com/go/bigquery v1.5.0/go.mod h1:snEHRnqQbz117VIFhE8bmtwIDY80NLUZUMb4Nv6dBIg= -cloud.google.com/go/bigquery v1.7.0/go.mod h1://okPTzCYNXSlb24MZs83e2Do+h+VXtc4gLoIoXIAPc= -cloud.google.com/go/bigquery v1.8.0/go.mod h1:J5hqkt3O0uAFnINi6JXValWIb1v0goeZM77hZzJN/fQ= -cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE= -cloud.google.com/go/datastore v1.1.0/go.mod h1:umbIZjpQpHh4hmRpGhH4tLFup+FVzqBi1b3c64qFpCk= -cloud.google.com/go/pubsub v1.0.1/go.mod h1:R0Gpsv3s54REJCy4fxDixWD93lHJMoZTyQ2kNxGRt3I= -cloud.google.com/go/pubsub v1.1.0/go.mod h1:EwwdRX2sKPjnvnqCa270oGRyludottCI76h+R3AArQw= -cloud.google.com/go/pubsub v1.2.0/go.mod h1:jhfEVHT8odbXTkndysNHCcx0awwzvfOlguIAii9o8iA= -cloud.google.com/go/pubsub v1.3.1/go.mod h1:i+ucay31+CNRpDW4Lu78I4xXG+O1r/MAHgjpRVR+TSU= -cloud.google.com/go/storage v1.0.0/go.mod h1:IhtSnM/ZTZV8YYJWCY8RULGVqBDmpoyjwiyrjsg+URw= -cloud.google.com/go/storage v1.5.0/go.mod h1:tpKbwo567HUNpVclU5sGELwQWBDZ8gh0ZeosJ0Rtdos= -cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohlUTyfDhBk= -cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RXyy7KQOVs= -cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0= -dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= -github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= -github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= -github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= -github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= -github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= -github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= -github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= -github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= -github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= -github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= -github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= -github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= -github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= -github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= -github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= -github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= -github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= -github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= -github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= -github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= -github.com/golang/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= -github.com/golang/mock v1.3.1/go.mod h1:sBzyDLLjw3U8JLTeZvSv8jJB+tU5PVekmnlKIyFUx0Y= -github.com/golang/mock v1.4.0/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= -github.com/golang/mock v1.4.1/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= -github.com/golang/mock v1.4.3/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= -github.com/golang/mock v1.4.4/go.mod h1:l3mdAwkq5BuhzHwde/uurv3sEJeZMXNpwsxVWU71h+4= -github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/golang/protobuf v1.3.3/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= -github.com/golang/protobuf v1.3.4/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= -github.com/golang/protobuf v1.3.5/go.mod h1:6O5/vntMXwX2lRkT1hjjk0nAC1IDOTvTlVgjlRvqsdk= -github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8= -github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA= -github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs= -github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w= -github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0= -github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QDs8UjoX8= -github.com/golang/protobuf v1.4.2 h1:+Z5KGCizgyZCbGh1KZqA0fcLLkwbsjIzS4aV2v7wJX0= -github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= -github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= -github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= -github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= -github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= -github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= -github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.4.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.1 h1:JFrFEBb2xKufg6XkJsJr+WbKb4FQlURi5RUcBveYu9k= -github.com/google/go-cmp v0.5.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= -github.com/google/martian/v3 v3.0.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= -github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= -github.com/google/pprof v0.0.0-20190515194954-54271f7e092f/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= -github.com/google/pprof v0.0.0-20191218002539-d4f498aebedc/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/pprof v0.0.0-20200212024743-f11f1df84d12/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/pprof v0.0.0-20200229191704-1ebb73c60ed3/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/pprof v0.0.0-20200430221834-fc25d7d30c6d/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/pprof v0.0.0-20200708004538-1a94d8640e99/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= -github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= -github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= -github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= -github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= -github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= -github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= -github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk= -github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= -github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= -github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= -github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= -github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= -github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= -github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= -github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= -go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= -go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= -go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= -go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= -golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= -golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= -golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= -golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= -golang.org/x/exp v0.0.0-20190829153037-c13cbed26979/go.mod h1:86+5VVa7VpoJ4kLfm080zCjGlMRFzhUhsZKEZO7MGek= -golang.org/x/exp v0.0.0-20191030013958-a1ab85dbe136/go.mod h1:JXzH8nQsPlswgeRAPE3MuO9GYsAcnJvJ4vnMwN/5qkY= -golang.org/x/exp v0.0.0-20191129062945-2f5052295587/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= -golang.org/x/exp v0.0.0-20191227195350-da58074b4299/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= -golang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= -golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EHIKF9dgMWnmCNThgcyBT1FY9mM= -golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU= -golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= -golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= -golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= -golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= -golang.org/x/lint v0.0.0-20190301231843-5614ed5bae6f/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= -golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= -golang.org/x/lint v0.0.0-20190409202823-959b441ac422/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= -golang.org/x/lint v0.0.0-20190909230951-414d861bb4ac/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= -golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= -golang.org/x/lint v0.0.0-20191125180803-fdd1cda4f05f/go.mod h1:5qLYkcX4OjUUV8bRuDixDT3tpyyb+LUpUlRWLxfhWrs= -golang.org/x/lint v0.0.0-20200130185559-910be7a94367/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= -golang.org/x/lint v0.0.0-20200302205851-738671d3881b/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= -golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE= -golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028/go.mod h1:E/iHnbuqvinMTCcRqshq8CkpyQDoeVncDDYHnLhea+o= -golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc= -golang.org/x/mod v0.1.0/go.mod h1:0QHyrYULN0/3qlju5TqG8bIK38QM8yzMo5ekMj3DlcY= -golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= -golang.org/x/mod v0.1.1-0.20191107180719-034126e5016b/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= -golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190501004415-9ce7a6920f09/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190503192946-f4e77d36d62c/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= -golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20190628185345-da137c7871d7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20190724013045-ca1201d0de80/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20191209160850-c0dbc17a3553/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200114155413-6afb5195e5aa/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200202094626-16171245cfb2/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200222125558-5a598a2470a0/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200301022130-244492dfa37a/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200324143707-d3edc9973b7e/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200501053045-e0ff5e5a1de5/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200506145744-7e3656a0809f/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200513185701-a91f0712d120/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200520182314-0ba52f642ac2/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200625001655-4c5254603344/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= -golang.org/x/net v0.0.0-20200707034311-ab3426394381/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= -golang.org/x/net v0.0.0-20200822124328-c89045814202 h1:VvcQYSHwXgi7W+TpUR6A9g6Up98WAHf3f/ulnJ62IyA= -golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= -golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= -golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= -golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= -golang.org/x/oauth2 v0.0.0-20191202225959-858c2ad4c8b6/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= -golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= -golang.org/x/oauth2 v0.0.0-20210514164344-f6687ab2804c h1:pkQiBZBvdos9qq4wBAHqlzuZHEXo07pqV06ef90u1WI= -golang.org/x/oauth2 v0.0.0-20210514164344-f6687ab2804c/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190502145724-3ef323f4f1fd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190606165138-5da285871e9c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190726091711-fc99dfbffb4e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191001151750-bb3f8db39f24/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191228213918-04cbcbbfeed8/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200113162924-86b910548bc1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200122134326-e047566fdf82/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200202164722-d101bd2416d5/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200212091648-12a6c2dcc1e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200302150141-5c8b2ff67527/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200331124033-c3d80250170d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200501052902-10377860bb8e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200511232937-7e40ca221e25/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200515095857-1151b9dac4a9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200523222454-059865788121/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200803210538-64077c9b5642/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= -golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= -golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= -golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= -golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= -golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190312151545-0bb0c0a6e846/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190312170243-e65039ee4138/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190425150028-36563e24a262/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= -golang.org/x/tools v0.0.0-20190506145303-2d16b83fe98c/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= -golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= -golang.org/x/tools v0.0.0-20190606124116-d0a3d012864b/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= -golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= -golang.org/x/tools v0.0.0-20190628153133-6cdbf07be9d0/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= -golang.org/x/tools v0.0.0-20190816200558-6889da9d5479/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20190911174233-4f2ddba30aff/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191012152004-8de300cfc20a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191113191852-77e3bb0ad9e7/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191115202509-3a792d9c32b2/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191125144606-a911d9008d1f/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191130070609-6e064ea0cf2d/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191216173652-a0e659d51361/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20191227053925-7b8e75db28f4/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200117161641-43d50277825c/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200122220014-bf1340f18c4a/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200130002326-2f3ba24bd6e7/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200204074204-1cc6d1ef6c74/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200207183749-b753a1ba74fa/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200212150539-ea181f53ac56/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200224181240-023911ca70b2/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200227222343-706bc42d1f0d/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200304193943-95d2e580d8eb/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= -golang.org/x/tools v0.0.0-20200312045724-11d5b4c81c7d/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= -golang.org/x/tools v0.0.0-20200331025713-a30bf2db82d4/go.mod h1:Sl4aGygMT6LrqrWclx+PTx3U+LnKx/seiNR+3G19Ar8= -golang.org/x/tools v0.0.0-20200501065659-ab2804fb9c9d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200512131952-2bc93b1c0c88/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200515010526-7d3b6ebf133d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200618134242-20370b0cb4b2/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200729194436-6467de6f59a7/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= -golang.org/x/tools v0.0.0-20200804011535-6c149bb5ef0d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= -golang.org/x/tools v0.0.0-20200825202427-b303f430e36d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= -golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 h1:go1bK/D/BFZV2I8cIQd1NKEZ+0owSTG1fDTci4IqFcE= -golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE= -google.golang.org/api v0.7.0/go.mod h1:WtwebWUNSVBH/HAw79HIFXZNqEvBhG+Ra+ax0hx3E3M= -google.golang.org/api v0.8.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= -google.golang.org/api v0.9.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= -google.golang.org/api v0.13.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= -google.golang.org/api v0.14.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= -google.golang.org/api v0.15.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= -google.golang.org/api v0.17.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= -google.golang.org/api v0.18.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= -google.golang.org/api v0.19.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= -google.golang.org/api v0.20.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= -google.golang.org/api v0.22.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= -google.golang.org/api v0.24.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= -google.golang.org/api v0.28.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= -google.golang.org/api v0.29.0/go.mod h1:Lcubydp8VUV7KeIHD9z2Bys/sm/vGKnG1UHuDBSrHWM= -google.golang.org/api v0.30.0/go.mod h1:QGmEvQ87FHZNiUVJkT14jQNYJ4ZJjdRF23ZXz5138Fc= -google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= -google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= -google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= -google.golang.org/appengine v1.6.1/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww/cMBSeb0= -google.golang.org/appengine v1.6.5/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= -google.golang.org/appengine v1.6.6 h1:lMO5rYAqUxkmaj76jAkRUvt5JZgFymx/+Q5Mzfivuhc= -google.golang.org/appengine v1.6.6/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= -google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= -google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= -google.golang.org/genproto v0.0.0-20190418145605-e7d98fc518a7/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= -google.golang.org/genproto v0.0.0-20190425155659-357c62f0e4bb/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= -google.golang.org/genproto v0.0.0-20190502173448-54afdca5d873/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= -google.golang.org/genproto v0.0.0-20190801165951-fa694d86fc64/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= -google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= -google.golang.org/genproto v0.0.0-20190911173649-1774047e7e51/go.mod h1:IbNlFCBrqXvoKpeg0TB2l7cyZUmoaFKYIwrEpbDKLA8= -google.golang.org/genproto v0.0.0-20191108220845-16a3f7862a1a/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20191115194625-c23dd37a84c9/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20191216164720-4f79533eabd1/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20191230161307-f3c370f40bfb/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20200115191322-ca5a22157cba/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20200122232147-0452cf42e150/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20200204135345-fa8e72b47b90/go.mod h1:GmwEX6Z4W5gMy59cAlVYjN9JhxgbQH6Gn+gFDQe2lzA= -google.golang.org/genproto v0.0.0-20200212174721-66ed5ce911ce/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200224152610-e50cd9704f63/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200228133532-8c2c7df3a383/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200305110556-506484158171/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200312145019-da6875a35672/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200331122359-1ee6d9798940/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200430143042-b979b6f78d84/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200511104702-f5ebc3bea380/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200515170657-fc4c6c6a6587/go.mod h1:YsZOwe1myG/8QRHRsmBRE1LrgQY60beZKjly0O1fX9U= -google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= -google.golang.org/genproto v0.0.0-20200618031413-b414f8b61790/go.mod h1:jDfRM7FcilCzHH/e9qn6dsT145K34l5v+OpcnNgKAAA= -google.golang.org/genproto v0.0.0-20200729003335-053ba62fc06f/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20200804131852-c06518451d9c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20200825200019-8632dd797987/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= -google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= -google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= -google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= -google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= -google.golang.org/grpc v1.26.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= -google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= -google.golang.org/grpc v1.27.1/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= -google.golang.org/grpc v1.28.0/go.mod h1:rpkK4SK4GF4Ach/+MFLZUBavHOvF2JJB5uozKKal+60= -google.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3IjizoKk= -google.golang.org/grpc v1.30.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= -google.golang.org/grpc v1.31.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= -google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= -google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= -google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= -google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miEFZTKqfCUM6K7xSMQL9OKL/b6hQv+e19PK+JZNE= -google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo= -google.golang.org/protobuf v1.22.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= -google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= -google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= -google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGjtUeSXeh4= -google.golang.org/protobuf v1.25.0 h1:Ejskq+SyPohKW+1uil0JJMtmHCgJPJ/qWTxr8qp+R4c= -google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= -gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= -gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= -honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= -honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= -honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= -honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= -honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= -honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= -rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= -rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= -rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= diff --git a/kafkaadmin/apiv1internal/.gitignore b/kafkaadmin/apiv1internal/.gitignore new file mode 100644 index 00000000..daf913b1 --- /dev/null +++ b/kafkaadmin/apiv1internal/.gitignore @@ -0,0 +1,24 @@ +# Compiled Object files, Static and Dynamic libs (Shared Objects) +*.o +*.a +*.so + +# Folders +_obj +_test + +# Architecture specific extensions/prefixes +*.[568vq] +[568vq].out + +*.cgo1.go +*.cgo2.c +_cgo_defun.c +_cgo_gotypes.go +_cgo_export.* + +_testmain.go + +*.exe +*.test +*.prof diff --git a/kafkaadmin/apiv1internal/.openapi-generator/FILES b/kafkaadmin/apiv1internal/.openapi-generator/FILES new file mode 100644 index 00000000..21d82511 --- /dev/null +++ b/kafkaadmin/apiv1internal/.openapi-generator/FILES @@ -0,0 +1,29 @@ +.gitignore +README.md +api/openapi.yaml +api_default.go +client.go +configuration.go +docs/ConfigEntry.md +docs/Consumer.md +docs/ConsumerGroup.md +docs/ConsumerGroupList.md +docs/DefaultApi.md +docs/NewTopicInput.md +docs/Partition.md +docs/Topic.md +docs/TopicSettings.md +docs/TopicsList.md +docs/UpdateTopicInput.md +model_config_entry.go +model_consumer.go +model_consumer_group.go +model_consumer_group_list.go +model_new_topic_input.go +model_partition.go +model_topic.go +model_topic_settings.go +model_topics_list.go +model_update_topic_input.go +response.go +utils.go diff --git a/kafkaadmin/apiv1internal/.openapi-generator/VERSION b/kafkaadmin/apiv1internal/.openapi-generator/VERSION new file mode 100644 index 00000000..3bff0591 --- /dev/null +++ b/kafkaadmin/apiv1internal/.openapi-generator/VERSION @@ -0,0 +1 @@ +5.1.1 \ No newline at end of file diff --git a/kafkaadmin/apiv1internal/README.md b/kafkaadmin/apiv1internal/README.md new file mode 100644 index 00000000..3574c863 --- /dev/null +++ b/kafkaadmin/apiv1internal/README.md @@ -0,0 +1,129 @@ +# Go API client for kafkaadmin + +An API to provide REST endpoints for query Kafka for admin operations + +## Overview +This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project. By using the [OpenAPI-spec](https://www.openapis.org/) from a remote server, you can easily generate an API client. + +- API version: 0.1.0 +- Package version: 1.0.0 +- Build package: org.openapitools.codegen.languages.GoClientCodegen + +## Installation + +Install the following dependencies: + +```shell +go get github.com/stretchr/testify/assert +go get golang.org/x/oauth2 +go get golang.org/x/net/context +``` + +Put the package under your project folder and add the following in import: + +```golang +import sw "./kafkaadmin" +``` + +To use a proxy, set the environment variable `HTTP_PROXY`: + +```golang +os.Setenv("HTTP_PROXY", "http://proxy_name:proxy_port") +``` + +## Configuration of Server URL + +Default configuration comes with `Servers` field that contains server objects as defined in the OpenAPI specification. + +### Select Server Configuration + +For using other server than the one defined on index 0 set context value `sw.ContextServerIndex` of type `int`. + +```golang +ctx := context.WithValue(context.Background(), sw.ContextServerIndex, 1) +``` + +### Templated Server URL + +Templated server URL is formatted using default variables from configuration or from context value `sw.ContextServerVariables` of type `map[string]string`. + +```golang +ctx := context.WithValue(context.Background(), sw.ContextServerVariables, map[string]string{ + "basePath": "v2", +}) +``` + +Note, enum values are always validated and all unused variables are silently ignored. + +### URLs Configuration per Operation + +Each operation can use different server URL defined using `OperationServers` map in the `Configuration`. +An operation is uniquely identifield by `"{classname}Service.{nickname}"` string. +Similar rules for overriding default operation server index and variables applies by using `sw.ContextOperationServerIndices` and `sw.ContextOperationServerVariables` context maps. + +``` +ctx := context.WithValue(context.Background(), sw.ContextOperationServerIndices, map[string]int{ + "{classname}Service.{nickname}": 2, +}) +ctx = context.WithValue(context.Background(), sw.ContextOperationServerVariables, map[string]map[string]string{ + "{classname}Service.{nickname}": { + "port": "8443", + }, +}) +``` + +## Documentation for API Endpoints + +All URIs are relative to *https://api.openshift.com* + +Class | Method | HTTP request | Description +------------ | ------------- | ------------- | ------------- +*DefaultApi* | [**CreateTopic**](docs/DefaultApi.md#createtopic) | **Post** /topics | Creates a new topic +*DefaultApi* | [**DeleteConsumerGroupById**](docs/DefaultApi.md#deleteconsumergroupbyid) | **Delete** /consumer-groups/{consumerGroupId} | Delete a consumer group. +*DefaultApi* | [**DeleteTopic**](docs/DefaultApi.md#deletetopic) | **Delete** /topics/{topicName} | Deletes a topic +*DefaultApi* | [**GetConsumerGroupById**](docs/DefaultApi.md#getconsumergroupbyid) | **Get** /consumer-groups/{consumerGroupId} | Get a single consumer group by its unique ID. +*DefaultApi* | [**GetConsumerGroupList**](docs/DefaultApi.md#getconsumergrouplist) | **Get** /consumer-groups | List of consumer groups in the Kafka instance. +*DefaultApi* | [**GetTopic**](docs/DefaultApi.md#gettopic) | **Get** /topics/{topicName} | Retrieves the topic with the specified name. +*DefaultApi* | [**GetTopicsList**](docs/DefaultApi.md#gettopicslist) | **Get** /topics | List of topics +*DefaultApi* | [**UpdateTopic**](docs/DefaultApi.md#updatetopic) | **Patch** /topics/{topicName} | Updates the topic with the specified name. + + +## Documentation For Models + + - [ConfigEntry](docs/ConfigEntry.md) + - [Consumer](docs/Consumer.md) + - [ConsumerGroup](docs/ConsumerGroup.md) + - [ConsumerGroupList](docs/ConsumerGroupList.md) + - [NewTopicInput](docs/NewTopicInput.md) + - [Partition](docs/Partition.md) + - [Topic](docs/Topic.md) + - [TopicSettings](docs/TopicSettings.md) + - [TopicsList](docs/TopicsList.md) + - [UpdateTopicInput](docs/UpdateTopicInput.md) + + +## Documentation For Authorization + + Endpoints do not require authorization. + + +## Documentation for Utility Methods + +Due to the fact that model structure members are all pointers, this package contains +a number of utility functions to easily obtain pointers to values of basic types. +Each of these functions takes a value of the given basic type and returns a pointer to it: + +* `PtrBool` +* `PtrInt` +* `PtrInt32` +* `PtrInt64` +* `PtrFloat` +* `PtrFloat32` +* `PtrFloat64` +* `PtrString` +* `PtrTime` + +## Author + + + diff --git a/kafkaadmin/apiv1internal/api/openapi.yaml b/kafkaadmin/apiv1internal/api/openapi.yaml new file mode 100644 index 00000000..9bdf47de --- /dev/null +++ b/kafkaadmin/apiv1internal/api/openapi.yaml @@ -0,0 +1,773 @@ +openapi: 3.0.0 +info: + description: An API to provide REST endpoints for query Kafka for admin operations + license: + name: Apache 2.0 + url: https://www.apache.org/licenses/LICENSE-2.0 + title: Kafka Admin REST API + version: 0.1.0 +servers: +- description: Main (production) server + url: https://api.openshift.com +- description: Staging server + url: https://api.stage.openshift.com +- description: localhost + url: http://localhost:8000 +paths: + /topics: + get: + description: Returns a list of all of the available topics, or the list of topics + that meet the users URL Query Parameters. + operationId: getTopicsList + parameters: + - description: Maximum number of topics to return + explode: true + in: query + name: limit + required: false + schema: + format: int32 + type: integer + style: form + - description: Filter to apply when returning the list of topics + explode: true + in: query + name: filter + required: false + schema: + type: string + style: form + - description: The page offset when returning the limit of requested topics. + explode: true + in: query + name: offset + required: false + schema: + format: int32 + type: integer + style: form + - description: Order of the items sorting. If "asc" is set as a value, ascending + order is used, descending otherwise. + explode: true + in: query + name: order + required: false + schema: + type: string + style: form + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/TopicsList' + description: List of topics matching the users query paramters. + "400": + content: + application/json: {} + description: Unable to retreive topics. + "401": + content: + application/json: {} + description: Unauthorized, unable to retrive topics. + "500": + content: + application/json: {} + description: Internal server error. + "503": + content: + application/json: {} + description: Unable to connect to the Kafka cluster. + summary: List of topics + post: + description: Creates a new topic for Kafka. + operationId: createTopic + requestBody: + content: + application/json: + examples: + NewTopicInput: + value: + name: my-topic + settings: + numPartitions: 3 + replicationFactor: 4 + config: + - key: min.insync.replicas + value: "1" + - key: max.message.bytes + value: "1050000" + schema: + $ref: '#/components/schemas/NewTopicInput' + description: Topic to create. + required: true + responses: + "201": + content: + application/json: + schema: + $ref: '#/components/schemas/Topic' + description: Topic created successfully. + "400": + description: Unable to create topic. + "401": + description: Unauthorized, Unable to create topic. + "409": + description: Entry already exisits + "500": + description: Internal server error. + "503": + description: Unable to connect to the Kafka cluster. + summary: Creates a new topic + /topics/{topicName}: + delete: + description: Deletes the topic with the specified name. + operationId: deleteTopic + parameters: + - description: The topic name to delete. + explode: false + in: path + name: topicName + required: true + schema: + type: string + style: simple + responses: + "200": + description: Topic deleted successfully. + "401": + description: Unathorized, unable to delete topic. + "404": + description: Topic not found. + "500": + description: Internal server error. + "503": + description: Unable to connect to the Kafka cluster. + summary: Deletes a topic + get: + description: Topic + operationId: getTopic + parameters: + - description: The topic name to retrieve. + explode: false + in: path + name: topicName + required: true + schema: + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/Topic' + description: Kakfa topic details. + "401": + content: + application/json: {} + description: Unauthorized, unable to retrieve topics. + "404": + content: + application/json: {} + description: Topic not found. + "500": + content: + application/json: {} + description: Internal server error. + "503": + content: + application/json: {} + description: Unable to connect to the Kafka cluster. + summary: Retrieves the topic with the specified name. + patch: + description: updates the topic with the new data. + operationId: updateTopic + parameters: + - description: The topic name which is its unique id. + explode: false + in: path + name: topicName + required: true + schema: + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/UpdateTopicInput' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/Topic' + description: Topic updated successfully. + "400": + description: Unable to update topic. + "401": + description: Unauthroized, unable to update topic. + "404": + description: Topic not found. + "500": + description: Internal server error. + "503": + description: Unable to connect to the Kafka cluster. + summary: Updates the topic with the specified name. + /consumer-groups/{consumerGroupId}: + delete: + description: Delete a consumer group, along with its consumers. + operationId: deleteConsumerGroupById + parameters: + - description: The unique ID of the cobsumer group. + explode: false + in: path + name: consumerGroupId + required: true + schema: + type: string + style: simple + responses: + "204": + description: The consumer group was deleted successfully. + "401": + content: + application/json: {} + description: Unauthorized, request has not been applied because it lacks + valid authentication credentials. + "403": + content: + application/json: {} + description: Forbidden to delete this consumer group. + "404": + content: + application/json: {} + description: The consumer group does not exist. + "423": + content: + application/json: {} + description: User cannot delete consumer group with active members. + "500": + content: + application/json: {} + description: Internal Server Error. + "503": + content: + application/json: {} + description: Unable to connect to the Kafka cluster. + summary: Delete a consumer group. + get: + operationId: getConsumerGroupById + parameters: + - description: The unique ID of the consumer group + explode: false + in: path + name: consumerGroupId + required: true + schema: + type: string + style: simple + - description: Filter consumer groups for a specific topic + examples: + Consumer group: + value: + groupId: consumer_group_1 + consumers: + - groupId: consumer_group_1 + topic: topic-1 + partition: 0 + memberId: consumer_group_member1 + offset: 5 + lag: 0 + logEndOffset: 5 + - groupId: consumer_group_1 + topic: topic-1 + partition: 1 + memberId: consumer_group_member2 + offset: 3 + lag: 0 + logEndOffset: 3 + - groupId: consumer_group_1 + topic: topic-1 + partition: 2 + memberId: consumer_group_member3 + offset: 6 + lag: 1 + logEndOffset: 5 + explode: true + in: query + name: topic + required: false + schema: + type: string + style: form + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/ConsumerGroup' + description: Consumer group details. + "401": + content: + application/json: {} + description: Unauthorized, request has not been applied because it lacks + valid authentication credentials. + "403": + content: + application/json: {} + description: User is forbidden this view this consumer group. + "404": + content: + application/json: {} + description: Consumer group not found. + "500": + content: + application/json: {} + description: Internal server error. + "503": + content: + application/json: {} + description: Unable to connect to the Kafka cluster. + summary: Get a single consumer group by its unique ID. + /consumer-groups: + get: + description: Returns a list of all consumer groups for a particular Kafka instance. + operationId: getConsumerGroupList + parameters: + - description: Maximum number of consumer groups to returnd + explode: true + in: query + name: limit + required: false + schema: + type: integer + style: form + - description: The page offset when returning the list of consumer groups + explode: true + in: query + name: offset + required: false + schema: + type: integer + style: form + - description: Filter to apply when returning the list of consumer groups + explode: true + in: query + name: topic + required: false + schema: + type: string + style: form + responses: + "200": + content: + application/json: + examples: + List of consumer groups: + value: + count: 1 + limit: 10 + offset: 0 + items: + - groupId: consumer_group_1 + consumers: + - groupId: consumer_group_1 + topic: topic-1 + partition: 0 + memberId: consumer_group_member1 + offset: 5 + lag: 0 + logEndOffset: 5 + - groupId: consumer_group_1 + topic: topic-1 + partition: 1 + memberId: consumer_group_member2 + offset: 3 + lag: 0 + logEndOffset: 3 + - groupId: consumer_group_1 + topic: topic-1 + partition: 2 + memberId: consumer_group_member3 + offset: 6 + lag: 1 + logEndOffset: 5 + schema: + $ref: '#/components/schemas/ConsumerGroupList' + description: List of consumer groups matching the request parameters. + "400": + content: + application/json: {} + description: The server cannot or will not process the request due to something + that is perceived to be a client error such as malformed request syntax. + "401": + content: + application/json: {} + description: Unauthorized, request has not been applied because it lacks + valid authentication credentials. + "403": + content: + application/json: {} + description: User is forbidden to retrieve the list of consumer groups. + "500": + content: + application/json: {} + description: An internal server error occurred. + "503": + content: + application/json: {} + description: Unable to connect to the Kafka cluster. + summary: List of consumer groups in the Kafka instance. + summary: API endpoints for consumer groups under a Kafka topic + /: {} +components: + schemas: + Topic: + description: Kafka Topic (A feed where records are stored and published) + example: + name: my-topic + config: + - key: min.insync.replicas + value: "1" + - key: max.message.bytes + value: "1050000" + partitions: + - id: 0 + replicas: + - id: 0 + - id: 1 + isr: + - id: 0 + - id: 1 + leader: + id: 0 + - id: 1 + replicas: + - id: 0 + - id: 1 + isr: + - id: 0 + - id: 1 + leader: + id: 1 + properties: + name: + description: The name of the topic. + type: string + config: + description: Topic configuration entry. + items: + $ref: '#/components/schemas/ConfigEntry' + type: array + partitions: + description: Partitions for this topic. + items: + $ref: '#/components/schemas/Partition' + type: array + title: Root Type for NewTopicInput + type: object + Partition: + description: Kafka topic partition + example: + id: 0 + replicas: + - id: 0 + - id: 1 + isr: + - id: 0 + - id: 1 + leader: + id: 1 + properties: + id: + description: Uniquie id for the partition + type: integer + replicas: + description: List of replicas for the partition + items: + $ref: '#/components/schemas/Node' + type: array + isr: + description: List isync-replicas for this partition. + items: + $ref: '#/components/schemas/Node' + type: array + leader: + description: Kafka server / broker. + type: object + required: + - id + type: object + ConfigEntry: + description: Key value pair indicating possible configuration options for a + topic. + example: + key: min.insync.replicas + value: "1" + properties: + key: + description: The key indicating what configuration entry you would like + to set for the topic. + type: string + value: + description: Value to indicate the setting on the topic configuration entry. + type: string + type: object + TopicsList: + description: A list of topics. + example: + items: + - name: my-topic + config: + - key: min.insync.replicas + value: "1" + - key: max.message.bytes + value: "1050000" + partitions: + - id: 0 + replicas: + - id: 0 + - id: 1 + isr: + - id: 0 + - id: 1 + leader: + id: 0 + - id: 1 + replicas: + - id: 0 + - id: 1 + isr: + - id: 0 + - id: 1 + leader: + id: 1 + offset: 25 + limit: 90 + count: 94 + properties: + offset: + description: The page offset + type: integer + limit: + description: number of entries per page + type: integer + count: + description: Total number of topics + type: integer + items: + description: List of topics + items: + $ref: '#/components/schemas/Topic' + type: array + required: + - count + - items + - limit + - offset + type: object + TopicSettings: + description: Kafka Topic (A feed where records are stored and published) + example: + numPartitions: 2 + config: + - key: min.insync.replicas + value: "1" + - key: max.message.bytes + value: "1050000" + properties: + numPartitions: + description: Number of partitions for this topic. + type: integer + config: + description: Topic configuration entry. + items: + $ref: '#/components/schemas/ConfigEntry' + type: array + required: + - numPartitions + title: Root Type for NewTopicInput + type: object + Node: + description: Kafka server / broker. + type: object + NewTopicInput: + description: Input object to create a new topic. + example: + name: my-topic + settings: + numPartitions: 3 + config: + - key: min.insync.replicas + value: "1" + - key: max.message.bytes + value: "1050000" + properties: + name: + description: The topic name, this value must be unique. + type: string + settings: + $ref: '#/components/schemas/TopicSettings' + required: + - name + - settings + type: object + ConsumerGroup: + description: A group of Kafka consumers + example: + id: consumer_group_1 + consumers: + - groupId: consumer_group_1 + topic: topic-1 + partition: 0 + memberId: consumer_group_member1 + offset: 5 + lag: 0 + logEndOffset: 5 + - groupId: consumer_group_1 + topic: topic-1 + partition: 1 + memberId: consumer_group_member2 + offset: 3 + lag: 0 + logEndOffset: 3 + - groupId: consumer_group_1 + topic: topic-1 + partition: 2 + memberId: consumer_group_member3 + offset: 6 + lag: 1 + logEndOffset: 5 + properties: + groupId: + description: Unique identifier for the consumer group + type: string + consumers: + description: The list of consumers associated with this consumer group + items: + $ref: '#/components/schemas/Consumer' + type: array + required: + - consumers + - groupId + type: object + Consumer: + description: A Kafka consumer is responsible for reading records from one or + more topics and one or more partitions of a topic. + example: + groupId: consumer_group_1 + topic: topic-1 + partition: 0 + memberId: consumer_group_1-0 + offset: 5 + lag: 0 + logEndOffset: 5 + properties: + groupId: + description: Unique identifier for the consumer group to which this consumer + belongs. + type: string + topic: + description: The unique topic name to which this consumer belongs + type: string + partition: + description: The partition number to which this consumer group is assigned + to. + type: integer + offset: + description: Offset denotes the position of the consumer in a partition. + type: number + logEndOffset: + description: The log end offset is the offset of the last message written + to a log. + type: number + lag: + description: Offset Lag is the delta between the last produced message and + the last consumer's committed offset. + type: integer + memberId: + description: The member ID is a unique identifier given to a consumer by + the coordinator upon initially joining the group. + type: string + required: + - groupId + - lag + - offset + - partition + - topic + type: object + ConsumerGroupList: + description: A list of consumer groups + example: + count: 1 + limit: 10 + offset: 0 + items: + - groupId: consumer_group_1 + consumers: + - groupId: consumer_group_1 + topic: topic-1 + partition: 0 + memberId: consumer_group_member1 + offset: 5 + lag: 0 + logEndOffset: 5 + - groupId: consumer_group_1 + topic: topic-1 + partition: 1 + memberId: consumer_group_member2 + offset: 3 + lag: 0 + logEndOffset: 3 + - groupId: consumer_group_1 + topic: topic-1 + partition: 2 + memberId: consumer_group_member3 + offset: 6 + lag: 1 + logEndOffset: 5 + properties: + items: + description: Consumer group list items + items: + $ref: '#/components/schemas/ConsumerGroup' + type: array + count: + description: The total number of consumer groups. + type: number + limit: + description: The number of consumer groups per page. + type: number + offset: + description: The page offset + type: integer + required: + - count + - items + - limit + - offset + type: object + UpdateTopicInput: + description: Kafka Topic (A feed where records are stored and published) + example: + config: + - key: min.insync.replicas + value: "1" + - key: max.message.bytes + value: "1050000" + properties: + config: + description: Topic configuration entry. + items: + $ref: '#/components/schemas/ConfigEntry' + type: array + title: Root Type for UpdateTopicInput + type: object + securitySchemes: + Bearer: + description: Access token used with OAuth 2.0 + flows: {} + type: oauth2 diff --git a/kafkaadmin/apiv1internal/api_default.go b/kafkaadmin/apiv1internal/api_default.go new file mode 100644 index 00000000..8caa6d5e --- /dev/null +++ b/kafkaadmin/apiv1internal/api_default.go @@ -0,0 +1,1042 @@ +/* + * Kafka Admin REST API + * + * An API to provide REST endpoints for query Kafka for admin operations + * + * API version: 0.1.0 + */ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package kafkaadmin + +import ( + "bytes" + _context "context" + _ioutil "io/ioutil" + _nethttp "net/http" + _neturl "net/url" + "strings" +) + +// Linger please +var ( + _ _context.Context +) + +type DefaultApi interface { + + /* + * CreateTopic Creates a new topic + * Creates a new topic for Kafka. + * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @return ApiCreateTopicRequest + */ + CreateTopic(ctx _context.Context) ApiCreateTopicRequest + + /* + * CreateTopicExecute executes the request + * @return Topic + */ + CreateTopicExecute(r ApiCreateTopicRequest) (Topic, *_nethttp.Response, error) + + /* + * DeleteConsumerGroupById Delete a consumer group. + * Delete a consumer group, along with its consumers. + * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param consumerGroupId The unique ID of the cobsumer group. + * @return ApiDeleteConsumerGroupByIdRequest + */ + DeleteConsumerGroupById(ctx _context.Context, consumerGroupId string) ApiDeleteConsumerGroupByIdRequest + + /* + * DeleteConsumerGroupByIdExecute executes the request + */ + DeleteConsumerGroupByIdExecute(r ApiDeleteConsumerGroupByIdRequest) (*_nethttp.Response, error) + + /* + * DeleteTopic Deletes a topic + * Deletes the topic with the specified name. + * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param topicName The topic name to delete. + * @return ApiDeleteTopicRequest + */ + DeleteTopic(ctx _context.Context, topicName string) ApiDeleteTopicRequest + + /* + * DeleteTopicExecute executes the request + */ + DeleteTopicExecute(r ApiDeleteTopicRequest) (*_nethttp.Response, error) + + /* + * GetConsumerGroupById Get a single consumer group by its unique ID. + * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param consumerGroupId The unique ID of the consumer group + * @return ApiGetConsumerGroupByIdRequest + */ + GetConsumerGroupById(ctx _context.Context, consumerGroupId string) ApiGetConsumerGroupByIdRequest + + /* + * GetConsumerGroupByIdExecute executes the request + * @return ConsumerGroup + */ + GetConsumerGroupByIdExecute(r ApiGetConsumerGroupByIdRequest) (ConsumerGroup, *_nethttp.Response, error) + + /* + * GetConsumerGroupList List of consumer groups in the Kafka instance. + * Returns a list of all consumer groups for a particular Kafka instance. + * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @return ApiGetConsumerGroupListRequest + */ + GetConsumerGroupList(ctx _context.Context) ApiGetConsumerGroupListRequest + + /* + * GetConsumerGroupListExecute executes the request + * @return ConsumerGroupList + */ + GetConsumerGroupListExecute(r ApiGetConsumerGroupListRequest) (ConsumerGroupList, *_nethttp.Response, error) + + /* + * GetTopic Retrieves the topic with the specified name. + * Topic + * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param topicName The topic name to retrieve. + * @return ApiGetTopicRequest + */ + GetTopic(ctx _context.Context, topicName string) ApiGetTopicRequest + + /* + * GetTopicExecute executes the request + * @return Topic + */ + GetTopicExecute(r ApiGetTopicRequest) (Topic, *_nethttp.Response, error) + + /* + * GetTopicsList List of topics + * Returns a list of all of the available topics, or the list of topics that meet the users URL Query Parameters. + * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @return ApiGetTopicsListRequest + */ + GetTopicsList(ctx _context.Context) ApiGetTopicsListRequest + + /* + * GetTopicsListExecute executes the request + * @return TopicsList + */ + GetTopicsListExecute(r ApiGetTopicsListRequest) (TopicsList, *_nethttp.Response, error) + + /* + * UpdateTopic Updates the topic with the specified name. + * updates the topic with the new data. + * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param topicName The topic name which is its unique id. + * @return ApiUpdateTopicRequest + */ + UpdateTopic(ctx _context.Context, topicName string) ApiUpdateTopicRequest + + /* + * UpdateTopicExecute executes the request + * @return Topic + */ + UpdateTopicExecute(r ApiUpdateTopicRequest) (Topic, *_nethttp.Response, error) +} + +// DefaultApiService DefaultApi service +type DefaultApiService service + +type ApiCreateTopicRequest struct { + ctx _context.Context + ApiService DefaultApi + newTopicInput *NewTopicInput +} + +func (r ApiCreateTopicRequest) NewTopicInput(newTopicInput NewTopicInput) ApiCreateTopicRequest { + r.newTopicInput = &newTopicInput + return r +} + +func (r ApiCreateTopicRequest) Execute() (Topic, *_nethttp.Response, error) { + return r.ApiService.CreateTopicExecute(r) +} + +/* + * CreateTopic Creates a new topic + * Creates a new topic for Kafka. + * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @return ApiCreateTopicRequest + */ +func (a *DefaultApiService) CreateTopic(ctx _context.Context) ApiCreateTopicRequest { + return ApiCreateTopicRequest{ + ApiService: a, + ctx: ctx, + } +} + +/* + * Execute executes the request + * @return Topic + */ +func (a *DefaultApiService) CreateTopicExecute(r ApiCreateTopicRequest) (Topic, *_nethttp.Response, error) { + var ( + localVarHTTPMethod = _nethttp.MethodPost + localVarPostBody interface{} + localVarFormFileName string + localVarFileName string + localVarFileBytes []byte + localVarReturnValue Topic + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.CreateTopic") + if err != nil { + return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/topics" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := _neturl.Values{} + localVarFormParams := _neturl.Values{} + if r.newTopicInput == nil { + return localVarReturnValue, nil, reportError("newTopicInput is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.newTopicInput + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = _ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiDeleteConsumerGroupByIdRequest struct { + ctx _context.Context + ApiService DefaultApi + consumerGroupId string +} + + +func (r ApiDeleteConsumerGroupByIdRequest) Execute() (*_nethttp.Response, error) { + return r.ApiService.DeleteConsumerGroupByIdExecute(r) +} + +/* + * DeleteConsumerGroupById Delete a consumer group. + * Delete a consumer group, along with its consumers. + * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param consumerGroupId The unique ID of the cobsumer group. + * @return ApiDeleteConsumerGroupByIdRequest + */ +func (a *DefaultApiService) DeleteConsumerGroupById(ctx _context.Context, consumerGroupId string) ApiDeleteConsumerGroupByIdRequest { + return ApiDeleteConsumerGroupByIdRequest{ + ApiService: a, + ctx: ctx, + consumerGroupId: consumerGroupId, + } +} + +/* + * Execute executes the request + */ +func (a *DefaultApiService) DeleteConsumerGroupByIdExecute(r ApiDeleteConsumerGroupByIdRequest) (*_nethttp.Response, error) { + var ( + localVarHTTPMethod = _nethttp.MethodDelete + localVarPostBody interface{} + localVarFormFileName string + localVarFileName string + localVarFileBytes []byte + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.DeleteConsumerGroupById") + if err != nil { + return nil, GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/consumer-groups/{consumerGroupId}" + localVarPath = strings.Replace(localVarPath, "{"+"consumerGroupId"+"}", _neturl.PathEscape(parameterToString(r.consumerGroupId, "")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := _neturl.Values{} + localVarFormParams := _neturl.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) + if err != nil { + return nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarHTTPResponse, err + } + + localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = _ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarHTTPResponse, newErr + } + + return localVarHTTPResponse, nil +} + +type ApiDeleteTopicRequest struct { + ctx _context.Context + ApiService DefaultApi + topicName string +} + + +func (r ApiDeleteTopicRequest) Execute() (*_nethttp.Response, error) { + return r.ApiService.DeleteTopicExecute(r) +} + +/* + * DeleteTopic Deletes a topic + * Deletes the topic with the specified name. + * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param topicName The topic name to delete. + * @return ApiDeleteTopicRequest + */ +func (a *DefaultApiService) DeleteTopic(ctx _context.Context, topicName string) ApiDeleteTopicRequest { + return ApiDeleteTopicRequest{ + ApiService: a, + ctx: ctx, + topicName: topicName, + } +} + +/* + * Execute executes the request + */ +func (a *DefaultApiService) DeleteTopicExecute(r ApiDeleteTopicRequest) (*_nethttp.Response, error) { + var ( + localVarHTTPMethod = _nethttp.MethodDelete + localVarPostBody interface{} + localVarFormFileName string + localVarFileName string + localVarFileBytes []byte + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.DeleteTopic") + if err != nil { + return nil, GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/topics/{topicName}" + localVarPath = strings.Replace(localVarPath, "{"+"topicName"+"}", _neturl.PathEscape(parameterToString(r.topicName, "")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := _neturl.Values{} + localVarFormParams := _neturl.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) + if err != nil { + return nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarHTTPResponse, err + } + + localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = _ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarHTTPResponse, newErr + } + + return localVarHTTPResponse, nil +} + +type ApiGetConsumerGroupByIdRequest struct { + ctx _context.Context + ApiService DefaultApi + consumerGroupId string + topic *string +} + +func (r ApiGetConsumerGroupByIdRequest) Topic(topic string) ApiGetConsumerGroupByIdRequest { + r.topic = &topic + return r +} + +func (r ApiGetConsumerGroupByIdRequest) Execute() (ConsumerGroup, *_nethttp.Response, error) { + return r.ApiService.GetConsumerGroupByIdExecute(r) +} + +/* + * GetConsumerGroupById Get a single consumer group by its unique ID. + * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param consumerGroupId The unique ID of the consumer group + * @return ApiGetConsumerGroupByIdRequest + */ +func (a *DefaultApiService) GetConsumerGroupById(ctx _context.Context, consumerGroupId string) ApiGetConsumerGroupByIdRequest { + return ApiGetConsumerGroupByIdRequest{ + ApiService: a, + ctx: ctx, + consumerGroupId: consumerGroupId, + } +} + +/* + * Execute executes the request + * @return ConsumerGroup + */ +func (a *DefaultApiService) GetConsumerGroupByIdExecute(r ApiGetConsumerGroupByIdRequest) (ConsumerGroup, *_nethttp.Response, error) { + var ( + localVarHTTPMethod = _nethttp.MethodGet + localVarPostBody interface{} + localVarFormFileName string + localVarFileName string + localVarFileBytes []byte + localVarReturnValue ConsumerGroup + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.GetConsumerGroupById") + if err != nil { + return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/consumer-groups/{consumerGroupId}" + localVarPath = strings.Replace(localVarPath, "{"+"consumerGroupId"+"}", _neturl.PathEscape(parameterToString(r.consumerGroupId, "")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := _neturl.Values{} + localVarFormParams := _neturl.Values{} + + if r.topic != nil { + localVarQueryParams.Add("topic", parameterToString(*r.topic, "")) + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = _ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiGetConsumerGroupListRequest struct { + ctx _context.Context + ApiService DefaultApi + limit *int32 + offset *int32 + topic *string +} + +func (r ApiGetConsumerGroupListRequest) Limit(limit int32) ApiGetConsumerGroupListRequest { + r.limit = &limit + return r +} +func (r ApiGetConsumerGroupListRequest) Offset(offset int32) ApiGetConsumerGroupListRequest { + r.offset = &offset + return r +} +func (r ApiGetConsumerGroupListRequest) Topic(topic string) ApiGetConsumerGroupListRequest { + r.topic = &topic + return r +} + +func (r ApiGetConsumerGroupListRequest) Execute() (ConsumerGroupList, *_nethttp.Response, error) { + return r.ApiService.GetConsumerGroupListExecute(r) +} + +/* + * GetConsumerGroupList List of consumer groups in the Kafka instance. + * Returns a list of all consumer groups for a particular Kafka instance. + * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @return ApiGetConsumerGroupListRequest + */ +func (a *DefaultApiService) GetConsumerGroupList(ctx _context.Context) ApiGetConsumerGroupListRequest { + return ApiGetConsumerGroupListRequest{ + ApiService: a, + ctx: ctx, + } +} + +/* + * Execute executes the request + * @return ConsumerGroupList + */ +func (a *DefaultApiService) GetConsumerGroupListExecute(r ApiGetConsumerGroupListRequest) (ConsumerGroupList, *_nethttp.Response, error) { + var ( + localVarHTTPMethod = _nethttp.MethodGet + localVarPostBody interface{} + localVarFormFileName string + localVarFileName string + localVarFileBytes []byte + localVarReturnValue ConsumerGroupList + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.GetConsumerGroupList") + if err != nil { + return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/consumer-groups" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := _neturl.Values{} + localVarFormParams := _neturl.Values{} + + if r.limit != nil { + localVarQueryParams.Add("limit", parameterToString(*r.limit, "")) + } + if r.offset != nil { + localVarQueryParams.Add("offset", parameterToString(*r.offset, "")) + } + if r.topic != nil { + localVarQueryParams.Add("topic", parameterToString(*r.topic, "")) + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = _ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiGetTopicRequest struct { + ctx _context.Context + ApiService DefaultApi + topicName string +} + + +func (r ApiGetTopicRequest) Execute() (Topic, *_nethttp.Response, error) { + return r.ApiService.GetTopicExecute(r) +} + +/* + * GetTopic Retrieves the topic with the specified name. + * Topic + * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param topicName The topic name to retrieve. + * @return ApiGetTopicRequest + */ +func (a *DefaultApiService) GetTopic(ctx _context.Context, topicName string) ApiGetTopicRequest { + return ApiGetTopicRequest{ + ApiService: a, + ctx: ctx, + topicName: topicName, + } +} + +/* + * Execute executes the request + * @return Topic + */ +func (a *DefaultApiService) GetTopicExecute(r ApiGetTopicRequest) (Topic, *_nethttp.Response, error) { + var ( + localVarHTTPMethod = _nethttp.MethodGet + localVarPostBody interface{} + localVarFormFileName string + localVarFileName string + localVarFileBytes []byte + localVarReturnValue Topic + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.GetTopic") + if err != nil { + return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/topics/{topicName}" + localVarPath = strings.Replace(localVarPath, "{"+"topicName"+"}", _neturl.PathEscape(parameterToString(r.topicName, "")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := _neturl.Values{} + localVarFormParams := _neturl.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = _ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiGetTopicsListRequest struct { + ctx _context.Context + ApiService DefaultApi + limit *int32 + filter *string + offset *int32 + order *string +} + +func (r ApiGetTopicsListRequest) Limit(limit int32) ApiGetTopicsListRequest { + r.limit = &limit + return r +} +func (r ApiGetTopicsListRequest) Filter(filter string) ApiGetTopicsListRequest { + r.filter = &filter + return r +} +func (r ApiGetTopicsListRequest) Offset(offset int32) ApiGetTopicsListRequest { + r.offset = &offset + return r +} +func (r ApiGetTopicsListRequest) Order(order string) ApiGetTopicsListRequest { + r.order = &order + return r +} + +func (r ApiGetTopicsListRequest) Execute() (TopicsList, *_nethttp.Response, error) { + return r.ApiService.GetTopicsListExecute(r) +} + +/* + * GetTopicsList List of topics + * Returns a list of all of the available topics, or the list of topics that meet the users URL Query Parameters. + * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @return ApiGetTopicsListRequest + */ +func (a *DefaultApiService) GetTopicsList(ctx _context.Context) ApiGetTopicsListRequest { + return ApiGetTopicsListRequest{ + ApiService: a, + ctx: ctx, + } +} + +/* + * Execute executes the request + * @return TopicsList + */ +func (a *DefaultApiService) GetTopicsListExecute(r ApiGetTopicsListRequest) (TopicsList, *_nethttp.Response, error) { + var ( + localVarHTTPMethod = _nethttp.MethodGet + localVarPostBody interface{} + localVarFormFileName string + localVarFileName string + localVarFileBytes []byte + localVarReturnValue TopicsList + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.GetTopicsList") + if err != nil { + return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/topics" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := _neturl.Values{} + localVarFormParams := _neturl.Values{} + + if r.limit != nil { + localVarQueryParams.Add("limit", parameterToString(*r.limit, "")) + } + if r.filter != nil { + localVarQueryParams.Add("filter", parameterToString(*r.filter, "")) + } + if r.offset != nil { + localVarQueryParams.Add("offset", parameterToString(*r.offset, "")) + } + if r.order != nil { + localVarQueryParams.Add("order", parameterToString(*r.order, "")) + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = _ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiUpdateTopicRequest struct { + ctx _context.Context + ApiService DefaultApi + topicName string + updateTopicInput *UpdateTopicInput +} + +func (r ApiUpdateTopicRequest) UpdateTopicInput(updateTopicInput UpdateTopicInput) ApiUpdateTopicRequest { + r.updateTopicInput = &updateTopicInput + return r +} + +func (r ApiUpdateTopicRequest) Execute() (Topic, *_nethttp.Response, error) { + return r.ApiService.UpdateTopicExecute(r) +} + +/* + * UpdateTopic Updates the topic with the specified name. + * updates the topic with the new data. + * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param topicName The topic name which is its unique id. + * @return ApiUpdateTopicRequest + */ +func (a *DefaultApiService) UpdateTopic(ctx _context.Context, topicName string) ApiUpdateTopicRequest { + return ApiUpdateTopicRequest{ + ApiService: a, + ctx: ctx, + topicName: topicName, + } +} + +/* + * Execute executes the request + * @return Topic + */ +func (a *DefaultApiService) UpdateTopicExecute(r ApiUpdateTopicRequest) (Topic, *_nethttp.Response, error) { + var ( + localVarHTTPMethod = _nethttp.MethodPatch + localVarPostBody interface{} + localVarFormFileName string + localVarFileName string + localVarFileBytes []byte + localVarReturnValue Topic + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.UpdateTopic") + if err != nil { + return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/topics/{topicName}" + localVarPath = strings.Replace(localVarPath, "{"+"topicName"+"}", _neturl.PathEscape(parameterToString(r.topicName, "")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := _neturl.Values{} + localVarFormParams := _neturl.Values{} + if r.updateTopicInput == nil { + return localVarReturnValue, nil, reportError("updateTopicInput is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.updateTopicInput + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = _ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/kafkaadmin/apiv1internal/client.go b/kafkaadmin/apiv1internal/client.go new file mode 100644 index 00000000..dc2de053 --- /dev/null +++ b/kafkaadmin/apiv1internal/client.go @@ -0,0 +1,535 @@ +/* + * Kafka Admin REST API + * + * An API to provide REST endpoints for query Kafka for admin operations + * + * API version: 0.1.0 + */ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package kafkaadmin + +import ( + "bytes" + "context" + "encoding/json" + "encoding/xml" + "errors" + "fmt" + "io" + "log" + "mime/multipart" + "net/http" + "net/http/httputil" + "net/url" + "os" + "path/filepath" + "reflect" + "regexp" + "strconv" + "strings" + "time" + "unicode/utf8" + + "golang.org/x/oauth2" +) + +var ( + jsonCheck = regexp.MustCompile(`(?i:(?:application|text)/(?:vnd\.[^;]+\+)?json)`) + xmlCheck = regexp.MustCompile(`(?i:(?:application|text)/xml)`) +) + +// APIClient manages communication with the Kafka Admin REST API API v0.1.0 +// In most cases there should be only one, shared, APIClient. +type APIClient struct { + cfg *Configuration + common service // Reuse a single struct instead of allocating one for each service on the heap. + + // API Services + + DefaultApi DefaultApi +} + +type service struct { + client *APIClient +} + +// NewAPIClient creates a new API client. Requires a userAgent string describing your application. +// optionally a custom http.Client to allow for advanced features such as caching. +func NewAPIClient(cfg *Configuration) *APIClient { + if cfg.HTTPClient == nil { + cfg.HTTPClient = http.DefaultClient + } + + c := &APIClient{} + c.cfg = cfg + c.common.client = c + + // API Services + c.DefaultApi = (*DefaultApiService)(&c.common) + + return c +} + +func atoi(in string) (int, error) { + return strconv.Atoi(in) +} + +// selectHeaderContentType select a content type from the available list. +func selectHeaderContentType(contentTypes []string) string { + if len(contentTypes) == 0 { + return "" + } + if contains(contentTypes, "application/json") { + return "application/json" + } + return contentTypes[0] // use the first content type specified in 'consumes' +} + +// selectHeaderAccept join all accept types and return +func selectHeaderAccept(accepts []string) string { + if len(accepts) == 0 { + return "" + } + + if contains(accepts, "application/json") { + return "application/json" + } + + return strings.Join(accepts, ",") +} + +// contains is a case insensitive match, finding needle in a haystack +func contains(haystack []string, needle string) bool { + for _, a := range haystack { + if strings.ToLower(a) == strings.ToLower(needle) { + return true + } + } + return false +} + +// Verify optional parameters are of the correct type. +func typeCheckParameter(obj interface{}, expected string, name string) error { + // Make sure there is an object. + if obj == nil { + return nil + } + + // Check the type is as expected. + if reflect.TypeOf(obj).String() != expected { + return fmt.Errorf("Expected %s to be of type %s but received %s.", name, expected, reflect.TypeOf(obj).String()) + } + return nil +} + +// parameterToString convert interface{} parameters to string, using a delimiter if format is provided. +func parameterToString(obj interface{}, collectionFormat string) string { + var delimiter string + + switch collectionFormat { + case "pipes": + delimiter = "|" + case "ssv": + delimiter = " " + case "tsv": + delimiter = "\t" + case "csv": + delimiter = "," + } + + if reflect.TypeOf(obj).Kind() == reflect.Slice { + return strings.Trim(strings.Replace(fmt.Sprint(obj), " ", delimiter, -1), "[]") + } else if t, ok := obj.(time.Time); ok { + return t.Format(time.RFC3339) + } + + return fmt.Sprintf("%v", obj) +} + +// helper for converting interface{} parameters to json strings +func parameterToJson(obj interface{}) (string, error) { + jsonBuf, err := json.Marshal(obj) + if err != nil { + return "", err + } + return string(jsonBuf), err +} + +// callAPI do the request. +func (c *APIClient) callAPI(request *http.Request) (*http.Response, error) { + if c.cfg.Debug { + dump, err := httputil.DumpRequestOut(request, true) + if err != nil { + return nil, err + } + log.Printf("\n%s\n", string(dump)) + } + + resp, err := c.cfg.HTTPClient.Do(request) + if err != nil { + return resp, err + } + + if c.cfg.Debug { + dump, err := httputil.DumpResponse(resp, true) + if err != nil { + return resp, err + } + log.Printf("\n%s\n", string(dump)) + } + return resp, err +} + +// Allow modification of underlying config for alternate implementations and testing +// Caution: modifying the configuration while live can cause data races and potentially unwanted behavior +func (c *APIClient) GetConfig() *Configuration { + return c.cfg +} + +// prepareRequest build the request +func (c *APIClient) prepareRequest( + ctx context.Context, + path string, method string, + postBody interface{}, + headerParams map[string]string, + queryParams url.Values, + formParams url.Values, + formFileName string, + fileName string, + fileBytes []byte) (localVarRequest *http.Request, err error) { + + var body *bytes.Buffer + + // Detect postBody type and post. + if postBody != nil { + contentType := headerParams["Content-Type"] + if contentType == "" { + contentType = detectContentType(postBody) + headerParams["Content-Type"] = contentType + } + + body, err = setBody(postBody, contentType) + if err != nil { + return nil, err + } + } + + // add form parameters and file if available. + if strings.HasPrefix(headerParams["Content-Type"], "multipart/form-data") && len(formParams) > 0 || (len(fileBytes) > 0 && fileName != "") { + if body != nil { + return nil, errors.New("Cannot specify postBody and multipart form at the same time.") + } + body = &bytes.Buffer{} + w := multipart.NewWriter(body) + + for k, v := range formParams { + for _, iv := range v { + if strings.HasPrefix(k, "@") { // file + err = addFile(w, k[1:], iv) + if err != nil { + return nil, err + } + } else { // form value + w.WriteField(k, iv) + } + } + } + if len(fileBytes) > 0 && fileName != "" { + w.Boundary() + //_, fileNm := filepath.Split(fileName) + part, err := w.CreateFormFile(formFileName, filepath.Base(fileName)) + if err != nil { + return nil, err + } + _, err = part.Write(fileBytes) + if err != nil { + return nil, err + } + } + + // Set the Boundary in the Content-Type + headerParams["Content-Type"] = w.FormDataContentType() + + // Set Content-Length + headerParams["Content-Length"] = fmt.Sprintf("%d", body.Len()) + w.Close() + } + + if strings.HasPrefix(headerParams["Content-Type"], "application/x-www-form-urlencoded") && len(formParams) > 0 { + if body != nil { + return nil, errors.New("Cannot specify postBody and x-www-form-urlencoded form at the same time.") + } + body = &bytes.Buffer{} + body.WriteString(formParams.Encode()) + // Set Content-Length + headerParams["Content-Length"] = fmt.Sprintf("%d", body.Len()) + } + + // Setup path and query parameters + url, err := url.Parse(path) + if err != nil { + return nil, err + } + + // Override request host, if applicable + if c.cfg.Host != "" { + url.Host = c.cfg.Host + } + + // Override request scheme, if applicable + if c.cfg.Scheme != "" { + url.Scheme = c.cfg.Scheme + } + + // Adding Query Param + query := url.Query() + for k, v := range queryParams { + for _, iv := range v { + query.Add(k, iv) + } + } + + // Encode the parameters. + url.RawQuery = query.Encode() + + // Generate a new request + if body != nil { + localVarRequest, err = http.NewRequest(method, url.String(), body) + } else { + localVarRequest, err = http.NewRequest(method, url.String(), nil) + } + if err != nil { + return nil, err + } + + // add header parameters, if any + if len(headerParams) > 0 { + headers := http.Header{} + for h, v := range headerParams { + headers.Set(h, v) + } + localVarRequest.Header = headers + } + + // Add the user agent to the request. + localVarRequest.Header.Add("User-Agent", c.cfg.UserAgent) + + if ctx != nil { + // add context to the request + localVarRequest = localVarRequest.WithContext(ctx) + + // Walk through any authentication. + + // OAuth2 authentication + if tok, ok := ctx.Value(ContextOAuth2).(oauth2.TokenSource); ok { + // We were able to grab an oauth2 token from the context + var latestToken *oauth2.Token + if latestToken, err = tok.Token(); err != nil { + return nil, err + } + + latestToken.SetAuthHeader(localVarRequest) + } + + // Basic HTTP Authentication + if auth, ok := ctx.Value(ContextBasicAuth).(BasicAuth); ok { + localVarRequest.SetBasicAuth(auth.UserName, auth.Password) + } + + // AccessToken Authentication + if auth, ok := ctx.Value(ContextAccessToken).(string); ok { + localVarRequest.Header.Add("Authorization", "Bearer "+auth) + } + + } + + for header, value := range c.cfg.DefaultHeader { + localVarRequest.Header.Add(header, value) + } + return localVarRequest, nil +} + +func (c *APIClient) decode(v interface{}, b []byte, contentType string) (err error) { + if len(b) == 0 { + return nil + } + if s, ok := v.(*string); ok { + *s = string(b) + return nil + } + if xmlCheck.MatchString(contentType) { + if err = xml.Unmarshal(b, v); err != nil { + return err + } + return nil + } + if jsonCheck.MatchString(contentType) { + if actualObj, ok := v.(interface{ GetActualInstance() interface{} }); ok { // oneOf, anyOf schemas + if unmarshalObj, ok := actualObj.(interface{ UnmarshalJSON([]byte) error }); ok { // make sure it has UnmarshalJSON defined + if err = unmarshalObj.UnmarshalJSON(b); err != nil { + return err + } + } else { + return errors.New("Unknown type with GetActualInstance but no unmarshalObj.UnmarshalJSON defined") + } + } else if err = json.Unmarshal(b, v); err != nil { // simple model + return err + } + return nil + } + return errors.New("undefined response type") +} + +// Add a file to the multipart request +func addFile(w *multipart.Writer, fieldName, path string) error { + file, err := os.Open(path) + if err != nil { + return err + } + defer file.Close() + + part, err := w.CreateFormFile(fieldName, filepath.Base(path)) + if err != nil { + return err + } + _, err = io.Copy(part, file) + + return err +} + +// Prevent trying to import "fmt" +func reportError(format string, a ...interface{}) error { + return fmt.Errorf(format, a...) +} + +// Set request body from an interface{} +func setBody(body interface{}, contentType string) (bodyBuf *bytes.Buffer, err error) { + if bodyBuf == nil { + bodyBuf = &bytes.Buffer{} + } + + if reader, ok := body.(io.Reader); ok { + _, err = bodyBuf.ReadFrom(reader) + } else if fp, ok := body.(**os.File); ok { + _, err = bodyBuf.ReadFrom(*fp) + } else if b, ok := body.([]byte); ok { + _, err = bodyBuf.Write(b) + } else if s, ok := body.(string); ok { + _, err = bodyBuf.WriteString(s) + } else if s, ok := body.(*string); ok { + _, err = bodyBuf.WriteString(*s) + } else if jsonCheck.MatchString(contentType) { + err = json.NewEncoder(bodyBuf).Encode(body) + } else if xmlCheck.MatchString(contentType) { + err = xml.NewEncoder(bodyBuf).Encode(body) + } + + if err != nil { + return nil, err + } + + if bodyBuf.Len() == 0 { + err = fmt.Errorf("Invalid body type %s\n", contentType) + return nil, err + } + return bodyBuf, nil +} + +// detectContentType method is used to figure out `Request.Body` content type for request header +func detectContentType(body interface{}) string { + contentType := "text/plain; charset=utf-8" + kind := reflect.TypeOf(body).Kind() + + switch kind { + case reflect.Struct, reflect.Map, reflect.Ptr: + contentType = "application/json; charset=utf-8" + case reflect.String: + contentType = "text/plain; charset=utf-8" + default: + if b, ok := body.([]byte); ok { + contentType = http.DetectContentType(b) + } else if kind == reflect.Slice { + contentType = "application/json; charset=utf-8" + } + } + + return contentType +} + +// Ripped from https://github.com/gregjones/httpcache/blob/master/httpcache.go +type cacheControl map[string]string + +func parseCacheControl(headers http.Header) cacheControl { + cc := cacheControl{} + ccHeader := headers.Get("Cache-Control") + for _, part := range strings.Split(ccHeader, ",") { + part = strings.Trim(part, " ") + if part == "" { + continue + } + if strings.ContainsRune(part, '=') { + keyval := strings.Split(part, "=") + cc[strings.Trim(keyval[0], " ")] = strings.Trim(keyval[1], ",") + } else { + cc[part] = "" + } + } + return cc +} + +// CacheExpires helper function to determine remaining time before repeating a request. +func CacheExpires(r *http.Response) time.Time { + // Figure out when the cache expires. + var expires time.Time + now, err := time.Parse(time.RFC1123, r.Header.Get("date")) + if err != nil { + return time.Now() + } + respCacheControl := parseCacheControl(r.Header) + + if maxAge, ok := respCacheControl["max-age"]; ok { + lifetime, err := time.ParseDuration(maxAge + "s") + if err != nil { + expires = now + } else { + expires = now.Add(lifetime) + } + } else { + expiresHeader := r.Header.Get("Expires") + if expiresHeader != "" { + expires, err = time.Parse(time.RFC1123, expiresHeader) + if err != nil { + expires = now + } + } + } + return expires +} + +func strlen(s string) int { + return utf8.RuneCountInString(s) +} + +// GenericOpenAPIError Provides access to the body, error and model on returned errors. +type GenericOpenAPIError struct { + body []byte + error string + model interface{} +} + +// Error returns non-empty string if there was an error. +func (e GenericOpenAPIError) Error() string { + return e.error +} + +// Body returns the raw bytes of the response +func (e GenericOpenAPIError) Body() []byte { + return e.body +} + +// Model returns the unpacked model of the error +func (e GenericOpenAPIError) Model() interface{} { + return e.model +} diff --git a/kafkaadmin/apiv1internal/configuration.go b/kafkaadmin/apiv1internal/configuration.go new file mode 100644 index 00000000..4e087791 --- /dev/null +++ b/kafkaadmin/apiv1internal/configuration.go @@ -0,0 +1,238 @@ +/* + * Kafka Admin REST API + * + * An API to provide REST endpoints for query Kafka for admin operations + * + * API version: 0.1.0 + */ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package kafkaadmin + +import ( + "context" + "fmt" + "net/http" + "strings" +) + +// contextKeys are used to identify the type of value in the context. +// Since these are string, it is possible to get a short description of the +// context key for logging and debugging using key.String(). + +type contextKey string + +func (c contextKey) String() string { + return "auth " + string(c) +} + +var ( + // ContextOAuth2 takes an oauth2.TokenSource as authentication for the request. + ContextOAuth2 = contextKey("token") + + // ContextBasicAuth takes BasicAuth as authentication for the request. + ContextBasicAuth = contextKey("basic") + + // ContextAccessToken takes a string oauth2 access token as authentication for the request. + ContextAccessToken = contextKey("accesstoken") + + // ContextAPIKeys takes a string apikey as authentication for the request + ContextAPIKeys = contextKey("apiKeys") + + // ContextHttpSignatureAuth takes HttpSignatureAuth as authentication for the request. + ContextHttpSignatureAuth = contextKey("httpsignature") + + // ContextServerIndex uses a server configuration from the index. + ContextServerIndex = contextKey("serverIndex") + + // ContextOperationServerIndices uses a server configuration from the index mapping. + ContextOperationServerIndices = contextKey("serverOperationIndices") + + // ContextServerVariables overrides a server configuration variables. + ContextServerVariables = contextKey("serverVariables") + + // ContextOperationServerVariables overrides a server configuration variables using operation specific values. + ContextOperationServerVariables = contextKey("serverOperationVariables") +) + +// BasicAuth provides basic http authentication to a request passed via context using ContextBasicAuth +type BasicAuth struct { + UserName string `json:"userName,omitempty"` + Password string `json:"password,omitempty"` +} + +// APIKey provides API key based authentication to a request passed via context using ContextAPIKey +type APIKey struct { + Key string + Prefix string +} + +// ServerVariable stores the information about a server variable +type ServerVariable struct { + Description string + DefaultValue string + EnumValues []string +} + +// ServerConfiguration stores the information about a server +type ServerConfiguration struct { + URL string + Description string + Variables map[string]ServerVariable +} + +// ServerConfigurations stores multiple ServerConfiguration items +type ServerConfigurations []ServerConfiguration + +// Configuration stores the configuration of the API client +type Configuration struct { + Host string `json:"host,omitempty"` + Scheme string `json:"scheme,omitempty"` + DefaultHeader map[string]string `json:"defaultHeader,omitempty"` + UserAgent string `json:"userAgent,omitempty"` + Debug bool `json:"debug,omitempty"` + Servers ServerConfigurations + OperationServers map[string]ServerConfigurations + HTTPClient *http.Client +} + +// NewConfiguration returns a new Configuration object +func NewConfiguration() *Configuration { + cfg := &Configuration{ + DefaultHeader: make(map[string]string), + UserAgent: "OpenAPI-Generator/1.0.0/go", + Debug: false, + Servers: ServerConfigurations{ + { + URL: "https://api.openshift.com", + Description: "Main (production) server", + }, + { + URL: "https://api.stage.openshift.com", + Description: "Staging server", + }, + { + URL: "http://localhost:8000", + Description: "localhost", + }, + }, + OperationServers: map[string]ServerConfigurations{ + }, + } + return cfg +} + +// AddDefaultHeader adds a new HTTP header to the default header in the request +func (c *Configuration) AddDefaultHeader(key string, value string) { + c.DefaultHeader[key] = value +} + +// URL formats template on a index using given variables +func (sc ServerConfigurations) URL(index int, variables map[string]string) (string, error) { + if index < 0 || len(sc) <= index { + return "", fmt.Errorf("Index %v out of range %v", index, len(sc)-1) + } + server := sc[index] + url := server.URL + + // go through variables and replace placeholders + for name, variable := range server.Variables { + if value, ok := variables[name]; ok { + found := bool(len(variable.EnumValues) == 0) + for _, enumValue := range variable.EnumValues { + if value == enumValue { + found = true + } + } + if !found { + return "", fmt.Errorf("The variable %s in the server URL has invalid value %v. Must be %v", name, value, variable.EnumValues) + } + url = strings.Replace(url, "{"+name+"}", value, -1) + } else { + url = strings.Replace(url, "{"+name+"}", variable.DefaultValue, -1) + } + } + return url, nil +} + +// ServerURL returns URL based on server settings +func (c *Configuration) ServerURL(index int, variables map[string]string) (string, error) { + return c.Servers.URL(index, variables) +} + +func getServerIndex(ctx context.Context) (int, error) { + si := ctx.Value(ContextServerIndex) + if si != nil { + if index, ok := si.(int); ok { + return index, nil + } + return 0, reportError("Invalid type %T should be int", si) + } + return 0, nil +} + +func getServerOperationIndex(ctx context.Context, endpoint string) (int, error) { + osi := ctx.Value(ContextOperationServerIndices) + if osi != nil { + if operationIndices, ok := osi.(map[string]int); !ok { + return 0, reportError("Invalid type %T should be map[string]int", osi) + } else { + index, ok := operationIndices[endpoint] + if ok { + return index, nil + } + } + } + return getServerIndex(ctx) +} + +func getServerVariables(ctx context.Context) (map[string]string, error) { + sv := ctx.Value(ContextServerVariables) + if sv != nil { + if variables, ok := sv.(map[string]string); ok { + return variables, nil + } + return nil, reportError("ctx value of ContextServerVariables has invalid type %T should be map[string]string", sv) + } + return nil, nil +} + +func getServerOperationVariables(ctx context.Context, endpoint string) (map[string]string, error) { + osv := ctx.Value(ContextOperationServerVariables) + if osv != nil { + if operationVariables, ok := osv.(map[string]map[string]string); !ok { + return nil, reportError("ctx value of ContextOperationServerVariables has invalid type %T should be map[string]map[string]string", osv) + } else { + variables, ok := operationVariables[endpoint] + if ok { + return variables, nil + } + } + } + return getServerVariables(ctx) +} + +// ServerURLWithContext returns a new server URL given an endpoint +func (c *Configuration) ServerURLWithContext(ctx context.Context, endpoint string) (string, error) { + sc, ok := c.OperationServers[endpoint] + if !ok { + sc = c.Servers + } + + if ctx == nil { + return sc.URL(0, nil) + } + + index, err := getServerOperationIndex(ctx, endpoint) + if err != nil { + return "", err + } + + variables, err := getServerOperationVariables(ctx, endpoint) + if err != nil { + return "", err + } + + return sc.URL(index, variables) +} diff --git a/kafkaadmin/apiv1internal/default_api_mock.go b/kafkaadmin/apiv1internal/default_api_mock.go new file mode 100644 index 00000000..42a4d053 --- /dev/null +++ b/kafkaadmin/apiv1internal/default_api_mock.go @@ -0,0 +1,750 @@ +// Code generated by moq; DO NOT EDIT. +// github.com/matryer/moq + +package kafkaadmin + +import ( + _context "context" + _nethttp "net/http" + "sync" +) + +// Ensure, that DefaultApiMock does implement DefaultApi. +// If this is not the case, regenerate this file with moq. +var _ DefaultApi = &DefaultApiMock{} + +// DefaultApiMock is a mock implementation of DefaultApi. +// +// func TestSomethingThatUsesDefaultApi(t *testing.T) { +// +// // make and configure a mocked DefaultApi +// mockedDefaultApi := &DefaultApiMock{ +// CreateTopicFunc: func(ctx _context.Context) ApiCreateTopicRequest { +// panic("mock out the CreateTopic method") +// }, +// CreateTopicExecuteFunc: func(r ApiCreateTopicRequest) (Topic, *_nethttp.Response, error) { +// panic("mock out the CreateTopicExecute method") +// }, +// DeleteConsumerGroupByIdFunc: func(ctx _context.Context, consumerGroupId string) ApiDeleteConsumerGroupByIdRequest { +// panic("mock out the DeleteConsumerGroupById method") +// }, +// DeleteConsumerGroupByIdExecuteFunc: func(r ApiDeleteConsumerGroupByIdRequest) (*_nethttp.Response, error) { +// panic("mock out the DeleteConsumerGroupByIdExecute method") +// }, +// DeleteTopicFunc: func(ctx _context.Context, topicName string) ApiDeleteTopicRequest { +// panic("mock out the DeleteTopic method") +// }, +// DeleteTopicExecuteFunc: func(r ApiDeleteTopicRequest) (*_nethttp.Response, error) { +// panic("mock out the DeleteTopicExecute method") +// }, +// GetConsumerGroupByIdFunc: func(ctx _context.Context, consumerGroupId string) ApiGetConsumerGroupByIdRequest { +// panic("mock out the GetConsumerGroupById method") +// }, +// GetConsumerGroupByIdExecuteFunc: func(r ApiGetConsumerGroupByIdRequest) (ConsumerGroup, *_nethttp.Response, error) { +// panic("mock out the GetConsumerGroupByIdExecute method") +// }, +// GetConsumerGroupListFunc: func(ctx _context.Context) ApiGetConsumerGroupListRequest { +// panic("mock out the GetConsumerGroupList method") +// }, +// GetConsumerGroupListExecuteFunc: func(r ApiGetConsumerGroupListRequest) (ConsumerGroupList, *_nethttp.Response, error) { +// panic("mock out the GetConsumerGroupListExecute method") +// }, +// GetTopicFunc: func(ctx _context.Context, topicName string) ApiGetTopicRequest { +// panic("mock out the GetTopic method") +// }, +// GetTopicExecuteFunc: func(r ApiGetTopicRequest) (Topic, *_nethttp.Response, error) { +// panic("mock out the GetTopicExecute method") +// }, +// GetTopicsListFunc: func(ctx _context.Context) ApiGetTopicsListRequest { +// panic("mock out the GetTopicsList method") +// }, +// GetTopicsListExecuteFunc: func(r ApiGetTopicsListRequest) (TopicsList, *_nethttp.Response, error) { +// panic("mock out the GetTopicsListExecute method") +// }, +// UpdateTopicFunc: func(ctx _context.Context, topicName string) ApiUpdateTopicRequest { +// panic("mock out the UpdateTopic method") +// }, +// UpdateTopicExecuteFunc: func(r ApiUpdateTopicRequest) (Topic, *_nethttp.Response, error) { +// panic("mock out the UpdateTopicExecute method") +// }, +// } +// +// // use mockedDefaultApi in code that requires DefaultApi +// // and then make assertions. +// +// } +type DefaultApiMock struct { + // CreateTopicFunc mocks the CreateTopic method. + CreateTopicFunc func(ctx _context.Context) ApiCreateTopicRequest + + // CreateTopicExecuteFunc mocks the CreateTopicExecute method. + CreateTopicExecuteFunc func(r ApiCreateTopicRequest) (Topic, *_nethttp.Response, error) + + // DeleteConsumerGroupByIdFunc mocks the DeleteConsumerGroupById method. + DeleteConsumerGroupByIdFunc func(ctx _context.Context, consumerGroupId string) ApiDeleteConsumerGroupByIdRequest + + // DeleteConsumerGroupByIdExecuteFunc mocks the DeleteConsumerGroupByIdExecute method. + DeleteConsumerGroupByIdExecuteFunc func(r ApiDeleteConsumerGroupByIdRequest) (*_nethttp.Response, error) + + // DeleteTopicFunc mocks the DeleteTopic method. + DeleteTopicFunc func(ctx _context.Context, topicName string) ApiDeleteTopicRequest + + // DeleteTopicExecuteFunc mocks the DeleteTopicExecute method. + DeleteTopicExecuteFunc func(r ApiDeleteTopicRequest) (*_nethttp.Response, error) + + // GetConsumerGroupByIdFunc mocks the GetConsumerGroupById method. + GetConsumerGroupByIdFunc func(ctx _context.Context, consumerGroupId string) ApiGetConsumerGroupByIdRequest + + // GetConsumerGroupByIdExecuteFunc mocks the GetConsumerGroupByIdExecute method. + GetConsumerGroupByIdExecuteFunc func(r ApiGetConsumerGroupByIdRequest) (ConsumerGroup, *_nethttp.Response, error) + + // GetConsumerGroupListFunc mocks the GetConsumerGroupList method. + GetConsumerGroupListFunc func(ctx _context.Context) ApiGetConsumerGroupListRequest + + // GetConsumerGroupListExecuteFunc mocks the GetConsumerGroupListExecute method. + GetConsumerGroupListExecuteFunc func(r ApiGetConsumerGroupListRequest) (ConsumerGroupList, *_nethttp.Response, error) + + // GetTopicFunc mocks the GetTopic method. + GetTopicFunc func(ctx _context.Context, topicName string) ApiGetTopicRequest + + // GetTopicExecuteFunc mocks the GetTopicExecute method. + GetTopicExecuteFunc func(r ApiGetTopicRequest) (Topic, *_nethttp.Response, error) + + // GetTopicsListFunc mocks the GetTopicsList method. + GetTopicsListFunc func(ctx _context.Context) ApiGetTopicsListRequest + + // GetTopicsListExecuteFunc mocks the GetTopicsListExecute method. + GetTopicsListExecuteFunc func(r ApiGetTopicsListRequest) (TopicsList, *_nethttp.Response, error) + + // UpdateTopicFunc mocks the UpdateTopic method. + UpdateTopicFunc func(ctx _context.Context, topicName string) ApiUpdateTopicRequest + + // UpdateTopicExecuteFunc mocks the UpdateTopicExecute method. + UpdateTopicExecuteFunc func(r ApiUpdateTopicRequest) (Topic, *_nethttp.Response, error) + + // calls tracks calls to the methods. + calls struct { + // CreateTopic holds details about calls to the CreateTopic method. + CreateTopic []struct { + // Ctx is the ctx argument value. + Ctx _context.Context + } + // CreateTopicExecute holds details about calls to the CreateTopicExecute method. + CreateTopicExecute []struct { + // R is the r argument value. + R ApiCreateTopicRequest + } + // DeleteConsumerGroupById holds details about calls to the DeleteConsumerGroupById method. + DeleteConsumerGroupById []struct { + // Ctx is the ctx argument value. + Ctx _context.Context + // ConsumerGroupId is the consumerGroupId argument value. + ConsumerGroupId string + } + // DeleteConsumerGroupByIdExecute holds details about calls to the DeleteConsumerGroupByIdExecute method. + DeleteConsumerGroupByIdExecute []struct { + // R is the r argument value. + R ApiDeleteConsumerGroupByIdRequest + } + // DeleteTopic holds details about calls to the DeleteTopic method. + DeleteTopic []struct { + // Ctx is the ctx argument value. + Ctx _context.Context + // TopicName is the topicName argument value. + TopicName string + } + // DeleteTopicExecute holds details about calls to the DeleteTopicExecute method. + DeleteTopicExecute []struct { + // R is the r argument value. + R ApiDeleteTopicRequest + } + // GetConsumerGroupById holds details about calls to the GetConsumerGroupById method. + GetConsumerGroupById []struct { + // Ctx is the ctx argument value. + Ctx _context.Context + // ConsumerGroupId is the consumerGroupId argument value. + ConsumerGroupId string + } + // GetConsumerGroupByIdExecute holds details about calls to the GetConsumerGroupByIdExecute method. + GetConsumerGroupByIdExecute []struct { + // R is the r argument value. + R ApiGetConsumerGroupByIdRequest + } + // GetConsumerGroupList holds details about calls to the GetConsumerGroupList method. + GetConsumerGroupList []struct { + // Ctx is the ctx argument value. + Ctx _context.Context + } + // GetConsumerGroupListExecute holds details about calls to the GetConsumerGroupListExecute method. + GetConsumerGroupListExecute []struct { + // R is the r argument value. + R ApiGetConsumerGroupListRequest + } + // GetTopic holds details about calls to the GetTopic method. + GetTopic []struct { + // Ctx is the ctx argument value. + Ctx _context.Context + // TopicName is the topicName argument value. + TopicName string + } + // GetTopicExecute holds details about calls to the GetTopicExecute method. + GetTopicExecute []struct { + // R is the r argument value. + R ApiGetTopicRequest + } + // GetTopicsList holds details about calls to the GetTopicsList method. + GetTopicsList []struct { + // Ctx is the ctx argument value. + Ctx _context.Context + } + // GetTopicsListExecute holds details about calls to the GetTopicsListExecute method. + GetTopicsListExecute []struct { + // R is the r argument value. + R ApiGetTopicsListRequest + } + // UpdateTopic holds details about calls to the UpdateTopic method. + UpdateTopic []struct { + // Ctx is the ctx argument value. + Ctx _context.Context + // TopicName is the topicName argument value. + TopicName string + } + // UpdateTopicExecute holds details about calls to the UpdateTopicExecute method. + UpdateTopicExecute []struct { + // R is the r argument value. + R ApiUpdateTopicRequest + } + } + lockCreateTopic sync.RWMutex + lockCreateTopicExecute sync.RWMutex + lockDeleteConsumerGroupById sync.RWMutex + lockDeleteConsumerGroupByIdExecute sync.RWMutex + lockDeleteTopic sync.RWMutex + lockDeleteTopicExecute sync.RWMutex + lockGetConsumerGroupById sync.RWMutex + lockGetConsumerGroupByIdExecute sync.RWMutex + lockGetConsumerGroupList sync.RWMutex + lockGetConsumerGroupListExecute sync.RWMutex + lockGetTopic sync.RWMutex + lockGetTopicExecute sync.RWMutex + lockGetTopicsList sync.RWMutex + lockGetTopicsListExecute sync.RWMutex + lockUpdateTopic sync.RWMutex + lockUpdateTopicExecute sync.RWMutex +} + +// CreateTopic calls CreateTopicFunc. +func (mock *DefaultApiMock) CreateTopic(ctx _context.Context) ApiCreateTopicRequest { + if mock.CreateTopicFunc == nil { + panic("DefaultApiMock.CreateTopicFunc: method is nil but DefaultApi.CreateTopic was just called") + } + callInfo := struct { + Ctx _context.Context + }{ + Ctx: ctx, + } + mock.lockCreateTopic.Lock() + mock.calls.CreateTopic = append(mock.calls.CreateTopic, callInfo) + mock.lockCreateTopic.Unlock() + return mock.CreateTopicFunc(ctx) +} + +// CreateTopicCalls gets all the calls that were made to CreateTopic. +// Check the length with: +// len(mockedDefaultApi.CreateTopicCalls()) +func (mock *DefaultApiMock) CreateTopicCalls() []struct { + Ctx _context.Context +} { + var calls []struct { + Ctx _context.Context + } + mock.lockCreateTopic.RLock() + calls = mock.calls.CreateTopic + mock.lockCreateTopic.RUnlock() + return calls +} + +// CreateTopicExecute calls CreateTopicExecuteFunc. +func (mock *DefaultApiMock) CreateTopicExecute(r ApiCreateTopicRequest) (Topic, *_nethttp.Response, error) { + if mock.CreateTopicExecuteFunc == nil { + panic("DefaultApiMock.CreateTopicExecuteFunc: method is nil but DefaultApi.CreateTopicExecute was just called") + } + callInfo := struct { + R ApiCreateTopicRequest + }{ + R: r, + } + mock.lockCreateTopicExecute.Lock() + mock.calls.CreateTopicExecute = append(mock.calls.CreateTopicExecute, callInfo) + mock.lockCreateTopicExecute.Unlock() + return mock.CreateTopicExecuteFunc(r) +} + +// CreateTopicExecuteCalls gets all the calls that were made to CreateTopicExecute. +// Check the length with: +// len(mockedDefaultApi.CreateTopicExecuteCalls()) +func (mock *DefaultApiMock) CreateTopicExecuteCalls() []struct { + R ApiCreateTopicRequest +} { + var calls []struct { + R ApiCreateTopicRequest + } + mock.lockCreateTopicExecute.RLock() + calls = mock.calls.CreateTopicExecute + mock.lockCreateTopicExecute.RUnlock() + return calls +} + +// DeleteConsumerGroupById calls DeleteConsumerGroupByIdFunc. +func (mock *DefaultApiMock) DeleteConsumerGroupById(ctx _context.Context, consumerGroupId string) ApiDeleteConsumerGroupByIdRequest { + if mock.DeleteConsumerGroupByIdFunc == nil { + panic("DefaultApiMock.DeleteConsumerGroupByIdFunc: method is nil but DefaultApi.DeleteConsumerGroupById was just called") + } + callInfo := struct { + Ctx _context.Context + ConsumerGroupId string + }{ + Ctx: ctx, + ConsumerGroupId: consumerGroupId, + } + mock.lockDeleteConsumerGroupById.Lock() + mock.calls.DeleteConsumerGroupById = append(mock.calls.DeleteConsumerGroupById, callInfo) + mock.lockDeleteConsumerGroupById.Unlock() + return mock.DeleteConsumerGroupByIdFunc(ctx, consumerGroupId) +} + +// DeleteConsumerGroupByIdCalls gets all the calls that were made to DeleteConsumerGroupById. +// Check the length with: +// len(mockedDefaultApi.DeleteConsumerGroupByIdCalls()) +func (mock *DefaultApiMock) DeleteConsumerGroupByIdCalls() []struct { + Ctx _context.Context + ConsumerGroupId string +} { + var calls []struct { + Ctx _context.Context + ConsumerGroupId string + } + mock.lockDeleteConsumerGroupById.RLock() + calls = mock.calls.DeleteConsumerGroupById + mock.lockDeleteConsumerGroupById.RUnlock() + return calls +} + +// DeleteConsumerGroupByIdExecute calls DeleteConsumerGroupByIdExecuteFunc. +func (mock *DefaultApiMock) DeleteConsumerGroupByIdExecute(r ApiDeleteConsumerGroupByIdRequest) (*_nethttp.Response, error) { + if mock.DeleteConsumerGroupByIdExecuteFunc == nil { + panic("DefaultApiMock.DeleteConsumerGroupByIdExecuteFunc: method is nil but DefaultApi.DeleteConsumerGroupByIdExecute was just called") + } + callInfo := struct { + R ApiDeleteConsumerGroupByIdRequest + }{ + R: r, + } + mock.lockDeleteConsumerGroupByIdExecute.Lock() + mock.calls.DeleteConsumerGroupByIdExecute = append(mock.calls.DeleteConsumerGroupByIdExecute, callInfo) + mock.lockDeleteConsumerGroupByIdExecute.Unlock() + return mock.DeleteConsumerGroupByIdExecuteFunc(r) +} + +// DeleteConsumerGroupByIdExecuteCalls gets all the calls that were made to DeleteConsumerGroupByIdExecute. +// Check the length with: +// len(mockedDefaultApi.DeleteConsumerGroupByIdExecuteCalls()) +func (mock *DefaultApiMock) DeleteConsumerGroupByIdExecuteCalls() []struct { + R ApiDeleteConsumerGroupByIdRequest +} { + var calls []struct { + R ApiDeleteConsumerGroupByIdRequest + } + mock.lockDeleteConsumerGroupByIdExecute.RLock() + calls = mock.calls.DeleteConsumerGroupByIdExecute + mock.lockDeleteConsumerGroupByIdExecute.RUnlock() + return calls +} + +// DeleteTopic calls DeleteTopicFunc. +func (mock *DefaultApiMock) DeleteTopic(ctx _context.Context, topicName string) ApiDeleteTopicRequest { + if mock.DeleteTopicFunc == nil { + panic("DefaultApiMock.DeleteTopicFunc: method is nil but DefaultApi.DeleteTopic was just called") + } + callInfo := struct { + Ctx _context.Context + TopicName string + }{ + Ctx: ctx, + TopicName: topicName, + } + mock.lockDeleteTopic.Lock() + mock.calls.DeleteTopic = append(mock.calls.DeleteTopic, callInfo) + mock.lockDeleteTopic.Unlock() + return mock.DeleteTopicFunc(ctx, topicName) +} + +// DeleteTopicCalls gets all the calls that were made to DeleteTopic. +// Check the length with: +// len(mockedDefaultApi.DeleteTopicCalls()) +func (mock *DefaultApiMock) DeleteTopicCalls() []struct { + Ctx _context.Context + TopicName string +} { + var calls []struct { + Ctx _context.Context + TopicName string + } + mock.lockDeleteTopic.RLock() + calls = mock.calls.DeleteTopic + mock.lockDeleteTopic.RUnlock() + return calls +} + +// DeleteTopicExecute calls DeleteTopicExecuteFunc. +func (mock *DefaultApiMock) DeleteTopicExecute(r ApiDeleteTopicRequest) (*_nethttp.Response, error) { + if mock.DeleteTopicExecuteFunc == nil { + panic("DefaultApiMock.DeleteTopicExecuteFunc: method is nil but DefaultApi.DeleteTopicExecute was just called") + } + callInfo := struct { + R ApiDeleteTopicRequest + }{ + R: r, + } + mock.lockDeleteTopicExecute.Lock() + mock.calls.DeleteTopicExecute = append(mock.calls.DeleteTopicExecute, callInfo) + mock.lockDeleteTopicExecute.Unlock() + return mock.DeleteTopicExecuteFunc(r) +} + +// DeleteTopicExecuteCalls gets all the calls that were made to DeleteTopicExecute. +// Check the length with: +// len(mockedDefaultApi.DeleteTopicExecuteCalls()) +func (mock *DefaultApiMock) DeleteTopicExecuteCalls() []struct { + R ApiDeleteTopicRequest +} { + var calls []struct { + R ApiDeleteTopicRequest + } + mock.lockDeleteTopicExecute.RLock() + calls = mock.calls.DeleteTopicExecute + mock.lockDeleteTopicExecute.RUnlock() + return calls +} + +// GetConsumerGroupById calls GetConsumerGroupByIdFunc. +func (mock *DefaultApiMock) GetConsumerGroupById(ctx _context.Context, consumerGroupId string) ApiGetConsumerGroupByIdRequest { + if mock.GetConsumerGroupByIdFunc == nil { + panic("DefaultApiMock.GetConsumerGroupByIdFunc: method is nil but DefaultApi.GetConsumerGroupById was just called") + } + callInfo := struct { + Ctx _context.Context + ConsumerGroupId string + }{ + Ctx: ctx, + ConsumerGroupId: consumerGroupId, + } + mock.lockGetConsumerGroupById.Lock() + mock.calls.GetConsumerGroupById = append(mock.calls.GetConsumerGroupById, callInfo) + mock.lockGetConsumerGroupById.Unlock() + return mock.GetConsumerGroupByIdFunc(ctx, consumerGroupId) +} + +// GetConsumerGroupByIdCalls gets all the calls that were made to GetConsumerGroupById. +// Check the length with: +// len(mockedDefaultApi.GetConsumerGroupByIdCalls()) +func (mock *DefaultApiMock) GetConsumerGroupByIdCalls() []struct { + Ctx _context.Context + ConsumerGroupId string +} { + var calls []struct { + Ctx _context.Context + ConsumerGroupId string + } + mock.lockGetConsumerGroupById.RLock() + calls = mock.calls.GetConsumerGroupById + mock.lockGetConsumerGroupById.RUnlock() + return calls +} + +// GetConsumerGroupByIdExecute calls GetConsumerGroupByIdExecuteFunc. +func (mock *DefaultApiMock) GetConsumerGroupByIdExecute(r ApiGetConsumerGroupByIdRequest) (ConsumerGroup, *_nethttp.Response, error) { + if mock.GetConsumerGroupByIdExecuteFunc == nil { + panic("DefaultApiMock.GetConsumerGroupByIdExecuteFunc: method is nil but DefaultApi.GetConsumerGroupByIdExecute was just called") + } + callInfo := struct { + R ApiGetConsumerGroupByIdRequest + }{ + R: r, + } + mock.lockGetConsumerGroupByIdExecute.Lock() + mock.calls.GetConsumerGroupByIdExecute = append(mock.calls.GetConsumerGroupByIdExecute, callInfo) + mock.lockGetConsumerGroupByIdExecute.Unlock() + return mock.GetConsumerGroupByIdExecuteFunc(r) +} + +// GetConsumerGroupByIdExecuteCalls gets all the calls that were made to GetConsumerGroupByIdExecute. +// Check the length with: +// len(mockedDefaultApi.GetConsumerGroupByIdExecuteCalls()) +func (mock *DefaultApiMock) GetConsumerGroupByIdExecuteCalls() []struct { + R ApiGetConsumerGroupByIdRequest +} { + var calls []struct { + R ApiGetConsumerGroupByIdRequest + } + mock.lockGetConsumerGroupByIdExecute.RLock() + calls = mock.calls.GetConsumerGroupByIdExecute + mock.lockGetConsumerGroupByIdExecute.RUnlock() + return calls +} + +// GetConsumerGroupList calls GetConsumerGroupListFunc. +func (mock *DefaultApiMock) GetConsumerGroupList(ctx _context.Context) ApiGetConsumerGroupListRequest { + if mock.GetConsumerGroupListFunc == nil { + panic("DefaultApiMock.GetConsumerGroupListFunc: method is nil but DefaultApi.GetConsumerGroupList was just called") + } + callInfo := struct { + Ctx _context.Context + }{ + Ctx: ctx, + } + mock.lockGetConsumerGroupList.Lock() + mock.calls.GetConsumerGroupList = append(mock.calls.GetConsumerGroupList, callInfo) + mock.lockGetConsumerGroupList.Unlock() + return mock.GetConsumerGroupListFunc(ctx) +} + +// GetConsumerGroupListCalls gets all the calls that were made to GetConsumerGroupList. +// Check the length with: +// len(mockedDefaultApi.GetConsumerGroupListCalls()) +func (mock *DefaultApiMock) GetConsumerGroupListCalls() []struct { + Ctx _context.Context +} { + var calls []struct { + Ctx _context.Context + } + mock.lockGetConsumerGroupList.RLock() + calls = mock.calls.GetConsumerGroupList + mock.lockGetConsumerGroupList.RUnlock() + return calls +} + +// GetConsumerGroupListExecute calls GetConsumerGroupListExecuteFunc. +func (mock *DefaultApiMock) GetConsumerGroupListExecute(r ApiGetConsumerGroupListRequest) (ConsumerGroupList, *_nethttp.Response, error) { + if mock.GetConsumerGroupListExecuteFunc == nil { + panic("DefaultApiMock.GetConsumerGroupListExecuteFunc: method is nil but DefaultApi.GetConsumerGroupListExecute was just called") + } + callInfo := struct { + R ApiGetConsumerGroupListRequest + }{ + R: r, + } + mock.lockGetConsumerGroupListExecute.Lock() + mock.calls.GetConsumerGroupListExecute = append(mock.calls.GetConsumerGroupListExecute, callInfo) + mock.lockGetConsumerGroupListExecute.Unlock() + return mock.GetConsumerGroupListExecuteFunc(r) +} + +// GetConsumerGroupListExecuteCalls gets all the calls that were made to GetConsumerGroupListExecute. +// Check the length with: +// len(mockedDefaultApi.GetConsumerGroupListExecuteCalls()) +func (mock *DefaultApiMock) GetConsumerGroupListExecuteCalls() []struct { + R ApiGetConsumerGroupListRequest +} { + var calls []struct { + R ApiGetConsumerGroupListRequest + } + mock.lockGetConsumerGroupListExecute.RLock() + calls = mock.calls.GetConsumerGroupListExecute + mock.lockGetConsumerGroupListExecute.RUnlock() + return calls +} + +// GetTopic calls GetTopicFunc. +func (mock *DefaultApiMock) GetTopic(ctx _context.Context, topicName string) ApiGetTopicRequest { + if mock.GetTopicFunc == nil { + panic("DefaultApiMock.GetTopicFunc: method is nil but DefaultApi.GetTopic was just called") + } + callInfo := struct { + Ctx _context.Context + TopicName string + }{ + Ctx: ctx, + TopicName: topicName, + } + mock.lockGetTopic.Lock() + mock.calls.GetTopic = append(mock.calls.GetTopic, callInfo) + mock.lockGetTopic.Unlock() + return mock.GetTopicFunc(ctx, topicName) +} + +// GetTopicCalls gets all the calls that were made to GetTopic. +// Check the length with: +// len(mockedDefaultApi.GetTopicCalls()) +func (mock *DefaultApiMock) GetTopicCalls() []struct { + Ctx _context.Context + TopicName string +} { + var calls []struct { + Ctx _context.Context + TopicName string + } + mock.lockGetTopic.RLock() + calls = mock.calls.GetTopic + mock.lockGetTopic.RUnlock() + return calls +} + +// GetTopicExecute calls GetTopicExecuteFunc. +func (mock *DefaultApiMock) GetTopicExecute(r ApiGetTopicRequest) (Topic, *_nethttp.Response, error) { + if mock.GetTopicExecuteFunc == nil { + panic("DefaultApiMock.GetTopicExecuteFunc: method is nil but DefaultApi.GetTopicExecute was just called") + } + callInfo := struct { + R ApiGetTopicRequest + }{ + R: r, + } + mock.lockGetTopicExecute.Lock() + mock.calls.GetTopicExecute = append(mock.calls.GetTopicExecute, callInfo) + mock.lockGetTopicExecute.Unlock() + return mock.GetTopicExecuteFunc(r) +} + +// GetTopicExecuteCalls gets all the calls that were made to GetTopicExecute. +// Check the length with: +// len(mockedDefaultApi.GetTopicExecuteCalls()) +func (mock *DefaultApiMock) GetTopicExecuteCalls() []struct { + R ApiGetTopicRequest +} { + var calls []struct { + R ApiGetTopicRequest + } + mock.lockGetTopicExecute.RLock() + calls = mock.calls.GetTopicExecute + mock.lockGetTopicExecute.RUnlock() + return calls +} + +// GetTopicsList calls GetTopicsListFunc. +func (mock *DefaultApiMock) GetTopicsList(ctx _context.Context) ApiGetTopicsListRequest { + if mock.GetTopicsListFunc == nil { + panic("DefaultApiMock.GetTopicsListFunc: method is nil but DefaultApi.GetTopicsList was just called") + } + callInfo := struct { + Ctx _context.Context + }{ + Ctx: ctx, + } + mock.lockGetTopicsList.Lock() + mock.calls.GetTopicsList = append(mock.calls.GetTopicsList, callInfo) + mock.lockGetTopicsList.Unlock() + return mock.GetTopicsListFunc(ctx) +} + +// GetTopicsListCalls gets all the calls that were made to GetTopicsList. +// Check the length with: +// len(mockedDefaultApi.GetTopicsListCalls()) +func (mock *DefaultApiMock) GetTopicsListCalls() []struct { + Ctx _context.Context +} { + var calls []struct { + Ctx _context.Context + } + mock.lockGetTopicsList.RLock() + calls = mock.calls.GetTopicsList + mock.lockGetTopicsList.RUnlock() + return calls +} + +// GetTopicsListExecute calls GetTopicsListExecuteFunc. +func (mock *DefaultApiMock) GetTopicsListExecute(r ApiGetTopicsListRequest) (TopicsList, *_nethttp.Response, error) { + if mock.GetTopicsListExecuteFunc == nil { + panic("DefaultApiMock.GetTopicsListExecuteFunc: method is nil but DefaultApi.GetTopicsListExecute was just called") + } + callInfo := struct { + R ApiGetTopicsListRequest + }{ + R: r, + } + mock.lockGetTopicsListExecute.Lock() + mock.calls.GetTopicsListExecute = append(mock.calls.GetTopicsListExecute, callInfo) + mock.lockGetTopicsListExecute.Unlock() + return mock.GetTopicsListExecuteFunc(r) +} + +// GetTopicsListExecuteCalls gets all the calls that were made to GetTopicsListExecute. +// Check the length with: +// len(mockedDefaultApi.GetTopicsListExecuteCalls()) +func (mock *DefaultApiMock) GetTopicsListExecuteCalls() []struct { + R ApiGetTopicsListRequest +} { + var calls []struct { + R ApiGetTopicsListRequest + } + mock.lockGetTopicsListExecute.RLock() + calls = mock.calls.GetTopicsListExecute + mock.lockGetTopicsListExecute.RUnlock() + return calls +} + +// UpdateTopic calls UpdateTopicFunc. +func (mock *DefaultApiMock) UpdateTopic(ctx _context.Context, topicName string) ApiUpdateTopicRequest { + if mock.UpdateTopicFunc == nil { + panic("DefaultApiMock.UpdateTopicFunc: method is nil but DefaultApi.UpdateTopic was just called") + } + callInfo := struct { + Ctx _context.Context + TopicName string + }{ + Ctx: ctx, + TopicName: topicName, + } + mock.lockUpdateTopic.Lock() + mock.calls.UpdateTopic = append(mock.calls.UpdateTopic, callInfo) + mock.lockUpdateTopic.Unlock() + return mock.UpdateTopicFunc(ctx, topicName) +} + +// UpdateTopicCalls gets all the calls that were made to UpdateTopic. +// Check the length with: +// len(mockedDefaultApi.UpdateTopicCalls()) +func (mock *DefaultApiMock) UpdateTopicCalls() []struct { + Ctx _context.Context + TopicName string +} { + var calls []struct { + Ctx _context.Context + TopicName string + } + mock.lockUpdateTopic.RLock() + calls = mock.calls.UpdateTopic + mock.lockUpdateTopic.RUnlock() + return calls +} + +// UpdateTopicExecute calls UpdateTopicExecuteFunc. +func (mock *DefaultApiMock) UpdateTopicExecute(r ApiUpdateTopicRequest) (Topic, *_nethttp.Response, error) { + if mock.UpdateTopicExecuteFunc == nil { + panic("DefaultApiMock.UpdateTopicExecuteFunc: method is nil but DefaultApi.UpdateTopicExecute was just called") + } + callInfo := struct { + R ApiUpdateTopicRequest + }{ + R: r, + } + mock.lockUpdateTopicExecute.Lock() + mock.calls.UpdateTopicExecute = append(mock.calls.UpdateTopicExecute, callInfo) + mock.lockUpdateTopicExecute.Unlock() + return mock.UpdateTopicExecuteFunc(r) +} + +// UpdateTopicExecuteCalls gets all the calls that were made to UpdateTopicExecute. +// Check the length with: +// len(mockedDefaultApi.UpdateTopicExecuteCalls()) +func (mock *DefaultApiMock) UpdateTopicExecuteCalls() []struct { + R ApiUpdateTopicRequest +} { + var calls []struct { + R ApiUpdateTopicRequest + } + mock.lockUpdateTopicExecute.RLock() + calls = mock.calls.UpdateTopicExecute + mock.lockUpdateTopicExecute.RUnlock() + return calls +} diff --git a/kafkaadmin/apiv1internal/docs/ConfigEntry.md b/kafkaadmin/apiv1internal/docs/ConfigEntry.md new file mode 100644 index 00000000..e594b2ac --- /dev/null +++ b/kafkaadmin/apiv1internal/docs/ConfigEntry.md @@ -0,0 +1,82 @@ +# ConfigEntry + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Key** | Pointer to **string** | The key indicating what configuration entry you would like to set for the topic. | [optional] +**Value** | Pointer to **string** | Value to indicate the setting on the topic configuration entry. | [optional] + +## Methods + +### NewConfigEntry + +`func NewConfigEntry() *ConfigEntry` + +NewConfigEntry instantiates a new ConfigEntry object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewConfigEntryWithDefaults + +`func NewConfigEntryWithDefaults() *ConfigEntry` + +NewConfigEntryWithDefaults instantiates a new ConfigEntry object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetKey + +`func (o *ConfigEntry) GetKey() string` + +GetKey returns the Key field if non-nil, zero value otherwise. + +### GetKeyOk + +`func (o *ConfigEntry) GetKeyOk() (*string, bool)` + +GetKeyOk returns a tuple with the Key field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetKey + +`func (o *ConfigEntry) SetKey(v string)` + +SetKey sets Key field to given value. + +### HasKey + +`func (o *ConfigEntry) HasKey() bool` + +HasKey returns a boolean if a field has been set. + +### GetValue + +`func (o *ConfigEntry) GetValue() string` + +GetValue returns the Value field if non-nil, zero value otherwise. + +### GetValueOk + +`func (o *ConfigEntry) GetValueOk() (*string, bool)` + +GetValueOk returns a tuple with the Value field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetValue + +`func (o *ConfigEntry) SetValue(v string)` + +SetValue sets Value field to given value. + +### HasValue + +`func (o *ConfigEntry) HasValue() bool` + +HasValue returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/kafkaadmin/apiv1internal/docs/Consumer.md b/kafkaadmin/apiv1internal/docs/Consumer.md new file mode 100644 index 00000000..f4d29dbb --- /dev/null +++ b/kafkaadmin/apiv1internal/docs/Consumer.md @@ -0,0 +1,187 @@ +# Consumer + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**GroupId** | **string** | Unique identifier for the consumer group to which this consumer belongs. | +**Topic** | **string** | The unique topic name to which this consumer belongs | +**Partition** | **int32** | The partition number to which this consumer group is assigned to. | +**Offset** | **float32** | Offset denotes the position of the consumer in a partition. | +**LogEndOffset** | Pointer to **float32** | The log end offset is the offset of the last message written to a log. | [optional] +**Lag** | **int32** | Offset Lag is the delta between the last produced message and the last consumer's committed offset. | +**MemberId** | Pointer to **string** | The member ID is a unique identifier given to a consumer by the coordinator upon initially joining the group. | [optional] + +## Methods + +### NewConsumer + +`func NewConsumer(groupId string, topic string, partition int32, offset float32, lag int32, ) *Consumer` + +NewConsumer instantiates a new Consumer object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewConsumerWithDefaults + +`func NewConsumerWithDefaults() *Consumer` + +NewConsumerWithDefaults instantiates a new Consumer object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetGroupId + +`func (o *Consumer) GetGroupId() string` + +GetGroupId returns the GroupId field if non-nil, zero value otherwise. + +### GetGroupIdOk + +`func (o *Consumer) GetGroupIdOk() (*string, bool)` + +GetGroupIdOk returns a tuple with the GroupId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetGroupId + +`func (o *Consumer) SetGroupId(v string)` + +SetGroupId sets GroupId field to given value. + + +### GetTopic + +`func (o *Consumer) GetTopic() string` + +GetTopic returns the Topic field if non-nil, zero value otherwise. + +### GetTopicOk + +`func (o *Consumer) GetTopicOk() (*string, bool)` + +GetTopicOk returns a tuple with the Topic field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTopic + +`func (o *Consumer) SetTopic(v string)` + +SetTopic sets Topic field to given value. + + +### GetPartition + +`func (o *Consumer) GetPartition() int32` + +GetPartition returns the Partition field if non-nil, zero value otherwise. + +### GetPartitionOk + +`func (o *Consumer) GetPartitionOk() (*int32, bool)` + +GetPartitionOk returns a tuple with the Partition field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPartition + +`func (o *Consumer) SetPartition(v int32)` + +SetPartition sets Partition field to given value. + + +### GetOffset + +`func (o *Consumer) GetOffset() float32` + +GetOffset returns the Offset field if non-nil, zero value otherwise. + +### GetOffsetOk + +`func (o *Consumer) GetOffsetOk() (*float32, bool)` + +GetOffsetOk returns a tuple with the Offset field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetOffset + +`func (o *Consumer) SetOffset(v float32)` + +SetOffset sets Offset field to given value. + + +### GetLogEndOffset + +`func (o *Consumer) GetLogEndOffset() float32` + +GetLogEndOffset returns the LogEndOffset field if non-nil, zero value otherwise. + +### GetLogEndOffsetOk + +`func (o *Consumer) GetLogEndOffsetOk() (*float32, bool)` + +GetLogEndOffsetOk returns a tuple with the LogEndOffset field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLogEndOffset + +`func (o *Consumer) SetLogEndOffset(v float32)` + +SetLogEndOffset sets LogEndOffset field to given value. + +### HasLogEndOffset + +`func (o *Consumer) HasLogEndOffset() bool` + +HasLogEndOffset returns a boolean if a field has been set. + +### GetLag + +`func (o *Consumer) GetLag() int32` + +GetLag returns the Lag field if non-nil, zero value otherwise. + +### GetLagOk + +`func (o *Consumer) GetLagOk() (*int32, bool)` + +GetLagOk returns a tuple with the Lag field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLag + +`func (o *Consumer) SetLag(v int32)` + +SetLag sets Lag field to given value. + + +### GetMemberId + +`func (o *Consumer) GetMemberId() string` + +GetMemberId returns the MemberId field if non-nil, zero value otherwise. + +### GetMemberIdOk + +`func (o *Consumer) GetMemberIdOk() (*string, bool)` + +GetMemberIdOk returns a tuple with the MemberId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetMemberId + +`func (o *Consumer) SetMemberId(v string)` + +SetMemberId sets MemberId field to given value. + +### HasMemberId + +`func (o *Consumer) HasMemberId() bool` + +HasMemberId returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/kafkaadmin/apiv1internal/docs/ConsumerGroup.md b/kafkaadmin/apiv1internal/docs/ConsumerGroup.md new file mode 100644 index 00000000..0534eddb --- /dev/null +++ b/kafkaadmin/apiv1internal/docs/ConsumerGroup.md @@ -0,0 +1,72 @@ +# ConsumerGroup + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**GroupId** | **string** | Unique identifier for the consumer group | +**Consumers** | [**[]Consumer**](Consumer.md) | The list of consumers associated with this consumer group | + +## Methods + +### NewConsumerGroup + +`func NewConsumerGroup(groupId string, consumers []Consumer, ) *ConsumerGroup` + +NewConsumerGroup instantiates a new ConsumerGroup object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewConsumerGroupWithDefaults + +`func NewConsumerGroupWithDefaults() *ConsumerGroup` + +NewConsumerGroupWithDefaults instantiates a new ConsumerGroup object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetGroupId + +`func (o *ConsumerGroup) GetGroupId() string` + +GetGroupId returns the GroupId field if non-nil, zero value otherwise. + +### GetGroupIdOk + +`func (o *ConsumerGroup) GetGroupIdOk() (*string, bool)` + +GetGroupIdOk returns a tuple with the GroupId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetGroupId + +`func (o *ConsumerGroup) SetGroupId(v string)` + +SetGroupId sets GroupId field to given value. + + +### GetConsumers + +`func (o *ConsumerGroup) GetConsumers() []Consumer` + +GetConsumers returns the Consumers field if non-nil, zero value otherwise. + +### GetConsumersOk + +`func (o *ConsumerGroup) GetConsumersOk() (*[]Consumer, bool)` + +GetConsumersOk returns a tuple with the Consumers field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetConsumers + +`func (o *ConsumerGroup) SetConsumers(v []Consumer)` + +SetConsumers sets Consumers field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/kafkaadmin/apiv1internal/docs/ConsumerGroupList.md b/kafkaadmin/apiv1internal/docs/ConsumerGroupList.md new file mode 100644 index 00000000..ee081e44 --- /dev/null +++ b/kafkaadmin/apiv1internal/docs/ConsumerGroupList.md @@ -0,0 +1,114 @@ +# ConsumerGroupList + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Items** | [**[]ConsumerGroup**](ConsumerGroup.md) | Consumer group list items | +**Count** | **float32** | The total number of consumer groups. | +**Limit** | **float32** | The number of consumer groups per page. | +**Offset** | **int32** | The page offset | + +## Methods + +### NewConsumerGroupList + +`func NewConsumerGroupList(items []ConsumerGroup, count float32, limit float32, offset int32, ) *ConsumerGroupList` + +NewConsumerGroupList instantiates a new ConsumerGroupList object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewConsumerGroupListWithDefaults + +`func NewConsumerGroupListWithDefaults() *ConsumerGroupList` + +NewConsumerGroupListWithDefaults instantiates a new ConsumerGroupList object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetItems + +`func (o *ConsumerGroupList) GetItems() []ConsumerGroup` + +GetItems returns the Items field if non-nil, zero value otherwise. + +### GetItemsOk + +`func (o *ConsumerGroupList) GetItemsOk() (*[]ConsumerGroup, bool)` + +GetItemsOk returns a tuple with the Items field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetItems + +`func (o *ConsumerGroupList) SetItems(v []ConsumerGroup)` + +SetItems sets Items field to given value. + + +### GetCount + +`func (o *ConsumerGroupList) GetCount() float32` + +GetCount returns the Count field if non-nil, zero value otherwise. + +### GetCountOk + +`func (o *ConsumerGroupList) GetCountOk() (*float32, bool)` + +GetCountOk returns a tuple with the Count field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCount + +`func (o *ConsumerGroupList) SetCount(v float32)` + +SetCount sets Count field to given value. + + +### GetLimit + +`func (o *ConsumerGroupList) GetLimit() float32` + +GetLimit returns the Limit field if non-nil, zero value otherwise. + +### GetLimitOk + +`func (o *ConsumerGroupList) GetLimitOk() (*float32, bool)` + +GetLimitOk returns a tuple with the Limit field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLimit + +`func (o *ConsumerGroupList) SetLimit(v float32)` + +SetLimit sets Limit field to given value. + + +### GetOffset + +`func (o *ConsumerGroupList) GetOffset() int32` + +GetOffset returns the Offset field if non-nil, zero value otherwise. + +### GetOffsetOk + +`func (o *ConsumerGroupList) GetOffsetOk() (*int32, bool)` + +GetOffsetOk returns a tuple with the Offset field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetOffset + +`func (o *ConsumerGroupList) SetOffset(v int32)` + +SetOffset sets Offset field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/kafkaadmin/apiv1internal/docs/DefaultApi.md b/kafkaadmin/apiv1internal/docs/DefaultApi.md new file mode 100644 index 00000000..646bba01 --- /dev/null +++ b/kafkaadmin/apiv1internal/docs/DefaultApi.md @@ -0,0 +1,572 @@ +# \DefaultApi + +All URIs are relative to *https://api.openshift.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**CreateTopic**](DefaultApi.md#CreateTopic) | **Post** /topics | Creates a new topic +[**DeleteConsumerGroupById**](DefaultApi.md#DeleteConsumerGroupById) | **Delete** /consumer-groups/{consumerGroupId} | Delete a consumer group. +[**DeleteTopic**](DefaultApi.md#DeleteTopic) | **Delete** /topics/{topicName} | Deletes a topic +[**GetConsumerGroupById**](DefaultApi.md#GetConsumerGroupById) | **Get** /consumer-groups/{consumerGroupId} | Get a single consumer group by its unique ID. +[**GetConsumerGroupList**](DefaultApi.md#GetConsumerGroupList) | **Get** /consumer-groups | List of consumer groups in the Kafka instance. +[**GetTopic**](DefaultApi.md#GetTopic) | **Get** /topics/{topicName} | Retrieves the topic with the specified name. +[**GetTopicsList**](DefaultApi.md#GetTopicsList) | **Get** /topics | List of topics +[**UpdateTopic**](DefaultApi.md#UpdateTopic) | **Patch** /topics/{topicName} | Updates the topic with the specified name. + + + +## CreateTopic + +> Topic CreateTopic(ctx).NewTopicInput(newTopicInput).Execute() + +Creates a new topic + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "./openapi" +) + +func main() { + newTopicInput := *openapiclient.NewNewTopicInput("Name_example", *openapiclient.NewTopicSettings(int32(123))) // NewTopicInput | Topic to create. + + configuration := openapiclient.NewConfiguration() + api_client := openapiclient.NewAPIClient(configuration) + resp, r, err := api_client.DefaultApi.CreateTopic(context.Background()).NewTopicInput(newTopicInput).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `DefaultApi.CreateTopic``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `CreateTopic`: Topic + fmt.Fprintf(os.Stdout, "Response from `DefaultApi.CreateTopic`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiCreateTopicRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **newTopicInput** | [**NewTopicInput**](NewTopicInput.md) | Topic to create. | + +### Return type + +[**Topic**](Topic.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## DeleteConsumerGroupById + +> DeleteConsumerGroupById(ctx, consumerGroupId).Execute() + +Delete a consumer group. + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "./openapi" +) + +func main() { + consumerGroupId := "consumerGroupId_example" // string | The unique ID of the cobsumer group. + + configuration := openapiclient.NewConfiguration() + api_client := openapiclient.NewAPIClient(configuration) + resp, r, err := api_client.DefaultApi.DeleteConsumerGroupById(context.Background(), consumerGroupId).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `DefaultApi.DeleteConsumerGroupById``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**consumerGroupId** | **string** | The unique ID of the cobsumer group. | + +### Other Parameters + +Other parameters are passed through a pointer to a apiDeleteConsumerGroupByIdRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + +### Return type + + (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## DeleteTopic + +> DeleteTopic(ctx, topicName).Execute() + +Deletes a topic + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "./openapi" +) + +func main() { + topicName := "topicName_example" // string | The topic name to delete. + + configuration := openapiclient.NewConfiguration() + api_client := openapiclient.NewAPIClient(configuration) + resp, r, err := api_client.DefaultApi.DeleteTopic(context.Background(), topicName).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `DefaultApi.DeleteTopic``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**topicName** | **string** | The topic name to delete. | + +### Other Parameters + +Other parameters are passed through a pointer to a apiDeleteTopicRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + +### Return type + + (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## GetConsumerGroupById + +> ConsumerGroup GetConsumerGroupById(ctx, consumerGroupId).Topic(topic).Execute() + +Get a single consumer group by its unique ID. + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "./openapi" +) + +func main() { + consumerGroupId := "consumerGroupId_example" // string | The unique ID of the consumer group + topic := "{"groupId":"consumer_group_1","consumers":[{"groupId":"consumer_group_1","topic":"topic-1","partition":0,"memberId":"consumer_group_member1","offset":5,"lag":0,"logEndOffset":5},{"groupId":"consumer_group_1","topic":"topic-1","partition":1,"memberId":"consumer_group_member2","offset":3,"lag":0,"logEndOffset":3},{"groupId":"consumer_group_1","topic":"topic-1","partition":2,"memberId":"consumer_group_member3","offset":6,"lag":1,"logEndOffset":5}]}" // string | Filter consumer groups for a specific topic (optional) + + configuration := openapiclient.NewConfiguration() + api_client := openapiclient.NewAPIClient(configuration) + resp, r, err := api_client.DefaultApi.GetConsumerGroupById(context.Background(), consumerGroupId).Topic(topic).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `DefaultApi.GetConsumerGroupById``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `GetConsumerGroupById`: ConsumerGroup + fmt.Fprintf(os.Stdout, "Response from `DefaultApi.GetConsumerGroupById`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**consumerGroupId** | **string** | The unique ID of the consumer group | + +### Other Parameters + +Other parameters are passed through a pointer to a apiGetConsumerGroupByIdRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **topic** | **string** | Filter consumer groups for a specific topic | + +### Return type + +[**ConsumerGroup**](ConsumerGroup.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## GetConsumerGroupList + +> ConsumerGroupList GetConsumerGroupList(ctx).Limit(limit).Offset(offset).Topic(topic).Execute() + +List of consumer groups in the Kafka instance. + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "./openapi" +) + +func main() { + limit := int32(56) // int32 | Maximum number of consumer groups to returnd (optional) + offset := int32(56) // int32 | The page offset when returning the list of consumer groups (optional) + topic := "topic_example" // string | Filter to apply when returning the list of consumer groups (optional) + + configuration := openapiclient.NewConfiguration() + api_client := openapiclient.NewAPIClient(configuration) + resp, r, err := api_client.DefaultApi.GetConsumerGroupList(context.Background()).Limit(limit).Offset(offset).Topic(topic).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `DefaultApi.GetConsumerGroupList``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `GetConsumerGroupList`: ConsumerGroupList + fmt.Fprintf(os.Stdout, "Response from `DefaultApi.GetConsumerGroupList`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiGetConsumerGroupListRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **limit** | **int32** | Maximum number of consumer groups to returnd | + **offset** | **int32** | The page offset when returning the list of consumer groups | + **topic** | **string** | Filter to apply when returning the list of consumer groups | + +### Return type + +[**ConsumerGroupList**](ConsumerGroupList.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## GetTopic + +> Topic GetTopic(ctx, topicName).Execute() + +Retrieves the topic with the specified name. + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "./openapi" +) + +func main() { + topicName := "topicName_example" // string | The topic name to retrieve. + + configuration := openapiclient.NewConfiguration() + api_client := openapiclient.NewAPIClient(configuration) + resp, r, err := api_client.DefaultApi.GetTopic(context.Background(), topicName).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `DefaultApi.GetTopic``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `GetTopic`: Topic + fmt.Fprintf(os.Stdout, "Response from `DefaultApi.GetTopic`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**topicName** | **string** | The topic name to retrieve. | + +### Other Parameters + +Other parameters are passed through a pointer to a apiGetTopicRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + +### Return type + +[**Topic**](Topic.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## GetTopicsList + +> TopicsList GetTopicsList(ctx).Limit(limit).Filter(filter).Offset(offset).Order(order).Execute() + +List of topics + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "./openapi" +) + +func main() { + limit := int32(56) // int32 | Maximum number of topics to return (optional) + filter := "filter_example" // string | Filter to apply when returning the list of topics (optional) + offset := int32(56) // int32 | The page offset when returning the limit of requested topics. (optional) + order := "order_example" // string | Order of the items sorting. If \"asc\" is set as a value, ascending order is used, descending otherwise. (optional) + + configuration := openapiclient.NewConfiguration() + api_client := openapiclient.NewAPIClient(configuration) + resp, r, err := api_client.DefaultApi.GetTopicsList(context.Background()).Limit(limit).Filter(filter).Offset(offset).Order(order).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `DefaultApi.GetTopicsList``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `GetTopicsList`: TopicsList + fmt.Fprintf(os.Stdout, "Response from `DefaultApi.GetTopicsList`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiGetTopicsListRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **limit** | **int32** | Maximum number of topics to return | + **filter** | **string** | Filter to apply when returning the list of topics | + **offset** | **int32** | The page offset when returning the limit of requested topics. | + **order** | **string** | Order of the items sorting. If \"asc\" is set as a value, ascending order is used, descending otherwise. | + +### Return type + +[**TopicsList**](TopicsList.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## UpdateTopic + +> Topic UpdateTopic(ctx, topicName).UpdateTopicInput(updateTopicInput).Execute() + +Updates the topic with the specified name. + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "./openapi" +) + +func main() { + topicName := "topicName_example" // string | The topic name which is its unique id. + updateTopicInput := *openapiclient.NewUpdateTopicInput() // UpdateTopicInput | + + configuration := openapiclient.NewConfiguration() + api_client := openapiclient.NewAPIClient(configuration) + resp, r, err := api_client.DefaultApi.UpdateTopic(context.Background(), topicName).UpdateTopicInput(updateTopicInput).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `DefaultApi.UpdateTopic``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `UpdateTopic`: Topic + fmt.Fprintf(os.Stdout, "Response from `DefaultApi.UpdateTopic`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**topicName** | **string** | The topic name which is its unique id. | + +### Other Parameters + +Other parameters are passed through a pointer to a apiUpdateTopicRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **updateTopicInput** | [**UpdateTopicInput**](UpdateTopicInput.md) | | + +### Return type + +[**Topic**](Topic.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/kafkaadmin/apiv1internal/docs/NewTopicInput.md b/kafkaadmin/apiv1internal/docs/NewTopicInput.md new file mode 100644 index 00000000..a13f622a --- /dev/null +++ b/kafkaadmin/apiv1internal/docs/NewTopicInput.md @@ -0,0 +1,72 @@ +# NewTopicInput + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | **string** | The topic name, this value must be unique. | +**Settings** | [**TopicSettings**](TopicSettings.md) | | + +## Methods + +### NewNewTopicInput + +`func NewNewTopicInput(name string, settings TopicSettings, ) *NewTopicInput` + +NewNewTopicInput instantiates a new NewTopicInput object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewNewTopicInputWithDefaults + +`func NewNewTopicInputWithDefaults() *NewTopicInput` + +NewNewTopicInputWithDefaults instantiates a new NewTopicInput object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetName + +`func (o *NewTopicInput) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *NewTopicInput) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *NewTopicInput) SetName(v string)` + +SetName sets Name field to given value. + + +### GetSettings + +`func (o *NewTopicInput) GetSettings() TopicSettings` + +GetSettings returns the Settings field if non-nil, zero value otherwise. + +### GetSettingsOk + +`func (o *NewTopicInput) GetSettingsOk() (*TopicSettings, bool)` + +GetSettingsOk returns a tuple with the Settings field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSettings + +`func (o *NewTopicInput) SetSettings(v TopicSettings)` + +SetSettings sets Settings field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/kafkaadmin/apiv1internal/docs/Partition.md b/kafkaadmin/apiv1internal/docs/Partition.md new file mode 100644 index 00000000..13e0f7af --- /dev/null +++ b/kafkaadmin/apiv1internal/docs/Partition.md @@ -0,0 +1,129 @@ +# Partition + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | **int32** | Uniquie id for the partition | +**Replicas** | Pointer to **[]map[string]interface{}** | List of replicas for the partition | [optional] +**Isr** | Pointer to **[]map[string]interface{}** | List isync-replicas for this partition. | [optional] +**Leader** | Pointer to **map[string]interface{}** | Kafka server / broker. | [optional] + +## Methods + +### NewPartition + +`func NewPartition(id int32, ) *Partition` + +NewPartition instantiates a new Partition object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewPartitionWithDefaults + +`func NewPartitionWithDefaults() *Partition` + +NewPartitionWithDefaults instantiates a new Partition object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetId + +`func (o *Partition) GetId() int32` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *Partition) GetIdOk() (*int32, bool)` + +GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetId + +`func (o *Partition) SetId(v int32)` + +SetId sets Id field to given value. + + +### GetReplicas + +`func (o *Partition) GetReplicas() []map[string]interface{}` + +GetReplicas returns the Replicas field if non-nil, zero value otherwise. + +### GetReplicasOk + +`func (o *Partition) GetReplicasOk() (*[]map[string]interface{}, bool)` + +GetReplicasOk returns a tuple with the Replicas field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetReplicas + +`func (o *Partition) SetReplicas(v []map[string]interface{})` + +SetReplicas sets Replicas field to given value. + +### HasReplicas + +`func (o *Partition) HasReplicas() bool` + +HasReplicas returns a boolean if a field has been set. + +### GetIsr + +`func (o *Partition) GetIsr() []map[string]interface{}` + +GetIsr returns the Isr field if non-nil, zero value otherwise. + +### GetIsrOk + +`func (o *Partition) GetIsrOk() (*[]map[string]interface{}, bool)` + +GetIsrOk returns a tuple with the Isr field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetIsr + +`func (o *Partition) SetIsr(v []map[string]interface{})` + +SetIsr sets Isr field to given value. + +### HasIsr + +`func (o *Partition) HasIsr() bool` + +HasIsr returns a boolean if a field has been set. + +### GetLeader + +`func (o *Partition) GetLeader() map[string]interface{}` + +GetLeader returns the Leader field if non-nil, zero value otherwise. + +### GetLeaderOk + +`func (o *Partition) GetLeaderOk() (*map[string]interface{}, bool)` + +GetLeaderOk returns a tuple with the Leader field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLeader + +`func (o *Partition) SetLeader(v map[string]interface{})` + +SetLeader sets Leader field to given value. + +### HasLeader + +`func (o *Partition) HasLeader() bool` + +HasLeader returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/kafkaadmin/apiv1internal/docs/Topic.md b/kafkaadmin/apiv1internal/docs/Topic.md new file mode 100644 index 00000000..e1be18bd --- /dev/null +++ b/kafkaadmin/apiv1internal/docs/Topic.md @@ -0,0 +1,108 @@ +# Topic + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | Pointer to **string** | The name of the topic. | [optional] +**Config** | Pointer to [**[]ConfigEntry**](ConfigEntry.md) | Topic configuration entry. | [optional] +**Partitions** | Pointer to [**[]Partition**](Partition.md) | Partitions for this topic. | [optional] + +## Methods + +### NewTopic + +`func NewTopic() *Topic` + +NewTopic instantiates a new Topic object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewTopicWithDefaults + +`func NewTopicWithDefaults() *Topic` + +NewTopicWithDefaults instantiates a new Topic object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetName + +`func (o *Topic) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *Topic) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *Topic) SetName(v string)` + +SetName sets Name field to given value. + +### HasName + +`func (o *Topic) HasName() bool` + +HasName returns a boolean if a field has been set. + +### GetConfig + +`func (o *Topic) GetConfig() []ConfigEntry` + +GetConfig returns the Config field if non-nil, zero value otherwise. + +### GetConfigOk + +`func (o *Topic) GetConfigOk() (*[]ConfigEntry, bool)` + +GetConfigOk returns a tuple with the Config field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetConfig + +`func (o *Topic) SetConfig(v []ConfigEntry)` + +SetConfig sets Config field to given value. + +### HasConfig + +`func (o *Topic) HasConfig() bool` + +HasConfig returns a boolean if a field has been set. + +### GetPartitions + +`func (o *Topic) GetPartitions() []Partition` + +GetPartitions returns the Partitions field if non-nil, zero value otherwise. + +### GetPartitionsOk + +`func (o *Topic) GetPartitionsOk() (*[]Partition, bool)` + +GetPartitionsOk returns a tuple with the Partitions field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPartitions + +`func (o *Topic) SetPartitions(v []Partition)` + +SetPartitions sets Partitions field to given value. + +### HasPartitions + +`func (o *Topic) HasPartitions() bool` + +HasPartitions returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/kafkaadmin/apiv1internal/docs/TopicSettings.md b/kafkaadmin/apiv1internal/docs/TopicSettings.md new file mode 100644 index 00000000..8cb15116 --- /dev/null +++ b/kafkaadmin/apiv1internal/docs/TopicSettings.md @@ -0,0 +1,77 @@ +# TopicSettings + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**NumPartitions** | **int32** | Number of partitions for this topic. | +**Config** | Pointer to [**[]ConfigEntry**](ConfigEntry.md) | Topic configuration entry. | [optional] + +## Methods + +### NewTopicSettings + +`func NewTopicSettings(numPartitions int32, ) *TopicSettings` + +NewTopicSettings instantiates a new TopicSettings object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewTopicSettingsWithDefaults + +`func NewTopicSettingsWithDefaults() *TopicSettings` + +NewTopicSettingsWithDefaults instantiates a new TopicSettings object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetNumPartitions + +`func (o *TopicSettings) GetNumPartitions() int32` + +GetNumPartitions returns the NumPartitions field if non-nil, zero value otherwise. + +### GetNumPartitionsOk + +`func (o *TopicSettings) GetNumPartitionsOk() (*int32, bool)` + +GetNumPartitionsOk returns a tuple with the NumPartitions field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetNumPartitions + +`func (o *TopicSettings) SetNumPartitions(v int32)` + +SetNumPartitions sets NumPartitions field to given value. + + +### GetConfig + +`func (o *TopicSettings) GetConfig() []ConfigEntry` + +GetConfig returns the Config field if non-nil, zero value otherwise. + +### GetConfigOk + +`func (o *TopicSettings) GetConfigOk() (*[]ConfigEntry, bool)` + +GetConfigOk returns a tuple with the Config field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetConfig + +`func (o *TopicSettings) SetConfig(v []ConfigEntry)` + +SetConfig sets Config field to given value. + +### HasConfig + +`func (o *TopicSettings) HasConfig() bool` + +HasConfig returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/kafkaadmin/apiv1internal/docs/TopicsList.md b/kafkaadmin/apiv1internal/docs/TopicsList.md new file mode 100644 index 00000000..573e2494 --- /dev/null +++ b/kafkaadmin/apiv1internal/docs/TopicsList.md @@ -0,0 +1,114 @@ +# TopicsList + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Offset** | **int32** | The page offset | +**Limit** | **int32** | number of entries per page | +**Count** | **int32** | Total number of topics | +**Items** | [**[]Topic**](Topic.md) | List of topics | + +## Methods + +### NewTopicsList + +`func NewTopicsList(offset int32, limit int32, count int32, items []Topic, ) *TopicsList` + +NewTopicsList instantiates a new TopicsList object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewTopicsListWithDefaults + +`func NewTopicsListWithDefaults() *TopicsList` + +NewTopicsListWithDefaults instantiates a new TopicsList object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetOffset + +`func (o *TopicsList) GetOffset() int32` + +GetOffset returns the Offset field if non-nil, zero value otherwise. + +### GetOffsetOk + +`func (o *TopicsList) GetOffsetOk() (*int32, bool)` + +GetOffsetOk returns a tuple with the Offset field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetOffset + +`func (o *TopicsList) SetOffset(v int32)` + +SetOffset sets Offset field to given value. + + +### GetLimit + +`func (o *TopicsList) GetLimit() int32` + +GetLimit returns the Limit field if non-nil, zero value otherwise. + +### GetLimitOk + +`func (o *TopicsList) GetLimitOk() (*int32, bool)` + +GetLimitOk returns a tuple with the Limit field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLimit + +`func (o *TopicsList) SetLimit(v int32)` + +SetLimit sets Limit field to given value. + + +### GetCount + +`func (o *TopicsList) GetCount() int32` + +GetCount returns the Count field if non-nil, zero value otherwise. + +### GetCountOk + +`func (o *TopicsList) GetCountOk() (*int32, bool)` + +GetCountOk returns a tuple with the Count field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCount + +`func (o *TopicsList) SetCount(v int32)` + +SetCount sets Count field to given value. + + +### GetItems + +`func (o *TopicsList) GetItems() []Topic` + +GetItems returns the Items field if non-nil, zero value otherwise. + +### GetItemsOk + +`func (o *TopicsList) GetItemsOk() (*[]Topic, bool)` + +GetItemsOk returns a tuple with the Items field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetItems + +`func (o *TopicsList) SetItems(v []Topic)` + +SetItems sets Items field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/kafkaadmin/apiv1internal/docs/UpdateTopicInput.md b/kafkaadmin/apiv1internal/docs/UpdateTopicInput.md new file mode 100644 index 00000000..47ad1c15 --- /dev/null +++ b/kafkaadmin/apiv1internal/docs/UpdateTopicInput.md @@ -0,0 +1,56 @@ +# UpdateTopicInput + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Config** | Pointer to [**[]ConfigEntry**](ConfigEntry.md) | Topic configuration entry. | [optional] + +## Methods + +### NewUpdateTopicInput + +`func NewUpdateTopicInput() *UpdateTopicInput` + +NewUpdateTopicInput instantiates a new UpdateTopicInput object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewUpdateTopicInputWithDefaults + +`func NewUpdateTopicInputWithDefaults() *UpdateTopicInput` + +NewUpdateTopicInputWithDefaults instantiates a new UpdateTopicInput object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetConfig + +`func (o *UpdateTopicInput) GetConfig() []ConfigEntry` + +GetConfig returns the Config field if non-nil, zero value otherwise. + +### GetConfigOk + +`func (o *UpdateTopicInput) GetConfigOk() (*[]ConfigEntry, bool)` + +GetConfigOk returns a tuple with the Config field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetConfig + +`func (o *UpdateTopicInput) SetConfig(v []ConfigEntry)` + +SetConfig sets Config field to given value. + +### HasConfig + +`func (o *UpdateTopicInput) HasConfig() bool` + +HasConfig returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/kafkaadmin/apiv1internal/model_config_entry.go b/kafkaadmin/apiv1internal/model_config_entry.go new file mode 100644 index 00000000..969cff95 --- /dev/null +++ b/kafkaadmin/apiv1internal/model_config_entry.go @@ -0,0 +1,153 @@ +/* + * Kafka Admin REST API + * + * An API to provide REST endpoints for query Kafka for admin operations + * + * API version: 0.1.0 + */ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package kafkaadmin + +import ( + "encoding/json" +) + +// ConfigEntry Key value pair indicating possible configuration options for a topic. +type ConfigEntry struct { + // The key indicating what configuration entry you would like to set for the topic. + Key *string `json:"key,omitempty"` + // Value to indicate the setting on the topic configuration entry. + Value *string `json:"value,omitempty"` +} + +// NewConfigEntry instantiates a new ConfigEntry object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewConfigEntry() *ConfigEntry { + this := ConfigEntry{} + return &this +} + +// NewConfigEntryWithDefaults instantiates a new ConfigEntry object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewConfigEntryWithDefaults() *ConfigEntry { + this := ConfigEntry{} + return &this +} + +// GetKey returns the Key field value if set, zero value otherwise. +func (o *ConfigEntry) GetKey() string { + if o == nil || o.Key == nil { + var ret string + return ret + } + return *o.Key +} + +// GetKeyOk returns a tuple with the Key field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ConfigEntry) GetKeyOk() (*string, bool) { + if o == nil || o.Key == nil { + return nil, false + } + return o.Key, true +} + +// HasKey returns a boolean if a field has been set. +func (o *ConfigEntry) HasKey() bool { + if o != nil && o.Key != nil { + return true + } + + return false +} + +// SetKey gets a reference to the given string and assigns it to the Key field. +func (o *ConfigEntry) SetKey(v string) { + o.Key = &v +} + +// GetValue returns the Value field value if set, zero value otherwise. +func (o *ConfigEntry) GetValue() string { + if o == nil || o.Value == nil { + var ret string + return ret + } + return *o.Value +} + +// GetValueOk returns a tuple with the Value field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ConfigEntry) GetValueOk() (*string, bool) { + if o == nil || o.Value == nil { + return nil, false + } + return o.Value, true +} + +// HasValue returns a boolean if a field has been set. +func (o *ConfigEntry) HasValue() bool { + if o != nil && o.Value != nil { + return true + } + + return false +} + +// SetValue gets a reference to the given string and assigns it to the Value field. +func (o *ConfigEntry) SetValue(v string) { + o.Value = &v +} + +func (o ConfigEntry) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.Key != nil { + toSerialize["key"] = o.Key + } + if o.Value != nil { + toSerialize["value"] = o.Value + } + return json.Marshal(toSerialize) +} + +type NullableConfigEntry struct { + value *ConfigEntry + isSet bool +} + +func (v NullableConfigEntry) Get() *ConfigEntry { + return v.value +} + +func (v *NullableConfigEntry) Set(val *ConfigEntry) { + v.value = val + v.isSet = true +} + +func (v NullableConfigEntry) IsSet() bool { + return v.isSet +} + +func (v *NullableConfigEntry) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableConfigEntry(val *ConfigEntry) *NullableConfigEntry { + return &NullableConfigEntry{value: val, isSet: true} +} + +func (v NullableConfigEntry) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableConfigEntry) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/kafkaadmin/apiv1internal/model_consumer.go b/kafkaadmin/apiv1internal/model_consumer.go new file mode 100644 index 00000000..0a33b5b7 --- /dev/null +++ b/kafkaadmin/apiv1internal/model_consumer.go @@ -0,0 +1,303 @@ +/* + * Kafka Admin REST API + * + * An API to provide REST endpoints for query Kafka for admin operations + * + * API version: 0.1.0 + */ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package kafkaadmin + +import ( + "encoding/json" +) + +// Consumer A Kafka consumer is responsible for reading records from one or more topics and one or more partitions of a topic. +type Consumer struct { + // Unique identifier for the consumer group to which this consumer belongs. + GroupId string `json:"groupId"` + // The unique topic name to which this consumer belongs + Topic string `json:"topic"` + // The partition number to which this consumer group is assigned to. + Partition int32 `json:"partition"` + // Offset denotes the position of the consumer in a partition. + Offset float32 `json:"offset"` + // The log end offset is the offset of the last message written to a log. + LogEndOffset *float32 `json:"logEndOffset,omitempty"` + // Offset Lag is the delta between the last produced message and the last consumer's committed offset. + Lag int32 `json:"lag"` + // The member ID is a unique identifier given to a consumer by the coordinator upon initially joining the group. + MemberId *string `json:"memberId,omitempty"` +} + +// NewConsumer instantiates a new Consumer object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewConsumer(groupId string, topic string, partition int32, offset float32, lag int32) *Consumer { + this := Consumer{} + this.GroupId = groupId + this.Topic = topic + this.Partition = partition + this.Offset = offset + this.Lag = lag + return &this +} + +// NewConsumerWithDefaults instantiates a new Consumer object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewConsumerWithDefaults() *Consumer { + this := Consumer{} + return &this +} + +// GetGroupId returns the GroupId field value +func (o *Consumer) GetGroupId() string { + if o == nil { + var ret string + return ret + } + + return o.GroupId +} + +// GetGroupIdOk returns a tuple with the GroupId field value +// and a boolean to check if the value has been set. +func (o *Consumer) GetGroupIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.GroupId, true +} + +// SetGroupId sets field value +func (o *Consumer) SetGroupId(v string) { + o.GroupId = v +} + +// GetTopic returns the Topic field value +func (o *Consumer) GetTopic() string { + if o == nil { + var ret string + return ret + } + + return o.Topic +} + +// GetTopicOk returns a tuple with the Topic field value +// and a boolean to check if the value has been set. +func (o *Consumer) GetTopicOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Topic, true +} + +// SetTopic sets field value +func (o *Consumer) SetTopic(v string) { + o.Topic = v +} + +// GetPartition returns the Partition field value +func (o *Consumer) GetPartition() int32 { + if o == nil { + var ret int32 + return ret + } + + return o.Partition +} + +// GetPartitionOk returns a tuple with the Partition field value +// and a boolean to check if the value has been set. +func (o *Consumer) GetPartitionOk() (*int32, bool) { + if o == nil { + return nil, false + } + return &o.Partition, true +} + +// SetPartition sets field value +func (o *Consumer) SetPartition(v int32) { + o.Partition = v +} + +// GetOffset returns the Offset field value +func (o *Consumer) GetOffset() float32 { + if o == nil { + var ret float32 + return ret + } + + return o.Offset +} + +// GetOffsetOk returns a tuple with the Offset field value +// and a boolean to check if the value has been set. +func (o *Consumer) GetOffsetOk() (*float32, bool) { + if o == nil { + return nil, false + } + return &o.Offset, true +} + +// SetOffset sets field value +func (o *Consumer) SetOffset(v float32) { + o.Offset = v +} + +// GetLogEndOffset returns the LogEndOffset field value if set, zero value otherwise. +func (o *Consumer) GetLogEndOffset() float32 { + if o == nil || o.LogEndOffset == nil { + var ret float32 + return ret + } + return *o.LogEndOffset +} + +// GetLogEndOffsetOk returns a tuple with the LogEndOffset field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Consumer) GetLogEndOffsetOk() (*float32, bool) { + if o == nil || o.LogEndOffset == nil { + return nil, false + } + return o.LogEndOffset, true +} + +// HasLogEndOffset returns a boolean if a field has been set. +func (o *Consumer) HasLogEndOffset() bool { + if o != nil && o.LogEndOffset != nil { + return true + } + + return false +} + +// SetLogEndOffset gets a reference to the given float32 and assigns it to the LogEndOffset field. +func (o *Consumer) SetLogEndOffset(v float32) { + o.LogEndOffset = &v +} + +// GetLag returns the Lag field value +func (o *Consumer) GetLag() int32 { + if o == nil { + var ret int32 + return ret + } + + return o.Lag +} + +// GetLagOk returns a tuple with the Lag field value +// and a boolean to check if the value has been set. +func (o *Consumer) GetLagOk() (*int32, bool) { + if o == nil { + return nil, false + } + return &o.Lag, true +} + +// SetLag sets field value +func (o *Consumer) SetLag(v int32) { + o.Lag = v +} + +// GetMemberId returns the MemberId field value if set, zero value otherwise. +func (o *Consumer) GetMemberId() string { + if o == nil || o.MemberId == nil { + var ret string + return ret + } + return *o.MemberId +} + +// GetMemberIdOk returns a tuple with the MemberId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Consumer) GetMemberIdOk() (*string, bool) { + if o == nil || o.MemberId == nil { + return nil, false + } + return o.MemberId, true +} + +// HasMemberId returns a boolean if a field has been set. +func (o *Consumer) HasMemberId() bool { + if o != nil && o.MemberId != nil { + return true + } + + return false +} + +// SetMemberId gets a reference to the given string and assigns it to the MemberId field. +func (o *Consumer) SetMemberId(v string) { + o.MemberId = &v +} + +func (o Consumer) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if true { + toSerialize["groupId"] = o.GroupId + } + if true { + toSerialize["topic"] = o.Topic + } + if true { + toSerialize["partition"] = o.Partition + } + if true { + toSerialize["offset"] = o.Offset + } + if o.LogEndOffset != nil { + toSerialize["logEndOffset"] = o.LogEndOffset + } + if true { + toSerialize["lag"] = o.Lag + } + if o.MemberId != nil { + toSerialize["memberId"] = o.MemberId + } + return json.Marshal(toSerialize) +} + +type NullableConsumer struct { + value *Consumer + isSet bool +} + +func (v NullableConsumer) Get() *Consumer { + return v.value +} + +func (v *NullableConsumer) Set(val *Consumer) { + v.value = val + v.isSet = true +} + +func (v NullableConsumer) IsSet() bool { + return v.isSet +} + +func (v *NullableConsumer) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableConsumer(val *Consumer) *NullableConsumer { + return &NullableConsumer{value: val, isSet: true} +} + +func (v NullableConsumer) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableConsumer) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/kafkaadmin/apiv1internal/model_consumer_group.go b/kafkaadmin/apiv1internal/model_consumer_group.go new file mode 100644 index 00000000..22691fb5 --- /dev/null +++ b/kafkaadmin/apiv1internal/model_consumer_group.go @@ -0,0 +1,139 @@ +/* + * Kafka Admin REST API + * + * An API to provide REST endpoints for query Kafka for admin operations + * + * API version: 0.1.0 + */ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package kafkaadmin + +import ( + "encoding/json" +) + +// ConsumerGroup A group of Kafka consumers +type ConsumerGroup struct { + // Unique identifier for the consumer group + GroupId string `json:"groupId"` + // The list of consumers associated with this consumer group + Consumers []Consumer `json:"consumers"` +} + +// NewConsumerGroup instantiates a new ConsumerGroup object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewConsumerGroup(groupId string, consumers []Consumer) *ConsumerGroup { + this := ConsumerGroup{} + this.GroupId = groupId + this.Consumers = consumers + return &this +} + +// NewConsumerGroupWithDefaults instantiates a new ConsumerGroup object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewConsumerGroupWithDefaults() *ConsumerGroup { + this := ConsumerGroup{} + return &this +} + +// GetGroupId returns the GroupId field value +func (o *ConsumerGroup) GetGroupId() string { + if o == nil { + var ret string + return ret + } + + return o.GroupId +} + +// GetGroupIdOk returns a tuple with the GroupId field value +// and a boolean to check if the value has been set. +func (o *ConsumerGroup) GetGroupIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.GroupId, true +} + +// SetGroupId sets field value +func (o *ConsumerGroup) SetGroupId(v string) { + o.GroupId = v +} + +// GetConsumers returns the Consumers field value +func (o *ConsumerGroup) GetConsumers() []Consumer { + if o == nil { + var ret []Consumer + return ret + } + + return o.Consumers +} + +// GetConsumersOk returns a tuple with the Consumers field value +// and a boolean to check if the value has been set. +func (o *ConsumerGroup) GetConsumersOk() (*[]Consumer, bool) { + if o == nil { + return nil, false + } + return &o.Consumers, true +} + +// SetConsumers sets field value +func (o *ConsumerGroup) SetConsumers(v []Consumer) { + o.Consumers = v +} + +func (o ConsumerGroup) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if true { + toSerialize["groupId"] = o.GroupId + } + if true { + toSerialize["consumers"] = o.Consumers + } + return json.Marshal(toSerialize) +} + +type NullableConsumerGroup struct { + value *ConsumerGroup + isSet bool +} + +func (v NullableConsumerGroup) Get() *ConsumerGroup { + return v.value +} + +func (v *NullableConsumerGroup) Set(val *ConsumerGroup) { + v.value = val + v.isSet = true +} + +func (v NullableConsumerGroup) IsSet() bool { + return v.isSet +} + +func (v *NullableConsumerGroup) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableConsumerGroup(val *ConsumerGroup) *NullableConsumerGroup { + return &NullableConsumerGroup{value: val, isSet: true} +} + +func (v NullableConsumerGroup) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableConsumerGroup) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/kafkaadmin/apiv1internal/model_consumer_group_list.go b/kafkaadmin/apiv1internal/model_consumer_group_list.go new file mode 100644 index 00000000..d21cdda9 --- /dev/null +++ b/kafkaadmin/apiv1internal/model_consumer_group_list.go @@ -0,0 +1,199 @@ +/* + * Kafka Admin REST API + * + * An API to provide REST endpoints for query Kafka for admin operations + * + * API version: 0.1.0 + */ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package kafkaadmin + +import ( + "encoding/json" +) + +// ConsumerGroupList A list of consumer groups +type ConsumerGroupList struct { + // Consumer group list items + Items []ConsumerGroup `json:"items"` + // The total number of consumer groups. + Count float32 `json:"count"` + // The number of consumer groups per page. + Limit float32 `json:"limit"` + // The page offset + Offset int32 `json:"offset"` +} + +// NewConsumerGroupList instantiates a new ConsumerGroupList object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewConsumerGroupList(items []ConsumerGroup, count float32, limit float32, offset int32) *ConsumerGroupList { + this := ConsumerGroupList{} + this.Items = items + this.Count = count + this.Limit = limit + this.Offset = offset + return &this +} + +// NewConsumerGroupListWithDefaults instantiates a new ConsumerGroupList object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewConsumerGroupListWithDefaults() *ConsumerGroupList { + this := ConsumerGroupList{} + return &this +} + +// GetItems returns the Items field value +func (o *ConsumerGroupList) GetItems() []ConsumerGroup { + if o == nil { + var ret []ConsumerGroup + return ret + } + + return o.Items +} + +// GetItemsOk returns a tuple with the Items field value +// and a boolean to check if the value has been set. +func (o *ConsumerGroupList) GetItemsOk() (*[]ConsumerGroup, bool) { + if o == nil { + return nil, false + } + return &o.Items, true +} + +// SetItems sets field value +func (o *ConsumerGroupList) SetItems(v []ConsumerGroup) { + o.Items = v +} + +// GetCount returns the Count field value +func (o *ConsumerGroupList) GetCount() float32 { + if o == nil { + var ret float32 + return ret + } + + return o.Count +} + +// GetCountOk returns a tuple with the Count field value +// and a boolean to check if the value has been set. +func (o *ConsumerGroupList) GetCountOk() (*float32, bool) { + if o == nil { + return nil, false + } + return &o.Count, true +} + +// SetCount sets field value +func (o *ConsumerGroupList) SetCount(v float32) { + o.Count = v +} + +// GetLimit returns the Limit field value +func (o *ConsumerGroupList) GetLimit() float32 { + if o == nil { + var ret float32 + return ret + } + + return o.Limit +} + +// GetLimitOk returns a tuple with the Limit field value +// and a boolean to check if the value has been set. +func (o *ConsumerGroupList) GetLimitOk() (*float32, bool) { + if o == nil { + return nil, false + } + return &o.Limit, true +} + +// SetLimit sets field value +func (o *ConsumerGroupList) SetLimit(v float32) { + o.Limit = v +} + +// GetOffset returns the Offset field value +func (o *ConsumerGroupList) GetOffset() int32 { + if o == nil { + var ret int32 + return ret + } + + return o.Offset +} + +// GetOffsetOk returns a tuple with the Offset field value +// and a boolean to check if the value has been set. +func (o *ConsumerGroupList) GetOffsetOk() (*int32, bool) { + if o == nil { + return nil, false + } + return &o.Offset, true +} + +// SetOffset sets field value +func (o *ConsumerGroupList) SetOffset(v int32) { + o.Offset = v +} + +func (o ConsumerGroupList) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if true { + toSerialize["items"] = o.Items + } + if true { + toSerialize["count"] = o.Count + } + if true { + toSerialize["limit"] = o.Limit + } + if true { + toSerialize["offset"] = o.Offset + } + return json.Marshal(toSerialize) +} + +type NullableConsumerGroupList struct { + value *ConsumerGroupList + isSet bool +} + +func (v NullableConsumerGroupList) Get() *ConsumerGroupList { + return v.value +} + +func (v *NullableConsumerGroupList) Set(val *ConsumerGroupList) { + v.value = val + v.isSet = true +} + +func (v NullableConsumerGroupList) IsSet() bool { + return v.isSet +} + +func (v *NullableConsumerGroupList) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableConsumerGroupList(val *ConsumerGroupList) *NullableConsumerGroupList { + return &NullableConsumerGroupList{value: val, isSet: true} +} + +func (v NullableConsumerGroupList) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableConsumerGroupList) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/kafkaadmin/apiv1internal/model_new_topic_input.go b/kafkaadmin/apiv1internal/model_new_topic_input.go new file mode 100644 index 00000000..d166fbc9 --- /dev/null +++ b/kafkaadmin/apiv1internal/model_new_topic_input.go @@ -0,0 +1,138 @@ +/* + * Kafka Admin REST API + * + * An API to provide REST endpoints for query Kafka for admin operations + * + * API version: 0.1.0 + */ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package kafkaadmin + +import ( + "encoding/json" +) + +// NewTopicInput Input object to create a new topic. +type NewTopicInput struct { + // The topic name, this value must be unique. + Name string `json:"name"` + Settings TopicSettings `json:"settings"` +} + +// NewNewTopicInput instantiates a new NewTopicInput object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewNewTopicInput(name string, settings TopicSettings) *NewTopicInput { + this := NewTopicInput{} + this.Name = name + this.Settings = settings + return &this +} + +// NewNewTopicInputWithDefaults instantiates a new NewTopicInput object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewNewTopicInputWithDefaults() *NewTopicInput { + this := NewTopicInput{} + return &this +} + +// GetName returns the Name field value +func (o *NewTopicInput) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *NewTopicInput) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *NewTopicInput) SetName(v string) { + o.Name = v +} + +// GetSettings returns the Settings field value +func (o *NewTopicInput) GetSettings() TopicSettings { + if o == nil { + var ret TopicSettings + return ret + } + + return o.Settings +} + +// GetSettingsOk returns a tuple with the Settings field value +// and a boolean to check if the value has been set. +func (o *NewTopicInput) GetSettingsOk() (*TopicSettings, bool) { + if o == nil { + return nil, false + } + return &o.Settings, true +} + +// SetSettings sets field value +func (o *NewTopicInput) SetSettings(v TopicSettings) { + o.Settings = v +} + +func (o NewTopicInput) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if true { + toSerialize["name"] = o.Name + } + if true { + toSerialize["settings"] = o.Settings + } + return json.Marshal(toSerialize) +} + +type NullableNewTopicInput struct { + value *NewTopicInput + isSet bool +} + +func (v NullableNewTopicInput) Get() *NewTopicInput { + return v.value +} + +func (v *NullableNewTopicInput) Set(val *NewTopicInput) { + v.value = val + v.isSet = true +} + +func (v NullableNewTopicInput) IsSet() bool { + return v.isSet +} + +func (v *NullableNewTopicInput) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableNewTopicInput(val *NewTopicInput) *NullableNewTopicInput { + return &NullableNewTopicInput{value: val, isSet: true} +} + +func (v NullableNewTopicInput) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableNewTopicInput) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/kafkaadmin/apiv1internal/model_partition.go b/kafkaadmin/apiv1internal/model_partition.go new file mode 100644 index 00000000..162dc8a7 --- /dev/null +++ b/kafkaadmin/apiv1internal/model_partition.go @@ -0,0 +1,220 @@ +/* + * Kafka Admin REST API + * + * An API to provide REST endpoints for query Kafka for admin operations + * + * API version: 0.1.0 + */ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package kafkaadmin + +import ( + "encoding/json" +) + +// Partition Kafka topic partition +type Partition struct { + // Uniquie id for the partition + Id int32 `json:"id"` + // List of replicas for the partition + Replicas *[]map[string]interface{} `json:"replicas,omitempty"` + // List isync-replicas for this partition. + Isr *[]map[string]interface{} `json:"isr,omitempty"` + // Kafka server / broker. + Leader *map[string]interface{} `json:"leader,omitempty"` +} + +// NewPartition instantiates a new Partition object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewPartition(id int32) *Partition { + this := Partition{} + this.Id = id + return &this +} + +// NewPartitionWithDefaults instantiates a new Partition object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewPartitionWithDefaults() *Partition { + this := Partition{} + return &this +} + +// GetId returns the Id field value +func (o *Partition) GetId() int32 { + if o == nil { + var ret int32 + return ret + } + + return o.Id +} + +// GetIdOk returns a tuple with the Id field value +// and a boolean to check if the value has been set. +func (o *Partition) GetIdOk() (*int32, bool) { + if o == nil { + return nil, false + } + return &o.Id, true +} + +// SetId sets field value +func (o *Partition) SetId(v int32) { + o.Id = v +} + +// GetReplicas returns the Replicas field value if set, zero value otherwise. +func (o *Partition) GetReplicas() []map[string]interface{} { + if o == nil || o.Replicas == nil { + var ret []map[string]interface{} + return ret + } + return *o.Replicas +} + +// GetReplicasOk returns a tuple with the Replicas field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Partition) GetReplicasOk() (*[]map[string]interface{}, bool) { + if o == nil || o.Replicas == nil { + return nil, false + } + return o.Replicas, true +} + +// HasReplicas returns a boolean if a field has been set. +func (o *Partition) HasReplicas() bool { + if o != nil && o.Replicas != nil { + return true + } + + return false +} + +// SetReplicas gets a reference to the given []map[string]interface{} and assigns it to the Replicas field. +func (o *Partition) SetReplicas(v []map[string]interface{}) { + o.Replicas = &v +} + +// GetIsr returns the Isr field value if set, zero value otherwise. +func (o *Partition) GetIsr() []map[string]interface{} { + if o == nil || o.Isr == nil { + var ret []map[string]interface{} + return ret + } + return *o.Isr +} + +// GetIsrOk returns a tuple with the Isr field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Partition) GetIsrOk() (*[]map[string]interface{}, bool) { + if o == nil || o.Isr == nil { + return nil, false + } + return o.Isr, true +} + +// HasIsr returns a boolean if a field has been set. +func (o *Partition) HasIsr() bool { + if o != nil && o.Isr != nil { + return true + } + + return false +} + +// SetIsr gets a reference to the given []map[string]interface{} and assigns it to the Isr field. +func (o *Partition) SetIsr(v []map[string]interface{}) { + o.Isr = &v +} + +// GetLeader returns the Leader field value if set, zero value otherwise. +func (o *Partition) GetLeader() map[string]interface{} { + if o == nil || o.Leader == nil { + var ret map[string]interface{} + return ret + } + return *o.Leader +} + +// GetLeaderOk returns a tuple with the Leader field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Partition) GetLeaderOk() (*map[string]interface{}, bool) { + if o == nil || o.Leader == nil { + return nil, false + } + return o.Leader, true +} + +// HasLeader returns a boolean if a field has been set. +func (o *Partition) HasLeader() bool { + if o != nil && o.Leader != nil { + return true + } + + return false +} + +// SetLeader gets a reference to the given map[string]interface{} and assigns it to the Leader field. +func (o *Partition) SetLeader(v map[string]interface{}) { + o.Leader = &v +} + +func (o Partition) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if true { + toSerialize["id"] = o.Id + } + if o.Replicas != nil { + toSerialize["replicas"] = o.Replicas + } + if o.Isr != nil { + toSerialize["isr"] = o.Isr + } + if o.Leader != nil { + toSerialize["leader"] = o.Leader + } + return json.Marshal(toSerialize) +} + +type NullablePartition struct { + value *Partition + isSet bool +} + +func (v NullablePartition) Get() *Partition { + return v.value +} + +func (v *NullablePartition) Set(val *Partition) { + v.value = val + v.isSet = true +} + +func (v NullablePartition) IsSet() bool { + return v.isSet +} + +func (v *NullablePartition) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePartition(val *Partition) *NullablePartition { + return &NullablePartition{value: val, isSet: true} +} + +func (v NullablePartition) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePartition) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/kafkaadmin/apiv1internal/model_topic.go b/kafkaadmin/apiv1internal/model_topic.go new file mode 100644 index 00000000..aee42182 --- /dev/null +++ b/kafkaadmin/apiv1internal/model_topic.go @@ -0,0 +1,190 @@ +/* + * Kafka Admin REST API + * + * An API to provide REST endpoints for query Kafka for admin operations + * + * API version: 0.1.0 + */ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package kafkaadmin + +import ( + "encoding/json" +) + +// Topic Kafka Topic (A feed where records are stored and published) +type Topic struct { + // The name of the topic. + Name *string `json:"name,omitempty"` + // Topic configuration entry. + Config *[]ConfigEntry `json:"config,omitempty"` + // Partitions for this topic. + Partitions *[]Partition `json:"partitions,omitempty"` +} + +// NewTopic instantiates a new Topic object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewTopic() *Topic { + this := Topic{} + return &this +} + +// NewTopicWithDefaults instantiates a new Topic object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewTopicWithDefaults() *Topic { + this := Topic{} + return &this +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *Topic) GetName() string { + if o == nil || o.Name == nil { + var ret string + return ret + } + return *o.Name +} + +// GetNameOk returns a tuple with the Name field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Topic) GetNameOk() (*string, bool) { + if o == nil || o.Name == nil { + return nil, false + } + return o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *Topic) HasName() bool { + if o != nil && o.Name != nil { + return true + } + + return false +} + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *Topic) SetName(v string) { + o.Name = &v +} + +// GetConfig returns the Config field value if set, zero value otherwise. +func (o *Topic) GetConfig() []ConfigEntry { + if o == nil || o.Config == nil { + var ret []ConfigEntry + return ret + } + return *o.Config +} + +// GetConfigOk returns a tuple with the Config field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Topic) GetConfigOk() (*[]ConfigEntry, bool) { + if o == nil || o.Config == nil { + return nil, false + } + return o.Config, true +} + +// HasConfig returns a boolean if a field has been set. +func (o *Topic) HasConfig() bool { + if o != nil && o.Config != nil { + return true + } + + return false +} + +// SetConfig gets a reference to the given []ConfigEntry and assigns it to the Config field. +func (o *Topic) SetConfig(v []ConfigEntry) { + o.Config = &v +} + +// GetPartitions returns the Partitions field value if set, zero value otherwise. +func (o *Topic) GetPartitions() []Partition { + if o == nil || o.Partitions == nil { + var ret []Partition + return ret + } + return *o.Partitions +} + +// GetPartitionsOk returns a tuple with the Partitions field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Topic) GetPartitionsOk() (*[]Partition, bool) { + if o == nil || o.Partitions == nil { + return nil, false + } + return o.Partitions, true +} + +// HasPartitions returns a boolean if a field has been set. +func (o *Topic) HasPartitions() bool { + if o != nil && o.Partitions != nil { + return true + } + + return false +} + +// SetPartitions gets a reference to the given []Partition and assigns it to the Partitions field. +func (o *Topic) SetPartitions(v []Partition) { + o.Partitions = &v +} + +func (o Topic) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.Name != nil { + toSerialize["name"] = o.Name + } + if o.Config != nil { + toSerialize["config"] = o.Config + } + if o.Partitions != nil { + toSerialize["partitions"] = o.Partitions + } + return json.Marshal(toSerialize) +} + +type NullableTopic struct { + value *Topic + isSet bool +} + +func (v NullableTopic) Get() *Topic { + return v.value +} + +func (v *NullableTopic) Set(val *Topic) { + v.value = val + v.isSet = true +} + +func (v NullableTopic) IsSet() bool { + return v.isSet +} + +func (v *NullableTopic) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableTopic(val *Topic) *NullableTopic { + return &NullableTopic{value: val, isSet: true} +} + +func (v NullableTopic) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableTopic) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/kafkaadmin/apiv1internal/model_topic_settings.go b/kafkaadmin/apiv1internal/model_topic_settings.go new file mode 100644 index 00000000..c25d4402 --- /dev/null +++ b/kafkaadmin/apiv1internal/model_topic_settings.go @@ -0,0 +1,146 @@ +/* + * Kafka Admin REST API + * + * An API to provide REST endpoints for query Kafka for admin operations + * + * API version: 0.1.0 + */ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package kafkaadmin + +import ( + "encoding/json" +) + +// TopicSettings Kafka Topic (A feed where records are stored and published) +type TopicSettings struct { + // Number of partitions for this topic. + NumPartitions int32 `json:"numPartitions"` + // Topic configuration entry. + Config *[]ConfigEntry `json:"config,omitempty"` +} + +// NewTopicSettings instantiates a new TopicSettings object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewTopicSettings(numPartitions int32) *TopicSettings { + this := TopicSettings{} + this.NumPartitions = numPartitions + return &this +} + +// NewTopicSettingsWithDefaults instantiates a new TopicSettings object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewTopicSettingsWithDefaults() *TopicSettings { + this := TopicSettings{} + return &this +} + +// GetNumPartitions returns the NumPartitions field value +func (o *TopicSettings) GetNumPartitions() int32 { + if o == nil { + var ret int32 + return ret + } + + return o.NumPartitions +} + +// GetNumPartitionsOk returns a tuple with the NumPartitions field value +// and a boolean to check if the value has been set. +func (o *TopicSettings) GetNumPartitionsOk() (*int32, bool) { + if o == nil { + return nil, false + } + return &o.NumPartitions, true +} + +// SetNumPartitions sets field value +func (o *TopicSettings) SetNumPartitions(v int32) { + o.NumPartitions = v +} + +// GetConfig returns the Config field value if set, zero value otherwise. +func (o *TopicSettings) GetConfig() []ConfigEntry { + if o == nil || o.Config == nil { + var ret []ConfigEntry + return ret + } + return *o.Config +} + +// GetConfigOk returns a tuple with the Config field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TopicSettings) GetConfigOk() (*[]ConfigEntry, bool) { + if o == nil || o.Config == nil { + return nil, false + } + return o.Config, true +} + +// HasConfig returns a boolean if a field has been set. +func (o *TopicSettings) HasConfig() bool { + if o != nil && o.Config != nil { + return true + } + + return false +} + +// SetConfig gets a reference to the given []ConfigEntry and assigns it to the Config field. +func (o *TopicSettings) SetConfig(v []ConfigEntry) { + o.Config = &v +} + +func (o TopicSettings) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if true { + toSerialize["numPartitions"] = o.NumPartitions + } + if o.Config != nil { + toSerialize["config"] = o.Config + } + return json.Marshal(toSerialize) +} + +type NullableTopicSettings struct { + value *TopicSettings + isSet bool +} + +func (v NullableTopicSettings) Get() *TopicSettings { + return v.value +} + +func (v *NullableTopicSettings) Set(val *TopicSettings) { + v.value = val + v.isSet = true +} + +func (v NullableTopicSettings) IsSet() bool { + return v.isSet +} + +func (v *NullableTopicSettings) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableTopicSettings(val *TopicSettings) *NullableTopicSettings { + return &NullableTopicSettings{value: val, isSet: true} +} + +func (v NullableTopicSettings) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableTopicSettings) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/kafkaadmin/apiv1internal/model_topics_list.go b/kafkaadmin/apiv1internal/model_topics_list.go new file mode 100644 index 00000000..fc30a712 --- /dev/null +++ b/kafkaadmin/apiv1internal/model_topics_list.go @@ -0,0 +1,199 @@ +/* + * Kafka Admin REST API + * + * An API to provide REST endpoints for query Kafka for admin operations + * + * API version: 0.1.0 + */ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package kafkaadmin + +import ( + "encoding/json" +) + +// TopicsList A list of topics. +type TopicsList struct { + // The page offset + Offset int32 `json:"offset"` + // number of entries per page + Limit int32 `json:"limit"` + // Total number of topics + Count int32 `json:"count"` + // List of topics + Items []Topic `json:"items"` +} + +// NewTopicsList instantiates a new TopicsList object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewTopicsList(offset int32, limit int32, count int32, items []Topic) *TopicsList { + this := TopicsList{} + this.Offset = offset + this.Limit = limit + this.Count = count + this.Items = items + return &this +} + +// NewTopicsListWithDefaults instantiates a new TopicsList object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewTopicsListWithDefaults() *TopicsList { + this := TopicsList{} + return &this +} + +// GetOffset returns the Offset field value +func (o *TopicsList) GetOffset() int32 { + if o == nil { + var ret int32 + return ret + } + + return o.Offset +} + +// GetOffsetOk returns a tuple with the Offset field value +// and a boolean to check if the value has been set. +func (o *TopicsList) GetOffsetOk() (*int32, bool) { + if o == nil { + return nil, false + } + return &o.Offset, true +} + +// SetOffset sets field value +func (o *TopicsList) SetOffset(v int32) { + o.Offset = v +} + +// GetLimit returns the Limit field value +func (o *TopicsList) GetLimit() int32 { + if o == nil { + var ret int32 + return ret + } + + return o.Limit +} + +// GetLimitOk returns a tuple with the Limit field value +// and a boolean to check if the value has been set. +func (o *TopicsList) GetLimitOk() (*int32, bool) { + if o == nil { + return nil, false + } + return &o.Limit, true +} + +// SetLimit sets field value +func (o *TopicsList) SetLimit(v int32) { + o.Limit = v +} + +// GetCount returns the Count field value +func (o *TopicsList) GetCount() int32 { + if o == nil { + var ret int32 + return ret + } + + return o.Count +} + +// GetCountOk returns a tuple with the Count field value +// and a boolean to check if the value has been set. +func (o *TopicsList) GetCountOk() (*int32, bool) { + if o == nil { + return nil, false + } + return &o.Count, true +} + +// SetCount sets field value +func (o *TopicsList) SetCount(v int32) { + o.Count = v +} + +// GetItems returns the Items field value +func (o *TopicsList) GetItems() []Topic { + if o == nil { + var ret []Topic + return ret + } + + return o.Items +} + +// GetItemsOk returns a tuple with the Items field value +// and a boolean to check if the value has been set. +func (o *TopicsList) GetItemsOk() (*[]Topic, bool) { + if o == nil { + return nil, false + } + return &o.Items, true +} + +// SetItems sets field value +func (o *TopicsList) SetItems(v []Topic) { + o.Items = v +} + +func (o TopicsList) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if true { + toSerialize["offset"] = o.Offset + } + if true { + toSerialize["limit"] = o.Limit + } + if true { + toSerialize["count"] = o.Count + } + if true { + toSerialize["items"] = o.Items + } + return json.Marshal(toSerialize) +} + +type NullableTopicsList struct { + value *TopicsList + isSet bool +} + +func (v NullableTopicsList) Get() *TopicsList { + return v.value +} + +func (v *NullableTopicsList) Set(val *TopicsList) { + v.value = val + v.isSet = true +} + +func (v NullableTopicsList) IsSet() bool { + return v.isSet +} + +func (v *NullableTopicsList) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableTopicsList(val *TopicsList) *NullableTopicsList { + return &NullableTopicsList{value: val, isSet: true} +} + +func (v NullableTopicsList) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableTopicsList) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/kafkaadmin/apiv1internal/model_update_topic_input.go b/kafkaadmin/apiv1internal/model_update_topic_input.go new file mode 100644 index 00000000..2c59342f --- /dev/null +++ b/kafkaadmin/apiv1internal/model_update_topic_input.go @@ -0,0 +1,116 @@ +/* + * Kafka Admin REST API + * + * An API to provide REST endpoints for query Kafka for admin operations + * + * API version: 0.1.0 + */ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package kafkaadmin + +import ( + "encoding/json" +) + +// UpdateTopicInput Kafka Topic (A feed where records are stored and published) +type UpdateTopicInput struct { + // Topic configuration entry. + Config *[]ConfigEntry `json:"config,omitempty"` +} + +// NewUpdateTopicInput instantiates a new UpdateTopicInput object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewUpdateTopicInput() *UpdateTopicInput { + this := UpdateTopicInput{} + return &this +} + +// NewUpdateTopicInputWithDefaults instantiates a new UpdateTopicInput object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewUpdateTopicInputWithDefaults() *UpdateTopicInput { + this := UpdateTopicInput{} + return &this +} + +// GetConfig returns the Config field value if set, zero value otherwise. +func (o *UpdateTopicInput) GetConfig() []ConfigEntry { + if o == nil || o.Config == nil { + var ret []ConfigEntry + return ret + } + return *o.Config +} + +// GetConfigOk returns a tuple with the Config field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UpdateTopicInput) GetConfigOk() (*[]ConfigEntry, bool) { + if o == nil || o.Config == nil { + return nil, false + } + return o.Config, true +} + +// HasConfig returns a boolean if a field has been set. +func (o *UpdateTopicInput) HasConfig() bool { + if o != nil && o.Config != nil { + return true + } + + return false +} + +// SetConfig gets a reference to the given []ConfigEntry and assigns it to the Config field. +func (o *UpdateTopicInput) SetConfig(v []ConfigEntry) { + o.Config = &v +} + +func (o UpdateTopicInput) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.Config != nil { + toSerialize["config"] = o.Config + } + return json.Marshal(toSerialize) +} + +type NullableUpdateTopicInput struct { + value *UpdateTopicInput + isSet bool +} + +func (v NullableUpdateTopicInput) Get() *UpdateTopicInput { + return v.value +} + +func (v *NullableUpdateTopicInput) Set(val *UpdateTopicInput) { + v.value = val + v.isSet = true +} + +func (v NullableUpdateTopicInput) IsSet() bool { + return v.isSet +} + +func (v *NullableUpdateTopicInput) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableUpdateTopicInput(val *UpdateTopicInput) *NullableUpdateTopicInput { + return &NullableUpdateTopicInput{value: val, isSet: true} +} + +func (v NullableUpdateTopicInput) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableUpdateTopicInput) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/kafkaadmin/apiv1internal/response.go b/kafkaadmin/apiv1internal/response.go new file mode 100644 index 00000000..4569ab7c --- /dev/null +++ b/kafkaadmin/apiv1internal/response.go @@ -0,0 +1,47 @@ +/* + * Kafka Admin REST API + * + * An API to provide REST endpoints for query Kafka for admin operations + * + * API version: 0.1.0 + */ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package kafkaadmin + +import ( + "net/http" +) + +// APIResponse stores the API response returned by the server. +type APIResponse struct { + *http.Response `json:"-"` + Message string `json:"message,omitempty"` + // Operation is the name of the OpenAPI operation. + Operation string `json:"operation,omitempty"` + // RequestURL is the request URL. This value is always available, even if the + // embedded *http.Response is nil. + RequestURL string `json:"url,omitempty"` + // Method is the HTTP method used for the request. This value is always + // available, even if the embedded *http.Response is nil. + Method string `json:"method,omitempty"` + // Payload holds the contents of the response body (which may be nil or empty). + // This is provided here as the raw response.Body() reader will have already + // been drained. + Payload []byte `json:"-"` +} + +// NewAPIResponse returns a new APIResponse object. +func NewAPIResponse(r *http.Response) *APIResponse { + + response := &APIResponse{Response: r} + return response +} + +// NewAPIResponseWithError returns a new APIResponse object with the provided error message. +func NewAPIResponseWithError(errorMessage string) *APIResponse { + + response := &APIResponse{Message: errorMessage} + return response +} diff --git a/kafkaadmin/apiv1internal/utils.go b/kafkaadmin/apiv1internal/utils.go new file mode 100644 index 00000000..9d9ee001 --- /dev/null +++ b/kafkaadmin/apiv1internal/utils.go @@ -0,0 +1,328 @@ +/* + * Kafka Admin REST API + * + * An API to provide REST endpoints for query Kafka for admin operations + * + * API version: 0.1.0 + */ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package kafkaadmin + +import ( + "encoding/json" + "time" +) + +// PtrBool is a helper routine that returns a pointer to given boolean value. +func PtrBool(v bool) *bool { return &v } + +// PtrInt is a helper routine that returns a pointer to given integer value. +func PtrInt(v int) *int { return &v } + +// PtrInt32 is a helper routine that returns a pointer to given integer value. +func PtrInt32(v int32) *int32 { return &v } + +// PtrInt64 is a helper routine that returns a pointer to given integer value. +func PtrInt64(v int64) *int64 { return &v } + +// PtrFloat32 is a helper routine that returns a pointer to given float value. +func PtrFloat32(v float32) *float32 { return &v } + +// PtrFloat64 is a helper routine that returns a pointer to given float value. +func PtrFloat64(v float64) *float64 { return &v } + +// PtrString is a helper routine that returns a pointer to given string value. +func PtrString(v string) *string { return &v } + +// PtrTime is helper routine that returns a pointer to given Time value. +func PtrTime(v time.Time) *time.Time { return &v } + +type NullableBool struct { + value *bool + isSet bool +} + +func (v NullableBool) Get() *bool { + return v.value +} + +func (v *NullableBool) Set(val *bool) { + v.value = val + v.isSet = true +} + +func (v NullableBool) IsSet() bool { + return v.isSet +} + +func (v *NullableBool) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableBool(val *bool) *NullableBool { + return &NullableBool{value: val, isSet: true} +} + +func (v NullableBool) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableBool) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + +type NullableInt struct { + value *int + isSet bool +} + +func (v NullableInt) Get() *int { + return v.value +} + +func (v *NullableInt) Set(val *int) { + v.value = val + v.isSet = true +} + +func (v NullableInt) IsSet() bool { + return v.isSet +} + +func (v *NullableInt) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableInt(val *int) *NullableInt { + return &NullableInt{value: val, isSet: true} +} + +func (v NullableInt) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableInt) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + +type NullableInt32 struct { + value *int32 + isSet bool +} + +func (v NullableInt32) Get() *int32 { + return v.value +} + +func (v *NullableInt32) Set(val *int32) { + v.value = val + v.isSet = true +} + +func (v NullableInt32) IsSet() bool { + return v.isSet +} + +func (v *NullableInt32) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableInt32(val *int32) *NullableInt32 { + return &NullableInt32{value: val, isSet: true} +} + +func (v NullableInt32) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableInt32) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + +type NullableInt64 struct { + value *int64 + isSet bool +} + +func (v NullableInt64) Get() *int64 { + return v.value +} + +func (v *NullableInt64) Set(val *int64) { + v.value = val + v.isSet = true +} + +func (v NullableInt64) IsSet() bool { + return v.isSet +} + +func (v *NullableInt64) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableInt64(val *int64) *NullableInt64 { + return &NullableInt64{value: val, isSet: true} +} + +func (v NullableInt64) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableInt64) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + +type NullableFloat32 struct { + value *float32 + isSet bool +} + +func (v NullableFloat32) Get() *float32 { + return v.value +} + +func (v *NullableFloat32) Set(val *float32) { + v.value = val + v.isSet = true +} + +func (v NullableFloat32) IsSet() bool { + return v.isSet +} + +func (v *NullableFloat32) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableFloat32(val *float32) *NullableFloat32 { + return &NullableFloat32{value: val, isSet: true} +} + +func (v NullableFloat32) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableFloat32) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + +type NullableFloat64 struct { + value *float64 + isSet bool +} + +func (v NullableFloat64) Get() *float64 { + return v.value +} + +func (v *NullableFloat64) Set(val *float64) { + v.value = val + v.isSet = true +} + +func (v NullableFloat64) IsSet() bool { + return v.isSet +} + +func (v *NullableFloat64) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableFloat64(val *float64) *NullableFloat64 { + return &NullableFloat64{value: val, isSet: true} +} + +func (v NullableFloat64) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableFloat64) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + +type NullableString struct { + value *string + isSet bool +} + +func (v NullableString) Get() *string { + return v.value +} + +func (v *NullableString) Set(val *string) { + v.value = val + v.isSet = true +} + +func (v NullableString) IsSet() bool { + return v.isSet +} + +func (v *NullableString) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableString(val *string) *NullableString { + return &NullableString{value: val, isSet: true} +} + +func (v NullableString) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableString) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + +type NullableTime struct { + value *time.Time + isSet bool +} + +func (v NullableTime) Get() *time.Time { + return v.value +} + +func (v *NullableTime) Set(val *time.Time) { + v.value = val + v.isSet = true +} + +func (v NullableTime) IsSet() bool { + return v.isSet +} + +func (v *NullableTime) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableTime(val *time.Time) *NullableTime { + return &NullableTime{value: val, isSet: true} +} + +func (v NullableTime) MarshalJSON() ([]byte, error) { + return v.value.MarshalJSON() +} + +func (v *NullableTime) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/kafkaadmin/go.mod b/kafkaadmin/go.mod new file mode 100644 index 00000000..9e2e0eba --- /dev/null +++ b/kafkaadmin/go.mod @@ -0,0 +1,5 @@ +module github.com/redhat-developer/app-services-sdk-go/kafkaadmin + +go 1.13 + +require golang.org/x/oauth2 v0.0.0-20210514164344-f6687ab2804c diff --git a/kafkaadmin/go.sum b/kafkaadmin/go.sum new file mode 100644 index 00000000..ab0770af --- /dev/null +++ b/kafkaadmin/go.sum @@ -0,0 +1,362 @@ +cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= +cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= +cloud.google.com/go v0.38.0/go.mod h1:990N+gfupTy94rShfmMCWGDn0LpTmnzTp2qbd1dvSRU= +cloud.google.com/go v0.44.1/go.mod h1:iSa0KzasP4Uvy3f1mN/7PiObzGgflwredwwASm/v6AU= +cloud.google.com/go v0.44.2/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY= +cloud.google.com/go v0.45.1/go.mod h1:RpBamKRgapWJb87xiFSdk4g1CME7QZg3uwTez+TSTjc= +cloud.google.com/go v0.46.3/go.mod h1:a6bKKbmY7er1mI7TEI4lsAkts/mkhTSZK8w33B4RAg0= +cloud.google.com/go v0.50.0/go.mod h1:r9sluTvynVuxRIOHXQEHMFffphuXHOMZMycpNR5e6To= +cloud.google.com/go v0.52.0/go.mod h1:pXajvRH/6o3+F9jDHZWQ5PbGhn+o8w9qiu/CffaVdO4= +cloud.google.com/go v0.53.0/go.mod h1:fp/UouUEsRkN6ryDKNW/Upv/JBKnv6WDthjR6+vze6M= +cloud.google.com/go v0.54.0/go.mod h1:1rq2OEkV3YMf6n/9ZvGWI3GWw0VoqH/1x2nd8Is/bPc= +cloud.google.com/go v0.56.0/go.mod h1:jr7tqZxxKOVYizybht9+26Z/gUq7tiRzu+ACVAMbKVk= +cloud.google.com/go v0.57.0/go.mod h1:oXiQ6Rzq3RAkkY7N6t3TcE6jE+CIBBbA36lwQ1JyzZs= +cloud.google.com/go v0.62.0/go.mod h1:jmCYTdRCQuc1PHIIJ/maLInMho30T/Y0M4hTdTShOYc= +cloud.google.com/go v0.65.0/go.mod h1:O5N8zS7uWy9vkA9vayVHs65eM1ubvY4h553ofrNHObY= +cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o= +cloud.google.com/go/bigquery v1.3.0/go.mod h1:PjpwJnslEMmckchkHFfq+HTD2DmtT67aNFKH1/VBDHE= +cloud.google.com/go/bigquery v1.4.0/go.mod h1:S8dzgnTigyfTmLBfrtrhyYhwRxG72rYxvftPBK2Dvzc= +cloud.google.com/go/bigquery v1.5.0/go.mod h1:snEHRnqQbz117VIFhE8bmtwIDY80NLUZUMb4Nv6dBIg= +cloud.google.com/go/bigquery v1.7.0/go.mod h1://okPTzCYNXSlb24MZs83e2Do+h+VXtc4gLoIoXIAPc= +cloud.google.com/go/bigquery v1.8.0/go.mod h1:J5hqkt3O0uAFnINi6JXValWIb1v0goeZM77hZzJN/fQ= +cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE= +cloud.google.com/go/datastore v1.1.0/go.mod h1:umbIZjpQpHh4hmRpGhH4tLFup+FVzqBi1b3c64qFpCk= +cloud.google.com/go/pubsub v1.0.1/go.mod h1:R0Gpsv3s54REJCy4fxDixWD93lHJMoZTyQ2kNxGRt3I= +cloud.google.com/go/pubsub v1.1.0/go.mod h1:EwwdRX2sKPjnvnqCa270oGRyludottCI76h+R3AArQw= +cloud.google.com/go/pubsub v1.2.0/go.mod h1:jhfEVHT8odbXTkndysNHCcx0awwzvfOlguIAii9o8iA= +cloud.google.com/go/pubsub v1.3.1/go.mod h1:i+ucay31+CNRpDW4Lu78I4xXG+O1r/MAHgjpRVR+TSU= +cloud.google.com/go/storage v1.0.0/go.mod h1:IhtSnM/ZTZV8YYJWCY8RULGVqBDmpoyjwiyrjsg+URw= +cloud.google.com/go/storage v1.5.0/go.mod h1:tpKbwo567HUNpVclU5sGELwQWBDZ8gh0ZeosJ0Rtdos= +cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohlUTyfDhBk= +cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RXyy7KQOVs= +cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0= +dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= +github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= +github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= +github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= +github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= +github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= +github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= +github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= +github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= +github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= +github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= +github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= +github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= +github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= +github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= +github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= +github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= +github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= +github.com/golang/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= +github.com/golang/mock v1.3.1/go.mod h1:sBzyDLLjw3U8JLTeZvSv8jJB+tU5PVekmnlKIyFUx0Y= +github.com/golang/mock v1.4.0/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= +github.com/golang/mock v1.4.1/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= +github.com/golang/mock v1.4.3/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= +github.com/golang/mock v1.4.4/go.mod h1:l3mdAwkq5BuhzHwde/uurv3sEJeZMXNpwsxVWU71h+4= +github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/protobuf v1.3.3/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= +github.com/golang/protobuf v1.3.4/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= +github.com/golang/protobuf v1.3.5/go.mod h1:6O5/vntMXwX2lRkT1hjjk0nAC1IDOTvTlVgjlRvqsdk= +github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8= +github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA= +github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs= +github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w= +github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0= +github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QDs8UjoX8= +github.com/golang/protobuf v1.4.2 h1:+Z5KGCizgyZCbGh1KZqA0fcLLkwbsjIzS4aV2v7wJX0= +github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= +github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= +github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= +github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= +github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= +github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= +github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.4.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.1 h1:JFrFEBb2xKufg6XkJsJr+WbKb4FQlURi5RUcBveYu9k= +github.com/google/go-cmp v0.5.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= +github.com/google/martian/v3 v3.0.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= +github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= +github.com/google/pprof v0.0.0-20190515194954-54271f7e092f/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= +github.com/google/pprof v0.0.0-20191218002539-d4f498aebedc/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/pprof v0.0.0-20200212024743-f11f1df84d12/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/pprof v0.0.0-20200229191704-1ebb73c60ed3/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/pprof v0.0.0-20200430221834-fc25d7d30c6d/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/pprof v0.0.0-20200708004538-1a94d8640e99/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= +github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= +github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= +github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= +github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= +github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= +github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= +github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk= +github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= +github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= +github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= +github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= +github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= +github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= +github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= +github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= +go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= +go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= +go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= +go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= +golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= +golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= +golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= +golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= +golang.org/x/exp v0.0.0-20190829153037-c13cbed26979/go.mod h1:86+5VVa7VpoJ4kLfm080zCjGlMRFzhUhsZKEZO7MGek= +golang.org/x/exp v0.0.0-20191030013958-a1ab85dbe136/go.mod h1:JXzH8nQsPlswgeRAPE3MuO9GYsAcnJvJ4vnMwN/5qkY= +golang.org/x/exp v0.0.0-20191129062945-2f5052295587/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= +golang.org/x/exp v0.0.0-20191227195350-da58074b4299/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= +golang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= +golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EHIKF9dgMWnmCNThgcyBT1FY9mM= +golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU= +golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= +golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= +golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= +golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= +golang.org/x/lint v0.0.0-20190301231843-5614ed5bae6f/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= +golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/lint v0.0.0-20190409202823-959b441ac422/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/lint v0.0.0-20190909230951-414d861bb4ac/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/lint v0.0.0-20191125180803-fdd1cda4f05f/go.mod h1:5qLYkcX4OjUUV8bRuDixDT3tpyyb+LUpUlRWLxfhWrs= +golang.org/x/lint v0.0.0-20200130185559-910be7a94367/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= +golang.org/x/lint v0.0.0-20200302205851-738671d3881b/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= +golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE= +golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028/go.mod h1:E/iHnbuqvinMTCcRqshq8CkpyQDoeVncDDYHnLhea+o= +golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc= +golang.org/x/mod v0.1.0/go.mod h1:0QHyrYULN0/3qlju5TqG8bIK38QM8yzMo5ekMj3DlcY= +golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= +golang.org/x/mod v0.1.1-0.20191107180719-034126e5016b/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= +golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190501004415-9ce7a6920f09/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190503192946-f4e77d36d62c/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= +golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20190628185345-da137c7871d7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20190724013045-ca1201d0de80/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20191209160850-c0dbc17a3553/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200114155413-6afb5195e5aa/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200202094626-16171245cfb2/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200222125558-5a598a2470a0/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200301022130-244492dfa37a/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200324143707-d3edc9973b7e/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200501053045-e0ff5e5a1de5/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200506145744-7e3656a0809f/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200513185701-a91f0712d120/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200520182314-0ba52f642ac2/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200625001655-4c5254603344/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= +golang.org/x/net v0.0.0-20200707034311-ab3426394381/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= +golang.org/x/net v0.0.0-20200822124328-c89045814202 h1:VvcQYSHwXgi7W+TpUR6A9g6Up98WAHf3f/ulnJ62IyA= +golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= +golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= +golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= +golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= +golang.org/x/oauth2 v0.0.0-20191202225959-858c2ad4c8b6/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= +golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= +golang.org/x/oauth2 v0.0.0-20210514164344-f6687ab2804c h1:pkQiBZBvdos9qq4wBAHqlzuZHEXo07pqV06ef90u1WI= +golang.org/x/oauth2 v0.0.0-20210514164344-f6687ab2804c/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190502145724-3ef323f4f1fd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190606165138-5da285871e9c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190726091711-fc99dfbffb4e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191001151750-bb3f8db39f24/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191228213918-04cbcbbfeed8/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200113162924-86b910548bc1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200122134326-e047566fdf82/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200202164722-d101bd2416d5/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200212091648-12a6c2dcc1e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200302150141-5c8b2ff67527/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200331124033-c3d80250170d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200501052902-10377860bb8e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200511232937-7e40ca221e25/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200515095857-1151b9dac4a9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200523222454-059865788121/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200803210538-64077c9b5642/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= +golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= +golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190312151545-0bb0c0a6e846/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190312170243-e65039ee4138/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190425150028-36563e24a262/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= +golang.org/x/tools v0.0.0-20190506145303-2d16b83fe98c/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= +golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= +golang.org/x/tools v0.0.0-20190606124116-d0a3d012864b/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +golang.org/x/tools v0.0.0-20190628153133-6cdbf07be9d0/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +golang.org/x/tools v0.0.0-20190816200558-6889da9d5479/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20190911174233-4f2ddba30aff/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191012152004-8de300cfc20a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191113191852-77e3bb0ad9e7/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191115202509-3a792d9c32b2/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191125144606-a911d9008d1f/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191130070609-6e064ea0cf2d/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191216173652-a0e659d51361/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20191227053925-7b8e75db28f4/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200117161641-43d50277825c/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200122220014-bf1340f18c4a/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200130002326-2f3ba24bd6e7/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200204074204-1cc6d1ef6c74/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200207183749-b753a1ba74fa/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200212150539-ea181f53ac56/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200224181240-023911ca70b2/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200227222343-706bc42d1f0d/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200304193943-95d2e580d8eb/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= +golang.org/x/tools v0.0.0-20200312045724-11d5b4c81c7d/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= +golang.org/x/tools v0.0.0-20200331025713-a30bf2db82d4/go.mod h1:Sl4aGygMT6LrqrWclx+PTx3U+LnKx/seiNR+3G19Ar8= +golang.org/x/tools v0.0.0-20200501065659-ab2804fb9c9d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200512131952-2bc93b1c0c88/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200515010526-7d3b6ebf133d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200618134242-20370b0cb4b2/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200729194436-6467de6f59a7/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= +golang.org/x/tools v0.0.0-20200804011535-6c149bb5ef0d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= +golang.org/x/tools v0.0.0-20200825202427-b303f430e36d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= +golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 h1:go1bK/D/BFZV2I8cIQd1NKEZ+0owSTG1fDTci4IqFcE= +golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE= +google.golang.org/api v0.7.0/go.mod h1:WtwebWUNSVBH/HAw79HIFXZNqEvBhG+Ra+ax0hx3E3M= +google.golang.org/api v0.8.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= +google.golang.org/api v0.9.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= +google.golang.org/api v0.13.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= +google.golang.org/api v0.14.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= +google.golang.org/api v0.15.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= +google.golang.org/api v0.17.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= +google.golang.org/api v0.18.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= +google.golang.org/api v0.19.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= +google.golang.org/api v0.20.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= +google.golang.org/api v0.22.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= +google.golang.org/api v0.24.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= +google.golang.org/api v0.28.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= +google.golang.org/api v0.29.0/go.mod h1:Lcubydp8VUV7KeIHD9z2Bys/sm/vGKnG1UHuDBSrHWM= +google.golang.org/api v0.30.0/go.mod h1:QGmEvQ87FHZNiUVJkT14jQNYJ4ZJjdRF23ZXz5138Fc= +google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= +google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= +google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= +google.golang.org/appengine v1.6.1/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww/cMBSeb0= +google.golang.org/appengine v1.6.5/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= +google.golang.org/appengine v1.6.6 h1:lMO5rYAqUxkmaj76jAkRUvt5JZgFymx/+Q5Mzfivuhc= +google.golang.org/appengine v1.6.6/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= +google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= +google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190418145605-e7d98fc518a7/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190425155659-357c62f0e4bb/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190502173448-54afdca5d873/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190801165951-fa694d86fc64/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= +google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= +google.golang.org/genproto v0.0.0-20190911173649-1774047e7e51/go.mod h1:IbNlFCBrqXvoKpeg0TB2l7cyZUmoaFKYIwrEpbDKLA8= +google.golang.org/genproto v0.0.0-20191108220845-16a3f7862a1a/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20191115194625-c23dd37a84c9/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20191216164720-4f79533eabd1/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20191230161307-f3c370f40bfb/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20200115191322-ca5a22157cba/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20200122232147-0452cf42e150/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20200204135345-fa8e72b47b90/go.mod h1:GmwEX6Z4W5gMy59cAlVYjN9JhxgbQH6Gn+gFDQe2lzA= +google.golang.org/genproto v0.0.0-20200212174721-66ed5ce911ce/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200224152610-e50cd9704f63/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200228133532-8c2c7df3a383/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200305110556-506484158171/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200312145019-da6875a35672/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200331122359-1ee6d9798940/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200430143042-b979b6f78d84/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200511104702-f5ebc3bea380/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200515170657-fc4c6c6a6587/go.mod h1:YsZOwe1myG/8QRHRsmBRE1LrgQY60beZKjly0O1fX9U= +google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= +google.golang.org/genproto v0.0.0-20200618031413-b414f8b61790/go.mod h1:jDfRM7FcilCzHH/e9qn6dsT145K34l5v+OpcnNgKAAA= +google.golang.org/genproto v0.0.0-20200729003335-053ba62fc06f/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20200804131852-c06518451d9c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20200825200019-8632dd797987/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= +google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= +google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= +google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= +google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= +google.golang.org/grpc v1.26.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= +google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= +google.golang.org/grpc v1.27.1/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= +google.golang.org/grpc v1.28.0/go.mod h1:rpkK4SK4GF4Ach/+MFLZUBavHOvF2JJB5uozKKal+60= +google.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3IjizoKk= +google.golang.org/grpc v1.30.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= +google.golang.org/grpc v1.31.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= +google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= +google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= +google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= +google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miEFZTKqfCUM6K7xSMQL9OKL/b6hQv+e19PK+JZNE= +google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo= +google.golang.org/protobuf v1.22.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= +google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= +google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= +google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGjtUeSXeh4= +google.golang.org/protobuf v1.25.0 h1:Ejskq+SyPohKW+1uil0JJMtmHCgJPJ/qWTxr8qp+R4c= +google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= +gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= +gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= +honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= +honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= +rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= +rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= +rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= diff --git a/scripts/generate_go.sh b/scripts/generate_go.sh index 87f4a2c0..8b519045 100755 --- a/scripts/generate_go.sh +++ b/scripts/generate_go.sh @@ -1,4 +1,4 @@ -#!/usr/bin/env bash +# #!/usr/bin/env bash # set output path of the API client API_ID="$(node $(dirname $0)/get-client-payload-id.js $CLIENT_PAYLOAD)" @@ -17,13 +17,16 @@ OUTPUT_PATH="$API_GROUP/$API_VERSION" npx @openapitools/openapi-generator-cli version-manager set 5.1.1 npx @openapitools/openapi-generator-cli generate -g go -i "$OPENAPI_FILENAME" -o "$OUTPUT_PATH" --package-name "$PACKAGE_NAME" --git-user-id="redhat-developer" --git-repo-id="app-services-sdk-go/$PACKAGE_NAME" -p "generateInterfaces=true" --ignore-file-override=.openapi-generator-ignore -go mod download -go mod tidy - # generate API interface mock mock_api_file="$OUTPUT_PATH/default_api_mock.go" rm -rf $mock_api_file moq -out "$mock_api_file" "$OUTPUT_PATH" DefaultApi -mv $OPENAPI_FILENAME .openapi/$OPENAPI_FILENAME \ No newline at end of file +OPENAPI_OUTPUT_FILENAME=$(node $(dirname $0)/get-openapi-filename-override.js "$CLIENT_PAYLOAD") + +if [ -z ${OPENAPI_OUTPUT_FILENAME+x} ]; then + OPENAPI_OUTPUT_FILENAME=$OPENAPI_FILENAME +fi + +mv $OPENAPI_FILENAME .openapi/$OPENAPI_OUTPUT_FILENAME \ No newline at end of file diff --git a/scripts/get-openapi-filename-override.js b/scripts/get-openapi-filename-override.js new file mode 100644 index 00000000..9109a9d6 --- /dev/null +++ b/scripts/get-openapi-filename-override.js @@ -0,0 +1,12 @@ +#!/usr/bin/node + +const configs = require('../.config/api-client-metadata.json'); + +const args = process.argv.slice(2); +const clientPayload = JSON.parse(args[0]); + +const mappedConfig = configs[clientPayload.id]; + +if (mappedConfig.openApiOutputFileName) { + console.log(mappedConfig.openApiOutputFileName) +}