diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index b7c87c2b3a..397893c171 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -42,45 +42,14 @@ jobs: - name: Test run: | - "${GITHUB_WORKSPACE}/bin/bazel" test --test_tag_filters=-lint //... + bazel test --test_tag_filters=-lint //... - name: Build all artifacts run: | - "${GITHUB_WORKSPACE}/bin/bazel" build //... + bazel build //... - - name: Configure AWS credentials - uses: aws-actions/configure-aws-credentials@v1 - with: - aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} - aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} - aws-region: us-east-1 - - - name: Push beta app images - if: ${{github.ref == 'refs/heads/develop'}} - run: | - echo ${{ secrets.PAT }} | docker login ghcr.io -u airydevci --password-stdin - release_targets=$(bazel query "filter("beta$", //...)" --output label) - for target in $release_targets; do - echo "Deploying $target" - bazel run $target - done - - - name: Push release app images - if: startsWith(github.ref, 'refs/heads/release') - run: | - echo ${{ secrets.PAT }} | docker login ghcr.io -u airydevci --password-stdin - release_targets=$(bazel query "filter("release$", //...)" --output label) - for target in $release_targets; do - echo "Deploying $target" - bazel run $target - done - - - name: Push release app images - if: ${{github.ref == 'refs/heads/main'}} + - name: Push images + if: startsWith(github.ref, 'refs/heads/release') || startsWith(github.ref, 'refs/heads/main') || startsWith(github.ref, 'refs/heads/develop') run: | echo ${{ secrets.PAT }} | docker login ghcr.io -u airydevci --password-stdin - release_targets=$(bazel query "filter("latest$", //...)" --output label) - for target in $release_targets; do - echo "Deploying $target" - bazel run $target - done + ./scripts/push-images.sh ${{ github.ref }} diff --git a/BUILD b/BUILD index 5089d92cee..097d329b75 100644 --- a/BUILD +++ b/BUILD @@ -2,6 +2,7 @@ load("@rules_java//java:defs.bzl", "java_library", "java_plugin") load("@io_bazel_rules_docker//container:container.bzl", "container_image") load("@com_github_atlassian_bazel_tools//multirun:def.bzl", "multirun") load("@bazel_gazelle//:def.bzl", "gazelle") +load("@io_bazel_rules_go//go:def.bzl", "TOOLS_NOGO", "nogo") package(default_visibility = ["//visibility:public"]) @@ -170,3 +171,10 @@ exports_files( # gazelle:build_file_name BUILD # gazelle:prefix gazelle(name = "gazelle") + +nogo( + name = "airy_nogo", + config = "//tools/build:nogo_config.json", + visibility = ["//visibility:public"], + deps = TOOLS_NOGO, +) diff --git a/VERSION b/VERSION index 1d0ba9ea18..8f0916f768 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -0.4.0 +0.5.0 diff --git a/WORKSPACE b/WORKSPACE index 97010f9cdf..83dc45a9d7 100644 --- a/WORKSPACE +++ b/WORKSPACE @@ -129,7 +129,7 @@ load("@io_bazel_rules_go//go:deps.bzl", "go_register_toolchains", "go_rules_depe go_rules_dependencies() -go_register_toolchains() +go_register_toolchains(nogo = "@//:airy_nogo") # my_nogo is in the top-level BUILD file of this workspace load("@bazel_gazelle//:deps.bzl", "gazelle_dependencies") diff --git a/backend/api/admin/BUILD b/backend/api/admin/BUILD index 1b00171ee5..f15680cd5a 100644 --- a/backend/api/admin/BUILD +++ b/backend/api/admin/BUILD @@ -5,7 +5,7 @@ load("//tools/build:container_push.bzl", "container_push") app_deps = [ "//backend:base_app", "//:springboot_actuator", - "//backend/model/channel:channel", + "//backend/model/channel", "//backend:tag", "//backend:webhook", "//lib/java/uuid", diff --git a/backend/api/communication/BUILD b/backend/api/communication/BUILD index 8e4097251c..3391e22829 100644 --- a/backend/api/communication/BUILD +++ b/backend/api/communication/BUILD @@ -7,9 +7,9 @@ app_deps = [ "//backend:base_app", "//:springboot_actuator", "//:springboot_websocket", - "//backend/model/message:message", - "//backend/model/channel:channel", - "//backend/model/metadata:metadata", + "//backend/model/message", + "//backend/model/channel", + "//backend/model/metadata", "//backend:read-receipt", "//lib/java/mapping", "//lib/java/date", diff --git a/backend/media/BUILD b/backend/media/BUILD new file mode 100644 index 0000000000..0b7ed227b6 --- /dev/null +++ b/backend/media/BUILD @@ -0,0 +1,41 @@ +load("//tools/build:springboot.bzl", "springboot") +load("//tools/build:junit5.bzl", "junit5") +load("//tools/build:container_push.bzl", "container_push") + +app_deps = [ + "//backend:base_app", + "//backend/model/message", + "//backend/model/metadata", + "//lib/java/uuid", + "//lib/java/mapping", + "//lib/java/spring/kafka/core:spring-kafka-core", + "//lib/java/spring/kafka/streams:spring-kafka-streams", + "@maven//:io_lettuce_lettuce_core", + "@maven//:org_springframework_data_spring_data_redis", +] + +springboot( + name = "media-resolver", + srcs = glob(["src/main/java/**/*.java"]), + main_class = "co.airy.spring.core.AirySpringBootApplication", + deps = app_deps, +) + +[ + junit5( + size = "medium", + file = file, + resources = glob(["src/test/resources/**/*"]), + deps = [ + ":app", + "//backend:base_test", + "//lib/java/kafka/test:kafka-test", + ] + app_deps, + ) + for file in glob(["src/test/java/**/*Test.java"]) +] + +container_push( + registry = "ghcr.io/airyhq/media", + repository = "resolver", +) diff --git a/backend/media/src/main/java/co/airy/core/media/Resolver.java b/backend/media/src/main/java/co/airy/core/media/Resolver.java new file mode 100644 index 0000000000..d9abdc148f --- /dev/null +++ b/backend/media/src/main/java/co/airy/core/media/Resolver.java @@ -0,0 +1,43 @@ +package co.airy.core.media; + +import co.airy.kafka.streams.KafkaStreamsWrapper; +import co.airy.log.AiryLoggerFactory; +import org.apache.kafka.streams.KafkaStreams; +import org.apache.kafka.streams.StreamsBuilder; +import org.slf4j.Logger; +import org.springframework.beans.factory.DisposableBean; +import org.springframework.boot.context.event.ApplicationStartedEvent; +import org.springframework.context.ApplicationListener; +import org.springframework.stereotype.Component; + +@Component +public class Resolver implements ApplicationListener, DisposableBean { + private final Logger log = AiryLoggerFactory.getLogger(Resolver.class); + + private static final String appId = "media.Resolver"; + private final KafkaStreamsWrapper streams; + + public Resolver(KafkaStreamsWrapper streams) { + this.streams = streams; + } + + @Override + public void onApplicationEvent(ApplicationStartedEvent event) { + final StreamsBuilder builder = new StreamsBuilder(); + + streams.start(builder.build(), appId); + } + + @Override + public void destroy() { + if (streams != null) { + streams.close(); + } + } + + + // visible for testing + KafkaStreams.State getStreamState() { + return streams.state(); + } +} diff --git a/backend/media/src/main/resources/application.properties b/backend/media/src/main/resources/application.properties new file mode 100644 index 0000000000..e456a64de1 --- /dev/null +++ b/backend/media/src/main/resources/application.properties @@ -0,0 +1,4 @@ +kafka.brokers=${KAFKA_BROKERS} +kafka.schema-registry-url=${KAFKA_SCHEMA_REGISTRY_URL} + +storage.host=${STORAGE_HOST} diff --git a/backend/sources/chat-plugin/BUILD b/backend/sources/chat-plugin/BUILD index 9131e2b75f..6372305e28 100644 --- a/backend/sources/chat-plugin/BUILD +++ b/backend/sources/chat-plugin/BUILD @@ -8,8 +8,8 @@ app_deps = [ "//:springboot_actuator", "//:springboot_websocket", "//:springboot_security", - "//backend/model/channel:channel", - "//backend/model/message:message", + "//backend/model/channel", + "//backend/model/message", "//lib/java/uuid", "//lib/java/date", "//lib/java/mapping", diff --git a/backend/sources/facebook/connector/BUILD b/backend/sources/facebook/connector/BUILD index 53cf96932f..0be43cf3bb 100644 --- a/backend/sources/facebook/connector/BUILD +++ b/backend/sources/facebook/connector/BUILD @@ -4,9 +4,9 @@ load("//tools/build:container_push.bzl", "container_push") app_deps = [ "//backend:base_app", - "//backend/model/channel:channel", - "//backend/model/message:message", - "//backend/model/metadata:metadata", + "//backend/model/channel", + "//backend/model/message", + "//backend/model/metadata", "//lib/java/uuid", "//lib/java/log", "//lib/java/spring/web:spring-web", diff --git a/backend/sources/facebook/events-router/BUILD b/backend/sources/facebook/events-router/BUILD index b1717175e2..616d756935 100644 --- a/backend/sources/facebook/events-router/BUILD +++ b/backend/sources/facebook/events-router/BUILD @@ -4,8 +4,8 @@ load("//tools/build:container_push.bzl", "container_push") app_deps = [ "//backend:base_app", - "//backend/model/channel:channel", - "//backend/model/message:message", + "//backend/model/channel", + "//backend/model/message", "//lib/java/uuid", "//lib/java/log", "//lib/java/kafka/schema:source-facebook-events", diff --git a/backend/sources/facebook/events-router/src/main/java/co/airy/core/sources/facebook/MessageParser.java b/backend/sources/facebook/events-router/src/main/java/co/airy/core/sources/facebook/MessageParser.java index a1a1262961..4cec5ff0ba 100644 --- a/backend/sources/facebook/events-router/src/main/java/co/airy/core/sources/facebook/MessageParser.java +++ b/backend/sources/facebook/events-router/src/main/java/co/airy/core/sources/facebook/MessageParser.java @@ -53,6 +53,9 @@ public Message.Builder parse(final String payload) throws Exception { } else if (appId != null && !appId.equals(this.facebookAppId)) { senderType = SenderType.SOURCE_USER; senderId = appId; + } else if(isEcho && appId == null) { + senderType = SenderType.SOURCE_USER; + senderId = getSourceConversationId(webhookMessaging); } else { // Filter out echoes coming from this app throw new NotAMessageException(); diff --git a/backend/sources/facebook/events-router/src/test/java/co/airy/core/sources/facebook/EventsRouterTest.java b/backend/sources/facebook/events-router/src/test/java/co/airy/core/sources/facebook/EventsRouterTest.java index 532530faf7..0a6e24d1f7 100644 --- a/backend/sources/facebook/events-router/src/test/java/co/airy/core/sources/facebook/EventsRouterTest.java +++ b/backend/sources/facebook/events-router/src/test/java/co/airy/core/sources/facebook/EventsRouterTest.java @@ -3,6 +3,7 @@ import co.airy.avro.communication.Channel; import co.airy.avro.communication.ChannelConnectionState; import co.airy.avro.communication.Message; +import co.airy.avro.communication.SenderType; import co.airy.kafka.schema.Topic; import co.airy.kafka.schema.application.ApplicationCommunicationChannels; import co.airy.kafka.schema.application.ApplicationCommunicationMessages; @@ -34,6 +35,7 @@ import java.util.concurrent.TimeUnit; import static co.airy.test.Timing.retryOnException; +import static org.hamcrest.CoreMatchers.is; import static org.apache.kafka.streams.KafkaStreams.State.RUNNING; import static org.hamcrest.MatcherAssert.assertThat; import static org.hamcrest.collection.IsCollectionWithSize.hasSize; @@ -136,4 +138,33 @@ void joinsAndCountsMessagesCorrectly() throws Exception { assertEquals(messages.stream().filter(m -> m.getConversationId().equals(conversationId)).count(), expectedCount.longValue()) ); } + + @Test + void parsesPageMessagesCorrectly() throws Exception { + final String channelId = "channel-id"; + final String pageId = "page-id"; + + final String payload = "{\"object\":\"page\",\"entry\":[{\"id\":\"%s\",\"time\":1609250136582," + + "\"messaging\":[{\"sender\":{\"id\":\"%s\"},\"recipient\":{\"id\":\"1912214878880084\"},\"timestamp\":1609250136503,\"message\":" + + "{\"mid\":\"\",\"is_echo\":true,\"text\":\"text of the message\"}}]}]}"; + + kafkaTestHelper.produceRecord(new ProducerRecord<>(applicationCommunicationChannels.name(), channelId, Channel.newBuilder() + .setId(channelId) + .setConnectionState(ChannelConnectionState.CONNECTED) + .setSourceChannelId(pageId) + .setName("fb-page-a") + .setSource("facebook") + .setToken("") + .build())); + + final String webhookPayload = String.format(payload, pageId, pageId); + kafkaTestHelper.produceRecord(new ProducerRecord<>(sourceFacebookEvents.name(), UUID.randomUUID().toString(), webhookPayload)); + + TimeUnit.SECONDS.sleep(5); + List messages = kafkaTestHelper.consumeValues(1, applicationCommunicationMessages.name()); + assertThat(messages, hasSize(1)); + + Message message = messages.get(0); + assertThat(message.getSenderType(), is(SenderType.SOURCE_USER)); + } } diff --git a/backend/sources/google/connector/BUILD b/backend/sources/google/connector/BUILD index 0e3d38f89d..46e8dce898 100644 --- a/backend/sources/google/connector/BUILD +++ b/backend/sources/google/connector/BUILD @@ -4,8 +4,8 @@ load("//tools/build:container_push.bzl", "container_push") app_deps = [ "//backend:base_app", - "//backend/model/channel:channel", - "//backend/model/message:message", + "//backend/model/channel", + "//backend/model/message", "//lib/java/spring/kafka/core:spring-kafka-core", "//lib/java/spring/kafka/streams:spring-kafka-streams", "//lib/java/uuid", diff --git a/backend/sources/google/events-router/BUILD b/backend/sources/google/events-router/BUILD index 67c348347e..f02c025533 100644 --- a/backend/sources/google/events-router/BUILD +++ b/backend/sources/google/events-router/BUILD @@ -4,9 +4,9 @@ load("//tools/build:container_push.bzl", "container_push") app_deps = [ "//backend:base_app", - "//backend/model/channel:channel", - "//backend/model/message:message", - "//backend/model/metadata:metadata", + "//backend/model/channel", + "//backend/model/message", + "//backend/model/metadata", "//lib/java/uuid", "//lib/java/kafka/schema:source-google-events", "//lib/java/spring/kafka/core:spring-kafka-core", diff --git a/backend/sources/twilio/connector/BUILD b/backend/sources/twilio/connector/BUILD index e02d26ce15..85edc045c8 100644 --- a/backend/sources/twilio/connector/BUILD +++ b/backend/sources/twilio/connector/BUILD @@ -4,8 +4,8 @@ load("//tools/build:container_push.bzl", "container_push") app_deps = [ "//backend:base_app", - "//backend/model/channel:channel", - "//backend/model/message:message", + "//backend/model/channel", + "//backend/model/message", "//lib/java/log", "//lib/java/mapping", "//lib/java/uuid", diff --git a/backend/sources/twilio/events-router/BUILD b/backend/sources/twilio/events-router/BUILD index 7e19bb8e3d..a1b92003fa 100644 --- a/backend/sources/twilio/events-router/BUILD +++ b/backend/sources/twilio/events-router/BUILD @@ -4,8 +4,8 @@ load("//tools/build:container_push.bzl", "container_push") app_deps = [ "//backend:base_app", - "//backend/model/channel:channel", - "//backend/model/message:message", + "//backend/model/channel", + "//backend/model/message", "//lib/java/uuid", "//lib/java/log", "//lib/java/kafka/schema:source-twilio-events", diff --git a/backend/webhook/publisher/BUILD b/backend/webhook/publisher/BUILD index 01e02927ee..fc0d56080a 100644 --- a/backend/webhook/publisher/BUILD +++ b/backend/webhook/publisher/BUILD @@ -4,7 +4,7 @@ load("//tools/build:container_push.bzl", "container_push") app_deps = [ "//backend:base_app", - "//backend/model/message:message", + "//backend/model/message", "//backend:webhook", "//lib/java/uuid", "//lib/java/mapping", diff --git a/backend/webhook/redis-worker/go.sum b/backend/webhook/redis-worker/go.sum index fcea59a2bb..7e5bc4c44b 100644 --- a/backend/webhook/redis-worker/go.sum +++ b/backend/webhook/redis-worker/go.sum @@ -1,14 +1,18 @@ +github.com/alicebob/gopher-json v0.0.0-20200520072559-a9ecdc9d1d3a h1:HbKu58rmZpUGpz5+4FfNmIU+FmZg2P3Xaj2v2bfNWmk= github.com/alicebob/gopher-json v0.0.0-20200520072559-a9ecdc9d1d3a/go.mod h1:SGnFV6hVsYE877CKEZ6tDNTjaSXYUk6QqoIK6PrAtcc= +github.com/alicebob/miniredis/v2 v2.13.3 h1:kohgdtN58KW/r9ZDVmMJE3MrfbumwsDQStd0LPAGmmw= github.com/alicebob/miniredis/v2 v2.13.3/go.mod h1:uS970Sw5Gs9/iK3yBg0l9Uj9s25wXxSpQUE9EaJ/Blg= github.com/cespare/xxhash/v2 v2.1.1 h1:6MnRN8NT7+YBpUIWxHtefFZOKTAPgGjpQSxqLNn0+qY= github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= 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/davecgh/go-spew v1.1.0 h1:ZDRjVQ15GmhC3fiQ8ni8+OwkZQO4DARzQgrnXU1Liz8= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f h1:lO4WD4F/rVNCu3HqELle0jiPLLBs70cWOduZpkS1E78= github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f/go.mod h1:cuUVRXasLTGF7a8hSLbxyZXjz+1KgoB3wDUb6vlszIc= github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= +github.com/fsnotify/fsnotify v1.4.9 h1:hsms1Qyu0jgnwNXIxa+/V/PDsU6CfLf6CNO8H7IWoS4= github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ= github.com/go-redis/redis/v8 v8.2.2 h1:A1tQgdeVF23Ojc1TIRpVuVfOadUdIM0vFVURigoPEMM= github.com/go-redis/redis/v8 v8.2.2/go.mod h1:ysgGY09J/QeDYbu3HikWEIPCwaeOkuNoTgKayTEaEOw= @@ -18,27 +22,36 @@ github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:x 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.2 h1:+Z5KGCizgyZCbGh1KZqA0fcLLkwbsjIzS4aV2v7wJX0= github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= 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.5.1 h1:JFrFEBb2xKufg6XkJsJr+WbKb4FQlURi5RUcBveYu9k= github.com/google/go-cmp v0.5.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= +github.com/nxadm/tail v1.4.4 h1:DQuhQpB1tVlglWS2hLQ5OV6B5r8aGxSrPc5Qo6uTN78= github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A= github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108oapk= +github.com/onsi/ginkgo v1.14.1 h1:jMU0WaQrP0a/YAEq8eJmJKjBoMs+pClEr1vDMlM/Do4= github.com/onsi/ginkgo v1.14.1/go.mod h1:iSB4RoI2tjJc9BBv4NKIKWKya62Rps+oPG/Lv9klQyY= github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY= github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo= +github.com/onsi/gomega v1.10.2 h1:aY/nuoWlKJud2J6U0E3NWsjlg+0GtwXxgEqthRdzlcs= github.com/onsi/gomega v1.10.2/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo= +github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/testify v1.6.1 h1:hDPOHmpOpP40lSULcqw7IrRb/u7w6RpDC9399XyoNd0= github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +github.com/yuin/gopher-lua v0.0.0-20191220021717-ab39c6098bdb h1:ZkM6LRnq40pR1Ox0hTHlnpkcOTuFIDQpZ1IN8rKKhX0= github.com/yuin/gopher-lua v0.0.0-20191220021717-ab39c6098bdb/go.mod h1:gqRgreBUhTSL0GeU64rtZ3Uq3wtjOa/TB2YfrtkCbVQ= go.opentelemetry.io/otel v0.11.0 h1:IN2tzQa9Gc4ZVKnTaMbPVcHjvzOdg5n9QfnmlqiET7E= go.opentelemetry.io/otel v0.11.0/go.mod h1:G8UCk+KooF2HLkgo8RHX9epABH/aRGYET7gQOqBVdB0= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20200520004742-59133d7f0dd7 h1:AeiKBIuRw3UomYXSbLy0Mc2dDLfdtbT/IVn4keq83P0= golang.org/x/net v0.0.0-20200520004742-59133d7f0dd7/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -48,20 +61,28 @@ golang.org/x/sys v0.0.0-20190904154756-749cb33beabd/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20191005200804-aed5e4c7ecf9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191120155948-bd437916bb0e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200519105757-fe76b779f299 h1:DYfZAGf2WMFjMxbgTjaC+2HC7NkNAQs+6Q8b9WEB/F4= golang.org/x/sys v0.0.0-20200519105757-fe76b779f299/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/text v0.3.2 h1:tW2bmiBqwgJj/UpqtC8EpXEZVYOwU0yG4iWbprSVAcs= golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543 h1:E7g+9GITq07hpfrRu66IVDexMakfv52eLZ2CXBWiKr4= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= 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.23.0 h1:4MY060fB1DLGMB/7MBTLnwQUY6+F09GEiz6SsrNqyzM= google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= +gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= +gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.3.0 h1:clyUAQHOM3G0M3f5vQj7LuJrETvjVot3Z5el9nffUtU= gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c h1:dUUwHk2QECo/6vqA44rthZ8ie2QXMNeKRTHCNY2nXvo= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= diff --git a/backend/webhook/redis-worker/main.go b/backend/webhook/redis-worker/main.go index fe4befb775..6249504580 100644 --- a/backend/webhook/redis-worker/main.go +++ b/backend/webhook/redis-worker/main.go @@ -19,7 +19,10 @@ func main() { } w.Header().Set("Content-Type", "application/json") - w.Write(errors) + _, err = w.Write(errors) + if err != nil { + log.Println(err) + } }) http.HandleFunc("/health", func(w http.ResponseWriter, r *http.Request) { diff --git a/backend/webhook/redis-worker/pkg/scheduler/consumer/consumer.go b/backend/webhook/redis-worker/pkg/scheduler/consumer/consumer.go index 767643464b..4c7a0b09ae 100644 --- a/backend/webhook/redis-worker/pkg/scheduler/consumer/consumer.go +++ b/backend/webhook/redis-worker/pkg/scheduler/consumer/consumer.go @@ -111,7 +111,7 @@ func (t *Task) Run() { result, err := q.Dequeue(processingQueue) if err != nil { - t.logError(fmt.Errorf("failed to dequeue", err)) + t.logError(fmt.Errorf("Failed to dequeue \n%w", err)) return } diff --git a/backend/webhook/redis-worker/pkg/scheduler/scheduler.go b/backend/webhook/redis-worker/pkg/scheduler/scheduler.go index 08de1c041f..d0e36254fd 100644 --- a/backend/webhook/redis-worker/pkg/scheduler/scheduler.go +++ b/backend/webhook/redis-worker/pkg/scheduler/scheduler.go @@ -12,7 +12,6 @@ import ( type Task struct { ticker *time.Ticker - queueName string queue queue.Queue consumers map[string]consumer.Task } @@ -26,11 +25,8 @@ func Start(hostname, port string) *Task { go func() { t.updateConsumers(t.queue) - for { - select { - case <-t.ticker.C: - t.updateConsumers(t.queue) - } + for range t.ticker.C { + t.updateConsumers(t.queue) } }() diff --git a/backend/webhook/redis-worker/redis-worker b/backend/webhook/redis-worker/redis-worker deleted file mode 100755 index e3ce65a2df..0000000000 Binary files a/backend/webhook/redis-worker/redis-worker and /dev/null differ diff --git a/docs/docs/guides/airy-core-in-production.md b/docs/docs/guides/airy-core-in-production.md index 283e556df0..0e0d38680f 100644 --- a/docs/docs/guides/airy-core-in-production.md +++ b/docs/docs/guides/airy-core-in-production.md @@ -78,7 +78,7 @@ You change the `commitInterval` to a more suitable production value in the confi To deploy Kafka on Kubernetes with Helm, you can run: ```sh -helm install airy infrastructure/helm-chart/charts/kafka/ +helm install kafka infrastructure/helm-chart/charts/kafka/ ``` By default, the `Confluent Schema registry` deployment is created with @@ -172,6 +172,8 @@ apps: ... ``` +We recommend to create a new database if you are reusing a PostgreSQL server to avoid name collisions. + ### Deployment We provided a Helm chart to deploy the `Airy apps`. Before you can run helm, you @@ -179,7 +181,7 @@ must configure the system via the `airy.conf` file, then you can proceed: ```sh cp airy.conf ./helm-chart/charts/apps/values.yaml -helm install airy-apps ./helm-chart/charts/apps/ --timeout 1000s +helm install core ./helm-chart/charts/apps/ --timeout 1000s ``` By default, the `Airy apps` deployments start with `replicas=0` so to scale them up, run: @@ -201,7 +203,7 @@ branch), you can run: ```sh export AIRY_VERSION=beta -helm install airy-apps ./helm-chart/charts/apps/ --set global.appImageTag=${AIRY_VERSION} --timeout 1000s +helm install core ./helm-chart/charts/apps/ --set global.appImageTag=${AIRY_VERSION} --timeout 1000s ``` If afterwards you need to modify or add other config parameters in the @@ -209,7 +211,7 @@ If afterwards you need to modify or add other config parameters in the ```sh cp airy.conf ./helm-chart/charts/apps/values.yaml -helm upgrade airy-apps ./helm-chart/charts/apps/ --timeout 1000s +helm upgrade core ./helm-chart/charts/apps/ --timeout 1000s ``` If you deploy the Airy Core Platform with a specific version tag, you must @@ -218,7 +220,7 @@ export the `AIRY_VERSION` variable before running `helm upgrade`: ```sh cp airy.conf ./helm-chart/charts/apps/values.yaml export AIRY_VERSION=beta -helm upgrade airy-apps ./helm-chart/charts/apps/ --set global.appImageTag=${AIRY_VERSION} --timeout 1000s +helm upgrade core ./helm-chart/charts/apps/ --set global.appImageTag=${AIRY_VERSION} --timeout 1000s ``` ## Network diff --git a/docs/docs/guides/airy-core-in-test-env.md b/docs/docs/guides/airy-core-in-test-env.md index 679d505a28..96b1873287 100644 --- a/docs/docs/guides/airy-core-in-test-env.md +++ b/docs/docs/guides/airy-core-in-test-env.md @@ -155,7 +155,7 @@ cd infrastructure vagrant ssh sudo -i cp /vagrant/airy.conf ~/airy-core/helm-chart/charts/apps/values.yaml -helm upgrade airy ~/airy-core/helm-chart/charts/apps/ --timeout 1000s +helm upgrade core ~/airy-core/helm-chart/charts/apps/ --timeout 1000s ``` ## Connect sources diff --git a/docs/docs/index.md b/docs/docs/index.md index e654937505..d654af9b53 100644 --- a/docs/docs/index.md +++ b/docs/docs/index.md @@ -79,7 +79,7 @@ curl -H "Content-Type: application/json" -H "Authorization: $token" -d \ }" api.airy/chatplugin.connect ``` -channels_connect +channels_connect The ID from the response is the `channel_id`. It is required for the next steps, so note it down. @@ -102,7 +102,7 @@ To see how messages are flowing through the system, [list conversations](api/http.md#list-conversations) for the channel you have just created. it should return the message you have just sent. -conversations.list +conversations.list ```bash curl -H "Content-Type: application/json" -H "Authorization: $token" -d "{}" \ @@ -114,11 +114,11 @@ You can also consume the messages directly from the Kafka ```bash cd infrastructure && vagrant ssh -kubectl exec -it airy-cp-kafka-0 -- /bin/bash +kubectl exec -it kafka-0 -- /bin/bash kafka-console-consumer \ --bootstrap-server airy-cp-kafka:9092 \ --topic application.communication.messages \ --from-beginning ``` -Kafka Topic +Kafka Topic diff --git a/docs/static/img/home/channels_connect.gif b/docs/static/img/home/channels_connect.gif deleted file mode 100644 index f4789b60d5..0000000000 Binary files a/docs/static/img/home/channels_connect.gif and /dev/null differ diff --git a/docs/static/img/home/connect_chatplugin_channel.gif b/docs/static/img/home/connect_chatplugin_channel.gif new file mode 100644 index 0000000000..8a777f717d Binary files /dev/null and b/docs/static/img/home/connect_chatplugin_channel.gif differ diff --git a/docs/static/img/home/conversation.list.jpg b/docs/static/img/home/conversation.list.jpg deleted file mode 100644 index b3f2b08778..0000000000 Binary files a/docs/static/img/home/conversation.list.jpg and /dev/null differ diff --git a/docs/static/img/home/conversation_list.gif b/docs/static/img/home/conversation_list.gif new file mode 100644 index 0000000000..7cae1d382c Binary files /dev/null and b/docs/static/img/home/conversation_list.gif differ diff --git a/docs/static/img/home/kafka.gif b/docs/static/img/home/kafka.gif deleted file mode 100644 index f24876f683..0000000000 Binary files a/docs/static/img/home/kafka.gif and /dev/null differ diff --git a/docs/static/img/home/messages_topic.gif b/docs/static/img/home/messages_topic.gif new file mode 100644 index 0000000000..6bf9c5200d Binary files /dev/null and b/docs/static/img/home/messages_topic.gif differ diff --git a/frontend/chat-plugin/src/airyRenderProps/AiryMessage/index.tsx b/frontend/chat-plugin/src/airyRenderProps/AiryMessage/index.tsx index 0707ff0c7f..51bc6d33f9 100644 --- a/frontend/chat-plugin/src/airyRenderProps/AiryMessage/index.tsx +++ b/frontend/chat-plugin/src/airyRenderProps/AiryMessage/index.tsx @@ -3,18 +3,23 @@ import linkifyString from 'linkifyjs/string'; import style from './index.module.scss'; -type Props = { +type AiryMessageProps = { message: { + id: string; sender_type: string; content: { text: string; - }; + type: string; + }[]; + delivery_state: string; + sent_at: string; + state: string; }; }; -const AiryMessage = ({message}: Props) => { +const AiryMessage = ({message}: AiryMessageProps) => { const isInbound = message.sender_type === 'source_contact'; - const messageDisplay = linkifyString(message.content.text, { + const messageDisplay = linkifyString(message.content[0].text, { className: `${isInbound ? style.messageLinkRight : style.messageLinkLeft}`, }); diff --git a/frontend/chat-plugin/src/components/chat/index.tsx b/frontend/chat-plugin/src/components/chat/index.tsx index f9498665d1..8137d929c4 100644 --- a/frontend/chat-plugin/src/components/chat/index.tsx +++ b/frontend/chat-plugin/src/components/chat/index.tsx @@ -19,12 +19,17 @@ import AiryBubble from '../../airyRenderProps/AiryBubble'; let ws: Websocket; const welcomeMessage = { - sender_type: 'app_user', id: '19527d24-9b47-4e18-9f79-fd1998b95059', + sender_type: 'app_user', + content: [ + { + text: 'Hello! How can we help you?', + type: 'text', + }, + ], + delivery_state: 'undefined', sent_at: 'undefined', - content: { - text: 'Hello! How can we help you?', - }, + state: 'delivered', }; type Props = AiryWidgetConfiguration & RoutableProps; diff --git a/frontend/chat-plugin/src/components/websocket/index.ts b/frontend/chat-plugin/src/components/websocket/index.ts index bf7a41bc80..8c2b9991d1 100644 --- a/frontend/chat-plugin/src/components/websocket/index.ts +++ b/frontend/chat-plugin/src/components/websocket/index.ts @@ -1,12 +1,16 @@ import {Client, messageCallbackType, IFrame} from '@stomp/stompjs'; import 'regenerator-runtime/runtime'; -// Default to hostname set by local environment -declare const window: any; -const API_HOST = window.airy.h || 'chatplugin.api'; +declare const window: { + airy: { + h: string; + cid: string; + no_tls: boolean; + }; +}; -// Allow turning off ssl (unsafe!) for local development -const TLS_PREFIX = window.airy.no_tls === true ? '' : 's'; +const API_HOST = window.airy ? window.airy.h : 'chatplugin.airy'; +const TLS_PREFIX = window.airy ? (window.airy.no_tls === true ? '' : 's') : ''; class Websocket { client: Client; diff --git a/frontend/chat-plugin/src/defaultScript.tsx b/frontend/chat-plugin/src/defaultScript.tsx index dbafc928fe..a8bf7a4f92 100644 --- a/frontend/chat-plugin/src/defaultScript.tsx +++ b/frontend/chat-plugin/src/defaultScript.tsx @@ -22,7 +22,13 @@ color: #444; body.appendChild(anchor); -declare const window: any; +declare const window: { + airy: { + h: string; + cid: string; + no_tls: boolean; + }; +}; new AiryWidget({ channel_id: window.airy.cid, diff --git a/frontend/chat-plugin/src/iframe.tsx b/frontend/chat-plugin/src/iframe.tsx index 3a441fc580..2b7299bff9 100644 --- a/frontend/chat-plugin/src/iframe.tsx +++ b/frontend/chat-plugin/src/iframe.tsx @@ -1,3 +1,6 @@ +import 'core-js'; +import 'regenerator-runtime/runtime'; + import {h, render} from 'preact'; const renderMethod = async () => { diff --git a/frontend/chat-plugin/src/routes/chat/index.tsx b/frontend/chat-plugin/src/routes/chat/index.tsx index 5f25d38cb8..a35969187e 100644 --- a/frontend/chat-plugin/src/routes/chat/index.tsx +++ b/frontend/chat-plugin/src/routes/chat/index.tsx @@ -1,4 +1,5 @@ /* eslint-disable react/display-name */ + import {h} from 'preact'; import {AuthConfiguration} from '../../config'; import {RoutableProps} from 'preact-router'; diff --git a/frontend/demo/BUILD b/frontend/demo/BUILD index a54ed7cb52..870ee81976 100644 --- a/frontend/demo/BUILD +++ b/frontend/demo/BUILD @@ -4,9 +4,15 @@ load("@rules_pkg//:pkg.bzl", "pkg_tar") load("//tools/build:container_push.bzl", "container_push") load("@io_bazel_rules_docker//container:container.bzl", "container_image") +module_deps = [ + "//lib/typescript/types", + "//lib/typescript/httpclient", +] + ts_library( name = "app", deps = [ + "//lib/typescript/httpclient", "//lib/typescript/types", "@npm//@airyhq/components", "@npm//@types/facebook-js-sdk", @@ -33,6 +39,7 @@ web_app( app_lib = ":app", entry = "frontend/demo/src/index.js", index = ":index.html", + module_deps = module_deps, static_assets = "//frontend/demo/public", ) diff --git a/frontend/demo/src/actions/channel/index.ts b/frontend/demo/src/actions/channel/index.ts index a7018bb5c3..89d0482f64 100644 --- a/frontend/demo/src/actions/channel/index.ts +++ b/frontend/demo/src/actions/channel/index.ts @@ -1,20 +1,13 @@ import {createAction} from 'typesafe-actions'; import _, {Dispatch} from 'redux'; -import {doFetchFromBackend} from '../../api/airyConfig'; - import { Channel, - ChannelApiPayload, - ChannelsPayload, - channelsMapper, - channelMapper, - connectChannelApiMapper, - disconnectChannelApiMapper, ConnectChannelRequestPayload, ExploreChannelRequestPayload, DisconnectChannelRequestPayload, -} from '../../model/Channel'; + HttpClient, +} from 'httpclient'; const SET_CURRENT_CHANNELS = '@@channel/SET_CHANNELS'; const ADD_CHANNELS = '@@channel/ADD_CHANNELS'; @@ -25,13 +18,12 @@ export const setCurrentChannelsAction = createAction(SET_CURRENT_CHANNELS, resol export const addChannelsAction = createAction(ADD_CHANNELS, resolve => (channels: Channel[]) => resolve(channels)); -export function getChannels() { +export function listChannels() { return async (dispatch: Dispatch) => { - return doFetchFromBackend('channels.list') - .then((response: ChannelsPayload) => { - const channels = channelsMapper(response); - dispatch(setCurrentChannelsAction(channels)); - return Promise.resolve(channels); + return HttpClient.listChannels() + .then((response: Channel[]) => { + dispatch(setCurrentChannelsAction(response)); + return Promise.resolve(response); }) .catch((error: Error) => { return Promise.reject(error); @@ -41,11 +33,10 @@ export function getChannels() { export function exploreChannels(requestPayload: ExploreChannelRequestPayload) { return async (dispatch: Dispatch) => { - return doFetchFromBackend('channels.explore', requestPayload) - .then((response: ChannelsPayload) => { - const channels = channelsMapper(response, requestPayload.source); - dispatch(addChannelsAction(channels)); - return Promise.resolve(channels); + return HttpClient.exploreChannels(requestPayload) + .then((response: Channel[]) => { + dispatch(addChannelsAction(response)); + return Promise.resolve(response); }) .catch((error: Error) => { return Promise.reject(error); @@ -55,11 +46,10 @@ export function exploreChannels(requestPayload: ExploreChannelRequestPayload) { export function connectChannel(requestPayload: ConnectChannelRequestPayload) { return async (dispatch: Dispatch) => { - return doFetchFromBackend('channels.connect', connectChannelApiMapper(requestPayload)) - .then((response: ChannelApiPayload) => { - const channel = channelMapper(response); - dispatch(addChannelsAction([channel])); - return Promise.resolve(channel); + return HttpClient.connectChannel(requestPayload) + .then((response: Channel) => { + dispatch(addChannelsAction([response])); + return Promise.resolve(response); }) .catch((error: Error) => { return Promise.reject(error); @@ -69,11 +59,10 @@ export function connectChannel(requestPayload: ConnectChannelRequestPayload) { export function disconnectChannel(requestPayload: DisconnectChannelRequestPayload) { return async (dispatch: Dispatch) => { - return doFetchFromBackend('channels.disconnect', disconnectChannelApiMapper(requestPayload)) - .then((response: ChannelsPayload) => { - const channels = channelsMapper(response); - dispatch(setCurrentChannelsAction(channels)); - return Promise.resolve(channels); + return HttpClient.disconnectChannel(requestPayload) + .then((response: Channel[]) => { + dispatch(setCurrentChannelsAction(response)); + return Promise.resolve(response); }) .catch((error: Error) => { return Promise.reject(error); diff --git a/frontend/demo/src/actions/conversations/index.ts b/frontend/demo/src/actions/conversations/index.ts index 9e0c987a1f..8395c8608e 100644 --- a/frontend/demo/src/actions/conversations/index.ts +++ b/frontend/demo/src/actions/conversations/index.ts @@ -1,9 +1,7 @@ import {Dispatch} from 'redux'; import {createAction} from 'typesafe-actions'; -import {doFetchFromBackend} from '../../api/airyConfig'; - -import {Conversation, ConversationPayload, conversationsMapper} from '../../model/Conversation'; -import {ResponseMetadata} from '../../model/ResponseMetadata'; +import {HttpClient, Conversation} from 'httpclient'; +import {ResponseMetadataPayload} from 'httpclient/payload/ResponseMetadataPayload'; import {StateModel} from '../../reducers'; export const CONVERSATION_LOADING = '@@conversation/LOADING'; @@ -20,7 +18,7 @@ export const loadingConversationsAction = createAction(CONVERSATIONS_LOADING, re export const mergeConversationsAction = createAction( CONVERSATIONS_MERGE, - resolve => (conversations: Conversation[], responseMetadata: ResponseMetadata) => + resolve => (conversations: Conversation[], responseMetadata: ResponseMetadataPayload) => resolve({conversations, responseMetadata}) ); @@ -34,19 +32,12 @@ export const removeErrorFromConversationAction = createAction( resolve => (conversationId: string) => resolve({conversationId}) ); -export interface FetchConversationsResponse { - data: ConversationPayload[]; - metadata: ResponseMetadata; -} - -export function fetchConversations() { +export function listConversations() { return async (dispatch: Dispatch) => { dispatch(loadingConversationsAction()); - return doFetchFromBackend('conversations.list', { - page_size: 10, - }) - .then((response: FetchConversationsResponse) => { - dispatch(mergeConversationsAction(conversationsMapper(response.data), response.metadata)); + return HttpClient.listConversations({page_size: 10}) + .then((response: {data: Conversation[]; metadata: ResponseMetadataPayload}) => { + dispatch(mergeConversationsAction(response.data, response.metadata)); return Promise.resolve(true); }) .catch((error: Error) => { @@ -55,15 +46,13 @@ export function fetchConversations() { }; } -export function fetchNextConversations() { +export function listNextConversations() { return async (dispatch: Dispatch, state: StateModel) => { - const cursor = state.data.conversations.all.metadata.next_cursor; + const cursor = state.data.conversations.all.metadata.nextCursor; dispatch(loadingConversationsAction()); - return doFetchFromBackend('conversations.list', { - cursor, - }) - .then((response: FetchConversationsResponse) => { - dispatch(mergeConversationsAction(conversationsMapper(response.data), response.metadata)); + return HttpClient.listConversations({cursor: cursor}) + .then((response: {data: Conversation[]; metadata: ResponseMetadataPayload}) => { + dispatch(mergeConversationsAction(response.data, response.metadata)); return Promise.resolve(true); }) .catch((error: Error) => { diff --git a/frontend/demo/src/actions/index.ts b/frontend/demo/src/actions/index.ts new file mode 100644 index 0000000000..106efb89c6 --- /dev/null +++ b/frontend/demo/src/actions/index.ts @@ -0,0 +1,5 @@ +export * from './channel'; +export * from './conversations'; +export * from './settings'; +export * from './tags'; +export * from './user'; diff --git a/frontend/demo/src/actions/settings/index.tsx b/frontend/demo/src/actions/settings/index.tsx index 28a569fb54..79a0468dd7 100644 --- a/frontend/demo/src/actions/settings/index.tsx +++ b/frontend/demo/src/actions/settings/index.tsx @@ -1,5 +1,4 @@ import _, {Dispatch} from 'redux'; - import {fakeData} from '../../pages/Tags/FAKESETTINGS'; export const ADD_SETTINGS_TO_STORE = 'ADD_SETTINGS_TO_STORE'; diff --git a/frontend/demo/src/actions/tags/index.tsx b/frontend/demo/src/actions/tags/index.tsx index 7dcc776232..da4b57a8c6 100644 --- a/frontend/demo/src/actions/tags/index.tsx +++ b/frontend/demo/src/actions/tags/index.tsx @@ -1,8 +1,7 @@ import _, {Dispatch} from 'redux'; import {createAction} from 'typesafe-actions'; -import {doFetchFromBackend} from '../../api/airyConfig'; -import {Tag, TagPayload, CreateTagRequestPayload, GetTagsResponse, tagsMapper} from '../../model/Tag'; +import {HttpClient, Tag, CreateTagRequestPayload} from 'httpclient'; const UPSERT_TAG = 'UPSERT_TAG'; const DELETE_TAG = 'DELETE_TAG'; @@ -18,24 +17,19 @@ export const deleteTagAction = createAction(DELETE_TAG, resolve => (id: string) export const filterTagAction = createAction(SET_TAG_FILTER, resolve => (filter: string) => resolve(filter)); export const errorTagAction = createAction(ERROR_TAG, resolve => (status: string) => resolve(status)); -export function getTags() { +export function listTags() { return function(dispatch: Dispatch) { - return doFetchFromBackend('tags.list').then((response: GetTagsResponse) => { - dispatch(fetchTagAction(tagsMapper(response.data))); + return HttpClient.listTags().then((response: Tag[]) => { + dispatch(fetchTagAction(response)); }); }; } export function createTag(requestPayload: CreateTagRequestPayload) { return async (dispatch: Dispatch) => { - return doFetchFromBackend('tags.create', requestPayload) - .then((response: TagPayload) => { - const tag: Tag = { - id: response.id, - name: requestPayload.name, - color: requestPayload.color, - }; - dispatch(addTagAction(tag)); + return HttpClient.createTag(requestPayload) + .then((response: Tag) => { + dispatch(addTagAction(response)); return Promise.resolve(true); }) .catch((error: string) => { @@ -47,19 +41,13 @@ export function createTag(requestPayload: CreateTagRequestPayload) { export function updateTag(tag: Tag) { return function(dispatch: Dispatch) { - doFetchFromBackend('tags.update', { - id: tag.id, - name: tag.name, - color: tag.color, - }).then(() => dispatch(editTagAction(tag))); + HttpClient.updateTag(tag).then(() => dispatch(editTagAction(tag))); }; } export function deleteTag(id: string) { return function(dispatch: Dispatch) { - doFetchFromBackend('tags.delete', { - id, - }).then(() => { + HttpClient.deleteTag(id).then(() => { dispatch(deleteTagAction(id)); }); }; diff --git a/frontend/demo/src/actions/user/index.ts b/frontend/demo/src/actions/user/index.ts index 85c87cb5ae..614d0d21ba 100644 --- a/frontend/demo/src/actions/user/index.ts +++ b/frontend/demo/src/actions/user/index.ts @@ -1,9 +1,7 @@ import {createAction} from 'typesafe-actions'; import _, {Dispatch} from 'redux'; -import {doFetchFromBackend} from '../../api/airyConfig'; - -import {User, userMapper, UserPayload} from '../../model/User'; +import {User, HttpClient, LoginViaEmailRequestPayload} from 'httpclient'; const SET_CURRENT_USER = '@@auth/SET_CURRENT_USER'; const USER_AUTH_ERROR = '@@auth/ERROR'; @@ -12,16 +10,12 @@ const USER_LOGOUT = '@@auth/LOGOUT_USER'; export const setCurrentUserAction = createAction(SET_CURRENT_USER, resolve => (user: User) => resolve(user)); export const userAuthErrorAction = createAction(USER_AUTH_ERROR, resolve => (error: Error) => resolve(error)); export const logoutUserAction = createAction(USER_LOGOUT); -export interface LoginViaEmailRequestPayload { - email: string; - password: string; -} export function loginViaEmail(requestPayload: LoginViaEmailRequestPayload) { return async (dispatch: Dispatch) => { - return doFetchFromBackend('users.login', requestPayload) - .then((response: UserPayload) => { - dispatch(setCurrentUserAction(userMapper(response))); + return HttpClient.loginViaEmail(requestPayload) + .then((response: User) => { + dispatch(setCurrentUserAction(response)); return Promise.resolve(true); }) .catch((error: Error) => { diff --git a/frontend/demo/src/components/ColorSelector.tsx b/frontend/demo/src/components/ColorSelector.tsx index 553eee8aee..eeb6b6e32a 100644 --- a/frontend/demo/src/components/ColorSelector.tsx +++ b/frontend/demo/src/components/ColorSelector.tsx @@ -1,7 +1,7 @@ import React, {useCallback} from 'react'; import {connect} from 'react-redux'; import {RootState} from '../reducers'; -import {TagSettings} from '../model/Tag'; +import {TagSettings} from '../types'; import styles from './ColorSelector.module.scss'; diff --git a/frontend/demo/src/components/IconChannel/index.tsx b/frontend/demo/src/components/IconChannel/index.tsx index cf23b68799..add9b1e7c5 100644 --- a/frontend/demo/src/components/IconChannel/index.tsx +++ b/frontend/demo/src/components/IconChannel/index.tsx @@ -1,6 +1,6 @@ /* eslint-disable react/display-name */ import React from 'react'; -import {Channel} from '../../model/Channel'; +import {Channel} from 'httpclient'; import {ReactComponent as FacebookIcon} from '../../assets/images/icons/facebook_rounded.svg'; import {ReactComponent as GoogleIcon} from '../../assets/images/icons/google-messages.svg'; diff --git a/frontend/demo/src/model/Channel.ts b/frontend/demo/src/model/Channel.ts deleted file mode 100644 index 47b8db58aa..0000000000 --- a/frontend/demo/src/model/Channel.ts +++ /dev/null @@ -1,87 +0,0 @@ -export interface Channel { - name: string; - source: string; - sourceChannelId: string; - connected: boolean; - imageUrl?: string; -} - -export interface ChannelApiPayload { - id: string; - name: string; - image_url: string; - source: string; - source_channel_id: string; -} - -export interface ExploreChannelRequestPayload { - source: string; - token: string; -} - -export interface ChannelsPayload { - data: Channel[]; -} - -export interface ConnectChannelRequestPayload { - source: string; - sourceChannelId: string; - token: string; - name?: string; - imageUrl?: string; -} - -export interface ConnectChannelRequestApiPayload { - source: string; - source_channel_id: string; - token: string; - name?: string; - image_url?: string; -} - -export interface DisconnectChannelRequestPayload { - channelId: string; -} - -export interface DisconnectChannelRequestApiPayload { - channel_id: string; -} - -export const channelsMapper = (payload: ChannelsPayload, source?: string): Channel[] => { - return payload.data.map( - (entry: Channel): Channel => { - return { - source, - ...entry, - }; - } - ); -}; - -export const channelMapper = (payload: ChannelApiPayload): Channel => { - return { - name: payload.name, - source: payload.source, - sourceChannelId: payload.source_channel_id, - imageUrl: payload.image_url, - connected: true, - }; -}; - -export const connectChannelApiMapper = (payload: ConnectChannelRequestPayload): ConnectChannelRequestApiPayload => { - return { - source: payload.source, - source_channel_id: payload.sourceChannelId, - token: payload.token, - name: payload.name, - image_url: payload.imageUrl, - }; -}; - -export const disconnectChannelApiMapper = ( - payload: DisconnectChannelRequestPayload -): DisconnectChannelRequestApiPayload => { - return { - channel_id: payload.channelId, - }; -}; diff --git a/frontend/demo/src/model/Conversation.ts b/frontend/demo/src/model/Conversation.ts deleted file mode 100644 index 1c950c5cbd..0000000000 --- a/frontend/demo/src/model/Conversation.ts +++ /dev/null @@ -1,60 +0,0 @@ -import {Channel} from './Channel'; -import {Message, messageMapper, MessagePayload} from './Message'; - -export interface Conversation { - id: string; - channel: Channel; - createdAt: string; - contact: { - avatarUrl: string; - firstName: string; - lastName: string; - displayName: string; - id: string; - }; - tags: string[]; - lastMessage: Message; - unreadMessageCount?: number; -} - -export interface ConversationPayload { - id: string; - channel: Channel; - created_at: string; - contact: { - avatar_url: string; - first_name: string; - last_name: string; - id: string; - }; - tags: string[]; - last_message: MessagePayload; - unread_message_count?: number; -} - -export const conversationMapper = (payload: ConversationPayload): Conversation => { - const conversation: Conversation = { - id: payload.id, - channel: payload.channel, - createdAt: payload.created_at, - contact: { - avatarUrl: payload.contact.avatar_url, - firstName: payload.contact.first_name, - lastName: payload.contact.last_name, - displayName: payload.contact.first_name + ' ' + payload.contact.last_name, - id: payload.contact.id, - }, - tags: payload.tags, - lastMessage: messageMapper(payload.last_message), - unreadMessageCount: payload.unread_message_count, - }; - return conversation; -}; - -export const conversationsMapper = (payloadArray: ConversationPayload[]): Conversation[] => { - const conversations: Conversation[] = []; - payloadArray.forEach((conversation: ConversationPayload) => { - conversations.push(conversationMapper(conversation)); - }); - return conversations; -}; diff --git a/frontend/demo/src/model/ResponseMetadata.ts b/frontend/demo/src/model/ResponseMetadata.ts deleted file mode 100644 index cb883d755d..0000000000 --- a/frontend/demo/src/model/ResponseMetadata.ts +++ /dev/null @@ -1,5 +0,0 @@ -export interface ResponseMetadata { - previous_cursor: string; - next_cursor: string; - total: number; -} diff --git a/frontend/demo/src/model/Tag.ts b/frontend/demo/src/model/Tag.ts deleted file mode 100644 index bea9ec5dbb..0000000000 --- a/frontend/demo/src/model/Tag.ts +++ /dev/null @@ -1,76 +0,0 @@ -export interface Tag { - id: string; - name: string; - color: string; -} - -export interface TagPayload { - id: string; -} - -export interface CreateTagRequestPayload { - name: string; - color: string; -} - -export interface GetTagsResponse { - data: Tag[]; -} - -export interface ColorSettings { - default: string; - background: string; - font: string; - position: number; - border: string; -} - -export interface TagSettings { - colors: ColorSettings[]; - enabled: boolean; - channels: Tag[]; -} - -export interface ErrorTag { - status: string; - data?: string; -} - -export interface ModalType { - modal: { - type: string; - tagId: string; - tagName: string; - delete: string; - error: string; - }; -} - -export const tagsMapper = (serverTags: Tag[]): Tag[] => { - const tags: Tag[] = []; - const _ = serverTags.map((tag: Tag) => { - tag.color = colorMapper(tag.color); - tags.push(tag); - }); - return tags; -}; - -export const colorMapper = (color: string): string => { - switch (color) { - case 'BLUE': - color = 'tag-blue'; - break; - case 'RED': - color = 'tag-red'; - break; - case 'GREEN': - color = 'tag-green'; - break; - case 'PURPLE': - color = 'tag-purple'; - break; - default: - color = 'tag-blue'; - } - return color; -}; diff --git a/frontend/demo/src/pages/Channels/index.tsx b/frontend/demo/src/pages/Channels/index.tsx index 26bc2d3aba..f345a5310e 100644 --- a/frontend/demo/src/pages/Channels/index.tsx +++ b/frontend/demo/src/pages/Channels/index.tsx @@ -5,15 +5,14 @@ import {RouteComponentProps} from 'react-router-dom'; import FacebookLogin from 'react-facebook-login'; import {Button} from '@airyhq/components'; -import {AiryConfig} from '../../api/airyConfig'; -import {Channel} from '../../model/Channel'; -import {getChannels, exploreChannels, connectChannel, disconnectChannel} from '../../actions/channel'; +import {AiryConfig, Channel} from 'httpclient'; +import {listChannels, exploreChannels, connectChannel, disconnectChannel} from '../../actions/channel'; import {StateModel} from '../../reducers/index'; import styles from './index.module.scss'; const mapDispatchToProps = { - getChannels, + listChannels, exploreChannels, connectChannel, disconnectChannel, @@ -32,7 +31,7 @@ type ChannelsConnectProps = {} & ConnectedProps & RouteCompone const Channels = (props: ChannelsConnectProps) => { const [facebookToken, setFacebookToken] = useState(''); useEffect(() => { - props.getChannels(); + props.listChannels(); }, []); const connect = (token: string) => { diff --git a/frontend/demo/src/pages/Inbox/ConversationList/index.tsx b/frontend/demo/src/pages/Inbox/ConversationList/index.tsx index ce295c1862..e36e18d76e 100644 --- a/frontend/demo/src/pages/Inbox/ConversationList/index.tsx +++ b/frontend/demo/src/pages/Inbox/ConversationList/index.tsx @@ -6,7 +6,7 @@ import InfiniteLoader from 'react-window-infinite-loader'; import ResizableWindowList from '../../../components/ResizableWindowList'; import {newestConversationFirst} from '../../../selectors/conversations'; -import {fetchNextConversations} from '../../../actions/conversations'; +import {listNextConversations} from '../../../actions/conversations'; import ConversationListHeader from '../ConversationListHeader'; import ConversationListItem from '../ConversationListItem'; @@ -14,7 +14,7 @@ import NoConversations from '../NoConversations'; import {SimpleLoader} from '@airyhq/components'; import {StateModel} from '../../../reducers'; -import {Conversation} from '../../../model/Conversation'; +import {Conversation} from 'httpclient'; import './index.scss'; @@ -25,7 +25,7 @@ type MatchParams = { }; const mapDispatchToProps = { - fetchNextConversations, + listNextConversations, }; const mapStateToProps = (state: StateModel, ownProps: RouteComponentProps) => { @@ -67,17 +67,17 @@ const ConversationList = (props: ConversationListProps) => { }; const renderConversationList = () => { - const {conversations, conversationsMetadata, loading, fetchNextConversations} = props; + const {conversations, conversationsMetadata, loading, listNextConversations} = props; const items = conversations; const metadata = conversationsMetadata; - const hasMoreData = metadata.next_cursor && metadata.next_cursor.length > 0; + const hasMoreData = metadata.nextCursor && metadata.nextCursor.length > 0; const isItemLoaded = (index: number) => index < items.length; const itemCount = hasMoreData ? items.length + 1 : items.length; const loadMoreItems = () => { if (!metadata.loading) { - fetchNextConversations(); + listNextConversations(); } return Promise.resolve(true); }; diff --git a/frontend/demo/src/pages/Inbox/ConversationListItem/index.tsx b/frontend/demo/src/pages/Inbox/ConversationListItem/index.tsx index f6fb8786de..697d3cad91 100644 --- a/frontend/demo/src/pages/Inbox/ConversationListItem/index.tsx +++ b/frontend/demo/src/pages/Inbox/ConversationListItem/index.tsx @@ -6,8 +6,7 @@ import IconChannel from '../../../components/IconChannel'; import {formatTimeOfMessage} from '../../../services/format/date'; -import {Conversation} from '../../../model/Conversation'; -import {Message} from '../../../model/Message'; +import {Conversation, Message} from 'httpclient'; import {StateModel} from '../../../reducers'; import {INBOX_CONVERSATIONS_ROUTE} from '../../../routes/routes'; diff --git a/frontend/demo/src/pages/Inbox/index.tsx b/frontend/demo/src/pages/Inbox/index.tsx index c1ce3b8f7d..ff07645e13 100644 --- a/frontend/demo/src/pages/Inbox/index.tsx +++ b/frontend/demo/src/pages/Inbox/index.tsx @@ -1,8 +1,8 @@ import React, {useEffect} from 'react'; import _, {connect, ConnectedProps} from 'react-redux'; -import {User} from '../../model/User'; -import {fetchConversations} from '../../actions/conversations'; +import {User} from 'httpclient'; +import {listConversations} from '../../actions/conversations'; import {StateModel} from '../../reducers'; import Messenger from './Messenger'; @@ -18,14 +18,14 @@ const mapStateToProps = (state: StateModel) => { }; const mapDispatchToProps = { - fetchConversations, + listConversations, }; const connector = connect(mapStateToProps, mapDispatchToProps); const MessengerContainer = (props: InboxProps & ConnectedProps) => { useEffect(() => { - props.fetchConversations(); + props.listConversations(); }); return ; diff --git a/frontend/demo/src/pages/Tags/SimpleTagForm.tsx b/frontend/demo/src/pages/Tags/SimpleTagForm.tsx index b6ee7c50a8..38da9472d4 100644 --- a/frontend/demo/src/pages/Tags/SimpleTagForm.tsx +++ b/frontend/demo/src/pages/Tags/SimpleTagForm.tsx @@ -1,7 +1,7 @@ import React, {useState, Fragment} from 'react'; import {connect} from 'react-redux'; -import {createTag, getTags, errorTag, filterTags} from '../../actions/tags'; +import {createTag, listTags, errorTag, filterTags} from '../../actions/tags'; import {filteredTags} from '../../selectors/tags'; import {Button, Input} from '@airyhq/components'; @@ -9,7 +9,7 @@ import Dialog from '../../components/Dialog'; import ColorSelector from '../../components/ColorSelector'; import Tag from '../../pages/Tags/Tag'; -import {Tag as TagModel} from '../../model/Tag'; +import {Tag as TagModel, TagColor} from 'httpclient'; import styles from './SimpleTagForm.module.scss'; import {RootState} from '../../reducers'; @@ -24,7 +24,7 @@ type SimpleTagFormProps = { const SimpleTagForm = ({errorMessage, createTag, errorTag, onClose, tags}: SimpleTagFormProps) => { const [name, setName] = useState(''); - const [color, setColor] = useState('tag-blue'); + const [color, setColor] = useState('tag-blue'); const [showError, setShowError] = useState(true); const handleCreate = () => { if (name.trim().length) { @@ -73,13 +73,13 @@ const SimpleTagForm = ({errorMessage, createTag, errorTag, onClose, tags}: Simpl

{(!name.length || showError) && errorMessage}

{name && (
- +
)}

Pick a color

) => setColor(e.target.value)} + handleUpdate={(e: React.ChangeEvent) => setColor(e.target.value as TagColor)} color={color} editing={true} /> @@ -104,7 +104,7 @@ const mapStateToProps = (state: RootState) => { const mapDispatchToProps = { createTag, errorTag, - getTags, + listTags, filterTags, }; diff --git a/frontend/demo/src/pages/Tags/TableRow.tsx b/frontend/demo/src/pages/Tags/TableRow.tsx index 60bc253533..350ee6e2e4 100644 --- a/frontend/demo/src/pages/Tags/TableRow.tsx +++ b/frontend/demo/src/pages/Tags/TableRow.tsx @@ -8,7 +8,8 @@ import {ReactComponent as EditIcon} from '../../assets/images/icons/edit.svg'; import {ReactComponent as TrashIcon} from '../../assets/images/icons/trash.svg'; import ColorSelector from '../../components/ColorSelector'; import Tag from './Tag'; -import {Tag as TagModel, TagSettings} from '../../model/Tag'; +import {Tag as TagModel, TagColor} from 'httpclient'; +import {TagSettings} from '../../types'; import {RootState} from '../../reducers'; type TableRowProps = { @@ -33,7 +34,7 @@ const TableRowComponent = (props: TableRowProps) => { if (e.target.name === 'tag_name') { setTagState({...tagState, name: e.target && e.target.value}); } else { - setTagState({...tagState, color: e.target && e.target.value}); + setTagState({...tagState, color: e.target && (e.target.value as TagColor)}); } }, [tagState, setTagState] @@ -43,7 +44,7 @@ const TableRowComponent = (props: TableRowProps) => { const currentTag = { id: tag.id, name: tagState.name, - color: tagState.color, + color: tagState.color as TagColor, }; updateTag(currentTag); setTagState({ @@ -122,7 +123,7 @@ const TableRowComponent = (props: TableRowProps) => { return ( setTagState({...tag, edit: true})}> - + diff --git a/frontend/demo/src/pages/Tags/Tag.tsx b/frontend/demo/src/pages/Tags/Tag.tsx index 2f62f1e984..fbc6495481 100644 --- a/frontend/demo/src/pages/Tags/Tag.tsx +++ b/frontend/demo/src/pages/Tags/Tag.tsx @@ -1,11 +1,11 @@ import React from 'react'; import {connect} from 'react-redux'; -import {Tag as TagModel} from '../../model/Tag'; +import {Tag as TagModel} from 'httpclient'; +import {TagSettings} from '../../types'; import close from '../../assets/images/icons/close.svg'; import styles from './Tag.module.scss'; import {RootState} from '../../reducers'; -import {TagSettings} from '../../model/Tag'; type TagProps = { tag: TagModel; diff --git a/frontend/demo/src/pages/Tags/index.tsx b/frontend/demo/src/pages/Tags/index.tsx index ee82348866..318101edf4 100644 --- a/frontend/demo/src/pages/Tags/index.tsx +++ b/frontend/demo/src/pages/Tags/index.tsx @@ -5,17 +5,17 @@ import {SettingsModal, LinkButton, Button, SearchField, Input} from '@airyhq/com import plus from '../../assets/images/icons/plus.svg'; -import {getTags, deleteTag, filterTags, errorTag} from '../../actions/tags'; +import {listTags, deleteTag, filterTags, errorTag} from '../../actions/tags'; import {fakeSettingsAPICall} from '../../actions/settings'; import {filteredTags} from '../../selectors/tags'; -import {Tag} from '../../model/Tag'; +import {Tag} from 'httpclient'; +import {ModalType} from '../../types'; import styles from './index.module.scss'; import {TableRow} from './TableRow'; import SimpleTagForm from './SimpleTagForm'; import EmptyStateTags from './EmptyStateTags'; import {RootState} from '../../reducers'; -import {ModalType} from '../../model/Tag'; const initialState = { modal: { @@ -33,7 +33,7 @@ class Tags extends Component, typeof initialSta state = initialState; componentDidMount() { - this.props.getTags(); + this.props.listTags(); this.props.fakeSettingsAPICall(); this.props.filterTags(''); } @@ -213,7 +213,7 @@ const mapStateToProps = (state: RootState) => ({ }); const mapDispatchToProps = { - getTags, + listTags, deleteTag, errorTag, filterTags, diff --git a/frontend/demo/src/reducers/data/channels/index.ts b/frontend/demo/src/reducers/data/channels/index.ts index ade05218ad..ab7d7759a3 100644 --- a/frontend/demo/src/reducers/data/channels/index.ts +++ b/frontend/demo/src/reducers/data/channels/index.ts @@ -1,5 +1,5 @@ import {ActionType, getType} from 'typesafe-actions'; -import {Channel} from '../../../model/Channel'; +import {Channel} from 'httpclient'; import * as actions from '../../../actions/channel'; import {unionWith} from 'lodash-es'; diff --git a/frontend/demo/src/reducers/data/conversations/index.ts b/frontend/demo/src/reducers/data/conversations/index.ts index 8c975d9ddf..0a262f7fe0 100644 --- a/frontend/demo/src/reducers/data/conversations/index.ts +++ b/frontend/demo/src/reducers/data/conversations/index.ts @@ -2,21 +2,20 @@ import {ActionType, getType} from 'typesafe-actions'; import {combineReducers} from 'redux'; import {cloneDeep} from 'lodash-es'; -import {ResponseMetadata} from '../../../model/ResponseMetadata'; -import {Conversation} from '../../../model/Conversation'; +import {Conversation, Message} from 'httpclient'; +import {ResponseMetadataPayload} from 'httpclient/payload/ResponseMetadataPayload'; import * as actions from '../../../actions/conversations'; -import {Message} from '../../../model/Message'; type Action = ActionType; type MergedConversation = Conversation & { blocked?: boolean; - metadata?: ResponseMetadata & { + metadata?: ResponseMetadataPayload & { loading: boolean; }; }; -export type AllConversationMetadata = ResponseMetadata & { +export type AllConversationMetadata = ResponseMetadataPayload & { loading?: boolean; loaded?: boolean; filteredTotal?: number; @@ -93,8 +92,8 @@ const initialState: AllConversationsState = { metadata: { loading: false, loaded: false, - previous_cursor: null, - next_cursor: null, + previousCursor: null, + nextCursor: null, total: 0, filteredTotal: 0, }, diff --git a/frontend/demo/src/reducers/data/index.ts b/frontend/demo/src/reducers/data/index.ts index 3d8a8376b3..1c593309f3 100644 --- a/frontend/demo/src/reducers/data/index.ts +++ b/frontend/demo/src/reducers/data/index.ts @@ -1,8 +1,7 @@ import _, {combineReducers, Reducer} from 'redux-starter-kit'; -import {User} from '../../model/User'; +import {User, Channel} from 'httpclient'; import {Tags} from './tags'; import {Settings} from './settings'; -import {Channel} from '../../model/Channel'; import user from './user'; import conversations, {ConversationsState} from './conversations'; @@ -10,6 +9,12 @@ import tags from './tags'; import settings from './settings'; import channels from './channels'; +export * from './channels'; +export * from './conversations'; +export * from './settings'; +export * from './tags'; +export {initialState} from './user'; + export type DataState = { user: User; conversations: ConversationsState; diff --git a/frontend/demo/src/reducers/data/tags/index.ts b/frontend/demo/src/reducers/data/tags/index.ts index 2e2c45730d..0ad237a7ba 100644 --- a/frontend/demo/src/reducers/data/tags/index.ts +++ b/frontend/demo/src/reducers/data/tags/index.ts @@ -1,6 +1,6 @@ import {ActionType, getType} from 'typesafe-actions'; import * as actions from '../../../actions/tags'; -import {Tag} from '../../../model/Tag'; +import {Tag} from 'httpclient'; import {DataState} from '../../data'; type Action = ActionType; diff --git a/frontend/demo/src/reducers/data/user/index.ts b/frontend/demo/src/reducers/data/user/index.ts index f55a6e551c..1db881fbab 100644 --- a/frontend/demo/src/reducers/data/user/index.ts +++ b/frontend/demo/src/reducers/data/user/index.ts @@ -1,7 +1,6 @@ import {ActionType, getType} from 'typesafe-actions'; -import {User} from '../../../model/User'; import * as actions from '../../../actions/user'; -import {getUserFromStore, storeUserData} from '../../../api/webStore'; +import {getUserFromStore, storeUserData, User} from 'httpclient'; type Action = ActionType; diff --git a/frontend/demo/src/reducers/index.ts b/frontend/demo/src/reducers/index.ts index cbf52e1269..3a874c6e92 100644 --- a/frontend/demo/src/reducers/index.ts +++ b/frontend/demo/src/reducers/index.ts @@ -3,10 +3,12 @@ import {ActionType, getType} from 'typesafe-actions'; import _, {CombinedState} from 'redux'; import * as authActions from '../actions/user'; -import {clearUserData} from '../api/webStore'; +import {clearUserData} from 'httpclient'; import data, {DataState} from './data'; +export * from './data'; + type Action = ActionType; export type StateModel = { diff --git a/frontend/demo/src/selectors/conversations.ts b/frontend/demo/src/selectors/conversations.ts index a5b45fdaff..ff07e5aa5d 100644 --- a/frontend/demo/src/selectors/conversations.ts +++ b/frontend/demo/src/selectors/conversations.ts @@ -1,6 +1,6 @@ import _, {createSelector} from 'reselect'; import {reverse, sortBy, values} from 'lodash-es'; -import {Conversation} from '../model/Conversation'; +import {Conversation} from 'httpclient'; import {StateModel} from '../reducers'; import {ConversationMap} from '../reducers/data/conversations'; diff --git a/frontend/demo/src/selectors/tags.ts b/frontend/demo/src/selectors/tags.ts index a1f8046480..0f06f8b95e 100644 --- a/frontend/demo/src/selectors/tags.ts +++ b/frontend/demo/src/selectors/tags.ts @@ -1,6 +1,6 @@ import _redux from 'redux'; import _, {createSelector} from 'reselect'; -import {Tag} from '../model/Tag'; +import {Tag} from 'httpclient'; import {RootState} from '../reducers'; const tags = (state: RootState) => state.data.tags.all; diff --git a/frontend/demo/src/services/format/date.ts b/frontend/demo/src/services/format/date.ts index 33c3327787..6dbb872196 100644 --- a/frontend/demo/src/services/format/date.ts +++ b/frontend/demo/src/services/format/date.ts @@ -1,4 +1,4 @@ -import {Message} from '../../model/Message'; +import {Message} from 'httpclient'; export function dateFormat(date: Date) { const now = new Date(); diff --git a/frontend/demo/src/types/index.ts b/frontend/demo/src/types/index.ts new file mode 100644 index 0000000000..584cc0afa1 --- /dev/null +++ b/frontend/demo/src/types/index.ts @@ -0,0 +1 @@ +export * from './tag'; diff --git a/frontend/demo/src/types/tag.ts b/frontend/demo/src/types/tag.ts new file mode 100644 index 0000000000..6cb778d004 --- /dev/null +++ b/frontend/demo/src/types/tag.ts @@ -0,0 +1,30 @@ +import {Tag} from 'httpclient'; + +export interface ColorSettings { + default: string; + background: string; + font: string; + position: number; + border: string; +} + +export interface TagSettings { + colors: ColorSettings[]; + enabled: boolean; + channels: Tag[]; +} + +export interface ErrorTag { + status: string; + data?: string; +} + +export interface ModalType { + modal: { + type: string; + tagId: string; + tagName: string; + delete: string; + error: string; + }; +} diff --git a/go_repositories.bzl b/go_repositories.bzl index 86bc1ef979..05a2847486 100644 --- a/go_repositories.bzl +++ b/go_repositories.bzl @@ -1,6 +1,31 @@ load("@bazel_gazelle//:deps.bzl", "go_repository") def go_repositories(): + go_repository( + name = "co_honnef_go_tools", + importpath = "honnef.co/go/tools", + sum = "h1:sXmLre5bzIR6ypkjXCDI3jHPssRhc8KD/Ome589sc3U=", + version = "v0.0.1-2020.1.3", + ) + go_repository( + name = "com_github_afex_hystrix_go", + importpath = "github.com/afex/hystrix-go", + sum = "h1:rFw4nCn9iMW+Vajsk51NtYIcwSTkXr+JGrMd36kTDJw=", + version = "v0.0.0-20180502004556-fa1af6a1f4f5", + ) + go_repository( + name = "com_github_alecthomas_template", + importpath = "github.com/alecthomas/template", + sum = "h1:JYp7IbQjafoB+tBA3gMyHYHrpOtNuDiK/uB5uXxq5wM=", + version = "v0.0.0-20190718012654-fb15b899a751", + ) + go_repository( + name = "com_github_alecthomas_units", + importpath = "github.com/alecthomas/units", + sum = "h1:UQZhZ2O0vMHr2cI+DC1Mbh0TJxzA3RcLoMsFw+aXw7E=", + version = "v0.0.0-20190924025748-f65c72e2690d", + ) + go_repository( name = "com_github_alicebob_gopher_json", importpath = "github.com/alicebob/gopher-json", @@ -8,178 +33,1288 @@ def go_repositories(): version = "v0.0.0-20200520072559-a9ecdc9d1d3a", ) go_repository( - name = "com_github_alicebob_miniredis_v2", - importpath = "github.com/alicebob/miniredis/v2", - sum = "h1:kohgdtN58KW/r9ZDVmMJE3MrfbumwsDQStd0LPAGmmw=", - version = "v2.13.3", + name = "com_github_alicebob_miniredis_v2", + importpath = "github.com/alicebob/miniredis/v2", + sum = "h1:kohgdtN58KW/r9ZDVmMJE3MrfbumwsDQStd0LPAGmmw=", + version = "v2.13.3", + ) + go_repository( + name = "com_github_apache_thrift", + importpath = "github.com/apache/thrift", + sum = "h1:5hryIiq9gtn+MiLVn0wP37kb/uTeRZgN08WoCsAhIhI=", + version = "v0.13.0", + ) + go_repository( + name = "com_github_armon_circbuf", + importpath = "github.com/armon/circbuf", + sum = "h1:QEF07wC0T1rKkctt1RINW/+RMTVmiwxETico2l3gxJA=", + version = "v0.0.0-20150827004946-bbbad097214e", + ) + + go_repository( + name = "com_github_armon_consul_api", + importpath = "github.com/armon/consul-api", + sum = "h1:G1bPvciwNyF7IUmKXNt9Ak3m6u9DE1rF+RmtIkBpVdA=", + version = "v0.0.0-20180202201655-eb2c6b5be1b6", + ) + go_repository( + name = "com_github_armon_go_metrics", + importpath = "github.com/armon/go-metrics", + sum = "h1:8GUt8eRujhVEGZFFEjBj46YV4rDjvGrNxb0KMWYkL2I=", + version = "v0.0.0-20180917152333-f0300d1749da", + ) + go_repository( + name = "com_github_armon_go_radix", + importpath = "github.com/armon/go-radix", + sum = "h1:BUAU3CGlLvorLI26FmByPp2eC2qla6E1Tw+scpcg/to=", + version = "v0.0.0-20180808171621-7fddfc383310", + ) + go_repository( + name = "com_github_aryann_difflib", + importpath = "github.com/aryann/difflib", + sum = "h1:pv34s756C4pEXnjgPfGYgdhg/ZdajGhyOvzx8k+23nw=", + version = "v0.0.0-20170710044230-e206f873d14a", + ) + + go_repository( + name = "com_github_asaskevich_govalidator", + importpath = "github.com/asaskevich/govalidator", + sum = "h1:idn718Q4B6AGu/h5Sxe66HYVdqdGu2l9Iebqhi/AEoA=", + version = "v0.0.0-20190424111038-f61b66f89f4a", + ) + go_repository( + name = "com_github_aws_aws_lambda_go", + importpath = "github.com/aws/aws-lambda-go", + sum = "h1:SuCy7H3NLyp+1Mrfp+m80jcbi9KYWAs9/BXwppwRDzY=", + version = "v1.13.3", + ) + go_repository( + name = "com_github_aws_aws_sdk_go", + importpath = "github.com/aws/aws-sdk-go", + sum = "h1:0xphMHGMLBrPMfxR2AmVjZKcMEESEgWF8Kru94BNByk=", + version = "v1.27.0", + ) + go_repository( + name = "com_github_aws_aws_sdk_go_v2", + importpath = "github.com/aws/aws-sdk-go-v2", + sum = "h1:qZ+woO4SamnH/eEbjM2IDLhRNwIwND/RQyVlBLp3Jqg=", + version = "v0.18.0", + ) + go_repository( + name = "com_github_azure_go_autorest", + importpath = "github.com/Azure/go-autorest", + sum = "h1:V5VMDjClD3GiElqLWO7mz2MxNAK/vTfRHdAubSIPRgs=", + version = "v14.2.0+incompatible", + ) + go_repository( + name = "com_github_azure_go_autorest_autorest", + importpath = "github.com/Azure/go-autorest/autorest", + sum = "h1:eVvIXUKiTgv++6YnWb42DUA1YL7qDugnKP0HljexdnQ=", + version = "v0.11.1", + ) + go_repository( + name = "com_github_azure_go_autorest_autorest_adal", + importpath = "github.com/Azure/go-autorest/autorest/adal", + sum = "h1:Y3bBUV4rTuxenJJs41HU3qmqsb+auo+a3Lz+PlJPpL0=", + version = "v0.9.5", + ) + go_repository( + name = "com_github_azure_go_autorest_autorest_date", + importpath = "github.com/Azure/go-autorest/autorest/date", + sum = "h1:7gUk1U5M/CQbp9WoqinNzJar+8KY+LPI6wiWrP/myHw=", + version = "v0.3.0", + ) + go_repository( + name = "com_github_azure_go_autorest_autorest_mocks", + importpath = "github.com/Azure/go-autorest/autorest/mocks", + sum = "h1:K0laFcLE6VLTOwNgSxaGbUcLPuGXlNkbVvq4cW4nIHk=", + version = "v0.4.1", + ) + go_repository( + name = "com_github_azure_go_autorest_logger", + importpath = "github.com/Azure/go-autorest/logger", + sum = "h1:e4RVHVZKC5p6UANLJHkM4OfR1UKZPj8Wt8Pcx+3oqrE=", + version = "v0.2.0", + ) + go_repository( + name = "com_github_azure_go_autorest_tracing", + importpath = "github.com/Azure/go-autorest/tracing", + sum = "h1:TYi4+3m5t6K48TGI9AUdb+IzbnSxvnvUMfuitfgcfuo=", + version = "v0.6.0", + ) + go_repository( + name = "com_github_beorn7_perks", + importpath = "github.com/beorn7/perks", + sum = "h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM=", + version = "v1.0.1", + ) + go_repository( + name = "com_github_bgentry_speakeasy", + importpath = "github.com/bgentry/speakeasy", + sum = "h1:ByYyxL9InA1OWqxJqqp2A5pYHUrCiAL6K3J+LKSsQkY=", + version = "v0.1.0", + ) + + go_repository( + name = "com_github_burntsushi_toml", + importpath = "github.com/BurntSushi/toml", + sum = "h1:WXkYYl6Yr3qBf1K79EBnL4mak0OimBfB0XUf9Vl28OQ=", + version = "v0.3.1", + ) + go_repository( + name = "com_github_burntsushi_xgb", + importpath = "github.com/BurntSushi/xgb", + sum = "h1:1BDTz0u9nC3//pOCMdNH+CiXJVYJh5UQNCOBG7jbELc=", + version = "v0.0.0-20160522181843-27f122750802", + ) + go_repository( + name = "com_github_casbin_casbin_v2", + importpath = "github.com/casbin/casbin/v2", + sum = "h1:bTwon/ECRx9dwBy2ewRVr5OiqjeXSGiTUY74sDPQi/g=", + version = "v2.1.2", + ) + go_repository( + name = "com_github_cenkalti_backoff", + importpath = "github.com/cenkalti/backoff", + sum = "h1:tNowT99t7UNflLxfYYSlKYsBpXdEet03Pg2g16Swow4=", + version = "v2.2.1+incompatible", + ) + + go_repository( + name = "com_github_census_instrumentation_opencensus_proto", + importpath = "github.com/census-instrumentation/opencensus-proto", + sum = "h1:glEXhBS5PSLLv4IXzLA5yPRVX4bilULVyxxbrfOtDAk=", + version = "v0.2.1", + ) + + go_repository( + name = "com_github_cespare_xxhash_v2", + importpath = "github.com/cespare/xxhash/v2", + sum = "h1:6MnRN8NT7+YBpUIWxHtefFZOKTAPgGjpQSxqLNn0+qY=", + version = "v2.1.1", + ) + go_repository( + name = "com_github_chzyer_logex", + importpath = "github.com/chzyer/logex", + sum = "h1:Swpa1K6QvQznwJRcfTfQJmTE72DqScAa40E+fbHEXEE=", + version = "v1.1.10", + ) + go_repository( + name = "com_github_chzyer_readline", + importpath = "github.com/chzyer/readline", + sum = "h1:fY5BOSpyZCqRo5OhCuC+XN+r/bBCmeuuJtjz+bCNIf8=", + version = "v0.0.0-20180603132655-2972be24d48e", + ) + go_repository( + name = "com_github_chzyer_test", + importpath = "github.com/chzyer/test", + sum = "h1:q763qf9huN11kDQavWsoZXJNW3xEE4JJyHa5Q25/sd8=", + version = "v0.0.0-20180213035817-a1ea475d72b1", + ) + go_repository( + name = "com_github_clbanning_x2j", + importpath = "github.com/clbanning/x2j", + sum = "h1:EdRZT3IeKQmfCSrgo8SZ8V3MEnskuJP0wCYNpe+aiXo=", + version = "v0.0.0-20191024224557-825249438eec", + ) + + go_repository( + name = "com_github_client9_misspell", + importpath = "github.com/client9/misspell", + sum = "h1:ta993UF76GwbvJcIo3Y68y/M3WxlpEHPWIGDkJYwzJI=", + version = "v0.3.4", + ) + go_repository( + name = "com_github_cockroachdb_datadriven", + importpath = "github.com/cockroachdb/datadriven", + sum = "h1:OaNxuTZr7kxeODyLWsRMC+OD03aFUH+mW6r2d+MWa5Y=", + version = "v0.0.0-20190809214429-80d97fb3cbaa", + ) + go_repository( + name = "com_github_codahale_hdrhistogram", + importpath = "github.com/codahale/hdrhistogram", + sum = "h1:qMd81Ts1T2OTKmB4acZcyKaMtRnY5Y44NuXGX2GFJ1w=", + version = "v0.0.0-20161010025455-3a0bb77429bd", + ) + + go_repository( + name = "com_github_coreos_etcd", + importpath = "github.com/coreos/etcd", + sum = "h1:jFneRYjIvLMLhDLCzuTuU4rSJUjRplcJQ7pD7MnhC04=", + version = "v3.3.10+incompatible", + ) + go_repository( + name = "com_github_coreos_go_etcd", + importpath = "github.com/coreos/go-etcd", + sum = "h1:bXhRBIXoTm9BYHS3gE0TtQuyNZyeEMux2sDi4oo5YOo=", + version = "v2.0.0+incompatible", + ) + go_repository( + name = "com_github_coreos_go_semver", + importpath = "github.com/coreos/go-semver", + sum = "h1:3Jm3tLmsgAYcjC+4Up7hJrFBPr+n7rAqYeSw/SZazuY=", + version = "v0.2.0", + ) + go_repository( + name = "com_github_coreos_go_systemd", + importpath = "github.com/coreos/go-systemd", + sum = "h1:u9SHYsPQNyt5tgDm3YN7+9dYrpK96E5wFilTFWIDZOM=", + version = "v0.0.0-20180511133405-39ca1b05acc7", + ) + go_repository( + name = "com_github_coreos_pkg", + importpath = "github.com/coreos/pkg", + sum = "h1:CAKfRE2YtTUIjjh1bkBtyYFaUT/WmOqsJjgtihT0vMI=", + version = "v0.0.0-20160727233714-3ac0863d7acf", + ) + go_repository( + name = "com_github_cpuguy83_go_md2man_v2", + importpath = "github.com/cpuguy83/go-md2man/v2", + sum = "h1:U+s90UTSYgptZMwQh2aRr3LuazLJIa+Pg3Kc1ylSYVY=", + version = "v2.0.0-20190314233015-f79a8a8ca69d", + ) + go_repository( + name = "com_github_creack_pty", + importpath = "github.com/creack/pty", + sum = "h1:6pwm8kMQKCmgUg0ZHTm5+/YvRK0s3THD/28+T6/kk4A=", + version = "v1.1.7", + ) + + go_repository( + name = "com_github_davecgh_go_spew", + importpath = "github.com/davecgh/go-spew", + sum = "h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=", + version = "v1.1.1", + ) + go_repository( + name = "com_github_dgrijalva_jwt_go", + importpath = "github.com/dgrijalva/jwt-go", + sum = "h1:7qlOGliEKZXTDg6OTjfoBKDXWrumCAMpl/TFQ4/5kLM=", + version = "v3.2.0+incompatible", + ) + + go_repository( + name = "com_github_dgryski_go_rendezvous", + importpath = "github.com/dgryski/go-rendezvous", + sum = "h1:lO4WD4F/rVNCu3HqELle0jiPLLBs70cWOduZpkS1E78=", + version = "v0.0.0-20200823014737-9f7001d12a5f", + ) + go_repository( + name = "com_github_docker_spdystream", + importpath = "github.com/docker/spdystream", + sum = "h1:cenwrSVm+Z7QLSV/BsnenAOcDXdX4cMv4wP0B/5QbPg=", + version = "v0.0.0-20160310174837-449fdfce4d96", + ) + go_repository( + name = "com_github_docopt_docopt_go", + importpath = "github.com/docopt/docopt-go", + sum = "h1:bWDMxwH3px2JBh6AyO7hdCn/PkvCZXii8TGj7sbtEbQ=", + version = "v0.0.0-20180111231733-ee0de3bc6815", + ) + go_repository( + name = "com_github_dustin_go_humanize", + importpath = "github.com/dustin/go-humanize", + sum = "h1:qk/FSDDxo05wdJH28W+p5yivv7LuLYLRXPPD8KQCtZs=", + version = "v0.0.0-20171111073723-bb3d318650d4", + ) + go_repository( + name = "com_github_eapache_go_resiliency", + importpath = "github.com/eapache/go-resiliency", + sum = "h1:1NtRmCAqadE2FN4ZcN6g90TP3uk8cg9rn9eNK2197aU=", + version = "v1.1.0", + ) + go_repository( + name = "com_github_eapache_go_xerial_snappy", + importpath = "github.com/eapache/go-xerial-snappy", + sum = "h1:YEetp8/yCZMuEPMUDHG0CW/brkkEp8mzqk2+ODEitlw=", + version = "v0.0.0-20180814174437-776d5712da21", + ) + go_repository( + name = "com_github_eapache_queue", + importpath = "github.com/eapache/queue", + sum = "h1:YOEu7KNc61ntiQlcEeUIoDTJ2o8mQznoNvUhiigpIqc=", + version = "v1.1.0", + ) + go_repository( + name = "com_github_edsrzf_mmap_go", + importpath = "github.com/edsrzf/mmap-go", + sum = "h1:CEBF7HpRnUCSJgGUb5h1Gm7e3VkmVDrR8lvWVLtrOFw=", + version = "v1.0.0", + ) + + go_repository( + name = "com_github_elazarl_goproxy", + importpath = "github.com/elazarl/goproxy", + sum = "h1:yUdfgN0XgIJw7foRItutHYUIhlcKzcSf5vDpdhQAKTc=", + version = "v0.0.0-20180725130230-947c36da3153", + ) + go_repository( + name = "com_github_emicklei_go_restful", + importpath = "github.com/emicklei/go-restful", + sum = "h1:H2pdYOb3KQ1/YsqVWoWNLQO+fusocsw354rqGTZtAgw=", + version = "v0.0.0-20170410110728-ff4f55a20633", + ) + go_repository( + name = "com_github_envoyproxy_go_control_plane", + importpath = "github.com/envoyproxy/go-control-plane", + sum = "h1:4cmBvAEBNJaGARUEs3/suWRyfyBfhf7I60WBZq+bv2w=", + version = "v0.9.1-0.20191026205805-5f8ba28d4473", + ) + go_repository( + name = "com_github_envoyproxy_protoc_gen_validate", + importpath = "github.com/envoyproxy/protoc-gen-validate", + sum = "h1:EQciDnbrYxy13PgWoY8AqoxGiPrpgBZ1R8UNe3ddc+A=", + version = "v0.1.0", + ) + go_repository( + name = "com_github_evanphx_json_patch", + importpath = "github.com/evanphx/json-patch", + sum = "h1:kLcOMZeuLAJvL2BPWLMIj5oaZQobrkAqrL+WFZwQses=", + version = "v4.9.0+incompatible", + ) + go_repository( + name = "com_github_fatih_color", + importpath = "github.com/fatih/color", + sum = "h1:DkWD4oS2D8LGGgTQ6IvwJJXSL5Vp2ffcQg58nFV38Ys=", + version = "v1.7.0", + ) + go_repository( + name = "com_github_form3tech_oss_jwt_go", + importpath = "github.com/form3tech-oss/jwt-go", + sum = "h1:TcekIExNqud5crz4xD2pavyTgWiPvpYe4Xau31I0PRk=", + version = "v3.2.2+incompatible", + ) + go_repository( + name = "com_github_franela_goblin", + importpath = "github.com/franela/goblin", + sum = "h1:gb2Z18BhTPJPpLQWj4T+rfKHYCHxRHCtRxhKKjRidVw=", + version = "v0.0.0-20200105215937-c9ffbefa60db", + ) + go_repository( + name = "com_github_franela_goreq", + importpath = "github.com/franela/goreq", + sum = "h1:a9ENSRDFBUPkJ5lCgVZh26+ZbGyoVJG7yb5SSzF5H54=", + version = "v0.0.0-20171204163338-bcd34c9993f8", + ) + + go_repository( + name = "com_github_fsnotify_fsnotify", + importpath = "github.com/fsnotify/fsnotify", + sum = "h1:hsms1Qyu0jgnwNXIxa+/V/PDsU6CfLf6CNO8H7IWoS4=", + version = "v1.4.9", + ) + go_repository( + name = "com_github_ghodss_yaml", + importpath = "github.com/ghodss/yaml", + sum = "h1:wQHKEahhL6wmXdzwWG11gIVCkOv05bNOh+Rxn0yngAk=", + version = "v1.0.0", + ) + go_repository( + name = "com_github_go_gl_glfw", + importpath = "github.com/go-gl/glfw", + sum = "h1:QbL/5oDUmRBzO9/Z7Seo6zf912W/a6Sr4Eu0G/3Jho0=", + version = "v0.0.0-20190409004039-e6da0acd62b1", + ) + go_repository( + name = "com_github_go_gl_glfw_v3_3_glfw", + importpath = "github.com/go-gl/glfw/v3.3/glfw", + sum = "h1:WtGNWLvXpe6ZudgnXrq0barxBImvnnJoMEhXAzcbM0I=", + version = "v0.0.0-20200222043503-6f7a984d4dc4", + ) + go_repository( + name = "com_github_go_kit_kit", + importpath = "github.com/go-kit/kit", + sum = "h1:dXFJfIHVvUcpSgDOV+Ne6t7jXri8Tfv2uOLHUZ2XNuo=", + version = "v0.10.0", + ) + go_repository( + name = "com_github_go_logfmt_logfmt", + importpath = "github.com/go-logfmt/logfmt", + sum = "h1:TrB8swr/68K7m9CcGut2g3UOihhbcbiMAYiuTXdEih4=", + version = "v0.5.0", + ) + + go_repository( + name = "com_github_go_logr_logr", + importpath = "github.com/go-logr/logr", + sum = "h1:QvGt2nLcHH0WK9orKa+ppBPAxREcH364nPUedEpK0TY=", + version = "v0.2.0", + ) + go_repository( + name = "com_github_go_openapi_jsonpointer", + importpath = "github.com/go-openapi/jsonpointer", + sum = "h1:gihV7YNZK1iK6Tgwwsxo2rJbD1GTbdm72325Bq8FI3w=", + version = "v0.19.3", + ) + go_repository( + name = "com_github_go_openapi_jsonreference", + importpath = "github.com/go-openapi/jsonreference", + sum = "h1:5cxNfTy0UVC3X8JL5ymxzyoUZmo8iZb+jeTWn7tUa8o=", + version = "v0.19.3", + ) + go_repository( + name = "com_github_go_openapi_spec", + importpath = "github.com/go-openapi/spec", + sum = "h1:0XRyw8kguri6Yw4SxhsQA/atC88yqrk0+G4YhI2wabc=", + version = "v0.19.3", + ) + go_repository( + name = "com_github_go_openapi_swag", + importpath = "github.com/go-openapi/swag", + sum = "h1:lTz6Ys4CmqqCQmZPBlbQENR1/GucA2bzYTE12Pw4tFY=", + version = "v0.19.5", + ) + + go_repository( + name = "com_github_go_redis_redis_v8", + importpath = "github.com/go-redis/redis/v8", + sum = "h1:A1tQgdeVF23Ojc1TIRpVuVfOadUdIM0vFVURigoPEMM=", + version = "v8.2.2", + ) + go_repository( + name = "com_github_go_sql_driver_mysql", + importpath = "github.com/go-sql-driver/mysql", + sum = "h1:7LxgVwFb2hIQtMm87NdgAVfXjnt4OePseqT1tKx+opk=", + version = "v1.4.0", + ) + go_repository( + name = "com_github_go_stack_stack", + importpath = "github.com/go-stack/stack", + sum = "h1:5SgMzNM5HxrEjV0ww2lTmX6E2Izsfxas4+YHWRs3Lsk=", + version = "v1.8.0", + ) + go_repository( + name = "com_github_gogo_googleapis", + build_file_proto_mode = "disable_global", + importpath = "github.com/gogo/googleapis", + sum = "h1:kFkMAZBNAn4j7K0GiZr8cRYzejq68VbheufiV3YuyFI=", + version = "v1.1.0", + ) + go_repository( + name = "com_github_golang_glog", + importpath = "github.com/golang/glog", + sum = "h1:VKtxabqXZkF25pY9ekfRL6a582T4P37/31XEstQ5p58=", + version = "v0.0.0-20160126235308-23def4e6c14b", + ) + go_repository( + name = "com_github_golang_groupcache", + importpath = "github.com/golang/groupcache", + sum = "h1:1r7pUrabqp18hOBcwBwiTsbnFeTZHV9eER/QT5JVZxY=", + version = "v0.0.0-20200121045136-8c9f03a8e57e", + ) + go_repository( + name = "com_github_golang_mock", + importpath = "github.com/golang/mock", + sum = "h1:ocYkMQY5RrXTYgXl7ICpV0IXwlEQGwKIsery4gyXa1U=", + version = "v1.4.1", + ) + + go_repository( + name = "com_github_golang_protobuf", + importpath = "github.com/golang/protobuf", + sum = "h1:JjCZWpVbqXDqFVmTfYWEVTMIYrL/NPdPSCHPJ0T/raM=", + version = "v1.4.3", + ) + go_repository( + name = "com_github_golang_snappy", + importpath = "github.com/golang/snappy", + sum = "h1:woRePGFeVFfLKN/pOkfl+p/TAqKOfFu+7KPlMVpok/w=", + version = "v0.0.0-20180518054509-2e65f85255db", + ) + go_repository( + name = "com_github_google_btree", + importpath = "github.com/google/btree", + sum = "h1:0udJVsspx3VBr5FwtLhQQtuAsVc79tTq0ocGIPAU6qo=", + version = "v1.0.0", + ) + + go_repository( + name = "com_github_google_go_cmp", + importpath = "github.com/google/go-cmp", + sum = "h1:X2ev0eStA3AbceY54o37/0PQ/UWqKEiiO2dKL5OPaFM=", + version = "v0.5.2", + ) + go_repository( + name = "com_github_google_gofuzz", + importpath = "github.com/google/gofuzz", + sum = "h1:Hsa8mG0dQ46ij8Sl2AYJDUv1oA9/d6Vk+3LG99Oe02g=", + version = "v1.1.0", + ) + go_repository( + name = "com_github_google_martian", + importpath = "github.com/google/martian", + sum = "h1:/CP5g8u/VJHijgedC/Legn3BAbAaWPgecwXBIDzw5no=", + version = "v2.1.0+incompatible", + ) + go_repository( + name = "com_github_google_pprof", + importpath = "github.com/google/pprof", + sum = "h1:SRgJV+IoxM5MKyFdlSUeNy6/ycRUF2yBAKdAQswoHUk=", + version = "v0.0.0-20200229191704-1ebb73c60ed3", + ) + go_repository( + name = "com_github_google_renameio", + importpath = "github.com/google/renameio", + sum = "h1:GOZbcHa3HfsPKPlmyPyN2KEohoMXOhdMbHrvbpl2QaA=", + version = "v0.1.0", + ) + + go_repository( + name = "com_github_google_uuid", + importpath = "github.com/google/uuid", + sum = "h1:EVhdT+1Kseyi1/pUmXKaFxYsDNy9RQYkMWRH68J/W7Y=", + version = "v1.1.2", + ) + go_repository( + name = "com_github_googleapis_gax_go_v2", + importpath = "github.com/googleapis/gax-go/v2", + sum = "h1:sjZBwGj9Jlw33ImPtvFviGYvseOtDM7hkSKB7+Tv3SM=", + version = "v2.0.5", + ) + + go_repository( + name = "com_github_googleapis_gnostic", + importpath = "github.com/googleapis/gnostic", + sum = "h1:DLJCy1n/vrD4HPjOvYcT8aYQXpPIzoRZONaYwyycI+I=", + version = "v0.4.1", + ) + go_repository( + name = "com_github_gopherjs_gopherjs", + importpath = "github.com/gopherjs/gopherjs", + sum = "h1:EGx4pi6eqNxGaHF6qqu48+N2wcFQ5qg5FXgOdqsJ5d8=", + version = "v0.0.0-20181017120253-0766667cb4d1", + ) + go_repository( + name = "com_github_gorilla_context", + importpath = "github.com/gorilla/context", + sum = "h1:AWwleXJkX/nhcU9bZSnZoi3h/qGYqQAGhq6zZe/aQW8=", + version = "v1.1.1", + ) + go_repository( + name = "com_github_gorilla_mux", + importpath = "github.com/gorilla/mux", + sum = "h1:gnP5JzjVOuiZD07fKKToCAOjS0yOpj/qPETTXCCS6hw=", + version = "v1.7.3", + ) + go_repository( + name = "com_github_gorilla_websocket", + importpath = "github.com/gorilla/websocket", + sum = "h1:Lh2aW+HnU2Nbe1gqD9SOJLJxW1jBMmQOktN2acDyJk8=", + version = "v0.0.0-20170926233335-4201258b820c", + ) + go_repository( + name = "com_github_gregjones_httpcache", + importpath = "github.com/gregjones/httpcache", + sum = "h1:pdN6V1QBWetyv/0+wjACpqVH+eVULgEjkurDLq3goeM=", + version = "v0.0.0-20180305231024-9cad4c3443a7", + ) + go_repository( + name = "com_github_grpc_ecosystem_go_grpc_middleware", + importpath = "github.com/grpc-ecosystem/go-grpc-middleware", + sum = "h1:z53tR0945TRRQO/fLEVPI6SMv7ZflF0TEaTAoU7tOzg=", + version = "v1.0.1-0.20190118093823-f849b5445de4", + ) + go_repository( + name = "com_github_grpc_ecosystem_go_grpc_prometheus", + importpath = "github.com/grpc-ecosystem/go-grpc-prometheus", + sum = "h1:Ovs26xHkKqVztRpIrF/92BcuyuQ/YW4NSIpoGtfXNho=", + version = "v1.2.0", + ) + go_repository( + name = "com_github_grpc_ecosystem_grpc_gateway", + importpath = "github.com/grpc-ecosystem/grpc-gateway", + sum = "h1:UImYN5qQ8tuGpGE16ZmjvcTtTw24zw1QAp/SlnNrZhI=", + version = "v1.9.5", + ) + go_repository( + name = "com_github_hashicorp_consul_api", + importpath = "github.com/hashicorp/consul/api", + sum = "h1:HXNYlRkkM/t+Y/Yhxtwcy02dlYwIaoxzvxPnS+cqy78=", + version = "v1.3.0", + ) + go_repository( + name = "com_github_hashicorp_consul_sdk", + importpath = "github.com/hashicorp/consul/sdk", + sum = "h1:UOxjlb4xVNF93jak1mzzoBatyFju9nrkxpVwIp/QqxQ=", + version = "v0.3.0", + ) + go_repository( + name = "com_github_hashicorp_errwrap", + importpath = "github.com/hashicorp/errwrap", + sum = "h1:hLrqtEDnRye3+sgx6z4qVLNuviH3MR5aQ0ykNJa/UYA=", + version = "v1.0.0", + ) + go_repository( + name = "com_github_hashicorp_go_cleanhttp", + importpath = "github.com/hashicorp/go-cleanhttp", + sum = "h1:dH3aiDG9Jvb5r5+bYHsikaOUIpcM0xvgMXVoDkXMzJM=", + version = "v0.5.1", + ) + go_repository( + name = "com_github_hashicorp_go_immutable_radix", + importpath = "github.com/hashicorp/go-immutable-radix", + sum = "h1:AKDB1HM5PWEA7i4nhcpwOrO2byshxBjXVn/J/3+z5/0=", + version = "v1.0.0", + ) + go_repository( + name = "com_github_hashicorp_go_msgpack", + importpath = "github.com/hashicorp/go-msgpack", + sum = "h1:zKjpN5BK/P5lMYrLmBHdBULWbJ0XpYR+7NGzqkZzoD4=", + version = "v0.5.3", + ) + go_repository( + name = "com_github_hashicorp_go_multierror", + importpath = "github.com/hashicorp/go-multierror", + sum = "h1:iVjPR7a6H0tWELX5NxNe7bYopibicUzc7uPribsnS6o=", + version = "v1.0.0", + ) + go_repository( + name = "com_github_hashicorp_go_net", + importpath = "github.com/hashicorp/go.net", + sum = "h1:sNCoNyDEvN1xa+X0baata4RdcpKwcMS6DH+xwfqPgjw=", + version = "v0.0.1", + ) + go_repository( + name = "com_github_hashicorp_go_rootcerts", + importpath = "github.com/hashicorp/go-rootcerts", + sum = "h1:Rqb66Oo1X/eSV1x66xbDccZjhJigjg0+e82kpwzSwCI=", + version = "v1.0.0", + ) + go_repository( + name = "com_github_hashicorp_go_sockaddr", + importpath = "github.com/hashicorp/go-sockaddr", + sum = "h1:GeH6tui99pF4NJgfnhp+L6+FfobzVW3Ah46sLo0ICXs=", + version = "v1.0.0", + ) + go_repository( + name = "com_github_hashicorp_go_syslog", + importpath = "github.com/hashicorp/go-syslog", + sum = "h1:KaodqZuhUoZereWVIYmpUgZysurB1kBLX2j0MwMrUAE=", + version = "v1.0.0", + ) + go_repository( + name = "com_github_hashicorp_go_uuid", + importpath = "github.com/hashicorp/go-uuid", + sum = "h1:fv1ep09latC32wFoVwnqcnKJGnMSdBanPczbHAYm1BE=", + version = "v1.0.1", + ) + go_repository( + name = "com_github_hashicorp_go_version", + importpath = "github.com/hashicorp/go-version", + sum = "h1:3vNe/fWF5CBgRIguda1meWhsZHy3m8gCJ5wx+dIzX/E=", + version = "v1.2.0", + ) + + go_repository( + name = "com_github_hashicorp_golang_lru", + importpath = "github.com/hashicorp/golang-lru", + sum = "h1:0hERBMJE1eitiLkihrMvRVBYAkpHzc/J3QdDN+dAcgU=", + version = "v0.5.1", + ) + + go_repository( + name = "com_github_hashicorp_hcl", + importpath = "github.com/hashicorp/hcl", + sum = "h1:0Anlzjpi4vEasTeNFn2mLJgTSwt0+6sfsiTG8qcWGx4=", + version = "v1.0.0", + ) + go_repository( + name = "com_github_hashicorp_logutils", + importpath = "github.com/hashicorp/logutils", + sum = "h1:dLEQVugN8vlakKOUE3ihGLTZJRB4j+M2cdTm/ORI65Y=", + version = "v1.0.0", + ) + go_repository( + name = "com_github_hashicorp_mdns", + importpath = "github.com/hashicorp/mdns", + sum = "h1:WhIgCr5a7AaVH6jPUwjtRuuE7/RDufnUvzIr48smyxs=", + version = "v1.0.0", + ) + go_repository( + name = "com_github_hashicorp_memberlist", + importpath = "github.com/hashicorp/memberlist", + sum = "h1:EmmoJme1matNzb+hMpDuR/0sbJSUisxyqBGG676r31M=", + version = "v0.1.3", + ) + go_repository( + name = "com_github_hashicorp_serf", + importpath = "github.com/hashicorp/serf", + sum = "h1:YZ7UKsJv+hKjqGVUUbtE3HNj79Eln2oQ75tniF6iPt0=", + version = "v0.8.2", + ) + + go_repository( + name = "com_github_hpcloud_tail", + importpath = "github.com/hpcloud/tail", + sum = "h1:nfCOvKYfkgYP8hkirhJocXT2+zOD8yUNjXaWfTlyFKI=", + version = "v1.0.0", + ) + go_repository( + name = "com_github_hudl_fargo", + importpath = "github.com/hudl/fargo", + sum = "h1:0U6+BtN6LhaYuTnIJq4Wyq5cpn6O2kWrxAtcqBmYY6w=", + version = "v1.3.0", + ) + go_repository( + name = "com_github_ianlancetaylor_demangle", + importpath = "github.com/ianlancetaylor/demangle", + sum = "h1:UDMh68UUwekSh5iP2OMhRRZJiiBccgV7axzUG8vi56c=", + version = "v0.0.0-20181102032728-5e5cf60278f6", + ) + go_repository( + name = "com_github_imdario_mergo", + importpath = "github.com/imdario/mergo", + sum = "h1:JboBksRwiiAJWvIYJVo46AfV+IAIKZpfrSzVKj42R4Q=", + version = "v0.3.5", + ) + go_repository( + name = "com_github_inconshreveable_mousetrap", + importpath = "github.com/inconshreveable/mousetrap", + sum = "h1:Z8tu5sraLXCXIcARxBp/8cbvlwVa7Z1NHg9XEKhtSvM=", + version = "v1.0.0", + ) + go_repository( + name = "com_github_influxdata_influxdb1_client", + importpath = "github.com/influxdata/influxdb1-client", + sum = "h1:/WZQPMZNsjZ7IlCpsLGdQBINg5bxKQ1K1sh6awxLtkA=", + version = "v0.0.0-20191209144304-8bf82d3c094d", + ) + go_repository( + name = "com_github_jmespath_go_jmespath", + importpath = "github.com/jmespath/go-jmespath", + sum = "h1:pmfjZENx5imkbgOkpRUYLnmbU7UEFbjtDA2hxJ1ichM=", + version = "v0.0.0-20180206201540-c2b33e8439af", + ) + go_repository( + name = "com_github_jonboulle_clockwork", + importpath = "github.com/jonboulle/clockwork", + sum = "h1:VKV+ZcuP6l3yW9doeqz6ziZGgcynBVQO+obU0+0hcPo=", + version = "v0.1.0", + ) + go_repository( + name = "com_github_jpillora_backoff", + importpath = "github.com/jpillora/backoff", + sum = "h1:uvFg412JmmHBHw7iwprIxkPMI+sGQ4kzOWsMeHnm2EA=", + version = "v1.0.0", + ) + + go_repository( + name = "com_github_json_iterator_go", + importpath = "github.com/json-iterator/go", + sum = "h1:Kz6Cvnvv2wGdaG/V8yMvfkmNiXq9Ya2KUv4rouJJr68=", + version = "v1.1.10", + ) + go_repository( + name = "com_github_jstemmer_go_junit_report", + importpath = "github.com/jstemmer/go-junit-report", + sum = "h1:6QPYqodiu3GuPL+7mfx+NwDdp2eTkp9IfEUpgAwUN0o=", + version = "v0.9.1", + ) + go_repository( + name = "com_github_jtolds_gls", + importpath = "github.com/jtolds/gls", + sum = "h1:xdiiI2gbIgH/gLH7ADydsJ1uDOEzR8yvV7C0MuV77Wo=", + version = "v4.20.0+incompatible", + ) + go_repository( + name = "com_github_julienschmidt_httprouter", + importpath = "github.com/julienschmidt/httprouter", + sum = "h1:U0609e9tgbseu3rBINet9P48AI/D3oJs4dN7jwJOQ1U=", + version = "v1.3.0", + ) + + go_repository( + name = "com_github_kisielk_errcheck", + importpath = "github.com/kisielk/errcheck", + sum = "h1:reN85Pxc5larApoH1keMBiu2GWtPqXQ1nc9gx+jOU+E=", + version = "v1.2.0", + ) + go_repository( + name = "com_github_kisielk_gotool", + importpath = "github.com/kisielk/gotool", + sum = "h1:AV2c/EiW3KqPNT9ZKl07ehoAGi4C5/01Cfbblndcapg=", + version = "v1.0.0", + ) + go_repository( + name = "com_github_knetic_govaluate", + importpath = "github.com/Knetic/govaluate", + sum = "h1:1G1pk05UrOh0NlF1oeaaix1x8XzrfjIDK47TY0Zehcw=", + version = "v3.0.1-0.20171022003610-9aa49832a739+incompatible", + ) + go_repository( + name = "com_github_konsorten_go_windows_terminal_sequences", + importpath = "github.com/konsorten/go-windows-terminal-sequences", + sum = "h1:CE8S1cTafDpPvMhIxNJKvHsGVBgn1xWYf1NbHQhywc8=", + version = "v1.0.3", + ) + go_repository( + name = "com_github_kr_logfmt", + importpath = "github.com/kr/logfmt", + sum = "h1:T+h1c/A9Gawja4Y9mFVWj2vyii2bbUNDw3kt9VxK2EY=", + version = "v0.0.0-20140226030751-b84e30acd515", + ) + + go_repository( + name = "com_github_kr_pretty", + importpath = "github.com/kr/pretty", + sum = "h1:s5hAObm+yFO5uHYt5dYjxi2rXrsnmRpJx4OYvIWUaQs=", + version = "v0.2.0", + ) + go_repository( + name = "com_github_kr_pty", + importpath = "github.com/kr/pty", + sum = "h1:hyz3dwM5QLc1Rfoz4FuWJQG5BN7tc6K1MndAUnGpQr4=", + version = "v1.1.5", + ) + go_repository( + name = "com_github_kr_text", + importpath = "github.com/kr/text", + sum = "h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE=", + version = "v0.1.0", + ) + go_repository( + name = "com_github_lightstep_lightstep_tracer_common_golang_gogo", + importpath = "github.com/lightstep/lightstep-tracer-common/golang/gogo", + sum = "h1:143Bb8f8DuGWck/xpNUOckBVYfFbBTnLevfRZ1aVVqo=", + version = "v0.0.0-20190605223551-bc2310a04743", + ) + go_repository( + name = "com_github_lightstep_lightstep_tracer_go", + importpath = "github.com/lightstep/lightstep-tracer-go", + sum = "h1:vi1F1IQ8N7hNWytK9DpJsUfQhGuNSc19z330K6vl4zk=", + version = "v0.18.1", + ) + go_repository( + name = "com_github_lyft_protoc_gen_validate", + importpath = "github.com/lyft/protoc-gen-validate", + sum = "h1:KNt/RhmQTOLr7Aj8PsJ7mTronaFyx80mRTT9qF261dA=", + version = "v0.0.13", + ) + + go_repository( + name = "com_github_magiconair_properties", + importpath = "github.com/magiconair/properties", + sum = "h1:LLgXmsheXeRoUOBOjtwPQCWIYqM/LU1ayDtDePerRcY=", + version = "v1.8.0", + ) + go_repository( + name = "com_github_mailru_easyjson", + importpath = "github.com/mailru/easyjson", + sum = "h1:hB2xlXdHp/pmPZq0y3QnmWAArdw9PqbmotexnWx/FU8=", + version = "v0.0.0-20190626092158-b2ccc519800e", + ) + go_repository( + name = "com_github_mattn_go_colorable", + importpath = "github.com/mattn/go-colorable", + sum = "h1:UVL0vNpWh04HeJXV0KLcaT7r06gOH2l4OW6ddYRUIY4=", + version = "v0.0.9", + ) + go_repository( + name = "com_github_mattn_go_isatty", + importpath = "github.com/mattn/go-isatty", + sum = "h1:bnP0vzxcAdeI1zdubAl5PjU6zsERjGZb7raWodagDYs=", + version = "v0.0.4", + ) + go_repository( + name = "com_github_mattn_go_runewidth", + importpath = "github.com/mattn/go-runewidth", + sum = "h1:UnlwIPBGaTZfPQ6T1IGzPI0EkYAQmT9fAEJ/poFC63o=", + version = "v0.0.2", + ) + go_repository( + name = "com_github_matttproud_golang_protobuf_extensions", + importpath = "github.com/matttproud/golang_protobuf_extensions", + sum = "h1:4hp9jkHxhMHkqkrB3Ix0jegS5sx/RkqARlsWZ6pIwiU=", + version = "v1.0.1", + ) + go_repository( + name = "com_github_miekg_dns", + importpath = "github.com/miekg/dns", + sum = "h1:9jZdLNd/P4+SfEJ0TNyxYpsK8N4GtfylBLqtbYN1sbA=", + version = "v1.0.14", + ) + go_repository( + name = "com_github_mitchellh_cli", + importpath = "github.com/mitchellh/cli", + sum = "h1:iGBIsUe3+HZ/AD/Vd7DErOt5sU9fa8Uj7A2s1aggv1Y=", + version = "v1.0.0", + ) + go_repository( + name = "com_github_mitchellh_go_homedir", + importpath = "github.com/mitchellh/go-homedir", + sum = "h1:vKb8ShqSby24Yrqr/yDYkuFz8d0WUjys40rvnGC8aR0=", + version = "v1.0.0", + ) + go_repository( + name = "com_github_mitchellh_go_testing_interface", + importpath = "github.com/mitchellh/go-testing-interface", + sum = "h1:fzU/JVNcaqHQEcVFAKeR41fkiLdIPrefOvVG1VZ96U0=", + version = "v1.0.0", + ) + go_repository( + name = "com_github_mitchellh_gox", + importpath = "github.com/mitchellh/gox", + sum = "h1:lfGJxY7ToLJQjHHwi0EX6uYBdK78egf954SQl13PQJc=", + version = "v0.4.0", + ) + go_repository( + name = "com_github_mitchellh_iochan", + importpath = "github.com/mitchellh/iochan", + sum = "h1:C+X3KsSTLFVBr/tK1eYN/vs4rJcvsiLU338UhYPJWeY=", + version = "v1.0.0", + ) + + go_repository( + name = "com_github_mitchellh_mapstructure", + importpath = "github.com/mitchellh/mapstructure", + sum = "h1:fmNYVwqnSfB9mZU6OS2O6GsXM+wcskZDuKQzvN1EDeE=", + version = "v1.1.2", + ) + go_repository( + name = "com_github_modern_go_concurrent", + importpath = "github.com/modern-go/concurrent", + sum = "h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg=", + version = "v0.0.0-20180306012644-bacd9c7ef1dd", + ) + go_repository( + name = "com_github_modern_go_reflect2", + importpath = "github.com/modern-go/reflect2", + sum = "h1:9f412s+6RmYXLWZSEzVVgPGK7C2PphHj5RJrvfx9AWI=", + version = "v1.0.1", + ) + go_repository( + name = "com_github_munnerz_goautoneg", + importpath = "github.com/munnerz/goautoneg", + sum = "h1:7PxY7LVfSZm7PEeBTyK1rj1gABdCO2mbri6GKO1cMDs=", + version = "v0.0.0-20120707110453-a547fc61f48d", + ) + go_repository( + name = "com_github_mwitkow_go_conntrack", + importpath = "github.com/mwitkow/go-conntrack", + sum = "h1:KUppIJq7/+SVif2QVs3tOP0zanoHgBEVAwHxUSIzRqU=", + version = "v0.0.0-20190716064945-2f068394615f", + ) + + go_repository( + name = "com_github_mxk_go_flowrate", + importpath = "github.com/mxk/go-flowrate", + sum = "h1:y5//uYreIhSUg3J1GEMiLbxo1LJaP8RfCpH6pymGZus=", + version = "v0.0.0-20140419014527-cca7078d478f", + ) + go_repository( + name = "com_github_nats_io_jwt", + importpath = "github.com/nats-io/jwt", + sum = "h1:+RB5hMpXUUA2dfxuhBTEkMOrYmM+gKIZYS1KjSostMI=", + version = "v0.3.2", + ) + go_repository( + name = "com_github_nats_io_nats_go", + importpath = "github.com/nats-io/nats.go", + sum = "h1:ik3HbLhZ0YABLto7iX80pZLPw/6dx3T+++MZJwLnMrQ=", + version = "v1.9.1", + ) + go_repository( + name = "com_github_nats_io_nats_server_v2", + importpath = "github.com/nats-io/nats-server/v2", + sum = "h1:i2Ly0B+1+rzNZHHWtD4ZwKi+OU5l+uQo1iDHZ2PmiIc=", + version = "v2.1.2", + ) + go_repository( + name = "com_github_nats_io_nkeys", + importpath = "github.com/nats-io/nkeys", + sum = "h1:6JrEfig+HzTH85yxzhSVbjHRJv9cn0p6n3IngIcM5/k=", + version = "v0.1.3", + ) + go_repository( + name = "com_github_nats_io_nuid", + importpath = "github.com/nats-io/nuid", + sum = "h1:5iA8DT8V7q8WK2EScv2padNa/rTESc1KdnPw4TC2paw=", + version = "v1.0.1", + ) + + go_repository( + name = "com_github_nxadm_tail", + importpath = "github.com/nxadm/tail", + sum = "h1:DQuhQpB1tVlglWS2hLQ5OV6B5r8aGxSrPc5Qo6uTN78=", + version = "v1.4.4", + ) + go_repository( + name = "com_github_nytimes_gziphandler", + importpath = "github.com/NYTimes/gziphandler", + sum = "h1:lsxEuwrXEAokXB9qhlbKWPpo3KMLZQ5WB5WLQRW1uq0=", + version = "v0.0.0-20170623195520-56545f4a5d46", + ) + go_repository( + name = "com_github_oklog_oklog", + importpath = "github.com/oklog/oklog", + sum = "h1:wVfs8F+in6nTBMkA7CbRw+zZMIB7nNM825cM1wuzoTk=", + version = "v0.3.2", + ) + go_repository( + name = "com_github_oklog_run", + importpath = "github.com/oklog/run", + sum = "h1:Ru7dDtJNOyC66gQ5dQmaCa0qIsAUFY3sFpK1Xk8igrw=", + version = "v1.0.0", + ) + go_repository( + name = "com_github_olekukonko_tablewriter", + importpath = "github.com/olekukonko/tablewriter", + sum = "h1:58+kh9C6jJVXYjt8IE48G2eWl6BjwU5Gj0gqY84fy78=", + version = "v0.0.0-20170122224234-a0225b3f23b5", + ) + + go_repository( + name = "com_github_onsi_ginkgo", + importpath = "github.com/onsi/ginkgo", + sum = "h1:JAKSXpt1YjtLA7YpPiqO9ss6sNXEsPfSGdwN0UHqzrw=", + version = "v1.11.0", + ) + go_repository( + name = "com_github_onsi_gomega", + importpath = "github.com/onsi/gomega", + sum = "h1:XPnZz8VVBHjVsy1vzJmRwIcSwiUO+JFfrv/xGiigmME=", + version = "v1.7.0", + ) + go_repository( + name = "com_github_op_go_logging", + importpath = "github.com/op/go-logging", + sum = "h1:lDH9UUVJtmYCjyT0CI4q8xvlXPxeZ0gYCVvWbmPlp88=", + version = "v0.0.0-20160315200505-970db520ece7", + ) + go_repository( + name = "com_github_opentracing_basictracer_go", + importpath = "github.com/opentracing/basictracer-go", + sum = "h1:YyUAhaEfjoWXclZVJ9sGoNct7j4TVk7lZWlQw5UXuoo=", + version = "v1.0.0", + ) + go_repository( + name = "com_github_opentracing_contrib_go_observer", + importpath = "github.com/opentracing-contrib/go-observer", + sum = "h1:lM6RxxfUMrYL/f8bWEUqdXrANWtrL7Nndbm9iFN0DlU=", + version = "v0.0.0-20170622124052-a52f23424492", + ) + go_repository( + name = "com_github_opentracing_opentracing_go", + importpath = "github.com/opentracing/opentracing-go", + sum = "h1:pWlfV3Bxv7k65HYwkikxat0+s3pV4bsqf19k25Ur8rU=", + version = "v1.1.0", + ) + go_repository( + name = "com_github_openzipkin_contrib_zipkin_go_opentracing", + importpath = "github.com/openzipkin-contrib/zipkin-go-opentracing", + sum = "h1:ZCnq+JUrvXcDVhX/xRolRBZifmabN1HcS1wrPSvxhrU=", + version = "v0.4.5", + ) + go_repository( + name = "com_github_openzipkin_zipkin_go", + importpath = "github.com/openzipkin/zipkin-go", + sum = "h1:nY8Hti+WKaP0cRsSeQ026wU03QsM762XBeCXBb9NAWI=", + version = "v0.2.2", + ) + go_repository( + name = "com_github_pact_foundation_pact_go", + importpath = "github.com/pact-foundation/pact-go", + sum = "h1:OYkFijGHoZAYbOIb1LWXrwKQbMMRUv1oQ89blD2Mh2Q=", + version = "v1.0.4", + ) + go_repository( + name = "com_github_pascaldekloe_goe", + importpath = "github.com/pascaldekloe/goe", + sum = "h1:Lgl0gzECD8GnQ5QCWA8o6BtfL6mDH5rQgM4/fX3avOs=", + version = "v0.0.0-20180627143212-57f6aae5913c", + ) + go_repository( + name = "com_github_pborman_uuid", + importpath = "github.com/pborman/uuid", + sum = "h1:J7Q5mO4ysT1dv8hyrUGHb9+ooztCXu1D8MY8DZYsu3g=", + version = "v1.2.0", + ) + + go_repository( + name = "com_github_pelletier_go_toml", + importpath = "github.com/pelletier/go-toml", + sum = "h1:T5zMGML61Wp+FlcbWjRDT7yAxhJNAiPPLOFECq181zc=", + version = "v1.2.0", ) - go_repository( - name = "com_github_armon_consul_api", - importpath = "github.com/armon/consul-api", - sum = "h1:G1bPvciwNyF7IUmKXNt9Ak3m6u9DE1rF+RmtIkBpVdA=", - version = "v0.0.0-20180202201655-eb2c6b5be1b6", + name = "com_github_performancecopilot_speed", + importpath = "github.com/performancecopilot/speed", + sum = "h1:2WnRzIquHa5QxaJKShDkLM+sc0JPuwhXzK8OYOyt3Vg=", + version = "v3.0.0+incompatible", ) go_repository( - name = "com_github_cespare_xxhash_v2", - importpath = "github.com/cespare/xxhash/v2", - sum = "h1:6MnRN8NT7+YBpUIWxHtefFZOKTAPgGjpQSxqLNn0+qY=", - version = "v2.1.1", + name = "com_github_peterbourgon_diskv", + importpath = "github.com/peterbourgon/diskv", + sum = "h1:UBdAOUP5p4RWqPBg048CAvpKN+vxiaj6gdUUzhl4XmI=", + version = "v2.0.1+incompatible", ) go_repository( - name = "com_github_chzyer_logex", - importpath = "github.com/chzyer/logex", - sum = "h1:Swpa1K6QvQznwJRcfTfQJmTE72DqScAa40E+fbHEXEE=", - version = "v1.1.10", + name = "com_github_pierrec_lz4", + importpath = "github.com/pierrec/lz4", + sum = "h1:2xWsjqPFWcplujydGg4WmhC/6fZqK42wMM8aXeqhl0I=", + version = "v2.0.5+incompatible", ) + go_repository( - name = "com_github_chzyer_readline", - importpath = "github.com/chzyer/readline", - sum = "h1:fY5BOSpyZCqRo5OhCuC+XN+r/bBCmeuuJtjz+bCNIf8=", - version = "v0.0.0-20180603132655-2972be24d48e", + name = "com_github_pkg_errors", + importpath = "github.com/pkg/errors", + sum = "h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4=", + version = "v0.9.1", ) go_repository( - name = "com_github_chzyer_test", - importpath = "github.com/chzyer/test", - sum = "h1:q763qf9huN11kDQavWsoZXJNW3xEE4JJyHa5Q25/sd8=", - version = "v0.0.0-20180213035817-a1ea475d72b1", + name = "com_github_pkg_profile", + importpath = "github.com/pkg/profile", + sum = "h1:F++O52m40owAmADcojzM+9gyjmMOY/T4oYJkgFDH8RE=", + version = "v1.2.1", ) go_repository( - name = "com_github_coreos_etcd", - importpath = "github.com/coreos/etcd", - sum = "h1:jFneRYjIvLMLhDLCzuTuU4rSJUjRplcJQ7pD7MnhC04=", - version = "v3.3.10+incompatible", + name = "com_github_pmezard_go_difflib", + importpath = "github.com/pmezard/go-difflib", + sum = "h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=", + version = "v1.0.0", ) go_repository( - name = "com_github_coreos_go_etcd", - importpath = "github.com/coreos/go-etcd", - sum = "h1:bXhRBIXoTm9BYHS3gE0TtQuyNZyeEMux2sDi4oo5YOo=", - version = "v2.0.0+incompatible", + name = "com_github_posener_complete", + importpath = "github.com/posener/complete", + sum = "h1:ccV59UEOTzVDnDUEFdT95ZzHVZ+5+158q8+SJb2QV5w=", + version = "v1.1.1", ) go_repository( - name = "com_github_coreos_go_semver", - importpath = "github.com/coreos/go-semver", - sum = "h1:3Jm3tLmsgAYcjC+4Up7hJrFBPr+n7rAqYeSw/SZazuY=", + name = "com_github_prometheus_client_golang", + importpath = "github.com/prometheus/client_golang", + sum = "h1:zvJNkoCFAnYFNC24FV8nW4JdRJ3GIFcLbg65lL/JDcw=", + version = "v1.8.0", + ) + + go_repository( + name = "com_github_prometheus_client_model", + importpath = "github.com/prometheus/client_model", + sum = "h1:uq5h0d+GuxiXLJLNABMgp2qUWDPiLvgCzz2dUR+/W/M=", version = "v0.2.0", ) go_repository( - name = "com_github_davecgh_go_spew", - importpath = "github.com/davecgh/go-spew", - sum = "h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=", - version = "v1.1.1", + name = "com_github_prometheus_common", + importpath = "github.com/prometheus/common", + sum = "h1:RHRyE8UocrbjU+6UvRzwi6HjiDfxrrBU91TtbKzkGp4=", + version = "v0.14.0", ) go_repository( - name = "com_github_dgryski_go_rendezvous", - importpath = "github.com/dgryski/go-rendezvous", - sum = "h1:lO4WD4F/rVNCu3HqELle0jiPLLBs70cWOduZpkS1E78=", - version = "v0.0.0-20200823014737-9f7001d12a5f", + name = "com_github_prometheus_procfs", + importpath = "github.com/prometheus/procfs", + sum = "h1:wH4vA7pcjKuZzjF7lM8awk4fnuJO6idemZXoKnULUx4=", + version = "v0.2.0", ) + go_repository( - name = "com_github_fsnotify_fsnotify", - importpath = "github.com/fsnotify/fsnotify", - sum = "h1:IXs+QLmnXW2CcXuY+8Mzv/fWEsPGWxqefPtCP5CnV9I=", - version = "v1.4.7", + name = "com_github_puerkitobio_purell", + importpath = "github.com/PuerkitoBio/purell", + sum = "h1:WEQqlqaGbrPkxLJWfBwQmfEAE1Z7ONdDLqrN38tNFfI=", + version = "v1.1.1", ) go_repository( - name = "com_github_go_redis_redis_v8", - importpath = "github.com/go-redis/redis/v8", - sum = "h1:A1tQgdeVF23Ojc1TIRpVuVfOadUdIM0vFVURigoPEMM=", - version = "v8.2.2", + name = "com_github_puerkitobio_urlesc", + importpath = "github.com/PuerkitoBio/urlesc", + sum = "h1:d+Bc7a5rLufV/sSk/8dngufqelfh6jnri85riMAaF/M=", + version = "v0.0.0-20170810143723-de5bf2ad4578", ) go_repository( - name = "com_github_golang_protobuf", - importpath = "github.com/golang/protobuf", - sum = "h1:+Z5KGCizgyZCbGh1KZqA0fcLLkwbsjIzS4aV2v7wJX0=", - version = "v1.4.2", + name = "com_github_rcrowley_go_metrics", + importpath = "github.com/rcrowley/go-metrics", + sum = "h1:9ZKAASQSHhDYGoxY8uLVpewe1GDZ2vu2Tr/vTdVAkFQ=", + version = "v0.0.0-20181016184325-3113b8401b8a", ) go_repository( - name = "com_github_google_go_cmp", - importpath = "github.com/google/go-cmp", - sum = "h1:JFrFEBb2xKufg6XkJsJr+WbKb4FQlURi5RUcBveYu9k=", - version = "v0.5.1", + name = "com_github_rogpeppe_fastuuid", + importpath = "github.com/rogpeppe/fastuuid", + sum = "h1:gu+uRPtBe88sKxUCEXRoeCvVG90TJmwhiqRpvdhQFng=", + version = "v0.0.0-20150106093220-6724a57986af", ) - go_repository( - name = "com_github_hashicorp_hcl", - importpath = "github.com/hashicorp/hcl", - sum = "h1:0Anlzjpi4vEasTeNFn2mLJgTSwt0+6sfsiTG8qcWGx4=", - version = "v1.0.0", + name = "com_github_rogpeppe_go_internal", + importpath = "github.com/rogpeppe/go-internal", + sum = "h1:RR9dF3JtopPvtkroDZuVD7qquD0bnHlKSqaQhgwt8yk=", + version = "v1.3.0", ) go_repository( - name = "com_github_hpcloud_tail", - importpath = "github.com/hpcloud/tail", - sum = "h1:nfCOvKYfkgYP8hkirhJocXT2+zOD8yUNjXaWfTlyFKI=", - version = "v1.0.0", + name = "com_github_russross_blackfriday_v2", + importpath = "github.com/russross/blackfriday/v2", + sum = "h1:lPqVAte+HuHNfhJ/0LC98ESWRz8afy9tM/0RK8m9o+Q=", + version = "v2.0.1", ) go_repository( - name = "com_github_kr_pretty", - importpath = "github.com/kr/pretty", - sum = "h1:Fmg33tUaq4/8ym9TJN1x7sLJnHVwhP33CNkpYV/7rwI=", - version = "v0.2.1", + name = "com_github_ryanuber_columnize", + importpath = "github.com/ryanuber/columnize", + sum = "h1:UFr9zpz4xgTnIE5yIMtWAMngCdZ9p/+q6lTbgelo80M=", + version = "v0.0.0-20160712163229-9b3edd62028f", ) go_repository( - name = "com_github_kr_pty", - importpath = "github.com/kr/pty", - sum = "h1:VkoXIwSboBpnk99O/KFauAEILuNHv5DVFKZMBN/gUgw=", - version = "v1.1.1", + name = "com_github_samuel_go_zookeeper", + importpath = "github.com/samuel/go-zookeeper", + sum = "h1:p3Vo3i64TCLY7gIfzeQaUJ+kppEO5WQG3cL8iE8tGHU=", + version = "v0.0.0-20190923202752-2cc03de413da", ) go_repository( - name = "com_github_kr_text", - importpath = "github.com/kr/text", - sum = "h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE=", - version = "v0.1.0", + name = "com_github_sean_seed", + importpath = "github.com/sean-/seed", + sum = "h1:nn5Wsu0esKSJiIVhscUtVbo7ada43DJhG55ua/hjS5I=", + version = "v0.0.0-20170313163322-e2103e2c3529", ) - go_repository( - name = "com_github_magiconair_properties", - importpath = "github.com/magiconair/properties", - sum = "h1:LLgXmsheXeRoUOBOjtwPQCWIYqM/LU1ayDtDePerRcY=", - version = "v1.8.0", + name = "com_github_shopify_sarama", + importpath = "github.com/Shopify/sarama", + sum = "h1:9oksLxC6uxVPHPVYUmq6xhr1BOF/hHobWH2UzO67z1s=", + version = "v1.19.0", ) go_repository( - name = "com_github_mitchellh_mapstructure", - importpath = "github.com/mitchellh/mapstructure", - sum = "h1:fmNYVwqnSfB9mZU6OS2O6GsXM+wcskZDuKQzvN1EDeE=", - version = "v1.1.2", + name = "com_github_shopify_toxiproxy", + importpath = "github.com/Shopify/toxiproxy", + sum = "h1:TKdv8HiTLgE5wdJuEML90aBgNWsokNbMijUGhmcoBJc=", + version = "v2.1.4+incompatible", ) go_repository( - name = "com_github_nxadm_tail", - importpath = "github.com/nxadm/tail", - sum = "h1:DQuhQpB1tVlglWS2hLQ5OV6B5r8aGxSrPc5Qo6uTN78=", - version = "v1.4.4", + name = "com_github_shurcool_sanitized_anchor_name", + importpath = "github.com/shurcooL/sanitized_anchor_name", + sum = "h1:PdmoCO6wvbs+7yrJyMORt4/BmY5IYyJwS/kOiWx8mHo=", + version = "v1.0.0", ) + go_repository( - name = "com_github_onsi_ginkgo", - importpath = "github.com/onsi/ginkgo", - sum = "h1:jMU0WaQrP0a/YAEq8eJmJKjBoMs+pClEr1vDMlM/Do4=", - version = "v1.14.1", + name = "com_github_sirupsen_logrus", + importpath = "github.com/sirupsen/logrus", + sum = "h1:ShrD1U9pZB12TX0cVy0DtePoCH97K8EtX+mg7ZARUtM=", + version = "v1.7.0", ) go_repository( - name = "com_github_onsi_gomega", - importpath = "github.com/onsi/gomega", - sum = "h1:aY/nuoWlKJud2J6U0E3NWsjlg+0GtwXxgEqthRdzlcs=", - version = "v1.10.2", + name = "com_github_smartystreets_assertions", + importpath = "github.com/smartystreets/assertions", + sum = "h1:zE9ykElWQ6/NYmHa3jpm/yHnI4xSofP+UP6SpjHcSeM=", + version = "v0.0.0-20180927180507-b2de0cb4f26d", ) - go_repository( - name = "com_github_pelletier_go_toml", - importpath = "github.com/pelletier/go-toml", - sum = "h1:T5zMGML61Wp+FlcbWjRDT7yAxhJNAiPPLOFECq181zc=", - version = "v1.2.0", + name = "com_github_smartystreets_goconvey", + importpath = "github.com/smartystreets/goconvey", + sum = "h1:fv0U8FUIMPNf1L9lnHLvLhgicrIVChEkdzIKYqbNC9s=", + version = "v1.6.4", ) go_repository( - name = "com_github_pmezard_go_difflib", - importpath = "github.com/pmezard/go-difflib", - sum = "h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=", - version = "v1.0.0", + name = "com_github_soheilhy_cmux", + importpath = "github.com/soheilhy/cmux", + sum = "h1:0HKaf1o97UwFjHH9o5XsHUOF+tqmdA7KEzXLpiyaw0E=", + version = "v0.1.4", + ) + go_repository( + name = "com_github_sony_gobreaker", + importpath = "github.com/sony/gobreaker", + sum = "h1:oMnRNZXX5j85zso6xCPRNPtmAycat+WcoKbklScLDgQ=", + version = "v0.4.1", ) go_repository( name = "com_github_spf13_afero", importpath = "github.com/spf13/afero", - sum = "h1:m8/z1t7/fwjysjQRYbP0RD+bUIF/8tJwPdEZsI83ACI=", - version = "v1.1.2", + sum = "h1:5jhuqJyZCZf2JRofRvN/nIFgIWNzPa3/Vz8mYylgbWc=", + version = "v1.2.2", ) go_repository( name = "com_github_spf13_cast", @@ -202,8 +1337,8 @@ def go_repositories(): go_repository( name = "com_github_spf13_pflag", importpath = "github.com/spf13/pflag", - sum = "h1:zPAT6CGy6wXeQ7NtTnaTerfKOsV6V6F8agHXFiazDkg=", - version = "v1.0.3", + sum = "h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA=", + version = "v1.0.5", ) go_repository( name = "com_github_spf13_viper", @@ -211,11 +1346,24 @@ def go_repositories(): sum = "h1:5+8j8FTpnFV4nEImW/ofkzEt8VoOiLXxdYIDsB73T38=", version = "v1.3.1", ) + go_repository( + name = "com_github_streadway_amqp", + importpath = "github.com/streadway/amqp", + sum = "h1:WhxRHzgeVGETMlmVfqhRn8RIeeNoPr2Czh33I4Zdccw=", + version = "v0.0.0-20190827072141-edfb9018d271", + ) + go_repository( + name = "com_github_streadway_handy", + importpath = "github.com/streadway/handy", + sum = "h1:AhmOdSHeswKHBjhsLs/7+1voOxT+LLrSk/Nxvk35fug=", + version = "v0.0.0-20190108123426-d5acb3125c2a", + ) + go_repository( name = "com_github_stretchr_objx", importpath = "github.com/stretchr/objx", - sum = "h1:4G4v2dO3VZwixGIRoQ5Lfboy6nUhCyYzaqnIAPPhYs4=", - version = "v0.1.0", + sum = "h1:Hbg2NidpLE8veEBkEZTL3CvlkUIVzuU9jDplZO54c48=", + version = "v0.2.0", ) go_repository( name = "com_github_stretchr_testify", @@ -223,6 +1371,12 @@ def go_repositories(): sum = "h1:hDPOHmpOpP40lSULcqw7IrRb/u7w6RpDC9399XyoNd0=", version = "v1.6.1", ) + go_repository( + name = "com_github_tmc_grpc_websocket_proxy", + importpath = "github.com/tmc/grpc-websocket-proxy", + sum = "h1:ndzgwNDnKIqyCvHTXaCqh9KlOWKvBry6nuXMJmonVsE=", + version = "v0.0.0-20170815181823-89b8d40f7ca8", + ) go_repository( name = "com_github_ugorji_go_codec", @@ -230,6 +1384,25 @@ def go_repositories(): sum = "h1:3SVOIvH7Ae1KRYyQWRjXWJEA9sS/c/pjvH++55Gr648=", version = "v0.0.0-20181204163529-d75b2dcb6bc8", ) + go_repository( + name = "com_github_urfave_cli", + importpath = "github.com/urfave/cli", + sum = "h1:+mkCCcOFKPnCmVYVcURKps1Xe+3zP90gSYGNfRkjoIY=", + version = "v1.22.1", + ) + go_repository( + name = "com_github_vividcortex_gohistogram", + importpath = "github.com/VividCortex/gohistogram", + sum = "h1:6+hBz+qvs0JOrrNhhmR7lFxo5sINxBCGXrdtl/UvroE=", + version = "v1.0.0", + ) + go_repository( + name = "com_github_xiang90_probing", + importpath = "github.com/xiang90/probing", + sum = "h1:eY9dn8+vbi4tKz5Qo6v2eYzo7kUS51QINcR5jNpbZS8=", + version = "v0.0.0-20190116061207-43a291ad63a2", + ) + go_repository( name = "com_github_xordataexchange_crypt", importpath = "github.com/xordataexchange/crypt", @@ -242,29 +1415,118 @@ def go_repositories(): sum = "h1:ZkM6LRnq40pR1Ox0hTHlnpkcOTuFIDQpZ1IN8rKKhX0=", version = "v0.0.0-20191220021717-ab39c6098bdb", ) + go_repository( + name = "com_google_cloud_go", + importpath = "cloud.google.com/go", + sum = "h1:3ithwDMr7/3vpAMXiH+ZQnYbuIsh+OPhUPMFC9enmn0=", + version = "v0.54.0", + ) + go_repository( + name = "com_google_cloud_go_bigquery", + importpath = "cloud.google.com/go/bigquery", + sum = "h1:xE3CPsOgttP4ACBePh79zTKALtXwn/Edhcr16R5hMWU=", + version = "v1.4.0", + ) + go_repository( + name = "com_google_cloud_go_datastore", + importpath = "cloud.google.com/go/datastore", + sum = "h1:/May9ojXjRkPBNVrq+oWLqmWCkr4OU5uRY29bu0mRyQ=", + version = "v1.1.0", + ) + go_repository( + name = "com_google_cloud_go_pubsub", + importpath = "cloud.google.com/go/pubsub", + sum = "h1:Lpy6hKgdcl7a3WGSfJIFmxmcdjSpP6OmBEfcOv1Y680=", + version = "v1.2.0", + ) + go_repository( + name = "com_google_cloud_go_storage", + importpath = "cloud.google.com/go/storage", + sum = "h1:UDpwYIwla4jHGzZJaEJYx1tOejbgSoNqsAfHAUYe2r8=", + version = "v1.6.0", + ) + go_repository( + name = "com_shuralyov_dmitri_gpu_mtl", + importpath = "dmitri.shuralyov.com/gpu/mtl", + sum = "h1:VpgP7xuJadIUuKccphEpTJnWhS2jkQyMt6Y7pJCD7fY=", + version = "v0.0.0-20190408044501-666a987793e9", + ) + go_repository( + name = "com_sourcegraph_sourcegraph_appdash", + importpath = "sourcegraph.com/sourcegraph/appdash", + sum = "h1:ucqkfpjg9WzSUubAO62csmucvxl4/JeW3F4I4909XkM=", + version = "v0.0.0-20190731080439-ebfcffb1b5c0", + ) + go_repository( + name = "in_gopkg_alecthomas_kingpin_v2", + importpath = "gopkg.in/alecthomas/kingpin.v2", + sum = "h1:jMFz6MfLP0/4fUyZle81rXUoxOBFi19VUFKVDOQfozc=", + version = "v2.2.6", + ) + go_repository( name = "in_gopkg_check_v1", importpath = "gopkg.in/check.v1", - sum = "h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM=", - version = "v0.0.0-20161208181325-20d25e280405", + sum = "h1:YR8cESwS4TdDjEe65xsg0ogRM/Nc3DYOhEAlW+xobZo=", + version = "v1.0.0-20190902080502-41f04d3bba15", + ) + go_repository( + name = "in_gopkg_cheggaaa_pb_v1", + importpath = "gopkg.in/cheggaaa/pb.v1", + sum = "h1:Ev7yu1/f6+d+b3pi5vPdRPc6nNtP1umSfcWiEfRqv6I=", + version = "v1.0.25", + ) + go_repository( + name = "in_gopkg_errgo_v2", + importpath = "gopkg.in/errgo.v2", + sum = "h1:0vLT13EuvQ0hNvakwLuFZ/jYrLp5F3kcWHXdRggjCE8=", + version = "v2.1.0", ) + go_repository( name = "in_gopkg_fsnotify_v1", importpath = "gopkg.in/fsnotify.v1", sum = "h1:xOHLXZwVvI9hhs+cLKq5+I5onOuwQLhQwiu63xxlHs4=", version = "v1.4.7", ) + go_repository( + name = "in_gopkg_gcfg_v1", + importpath = "gopkg.in/gcfg.v1", + sum = "h1:m8OOJ4ccYHnx2f4gQwpno8nAX5OGOh7RLaaz0pj3Ogs=", + version = "v1.2.3", + ) + + go_repository( + name = "in_gopkg_inf_v0", + importpath = "gopkg.in/inf.v0", + sum = "h1:73M5CoZyi3ZLMOyDlQh031Cx6N9NDJ2Vvfl76EDAgDc=", + version = "v0.9.1", + ) + go_repository( + name = "in_gopkg_resty_v1", + importpath = "gopkg.in/resty.v1", + sum = "h1:CuXP0Pjfw9rOuY6EP+UvtNvt5DSqHpIxILZKT/quCZI=", + version = "v1.12.0", + ) + go_repository( name = "in_gopkg_tomb_v1", importpath = "gopkg.in/tomb.v1", sum = "h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ=", version = "v1.0.0-20141024135613-dd632973f1e7", ) + go_repository( + name = "in_gopkg_warnings_v0", + importpath = "gopkg.in/warnings.v0", + sum = "h1:wFXVbFY8DY5/xOe1ECiWdKCzZlxgshcYVNkBHstARME=", + version = "v0.1.2", + ) + go_repository( name = "in_gopkg_yaml_v2", importpath = "gopkg.in/yaml.v2", - sum = "h1:ZCJp+EgiOT7lHqUV2J862kp8Qj64Jo6az82+3Td9dZw=", - version = "v2.2.2", + sum = "h1:clyUAQHOM3G0M3f5vQj7LuJrETvjVot3Z5el9nffUtU=", + version = "v2.3.0", ) go_repository( name = "in_gopkg_yaml_v3", @@ -272,12 +1534,101 @@ def go_repositories(): sum = "h1:dUUwHk2QECo/6vqA44rthZ8ie2QXMNeKRTHCNY2nXvo=", version = "v3.0.0-20200313102051-9f266ea9e77c", ) + go_repository( + name = "io_etcd_go_bbolt", + importpath = "go.etcd.io/bbolt", + sum = "h1:MUGmc65QhB3pIlaQ5bB4LwqSj6GIonVJXpZiaKNyaKk=", + version = "v1.3.3", + ) + go_repository( + name = "io_etcd_go_etcd", + importpath = "go.etcd.io/etcd", + sum = "h1:VcrIfasaLFkyjk6KNlXQSzO+B0fZcnECiDrKJsfxka0=", + version = "v0.0.0-20191023171146-3cf2f69b5738", + ) + go_repository( name = "io_goji", importpath = "goji.io", sum = "h1:uIssv/elbKRLznFUy3Xj4+2Mz/qKhek/9aZQDUMae7c=", version = "v2.0.2+incompatible", ) + go_repository( + name = "io_k8s_api", + build_file_proto_mode = "disable_global", + importpath = "k8s.io/api", + sum = "h1:WwrYoZNM1W1aQEbyl8HNG+oWGzLpZQBlcerS9BQw9yI=", + version = "v0.20.0", + ) + go_repository( + name = "io_k8s_apimachinery", + build_file_proto_mode = "disable_global", + importpath = "k8s.io/apimachinery", + sum = "h1:jjzbTJRXk0unNS71L7h3lxGDH/2HPxMPaQY+MjECKL8=", + version = "v0.20.0", + ) + go_repository( + name = "io_k8s_client_go", + build_file_proto_mode = "legacy", + importpath = "k8s.io/client-go", + sum = "h1:Xlax8PKbZsjX4gFvNtt4F5MoJ1V5prDvCuoq9B7iax0=", + version = "v0.20.0", + ) + go_repository( + name = "io_k8s_gengo", + importpath = "k8s.io/gengo", + sum = "h1:sAvhNk5RRuc6FNYGqe7Ygz3PSo/2wGWbulskmzRX8Vs=", + version = "v0.0.0-20200413195148-3a45101e95ac", + ) + go_repository( + name = "io_k8s_klog", + importpath = "k8s.io/klog", + sum = "h1:Pt+yjF5aB1xDSVbau4VsWe+dQNzA0qv1LlXdC2dF6Q8=", + version = "v1.0.0", + ) + go_repository( + name = "io_k8s_klog_v2", + importpath = "k8s.io/klog/v2", + sum = "h1:7+X0fUguPyrKEC4WjH8iGDg3laWgMo5tMnRTIGTTxGQ=", + version = "v2.4.0", + ) + go_repository( + name = "io_k8s_kube_openapi", + importpath = "k8s.io/kube-openapi", + sum = "h1:sOHNzJIkytDF6qadMNKhhDRpc6ODik8lVC6nOur7B2c=", + version = "v0.0.0-20201113171705-d219536bb9fd", + ) + go_repository( + name = "io_k8s_sigs_structured_merge_diff_v3", + importpath = "sigs.k8s.io/structured-merge-diff/v3", + sum = "h1:dOmIZBMfhcHS09XZkMyUgkq5trg3/jRyJYFZUiaOp8E=", + version = "v3.0.0", + ) + + go_repository( + name = "io_k8s_sigs_structured_merge_diff_v4", + importpath = "sigs.k8s.io/structured-merge-diff/v4", + sum = "h1:YHQV7Dajm86OuqnIR6zAelnDWBRjo+YhYV9PmGrh1s8=", + version = "v4.0.2", + ) + go_repository( + name = "io_k8s_sigs_yaml", + importpath = "sigs.k8s.io/yaml", + sum = "h1:kr/MCeFWJWTwyaHoR9c8EjH9OumOmoF9YGiZd7lFm/Q=", + version = "v1.2.0", + ) + go_repository( + name = "io_k8s_utils", + importpath = "k8s.io/utils", + sum = "h1:CbnUZsM497iRC5QMVkHwyl8s2tB3g7yaSHkYPkpgelw=", + version = "v0.0.0-20201110183641-67b214c5f920", + ) + go_repository( + name = "io_opencensus_go", + importpath = "go.opencensus.io", + sum = "h1:8sGtKOrtQqkN1bp2AtX+misvLIlOmsEsNd+9NIcPEm8=", + version = "v0.22.3", + ) go_repository( name = "io_opentelemetry_go_otel", @@ -286,51 +1637,165 @@ def go_repositories(): sum = "h1:IN2tzQa9Gc4ZVKnTaMbPVcHjvzOdg5n9QfnmlqiET7E=", version = "v0.11.0", ) + go_repository( + name = "io_rsc_binaryregexp", + importpath = "rsc.io/binaryregexp", + sum = "h1:HfqmD5MEmC0zvwBuF187nq9mdnXjXsSivRiXN7SmRkE=", + version = "v0.2.0", + ) + go_repository( + name = "io_rsc_quote_v3", + importpath = "rsc.io/quote/v3", + sum = "h1:9JKUTTIUgS6kzR9mK1YuGKv6Nl+DijDNIc0ghT58FaY=", + version = "v3.1.0", + ) + go_repository( + name = "io_rsc_sampler", + importpath = "rsc.io/sampler", + sum = "h1:7uVkIFmeBqHfdjD+gZwtXXI+RODJ2Wc4O7MPEh/QiW4=", + version = "v1.3.0", + ) + go_repository( + name = "org_golang_google_api", + importpath = "google.golang.org/api", + sum = "h1:jz2KixHX7EcCPiQrySzPdnYT7DbINAypCqKZ1Z7GM40=", + version = "v0.20.0", + ) + + go_repository( + name = "org_golang_google_appengine", + importpath = "google.golang.org/appengine", + sum = "h1:tycE03LOZYQNhDpS27tcQdAzLCVMaj7QT2SXxebnpCM=", + version = "v1.6.5", + ) + go_repository( + name = "org_golang_google_genproto", + importpath = "google.golang.org/genproto", + sum = "h1:+kGHl1aib/qcwaRi1CbqBZ1rk19r85MNUf8HaBghugY=", + version = "v0.0.0-20200526211855-cb27e3aa2013", + ) + go_repository( + name = "org_golang_google_grpc", + importpath = "google.golang.org/grpc", + sum = "h1:zvIju4sqAGvwKspUQOhwnpcqSbzi7/H6QomNNjTL4sk=", + version = "v1.27.1", + ) + go_repository( name = "org_golang_google_protobuf", importpath = "google.golang.org/protobuf", - sum = "h1:4MY060fB1DLGMB/7MBTLnwQUY6+F09GEiz6SsrNqyzM=", - version = "v1.23.0", + sum = "h1:Ejskq+SyPohKW+1uil0JJMtmHCgJPJ/qWTxr8qp+R4c=", + version = "v1.25.0", ) go_repository( name = "org_golang_x_crypto", importpath = "golang.org/x/crypto", - sum = "h1:mKdxBk7AujPs8kU4m80U72y/zjbZ3UcXC7dClwKbUI0=", - version = "v0.0.0-20181203042331-505ab145d0a9", + sum = "h1:hb9wdF1z5waM+dSIICn1l0DkLVDT3hqhhQsDNUmHPRE=", + version = "v0.0.0-20201002170205-7f63de1d35b0", + ) + go_repository( + name = "org_golang_x_exp", + importpath = "golang.org/x/exp", + sum = "h1:QE6XYQK6naiK1EPAe1g/ILLxN5RBoH5xkJk3CqlMI/Y=", + version = "v0.0.0-20200224162631-6cc2880d07d6", + ) + go_repository( + name = "org_golang_x_image", + importpath = "golang.org/x/image", + sum = "h1:+qEpEAPhDZ1o0x3tHzZTQDArnOixOzGD9HUJfcg0mb4=", + version = "v0.0.0-20190802002840-cff245a6509b", + ) + + go_repository( + name = "org_golang_x_lint", + importpath = "golang.org/x/lint", + sum = "h1:Wh+f8QHJXR411sJR8/vRBTZ7YapZaRvUcLFFJhusH0k=", + version = "v0.0.0-20200302205851-738671d3881b", + ) + go_repository( + name = "org_golang_x_mobile", + importpath = "golang.org/x/mobile", + sum = "h1:4+4C/Iv2U4fMZBiMCc98MG1In4gJY5YRhtpDNeDeHWs=", + version = "v0.0.0-20190719004257-d2bd2a29d028", ) + go_repository( + name = "org_golang_x_mod", + importpath = "golang.org/x/mod", + sum = "h1:KU7oHjnv3XNWfa5COkzUifxZmxp1TyI7ImMXqFxLwvQ=", + version = "v0.2.0", + ) + go_repository( name = "org_golang_x_net", importpath = "golang.org/x/net", - sum = "h1:AeiKBIuRw3UomYXSbLy0Mc2dDLfdtbT/IVn4keq83P0=", - version = "v0.0.0-20200520004742-59133d7f0dd7", + sum = "h1:uwuIcX0g4Yl1NC5XAz37xsr2lTtcqevgzYNVt49waME=", + version = "v0.0.0-20201110031124-69a78807bb2b", ) + go_repository( + name = "org_golang_x_oauth2", + importpath = "golang.org/x/oauth2", + sum = "h1:TzXSXBo42m9gQenoE3b9BGiEpg5IG2JkU5FkPIawgtw=", + version = "v0.0.0-20200107190931-bf48bf16ab8d", + ) + go_repository( name = "org_golang_x_sync", importpath = "golang.org/x/sync", - sum = "h1:wMNYb4v58l5UBM7MYRLPG6ZhfOqbKu7X5eyFl8ZhKvA=", - version = "v0.0.0-20180314180146-1d60e4601c6f", + sum = "h1:vcxGaoTs7kV8m5Np9uUNQin4BrLOthgV7252N8V+FwY=", + version = "v0.0.0-20190911185100-cd5d95a43a6e", ) go_repository( name = "org_golang_x_sys", importpath = "golang.org/x/sys", - sum = "h1:1n5lsVfiQW3yfsRGu98756EH1YthsFqr/5mxHduZW2A=", - version = "v0.0.0-20181205085412-a5c9d58dba9a", + sum = "h1:5CtCZbICpIOFdgO940moixOPjc0178IU44m4EjOO5IY=", + version = "v0.0.0-20201112073958-5cba982894dd", ) go_repository( name = "org_golang_x_text", importpath = "golang.org/x/text", - sum = "h1:g61tztE5qeGQ89tm6NTjjM9VPIm088od1l6aSorWRWg=", - version = "v0.3.0", + sum = "h1:0YWbFKbhXG/wIiuHDSKpS0Iy7FSA+u45VtBMfQcFTTc=", + version = "v0.3.4", ) + go_repository( + name = "org_golang_x_time", + importpath = "golang.org/x/time", + sum = "h1:Hir2P/De0WpUhtrKGGjvSb2YxUgyZ7EFOSLIcSSpiwE=", + version = "v0.0.0-20201208040808-7e3f01d25324", + ) + go_repository( name = "org_golang_x_tools", importpath = "golang.org/x/tools", - sum = "h1:FDhOuMEY4JVRztM/gsbk+IKUQ8kj74bxZrgw87eMMVc=", - version = "v0.0.0-20180917221912-90fa682c2a6e", + sum = "h1:iKlO7ROJc6SttHKlxzwGytRtBUqX4VARrNTgP2YLX5M=", + version = "v0.0.0-20200304193943-95d2e580d8eb", ) go_repository( name = "org_golang_x_xerrors", importpath = "golang.org/x/xerrors", - sum = "h1:E7g+9GITq07hpfrRu66IVDexMakfv52eLZ2CXBWiKr4=", - version = "v0.0.0-20191204190536-9bdfabe68543", + sum = "h1:go1bK/D/BFZV2I8cIQd1NKEZ+0owSTG1fDTci4IqFcE=", + version = "v0.0.0-20200804184101-5ec99f83aff1", + ) + go_repository( + name = "org_uber_go_atomic", + importpath = "go.uber.org/atomic", + sum = "h1:OI5t8sDa1Or+q8AeE+yKeB/SDYioSHAgcVljj9JIETY=", + version = "v1.5.0", + ) + go_repository( + name = "org_uber_go_multierr", + importpath = "go.uber.org/multierr", + sum = "h1:sFPn2GLc3poCkfrpIXGhBD2X0CMIo4Q/zSULXrj/+uc=", + version = "v1.3.0", + ) + go_repository( + name = "org_uber_go_tools", + importpath = "go.uber.org/tools", + sum = "h1:0mgffUl7nfd+FpvXMVz4IDEaUSmT1ysygQC7qYo7sG4=", + version = "v0.0.0-20190618225709-2cfd321de3ee", + ) + go_repository( + name = "org_uber_go_zap", + importpath = "go.uber.org/zap", + sum = "h1:nR6NoDBgAf67s68NhaXbsojM+2gxp3S1hWkHDl27pVU=", + version = "v1.13.0", ) diff --git a/infrastructure/airy.conf.all b/infrastructure/airy.conf.all index 1a38eef3c3..a9db0e8404 100644 --- a/infrastructure/airy.conf.all +++ b/infrastructure/airy.conf.all @@ -2,44 +2,43 @@ global: appImageTag: latest containerRegistry: ghcr.io/airyhq + namespace: default # Configuration for the Kafka cluster -apps: - kafka: - brokers: "airy-cp-kafka-headless:9092" - schemaRegistryUrl: "http://airy-cp-schema-registry:8081" - commitInterval: 30000 - # Configuration for the Redis database - redis: - hostname: "redis-cluster" - port: 6379 - # Configuration for the PostgreSQL database - postgresql: - dbEndpoint: "postgres:5432" - dbName: "admin" - dbUsername: "postgresadmin" - dbPassword: "long-random-generated-password" - # Specific configurations for sources - sources: - facebook: - appId: "changeme" - appSecret: "changeme" - webhookSecret: "changeme" - webhookPublicUrl: https://public.tunnel.example.com - google: - partnerKey: "changeme" - saFile: > - '{"type":"service_account","project_id":"airy","private_key_id":"no","private_key":"nokey","client_email":"no","client_id":"no","auth_uri":"no","token_uri":"no","no":"no","client_x509_cert_url":"no"}' - webhookPublicUrl: https://public.tunnel.example.com - twilio: - authToken: "changeme" - accountSid: "changeme" - webhookPublicUrl: https://public.tunnel.example.com - # Specific configuration for the API apps - api: - mailFrom: "changeme" - mailPort: 587 - mailUrl: "changeme" - mailUsername: "changeme" - mailPassword: "changeme" - jwtSecret: "long-random-generated-jwt-secret" - allowedOrigins: "*" +core: + apps: + kafka: + brokers: "kafka-headless:9092" + schemaRegistryUrl: "http://schema-registry:8081" + commitInterval: 30000 + # Configuration for the Redis database + redis: + hostname: "redis-cluster" + port: 6379 + # Configuration for the PostgreSQL database + postgresql: + endpoint: "postgres:5432" + dbName: "admin" + username: "postgresadmin" + password: "long-random-generated-password" + # Specific configurations for sources + sources: + facebook: + appId: "changeme" + appSecret: "changeme" + webhookSecret: "changeme" + google: + partnerKey: "changeme" + saFile: > + '{"type":"service_account","project_id":"airy","private_key_id":"no","private_key":"nokey","client_email":"no","client_id":"no","auth_uri":"no","token_uri":"no","no":"no","client_x509_cert_url":"no"}' + twilio: + authToken: "changeme" + accountSid: "changeme" + # Specific configuration for the API apps + api: + mailFrom: "changeme" + mailPort: 587 + mailUrl: "changeme" + mailUsername: "changeme" + mailPassword: "changeme" + jwtSecret: "long-random-generated-jwt-secret" + allowedOrigins: "*" diff --git a/infrastructure/airy.conf.tpl b/infrastructure/airy.conf.tpl deleted file mode 100644 index 88a6d9e169..0000000000 --- a/infrastructure/airy.conf.tpl +++ /dev/null @@ -1,23 +0,0 @@ -global: - appImageTag: latest - containerRegistry: ghcr.io/airyhq -apps: - sources: - facebook: - appId: "changemeappid" - appSecret: "changemesecret" - webhookSecret: "changeme" - google: - partnerKey: "changeme" - saFile: > - '{"type":"service_account","project_id":"airy","private_key_id":"no","private_key":"nokey","client_email":"no","client_id":"no","auth_uri":"no","token_uri":"no","no":"no","client_x509_cert_url":"no"}' - twilio: - authToken: "changeme" - accountSid: "changeme" - api: - mailFrom: "changeme" - mailPort: 587 - mailUrl: "changeme" - mailUsername: "changeme" - mailPassword: "changeme" - allowedOrigins: "*" diff --git a/infrastructure/cli/cmd/auth/BUILD b/infrastructure/cli/cmd/auth/BUILD index 2eedf71c7a..cc679d53f4 100644 --- a/infrastructure/cli/cmd/auth/BUILD +++ b/infrastructure/cli/cmd/auth/BUILD @@ -7,8 +7,8 @@ go_library( importpath = "cli/cmd/auth", visibility = ["//visibility:public"], deps = [ - "//lib/go/apiclient", - "//lib/go/apiclient/payloads", + "//lib/go/httpclient", + "//lib/go/httpclient/payloads", "@com_github_spf13_cobra//:cobra", ], ) diff --git a/infrastructure/cli/cmd/auth/auth.go b/infrastructure/cli/cmd/auth/auth.go index 85c6dbeaf6..629bad9d39 100644 --- a/infrastructure/cli/cmd/auth/auth.go +++ b/infrastructure/cli/cmd/auth/auth.go @@ -4,8 +4,8 @@ import ( "fmt" "log" - "apiclient" - "apiclient/payloads" + "github.com/airyhq/airy/lib/go/httpclient" + "github.com/airyhq/airy/lib/go/httpclient/payloads" "github.com/spf13/cobra" ) @@ -23,7 +23,7 @@ func auth(cmd *cobra.Command, args []string) { url, _ := cmd.Flags().GetString("url") email, _ := cmd.Flags().GetString("email") password, _ := cmd.Flags().GetString("password") - c := apiclient.NewClient() + c := httpclient.NewClient() c.BaseURL = url loginRequestPayload := payloads.LoginRequestPayload{Email: email, Password: password} diff --git a/infrastructure/cli/go.mod b/infrastructure/cli/go.mod index 74107669f0..d113097457 100644 --- a/infrastructure/cli/go.mod +++ b/infrastructure/cli/go.mod @@ -3,11 +3,11 @@ module cli go 1.12 require ( - apiclient v0.0.0 + github.com/airyhq/airy/lib/go/httpclient v0.0.0 github.com/kr/pretty v0.2.1 github.com/spf13/cobra v0.0.3 github.com/spf13/viper v1.3.1 goji.io v2.0.2+incompatible ) -replace apiclient => ../../lib/go/apiclient +replace github.com/airyhq/airy/lib/go/httpclient => ../../lib/go/httpclient diff --git a/infrastructure/cli/pkg/tests/golden.go b/infrastructure/cli/pkg/tests/golden.go index 537f5f1582..fee90e27c2 100644 --- a/infrastructure/cli/pkg/tests/golden.go +++ b/infrastructure/cli/pkg/tests/golden.go @@ -2,7 +2,6 @@ package tests import ( "io/ioutil" - "os" "path/filepath" "testing" @@ -31,23 +30,6 @@ func (tf *TestFile) path() string { return filepath.Join(tf.dir, tf.name) } -func (tf *TestFile) write(content string) { - tf.t.Helper() - err := ioutil.WriteFile(tf.path(), []byte(content), 0644) - if err != nil { - tf.t.Fatalf("could not write %s: %v", tf.name, err) - } -} - -func (tf *TestFile) asFile() *os.File { - tf.t.Helper() - file, err := os.Open(tf.path()) - if err != nil { - tf.t.Fatalf("could not open %s: %v", tf.name, err) - } - return file -} - // Load method func (tf *TestFile) Load() string { tf.t.Helper() diff --git a/infrastructure/cli/pkg/tests/mockserver.go b/infrastructure/cli/pkg/tests/mockserver.go index 1484765de8..65c1783d88 100644 --- a/infrastructure/cli/pkg/tests/mockserver.go +++ b/infrastructure/cli/pkg/tests/mockserver.go @@ -24,7 +24,10 @@ func MockServer() { ReadTimeout: 10 * time.Second, WriteTimeout: 10 * time.Second, } - s.ListenAndServe() + err := s.ListenAndServe() + if err != nil { + log.Println(err) + } } func mockUserSignupHandler(w http.ResponseWriter, r *http.Request) { @@ -32,7 +35,10 @@ func mockUserSignupHandler(w http.ResponseWriter, r *http.Request) { if err != nil { fmt.Fprint(w, err) } - w.Write(data) + _, err = w.Write(data) + if err != nil { + log.Println(err) + } } func mockUserLoginHandler(w http.ResponseWriter, r *http.Request) { @@ -40,9 +46,8 @@ func mockUserLoginHandler(w http.ResponseWriter, r *http.Request) { if err != nil { fmt.Fprint(w, err) } - w.Write(data) -} - -func main() { - MockServer() + _, err = w.Write(data) + if err != nil { + log.Println(err) + } } diff --git a/infrastructure/controller/BUILD b/infrastructure/controller/BUILD new file mode 100644 index 0000000000..8b68346131 --- /dev/null +++ b/infrastructure/controller/BUILD @@ -0,0 +1,37 @@ +# gazelle:prefix controller +# gazelle:prefix k8s.io/kubernetes +load("@io_bazel_rules_go//go:def.bzl", "go_binary", "go_library") +load("@io_bazel_rules_docker//go:image.bzl", "go_image") +load("//tools/build:container_push.bzl", "container_push") + +go_library( + name = "controller_lib", + srcs = ["main.go"], + importpath = "github.com/airyhq/airy/infrastructure/controller", + visibility = ["//visibility:private"], + deps = [ + "//infrastructure/controller/pkg/configmap-controller", + "//infrastructure/lib/go/k8s/handler", + "//infrastructure/lib/go/k8s/util", + "@io_k8s_client_go//kubernetes", + "@io_k8s_client_go//tools/clientcmd", + "@io_k8s_klog//:klog", + ], +) + +go_binary( + name = "controller", + out = "controller", + embed = [":controller_lib"], + visibility = ["//visibility:public"], +) + +go_image( + name = "image", + embed = [":controller_lib"], +) + +container_push( + registry = "ghcr.io/airyhq/infrastructure", + repository = "controller", +) diff --git a/infrastructure/controller/go.mod b/infrastructure/controller/go.mod new file mode 100644 index 0000000000..2182193a02 --- /dev/null +++ b/infrastructure/controller/go.mod @@ -0,0 +1,15 @@ +module github.com/airyhq/airy/infrastructure/controller + +go 1.15 + +require ( + github.com/airyhq/airy/infrastructure/lib/go/k8s/handler v0.0.0 + github.com/airyhq/airy/infrastructure/lib/go/k8s/util v0.0.0 + k8s.io/api v0.20.0 + k8s.io/apimachinery v0.20.0 + k8s.io/client-go v0.20.0 + k8s.io/klog v1.0.0 +) + +replace github.com/airyhq/airy/infrastructure/lib/go/k8s/handler => ../lib/go/k8s/handler +replace github.com/airyhq/airy/infrastructure/lib/go/k8s/util => ../lib/go/k8s/util \ No newline at end of file diff --git a/infrastructure/controller/go.sum b/infrastructure/controller/go.sum new file mode 100644 index 0000000000..ab10246b92 --- /dev/null +++ b/infrastructure/controller/go.sum @@ -0,0 +1,678 @@ +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/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/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/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= +dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= +github.com/Azure/go-autorest v14.2.0+incompatible/go.mod h1:r+4oMnoxhatjLLJ6zxSWATqVooLgysK6ZNox3g/xq24= +github.com/Azure/go-autorest/autorest v0.11.1/go.mod h1:JFgpikqFJ/MleTTxwepExTKnFUKKszPS8UavbQYUMuw= +github.com/Azure/go-autorest/autorest/adal v0.9.0/go.mod h1:/c022QCutn2P7uY+/oQWWNcK9YU+MH96NgK+jErpbcg= +github.com/Azure/go-autorest/autorest/adal v0.9.5/go.mod h1:B7KF7jKIeC9Mct5spmyCB/A8CG/sEz1vwIRGv/bbw7A= +github.com/Azure/go-autorest/autorest/date v0.3.0/go.mod h1:BI0uouVdmngYNUzGWeSYnokU+TrmwEsOqdt8Y6sso74= +github.com/Azure/go-autorest/autorest/mocks v0.4.0/go.mod h1:LTp+uSrOhSkaKrUy935gNZuuIPPVsHlr9DSOxSayd+k= +github.com/Azure/go-autorest/autorest/mocks v0.4.1/go.mod h1:LTp+uSrOhSkaKrUy935gNZuuIPPVsHlr9DSOxSayd+k= +github.com/Azure/go-autorest/logger v0.2.0/go.mod h1:T9E3cAhj2VqvPOtCYAvby9aBXkZmbF5NWuPV8+WeEW8= +github.com/Azure/go-autorest/tracing v0.6.0/go.mod h1:+vhtPC754Xsa23ID7GlGsrdKBpUA79WCAKPPZVC2DeU= +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/Knetic/govaluate v3.0.1-0.20171022003610-9aa49832a739+incompatible/go.mod h1:r7JcOSlj0wfOMncg0iLm8Leh48TZaKVeNIfJntJ2wa0= +github.com/NYTimes/gziphandler v0.0.0-20170623195520-56545f4a5d46/go.mod h1:3wb06e3pkSAbeQ52E9H9iFoQsEEwGN64994WTCIhntQ= +github.com/PuerkitoBio/purell v1.1.1/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0= +github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578/go.mod h1:uGdkoq3SwY9Y+13GIhn11/XLaGBb4BfwItxLd5jeuXE= +github.com/Shopify/sarama v1.19.0/go.mod h1:FVkBWblsNy7DGZRfXLU0O9RCGt5g3g3yEuWXgklEdEo= +github.com/Shopify/toxiproxy v2.1.4+incompatible/go.mod h1:OXgGpZ6Cli1/URJOF1DMxUHB2q5Ap20/P/eIdh4G0pI= +github.com/VividCortex/gohistogram v1.0.0/go.mod h1:Pf5mBqqDxYaXu3hDrrU+w6nw50o/4+TcAqDqk/vUH7g= +github.com/afex/hystrix-go v0.0.0-20180502004556-fa1af6a1f4f5/go.mod h1:SkGFH1ia65gfNATL8TAiHDNxPzPdmEL5uirI2Uyuz6c= +github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= +github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= +github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= +github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= +github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d/go.mod h1:rBZYJk541a8SKzHPHnH3zbiI+7dagKZ0cgpgrD7Fyho= +github.com/apache/thrift v0.12.0/go.mod h1:cp2SuWMxlEZw2r+iP2GNCdIi4C1qmUzdZFSVb+bacwQ= +github.com/apache/thrift v0.13.0/go.mod h1:cp2SuWMxlEZw2r+iP2GNCdIi4C1qmUzdZFSVb+bacwQ= +github.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e/go.mod h1:3U/XgcO3hCbHZ8TKRvWD2dDTCfh9M9ya+I9JpbB7O8o= +github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da/go.mod h1:Q73ZrmVTwzkszR9V5SSuryQ31EELlFMUz1kKyl939pY= +github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= +github.com/aryann/difflib v0.0.0-20170710044230-e206f873d14a/go.mod h1:DAHtR1m6lCRdSC2Tm3DSWRPvIPr6xNKyeHdqDQSQT+A= +github.com/asaskevich/govalidator v0.0.0-20190424111038-f61b66f89f4a/go.mod h1:lB+ZfQJz7igIIfQNfa7Ml4HSf2uFQQRzpGGRXenZAgY= +github.com/aws/aws-lambda-go v1.13.3/go.mod h1:4UKl9IzQMoD+QF79YdCuzCwp8VbmG4VAQwij/eHl5CU= +github.com/aws/aws-sdk-go v1.27.0/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo= +github.com/aws/aws-sdk-go-v2 v0.18.0/go.mod h1:JWVYvqSMppoMJC0x5wdwiImzgXTI9FuZwxzkQq9wy+g= +github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= +github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= +github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= +github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= +github.com/casbin/casbin/v2 v2.1.2/go.mod h1:YcPU1XXisHhLzuxH9coDNf2FbKpjGlbCg3n9yuLkIJQ= +github.com/cenkalti/backoff v2.2.1+incompatible/go.mod h1:90ReRw6GdpyfrHakVjL/QHaoyV4aDUVVkXQJJJ3NXXM= +github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= +github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= +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/clbanning/x2j v0.0.0-20191024224557-825249438eec/go.mod h1:jMjuTZXRI4dUb/I5gc9Hdhagfvm9+RyrPryS/auMzxE= +github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= +github.com/cockroachdb/datadriven v0.0.0-20190809214429-80d97fb3cbaa/go.mod h1:zn76sxSg3SzpJ0PPJaLDCu+Bu0Lg3sKTORVIj19EIF8= +github.com/codahale/hdrhistogram v0.0.0-20161010025455-3a0bb77429bd/go.mod h1:sE/e/2PUdi/liOCUjSTXgM1o87ZssimdTWN964YiIeI= +github.com/coreos/go-semver v0.2.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= +github.com/coreos/go-systemd v0.0.0-20180511133405-39ca1b05acc7/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= +github.com/coreos/pkg v0.0.0-20160727233714-3ac0863d7acf/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= +github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= +github.com/creack/pty v1.1.7/go.mod h1:lj5s0c3V2DBrqTV7llrYr5NG6My20zk30Fl46Y7DoTY= +github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= +github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ= +github.com/docker/spdystream v0.0.0-20160310174837-449fdfce4d96/go.mod h1:Qh8CwZgvJUkLughtfhJv5dyTYa91l1fOUCrgjqmcifM= +github.com/docopt/docopt-go v0.0.0-20180111231733-ee0de3bc6815/go.mod h1:WwZ+bS3ebgob9U8Nd0kOddGdZWjyMGR8Wziv+TBNwSE= +github.com/dustin/go-humanize v0.0.0-20171111073723-bb3d318650d4/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= +github.com/eapache/go-resiliency v1.1.0/go.mod h1:kFI+JgMyC7bLPUVY133qvEBtVayf5mFgVsvEsIPBvNs= +github.com/eapache/go-xerial-snappy v0.0.0-20180814174437-776d5712da21/go.mod h1:+020luEh2TKB4/GOp8oxxtq0Daoen/Cii55CzbTV6DU= +github.com/eapache/queue v1.1.0/go.mod h1:6eCeP0CKFpHLu8blIFXhExK/dRa7WDZfr6jVFPTqq+I= +github.com/edsrzf/mmap-go v1.0.0/go.mod h1:YO35OhQPt3KJa3ryjFM5Bs14WD66h8eGKpfaBNrHW5M= +github.com/elazarl/goproxy v0.0.0-20180725130230-947c36da3153/go.mod h1:/Zj4wYkgs4iZTTu3o/KG3Itv/qCCa8VVMlb3i9OVuzc= +github.com/emicklei/go-restful v0.0.0-20170410110728-ff4f55a20633/go.mod h1:otzb+WCGbkyDHkqmQmT5YD2WR4BBwUdeQoFo8l/7tVs= +github.com/envoyproxy/go-control-plane v0.6.9/go.mod h1:SBwIajubJHhxtWwsL9s8ss4safvEdbitLhGGK48rN6g= +github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= +github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= +github.com/evanphx/json-patch v4.9.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= +github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= +github.com/form3tech-oss/jwt-go v3.2.2+incompatible/go.mod h1:pbq4aXjuKjdthFRnoDwaVPLA+WlJuPGy+QneDUgJi2k= +github.com/franela/goblin v0.0.0-20200105215937-c9ffbefa60db/go.mod h1:7dvUGVsVBjqR7JHJk0brhHOZYGmfBYOrK0ZhYMEtBr4= +github.com/franela/goreq v0.0.0-20171204163338-bcd34c9993f8/go.mod h1:ZhphrRTfi2rbfLwlschooIH4+wKKDR4Pdxhh+TRoA20= +github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= +github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ= +github.com/ghodss/yaml v0.0.0-20150909031657-73d445a93680/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= +github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= +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/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= +github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= +github.com/go-kit/kit v0.10.0/go.mod h1:xUsJbQ/Fp4kEt7AFgCuvyX4a71u8h9jB8tj/ORgOZ7o= +github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE= +github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk= +github.com/go-logfmt/logfmt v0.5.0/go.mod h1:wCYkCAKZfumFQihp8CzCvQ3paCTfi41vtzG1KdI/P7A= +github.com/go-logr/logr v0.1.0/go.mod h1:ixOQHD9gLJUVQQ2ZOR7zLEifBX6tGkNJF4QyIY7sIas= +github.com/go-logr/logr v0.2.0 h1:QvGt2nLcHH0WK9orKa+ppBPAxREcH364nPUedEpK0TY= +github.com/go-logr/logr v0.2.0/go.mod h1:z6/tIYblkpsD+a4lm/fGIIU9mZ+XfAiaFtq7xTgseGU= +github.com/go-openapi/jsonpointer v0.19.2/go.mod h1:3akKfEdA7DF1sugOqz1dVQHBcuDBPKZGEoHC/NkiQRg= +github.com/go-openapi/jsonpointer v0.19.3/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg= +github.com/go-openapi/jsonreference v0.19.2/go.mod h1:jMjeRr2HHw6nAVajTXJ4eiUwohSTlpa0o73RUL1owJc= +github.com/go-openapi/jsonreference v0.19.3/go.mod h1:rjx6GuL8TTa9VaixXglHmQmIL98+wF9xc8zWvFonSJ8= +github.com/go-openapi/spec v0.19.3/go.mod h1:FpwSN1ksY1eteniUU7X0N/BgJ7a4WvBFVA8Lj9mJglo= +github.com/go-openapi/swag v0.19.2/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk= +github.com/go-openapi/swag v0.19.5/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk= +github.com/go-sql-driver/mysql v1.4.0/go.mod h1:zAC/RDZ24gD3HViQzih4MyKcchzm+sOG5ZlKdlhCg5w= +github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= +github.com/gogo/googleapis v1.1.0/go.mod h1:gf4bu3Q80BeJ6H1S1vYPm8/ELATdvryBaNFGgqEef3s= +github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= +github.com/gogo/protobuf v1.2.0/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= +github.com/gogo/protobuf v1.2.1/go.mod h1:hp+jE20tsWTFYpLwKvXlhS1hjn+gTNwPg2I6zVXpSg4= +github.com/gogo/protobuf v1.3.1 h1:DqDEcV5aeaTmdFBePNpYsp3FlcVH/2ISVVM9Qf8PSls= +github.com/gogo/protobuf v1.3.1/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o= +github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= +github.com/golang/groupcache v0.0.0-20160516000752-02826c3e7903/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +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/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.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/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= +github.com/golang/protobuf v1.4.3 h1:JjCZWpVbqXDqFVmTfYWEVTMIYrL/NPdPSCHPJ0T/raM= +github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= +github.com/golang/snappy v0.0.0-20180518054509-2e65f85255db/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= +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.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.2 h1:X2ev0eStA3AbceY54o37/0PQ/UWqKEiiO2dKL5OPaFM= +github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= +github.com/google/gofuzz v1.1.0 h1:Hsa8mG0dQ46ij8Sl2AYJDUv1oA9/d6Vk+3LG99Oe02g= +github.com/google/gofuzz v1.1.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= +github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= +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/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= +github.com/google/uuid v1.0.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +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/googleapis/gnostic v0.4.1 h1:DLJCy1n/vrD4HPjOvYcT8aYQXpPIzoRZONaYwyycI+I= +github.com/googleapis/gnostic v0.4.1/go.mod h1:LRhVm6pbyptWbWbuZ38d1eyptfvIytN3ir6b65WBswg= +github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= +github.com/gorilla/context v1.1.1/go.mod h1:kBGZzfjB9CEq2AlWe17Uuf7NDRt0dE0s8S51q0aT7Yg= +github.com/gorilla/mux v1.6.2/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= +github.com/gorilla/mux v1.7.3/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= +github.com/gorilla/websocket v0.0.0-20170926233335-4201258b820c/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= +github.com/gregjones/httpcache v0.0.0-20180305231024-9cad4c3443a7/go.mod h1:FecbI9+v66THATjSRHfNgh1IVFe/9kFxbXtjV0ctIMA= +github.com/grpc-ecosystem/go-grpc-middleware v1.0.1-0.20190118093823-f849b5445de4/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= +github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgfV/d3M/q6VIi02HzZEHgUlZvzk= +github.com/grpc-ecosystem/grpc-gateway v1.9.5/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= +github.com/hashicorp/consul/api v1.3.0/go.mod h1:MmDNSzIMUjNpY/mQ398R4bk2FnqQLoPndWW5VkKPlCE= +github.com/hashicorp/consul/sdk v0.3.0/go.mod h1:VKf9jXwCTEY1QZP2MOLRhb5i/I/ssyNV1vwHyQBF0x8= +github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= +github.com/hashicorp/go-cleanhttp v0.5.1/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80= +github.com/hashicorp/go-immutable-radix v1.0.0/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= +github.com/hashicorp/go-msgpack v0.5.3/go.mod h1:ahLV/dePpqEmjfWmKiqvPkv/twdG7iPBM1vqhUKIvfM= +github.com/hashicorp/go-multierror v1.0.0/go.mod h1:dHtQlpGsu+cZNNAkkCN/P3hoUDHhCYQXV3UM06sGGrk= +github.com/hashicorp/go-rootcerts v1.0.0/go.mod h1:K6zTfqpRlCUIjkwsN4Z+hiSfzSTQa6eBIzfwKfwNnHU= +github.com/hashicorp/go-sockaddr v1.0.0/go.mod h1:7Xibr9yA9JjQq1JpNB2Vw7kxv8xerXegt+ozgdvDeDU= +github.com/hashicorp/go-syslog v1.0.0/go.mod h1:qPfqrKkXGihmCqbJM2mZgkZGvKG1dFdvsLplgctolz4= +github.com/hashicorp/go-uuid v1.0.0/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= +github.com/hashicorp/go-uuid v1.0.1/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= +github.com/hashicorp/go-version v1.2.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= +github.com/hashicorp/go.net v0.0.1/go.mod h1:hjKkEWcCURg++eb33jQU7oqQcI9XDCnUzHA0oac0k90= +github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= +github.com/hashicorp/golang-lru v0.5.1 h1:0hERBMJE1eitiLkihrMvRVBYAkpHzc/J3QdDN+dAcgU= +github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= +github.com/hashicorp/logutils v1.0.0/go.mod h1:QIAnNjmIWmVIIkWDTG1z5v++HQmx9WQRO+LraFDTW64= +github.com/hashicorp/mdns v1.0.0/go.mod h1:tL+uN++7HEJ6SQLQ2/p+z2pH24WQKWjBPkE0mNTz8vQ= +github.com/hashicorp/memberlist v0.1.3/go.mod h1:ajVTdAv/9Im8oMAAj5G31PhhMCZJV2pPBoIllUwCN7I= +github.com/hashicorp/serf v0.8.2/go.mod h1:6hOLApaqBFA1NXqRQAsxw9QxuDEvNxSQRwA/JwenrHc= +github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= +github.com/hudl/fargo v1.3.0/go.mod h1:y3CKSmjA+wD2gak7sUSXTAoopbhU08POFhmITJgmKTg= +github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= +github.com/imdario/mergo v0.3.5 h1:JboBksRwiiAJWvIYJVo46AfV+IAIKZpfrSzVKj42R4Q= +github.com/imdario/mergo v0.3.5/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA= +github.com/imdario/mergo v0.3.11 h1:3tnifQM4i+fbajXKBHXWEH+KvNHqojZ778UH75j3bGA= +github.com/imdario/mergo v0.3.11/go.mod h1:jmQim1M+e3UYxmgPu/WyfjB3N3VflVyUjjjwH0dnCYA= +github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= +github.com/influxdata/influxdb1-client v0.0.0-20191209144304-8bf82d3c094d/go.mod h1:qj24IKcXYK6Iy9ceXlo3Tc+vtHo9lIhSX5JddghvEPo= +github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k= +github.com/jonboulle/clockwork v0.1.0/go.mod h1:Ii8DK3G1RaLaWxj9trq07+26W01tbo22gdxWY5EU2bo= +github.com/jpillora/backoff v1.0.0/go.mod h1:J/6gKK9jxlEcS3zixgDgUAsiuZ7yrSoa/FX5e0EB2j4= +github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= +github.com/json-iterator/go v1.1.7/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= +github.com/json-iterator/go v1.1.8/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= +github.com/json-iterator/go v1.1.10 h1:Kz6Cvnvv2wGdaG/V8yMvfkmNiXq9Ya2KUv4rouJJr68= +github.com/json-iterator/go v1.1.10/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= +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/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU= +github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= +github.com/julienschmidt/httprouter v1.3.0/go.mod h1:JR6WtHb+2LUe8TCKY3cZOxFyyO8IZAc4RVcycCCAKdM= +github.com/kisielk/errcheck v1.1.0/go.mod h1:EZBBE59ingxPouuu3KfxchcWSUPOHkagtvWXihfKN4Q= +github.com/kisielk/errcheck v1.2.0/go.mod h1:/BMXB+zMLi60iA8Vv6Ksmxu/1UDYcXs4uQLJ+jE2L00= +github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= +github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= +github.com/konsorten/go-windows-terminal-sequences v1.0.3/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= +github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= +github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= +github.com/kr/pretty v0.2.0/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= +github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= +github.com/kr/pty v1.1.5/go.mod h1:9r2w37qlBe7rQ6e1fg1S/9xpWHSnaqNdHD3WcMdbPDA= +github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= +github.com/lightstep/lightstep-tracer-common/golang/gogo v0.0.0-20190605223551-bc2310a04743/go.mod h1:qklhhLq1aX+mtWk9cPHPzaBjWImj5ULL6C7HFJtXQMM= +github.com/lightstep/lightstep-tracer-go v0.18.1/go.mod h1:jlF1pusYV4pidLvZ+XD0UBX0ZE6WURAspgAczcDHrL4= +github.com/lyft/protoc-gen-validate v0.0.13/go.mod h1:XbGvPuh87YZc5TdIa2/I4pLk0QoUACkjt2znoq26NVQ= +github.com/mailru/easyjson v0.0.0-20190614124828-94de47d64c63/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= +github.com/mailru/easyjson v0.0.0-20190626092158-b2ccc519800e/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= +github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= +github.com/mattn/go-isatty v0.0.3/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= +github.com/mattn/go-isatty v0.0.4/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= +github.com/mattn/go-runewidth v0.0.2/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= +github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= +github.com/miekg/dns v1.0.14/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg= +github.com/mitchellh/cli v1.0.0/go.mod h1:hNIlj7HEI86fIcpObd7a0FcrxTWetlwJDGcceTlRvqc= +github.com/mitchellh/go-homedir v1.0.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= +github.com/mitchellh/go-testing-interface v1.0.0/go.mod h1:kRemZodwjscx+RGhAo8eIhFbs2+BFgRtFPeD/KE+zxI= +github.com/mitchellh/gox v0.4.0/go.mod h1:Sd9lOJ0+aimLBi73mGofS1ycjY8lL3uZM3JPS42BGNg= +github.com/mitchellh/iochan v1.0.0/go.mod h1:JwYml1nuB7xOzsp52dPpHFffvOCDupsG0QubkSMEySY= +github.com/mitchellh/mapstructure v0.0.0-20160808181253-ca63d7c062ee/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= +github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= +github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= +github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg= +github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= +github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= +github.com/modern-go/reflect2 v1.0.1 h1:9f412s+6RmYXLWZSEzVVgPGK7C2PphHj5RJrvfx9AWI= +github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= +github.com/munnerz/goautoneg v0.0.0-20120707110453-a547fc61f48d/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= +github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= +github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= +github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f/go.mod h1:ZdcZmHo+o7JKHSa8/e818NopupXU1YMK5fe1lsApnBw= +github.com/nats-io/jwt v0.3.0/go.mod h1:fRYCDE99xlTsqUzISS1Bi75UBJ6ljOJQOAAu5VglpSg= +github.com/nats-io/jwt v0.3.2/go.mod h1:/euKqTS1ZD+zzjYrY7pseZrTtWQSjujC7xjPc8wL6eU= +github.com/nats-io/nats-server/v2 v2.1.2/go.mod h1:Afk+wRZqkMQs/p45uXdrVLuab3gwv3Z8C4HTBu8GD/k= +github.com/nats-io/nats.go v1.9.1/go.mod h1:ZjDU1L/7fJ09jvUSRVBR2e7+RnLiiIQyqyzEE/Zbp4w= +github.com/nats-io/nkeys v0.1.0/go.mod h1:xpnFELMwJABBLVhffcfd1MZx6VsNRFpEugbxziKVo7w= +github.com/nats-io/nkeys v0.1.3/go.mod h1:xpnFELMwJABBLVhffcfd1MZx6VsNRFpEugbxziKVo7w= +github.com/nats-io/nuid v1.0.1/go.mod h1:19wcPz3Ph3q0Jbyiqsd0kePYG7A95tJPxeL+1OSON2c= +github.com/oklog/oklog v0.3.2/go.mod h1:FCV+B7mhrz4o+ueLpx+KqkyXRGMWOYEvfiXtdGtbWGs= +github.com/oklog/run v1.0.0/go.mod h1:dlhp/R75TPv97u0XWUtDeV/lRKWPKSdTuV0TZvrmrQA= +github.com/olekukonko/tablewriter v0.0.0-20170122224234-a0225b3f23b5/go.mod h1:vsDQFd/mU46D+Z4whnwzcISnGGzXWMclvtLoiIKAKIo= +github.com/onsi/ginkgo v0.0.0-20170829012221-11459a886d9c/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= +github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= +github.com/onsi/ginkgo v1.7.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= +github.com/onsi/ginkgo v1.11.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= +github.com/onsi/gomega v0.0.0-20170829124025-dcabb60a477c/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA= +github.com/onsi/gomega v1.4.3/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= +github.com/onsi/gomega v1.7.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= +github.com/op/go-logging v0.0.0-20160315200505-970db520ece7/go.mod h1:HzydrMdWErDVzsI23lYNej1Htcns9BCg93Dk0bBINWk= +github.com/opentracing-contrib/go-observer v0.0.0-20170622124052-a52f23424492/go.mod h1:Ngi6UdF0k5OKD5t5wlmGhe/EDKPoUM3BXZSSfIuJbis= +github.com/opentracing/basictracer-go v1.0.0/go.mod h1:QfBfYuafItcjQuMwinw9GhYKwFXS9KnPs5lxoYwgW74= +github.com/opentracing/opentracing-go v1.0.2/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= +github.com/opentracing/opentracing-go v1.1.0/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= +github.com/openzipkin-contrib/zipkin-go-opentracing v0.4.5/go.mod h1:/wsWhb9smxSfWAKL3wpBW7V8scJMt8N8gnaMCS9E/cA= +github.com/openzipkin/zipkin-go v0.1.6/go.mod h1:QgAqvLzwWbR/WpD4A3cGpPtJrZXNIiJc5AZX7/PBEpw= +github.com/openzipkin/zipkin-go v0.2.1/go.mod h1:NaW6tEwdmWMaCDZzg8sh+IBNOxHMPnhQw8ySjnjRyN4= +github.com/openzipkin/zipkin-go v0.2.2/go.mod h1:NaW6tEwdmWMaCDZzg8sh+IBNOxHMPnhQw8ySjnjRyN4= +github.com/pact-foundation/pact-go v1.0.4/go.mod h1:uExwJY4kCzNPcHRj+hCR/HBbOOIwwtUjcrb0b5/5kLM= +github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= +github.com/pborman/uuid v1.2.0/go.mod h1:X/NO0urCmaxf9VXbdlT7C2Yzkj2IKimNn4k+gtPdI/k= +github.com/performancecopilot/speed v3.0.0+incompatible/go.mod h1:/CLtqpZ5gBg1M9iaPbIdPPGyKcA8hKdoy6hAWba7Yac= +github.com/peterbourgon/diskv v2.0.1+incompatible/go.mod h1:uqqh8zWWbv1HBMNONnaR/tNboyR3/BZd58JJSHlUSCU= +github.com/pierrec/lz4 v1.0.2-0.20190131084431-473cd7ce01a1/go.mod h1:3/3N9NVKO0jef7pBehbT1qWhCMrIgbYNnFAZCqQ5LRc= +github.com/pierrec/lz4 v2.0.5+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi+IEE17M5jbnwPHcY= +github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/pkg/profile v1.2.1/go.mod h1:hJw3o1OdXxsrSjjVksARp5W95eeEaEfptyVZyv6JUPA= +github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/posener/complete v1.1.1/go.mod h1:em0nMJCgc9GFtwrmVmEMR/ZL6WyhyjMBndrE9hABlRI= +github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= +github.com/prometheus/client_golang v0.9.3-0.20190127221311-3c4408c8b829/go.mod h1:p2iRAGwDERtqlqzRXnrOVns+ignqQo//hLXqYxZYVNs= +github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo= +github.com/prometheus/client_golang v1.3.0/go.mod h1:hJaj2vgQTGQmVCsAACORcieXFeDPbaTKGT+JTgUa3og= +github.com/prometheus/client_golang v1.7.1/go.mod h1:PY5Wy2awLA44sXw4AOSfFBetzPP4j5+D6mVACh+pe2M= +github.com/prometheus/client_golang v1.8.0/go.mod h1:O9VU6huf47PktckDQfMTX0Y8tY0/7TSWwj+ITvv0TnM= +github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= +github.com/prometheus/client_model v0.0.0-20190115171406-56726106282f/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= +github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= +github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= +github.com/prometheus/client_model v0.1.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= +github.com/prometheus/client_model v0.2.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= +github.com/prometheus/common v0.2.0/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= +github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= +github.com/prometheus/common v0.7.0/go.mod h1:DjGbpBbp5NYNiECxcL/VnbXCCaQpKd3tt26CguLLsqA= +github.com/prometheus/common v0.10.0/go.mod h1:Tlit/dnDKsSWFlCLTWaA1cyBgKHSMdTB80sz/V91rCo= +github.com/prometheus/common v0.14.0/go.mod h1:U+gB1OBLb1lF3O42bTCL+FK18tX9Oar16Clt/msog/s= +github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= +github.com/prometheus/procfs v0.0.0-20190117184657-bf6a532e95b1/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= +github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= +github.com/prometheus/procfs v0.0.8/go.mod h1:7Qr8sr6344vo1JqZ6HhLceV9o3AJ1Ff+GxbHq6oeK9A= +github.com/prometheus/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= +github.com/prometheus/procfs v0.2.0/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= +github.com/rcrowley/go-metrics v0.0.0-20181016184325-3113b8401b8a/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= +github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg= +github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= +github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= +github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= +github.com/samuel/go-zookeeper v0.0.0-20190923202752-2cc03de413da/go.mod h1:gi+0XIa01GRL2eRQVjQkKGqKF3SF9vZR/HnPullcV2E= +github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc= +github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc= +github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= +github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= +github.com/sirupsen/logrus v1.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrfsX/uA88= +github.com/sirupsen/logrus v1.7.0/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= +github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc= +github.com/smartystreets/goconvey v1.6.4/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA= +github.com/soheilhy/cmux v0.1.4/go.mod h1:IM3LyeVVIOuxMH7sFAkER9+bJ4dT7Ms6E4xg4kGIyLM= +github.com/sony/gobreaker v0.4.1/go.mod h1:ZKptC7FHNvhBz7dN2LGjPVBz2sZJmc0/PkyDJOjmxWY= +github.com/spf13/afero v1.2.2/go.mod h1:9ZxEEn6pIJ8Rxe320qSDBk6AsU0r9pR7Q4OcevTdifk= +github.com/spf13/cobra v0.0.3/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ= +github.com/spf13/pflag v0.0.0-20170130214245-9ff6c6923cff/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= +github.com/spf13/pflag v1.0.1/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= +github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= +github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= +github.com/streadway/amqp v0.0.0-20190404075320-75d898a42a94/go.mod h1:AZpEONHx3DKn8O/DFsRAY58/XVQiIPMTMB1SddzLXVw= +github.com/streadway/amqp v0.0.0-20190827072141-edfb9018d271/go.mod h1:AZpEONHx3DKn8O/DFsRAY58/XVQiIPMTMB1SddzLXVw= +github.com/streadway/handy v0.0.0-20190108123426-d5acb3125c2a/go.mod h1:qNTQ5P5JnDBl6z3cMAg/SywNDC5ABu5ApDIw6lUbRmI= +github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/objx v0.2.0/go.mod h1:qt09Ya8vawLte6SNmTgCsAVtYtaKzEcn8ATUoHMkEqE= +github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= +github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= +github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= +github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +github.com/tmc/grpc-websocket-proxy v0.0.0-20170815181823-89b8d40f7ca8/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= +github.com/urfave/cli v1.20.0/go.mod h1:70zkFmudgCuE/ngEzBv17Jvp/497gISqfk5gWijbERA= +github.com/urfave/cli v1.22.1/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0= +github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU= +go.etcd.io/bbolt v1.3.3/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= +go.etcd.io/etcd v0.0.0-20191023171146-3cf2f69b5738/go.mod h1:dnLIgRNXwCJa5e+c6mIZCrds/GIG4ncV9HhK5PX7jPg= +go.opencensus.io v0.20.1/go.mod h1:6WKK9ahsWS3RSO+PY9ZHZUfv2irvY6gN279GOPZjmmk= +go.opencensus.io v0.20.2/go.mod h1:6WKK9ahsWS3RSO+PY9ZHZUfv2irvY6gN279GOPZjmmk= +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.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= +go.uber.org/atomic v1.5.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= +go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0= +go.uber.org/multierr v1.3.0/go.mod h1:VgVr7evmIr6uPjLBxg28wmKNXyqE9akIJ5XnfpiKl+4= +go.uber.org/tools v0.0.0-20190618225709-2cfd321de3ee/go.mod h1:vJERXedbb3MVM5f9Ejo0C68/HhF8uaILCdgjnY+goOA= +go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= +go.uber.org/zap v1.13.0/go.mod h1:zwrFLgMcdUuIBviXEYEH1YKNaOBnKXsx2IPda5bBwHM= +golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= +golang.org/x/crypto v0.0.0-20181029021203-45a5f77698d3/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= +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-20190611184440-5c40567a22f8/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20190701094942-4def268fd1a4/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/crypto v0.0.0-20201002170205-7f63de1d35b0 h1:hb9wdF1z5waM+dSIICn1l0DkLVDT3hqhhQsDNUmHPRE= +golang.org/x/crypto v0.0.0-20201002170205-7f63de1d35b0/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/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-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20181023162649-9b4f9f5ad519/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20181201002055-351d144fa1fc/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20181220203305-927f97764cc3/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-20190125091013-d26f9f9a57f3/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-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20190620200207-3b0461eec859/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-20190813141303-74dc4d7220e7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20190827160401-ba9fcec4b297/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-20200625001655-4c5254603344/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= +golang.org/x/net v0.0.0-20201110031124-69a78807bb2b h1:uwuIcX0g4Yl1NC5XAz37xsr2lTtcqevgzYNVt49waME= +golang.org/x/net v0.0.0-20201110031124-69a78807bb2b/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= +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 h1:TzXSXBo42m9gQenoE3b9BGiEpg5IG2JkU5FkPIawgtw= +golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= +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/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20181026203630-95b1ffbd15a5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20181107165924-66b7b1311ac8/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20181122145206-62eef0e2fa9b/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-20190422165155-953cdadca894/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-20190616124812-15dcb6c0061f/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-20190826190057-c7b8b68b1456/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191001151750-bb3f8db39f24/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191005200804-aed5e4c7ecf9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191220142924-d4481acd189f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191228213918-04cbcbbfeed8/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200106162015-b016eb3dc98e/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-20200615200032-f1bc736245b1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200625212154-ddb9806d33ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20201015000850-e3ed0017c211/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20201112073958-5cba982894dd h1:5CtCZbICpIOFdgO940moixOPjc0178IU44m4EjOO5IY= +golang.org/x/sys v0.0.0-20201112073958-5cba982894dd/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/text v0.3.4 h1:0YWbFKbhXG/wIiuHDSKpS0Iy7FSA+u45VtBMfQcFTTc= +golang.org/x/text v0.3.4/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/time v0.0.0-20180412165947-fbb02b2291d2/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +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/time v0.0.0-20200630173020-3af7569d3a1e/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/time v0.0.0-20201208040808-7e3f01d25324 h1:Hir2P/De0WpUhtrKGGjvSb2YxUgyZ7EFOSLIcSSpiwE= +golang.org/x/time v0.0.0-20201208040808-7e3f01d25324/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/tools v0.0.0-20180221164845-07fd8470d635/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20180828015842-6cd1fcedba52/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20181030221726-6c7e314b6563/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-20190328211700-ab21143f2384/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-20190614205625-5aca471b1d59/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-20191029041327-9cc4af7d6b2c/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191029190741-b9c20aec41a5/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-20200103221440-774c71fcf114/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-20200304193943-95d2e580d8eb/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= +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/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +google.golang.org/api v0.3.1/go.mod h1:6wY9I6uQWHQ8EM57III9mq/AjF+i8G65rmVagqKMtkk= +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.20.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= +google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= +google.golang.org/appengine v1.2.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= +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 h1:tycE03LOZYQNhDpS27tcQdAzLCVMaj7QT2SXxebnpCM= +google.golang.org/appengine v1.6.5/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-20190530194941-fb225487d101/go.mod h1:z3L6/3dTEVtUr6QSP8miRzeRqwQOioJ9I66odjN4I7s= +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-20200305110556-506484158171/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= +google.golang.org/grpc v1.17.0/go.mod h1:6QZJwpn2B+Zp71q/5VxRsJ6NXXVCE5NRUHRo+f3cWCs= +google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= +google.golang.org/grpc v1.20.0/go.mod h1:chYK+tFQF0nDUGJgXMSgLCQk3phJEuONr2DCgLDdAQM= +google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= +google.golang.org/grpc v1.21.0/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= +google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= +google.golang.org/grpc v1.22.1/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= +google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= +google.golang.org/grpc v1.23.1/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= +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/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.25.0 h1:Ejskq+SyPohKW+1uil0JJMtmHCgJPJ/qWTxr8qp+R4c= +google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= +gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= +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/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/cheggaaa/pb.v1 v1.0.25/go.mod h1:V/YB90LKu/1FcN3WVnfiiE5oMCibMjukxqG/qStrOgw= +gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= +gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= +gopkg.in/gcfg.v1 v1.2.3/go.mod h1:yesOnuUOFQAhST5vPY4nbZsb/huCgGGXlipJsBn0b3o= +gopkg.in/inf.v0 v0.9.1 h1:73M5CoZyi3ZLMOyDlQh031Cx6N9NDJ2Vvfl76EDAgDc= +gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw= +gopkg.in/resty.v1 v1.12.0/go.mod h1:mDo4pnntr5jdWRML875a/NmxYqAlA73dVijT2AXvQQo= +gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= +gopkg.in/warnings.v0 v0.1.2/go.mod h1:jksf8JmL6Qr/oQM2OXTHunEvvTAsrWBLb6OOjuVWRNI= +gopkg.in/yaml.v2 v2.0.0-20170812160011-eb3733d160e7/go.mod h1:JAlM8MvJe8wmxCU4Bli9HhUf9+ttbYbLASfIpnQbh74= +gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.5/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.8 h1:obN1ZagJSUGI0Ek/LBmuj4SNLPfIny3KsKFopxRdj10= +gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.3.0 h1:clyUAQHOM3G0M3f5vQj7LuJrETvjVot3Z5el9nffUtU= +gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +honnef.co/go/tools v0.0.0-20180728063816-88497007e858/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +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= +k8s.io/api v0.20.0 h1:WwrYoZNM1W1aQEbyl8HNG+oWGzLpZQBlcerS9BQw9yI= +k8s.io/api v0.20.0/go.mod h1:HyLC5l5eoS/ygQYl1BXBgFzWNlkHiAuyNAbevIn+FKg= +k8s.io/apimachinery v0.20.0 h1:jjzbTJRXk0unNS71L7h3lxGDH/2HPxMPaQY+MjECKL8= +k8s.io/apimachinery v0.20.0/go.mod h1:WlLqWAHZGg07AeltaI0MV5uk1Omp8xaN0JGLY6gkRpU= +k8s.io/client-go v0.20.0 h1:Xlax8PKbZsjX4gFvNtt4F5MoJ1V5prDvCuoq9B7iax0= +k8s.io/client-go v0.20.0/go.mod h1:4KWh/g+Ocd8KkCwKF8vUNnmqgv+EVnQDK4MBF4oB5tY= +k8s.io/client-go v1.5.1 h1:XaX/lo2/u3/pmFau8HN+sB5C/b4dc4Dmm2eXjBH4p1E= +k8s.io/client-go v11.0.0+incompatible h1:LBbX2+lOwY9flffWlJM7f1Ct8V2SRNiMRDFeiwnJo9o= +k8s.io/gengo v0.0.0-20200413195148-3a45101e95ac/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0= +k8s.io/klog v1.0.0 h1:Pt+yjF5aB1xDSVbau4VsWe+dQNzA0qv1LlXdC2dF6Q8= +k8s.io/klog v1.0.0/go.mod h1:4Bi6QPql/J/LkTDqv7R/cd3hPo4k2DG6Ptcz060Ez5I= +k8s.io/klog/v2 v2.0.0/go.mod h1:PBfzABfn139FHAV07az/IF9Wp1bkk3vpT2XSJ76fSDE= +k8s.io/klog/v2 v2.4.0 h1:7+X0fUguPyrKEC4WjH8iGDg3laWgMo5tMnRTIGTTxGQ= +k8s.io/klog/v2 v2.4.0/go.mod h1:Od+F08eJP+W3HUb4pSrPpgp9DGU4GzlpG/TmITuYh/Y= +k8s.io/kube-openapi v0.0.0-20201113171705-d219536bb9fd/go.mod h1:WOJ3KddDSol4tAGcJo0Tvi+dK12EcqSLqcWsryKMpfM= +k8s.io/utils v0.0.0-20201110183641-67b214c5f920 h1:CbnUZsM497iRC5QMVkHwyl8s2tB3g7yaSHkYPkpgelw= +k8s.io/utils v0.0.0-20201110183641-67b214c5f920/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= +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= +sigs.k8s.io/structured-merge-diff/v3 v3.0.0/go.mod h1:PlARxl6Hbt/+BC80dRLi1qAmnMqwqDg62YvvVkZjemw= +sigs.k8s.io/structured-merge-diff/v4 v4.0.2 h1:YHQV7Dajm86OuqnIR6zAelnDWBRjo+YhYV9PmGrh1s8= +sigs.k8s.io/structured-merge-diff/v4 v4.0.2/go.mod h1:bJZC9H9iH24zzfZ/41RGcq60oK1F7G282QMXDPYydCw= +sigs.k8s.io/yaml v1.1.0/go.mod h1:UJmg0vDUVViEyp3mgSv9WPwZCDxu4rQW1olrI1uml+o= +sigs.k8s.io/yaml v1.2.0 h1:kr/MCeFWJWTwyaHoR9c8EjH9OumOmoF9YGiZd7lFm/Q= +sigs.k8s.io/yaml v1.2.0/go.mod h1:yfXDCHCao9+ENCvLSE62v9VSji2MKu5jeNfTrofGhJc= +sourcegraph.com/sourcegraph/appdash v0.0.0-20190731080439-ebfcffb1b5c0/go.mod h1:hI742Nqp5OhwiqlzhgfbWU4mW4yO10fP+LoT9WOswdU= diff --git a/infrastructure/controller/main.go b/infrastructure/controller/main.go new file mode 100644 index 0000000000..5101b7925c --- /dev/null +++ b/infrastructure/controller/main.go @@ -0,0 +1,51 @@ +/* +Acknowledgement to the following projects, as they were used +as a reference when creating the Airy Kubernetes Controller +- https://github.com/stakater/Reloader +- https://github.com/kubernetes/sample-controller + +*/ + +package main + +import ( + "flag" + + cm "github.com/airyhq/airy/infrastructure/controller/pkg/configmap-controller" + + "k8s.io/klog" + + "k8s.io/client-go/kubernetes" + "k8s.io/client-go/tools/clientcmd" +) + +func main() { + var kubeconfig string + var master string + + // Check if kubernetes configuration is provided, otherwise use serviceAccount + flag.StringVar(&kubeconfig, "kubeconfig", "", "absolute path to the kubeconfig file") + flag.StringVar(&master, "master", "", "master url") + flag.Parse() + + // Create connection + config, err := clientcmd.BuildConfigFromFlags(master, kubeconfig) + if err != nil { + klog.Fatal(err) + } + + // Create clientset client + clientset, err := kubernetes.NewForConfig(config) + if err != nil { + klog.Fatal(err) + } + + // Create configMap controller + configMapController := cm.ConfigMapController(clientset) + stop := make(chan struct{}) + defer close(stop) + go configMapController.Run(1, stop) + + // Wait forever + select {} +} diff --git a/infrastructure/controller/pkg/configmap-controller/BUILD b/infrastructure/controller/pkg/configmap-controller/BUILD new file mode 100644 index 0000000000..ef6399fb37 --- /dev/null +++ b/infrastructure/controller/pkg/configmap-controller/BUILD @@ -0,0 +1,22 @@ +# gazelle:prefix configmap-controller +# gazelle:prefix k8s.io/kubernetes +load("@io_bazel_rules_go//go:def.bzl", "go_library") + +go_library( + name = "configmap-controller", + srcs = ["configmap-controller.go"], + importpath = "github.com/airyhq/airy/infrastructure/controller/pkg/configmap-controller", + visibility = ["//visibility:public"], + deps = [ + "//infrastructure/lib/go/k8s/handler", + "//infrastructure/lib/go/k8s/util", + "@io_k8s_api//core/v1:core", + "@io_k8s_apimachinery//pkg/fields", + "@io_k8s_apimachinery//pkg/util/runtime", + "@io_k8s_apimachinery//pkg/util/wait", + "@io_k8s_client_go//kubernetes", + "@io_k8s_client_go//tools/cache", + "@io_k8s_client_go//util/workqueue", + "@io_k8s_klog//:klog", + ], +) diff --git a/infrastructure/controller/pkg/configmap-controller/configmap-controller.go b/infrastructure/controller/pkg/configmap-controller/configmap-controller.go new file mode 100644 index 0000000000..edfdda7b99 --- /dev/null +++ b/infrastructure/controller/pkg/configmap-controller/configmap-controller.go @@ -0,0 +1,149 @@ +package configmapController + +import ( + "fmt" + "time" + + "github.com/airyhq/airy/infrastructure/lib/go/k8s/handler" + "github.com/airyhq/airy/infrastructure/lib/go/k8s/util" + + v1 "k8s.io/api/core/v1" + + "k8s.io/apimachinery/pkg/fields" + "k8s.io/apimachinery/pkg/util/runtime" + "k8s.io/apimachinery/pkg/util/wait" + "k8s.io/klog" + + "k8s.io/client-go/kubernetes" + "k8s.io/client-go/tools/cache" + "k8s.io/client-go/util/workqueue" +) + +type Controller struct { + indexer cache.Indexer + queue workqueue.RateLimitingInterface + informer cache.Controller + clientset kubernetes.Interface +} + +func NewController(queue workqueue.RateLimitingInterface, indexer cache.Indexer, informer cache.Controller, clientset kubernetes.Interface) *Controller { + return &Controller{ + informer: informer, + indexer: indexer, + queue: queue, + clientset: clientset, + } +} + +func (c *Controller) processNextItem() bool { + // Wait until there is a new item in the working queue + key, quit := c.queue.Get() + if quit { + return false + } + defer c.queue.Done(key) + // Invoke the method containing the business logic + err := c.Handle(key.(string)) + // Handle the error if something went wrong during the execution of the business logic + c.handleErr(err, key) + return true +} + +// Handle is the business logic of the controller. +func (c *Controller) Handle(key string) error { + obj, exists, err := c.indexer.GetByKey(key) + if err != nil { + klog.Errorf("Fetching object with key %s from store failed with %v", key, err) + return err + } + + if !exists { + fmt.Printf("Object %s does not exist anymore\n", key) + } else { + configmap := handler.GetConfigmapConfig(obj.(*v1.ConfigMap)) + klog.Infof("Handling change in configmap %s\n", configmap.Name) + affectedDeployments, errGetDeployments := handler.GetAffectedDeploymentsConfigmap(c.clientset, configmap.Name, "default", "") + if errGetDeployments != nil { + klog.Errorf("Error retrieving affected deployments %v", errGetDeployments) + } + for _, affectedDeployment := range affectedDeployments { + klog.Infof("Scheduling reload for deployment: %s", affectedDeployment) + handler.ReloadDeployment(c.clientset, "default", affectedDeployment) + + } + } + return nil +} + +// handleErr checks if an error happened and makes sure we will retry later. +func (c *Controller) handleErr(err error, key interface{}) { + if err == nil { + c.queue.Forget(key) + return + } + + // This controller retries 5 times if something goes wrong. After that, it stops trying. + if c.queue.NumRequeues(key) < 5 { + klog.Infof("Error syncing %v: %v", key, err) + c.queue.AddRateLimited(key) + return + } + + c.queue.Forget(key) + // Report to an external entity that, even after several retries, we could not successfully process this key + runtime.HandleError(err) + klog.Infof("Dropping pod %q out of the queue: %v", key, err) +} + +func (c *Controller) Run(threadiness int, stopCh chan struct{}) { + defer runtime.HandleCrash() + + // Let the workers stop when we are done + defer c.queue.ShutDown() + klog.Info("Starting controller") + + go c.informer.Run(stopCh) + + // Wait for all involved caches to be synced, before processing items from the queue is started + if !cache.WaitForCacheSync(stopCh, c.informer.HasSynced) { + runtime.HandleError(fmt.Errorf("Timed out waiting for caches to sync")) + return + } + + for i := 0; i < threadiness; i++ { + go wait.Until(c.runWorker, time.Second, stopCh) + } + + <-stopCh + klog.Info("Stopping controller") +} + +func (c *Controller) runWorker() { + for c.processNextItem() { + } +} + +// ConfigMapController for monitoring the configmaps +func ConfigMapController(clientset kubernetes.Interface) *Controller { + + configMapListWatcher := cache.NewListWatchFromClient(clientset.CoreV1().RESTClient(), "configmaps", v1.NamespaceDefault, fields.Everything()) + queue := workqueue.NewRateLimitingQueue(workqueue.DefaultControllerRateLimiter()) + indexer, informer := cache.NewIndexerInformer(configMapListWatcher, &v1.ConfigMap{}, 0, cache.ResourceEventHandlerFuncs{ + AddFunc: func(obj interface{}) { + // Currently we do nothing when a new configMap is added + klog.Infof("Added configMap: %s , sha: %s", obj.(*v1.ConfigMap).GetName(), util.GetSHAfromConfigmap(obj.(*v1.ConfigMap))) + }, + UpdateFunc: func(old interface{}, new interface{}) { + key, err := cache.MetaNamespaceKeyFunc(new) + if err == nil { + queue.Add(key) + klog.Infof("Updated configMap %s from sha: %s to sha: %s", old.(*v1.ConfigMap).GetName(), util.GetSHAfromConfigmap(old.(*v1.ConfigMap)), util.GetSHAfromConfigmap(new.(*v1.ConfigMap))) + } + }, + DeleteFunc: func(obj interface{}) { + // Currently we do nothing when a new configMap is deleted + klog.Infof("Deleted configMap %s", obj.(*v1.ConfigMap).GetName()) + }, + }, cache.Indexers{}) + return NewController(queue, indexer, informer, clientset) +} diff --git a/infrastructure/helm-chart/charts/apps/Chart.yaml b/infrastructure/helm-chart/charts/apps/Chart.yaml index c57f3a6cb3..ae719e7310 100644 --- a/infrastructure/helm-chart/charts/apps/Chart.yaml +++ b/infrastructure/helm-chart/charts/apps/Chart.yaml @@ -1,5 +1,5 @@ apiVersion: v1 appVersion: "1.0" description: A Helm chart for the Airy Core Platform application -name: airy-apps +name: core version: 0.5.0 diff --git a/infrastructure/helm-chart/charts/apps/charts/airy-config/templates/api.yaml b/infrastructure/helm-chart/charts/apps/charts/airy-config/templates/api.yaml index b61d1ade50..d6034a0064 100644 --- a/infrastructure/helm-chart/charts/apps/charts/airy-config/templates/api.yaml +++ b/infrastructure/helm-chart/charts/apps/charts/airy-config/templates/api.yaml @@ -2,6 +2,7 @@ apiVersion: v1 kind: ConfigMap metadata: name: api-config + namespace: {{ .Values.global.namespace }} data: MAIL_FROM: {{ .Values.api.mailFrom }} MAIL_PORT: "{{ .Values.api.mailPort }}" diff --git a/infrastructure/helm-chart/charts/apps/charts/airy-config/templates/kafka.yaml b/infrastructure/helm-chart/charts/apps/charts/airy-config/templates/kafka.yaml index 9505824ffb..24ca8ee3d8 100644 --- a/infrastructure/helm-chart/charts/apps/charts/airy-config/templates/kafka.yaml +++ b/infrastructure/helm-chart/charts/apps/charts/airy-config/templates/kafka.yaml @@ -2,6 +2,7 @@ apiVersion: v1 kind: ConfigMap metadata: name: kafka-config + namespace: {{ .Values.global.namespace }} data: KAFKA_BROKERS: {{ .Values.kafka.brokers }} KAFKA_SCHEMA_REGISTRY_URL: {{ .Values.kafka.schemaRegistryUrl }} diff --git a/infrastructure/helm-chart/charts/apps/charts/airy-config/templates/postgresql.yaml b/infrastructure/helm-chart/charts/apps/charts/airy-config/templates/postgresql.yaml index cdb184882c..cddf98841c 100644 --- a/infrastructure/helm-chart/charts/apps/charts/airy-config/templates/postgresql.yaml +++ b/infrastructure/helm-chart/charts/apps/charts/airy-config/templates/postgresql.yaml @@ -2,10 +2,11 @@ apiVersion: v1 kind: ConfigMap metadata: name: postgres-config + namespace: {{ .Values.global.namespace }} labels: app: postgres data: - POSTGRES_ENDPOINT: {{ .Values.postgresql.dbEndpoint | default "postgres:5432" }} + POSTGRES_ENDPOINT: {{ .Values.postgresql.endpoint | default "postgres:5432" }} POSTGRES_DB: {{ .Values.postgresql.dbName | default "admin" }} - POSTGRES_USER: {{ .Values.postgresql.dbUsername | default "postgresadmin" }} - POSTGRES_PASSWORD: {{ .Values.postgresql.dbPassword | default (randAlphaNum 16) }} \ No newline at end of file + POSTGRES_USER: {{ .Values.postgresql.username | default "postgresadmin" }} + POSTGRES_PASSWORD: {{ .Values.postgresql.password | default (randAlphaNum 16) }} \ No newline at end of file diff --git a/infrastructure/helm-chart/charts/apps/charts/airy-config/templates/redis.yaml b/infrastructure/helm-chart/charts/apps/charts/airy-config/templates/redis.yaml index 6975a952f5..91182856ab 100644 --- a/infrastructure/helm-chart/charts/apps/charts/airy-config/templates/redis.yaml +++ b/infrastructure/helm-chart/charts/apps/charts/airy-config/templates/redis.yaml @@ -2,6 +2,7 @@ apiVersion: v1 kind: ConfigMap metadata: name: redis-config + namespace: {{ .Values.global.namespace }} data: REDIS_HOSTNAME: {{ .Values.redis.hostname }} REDIS_PORT: "{{ .Values.redis.port }}" diff --git a/infrastructure/helm-chart/charts/apps/charts/airy-config/templates/sources.yaml b/infrastructure/helm-chart/charts/apps/charts/airy-config/templates/sources.yaml index ecf7917d89..b59397d601 100644 --- a/infrastructure/helm-chart/charts/apps/charts/airy-config/templates/sources.yaml +++ b/infrastructure/helm-chart/charts/apps/charts/airy-config/templates/sources.yaml @@ -1,26 +1,47 @@ -{{ $ingressID := randAlphaNum 10 }} +{{ $coreID := randAlphaNum 10 | lower }} apiVersion: v1 kind: ConfigMap metadata: - name: sources-config + name: sources-facebook + namespace: {{ .Values.global.namespace }} data: FACEBOOK_APP_ID: {{ .Values.sources.facebook.appId | quote }} FACEBOOK_APP_SECRET: {{ .Values.sources.facebook.appSecret | quote }} FACEBOOK_WEBHOOK_SECRET: {{ .Values.sources.facebook.webhookSecret | quote }} - FACEBOOK_WEBHOOK_PUBLIC_URL: https://fb-{{ $ingressID }}.tunnel.airy.co +--- +apiVersion: v1 +kind: ConfigMap +metadata: + name: sources-google + namespace: {{ .Values.global.namespace }} +data: GOOGLE_PARTNER_KEY: {{ .Values.sources.google.partnerKey }} GOOGLE_SA_FILE: {{ .Values.sources.google.saFile }} - GOOGLE_WEBHOOK_PUBLIC_URL: https://gl-{{ $ingressID }}.tunnel.airy.co +--- +apiVersion: v1 +kind: ConfigMap +metadata: + name: sources-twilio + namespace: {{ .Values.global.namespace }} +data: TWILIO_AUTH_TOKEN: {{ .Values.sources.twilio.authToken }} TWILIO_ACCOUNT_SID: {{ .Values.sources.twilio.accountSid }} - TWILIO_WEBHOOK_PUBLIC_URL: https://tw-{{ $ingressID }}.tunnel.airy.co --- apiVersion: v1 kind: ConfigMap metadata: name: ngrok-client-config - namespace: default + namespace: {{ .Values.global.namespace }} data: config.yml: | server_addr: proxy.tunnel.airy.co:4443 trust_host_root_certs: true +--- +apiVersion: v1 +kind: ConfigMap +metadata: + name: core-config + namespace: {{ .Values.global.namespace }} +data: + APP_IMAGE_TAG: {{ .Values.global.appImageTag }} + CORE_ID: {{ $coreID }} diff --git a/infrastructure/helm-chart/charts/apps/charts/airy-config/values.yaml b/infrastructure/helm-chart/charts/apps/charts/airy-config/values.yaml index 9ebad89fb9..12d4d27b07 100644 --- a/infrastructure/helm-chart/charts/apps/charts/airy-config/values.yaml +++ b/infrastructure/helm-chart/charts/apps/charts/airy-config/values.yaml @@ -1,15 +1,14 @@ kafka: - brokers: "airy-cp-kafka-headless:9092" - schemaRegistryUrl: "http://airy-cp-schema-registry:8081" + brokers: "kafka-headless:9092" + schemaRegistryUrl: "http://schema-registry:8081" commitInterval: 1000 redis: hostname: "redis-cluster" port: 6379 postgresql: - dbEndpoint: "postgres:5432" - dbName: "admin" - dbUsername: "postgresadmin" - dbPassword: "changeme" + endpoint: "postgres:5432" + username: "postgresadmin" + password: "changeme" sources: facebook: appId: "changeme" diff --git a/infrastructure/helm-chart/charts/apps/charts/api-admin/templates/deployment.yaml b/infrastructure/helm-chart/charts/apps/charts/api-admin/templates/deployment.yaml index 91fd27dd8f..c85d710620 100644 --- a/infrastructure/helm-chart/charts/apps/charts/api-admin/templates/deployment.yaml +++ b/infrastructure/helm-chart/charts/apps/charts/api-admin/templates/deployment.yaml @@ -2,7 +2,7 @@ apiVersion: apps/v1 kind: Deployment metadata: name: api-admin - namespace: default + namespace: {{ .Values.global.namespace }} labels: app: api-admin type: api diff --git a/infrastructure/helm-chart/charts/apps/charts/api-admin/templates/service.yaml b/infrastructure/helm-chart/charts/apps/charts/api-admin/templates/service.yaml index e530c62b0e..2e72c831f1 100644 --- a/infrastructure/helm-chart/charts/apps/charts/api-admin/templates/service.yaml +++ b/infrastructure/helm-chart/charts/apps/charts/api-admin/templates/service.yaml @@ -2,7 +2,7 @@ apiVersion: v1 kind: Service metadata: name: api-admin - namespace: default + namespace: {{ .Values.global.namespace }} spec: ports: - port: 80 diff --git a/infrastructure/helm-chart/charts/apps/charts/api-auth/templates/deployment.yaml b/infrastructure/helm-chart/charts/apps/charts/api-auth/templates/deployment.yaml index 4608c0b412..c56e53bf17 100644 --- a/infrastructure/helm-chart/charts/apps/charts/api-auth/templates/deployment.yaml +++ b/infrastructure/helm-chart/charts/apps/charts/api-auth/templates/deployment.yaml @@ -2,7 +2,7 @@ apiVersion: apps/v1 kind: Deployment metadata: name: api-auth - namespace: default + namespace: {{ .Values.global.namespace }} labels: app: api-auth type: api diff --git a/infrastructure/helm-chart/charts/apps/charts/api-auth/templates/service.yaml b/infrastructure/helm-chart/charts/apps/charts/api-auth/templates/service.yaml index 11ec13785d..fc14391318 100644 --- a/infrastructure/helm-chart/charts/apps/charts/api-auth/templates/service.yaml +++ b/infrastructure/helm-chart/charts/apps/charts/api-auth/templates/service.yaml @@ -2,7 +2,7 @@ apiVersion: v1 kind: Service metadata: name: api-auth - namespace: default + namespace: {{ .Values.global.namespace }} spec: ports: - port: 80 diff --git a/infrastructure/helm-chart/charts/apps/charts/api-communication/templates/deployment.yaml b/infrastructure/helm-chart/charts/apps/charts/api-communication/templates/deployment.yaml index e928c7d70b..913057afca 100644 --- a/infrastructure/helm-chart/charts/apps/charts/api-communication/templates/deployment.yaml +++ b/infrastructure/helm-chart/charts/apps/charts/api-communication/templates/deployment.yaml @@ -2,7 +2,7 @@ apiVersion: apps/v1 kind: Deployment metadata: name: api-communication - namespace: default + namespace: {{ .Values.global.namespace }} labels: app: api-communication type: api diff --git a/infrastructure/helm-chart/charts/apps/charts/api-communication/templates/service.yaml b/infrastructure/helm-chart/charts/apps/charts/api-communication/templates/service.yaml index 3fbf584c40..b8df88d951 100644 --- a/infrastructure/helm-chart/charts/apps/charts/api-communication/templates/service.yaml +++ b/infrastructure/helm-chart/charts/apps/charts/api-communication/templates/service.yaml @@ -2,7 +2,7 @@ apiVersion: v1 kind: Service metadata: name: api-communication - namespace: default + namespace: {{ .Values.global.namespace }} spec: ports: - port: 80 diff --git a/infrastructure/helm-chart/charts/apps/charts/frontend-chat-plugin/templates/deployment.yaml b/infrastructure/helm-chart/charts/apps/charts/frontend-chat-plugin/templates/deployment.yaml index 761ed3068d..50a59433ff 100644 --- a/infrastructure/helm-chart/charts/apps/charts/frontend-chat-plugin/templates/deployment.yaml +++ b/infrastructure/helm-chart/charts/apps/charts/frontend-chat-plugin/templates/deployment.yaml @@ -2,7 +2,7 @@ apiVersion: apps/v1 kind: Deployment metadata: name: frontend-chat-plugin - namespace: default + namespace: {{ .Values.global.namespace }} labels: app: frontend-chat-plugin type: frontend diff --git a/infrastructure/helm-chart/charts/apps/charts/frontend-chat-plugin/templates/service.yaml b/infrastructure/helm-chart/charts/apps/charts/frontend-chat-plugin/templates/service.yaml index eefddd6d37..98c9b4bd18 100644 --- a/infrastructure/helm-chart/charts/apps/charts/frontend-chat-plugin/templates/service.yaml +++ b/infrastructure/helm-chart/charts/apps/charts/frontend-chat-plugin/templates/service.yaml @@ -2,7 +2,7 @@ apiVersion: v1 kind: Service metadata: name: frontend-chat-plugin - namespace: default + namespace: {{ .Values.global.namespace }} spec: ports: - port: 80 diff --git a/infrastructure/helm-chart/charts/apps/charts/frontend-demo/templates/deployment.yaml b/infrastructure/helm-chart/charts/apps/charts/frontend-demo/templates/deployment.yaml index 0a7dab8c60..bec1b7c43a 100644 --- a/infrastructure/helm-chart/charts/apps/charts/frontend-demo/templates/deployment.yaml +++ b/infrastructure/helm-chart/charts/apps/charts/frontend-demo/templates/deployment.yaml @@ -2,7 +2,7 @@ apiVersion: apps/v1 kind: Deployment metadata: name: frontend-demo - namespace: default + namespace: {{ .Values.global.namespace }} labels: app: frontend-demo type: frontend diff --git a/infrastructure/helm-chart/charts/apps/charts/frontend-demo/templates/service.yaml b/infrastructure/helm-chart/charts/apps/charts/frontend-demo/templates/service.yaml index 4de67b111b..1cb5d63a43 100644 --- a/infrastructure/helm-chart/charts/apps/charts/frontend-demo/templates/service.yaml +++ b/infrastructure/helm-chart/charts/apps/charts/frontend-demo/templates/service.yaml @@ -2,7 +2,7 @@ apiVersion: v1 kind: Service metadata: name: frontend-demo - namespace: default + namespace: {{ .Values.global.namespace }} spec: ports: - port: 80 diff --git a/infrastructure/helm-chart/charts/apps/charts/sources-chatplugin/templates/deployment.yaml b/infrastructure/helm-chart/charts/apps/charts/sources-chatplugin/templates/deployment.yaml index e5f20fa4a3..e0aab7b08e 100644 --- a/infrastructure/helm-chart/charts/apps/charts/sources-chatplugin/templates/deployment.yaml +++ b/infrastructure/helm-chart/charts/apps/charts/sources-chatplugin/templates/deployment.yaml @@ -2,7 +2,7 @@ apiVersion: apps/v1 kind: Deployment metadata: name: sources-chatplugin - namespace: default + namespace: {{ .Values.global.namespace }} labels: app: sources-chatplugin type: sources-chatplugin @@ -26,6 +26,11 @@ spec: image: "{{ .Values.global.containerRegistry}}/{{ .Values.image }}:{{ .Values.global.appImageTag }}" imagePullPolicy: Always env: + - name: ALLOWED_ORIGINS + valueFrom: + configMapKeyRef: + name: api-config + key: ALLOWED_ORIGINS - name: JWT_SECRET valueFrom: configMapKeyRef: diff --git a/infrastructure/helm-chart/charts/apps/charts/sources-chatplugin/templates/service.yaml b/infrastructure/helm-chart/charts/apps/charts/sources-chatplugin/templates/service.yaml index b9e8a7e093..c58314d990 100644 --- a/infrastructure/helm-chart/charts/apps/charts/sources-chatplugin/templates/service.yaml +++ b/infrastructure/helm-chart/charts/apps/charts/sources-chatplugin/templates/service.yaml @@ -2,7 +2,7 @@ apiVersion: v1 kind: Service metadata: name: sources-chatplugin - namespace: default + namespace: {{ .Values.global.namespace }} spec: ports: - port: 80 diff --git a/infrastructure/helm-chart/charts/apps/charts/sources-facebook-connector/templates/deployment.yaml b/infrastructure/helm-chart/charts/apps/charts/sources-facebook-connector/templates/deployment.yaml index 4d7b9fb89d..57755fd259 100644 --- a/infrastructure/helm-chart/charts/apps/charts/sources-facebook-connector/templates/deployment.yaml +++ b/infrastructure/helm-chart/charts/apps/charts/sources-facebook-connector/templates/deployment.yaml @@ -2,7 +2,7 @@ apiVersion: apps/v1 kind: Deployment metadata: name: sources-facebook-connector - namespace: default + namespace: {{ .Values.global.namespace }} labels: app: sources-facebook-connector type: sources-facebook @@ -46,17 +46,17 @@ spec: - name: FACEBOOK_WEBHOOK_SECRET valueFrom: configMapKeyRef: - name: sources-config + name: sources-facebook key: FACEBOOK_WEBHOOK_SECRET - name: FACEBOOK_APP_ID valueFrom: configMapKeyRef: - name: sources-config + name: sources-facebook key: FACEBOOK_APP_ID - name: FACEBOOK_APP_SECRET valueFrom: configMapKeyRef: - name: sources-config + name: sources-facebook key: FACEBOOK_APP_SECRET - name: JWT_SECRET valueFrom: @@ -73,14 +73,14 @@ spec: command: - /bin/bash - -c - - /usr/local/bin/ngrok -config=/etc/ngrok/config.yml -log=stdout -subdomain="${WEBHOOK:8:13}" 8080 + - /usr/local/bin/ngrok -config=/etc/ngrok/config.yml -log=stdout -subdomain="fb-${CORE_ID}" 8080 image: ghcr.io/airyhq/infrastructure/ngrok-client:latest env: - - name: WEBHOOK + - name: CORE_ID valueFrom: configMapKeyRef: - name: sources-config - key: FACEBOOK_WEBHOOK_PUBLIC_URL + name: core-config + key: CORE_ID imagePullPolicy: Always resources: limits: diff --git a/infrastructure/helm-chart/charts/apps/charts/sources-facebook-connector/templates/service.yaml b/infrastructure/helm-chart/charts/apps/charts/sources-facebook-connector/templates/service.yaml index bee62bbdf5..e512d77dae 100644 --- a/infrastructure/helm-chart/charts/apps/charts/sources-facebook-connector/templates/service.yaml +++ b/infrastructure/helm-chart/charts/apps/charts/sources-facebook-connector/templates/service.yaml @@ -2,7 +2,7 @@ apiVersion: v1 kind: Service metadata: name: sources-facebook-connector - namespace: default + namespace: {{ .Values.global.namespace }} spec: ports: - port: 80 diff --git a/infrastructure/helm-chart/charts/apps/charts/sources-facebook-events-router/templates/deployment.yaml b/infrastructure/helm-chart/charts/apps/charts/sources-facebook-events-router/templates/deployment.yaml index fc94828ac7..4e7356cdef 100644 --- a/infrastructure/helm-chart/charts/apps/charts/sources-facebook-events-router/templates/deployment.yaml +++ b/infrastructure/helm-chart/charts/apps/charts/sources-facebook-events-router/templates/deployment.yaml @@ -2,7 +2,7 @@ apiVersion: apps/v1 kind: Deployment metadata: name: sources-facebook-events-router - namespace: default + namespace: {{ .Values.global.namespace }} labels: app: sources-facebook-events-router type: sources-facebook @@ -44,7 +44,7 @@ spec: - name: FACEBOOK_APP_ID valueFrom: configMapKeyRef: - name: sources-config + name: sources-facebook key: FACEBOOK_APP_ID - name: SERVICE_NAME value: facebook-events-router diff --git a/infrastructure/helm-chart/charts/apps/charts/sources-google-connector/templates/deployment.yaml b/infrastructure/helm-chart/charts/apps/charts/sources-google-connector/templates/deployment.yaml index e65e33fa47..9681372125 100644 --- a/infrastructure/helm-chart/charts/apps/charts/sources-google-connector/templates/deployment.yaml +++ b/infrastructure/helm-chart/charts/apps/charts/sources-google-connector/templates/deployment.yaml @@ -2,7 +2,7 @@ apiVersion: apps/v1 kind: Deployment metadata: name: sources-google-connector - namespace: default + namespace: {{ .Values.global.namespace }} labels: app: sources-google-connector type: sources-google @@ -44,12 +44,12 @@ spec: - name: GOOGLE_SA_FILE valueFrom: configMapKeyRef: - name: sources-config + name: sources-google key: GOOGLE_SA_FILE - name: GOOGLE_PARTNER_KEY valueFrom: configMapKeyRef: - name: sources-config + name: sources-google key: GOOGLE_PARTNER_KEY - name: JWT_SECRET valueFrom: @@ -66,14 +66,14 @@ spec: command: - /bin/bash - -c - - /usr/local/bin/ngrok -config=/etc/ngrok/config.yml -log=stdout -subdomain="${WEBHOOK:8:13}" 8080 + - /usr/local/bin/ngrok -config=/etc/ngrok/config.yml -log=stdout -subdomain="gl-${CORE_ID}" 8080 image: ghcr.io/airyhq/infrastructure/ngrok-client:latest env: - - name: WEBHOOK + - name: CORE_ID valueFrom: configMapKeyRef: - name: sources-config - key: GOOGLE_WEBHOOK_PUBLIC_URL + name: core-config + key: CORE_ID imagePullPolicy: Always resources: limits: diff --git a/infrastructure/helm-chart/charts/apps/charts/sources-google-connector/templates/service.yaml b/infrastructure/helm-chart/charts/apps/charts/sources-google-connector/templates/service.yaml index 8096a94ce7..00810efb8a 100644 --- a/infrastructure/helm-chart/charts/apps/charts/sources-google-connector/templates/service.yaml +++ b/infrastructure/helm-chart/charts/apps/charts/sources-google-connector/templates/service.yaml @@ -2,7 +2,7 @@ apiVersion: v1 kind: Service metadata: name: sources-google-connector - namespace: default + namespace: {{ .Values.global.namespace }} spec: ports: - port: 80 diff --git a/infrastructure/helm-chart/charts/apps/charts/sources-google-events-router/templates/deployment.yaml b/infrastructure/helm-chart/charts/apps/charts/sources-google-events-router/templates/deployment.yaml index 60135e2c3f..bf366ca3c3 100644 --- a/infrastructure/helm-chart/charts/apps/charts/sources-google-events-router/templates/deployment.yaml +++ b/infrastructure/helm-chart/charts/apps/charts/sources-google-events-router/templates/deployment.yaml @@ -2,7 +2,7 @@ apiVersion: apps/v1 kind: Deployment metadata: name: sources-google-events-router - namespace: default + namespace: {{ .Values.global.namespace }} labels: app: sources-google-events-router type: sources-google diff --git a/infrastructure/helm-chart/charts/apps/charts/sources-twilio-connector/templates/deployment.yaml b/infrastructure/helm-chart/charts/apps/charts/sources-twilio-connector/templates/deployment.yaml index 8f84b9ad2d..807a4fa113 100644 --- a/infrastructure/helm-chart/charts/apps/charts/sources-twilio-connector/templates/deployment.yaml +++ b/infrastructure/helm-chart/charts/apps/charts/sources-twilio-connector/templates/deployment.yaml @@ -2,7 +2,7 @@ apiVersion: apps/v1 kind: Deployment metadata: name: sources-twilio-connector - namespace: default + namespace: {{ .Values.global.namespace }} labels: app: sources-twilio-connector type: sources-twilio @@ -44,12 +44,12 @@ spec: - name: TWILIO_AUTH_TOKEN valueFrom: configMapKeyRef: - name: sources-config + name: sources-twilio key: TWILIO_AUTH_TOKEN - name: TWILIO_ACCOUNT_SID valueFrom: configMapKeyRef: - name: sources-config + name: sources-twilio key: TWILIO_ACCOUNT_SID - name: JWT_SECRET valueFrom: @@ -66,14 +66,14 @@ spec: command: - /bin/bash - -c - - /usr/local/bin/ngrok -config=/etc/ngrok/config.yml -log=stdout -subdomain="${WEBHOOK:8:13}" 8080 + - /usr/local/bin/ngrok -config=/etc/ngrok/config.yml -log=stdout -subdomain="tw-${CORE_ID}" 8080 image: ghcr.io/airyhq/infrastructure/ngrok-client:latest env: - - name: WEBHOOK + - name: CORE_ID valueFrom: configMapKeyRef: - name: sources-config - key: TWILIO_WEBHOOK_PUBLIC_URL + name: core-config + key: CORE_ID imagePullPolicy: Always resources: limits: diff --git a/infrastructure/helm-chart/charts/apps/charts/sources-twilio-connector/templates/service.yaml b/infrastructure/helm-chart/charts/apps/charts/sources-twilio-connector/templates/service.yaml index 42b8d47bfc..e90b58e8be 100644 --- a/infrastructure/helm-chart/charts/apps/charts/sources-twilio-connector/templates/service.yaml +++ b/infrastructure/helm-chart/charts/apps/charts/sources-twilio-connector/templates/service.yaml @@ -2,7 +2,7 @@ apiVersion: v1 kind: Service metadata: name: sources-twilio-connector - namespace: default + namespace: {{ .Values.global.namespace }} spec: ports: - port: 80 diff --git a/infrastructure/helm-chart/charts/apps/charts/sources-twilio-events-router/templates/deployment.yaml b/infrastructure/helm-chart/charts/apps/charts/sources-twilio-events-router/templates/deployment.yaml index 5ce113e79c..ad099f29c4 100644 --- a/infrastructure/helm-chart/charts/apps/charts/sources-twilio-events-router/templates/deployment.yaml +++ b/infrastructure/helm-chart/charts/apps/charts/sources-twilio-events-router/templates/deployment.yaml @@ -2,7 +2,7 @@ apiVersion: apps/v1 kind: Deployment metadata: name: sources-twilio-events-router - namespace: default + namespace: {{ .Values.global.namespace }} labels: app: sources-twilio-events-router type: sources-twilio diff --git a/infrastructure/helm-chart/charts/apps/charts/webhook-consumer/templates/deployment.yaml b/infrastructure/helm-chart/charts/apps/charts/webhook-consumer/templates/deployment.yaml index dabd5cee6f..53a468057b 100644 --- a/infrastructure/helm-chart/charts/apps/charts/webhook-consumer/templates/deployment.yaml +++ b/infrastructure/helm-chart/charts/apps/charts/webhook-consumer/templates/deployment.yaml @@ -2,7 +2,7 @@ apiVersion: apps/v1 kind: Deployment metadata: name: webhook-consumer - namespace: default + namespace: {{ .Values.global.namespace }} labels: app: webhook-consumer type: webhook diff --git a/infrastructure/helm-chart/charts/apps/charts/webhook-consumer/templates/service.yaml b/infrastructure/helm-chart/charts/apps/charts/webhook-consumer/templates/service.yaml index 5ae719d71e..4cdb451059 100644 --- a/infrastructure/helm-chart/charts/apps/charts/webhook-consumer/templates/service.yaml +++ b/infrastructure/helm-chart/charts/apps/charts/webhook-consumer/templates/service.yaml @@ -2,7 +2,7 @@ apiVersion: v1 kind: Service metadata: name: webhook-consumer - namespace: default + namespace: {{ .Values.global.namespace }} spec: ports: - port: 80 diff --git a/infrastructure/helm-chart/charts/apps/charts/webhook-publisher/templates/deployment.yaml b/infrastructure/helm-chart/charts/apps/charts/webhook-publisher/templates/deployment.yaml index 95f4ff7c43..d19f5e3069 100644 --- a/infrastructure/helm-chart/charts/apps/charts/webhook-publisher/templates/deployment.yaml +++ b/infrastructure/helm-chart/charts/apps/charts/webhook-publisher/templates/deployment.yaml @@ -2,7 +2,7 @@ apiVersion: apps/v1 kind: Deployment metadata: name: webhook-publisher - namespace: default + namespace: {{ .Values.global.namespace }} labels: app: webhook-publisher type: webhook diff --git a/infrastructure/helm-chart/charts/apps/charts/webhook-publisher/templates/service.yaml b/infrastructure/helm-chart/charts/apps/charts/webhook-publisher/templates/service.yaml index 2f27e5d5e3..3141ddadac 100644 --- a/infrastructure/helm-chart/charts/apps/charts/webhook-publisher/templates/service.yaml +++ b/infrastructure/helm-chart/charts/apps/charts/webhook-publisher/templates/service.yaml @@ -2,7 +2,7 @@ apiVersion: v1 kind: Service metadata: name: webhook-publisher - namespace: default + namespace: {{ .Values.global.namespace }} spec: ports: - port: 80 diff --git a/infrastructure/helm-chart/charts/apps/values.yaml b/infrastructure/helm-chart/charts/apps/values.yaml deleted file mode 100644 index 5dc5e19423..0000000000 --- a/infrastructure/helm-chart/charts/apps/values.yaml +++ /dev/null @@ -1,3 +0,0 @@ -global: - appImageTag: latest - containerRegistry: ghcr.io/airyhq diff --git a/infrastructure/helm-chart/charts/controller/Chart.yaml b/infrastructure/helm-chart/charts/controller/Chart.yaml new file mode 100644 index 0000000000..8b64198d30 --- /dev/null +++ b/infrastructure/helm-chart/charts/controller/Chart.yaml @@ -0,0 +1,5 @@ +apiVersion: v1 +appVersion: "1.0" +description: A Helm chart for Airy Platform Kubernetes controller +name: controller +version: 0.1.0 \ No newline at end of file diff --git a/infrastructure/helm-chart/charts/controller/templates/deployment.yaml b/infrastructure/helm-chart/charts/controller/templates/deployment.yaml new file mode 100644 index 0000000000..cbceda4924 --- /dev/null +++ b/infrastructure/helm-chart/charts/controller/templates/deployment.yaml @@ -0,0 +1,28 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: airy-controller + namespace: {{ .Values.global.namespace }} + labels: + app: airy-controller +spec: + replicas: 0 + selector: + matchLabels: + app: airy-controller + strategy: + rollingUpdate: + maxSurge: 1 + maxUnavailable: 1 + type: RollingUpdate + template: + metadata: + labels: + app: airy-controller + spec: + serviceAccountName: airy-controller + automountServiceAccountToken: true + containers: + - name: app + image: "{{ .Values.global.containerRegistry}}/{{ .Values.image }}:{{ .Values.global.appImageTag }}" + imagePullPolicy: Always diff --git a/infrastructure/helm-chart/charts/controller/templates/serviceAccount.yaml b/infrastructure/helm-chart/charts/controller/templates/serviceAccount.yaml new file mode 100644 index 0000000000..64aa249cb5 --- /dev/null +++ b/infrastructure/helm-chart/charts/controller/templates/serviceAccount.yaml @@ -0,0 +1,33 @@ +apiVersion: v1 +kind: ServiceAccount +metadata: + name: airy-controller + namespace: {{ .Values.global.namespace }} +automountServiceAccountToken: true +--- +kind: ClusterRole +apiVersion: rbac.authorization.k8s.io/v1 +metadata: + name: airy-controller + namespace: {{ .Values.global.namespace }} +rules: +- apiGroups: [""] + resources: ["pods", "configmaps", "services"] + verbs: ["create", "get", "watch", "update", "list", "patch", "delete"] +- apiGroups: ["extensions", "apps"] + resources: ["deployments"] + verbs: ["get", "list", "watch", "create", "update", "patch", "delete"] +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRoleBinding +metadata: + name: airy-controller + namespace: {{ .Values.global.namespace }} +subjects: + - kind: ServiceAccount + name: airy-controller + namespace: {{ .Values.global.namespace }} +roleRef: + kind: ClusterRole + name: airy-controller + apiGroup: rbac.authorization.k8s.io diff --git a/infrastructure/helm-chart/charts/controller/values.yaml b/infrastructure/helm-chart/charts/controller/values.yaml new file mode 100644 index 0000000000..cf92fd922b --- /dev/null +++ b/infrastructure/helm-chart/charts/controller/values.yaml @@ -0,0 +1 @@ +image: infrastructure/controller diff --git a/infrastructure/helm-chart/charts/kafka/charts/cp-kafka/cp-kafka/.helmignore b/infrastructure/helm-chart/charts/kafka/charts/cp-kafka/cp-kafka/.helmignore deleted file mode 100644 index 0e8a0eb36f..0000000000 --- a/infrastructure/helm-chart/charts/kafka/charts/cp-kafka/cp-kafka/.helmignore +++ /dev/null @@ -1,23 +0,0 @@ -# Patterns to ignore when building packages. -# This supports shell glob matching, relative path matching, and -# negation (prefixed with !). Only one pattern per line. -.DS_Store -# Common VCS dirs -.git/ -.gitignore -.bzr/ -.bzrignore -.hg/ -.hgignore -.svn/ -# Common backup files -*.swp -*.bak -*.tmp -*.orig -*~ -# Various IDEs -.project -.idea/ -*.tmproj -.vscode/ diff --git a/infrastructure/helm-chart/charts/kafka/charts/cp-kafka/cp-kafka/Chart.yaml b/infrastructure/helm-chart/charts/kafka/charts/cp-kafka/cp-kafka/Chart.yaml deleted file mode 100644 index 1d15fffdb4..0000000000 --- a/infrastructure/helm-chart/charts/kafka/charts/cp-kafka/cp-kafka/Chart.yaml +++ /dev/null @@ -1,23 +0,0 @@ -apiVersion: v2 -name: cp-kafka -description: A Helm chart for Kubernetes - -# A chart can be either an 'application' or a 'library' chart. -# -# Application charts are a collection of templates that can be packaged into versioned archives -# to be deployed. -# -# Library charts provide useful utilities or functions for the chart developer. They're included as -# a dependency of application charts to inject those utilities and functions into the rendering -# pipeline. Library charts do not define any templates and therefore cannot be deployed. -type: application - -# This is the chart version. This version number should be incremented each time you make changes -# to the chart and its templates, including the app version. -# Versions are expected to follow Semantic Versioning (https://semver.org/) -version: 0.1.0 - -# This is the version number of the application being deployed. This version number should be -# incremented each time you make changes to the application. Versions are not expected to -# follow Semantic Versioning. They should reflect the version the application is using. -appVersion: 1.16.0 diff --git a/infrastructure/helm-chart/charts/kafka/charts/cp-kafka/cp-kafka/templates/NOTES.txt b/infrastructure/helm-chart/charts/kafka/charts/cp-kafka/cp-kafka/templates/NOTES.txt deleted file mode 100644 index 29109b030e..0000000000 --- a/infrastructure/helm-chart/charts/kafka/charts/cp-kafka/cp-kafka/templates/NOTES.txt +++ /dev/null @@ -1,21 +0,0 @@ -1. Get the application URL by running these commands: -{{- if .Values.ingress.enabled }} -{{- range $host := .Values.ingress.hosts }} - {{- range .paths }} - http{{ if $.Values.ingress.tls }}s{{ end }}://{{ $host.host }}{{ . }} - {{- end }} -{{- end }} -{{- else if contains "NodePort" .Values.service.type }} - export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ include "cp-kafka.fullname" . }}) - export NODE_IP=$(kubectl get nodes --namespace {{ .Release.Namespace }} -o jsonpath="{.items[0].status.addresses[0].address}") - echo http://$NODE_IP:$NODE_PORT -{{- else if contains "LoadBalancer" .Values.service.type }} - NOTE: It may take a few minutes for the LoadBalancer IP to be available. - You can watch the status of by running 'kubectl get --namespace {{ .Release.Namespace }} svc -w {{ include "cp-kafka.fullname" . }}' - export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ include "cp-kafka.fullname" . }} --template "{{"{{ range (index .status.loadBalancer.ingress 0) }}{{.}}{{ end }}"}}") - echo http://$SERVICE_IP:{{ .Values.service.port }} -{{- else if contains "ClusterIP" .Values.service.type }} - export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app.kubernetes.io/name={{ include "cp-kafka.name" . }},app.kubernetes.io/instance={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}") - echo "Visit http://127.0.0.1:8080 to use your application" - kubectl --namespace {{ .Release.Namespace }} port-forward $POD_NAME 8080:80 -{{- end }} diff --git a/infrastructure/helm-chart/charts/kafka/charts/cp-kafka/cp-kafka/templates/_helpers.tpl b/infrastructure/helm-chart/charts/kafka/charts/cp-kafka/cp-kafka/templates/_helpers.tpl deleted file mode 100644 index d512245770..0000000000 --- a/infrastructure/helm-chart/charts/kafka/charts/cp-kafka/cp-kafka/templates/_helpers.tpl +++ /dev/null @@ -1,62 +0,0 @@ -{{/* -Expand the name of the chart. -*/}} -{{- define "cp-kafka.name" -}} -{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }} -{{- end }} - -{{/* -Create a default fully qualified app name. -We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). -If release name contains chart name it will be used as a full name. -*/}} -{{- define "cp-kafka.fullname" -}} -{{- if .Values.fullnameOverride }} -{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" }} -{{- else }} -{{- $name := default .Chart.Name .Values.nameOverride }} -{{- if contains $name .Release.Name }} -{{- .Release.Name | trunc 63 | trimSuffix "-" }} -{{- else }} -{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" }} -{{- end }} -{{- end }} -{{- end }} - -{{/* -Create chart name and version as used by the chart label. -*/}} -{{- define "cp-kafka.chart" -}} -{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }} -{{- end }} - -{{/* -Common labels -*/}} -{{- define "cp-kafka.labels" -}} -helm.sh/chart: {{ include "cp-kafka.chart" . }} -{{ include "cp-kafka.selectorLabels" . }} -{{- if .Chart.AppVersion }} -app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} -{{- end }} -app.kubernetes.io/managed-by: {{ .Release.Service }} -{{- end }} - -{{/* -Selector labels -*/}} -{{- define "cp-kafka.selectorLabels" -}} -app.kubernetes.io/name: {{ include "cp-kafka.name" . }} -app.kubernetes.io/instance: {{ .Release.Name }} -{{- end }} - -{{/* -Create the name of the service account to use -*/}} -{{- define "cp-kafka.serviceAccountName" -}} -{{- if .Values.serviceAccount.create }} -{{- default (include "cp-kafka.fullname" .) .Values.serviceAccount.name }} -{{- else }} -{{- default "default" .Values.serviceAccount.name }} -{{- end }} -{{- end }} diff --git a/infrastructure/helm-chart/charts/kafka/charts/cp-kafka/cp-kafka/templates/deployment.yaml b/infrastructure/helm-chart/charts/kafka/charts/cp-kafka/cp-kafka/templates/deployment.yaml deleted file mode 100644 index a38f4f2379..0000000000 --- a/infrastructure/helm-chart/charts/kafka/charts/cp-kafka/cp-kafka/templates/deployment.yaml +++ /dev/null @@ -1,61 +0,0 @@ -apiVersion: apps/v1 -kind: Deployment -metadata: - name: {{ include "cp-kafka.fullname" . }} - labels: - {{- include "cp-kafka.labels" . | nindent 4 }} -spec: -{{- if not .Values.autoscaling.enabled }} - replicas: {{ .Values.replicaCount }} -{{- end }} - selector: - matchLabels: - {{- include "cp-kafka.selectorLabels" . | nindent 6 }} - template: - metadata: - {{- with .Values.podAnnotations }} - annotations: - {{- toYaml . | nindent 8 }} - {{- end }} - labels: - {{- include "cp-kafka.selectorLabels" . | nindent 8 }} - spec: - {{- with .Values.imagePullSecrets }} - imagePullSecrets: - {{- toYaml . | nindent 8 }} - {{- end }} - serviceAccountName: {{ include "cp-kafka.serviceAccountName" . }} - securityContext: - {{- toYaml .Values.podSecurityContext | nindent 8 }} - containers: - - name: {{ .Chart.Name }} - securityContext: - {{- toYaml .Values.securityContext | nindent 12 }} - image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}" - imagePullPolicy: {{ .Values.image.pullPolicy }} - ports: - - name: http - containerPort: 80 - protocol: TCP - livenessProbe: - httpGet: - path: / - port: http - readinessProbe: - httpGet: - path: / - port: http - resources: - {{- toYaml .Values.resources | nindent 12 }} - {{- with .Values.nodeSelector }} - nodeSelector: - {{- toYaml . | nindent 8 }} - {{- end }} - {{- with .Values.affinity }} - affinity: - {{- toYaml . | nindent 8 }} - {{- end }} - {{- with .Values.tolerations }} - tolerations: - {{- toYaml . | nindent 8 }} - {{- end }} diff --git a/infrastructure/helm-chart/charts/kafka/charts/cp-kafka/cp-kafka/templates/hpa.yaml b/infrastructure/helm-chart/charts/kafka/charts/cp-kafka/cp-kafka/templates/hpa.yaml deleted file mode 100644 index 80a4ea9a38..0000000000 --- a/infrastructure/helm-chart/charts/kafka/charts/cp-kafka/cp-kafka/templates/hpa.yaml +++ /dev/null @@ -1,28 +0,0 @@ -{{- if .Values.autoscaling.enabled }} -apiVersion: autoscaling/v2beta1 -kind: HorizontalPodAutoscaler -metadata: - name: {{ include "cp-kafka.fullname" . }} - labels: - {{- include "cp-kafka.labels" . | nindent 4 }} -spec: - scaleTargetRef: - apiVersion: apps/v1 - kind: Deployment - name: {{ include "cp-kafka.fullname" . }} - minReplicas: {{ .Values.autoscaling.minReplicas }} - maxReplicas: {{ .Values.autoscaling.maxReplicas }} - metrics: - {{- if .Values.autoscaling.targetCPUUtilizationPercentage }} - - type: Resource - resource: - name: cpu - targetAverageUtilization: {{ .Values.autoscaling.targetCPUUtilizationPercentage }} - {{- end }} - {{- if .Values.autoscaling.targetMemoryUtilizationPercentage }} - - type: Resource - resource: - name: memory - targetAverageUtilization: {{ .Values.autoscaling.targetMemoryUtilizationPercentage }} - {{- end }} -{{- end }} diff --git a/infrastructure/helm-chart/charts/kafka/charts/cp-kafka/cp-kafka/templates/ingress.yaml b/infrastructure/helm-chart/charts/kafka/charts/cp-kafka/cp-kafka/templates/ingress.yaml deleted file mode 100644 index 7dea41f3e4..0000000000 --- a/infrastructure/helm-chart/charts/kafka/charts/cp-kafka/cp-kafka/templates/ingress.yaml +++ /dev/null @@ -1,41 +0,0 @@ -{{- if .Values.ingress.enabled -}} -{{- $fullName := include "cp-kafka.fullname" . -}} -{{- $svcPort := .Values.service.port -}} -{{- if semverCompare ">=1.14-0" .Capabilities.KubeVersion.GitVersion -}} -apiVersion: networking.k8s.io/v1beta1 -{{- else -}} -apiVersion: extensions/v1beta1 -{{- end }} -kind: Ingress -metadata: - name: {{ $fullName }} - labels: - {{- include "cp-kafka.labels" . | nindent 4 }} - {{- with .Values.ingress.annotations }} - annotations: - {{- toYaml . | nindent 4 }} - {{- end }} -spec: - {{- if .Values.ingress.tls }} - tls: - {{- range .Values.ingress.tls }} - - hosts: - {{- range .hosts }} - - {{ . | quote }} - {{- end }} - secretName: {{ .secretName }} - {{- end }} - {{- end }} - rules: - {{- range .Values.ingress.hosts }} - - host: {{ .host | quote }} - http: - paths: - {{- range .paths }} - - path: {{ . }} - backend: - serviceName: {{ $fullName }} - servicePort: {{ $svcPort }} - {{- end }} - {{- end }} - {{- end }} diff --git a/infrastructure/helm-chart/charts/kafka/charts/cp-kafka/cp-kafka/templates/service.yaml b/infrastructure/helm-chart/charts/kafka/charts/cp-kafka/cp-kafka/templates/service.yaml deleted file mode 100644 index fb5a9d1e71..0000000000 --- a/infrastructure/helm-chart/charts/kafka/charts/cp-kafka/cp-kafka/templates/service.yaml +++ /dev/null @@ -1,15 +0,0 @@ -apiVersion: v1 -kind: Service -metadata: - name: {{ include "cp-kafka.fullname" . }} - labels: - {{- include "cp-kafka.labels" . | nindent 4 }} -spec: - type: {{ .Values.service.type }} - ports: - - port: {{ .Values.service.port }} - targetPort: http - protocol: TCP - name: http - selector: - {{- include "cp-kafka.selectorLabels" . | nindent 4 }} diff --git a/infrastructure/helm-chart/charts/kafka/charts/cp-kafka/cp-kafka/templates/serviceaccount.yaml b/infrastructure/helm-chart/charts/kafka/charts/cp-kafka/cp-kafka/templates/serviceaccount.yaml deleted file mode 100644 index 226f422a5c..0000000000 --- a/infrastructure/helm-chart/charts/kafka/charts/cp-kafka/cp-kafka/templates/serviceaccount.yaml +++ /dev/null @@ -1,12 +0,0 @@ -{{- if .Values.serviceAccount.create -}} -apiVersion: v1 -kind: ServiceAccount -metadata: - name: {{ include "cp-kafka.serviceAccountName" . }} - labels: - {{- include "cp-kafka.labels" . | nindent 4 }} - {{- with .Values.serviceAccount.annotations }} - annotations: - {{- toYaml . | nindent 4 }} - {{- end }} -{{- end }} diff --git a/infrastructure/helm-chart/charts/kafka/charts/cp-kafka/cp-kafka/templates/tests/test-connection.yaml b/infrastructure/helm-chart/charts/kafka/charts/cp-kafka/cp-kafka/templates/tests/test-connection.yaml deleted file mode 100644 index 31e9540e56..0000000000 --- a/infrastructure/helm-chart/charts/kafka/charts/cp-kafka/cp-kafka/templates/tests/test-connection.yaml +++ /dev/null @@ -1,15 +0,0 @@ -apiVersion: v1 -kind: Pod -metadata: - name: "{{ include "cp-kafka.fullname" . }}-test-connection" - labels: - {{- include "cp-kafka.labels" . | nindent 4 }} - annotations: - "helm.sh/hook": test-success -spec: - containers: - - name: wget - image: busybox - command: ['wget'] - args: ['{{ include "cp-kafka.fullname" . }}:{{ .Values.service.port }}'] - restartPolicy: Never diff --git a/infrastructure/helm-chart/charts/kafka/charts/cp-kafka/cp-kafka/values.yaml b/infrastructure/helm-chart/charts/kafka/charts/cp-kafka/cp-kafka/values.yaml deleted file mode 100644 index 6bdd89ce43..0000000000 --- a/infrastructure/helm-chart/charts/kafka/charts/cp-kafka/cp-kafka/values.yaml +++ /dev/null @@ -1,79 +0,0 @@ -# Default values for cp-kafka. -# This is a YAML-formatted file. -# Declare variables to be passed into your templates. - -replicaCount: 1 - -image: - repository: nginx - pullPolicy: IfNotPresent - # Overrides the image tag whose default is the chart appVersion. - tag: "" - -imagePullSecrets: [] -nameOverride: "" -fullnameOverride: "" - -serviceAccount: - # Specifies whether a service account should be created - create: true - # Annotations to add to the service account - annotations: {} - # The name of the service account to use. - # If not set and create is true, a name is generated using the fullname template - name: "" - -podAnnotations: {} - -podSecurityContext: {} - # fsGroup: 2000 - -securityContext: {} - # capabilities: - # drop: - # - ALL - # readOnlyRootFilesystem: true - # runAsNonRoot: true - # runAsUser: 1000 - -service: - type: ClusterIP - port: 80 - -ingress: - enabled: false - annotations: {} - # kubernetes.io/ingress.class: nginx - # kubernetes.io/tls-acme: "true" - hosts: - - host: chart-example.local - paths: [] - tls: [] - # - secretName: chart-example-tls - # hosts: - # - chart-example.local - -resources: {} - # We usually recommend not to specify default resources and to leave this as a conscious - # choice for the user. This also increases chances charts run on environments with little - # resources, such as Minikube. If you do want to specify resources, uncomment the following - # lines, adjust them as necessary, and remove the curly braces after 'resources:'. - # limits: - # cpu: 100m - # memory: 128Mi - # requests: - # cpu: 100m - # memory: 128Mi - -autoscaling: - enabled: false - minReplicas: 1 - maxReplicas: 100 - targetCPUUtilizationPercentage: 80 - # targetMemoryUtilizationPercentage: 80 - -nodeSelector: {} - -tolerations: [] - -affinity: {} diff --git a/infrastructure/helm-chart/charts/kafka/charts/cp-schema-registry/Chart.yaml b/infrastructure/helm-chart/charts/kafka/charts/cp-schema-registry/Chart.yaml deleted file mode 100644 index b0d17649dd..0000000000 --- a/infrastructure/helm-chart/charts/kafka/charts/cp-schema-registry/Chart.yaml +++ /dev/null @@ -1,5 +0,0 @@ -apiVersion: v1 -appVersion: "1.0" -description: A Helm chart for Confluent Schema Registry on Kubernetes -name: cp-schema-registry -version: 0.1.0 \ No newline at end of file diff --git a/infrastructure/helm-chart/charts/kafka/charts/cp-schema-registry/templates/_helpers.tpl b/infrastructure/helm-chart/charts/kafka/charts/cp-schema-registry/templates/_helpers.tpl deleted file mode 100644 index 366095e3af..0000000000 --- a/infrastructure/helm-chart/charts/kafka/charts/cp-schema-registry/templates/_helpers.tpl +++ /dev/null @@ -1,64 +0,0 @@ -{{/* vim: set filetype=mustache: */}} -{{/* -Expand the name of the chart. -*/}} -{{- define "cp-schema-registry.name" -}} -{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}} -{{- end -}} - -{{/* -Create a default fully qualified app name. -We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). -If release name contains chart name it will be used as a full name. -*/}} -{{- define "cp-schema-registry.fullname" -}} -{{- if .Values.fullnameOverride -}} -{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}} -{{- else -}} -{{- $name := default .Chart.Name .Values.nameOverride -}} -{{- if contains $name .Release.Name -}} -{{- .Release.Name | trunc 63 | trimSuffix "-" -}} -{{- else -}} -{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}} -{{- end -}} -{{- end -}} -{{- end -}} - -{{/* -Create chart name and version as used by the chart label. -*/}} -{{- define "cp-schema-registry.chart" -}} -{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}} -{{- end -}} - -{{/* -Create a default fully qualified kafka headless name. -We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). -*/}} -{{- define "cp-kafka-rest.cp-kafka-headless.fullname" -}} -{{- $name := "cp-kafka-headless" -}} -{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}} -{{- end -}} - -{{/* -Form the Kafka URL. If Kafka is installed as part of this chart, use k8s service discovery, -else use user-provided URL -*/}} -{{- define "cp-schema-registry.kafka.bootstrapServers" -}} -{{- if .Values.kafka.bootstrapServers -}} -{{- .Values.kafka.bootstrapServers -}} -{{- else -}} -{{- printf "PLAINTEXT://%s:9092" (include "cp-kafka-rest.cp-kafka-headless.fullname" .) -}} -{{- end -}} -{{- end -}} - -{{/* -Default GroupId to Release Name but allow it to be overridden -*/}} -{{- define "cp-schema-registry.groupId" -}} -{{- if .Values.overrideGroupId -}} -{{- .Values.overrideGroupId -}} -{{- else -}} -{{- .Release.Name -}} -{{- end -}} -{{- end -}} \ No newline at end of file diff --git a/infrastructure/helm-chart/charts/kafka/charts/cp-schema-registry/templates/deployment.yaml b/infrastructure/helm-chart/charts/kafka/charts/cp-schema-registry/templates/deployment.yaml deleted file mode 100644 index 32f5493c71..0000000000 --- a/infrastructure/helm-chart/charts/kafka/charts/cp-schema-registry/templates/deployment.yaml +++ /dev/null @@ -1,76 +0,0 @@ -{{- if .Capabilities.APIVersions.Has "apps/v1" }} -apiVersion: apps/v1 -{{- else }} -apiVersion: apps/v1beta2 -{{- end }} -kind: Deployment -metadata: - name: {{ template "cp-schema-registry.fullname" . }} - labels: - app: {{ template "cp-schema-registry.name" . }} - chart: {{ template "cp-schema-registry.chart" . }} - release: {{ .Release.Name }} - heritage: {{ .Release.Service }} -spec: - replicas: {{ .Values.replicaCount }} - selector: - matchLabels: - app: {{ template "cp-schema-registry.name" . }} - release: {{ .Release.Name }} - template: - metadata: - labels: - app: {{ template "cp-schema-registry.name" . }} - release: {{ .Release.Name }} - spec: - containers: - - name: {{ template "cp-schema-registry.name" . }}-server - image: "{{ .Values.image }}:{{ .Values.imageTag }}" - imagePullPolicy: "{{ .Values.imagePullPolicy }}" - ports: - - name: schema-registry - containerPort: {{ .Values.servicePort }} - protocol: TCP - resources: -{{ toYaml .Values.resources | indent 12 }} - env: - - name: SCHEMA_REGISTRY_HOST_NAME - valueFrom: - fieldRef: - fieldPath: status.podIP - - name: SCHEMA_REGISTRY_LISTENERS - value: http://0.0.0.0:{{ .Values.servicePort }} - - name: SCHEMA_REGISTRY_KAFKASTORE_BOOTSTRAP_SERVERS - value: {{ template "cp-schema-registry.kafka.bootstrapServers" . }} - - name: SCHEMA_REGISTRY_KAFKASTORE_GROUP_ID - value: {{ template "cp-schema-registry.groupId" . }} - - name: SCHEMA_REGISTRY_MASTER_ELIGIBILITY - value: "true" - - name: SCHEMA_REGISTRY_HEAP_OPTS - value: "{{ .Values.heapOptions }}" - {{ range $configName, $configValue := .Values.configurationOverrides }} - - name: SCHEMA_REGISTRY_{{ $configName | replace "." "_" | upper }} - value: {{ $configValue | quote }} - {{ end }} - {{- range $key, $value := .Values.customEnv }} - - name: {{ $key | quote }} - value: {{ $value | quote }} - {{- end }} - {{- if .Values.schemaRegistryOpts }} - - name: SCHEMA_REGISTRY_OPTS - value: "{{ .Values.schemaRegistryOpts }}" - {{- end }} - {{- if .Values.imagePullSecrets }} - imagePullSecrets: -{{ toYaml .Values.imagePullSecrets | indent 8 }} - {{- end }} - volumes: - {{- if .Values.nodeSelector }} - nodeSelector: -{{ toYaml .Values.nodeSelector | indent 8 }} - {{- end }} - {{- if .Values.tolerations }} - tolerations: -{{ toYaml .Values.tolerations | indent 8 }} - {{- end }} - \ No newline at end of file diff --git a/infrastructure/helm-chart/charts/kafka/charts/cp-schema-registry/templates/service.yaml b/infrastructure/helm-chart/charts/kafka/charts/cp-schema-registry/templates/service.yaml deleted file mode 100644 index 38281a0917..0000000000 --- a/infrastructure/helm-chart/charts/kafka/charts/cp-schema-registry/templates/service.yaml +++ /dev/null @@ -1,16 +0,0 @@ -apiVersion: v1 -kind: Service -metadata: - name: {{ template "cp-schema-registry.fullname" . }} - labels: - app: {{ template "cp-schema-registry.name" . }} - chart: {{ template "cp-schema-registry.chart" . }} - release: {{ .Release.Name }} - heritage: {{ .Release.Service }} -spec: - ports: - - name: schema-registry - port: {{ .Values.servicePort }} - selector: - app: {{ template "cp-schema-registry.name" . }} - release: {{ .Release.Name }} diff --git a/infrastructure/helm-chart/charts/kafka/charts/cp-schema-registry/values.yaml b/infrastructure/helm-chart/charts/kafka/charts/cp-schema-registry/values.yaml deleted file mode 100644 index 1bffb4ebb7..0000000000 --- a/infrastructure/helm-chart/charts/kafka/charts/cp-schema-registry/values.yaml +++ /dev/null @@ -1,40 +0,0 @@ -replicaCount: 0 - -image: confluentinc/cp-schema-registry -imageTag: 5.5.0 - -imagePullPolicy: IfNotPresent - -imagePullSecrets: - -configurationOverrides: {} - -customEnv: {} - -servicePort: 8081 - -heapOptions: "-Xms512M -Xmx512M" - -kafka: - bootstrapServers: "" - -resources: {} - -podAnnotations: {} - -nodeSelector: {} - -tolerations: [] - -jmx: - port: 5555 - -prometheus: - jmx: - enabled: true - image: solsson/kafka-prometheus-jmx-exporter@sha256 - imageTag: 6f82e2b0464f50da8104acd7363fb9b995001ddff77d248379f8788e78946143 - imagePullPolicy: IfNotPresent - port: 5556 - - resources: {} diff --git a/infrastructure/helm-chart/charts/kafka/charts/cp-kafka/Chart.yaml b/infrastructure/helm-chart/charts/kafka/charts/kafka/Chart.yaml similarity index 87% rename from infrastructure/helm-chart/charts/kafka/charts/cp-kafka/Chart.yaml rename to infrastructure/helm-chart/charts/kafka/charts/kafka/Chart.yaml index 5615f92a25..97dd0664b3 100644 --- a/infrastructure/helm-chart/charts/kafka/charts/cp-kafka/Chart.yaml +++ b/infrastructure/helm-chart/charts/kafka/charts/kafka/Chart.yaml @@ -1,5 +1,5 @@ apiVersion: v1 appVersion: "1.0" description: A Helm chart for Confluent Kafka on Kubernetes -name: cp-kafka +name: kafka version: 0.1.0 diff --git a/infrastructure/helm-chart/charts/kafka/charts/cp-kafka/templates/_helpers.tpl b/infrastructure/helm-chart/charts/kafka/charts/kafka/templates/_helpers.tpl similarity index 90% rename from infrastructure/helm-chart/charts/kafka/charts/cp-kafka/templates/_helpers.tpl rename to infrastructure/helm-chart/charts/kafka/charts/kafka/templates/_helpers.tpl index c163ce90b2..1d89a598b5 100644 --- a/infrastructure/helm-chart/charts/kafka/charts/cp-kafka/templates/_helpers.tpl +++ b/infrastructure/helm-chart/charts/kafka/charts/kafka/templates/_helpers.tpl @@ -19,7 +19,7 @@ If release name contains chart name it will be used as a full name. {{- if contains $name .Release.Name -}} {{- .Release.Name | trunc 63 | trimSuffix "-" -}} {{- else -}} -{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}} +{{- printf "%s" $name | trunc 63 | trimSuffix "-" -}} {{- end -}} {{- end -}} {{- end -}} @@ -36,8 +36,8 @@ Create a default fully qualified zookeeper name. We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). */}} {{- define "cp-kafka.cp-zookeeper.fullname" -}} -{{- $name := default "cp-zookeeper" (index .Values "cp-zookeeper" "nameOverride") -}} -{{- printf "%s-%s-headless" .Release.Name $name | trunc 63 | trimSuffix "-" -}} +{{- $name := default "zookeeper" (index .Values "cp-zookeeper" "nameOverride") -}} +{{- printf "%s-headless" $name | trunc 63 | trimSuffix "-" -}} {{- end -}} {{/* @@ -73,7 +73,7 @@ We truncate at 63 chars because some Kubernetes name fields are limited to this */}} {{- define "cp-kafka.cp-kafka-headless.fullname" -}} {{- $name := "cp-kafka-headless" -}} -{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}} +{{- printf "%s" $name | trunc 63 | trimSuffix "-" -}} {{- end -}} {{/* diff --git a/infrastructure/helm-chart/charts/kafka/charts/cp-kafka/templates/headless-service.yaml b/infrastructure/helm-chart/charts/kafka/charts/kafka/templates/headless-service.yaml similarity index 90% rename from infrastructure/helm-chart/charts/kafka/charts/cp-kafka/templates/headless-service.yaml rename to infrastructure/helm-chart/charts/kafka/charts/kafka/templates/headless-service.yaml index 3538042b65..afc113e0fe 100644 --- a/infrastructure/helm-chart/charts/kafka/charts/cp-kafka/templates/headless-service.yaml +++ b/infrastructure/helm-chart/charts/kafka/charts/kafka/templates/headless-service.yaml @@ -2,6 +2,7 @@ apiVersion: v1 kind: Service metadata: name: {{ template "cp-kafka.fullname" . }}-headless + namespace: {{ .Values.global.namespace }} labels: app: {{ template "cp-kafka.name" . }} chart: {{ template "cp-kafka.chart" . }} diff --git a/infrastructure/helm-chart/charts/kafka/charts/cp-kafka/templates/nodeport-service.yaml b/infrastructure/helm-chart/charts/kafka/charts/kafka/templates/nodeport-service.yaml similarity index 89% rename from infrastructure/helm-chart/charts/kafka/charts/cp-kafka/templates/nodeport-service.yaml rename to infrastructure/helm-chart/charts/kafka/charts/kafka/templates/nodeport-service.yaml index 09fdf1e2a1..6c439b8270 100644 --- a/infrastructure/helm-chart/charts/kafka/charts/cp-kafka/templates/nodeport-service.yaml +++ b/infrastructure/helm-chart/charts/kafka/charts/kafka/templates/nodeport-service.yaml @@ -10,7 +10,8 @@ apiVersion: v1 kind: Service metadata: - name: {{ template "cp-kafka.fullname" $root }}-{{ $i }}-nodeport + name: "{{ template "cp-kafka.fullname" $root }}-{{ $i }}-nodeport" + namespace: {{ $root.Values.global.namespace }} labels: app: {{ include "cp-kafka.name" $root }} chart: {{ template "cp-kafka.chart" $root }} diff --git a/infrastructure/helm-chart/charts/kafka/charts/cp-kafka/templates/service.yaml b/infrastructure/helm-chart/charts/kafka/charts/kafka/templates/service.yaml similarity index 89% rename from infrastructure/helm-chart/charts/kafka/charts/cp-kafka/templates/service.yaml rename to infrastructure/helm-chart/charts/kafka/charts/kafka/templates/service.yaml index 4f72edc505..addfb0bee8 100644 --- a/infrastructure/helm-chart/charts/kafka/charts/cp-kafka/templates/service.yaml +++ b/infrastructure/helm-chart/charts/kafka/charts/kafka/templates/service.yaml @@ -2,6 +2,7 @@ apiVersion: v1 kind: Service metadata: name: {{ template "cp-kafka.fullname" . }} + namespace: {{ .Values.global.namespace }} labels: app: {{ template "cp-kafka.name" . }} chart: {{ template "cp-kafka.chart" . }} diff --git a/infrastructure/helm-chart/charts/kafka/charts/cp-kafka/templates/statefulset.yaml b/infrastructure/helm-chart/charts/kafka/charts/kafka/templates/statefulset.yaml similarity index 77% rename from infrastructure/helm-chart/charts/kafka/charts/cp-kafka/templates/statefulset.yaml rename to infrastructure/helm-chart/charts/kafka/charts/kafka/templates/statefulset.yaml index c4f5144c9e..fdb3093036 100644 --- a/infrastructure/helm-chart/charts/kafka/charts/cp-kafka/templates/statefulset.yaml +++ b/infrastructure/helm-chart/charts/kafka/charts/kafka/templates/statefulset.yaml @@ -6,6 +6,7 @@ apiVersion: apps/v1beta1 kind: StatefulSet metadata: name: {{ template "cp-kafka.fullname" . }} + namespace: {{ .Values.global.namespace }} labels: app: {{ template "cp-kafka.name" . }} chart: {{ template "cp-kafka.chart" . }} @@ -79,35 +80,21 @@ spec: valueFrom: fieldRef: fieldPath: metadata.namespace + - name: AIRY_LISTENERS + value: PLAINTEXT://0.0.0.0:9092,EXTERNAL://0.0.0.0:AIRY_BROKER_PORT + - name: AIRY_ADVERTISED_LISTENERS + value: PLAINTEXT://AIRY_POD_NAME.{{ template "cp-kafka.fullname" . }}-headless.AIRY_NAMESPACE:9092,EXTERNAL://AIRY_HOST_IP:AIRY_BROKER_PORT + - name: AIRY_FIRST_LISTENER_PORT + value: "{{ .Values.firstListenerPort }}" - name: KAFKA_HEAP_OPTS value: {{ .Values.heapOptions }} - name: KAFKA_ZOOKEEPER_CONNECT value: {{ include "cp-kafka.cp-zookeeper.service-name" . | quote }} - - name: KAFKA_LOG_DIRS - value: {{ include "cp-kafka.log.dirs" . | quote }} - - name: KAFKA_METRIC_REPORTERS - value: "io.confluent.metrics.reporter.ConfluentMetricsReporter" - - name: CONFLUENT_METRICS_REPORTER_BOOTSTRAP_SERVERS - value: {{ printf "PLAINTEXT://%s:9092" (include "cp-kafka.cp-kafka-headless.fullname" .) | quote }} {{- range $key, $value := .Values.configurationOverrides }} - name: {{ printf "KAFKA_%s" $key | replace "." "_" | upper | quote }} value: {{ $value | quote }} {{- end }} - {{- range $key, $value := .Values.customEnv }} - - name: {{ $key | quote }} - value: {{ $value | quote }} - {{- end }} - # This is required because the Downward API does not yet support identification of - # pod numbering in statefulsets. Thus, we are required to specify a command which - # allows us to extract the pod ID for usage as the Kafka Broker ID. - # See: https://github.com/kubernetes/kubernetes/issues/31218 - command: - - sh - - -exc - - | - export KAFKA_BROKER_ID=${HOSTNAME##*-} && \ - export KAFKA_ADVERTISED_LISTENERS=PLAINTEXT://${POD_NAME}.{{ template "cp-kafka.fullname" . }}-headless.${POD_NAMESPACE}:9092{{ include "cp-kafka.configuration.advertised.listeners" . }} && \ - exec /etc/confluent/docker/run + args: ["kafka-server-start.sh", "/etc/kafka/server.properties"] volumeMounts: {{- if .Values.persistence.enabled }} {{- $disksPerBroker := .Values.persistence.disksPerBroker | int }} diff --git a/infrastructure/helm-chart/charts/kafka/charts/cp-kafka/values.yaml b/infrastructure/helm-chart/charts/kafka/charts/kafka/values.yaml similarity index 74% rename from infrastructure/helm-chart/charts/kafka/charts/cp-kafka/values.yaml rename to infrastructure/helm-chart/charts/kafka/charts/kafka/values.yaml index 1e3e26e638..9cd848c8af 100644 --- a/infrastructure/helm-chart/charts/kafka/charts/cp-kafka/values.yaml +++ b/infrastructure/helm-chart/charts/kafka/charts/kafka/values.yaml @@ -1,49 +1,29 @@ brokers: 1 - -image: confluentinc/cp-kafka -imageTag: 5.5.0 - +image: ghcr.io/airyhq/infrastructure/kafka +imageTag: release imagePullPolicy: IfNotPresent - imagePullSecrets: - podManagementPolicy: OrderedReady - updateStrategy: RollingUpdate - configurationOverrides: "offsets.topic.replication.factor": "1" "log.retention.hours": "-1" - "advertised.listeners": |- - EXTERNAL://${HOST_IP}:$((31090 + ${KAFKA_BROKER_ID})) "listener.security.protocol.map": |- PLAINTEXT:PLAINTEXT,EXTERNAL:PLAINTEXT - -customEnv: - KAFKA_METRIC_REPORTERS: "" - +firstListenerPort: 31090 persistence: enabled: true size: 10Gi - - disksPerBroker: 1 - heapOptions: "-Xms512M -Xmx512M" - resources: {} - podAnnotations: {} - nodeSelector: {} - tolerations: [] - nodeport: enabled: true servicePort: 19092 firstListenerPort: 31090 - cp-zookeeper: enabled: true servers: 1 @@ -51,5 +31,4 @@ cp-zookeeper: enabled: true dataDirSize: 5Gi dataLogDirSize: 5Gi - url: "" diff --git a/infrastructure/helm-chart/charts/kafka/charts/schema-registry/Chart.yaml b/infrastructure/helm-chart/charts/kafka/charts/schema-registry/Chart.yaml new file mode 100644 index 0000000000..2ddf7ccb6a --- /dev/null +++ b/infrastructure/helm-chart/charts/kafka/charts/schema-registry/Chart.yaml @@ -0,0 +1,5 @@ +apiVersion: v1 +appVersion: "1.0" +description: A Helm chart for the karapace.io Schema Registry on Kubernetes +name: schema-registry +version: 0.1.0 diff --git a/infrastructure/helm-chart/charts/kafka/charts/schema-registry/templates/deployment.yaml b/infrastructure/helm-chart/charts/kafka/charts/schema-registry/templates/deployment.yaml new file mode 100644 index 0000000000..c4763f40a5 --- /dev/null +++ b/infrastructure/helm-chart/charts/kafka/charts/schema-registry/templates/deployment.yaml @@ -0,0 +1,41 @@ +{{- if .Capabilities.APIVersions.Has "apps/v1" }} +apiVersion: apps/v1 +{{- else }} +apiVersion: apps/v1beta2 +{{- end }} +kind: Deployment +metadata: + name: schema-registry + namespace: {{ .Values.global.namespace }} + labels: + app: schema-registry + release: {{ .Release.Name }} +spec: + replicas: {{ .Values.replicaCount }} + selector: + matchLabels: + app: schema-registry + release: {{ .Release.Name }} + template: + metadata: + labels: + app: schema-registry + release: {{ .Release.Name }} + spec: + containers: + - name: schema-registry-server + image: "{{ .Values.global.containerRegistry}}/{{ .Values.image }}:{{ .Values.global.appImageTag }}" + imagePullPolicy: "{{ .Values.imagePullPolicy }}" + ports: + - name: schema-registry + containerPort: {{ .Values.servicePort }} + protocol: TCP + resources: +{{ toYaml .Values.resources | indent 12 }} + env: + - name: KARAPACE_ADVERTISED_HOSTNAME + valueFrom: + fieldRef: + fieldPath: status.podIP + - name: KARAPACE_BOOTSTRAP_URI + value: {{ .Values.kafka.bootstrapServers }} diff --git a/infrastructure/helm-chart/charts/kafka/charts/schema-registry/templates/service.yaml b/infrastructure/helm-chart/charts/kafka/charts/schema-registry/templates/service.yaml new file mode 100644 index 0000000000..7d17a5bd92 --- /dev/null +++ b/infrastructure/helm-chart/charts/kafka/charts/schema-registry/templates/service.yaml @@ -0,0 +1,14 @@ +apiVersion: v1 +kind: Service +metadata: + name: schema-registry + labels: + app: schema-registry + release: {{ .Release.Name }} +spec: + ports: + - name: schema-registry + port: {{ .Values.servicePort }} + selector: + app: schema-registry + release: {{ .Release.Name }} diff --git a/infrastructure/helm-chart/charts/kafka/charts/schema-registry/values.yaml b/infrastructure/helm-chart/charts/kafka/charts/schema-registry/values.yaml new file mode 100644 index 0000000000..1ed01b5c09 --- /dev/null +++ b/infrastructure/helm-chart/charts/kafka/charts/schema-registry/values.yaml @@ -0,0 +1,6 @@ +replicaCount: 0 +image: infrastructure/schema-registry +imagePullPolicy: Always +servicePort: 8081 +kafka: + bootstrapServers: kafka-headless:9092 diff --git a/infrastructure/helm-chart/charts/kafka/charts/cp-zookeeper/Chart.yaml b/infrastructure/helm-chart/charts/kafka/charts/zookeeper/Chart.yaml similarity index 85% rename from infrastructure/helm-chart/charts/kafka/charts/cp-zookeeper/Chart.yaml rename to infrastructure/helm-chart/charts/kafka/charts/zookeeper/Chart.yaml index 1da339322c..5915fe249d 100644 --- a/infrastructure/helm-chart/charts/kafka/charts/cp-zookeeper/Chart.yaml +++ b/infrastructure/helm-chart/charts/kafka/charts/zookeeper/Chart.yaml @@ -1,5 +1,5 @@ apiVersion: v1 appVersion: "1.0" description: A Helm chart for Confluent Zookeeper on Kubernetes -name: cp-zookeeper +name: zookeeper version: 0.1.0 \ No newline at end of file diff --git a/infrastructure/helm-chart/charts/kafka/charts/cp-zookeeper/templates/_helpers.tpl b/infrastructure/helm-chart/charts/kafka/charts/zookeeper/templates/_helpers.tpl similarity index 95% rename from infrastructure/helm-chart/charts/kafka/charts/cp-zookeeper/templates/_helpers.tpl rename to infrastructure/helm-chart/charts/kafka/charts/zookeeper/templates/_helpers.tpl index b54ba03822..dff32ff458 100644 --- a/infrastructure/helm-chart/charts/kafka/charts/cp-zookeeper/templates/_helpers.tpl +++ b/infrastructure/helm-chart/charts/kafka/charts/zookeeper/templates/_helpers.tpl @@ -19,7 +19,7 @@ If release name contains chart name it will be used as a full name. {{- if contains $name .Release.Name -}} {{- .Release.Name | trunc 63 | trimSuffix "-" -}} {{- else -}} -{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}} +{{- printf "%s" $name | trunc 63 | trimSuffix "-" -}} {{- end -}} {{- end -}} {{- end -}} diff --git a/infrastructure/helm-chart/charts/kafka/charts/cp-zookeeper/templates/headless-service.yaml b/infrastructure/helm-chart/charts/kafka/charts/zookeeper/templates/headless-service.yaml similarity index 92% rename from infrastructure/helm-chart/charts/kafka/charts/cp-zookeeper/templates/headless-service.yaml rename to infrastructure/helm-chart/charts/kafka/charts/zookeeper/templates/headless-service.yaml index cd95dfb40f..bf68b9d2fb 100644 --- a/infrastructure/helm-chart/charts/kafka/charts/cp-zookeeper/templates/headless-service.yaml +++ b/infrastructure/helm-chart/charts/kafka/charts/zookeeper/templates/headless-service.yaml @@ -2,6 +2,7 @@ apiVersion: v1 kind: Service metadata: name: {{ template "cp-zookeeper.fullname" . }}-headless + namespace: {{ .Values.global.namespace }} labels: app: {{ template "cp-zookeeper.name" . }} chart: {{ template "cp-zookeeper.chart" . }} diff --git a/infrastructure/helm-chart/charts/kafka/charts/cp-zookeeper/templates/poddisruptionbudget.yaml b/infrastructure/helm-chart/charts/kafka/charts/zookeeper/templates/poddisruptionbudget.yaml similarity index 92% rename from infrastructure/helm-chart/charts/kafka/charts/cp-zookeeper/templates/poddisruptionbudget.yaml rename to infrastructure/helm-chart/charts/kafka/charts/zookeeper/templates/poddisruptionbudget.yaml index bb5e1ad914..95e7873b43 100644 --- a/infrastructure/helm-chart/charts/kafka/charts/cp-zookeeper/templates/poddisruptionbudget.yaml +++ b/infrastructure/helm-chart/charts/kafka/charts/zookeeper/templates/poddisruptionbudget.yaml @@ -2,6 +2,7 @@ apiVersion: policy/v1beta1 kind: PodDisruptionBudget metadata: name: {{ template "cp-zookeeper.fullname" . }}-pdb + namespace: {{ .Values.global.namespace }} labels: app: {{ template "cp-zookeeper.name" . }} chart: {{ template "cp-zookeeper.chart" . }} diff --git a/infrastructure/helm-chart/charts/kafka/charts/cp-zookeeper/templates/service.yaml b/infrastructure/helm-chart/charts/kafka/charts/zookeeper/templates/service.yaml similarity index 91% rename from infrastructure/helm-chart/charts/kafka/charts/cp-zookeeper/templates/service.yaml rename to infrastructure/helm-chart/charts/kafka/charts/zookeeper/templates/service.yaml index f19bef6314..46a5f3e01d 100644 --- a/infrastructure/helm-chart/charts/kafka/charts/cp-zookeeper/templates/service.yaml +++ b/infrastructure/helm-chart/charts/kafka/charts/zookeeper/templates/service.yaml @@ -2,6 +2,7 @@ apiVersion: v1 kind: Service metadata: name: {{ template "cp-zookeeper.fullname" . }} + namespace: {{ .Values.global.namespace }} labels: app: {{ template "cp-zookeeper.name" . }} chart: {{ template "cp-zookeeper.chart" . }} diff --git a/infrastructure/helm-chart/charts/kafka/charts/cp-zookeeper/templates/statefulset.yaml b/infrastructure/helm-chart/charts/kafka/charts/zookeeper/templates/statefulset.yaml similarity index 94% rename from infrastructure/helm-chart/charts/kafka/charts/cp-zookeeper/templates/statefulset.yaml rename to infrastructure/helm-chart/charts/kafka/charts/zookeeper/templates/statefulset.yaml index f349f1e555..96aaf0e3e7 100644 --- a/infrastructure/helm-chart/charts/kafka/charts/cp-zookeeper/templates/statefulset.yaml +++ b/infrastructure/helm-chart/charts/kafka/charts/zookeeper/templates/statefulset.yaml @@ -6,6 +6,7 @@ apiVersion: apps/v1beta1 kind: StatefulSet metadata: name: {{ template "cp-zookeeper.fullname" . }} + namespace: {{ .Values.global.namespace }} labels: app: {{ template "cp-zookeeper.name" . }} chart: {{ template "cp-zookeeper.chart" . }} @@ -59,6 +60,10 @@ spec: resources: {{ toYaml .Values.resources | indent 10 }} env: + - name: POD_NAME + valueFrom: + fieldRef: + fieldPath: metadata.name - name : KAFKA_HEAP_OPTS value: "{{ .Values.heapOptions }}" - name : ZOOKEEPER_TICK_TIME @@ -83,14 +88,7 @@ spec: valueFrom: fieldRef: fieldPath: metadata.name - command: - - "bash" - - "-c" - - | - ZK_FIX_HOST_REGEX="s/${HOSTNAME}\.[^:]*:/0.0.0.0:/g" - ZOOKEEPER_SERVER_ID=$((${HOSTNAME##*-}+1)) \ - ZOOKEEPER_SERVERS=`echo $ZOOKEEPER_SERVERS | sed -e "$ZK_FIX_HOST_REGEX"` \ - /etc/confluent/docker/run + args: ["zookeeper-server-start.sh", "/etc/kafka/zookeeper.properties"] volumeMounts: - name: datadir mountPath: /var/lib/zookeeper/data diff --git a/infrastructure/helm-chart/charts/kafka/charts/cp-zookeeper/values.yaml b/infrastructure/helm-chart/charts/kafka/charts/zookeeper/values.yaml similarity index 55% rename from infrastructure/helm-chart/charts/kafka/charts/cp-zookeeper/values.yaml rename to infrastructure/helm-chart/charts/kafka/charts/zookeeper/values.yaml index 3b50fbc6f3..97a2ff75fc 100644 --- a/infrastructure/helm-chart/charts/kafka/charts/cp-zookeeper/values.yaml +++ b/infrastructure/helm-chart/charts/kafka/charts/zookeeper/values.yaml @@ -1,52 +1,25 @@ servers: 1 - - -image: confluentinc/cp-zookeeper -imageTag: 5.5.0 - +image: ghcr.io/airyhq/infrastructure/kafka +imageTag: release imagePullPolicy: IfNotPresent - imagePullSecrets: - podManagementPolicy: OrderedReady - updateStrategy: RollingUpdate - tickTime: 2000 syncLimit: 5 initLimit: 10 maxClientCnxns: 60 autoPurgeSnapRetainCount: 3 autoPurgePurgeInterval: 24 - heapOptions: "-Xms512M -Xmx512M" - serverPort: 2888 leaderElectionPort: 3888 clientPort: 2181 - persistence: enabled: true dataDirSize: 5Gi dataLogDirSize: 5Gi - - -resources: {} - +resources: {} podAnnotations: {} - nodeSelector: {} - tolerations: [] - -jmx: - port: 5555 - -prometheus: - jmx: - enabled: true - image: solsson/kafka-prometheus-jmx-exporter@sha256 - imageTag: 6f82e2b0464f50da8104acd7363fb9b995001ddff77d248379f8788e78946143 - imagePullPolicy: IfNotPresent - port: 5556 - resources: {} diff --git a/infrastructure/helm-chart/charts/postgres/templates/deployment.yaml b/infrastructure/helm-chart/charts/postgres/templates/deployment.yaml index bcb1e970a6..110a85a18d 100644 --- a/infrastructure/helm-chart/charts/postgres/templates/deployment.yaml +++ b/infrastructure/helm-chart/charts/postgres/templates/deployment.yaml @@ -2,6 +2,7 @@ apiVersion: apps/v1 kind: Deployment metadata: name: postgres + namespace: {{ .Values.global.namespace }} spec: selector: matchLabels: diff --git a/infrastructure/helm-chart/charts/postgres/templates/persistent-volume.yaml b/infrastructure/helm-chart/charts/postgres/templates/persistent-volume.yaml index 36a8db28d2..204b637ddf 100644 --- a/infrastructure/helm-chart/charts/postgres/templates/persistent-volume.yaml +++ b/infrastructure/helm-chart/charts/postgres/templates/persistent-volume.yaml @@ -2,6 +2,7 @@ kind: PersistentVolume apiVersion: v1 metadata: name: postgres-pv-volume + namespace: {{ .Values.global.namespace }} labels: type: local app: postgres diff --git a/infrastructure/helm-chart/charts/postgres/templates/service.yaml b/infrastructure/helm-chart/charts/postgres/templates/service.yaml index f3ed357579..65766ad85d 100644 --- a/infrastructure/helm-chart/charts/postgres/templates/service.yaml +++ b/infrastructure/helm-chart/charts/postgres/templates/service.yaml @@ -2,6 +2,7 @@ apiVersion: v1 kind: Service metadata: name: postgres + namespace: {{ .Values.global.namespace }} labels: app: postgres spec: diff --git a/infrastructure/helm-chart/charts/redis/templates/configmap.yaml b/infrastructure/helm-chart/charts/redis/templates/configmap.yaml index 488c3b890a..01abc80ee8 100644 --- a/infrastructure/helm-chart/charts/redis/templates/configmap.yaml +++ b/infrastructure/helm-chart/charts/redis/templates/configmap.yaml @@ -2,6 +2,7 @@ apiVersion: v1 kind: ConfigMap metadata: name: redis-cluster + namespace: {{ .Values.global.namespace }} data: update-node.sh: | #!/bin/sh diff --git a/infrastructure/helm-chart/charts/redis/templates/service.yaml b/infrastructure/helm-chart/charts/redis/templates/service.yaml index 935c43d352..0df88d88c2 100644 --- a/infrastructure/helm-chart/charts/redis/templates/service.yaml +++ b/infrastructure/helm-chart/charts/redis/templates/service.yaml @@ -2,6 +2,7 @@ apiVersion: v1 kind: Service metadata: name: redis-cluster + namespace: {{ .Values.global.namespace }} spec: type: ClusterIP ports: diff --git a/infrastructure/helm-chart/charts/redis/templates/statefulset.yaml b/infrastructure/helm-chart/charts/redis/templates/statefulset.yaml index 0a047c14bf..843ca11ca2 100644 --- a/infrastructure/helm-chart/charts/redis/templates/statefulset.yaml +++ b/infrastructure/helm-chart/charts/redis/templates/statefulset.yaml @@ -2,6 +2,7 @@ apiVersion: apps/v1 kind: StatefulSet metadata: name: redis-cluster + namespace: {{ .Values.global.namespace }} spec: serviceName: redis-cluster replicas: 1 diff --git a/infrastructure/helm-chart/values.yaml b/infrastructure/helm-chart/values.yaml index 5dc5e19423..7f1b4a3cd0 100644 --- a/infrastructure/helm-chart/values.yaml +++ b/infrastructure/helm-chart/values.yaml @@ -1,3 +1,4 @@ global: appImageTag: latest containerRegistry: ghcr.io/airyhq + namespace: default diff --git a/infrastructure/images/kafka/Dockerfile b/infrastructure/images/kafka/Dockerfile new file mode 100644 index 0000000000..0b9bb4725e --- /dev/null +++ b/infrastructure/images/kafka/Dockerfile @@ -0,0 +1,31 @@ +FROM openjdk:8-jre-alpine + +LABEL maintainer "https://github.com/airyhq" +LABEL name="kafka" version=${INSTALL_KAFKA_VERSION} + +ENV INSTALL_KAFKA_VERSION 2.5.1 +ENV INSTALL_SCALA_VERSION 2.13 +ENV INSTALL_MIRROR="https://downloads.apache.org/" + +RUN apk update \ + apk upgrade \ + && apk add -t .build-deps curl ca-certificates coreutils su-exec bash \ + && mkdir -p /opt \ + && curl -sSL "${INSTALL_MIRROR}kafka/${INSTALL_KAFKA_VERSION}/kafka_${INSTALL_SCALA_VERSION}-${INSTALL_KAFKA_VERSION}.tgz" \ + | tar -xzf - -C /opt \ + && mv /opt/kafka_${INSTALL_SCALA_VERSION}-${INSTALL_KAFKA_VERSION} /opt/kafka \ + && adduser -DH -s /sbin/nologin kafka \ + && chown -R kafka: /opt/kafka \ + && rm -rf /tmp/* + +ENV PATH /sbin:/opt/kafka/bin/:$PATH + +WORKDIR /opt/kafka + +COPY config/server.properties /etc/kafka/server.properties +COPY config/zookeeper.properties /etc/kafka/zookeeper.properties +COPY /scripts/configure-kafka.sh /root/configure-kafka.sh +COPY /scripts/configure-zookeeper.sh /root/configure-zookeeper.sh +COPY /scripts/entrypoint.sh /root/entrypoint.sh + +ENTRYPOINT ["/root/entrypoint.sh"] diff --git a/infrastructure/images/kafka/Makefile b/infrastructure/images/kafka/Makefile new file mode 100644 index 0000000000..716c33ca55 --- /dev/null +++ b/infrastructure/images/kafka/Makefile @@ -0,0 +1,10 @@ +build: + docker build -t airy-kafka . + +release-beta: build + docker tag airy-kafka ghcr.io/airyhq/infrastructure/kafka:beta + docker push ghcr.io/airyhq/infrastructure/kafka:beta + +release: build + docker tag airy-kafka ghcr.io/airyhq/infrastructure/kafka:release + docker push ghcr.io/airyhq/infrastructure/kafka:release diff --git a/infrastructure/images/kafka/config/server.properties b/infrastructure/images/kafka/config/server.properties new file mode 100644 index 0000000000..b358841589 --- /dev/null +++ b/infrastructure/images/kafka/config/server.properties @@ -0,0 +1,4 @@ +# Default settings +listener.security.protocol.map=PLAINTEXT:PLAINTEXT,EXTERNAL:PLAINTEXT +log.dirs=/opt/kafka/data-0/logs +# Injected settings diff --git a/infrastructure/images/kafka/config/zookeeper.properties b/infrastructure/images/kafka/config/zookeeper.properties new file mode 100644 index 0000000000..1f07480930 --- /dev/null +++ b/infrastructure/images/kafka/config/zookeeper.properties @@ -0,0 +1,9 @@ +dataDir=/var/lib/zookeeper/data +dataLogDir=/var/lib/zookeeper/log +clientPort=2181 +maxClientCnxns=0 +initLimit=10 +autopurge.purgeInterval=24 +syncLimit=5 +autopurge.snapRetainCount=3 +tickTime=2000 diff --git a/infrastructure/images/kafka/scripts/configure-kafka.sh b/infrastructure/images/kafka/scripts/configure-kafka.sh new file mode 100755 index 0000000000..aeb476e3f7 --- /dev/null +++ b/infrastructure/images/kafka/scripts/configure-kafka.sh @@ -0,0 +1,30 @@ +#!/bin/bash +set -eo pipefail + +BROKER_ID=$(echo ${POD_NAME} | awk -F "-" '{ print $NF; }') +BROKER_PORT=$((AIRY_FIRST_LISTENER_PORT + BROKER_ID)) +LISTENERS=$(echo ${AIRY_LISTENERS} | \ + sed "s/AIRY_BROKER_PORT/${BROKER_PORT}/g") +ADVERTISED_LISTENERS=$(echo ${AIRY_ADVERTISED_LISTENERS} | \ + sed "s/AIRY_POD_NAME/${POD_NAME}/g" | \ + sed "s/AIRY_NAMESPACE/${POD_NAMESPACE}/g" | \ + sed "s/AIRY_HOST_IP/${HOST_IP}/g" | \ + sed "s/AIRY_BROKER_PORT/${BROKER_PORT}/g") + +# Insert runtime configuration +echo "broker.id=${BROKER_ID}" >> /etc/kafka/server.properties +echo "listeners=${LISTENERS}" >> /etc/kafka/server.properties +echo "advertised.listeners=${ADVERTISED_LISTENERS}" >> /etc/kafka/server.properties + +# Insert all other KAFKA_* env variables as settings +for VAR in `env` +do + if [[ $VAR =~ ^KAFKA_ && ! $VAR =~ ^KAFKA_VERSION && ! $VAR =~ ^KAFKA_[0-9] && ! $VAR =~ ^KAFKA_PORT && ! $VAR =~ ^KAFKA_SERVICE_ ]]; then + kafka_name=`echo "$VAR" | sed -r "s/KAFKA_(.*)=.*/\1/g" | tr '[:upper:]' '[:lower:]' | tr _ .` + env_var=`echo "$VAR" | sed -r "s/(.*)=.*/\1/g"` + echo "$kafka_name=${!env_var}" >> /etc/kafka/server.properties + fi +done + +echo "Printing out the broker configuration" +cat /etc/kafka/server.properties diff --git a/infrastructure/images/kafka/scripts/configure-zookeeper.sh b/infrastructure/images/kafka/scripts/configure-zookeeper.sh new file mode 100755 index 0000000000..6d14b4fab5 --- /dev/null +++ b/infrastructure/images/kafka/scripts/configure-zookeeper.sh @@ -0,0 +1,21 @@ +#!/bin/bash +set -eo pipefail + +ZOOKEEPER_SERVERS=$(echo ${ZOOKEEPER_SERVERS} | tr ";" " ") +ZOOKEEPER_ID=$(echo ${POD_NAME} | awk -F "-" '{ print $NF; }') +ZOOKEEPER_SERVER_ID=$((ZOOKEEPER_ID+1)) + +echo "${ZOOKEEPER_SERVER_ID}" > /var/lib/zookeeper/data/myid + +# Insert runtime configuration +COUNT=1 +for SERVER in ${ZOOKEEPER_SERVERS}; do + if [ ${COUNT} -eq ${ZOOKEEPER_SERVER_ID} ]; then + echo "server.${COUNT}=0.0.0.0:2888:3888" >> /etc/kafka/zookeeper.properties + else + echo "server.${COUNT}=${SERVER}" >> /etc/kafka/zookeeper.properties + fi + COUNT=$((COUNT+1)) +done + +cat /etc/kafka/zookeeper.properties diff --git a/infrastructure/images/kafka/scripts/entrypoint.sh b/infrastructure/images/kafka/scripts/entrypoint.sh new file mode 100755 index 0000000000..5da5e08ed7 --- /dev/null +++ b/infrastructure/images/kafka/scripts/entrypoint.sh @@ -0,0 +1,14 @@ +#!/bin/bash +set -e + +if [[ "$1" == kafka-server-start.sh && "$2" == /etc/kafka/server.properties ]];then + /root/configure-kafka.sh +elif + [[ "$1" == zookeeper-server-start.sh && "$2" == /etc/kafka/zookeeper.properties ]];then + /root/configure-zookeeper.sh +else + echo "Unsupported arguments to docker entrypoint" + exit -1 +fi + +su-exec kafka "$@" diff --git a/infrastructure/images/schema-registry/.gitignore b/infrastructure/images/schema-registry/.gitignore new file mode 100644 index 0000000000..d0091fdae2 --- /dev/null +++ b/infrastructure/images/schema-registry/.gitignore @@ -0,0 +1 @@ +karapace*egg diff --git a/infrastructure/images/schema-registry/Dockerfile b/infrastructure/images/schema-registry/Dockerfile new file mode 100644 index 0000000000..ce039d52e0 --- /dev/null +++ b/infrastructure/images/schema-registry/Dockerfile @@ -0,0 +1,35 @@ +FROM python:3.9-slim-buster as builder + +RUN apt-get update && apt-get install -y make gcc git + +WORKDIR /wheels + +COPY requirements.txt . + +RUN pip3 wheel -r requirements.txt + +FROM python:3.9-slim-buster + +LABEL maintainer "https://github.com/airyhq" + +LABEL name="schema-registry" version=${SCHEMA_REGISTRY_VERSION} + +ARG SCHEMA_REGISTRY_VERSION +ENV SCHEMA_REGISTRY_VERSION=$SCHEMA_REGISTRY_VERSION + +COPY --from=builder /wheels /wheels + +RUN apt-get update && apt-get install -y git + +RUN pip install --no-cache-dir \ + -r /wheels/requirements.txt \ + -f /wheels \ + && rm -rf /wheels + +ADD ${SCHEMA_REGISTRY_VERSION}.egg . + +RUN easy_install ${SCHEMA_REGISTRY_VERSION}.egg + +ADD config.json . + +CMD karapace config.json diff --git a/infrastructure/images/schema-registry/Makefile b/infrastructure/images/schema-registry/Makefile new file mode 100644 index 0000000000..d1aa464411 --- /dev/null +++ b/infrastructure/images/schema-registry/Makefile @@ -0,0 +1,10 @@ +build: + docker build -t schema-registry . --build-arg SCHEMA_REGISTRY_VERSION=${SCHEMA_REGISTRY_VERSION} + +release-beta: build + docker tag schema-registry ghcr.io/airyhq/infrastructure/schema-registry:beta + docker push ghcr.io/airyhq/infrastructure/schema-registry:beta + +release: build + docker tag schema-registry ghcr.io/airyhq/infrastructure/schema-registry:release + docker push ghcr.io/airyhq/infrastructure/schema-registry:release diff --git a/infrastructure/images/schema-registry/config.json b/infrastructure/images/schema-registry/config.json new file mode 100644 index 0000000000..bcb6ca1c88 --- /dev/null +++ b/infrastructure/images/schema-registry/config.json @@ -0,0 +1,16 @@ +{ + "karapace_registry": true, + "client_id": "sr-1", + "compatibility": "FULL", + "group_id": "schema-registry", + "log_level": "INFO", + "port": 8081, + "host": "0.0.0.0", + "master_eligibility": true, + "replication_factor": 1, + "security_protocol": "PLAINTEXT", + "ssl_cafile": null, + "ssl_certfile": null, + "ssl_keyfile": null, + "topic_name": "_schemas" +} diff --git a/infrastructure/images/schema-registry/requirements.txt b/infrastructure/images/schema-registry/requirements.txt new file mode 100644 index 0000000000..1b15c3ee38 --- /dev/null +++ b/infrastructure/images/schema-registry/requirements.txt @@ -0,0 +1,13 @@ +git+https://github.com/aiven/avro.git@skip-namespace-validation#subdirectory=lang/py3/ +git+git://github.com/aiven/kafka-python.git@39a372538c6bdfbfcb7852c36bed5de61e34bad8 +yapf==0.30.0 +aiohttp-socks==0.3.4 +pylint==2.4.4 +pytest==5.4.1 +requests==2.23.0 +pre-commit>=2.2.0 +aiokafka==0.6.0 +jsonschema==3.2.0 +pycodestyle==2.6.0 +isort==4.3.10 +lz4==3.0.2 diff --git a/infrastructure/lib/go/k8s/handler/BUILD b/infrastructure/lib/go/k8s/handler/BUILD new file mode 100644 index 0000000000..14f813ff08 --- /dev/null +++ b/infrastructure/lib/go/k8s/handler/BUILD @@ -0,0 +1,26 @@ +# gazelle:prefix handler +# gazelle:prefix k8s.io/kubernetes + +load("@io_bazel_rules_go//go:def.bzl", "go_library") + +go_library( + name = "handler", + srcs = [ + "callbacks.go", + "config.go", + "configmaps.go", + "containers.go", + "deployments.go", + ], + importpath = "github.com/airyhq/airy/infrastructure/lib/go/k8s/handler", + visibility = ["//visibility:public"], + deps = [ + "//infrastructure/lib/go/k8s/util", + "@io_k8s_api//apps/v1:apps", + "@io_k8s_api//core/v1:core", + "@io_k8s_apimachinery//pkg/apis/meta/v1:meta", + "@io_k8s_client_go//kubernetes", + "@io_k8s_client_go//util/retry", + "@io_k8s_klog//:klog", + ], +) diff --git a/infrastructure/lib/go/k8s/handler/callbacks.go b/infrastructure/lib/go/k8s/handler/callbacks.go new file mode 100644 index 0000000000..0a2bec4272 --- /dev/null +++ b/infrastructure/lib/go/k8s/handler/callbacks.go @@ -0,0 +1,73 @@ +package handler + +import ( + "github.com/airyhq/airy/infrastructure/lib/go/k8s/util" + + apps_v1 "k8s.io/api/apps/v1" + v1 "k8s.io/api/core/v1" + meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/client-go/kubernetes" + "k8s.io/klog" +) + +//ItemsFunc is a generic function to return a specific resource array in given namespace +type ItemsFunc func(kubernetes.Interface, string, string) []interface{} + +//ContainersFunc is a generic func to return containers +type ContainersFunc func(interface{}) []v1.Container + +//InitContainersFunc is a generic func to return containers +type InitContainersFunc func(interface{}) []v1.Container + +//VolumesFunc is a generic func to return volumes +type VolumesFunc func(interface{}) []v1.Volume + +//UpdateFunc performs the resource update +type UpdateFunc func(kubernetes.Interface, string, string, interface{}) error + +//AnnotationsFunc is a generic func to return annotations +type AnnotationsFunc func(interface{}) map[string]string + +//PodAnnotationsFunc is a generic func to return annotations +type PodAnnotationsFunc func(interface{}) map[string]string + +// GetDeploymentItems returns the deployments in given namespace +func GetDeploymentItems(clientset kubernetes.Interface, namespace string, labelSelector string) []interface{} { + deployments, err := clientset.AppsV1().Deployments(namespace).List(nil, meta_v1.ListOptions{LabelSelector: labelSelector}) + if err != nil { + klog.Errorf("Failed to list deployments %v", err) + } + return util.InterfaceSlice(deployments.Items) +} + +// UpdateDeployment performs rolling upgrade on deployment +func UpdateDeployment(clientset kubernetes.Interface, namespace string, labelSelector string, resource interface{}) error { + deployment := resource.(apps_v1.Deployment) + _, err := clientset.AppsV1().Deployments(namespace).Update(nil, &deployment, meta_v1.UpdateOptions{}) + return err +} + +// GetDeploymentAnnotations returns the annotations of given deployment +func GetDeploymentAnnotations(item interface{}) map[string]string { + return item.(apps_v1.Deployment).ObjectMeta.Annotations +} + +// GetDeploymentPodAnnotations returns the pod's annotations of given deployment +func GetDeploymentPodAnnotations(item interface{}) map[string]string { + return item.(apps_v1.Deployment).Spec.Template.ObjectMeta.Annotations +} + +// GetDeploymentContainers returns the containers of given deployment +func GetDeploymentContainers(item interface{}) []v1.Container { + return item.(apps_v1.Deployment).Spec.Template.Spec.Containers +} + +// GetDeploymentInitContainers returns the containers of given deployment +func GetDeploymentInitContainers(item interface{}) []v1.Container { + return item.(apps_v1.Deployment).Spec.Template.Spec.InitContainers +} + +// GetDeploymentVolumes returns the Volumes of given deployment +func GetDeploymentVolumes(item interface{}) []v1.Volume { + return item.(apps_v1.Deployment).Spec.Template.Spec.Volumes +} diff --git a/infrastructure/lib/go/k8s/handler/config.go b/infrastructure/lib/go/k8s/handler/config.go new file mode 100644 index 0000000000..da12ea9a38 --- /dev/null +++ b/infrastructure/lib/go/k8s/handler/config.go @@ -0,0 +1,16 @@ +package handler + +const ( + // ConfigmapEnvVarPostfix is a postfix for configmap envVar + ConfigmapEnvVarPostfix = "CONFIGMAP" + // SecretEnvVarPostfix is a postfix for secret envVar + SecretEnvVarPostfix = "SECRET" +) + +//Config contains rolling upgrade configuration parameters +type Config struct { + Namespace string + Name string + SHAValue string + Type string +} diff --git a/infrastructure/lib/go/k8s/handler/configmaps.go b/infrastructure/lib/go/k8s/handler/configmaps.go new file mode 100644 index 0000000000..a58f7d0273 --- /dev/null +++ b/infrastructure/lib/go/k8s/handler/configmaps.go @@ -0,0 +1,17 @@ +package handler + +import ( + "github.com/airyhq/airy/infrastructure/lib/go/k8s/util" + + v1 "k8s.io/api/core/v1" +) + +// GetConfigmapConfig provides utility config for configmap +func GetConfigmapConfig(configmap *v1.ConfigMap) Config { + return Config{ + Namespace: configmap.Namespace, + Name: configmap.Name, + SHAValue: util.GetSHAfromConfigmap(configmap), + Type: "CONFIGMAP", + } +} diff --git a/infrastructure/lib/go/k8s/handler/containers.go b/infrastructure/lib/go/k8s/handler/containers.go new file mode 100644 index 0000000000..6e22022ff7 --- /dev/null +++ b/infrastructure/lib/go/k8s/handler/containers.go @@ -0,0 +1,76 @@ +package handler + +import ( + v1 "k8s.io/api/core/v1" +) + +func getVolumeMountName(volumes []v1.Volume, mountType string, volumeName string) string { + for i := range volumes { + if mountType == ConfigmapEnvVarPostfix { + if volumes[i].ConfigMap != nil && volumes[i].ConfigMap.Name == volumeName { + return volumes[i].Name + } + + if volumes[i].Projected != nil { + for j := range volumes[i].Projected.Sources { + if volumes[i].Projected.Sources[j].ConfigMap != nil && volumes[i].Projected.Sources[j].ConfigMap.Name == volumeName { + return volumes[i].Name + } + } + } + } else if mountType == SecretEnvVarPostfix { + if volumes[i].Secret != nil && volumes[i].Secret.SecretName == volumeName { + return volumes[i].Name + } + + if volumes[i].Projected != nil { + for j := range volumes[i].Projected.Sources { + if volumes[i].Projected.Sources[j].Secret != nil && volumes[i].Projected.Sources[j].Secret.Name == volumeName { + return volumes[i].Name + } + } + } + } + } + + return "" +} + +func getContainerWithVolumeMount(containers []v1.Container, volumeMountName string) *v1.Container { + for i := range containers { + volumeMounts := containers[i].VolumeMounts + for j := range volumeMounts { + if volumeMounts[j].Name == volumeMountName { + return &containers[i] + } + } + } + + return nil +} + +func getContainerWithEnvReference(containers []v1.Container, resourceName string, resourceType string) *v1.Container { + for i := range containers { + envs := containers[i].Env + for j := range envs { + envVarSource := envs[j].ValueFrom + if envVarSource != nil { + if resourceType == SecretEnvVarPostfix && envVarSource.SecretKeyRef != nil && envVarSource.SecretKeyRef.LocalObjectReference.Name == resourceName { + return &containers[i] + } else if resourceType == ConfigmapEnvVarPostfix && envVarSource.ConfigMapKeyRef != nil && envVarSource.ConfigMapKeyRef.LocalObjectReference.Name == resourceName { + return &containers[i] + } + } + } + + envsFrom := containers[i].EnvFrom + for j := range envsFrom { + if resourceType == SecretEnvVarPostfix && envsFrom[j].SecretRef != nil && envsFrom[j].SecretRef.LocalObjectReference.Name == resourceName { + return &containers[i] + } else if resourceType == ConfigmapEnvVarPostfix && envsFrom[j].ConfigMapRef != nil && envsFrom[j].ConfigMapRef.LocalObjectReference.Name == resourceName { + return &containers[i] + } + } + } + return nil +} diff --git a/infrastructure/lib/go/k8s/handler/deployments.go b/infrastructure/lib/go/k8s/handler/deployments.go new file mode 100644 index 0000000000..ad86ebab9b --- /dev/null +++ b/infrastructure/lib/go/k8s/handler/deployments.go @@ -0,0 +1,107 @@ +package handler + +import ( + "context" + + "github.com/airyhq/airy/infrastructure/lib/go/k8s/util" + + v1 "k8s.io/api/core/v1" + meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/client-go/kubernetes" + "k8s.io/client-go/util/retry" + "k8s.io/klog" +) + +func GetDeployments(clientset kubernetes.Interface, namespace string, labelSelector string) ([]string, error) { + var deployments []string + deploymentsClient := clientset.AppsV1().Deployments(namespace) + retryErr := retry.RetryOnConflict(retry.DefaultRetry, func() error { + result, getErr := deploymentsClient.List(context.TODO(), meta_v1.ListOptions{LabelSelector: labelSelector}) + if getErr != nil { + klog.Errorf("Failed to get latest version of the Deployments: %v", getErr) + return getErr + } + for _, deploymentItem := range (*result).Items { + deployments = append(deployments, deploymentItem.Name) + } + return nil + }) + return deployments, retryErr +} + +func GetAffectedDeploymentsConfigmap(clientset kubernetes.Interface, configmapName string, namespace string, labelSelector string) ([]string, error) { + deploymentsClient := clientset.AppsV1().Deployments(namespace) + var affectedDeployments []string + retryErr := retry.RetryOnConflict(retry.DefaultRetry, func() error { + result, getErr := deploymentsClient.List(context.TODO(), meta_v1.ListOptions{LabelSelector: labelSelector}) + if getErr != nil { + klog.Errorf("Failed to get latest version of the Deployments: %v", getErr) + return getErr + } + for _, deploymentItem := range (*result).Items { + var container *v1.Container + containers := GetDeploymentContainers(deploymentItem) + initContainers := GetDeploymentInitContainers(deploymentItem) + + // Check the containers which have an EnvReference + container = getContainerWithEnvReference(containers, configmapName, "CONFIGMAP") + if container != nil { + klog.Infof("Found affected container in deployment: %s", deploymentItem.Name) + affectedDeployments = append(affectedDeployments, deploymentItem.Name) + } else { + container = getContainerWithEnvReference(initContainers, configmapName, "CONFIGMAP") + if container != nil { + klog.Infof("Found affected initContainer in deployment: %s", deploymentItem.Name) + affectedDeployments = append(affectedDeployments, deploymentItem.Name) + } + } + + // Check the containers which have a VolumeMount + volumes := GetDeploymentVolumes(deploymentItem) + volumeMountName := getVolumeMountName(volumes, "CONFIGMAP", configmapName) + if volumeMountName != "" { + container = getContainerWithVolumeMount(containers, volumeMountName) + if container == nil && len(initContainers) > 0 { + container = getContainerWithVolumeMount(initContainers, volumeMountName) + if container != nil { + // if configmap/secret is being used in init container then return the first Pod container to save reloader env + affectedDeployments = append(affectedDeployments, deploymentItem.Name) + } + } else if container != nil { + affectedDeployments = append(affectedDeployments, deploymentItem.Name) + } + } + } + + return nil + }) + return affectedDeployments, retryErr +} + +func ReloadDeployment(clientset kubernetes.Interface, namespace string, deploymentName string) error { + deploymentsClient := clientset.AppsV1().Deployments(namespace) + deployment, getErr := deploymentsClient.Get(context.TODO(), deploymentName, meta_v1.GetOptions{}) + currentReplicas := deployment.Spec.Replicas + // If currentReplicas is 0 - don't do anything + if *currentReplicas != 0 { + retryErr := retry.RetryOnConflict(retry.DefaultRetry, func() error { + deployment, getErr = deploymentsClient.Get(context.TODO(), deploymentName, meta_v1.GetOptions{}) + if getErr != nil { + klog.Errorf("Failed to get latest version of Deployment: %v", getErr) + return getErr + } + deployment.Spec.Replicas = util.Int32Ptr(0) // reduce replica count + _, updateErr := deploymentsClient.Update(context.TODO(), deployment, meta_v1.UpdateOptions{}) + deployment.Spec.Replicas = currentReplicas // increase replica count + _, updateErr = deploymentsClient.Update(context.TODO(), deployment, meta_v1.UpdateOptions{}) + return updateErr + }) + if retryErr != nil { + klog.Errorf("Update failed: %v", retryErr) + return retryErr + } + klog.Infof("Reloaded deployment %s", deploymentName) + return nil + } + return getErr +} diff --git a/infrastructure/lib/go/k8s/handler/go.mod b/infrastructure/lib/go/k8s/handler/go.mod new file mode 100644 index 0000000000..3ddbaae87a --- /dev/null +++ b/infrastructure/lib/go/k8s/handler/go.mod @@ -0,0 +1,15 @@ +module github.com/airyhq/airy/infrastructure/lib/go/k8s/handler + +go 1.15 + +require ( + github.com/airyhq/airy/infrastructure/lib/go/k8s/util v0.0.0 + golang.org/x/time v0.0.0-20201208040808-7e3f01d25324 // indirect + k8s.io/api v0.20.0 + k8s.io/apimachinery v0.20.0 + k8s.io/client-go v0.20.0 + k8s.io/klog v1.0.0 + k8s.io/utils v0.0.0-20201110183641-67b214c5f920 // indirect +) + +replace github.com/airyhq/airy/infrastructure/lib/go/k8s/util => ../util diff --git a/infrastructure/lib/go/k8s/handler/go.sum b/infrastructure/lib/go/k8s/handler/go.sum new file mode 100644 index 0000000000..be79c23af4 --- /dev/null +++ b/infrastructure/lib/go/k8s/handler/go.sum @@ -0,0 +1,680 @@ +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/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/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/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= +dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= +github.com/Azure/go-autorest v14.2.0+incompatible/go.mod h1:r+4oMnoxhatjLLJ6zxSWATqVooLgysK6ZNox3g/xq24= +github.com/Azure/go-autorest/autorest v0.11.1/go.mod h1:JFgpikqFJ/MleTTxwepExTKnFUKKszPS8UavbQYUMuw= +github.com/Azure/go-autorest/autorest/adal v0.9.0/go.mod h1:/c022QCutn2P7uY+/oQWWNcK9YU+MH96NgK+jErpbcg= +github.com/Azure/go-autorest/autorest/adal v0.9.5/go.mod h1:B7KF7jKIeC9Mct5spmyCB/A8CG/sEz1vwIRGv/bbw7A= +github.com/Azure/go-autorest/autorest/date v0.3.0/go.mod h1:BI0uouVdmngYNUzGWeSYnokU+TrmwEsOqdt8Y6sso74= +github.com/Azure/go-autorest/autorest/mocks v0.4.0/go.mod h1:LTp+uSrOhSkaKrUy935gNZuuIPPVsHlr9DSOxSayd+k= +github.com/Azure/go-autorest/autorest/mocks v0.4.1/go.mod h1:LTp+uSrOhSkaKrUy935gNZuuIPPVsHlr9DSOxSayd+k= +github.com/Azure/go-autorest/logger v0.2.0/go.mod h1:T9E3cAhj2VqvPOtCYAvby9aBXkZmbF5NWuPV8+WeEW8= +github.com/Azure/go-autorest/tracing v0.6.0/go.mod h1:+vhtPC754Xsa23ID7GlGsrdKBpUA79WCAKPPZVC2DeU= +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/Knetic/govaluate v3.0.1-0.20171022003610-9aa49832a739+incompatible/go.mod h1:r7JcOSlj0wfOMncg0iLm8Leh48TZaKVeNIfJntJ2wa0= +github.com/NYTimes/gziphandler v0.0.0-20170623195520-56545f4a5d46/go.mod h1:3wb06e3pkSAbeQ52E9H9iFoQsEEwGN64994WTCIhntQ= +github.com/PuerkitoBio/purell v1.1.1/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0= +github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578/go.mod h1:uGdkoq3SwY9Y+13GIhn11/XLaGBb4BfwItxLd5jeuXE= +github.com/Shopify/sarama v1.19.0/go.mod h1:FVkBWblsNy7DGZRfXLU0O9RCGt5g3g3yEuWXgklEdEo= +github.com/Shopify/toxiproxy v2.1.4+incompatible/go.mod h1:OXgGpZ6Cli1/URJOF1DMxUHB2q5Ap20/P/eIdh4G0pI= +github.com/VividCortex/gohistogram v1.0.0/go.mod h1:Pf5mBqqDxYaXu3hDrrU+w6nw50o/4+TcAqDqk/vUH7g= +github.com/afex/hystrix-go v0.0.0-20180502004556-fa1af6a1f4f5/go.mod h1:SkGFH1ia65gfNATL8TAiHDNxPzPdmEL5uirI2Uyuz6c= +github.com/airyhq/airy v0.0.0-20201230082327-fb1f4f01fc6f h1:DMy33vRwKjU61UwIt+/PbSHlj5mvHjxikU/Yb0LVp2k= +github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= +github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= +github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= +github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= +github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d/go.mod h1:rBZYJk541a8SKzHPHnH3zbiI+7dagKZ0cgpgrD7Fyho= +github.com/apache/thrift v0.12.0/go.mod h1:cp2SuWMxlEZw2r+iP2GNCdIi4C1qmUzdZFSVb+bacwQ= +github.com/apache/thrift v0.13.0/go.mod h1:cp2SuWMxlEZw2r+iP2GNCdIi4C1qmUzdZFSVb+bacwQ= +github.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e/go.mod h1:3U/XgcO3hCbHZ8TKRvWD2dDTCfh9M9ya+I9JpbB7O8o= +github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da/go.mod h1:Q73ZrmVTwzkszR9V5SSuryQ31EELlFMUz1kKyl939pY= +github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= +github.com/aryann/difflib v0.0.0-20170710044230-e206f873d14a/go.mod h1:DAHtR1m6lCRdSC2Tm3DSWRPvIPr6xNKyeHdqDQSQT+A= +github.com/asaskevich/govalidator v0.0.0-20190424111038-f61b66f89f4a/go.mod h1:lB+ZfQJz7igIIfQNfa7Ml4HSf2uFQQRzpGGRXenZAgY= +github.com/aws/aws-lambda-go v1.13.3/go.mod h1:4UKl9IzQMoD+QF79YdCuzCwp8VbmG4VAQwij/eHl5CU= +github.com/aws/aws-sdk-go v1.27.0/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo= +github.com/aws/aws-sdk-go-v2 v0.18.0/go.mod h1:JWVYvqSMppoMJC0x5wdwiImzgXTI9FuZwxzkQq9wy+g= +github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= +github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= +github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= +github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= +github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= +github.com/casbin/casbin/v2 v2.1.2/go.mod h1:YcPU1XXisHhLzuxH9coDNf2FbKpjGlbCg3n9yuLkIJQ= +github.com/cenkalti/backoff v2.2.1+incompatible/go.mod h1:90ReRw6GdpyfrHakVjL/QHaoyV4aDUVVkXQJJJ3NXXM= +github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= +github.com/cespare/xxhash/v2 v2.1.1 h1:6MnRN8NT7+YBpUIWxHtefFZOKTAPgGjpQSxqLNn0+qY= +github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= +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/clbanning/x2j v0.0.0-20191024224557-825249438eec/go.mod h1:jMjuTZXRI4dUb/I5gc9Hdhagfvm9+RyrPryS/auMzxE= +github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= +github.com/cockroachdb/datadriven v0.0.0-20190809214429-80d97fb3cbaa/go.mod h1:zn76sxSg3SzpJ0PPJaLDCu+Bu0Lg3sKTORVIj19EIF8= +github.com/codahale/hdrhistogram v0.0.0-20161010025455-3a0bb77429bd/go.mod h1:sE/e/2PUdi/liOCUjSTXgM1o87ZssimdTWN964YiIeI= +github.com/coreos/go-semver v0.2.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= +github.com/coreos/go-systemd v0.0.0-20180511133405-39ca1b05acc7/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= +github.com/coreos/pkg v0.0.0-20160727233714-3ac0863d7acf/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= +github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= +github.com/creack/pty v1.1.7/go.mod h1:lj5s0c3V2DBrqTV7llrYr5NG6My20zk30Fl46Y7DoTY= +github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= +github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ= +github.com/docker/spdystream v0.0.0-20160310174837-449fdfce4d96/go.mod h1:Qh8CwZgvJUkLughtfhJv5dyTYa91l1fOUCrgjqmcifM= +github.com/docopt/docopt-go v0.0.0-20180111231733-ee0de3bc6815/go.mod h1:WwZ+bS3ebgob9U8Nd0kOddGdZWjyMGR8Wziv+TBNwSE= +github.com/dustin/go-humanize v0.0.0-20171111073723-bb3d318650d4/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= +github.com/eapache/go-resiliency v1.1.0/go.mod h1:kFI+JgMyC7bLPUVY133qvEBtVayf5mFgVsvEsIPBvNs= +github.com/eapache/go-xerial-snappy v0.0.0-20180814174437-776d5712da21/go.mod h1:+020luEh2TKB4/GOp8oxxtq0Daoen/Cii55CzbTV6DU= +github.com/eapache/queue v1.1.0/go.mod h1:6eCeP0CKFpHLu8blIFXhExK/dRa7WDZfr6jVFPTqq+I= +github.com/edsrzf/mmap-go v1.0.0/go.mod h1:YO35OhQPt3KJa3ryjFM5Bs14WD66h8eGKpfaBNrHW5M= +github.com/elazarl/goproxy v0.0.0-20180725130230-947c36da3153/go.mod h1:/Zj4wYkgs4iZTTu3o/KG3Itv/qCCa8VVMlb3i9OVuzc= +github.com/emicklei/go-restful v0.0.0-20170410110728-ff4f55a20633/go.mod h1:otzb+WCGbkyDHkqmQmT5YD2WR4BBwUdeQoFo8l/7tVs= +github.com/envoyproxy/go-control-plane v0.6.9/go.mod h1:SBwIajubJHhxtWwsL9s8ss4safvEdbitLhGGK48rN6g= +github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= +github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= +github.com/evanphx/json-patch v4.9.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= +github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= +github.com/form3tech-oss/jwt-go v3.2.2+incompatible/go.mod h1:pbq4aXjuKjdthFRnoDwaVPLA+WlJuPGy+QneDUgJi2k= +github.com/franela/goblin v0.0.0-20200105215937-c9ffbefa60db/go.mod h1:7dvUGVsVBjqR7JHJk0brhHOZYGmfBYOrK0ZhYMEtBr4= +github.com/franela/goreq v0.0.0-20171204163338-bcd34c9993f8/go.mod h1:ZhphrRTfi2rbfLwlschooIH4+wKKDR4Pdxhh+TRoA20= +github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= +github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ= +github.com/ghodss/yaml v0.0.0-20150909031657-73d445a93680/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= +github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= +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/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= +github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= +github.com/go-kit/kit v0.10.0/go.mod h1:xUsJbQ/Fp4kEt7AFgCuvyX4a71u8h9jB8tj/ORgOZ7o= +github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE= +github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk= +github.com/go-logfmt/logfmt v0.5.0/go.mod h1:wCYkCAKZfumFQihp8CzCvQ3paCTfi41vtzG1KdI/P7A= +github.com/go-logr/logr v0.1.0/go.mod h1:ixOQHD9gLJUVQQ2ZOR7zLEifBX6tGkNJF4QyIY7sIas= +github.com/go-logr/logr v0.2.0 h1:QvGt2nLcHH0WK9orKa+ppBPAxREcH364nPUedEpK0TY= +github.com/go-logr/logr v0.2.0/go.mod h1:z6/tIYblkpsD+a4lm/fGIIU9mZ+XfAiaFtq7xTgseGU= +github.com/go-openapi/jsonpointer v0.19.2/go.mod h1:3akKfEdA7DF1sugOqz1dVQHBcuDBPKZGEoHC/NkiQRg= +github.com/go-openapi/jsonpointer v0.19.3/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg= +github.com/go-openapi/jsonreference v0.19.2/go.mod h1:jMjeRr2HHw6nAVajTXJ4eiUwohSTlpa0o73RUL1owJc= +github.com/go-openapi/jsonreference v0.19.3/go.mod h1:rjx6GuL8TTa9VaixXglHmQmIL98+wF9xc8zWvFonSJ8= +github.com/go-openapi/spec v0.19.3/go.mod h1:FpwSN1ksY1eteniUU7X0N/BgJ7a4WvBFVA8Lj9mJglo= +github.com/go-openapi/swag v0.19.2/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk= +github.com/go-openapi/swag v0.19.5/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk= +github.com/go-sql-driver/mysql v1.4.0/go.mod h1:zAC/RDZ24gD3HViQzih4MyKcchzm+sOG5ZlKdlhCg5w= +github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= +github.com/gogo/googleapis v1.1.0/go.mod h1:gf4bu3Q80BeJ6H1S1vYPm8/ELATdvryBaNFGgqEef3s= +github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= +github.com/gogo/protobuf v1.2.0/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= +github.com/gogo/protobuf v1.2.1/go.mod h1:hp+jE20tsWTFYpLwKvXlhS1hjn+gTNwPg2I6zVXpSg4= +github.com/gogo/protobuf v1.3.1 h1:DqDEcV5aeaTmdFBePNpYsp3FlcVH/2ISVVM9Qf8PSls= +github.com/gogo/protobuf v1.3.1/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o= +github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= +github.com/golang/groupcache v0.0.0-20160516000752-02826c3e7903/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +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/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.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/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= +github.com/golang/protobuf v1.4.3 h1:JjCZWpVbqXDqFVmTfYWEVTMIYrL/NPdPSCHPJ0T/raM= +github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= +github.com/golang/snappy v0.0.0-20180518054509-2e65f85255db/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= +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.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= +github.com/google/gofuzz v1.1.0 h1:Hsa8mG0dQ46ij8Sl2AYJDUv1oA9/d6Vk+3LG99Oe02g= +github.com/google/gofuzz v1.1.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= +github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= +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/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= +github.com/google/uuid v1.0.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +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/googleapis/gnostic v0.4.1 h1:DLJCy1n/vrD4HPjOvYcT8aYQXpPIzoRZONaYwyycI+I= +github.com/googleapis/gnostic v0.4.1/go.mod h1:LRhVm6pbyptWbWbuZ38d1eyptfvIytN3ir6b65WBswg= +github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= +github.com/gorilla/context v1.1.1/go.mod h1:kBGZzfjB9CEq2AlWe17Uuf7NDRt0dE0s8S51q0aT7Yg= +github.com/gorilla/mux v1.6.2/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= +github.com/gorilla/mux v1.7.3/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= +github.com/gorilla/websocket v0.0.0-20170926233335-4201258b820c/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= +github.com/gregjones/httpcache v0.0.0-20180305231024-9cad4c3443a7/go.mod h1:FecbI9+v66THATjSRHfNgh1IVFe/9kFxbXtjV0ctIMA= +github.com/grpc-ecosystem/go-grpc-middleware v1.0.1-0.20190118093823-f849b5445de4/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= +github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgfV/d3M/q6VIi02HzZEHgUlZvzk= +github.com/grpc-ecosystem/grpc-gateway v1.9.5/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= +github.com/hashicorp/consul/api v1.3.0/go.mod h1:MmDNSzIMUjNpY/mQ398R4bk2FnqQLoPndWW5VkKPlCE= +github.com/hashicorp/consul/sdk v0.3.0/go.mod h1:VKf9jXwCTEY1QZP2MOLRhb5i/I/ssyNV1vwHyQBF0x8= +github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= +github.com/hashicorp/go-cleanhttp v0.5.1/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80= +github.com/hashicorp/go-immutable-radix v1.0.0/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= +github.com/hashicorp/go-msgpack v0.5.3/go.mod h1:ahLV/dePpqEmjfWmKiqvPkv/twdG7iPBM1vqhUKIvfM= +github.com/hashicorp/go-multierror v1.0.0/go.mod h1:dHtQlpGsu+cZNNAkkCN/P3hoUDHhCYQXV3UM06sGGrk= +github.com/hashicorp/go-rootcerts v1.0.0/go.mod h1:K6zTfqpRlCUIjkwsN4Z+hiSfzSTQa6eBIzfwKfwNnHU= +github.com/hashicorp/go-sockaddr v1.0.0/go.mod h1:7Xibr9yA9JjQq1JpNB2Vw7kxv8xerXegt+ozgdvDeDU= +github.com/hashicorp/go-syslog v1.0.0/go.mod h1:qPfqrKkXGihmCqbJM2mZgkZGvKG1dFdvsLplgctolz4= +github.com/hashicorp/go-uuid v1.0.0/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= +github.com/hashicorp/go-uuid v1.0.1/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= +github.com/hashicorp/go-version v1.2.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= +github.com/hashicorp/go.net v0.0.1/go.mod h1:hjKkEWcCURg++eb33jQU7oqQcI9XDCnUzHA0oac0k90= +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/hashicorp/logutils v1.0.0/go.mod h1:QIAnNjmIWmVIIkWDTG1z5v++HQmx9WQRO+LraFDTW64= +github.com/hashicorp/mdns v1.0.0/go.mod h1:tL+uN++7HEJ6SQLQ2/p+z2pH24WQKWjBPkE0mNTz8vQ= +github.com/hashicorp/memberlist v0.1.3/go.mod h1:ajVTdAv/9Im8oMAAj5G31PhhMCZJV2pPBoIllUwCN7I= +github.com/hashicorp/serf v0.8.2/go.mod h1:6hOLApaqBFA1NXqRQAsxw9QxuDEvNxSQRwA/JwenrHc= +github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= +github.com/hudl/fargo v1.3.0/go.mod h1:y3CKSmjA+wD2gak7sUSXTAoopbhU08POFhmITJgmKTg= +github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= +github.com/imdario/mergo v0.3.5/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA= +github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= +github.com/influxdata/influxdb1-client v0.0.0-20191209144304-8bf82d3c094d/go.mod h1:qj24IKcXYK6Iy9ceXlo3Tc+vtHo9lIhSX5JddghvEPo= +github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k= +github.com/jonboulle/clockwork v0.1.0/go.mod h1:Ii8DK3G1RaLaWxj9trq07+26W01tbo22gdxWY5EU2bo= +github.com/jpillora/backoff v1.0.0/go.mod h1:J/6gKK9jxlEcS3zixgDgUAsiuZ7yrSoa/FX5e0EB2j4= +github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= +github.com/json-iterator/go v1.1.7/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= +github.com/json-iterator/go v1.1.8/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= +github.com/json-iterator/go v1.1.10 h1:Kz6Cvnvv2wGdaG/V8yMvfkmNiXq9Ya2KUv4rouJJr68= +github.com/json-iterator/go v1.1.10/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= +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/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU= +github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= +github.com/julienschmidt/httprouter v1.3.0/go.mod h1:JR6WtHb+2LUe8TCKY3cZOxFyyO8IZAc4RVcycCCAKdM= +github.com/kisielk/errcheck v1.1.0/go.mod h1:EZBBE59ingxPouuu3KfxchcWSUPOHkagtvWXihfKN4Q= +github.com/kisielk/errcheck v1.2.0/go.mod h1:/BMXB+zMLi60iA8Vv6Ksmxu/1UDYcXs4uQLJ+jE2L00= +github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= +github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= +github.com/konsorten/go-windows-terminal-sequences v1.0.3/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= +github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= +github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= +github.com/kr/pretty v0.2.0/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= +github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= +github.com/kr/pty v1.1.5/go.mod h1:9r2w37qlBe7rQ6e1fg1S/9xpWHSnaqNdHD3WcMdbPDA= +github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= +github.com/lightstep/lightstep-tracer-common/golang/gogo v0.0.0-20190605223551-bc2310a04743/go.mod h1:qklhhLq1aX+mtWk9cPHPzaBjWImj5ULL6C7HFJtXQMM= +github.com/lightstep/lightstep-tracer-go v0.18.1/go.mod h1:jlF1pusYV4pidLvZ+XD0UBX0ZE6WURAspgAczcDHrL4= +github.com/lyft/protoc-gen-validate v0.0.13/go.mod h1:XbGvPuh87YZc5TdIa2/I4pLk0QoUACkjt2znoq26NVQ= +github.com/mailru/easyjson v0.0.0-20190614124828-94de47d64c63/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= +github.com/mailru/easyjson v0.0.0-20190626092158-b2ccc519800e/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= +github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= +github.com/mattn/go-isatty v0.0.3/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= +github.com/mattn/go-isatty v0.0.4/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= +github.com/mattn/go-runewidth v0.0.2/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= +github.com/matttproud/golang_protobuf_extensions v1.0.1 h1:4hp9jkHxhMHkqkrB3Ix0jegS5sx/RkqARlsWZ6pIwiU= +github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= +github.com/miekg/dns v1.0.14/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg= +github.com/mitchellh/cli v1.0.0/go.mod h1:hNIlj7HEI86fIcpObd7a0FcrxTWetlwJDGcceTlRvqc= +github.com/mitchellh/go-homedir v1.0.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= +github.com/mitchellh/go-testing-interface v1.0.0/go.mod h1:kRemZodwjscx+RGhAo8eIhFbs2+BFgRtFPeD/KE+zxI= +github.com/mitchellh/gox v0.4.0/go.mod h1:Sd9lOJ0+aimLBi73mGofS1ycjY8lL3uZM3JPS42BGNg= +github.com/mitchellh/iochan v1.0.0/go.mod h1:JwYml1nuB7xOzsp52dPpHFffvOCDupsG0QubkSMEySY= +github.com/mitchellh/mapstructure v0.0.0-20160808181253-ca63d7c062ee/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= +github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= +github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= +github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg= +github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= +github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= +github.com/modern-go/reflect2 v1.0.1 h1:9f412s+6RmYXLWZSEzVVgPGK7C2PphHj5RJrvfx9AWI= +github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= +github.com/munnerz/goautoneg v0.0.0-20120707110453-a547fc61f48d/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= +github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= +github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= +github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f/go.mod h1:ZdcZmHo+o7JKHSa8/e818NopupXU1YMK5fe1lsApnBw= +github.com/nats-io/jwt v0.3.0/go.mod h1:fRYCDE99xlTsqUzISS1Bi75UBJ6ljOJQOAAu5VglpSg= +github.com/nats-io/jwt v0.3.2/go.mod h1:/euKqTS1ZD+zzjYrY7pseZrTtWQSjujC7xjPc8wL6eU= +github.com/nats-io/nats-server/v2 v2.1.2/go.mod h1:Afk+wRZqkMQs/p45uXdrVLuab3gwv3Z8C4HTBu8GD/k= +github.com/nats-io/nats.go v1.9.1/go.mod h1:ZjDU1L/7fJ09jvUSRVBR2e7+RnLiiIQyqyzEE/Zbp4w= +github.com/nats-io/nkeys v0.1.0/go.mod h1:xpnFELMwJABBLVhffcfd1MZx6VsNRFpEugbxziKVo7w= +github.com/nats-io/nkeys v0.1.3/go.mod h1:xpnFELMwJABBLVhffcfd1MZx6VsNRFpEugbxziKVo7w= +github.com/nats-io/nuid v1.0.1/go.mod h1:19wcPz3Ph3q0Jbyiqsd0kePYG7A95tJPxeL+1OSON2c= +github.com/oklog/oklog v0.3.2/go.mod h1:FCV+B7mhrz4o+ueLpx+KqkyXRGMWOYEvfiXtdGtbWGs= +github.com/oklog/run v1.0.0/go.mod h1:dlhp/R75TPv97u0XWUtDeV/lRKWPKSdTuV0TZvrmrQA= +github.com/olekukonko/tablewriter v0.0.0-20170122224234-a0225b3f23b5/go.mod h1:vsDQFd/mU46D+Z4whnwzcISnGGzXWMclvtLoiIKAKIo= +github.com/onsi/ginkgo v0.0.0-20170829012221-11459a886d9c/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= +github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= +github.com/onsi/ginkgo v1.7.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= +github.com/onsi/ginkgo v1.11.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= +github.com/onsi/gomega v0.0.0-20170829124025-dcabb60a477c/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA= +github.com/onsi/gomega v1.4.3/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= +github.com/onsi/gomega v1.7.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= +github.com/op/go-logging v0.0.0-20160315200505-970db520ece7/go.mod h1:HzydrMdWErDVzsI23lYNej1Htcns9BCg93Dk0bBINWk= +github.com/opentracing-contrib/go-observer v0.0.0-20170622124052-a52f23424492/go.mod h1:Ngi6UdF0k5OKD5t5wlmGhe/EDKPoUM3BXZSSfIuJbis= +github.com/opentracing/basictracer-go v1.0.0/go.mod h1:QfBfYuafItcjQuMwinw9GhYKwFXS9KnPs5lxoYwgW74= +github.com/opentracing/opentracing-go v1.0.2/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= +github.com/opentracing/opentracing-go v1.1.0/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= +github.com/openzipkin-contrib/zipkin-go-opentracing v0.4.5/go.mod h1:/wsWhb9smxSfWAKL3wpBW7V8scJMt8N8gnaMCS9E/cA= +github.com/openzipkin/zipkin-go v0.1.6/go.mod h1:QgAqvLzwWbR/WpD4A3cGpPtJrZXNIiJc5AZX7/PBEpw= +github.com/openzipkin/zipkin-go v0.2.1/go.mod h1:NaW6tEwdmWMaCDZzg8sh+IBNOxHMPnhQw8ySjnjRyN4= +github.com/openzipkin/zipkin-go v0.2.2/go.mod h1:NaW6tEwdmWMaCDZzg8sh+IBNOxHMPnhQw8ySjnjRyN4= +github.com/pact-foundation/pact-go v1.0.4/go.mod h1:uExwJY4kCzNPcHRj+hCR/HBbOOIwwtUjcrb0b5/5kLM= +github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= +github.com/pborman/uuid v1.2.0/go.mod h1:X/NO0urCmaxf9VXbdlT7C2Yzkj2IKimNn4k+gtPdI/k= +github.com/performancecopilot/speed v3.0.0+incompatible/go.mod h1:/CLtqpZ5gBg1M9iaPbIdPPGyKcA8hKdoy6hAWba7Yac= +github.com/peterbourgon/diskv v2.0.1+incompatible/go.mod h1:uqqh8zWWbv1HBMNONnaR/tNboyR3/BZd58JJSHlUSCU= +github.com/pierrec/lz4 v1.0.2-0.20190131084431-473cd7ce01a1/go.mod h1:3/3N9NVKO0jef7pBehbT1qWhCMrIgbYNnFAZCqQ5LRc= +github.com/pierrec/lz4 v2.0.5+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi+IEE17M5jbnwPHcY= +github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/pkg/profile v1.2.1/go.mod h1:hJw3o1OdXxsrSjjVksARp5W95eeEaEfptyVZyv6JUPA= +github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/posener/complete v1.1.1/go.mod h1:em0nMJCgc9GFtwrmVmEMR/ZL6WyhyjMBndrE9hABlRI= +github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= +github.com/prometheus/client_golang v0.9.3-0.20190127221311-3c4408c8b829/go.mod h1:p2iRAGwDERtqlqzRXnrOVns+ignqQo//hLXqYxZYVNs= +github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo= +github.com/prometheus/client_golang v1.3.0/go.mod h1:hJaj2vgQTGQmVCsAACORcieXFeDPbaTKGT+JTgUa3og= +github.com/prometheus/client_golang v1.7.1/go.mod h1:PY5Wy2awLA44sXw4AOSfFBetzPP4j5+D6mVACh+pe2M= +github.com/prometheus/client_golang v1.8.0 h1:zvJNkoCFAnYFNC24FV8nW4JdRJ3GIFcLbg65lL/JDcw= +github.com/prometheus/client_golang v1.8.0/go.mod h1:O9VU6huf47PktckDQfMTX0Y8tY0/7TSWwj+ITvv0TnM= +github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= +github.com/prometheus/client_model v0.0.0-20190115171406-56726106282f/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= +github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= +github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= +github.com/prometheus/client_model v0.1.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= +github.com/prometheus/client_model v0.2.0 h1:uq5h0d+GuxiXLJLNABMgp2qUWDPiLvgCzz2dUR+/W/M= +github.com/prometheus/client_model v0.2.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= +github.com/prometheus/common v0.2.0/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= +github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= +github.com/prometheus/common v0.7.0/go.mod h1:DjGbpBbp5NYNiECxcL/VnbXCCaQpKd3tt26CguLLsqA= +github.com/prometheus/common v0.10.0/go.mod h1:Tlit/dnDKsSWFlCLTWaA1cyBgKHSMdTB80sz/V91rCo= +github.com/prometheus/common v0.14.0 h1:RHRyE8UocrbjU+6UvRzwi6HjiDfxrrBU91TtbKzkGp4= +github.com/prometheus/common v0.14.0/go.mod h1:U+gB1OBLb1lF3O42bTCL+FK18tX9Oar16Clt/msog/s= +github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= +github.com/prometheus/procfs v0.0.0-20190117184657-bf6a532e95b1/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= +github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= +github.com/prometheus/procfs v0.0.8/go.mod h1:7Qr8sr6344vo1JqZ6HhLceV9o3AJ1Ff+GxbHq6oeK9A= +github.com/prometheus/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= +github.com/prometheus/procfs v0.2.0 h1:wH4vA7pcjKuZzjF7lM8awk4fnuJO6idemZXoKnULUx4= +github.com/prometheus/procfs v0.2.0/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= +github.com/rcrowley/go-metrics v0.0.0-20181016184325-3113b8401b8a/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= +github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg= +github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= +github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= +github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= +github.com/samuel/go-zookeeper v0.0.0-20190923202752-2cc03de413da/go.mod h1:gi+0XIa01GRL2eRQVjQkKGqKF3SF9vZR/HnPullcV2E= +github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc= +github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc= +github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= +github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= +github.com/sirupsen/logrus v1.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrfsX/uA88= +github.com/sirupsen/logrus v1.7.0 h1:ShrD1U9pZB12TX0cVy0DtePoCH97K8EtX+mg7ZARUtM= +github.com/sirupsen/logrus v1.7.0/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= +github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc= +github.com/smartystreets/goconvey v1.6.4/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA= +github.com/soheilhy/cmux v0.1.4/go.mod h1:IM3LyeVVIOuxMH7sFAkER9+bJ4dT7Ms6E4xg4kGIyLM= +github.com/sony/gobreaker v0.4.1/go.mod h1:ZKptC7FHNvhBz7dN2LGjPVBz2sZJmc0/PkyDJOjmxWY= +github.com/spf13/afero v1.2.2/go.mod h1:9ZxEEn6pIJ8Rxe320qSDBk6AsU0r9pR7Q4OcevTdifk= +github.com/spf13/cobra v0.0.3/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ= +github.com/spf13/pflag v0.0.0-20170130214245-9ff6c6923cff/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= +github.com/spf13/pflag v1.0.1/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= +github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= +github.com/streadway/amqp v0.0.0-20190404075320-75d898a42a94/go.mod h1:AZpEONHx3DKn8O/DFsRAY58/XVQiIPMTMB1SddzLXVw= +github.com/streadway/amqp v0.0.0-20190827072141-edfb9018d271/go.mod h1:AZpEONHx3DKn8O/DFsRAY58/XVQiIPMTMB1SddzLXVw= +github.com/streadway/handy v0.0.0-20190108123426-d5acb3125c2a/go.mod h1:qNTQ5P5JnDBl6z3cMAg/SywNDC5ABu5ApDIw6lUbRmI= +github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/objx v0.2.0/go.mod h1:qt09Ya8vawLte6SNmTgCsAVtYtaKzEcn8ATUoHMkEqE= +github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= +github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= +github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= +github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +github.com/tmc/grpc-websocket-proxy v0.0.0-20170815181823-89b8d40f7ca8/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= +github.com/urfave/cli v1.20.0/go.mod h1:70zkFmudgCuE/ngEzBv17Jvp/497gISqfk5gWijbERA= +github.com/urfave/cli v1.22.1/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0= +github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU= +go.etcd.io/bbolt v1.3.3/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= +go.etcd.io/etcd v0.0.0-20191023171146-3cf2f69b5738/go.mod h1:dnLIgRNXwCJa5e+c6mIZCrds/GIG4ncV9HhK5PX7jPg= +go.opencensus.io v0.20.1/go.mod h1:6WKK9ahsWS3RSO+PY9ZHZUfv2irvY6gN279GOPZjmmk= +go.opencensus.io v0.20.2/go.mod h1:6WKK9ahsWS3RSO+PY9ZHZUfv2irvY6gN279GOPZjmmk= +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.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= +go.uber.org/atomic v1.5.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= +go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0= +go.uber.org/multierr v1.3.0/go.mod h1:VgVr7evmIr6uPjLBxg28wmKNXyqE9akIJ5XnfpiKl+4= +go.uber.org/tools v0.0.0-20190618225709-2cfd321de3ee/go.mod h1:vJERXedbb3MVM5f9Ejo0C68/HhF8uaILCdgjnY+goOA= +go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= +go.uber.org/zap v1.13.0/go.mod h1:zwrFLgMcdUuIBviXEYEH1YKNaOBnKXsx2IPda5bBwHM= +golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= +golang.org/x/crypto v0.0.0-20181029021203-45a5f77698d3/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= +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-20190611184440-5c40567a22f8/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20190701094942-4def268fd1a4/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/crypto v0.0.0-20201002170205-7f63de1d35b0 h1:hb9wdF1z5waM+dSIICn1l0DkLVDT3hqhhQsDNUmHPRE= +golang.org/x/crypto v0.0.0-20201002170205-7f63de1d35b0/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/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-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20181023162649-9b4f9f5ad519/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20181201002055-351d144fa1fc/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20181220203305-927f97764cc3/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-20190125091013-d26f9f9a57f3/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-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20190620200207-3b0461eec859/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-20190813141303-74dc4d7220e7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20190827160401-ba9fcec4b297/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-20200625001655-4c5254603344/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= +golang.org/x/net v0.0.0-20201110031124-69a78807bb2b h1:uwuIcX0g4Yl1NC5XAz37xsr2lTtcqevgzYNVt49waME= +golang.org/x/net v0.0.0-20201110031124-69a78807bb2b/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= +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 h1:TzXSXBo42m9gQenoE3b9BGiEpg5IG2JkU5FkPIawgtw= +golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= +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/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20181026203630-95b1ffbd15a5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20181107165924-66b7b1311ac8/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20181122145206-62eef0e2fa9b/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-20190422165155-953cdadca894/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-20190616124812-15dcb6c0061f/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-20190826190057-c7b8b68b1456/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191001151750-bb3f8db39f24/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191005200804-aed5e4c7ecf9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191220142924-d4481acd189f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191228213918-04cbcbbfeed8/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200106162015-b016eb3dc98e/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-20200615200032-f1bc736245b1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200625212154-ddb9806d33ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20201015000850-e3ed0017c211/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20201112073958-5cba982894dd h1:5CtCZbICpIOFdgO940moixOPjc0178IU44m4EjOO5IY= +golang.org/x/sys v0.0.0-20201112073958-5cba982894dd/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/text v0.3.4 h1:0YWbFKbhXG/wIiuHDSKpS0Iy7FSA+u45VtBMfQcFTTc= +golang.org/x/text v0.3.4/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/time v0.0.0-20180412165947-fbb02b2291d2/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +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/time v0.0.0-20200630173020-3af7569d3a1e/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/time v0.0.0-20201208040808-7e3f01d25324 h1:Hir2P/De0WpUhtrKGGjvSb2YxUgyZ7EFOSLIcSSpiwE= +golang.org/x/time v0.0.0-20201208040808-7e3f01d25324/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/tools v0.0.0-20180221164845-07fd8470d635/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20180828015842-6cd1fcedba52/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20181030221726-6c7e314b6563/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-20190328211700-ab21143f2384/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-20190614205625-5aca471b1d59/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-20191029041327-9cc4af7d6b2c/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191029190741-b9c20aec41a5/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-20200103221440-774c71fcf114/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-20200304193943-95d2e580d8eb/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= +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/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +google.golang.org/api v0.3.1/go.mod h1:6wY9I6uQWHQ8EM57III9mq/AjF+i8G65rmVagqKMtkk= +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.20.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= +google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= +google.golang.org/appengine v1.2.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= +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 h1:tycE03LOZYQNhDpS27tcQdAzLCVMaj7QT2SXxebnpCM= +google.golang.org/appengine v1.6.5/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-20190530194941-fb225487d101/go.mod h1:z3L6/3dTEVtUr6QSP8miRzeRqwQOioJ9I66odjN4I7s= +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-20200305110556-506484158171/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= +google.golang.org/grpc v1.17.0/go.mod h1:6QZJwpn2B+Zp71q/5VxRsJ6NXXVCE5NRUHRo+f3cWCs= +google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= +google.golang.org/grpc v1.20.0/go.mod h1:chYK+tFQF0nDUGJgXMSgLCQk3phJEuONr2DCgLDdAQM= +google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= +google.golang.org/grpc v1.21.0/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= +google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= +google.golang.org/grpc v1.22.1/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= +google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= +google.golang.org/grpc v1.23.1/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= +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/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.25.0 h1:Ejskq+SyPohKW+1uil0JJMtmHCgJPJ/qWTxr8qp+R4c= +google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= +gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= +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/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/cheggaaa/pb.v1 v1.0.25/go.mod h1:V/YB90LKu/1FcN3WVnfiiE5oMCibMjukxqG/qStrOgw= +gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= +gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= +gopkg.in/gcfg.v1 v1.2.3/go.mod h1:yesOnuUOFQAhST5vPY4nbZsb/huCgGGXlipJsBn0b3o= +gopkg.in/inf.v0 v0.9.1 h1:73M5CoZyi3ZLMOyDlQh031Cx6N9NDJ2Vvfl76EDAgDc= +gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw= +gopkg.in/resty.v1 v1.12.0/go.mod h1:mDo4pnntr5jdWRML875a/NmxYqAlA73dVijT2AXvQQo= +gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= +gopkg.in/warnings.v0 v0.1.2/go.mod h1:jksf8JmL6Qr/oQM2OXTHunEvvTAsrWBLb6OOjuVWRNI= +gopkg.in/yaml.v2 v2.0.0-20170812160011-eb3733d160e7/go.mod h1:JAlM8MvJe8wmxCU4Bli9HhUf9+ttbYbLASfIpnQbh74= +gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.5/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.8 h1:obN1ZagJSUGI0Ek/LBmuj4SNLPfIny3KsKFopxRdj10= +gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.3.0 h1:clyUAQHOM3G0M3f5vQj7LuJrETvjVot3Z5el9nffUtU= +gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +honnef.co/go/tools v0.0.0-20180728063816-88497007e858/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +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= +k8s.io/api v0.20.0 h1:WwrYoZNM1W1aQEbyl8HNG+oWGzLpZQBlcerS9BQw9yI= +k8s.io/api v0.20.0/go.mod h1:HyLC5l5eoS/ygQYl1BXBgFzWNlkHiAuyNAbevIn+FKg= +k8s.io/apimachinery v0.20.0 h1:jjzbTJRXk0unNS71L7h3lxGDH/2HPxMPaQY+MjECKL8= +k8s.io/apimachinery v0.20.0/go.mod h1:WlLqWAHZGg07AeltaI0MV5uk1Omp8xaN0JGLY6gkRpU= +k8s.io/client-go v0.20.0 h1:Xlax8PKbZsjX4gFvNtt4F5MoJ1V5prDvCuoq9B7iax0= +k8s.io/client-go v0.20.0/go.mod h1:4KWh/g+Ocd8KkCwKF8vUNnmqgv+EVnQDK4MBF4oB5tY= +k8s.io/client-go v1.5.1 h1:XaX/lo2/u3/pmFau8HN+sB5C/b4dc4Dmm2eXjBH4p1E= +k8s.io/client-go v11.0.0+incompatible h1:LBbX2+lOwY9flffWlJM7f1Ct8V2SRNiMRDFeiwnJo9o= +k8s.io/gengo v0.0.0-20200413195148-3a45101e95ac/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0= +k8s.io/klog v1.0.0 h1:Pt+yjF5aB1xDSVbau4VsWe+dQNzA0qv1LlXdC2dF6Q8= +k8s.io/klog v1.0.0/go.mod h1:4Bi6QPql/J/LkTDqv7R/cd3hPo4k2DG6Ptcz060Ez5I= +k8s.io/klog/v2 v2.0.0/go.mod h1:PBfzABfn139FHAV07az/IF9Wp1bkk3vpT2XSJ76fSDE= +k8s.io/klog/v2 v2.4.0 h1:7+X0fUguPyrKEC4WjH8iGDg3laWgMo5tMnRTIGTTxGQ= +k8s.io/klog/v2 v2.4.0/go.mod h1:Od+F08eJP+W3HUb4pSrPpgp9DGU4GzlpG/TmITuYh/Y= +k8s.io/kube-openapi v0.0.0-20201113171705-d219536bb9fd/go.mod h1:WOJ3KddDSol4tAGcJo0Tvi+dK12EcqSLqcWsryKMpfM= +k8s.io/utils v0.0.0-20201110183641-67b214c5f920 h1:CbnUZsM497iRC5QMVkHwyl8s2tB3g7yaSHkYPkpgelw= +k8s.io/utils v0.0.0-20201110183641-67b214c5f920/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= +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= +sigs.k8s.io/structured-merge-diff/v4 v4.0.2 h1:YHQV7Dajm86OuqnIR6zAelnDWBRjo+YhYV9PmGrh1s8= +sigs.k8s.io/structured-merge-diff/v4 v4.0.2/go.mod h1:bJZC9H9iH24zzfZ/41RGcq60oK1F7G282QMXDPYydCw= +sigs.k8s.io/yaml v1.1.0/go.mod h1:UJmg0vDUVViEyp3mgSv9WPwZCDxu4rQW1olrI1uml+o= +sigs.k8s.io/yaml v1.2.0 h1:kr/MCeFWJWTwyaHoR9c8EjH9OumOmoF9YGiZd7lFm/Q= +sigs.k8s.io/yaml v1.2.0/go.mod h1:yfXDCHCao9+ENCvLSE62v9VSji2MKu5jeNfTrofGhJc= +sourcegraph.com/sourcegraph/appdash v0.0.0-20190731080439-ebfcffb1b5c0/go.mod h1:hI742Nqp5OhwiqlzhgfbWU4mW4yO10fP+LoT9WOswdU= diff --git a/infrastructure/lib/go/k8s/util/BUILD b/infrastructure/lib/go/k8s/util/BUILD new file mode 100644 index 0000000000..c6387d371e --- /dev/null +++ b/infrastructure/lib/go/k8s/util/BUILD @@ -0,0 +1,16 @@ +# gazelle:prefix util +# gazelle:prefix k8s.io/kubernetes + +load("@io_bazel_rules_go//go:def.bzl", "go_library") + +go_library( + name = "util", + srcs = ["util.go"], + importpath = "github.com/airyhq/airy/infrastructure/lib/go/k8s/util", + visibility = ["//visibility:public"], + deps = [ + "@io_k8s_api//core/v1:core", + "@io_k8s_apimachinery//pkg/apis/meta/v1:meta", + "@io_k8s_klog//:klog", + ], +) diff --git a/infrastructure/lib/go/k8s/util/go.mod b/infrastructure/lib/go/k8s/util/go.mod new file mode 100644 index 0000000000..15d179076c --- /dev/null +++ b/infrastructure/lib/go/k8s/util/go.mod @@ -0,0 +1,9 @@ +module github.com/airyhq/airy/infrastructure/lib/go/k8s/util + +go 1.15 + +require ( + k8s.io/api v0.20.0 + k8s.io/apimachinery v0.20.0 + k8s.io/klog v1.0.0 +) diff --git a/infrastructure/lib/go/k8s/util/go.sum b/infrastructure/lib/go/k8s/util/go.sum new file mode 100644 index 0000000000..834457744a --- /dev/null +++ b/infrastructure/lib/go/k8s/util/go.sum @@ -0,0 +1,194 @@ +cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= +github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= +github.com/NYTimes/gziphandler v0.0.0-20170623195520-56545f4a5d46/go.mod h1:3wb06e3pkSAbeQ52E9H9iFoQsEEwGN64994WTCIhntQ= +github.com/PuerkitoBio/purell v1.1.1/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0= +github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578/go.mod h1:uGdkoq3SwY9Y+13GIhn11/XLaGBb4BfwItxLd5jeuXE= +github.com/asaskevich/govalidator v0.0.0-20190424111038-f61b66f89f4a/go.mod h1:lB+ZfQJz7igIIfQNfa7Ml4HSf2uFQQRzpGGRXenZAgY= +github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= +github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= +github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/docker/spdystream v0.0.0-20160310174837-449fdfce4d96/go.mod h1:Qh8CwZgvJUkLughtfhJv5dyTYa91l1fOUCrgjqmcifM= +github.com/docopt/docopt-go v0.0.0-20180111231733-ee0de3bc6815/go.mod h1:WwZ+bS3ebgob9U8Nd0kOddGdZWjyMGR8Wziv+TBNwSE= +github.com/elazarl/goproxy v0.0.0-20180725130230-947c36da3153/go.mod h1:/Zj4wYkgs4iZTTu3o/KG3Itv/qCCa8VVMlb3i9OVuzc= +github.com/emicklei/go-restful v0.0.0-20170410110728-ff4f55a20633/go.mod h1:otzb+WCGbkyDHkqmQmT5YD2WR4BBwUdeQoFo8l/7tVs= +github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= +github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= +github.com/evanphx/json-patch v4.9.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= +github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= +github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ= +github.com/ghodss/yaml v0.0.0-20150909031657-73d445a93680/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= +github.com/go-logr/logr v0.1.0/go.mod h1:ixOQHD9gLJUVQQ2ZOR7zLEifBX6tGkNJF4QyIY7sIas= +github.com/go-logr/logr v0.2.0 h1:QvGt2nLcHH0WK9orKa+ppBPAxREcH364nPUedEpK0TY= +github.com/go-logr/logr v0.2.0/go.mod h1:z6/tIYblkpsD+a4lm/fGIIU9mZ+XfAiaFtq7xTgseGU= +github.com/go-openapi/jsonpointer v0.19.2/go.mod h1:3akKfEdA7DF1sugOqz1dVQHBcuDBPKZGEoHC/NkiQRg= +github.com/go-openapi/jsonpointer v0.19.3/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg= +github.com/go-openapi/jsonreference v0.19.2/go.mod h1:jMjeRr2HHw6nAVajTXJ4eiUwohSTlpa0o73RUL1owJc= +github.com/go-openapi/jsonreference v0.19.3/go.mod h1:rjx6GuL8TTa9VaixXglHmQmIL98+wF9xc8zWvFonSJ8= +github.com/go-openapi/spec v0.19.3/go.mod h1:FpwSN1ksY1eteniUU7X0N/BgJ7a4WvBFVA8Lj9mJglo= +github.com/go-openapi/swag v0.19.2/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk= +github.com/go-openapi/swag v0.19.5/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk= +github.com/gogo/protobuf v1.3.1 h1:DqDEcV5aeaTmdFBePNpYsp3FlcVH/2ISVVM9Qf8PSls= +github.com/gogo/protobuf v1.3.1/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o= +github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= +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/protobuf v1.2.0/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.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.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= +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.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= +github.com/google/gofuzz v1.1.0 h1:Hsa8mG0dQ46ij8Sl2AYJDUv1oA9/d6Vk+3LG99Oe02g= +github.com/google/gofuzz v1.1.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= +github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/googleapis/gnostic v0.4.1/go.mod h1:LRhVm6pbyptWbWbuZ38d1eyptfvIytN3ir6b65WBswg= +github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= +github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= +github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= +github.com/json-iterator/go v1.1.10 h1:Kz6Cvnvv2wGdaG/V8yMvfkmNiXq9Ya2KUv4rouJJr68= +github.com/json-iterator/go v1.1.10/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= +github.com/kisielk/errcheck v1.2.0/go.mod h1:/BMXB+zMLi60iA8Vv6Ksmxu/1UDYcXs4uQLJ+jE2L00= +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/pretty v0.2.0/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= +github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= +github.com/kr/pty v1.1.5/go.mod h1:9r2w37qlBe7rQ6e1fg1S/9xpWHSnaqNdHD3WcMdbPDA= +github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= +github.com/mailru/easyjson v0.0.0-20190614124828-94de47d64c63/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= +github.com/mailru/easyjson v0.0.0-20190626092158-b2ccc519800e/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= +github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= +github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= +github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg= +github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= +github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= +github.com/modern-go/reflect2 v1.0.1 h1:9f412s+6RmYXLWZSEzVVgPGK7C2PphHj5RJrvfx9AWI= +github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= +github.com/munnerz/goautoneg v0.0.0-20120707110453-a547fc61f48d/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= +github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f/go.mod h1:ZdcZmHo+o7JKHSa8/e818NopupXU1YMK5fe1lsApnBw= +github.com/onsi/ginkgo v0.0.0-20170829012221-11459a886d9c/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= +github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= +github.com/onsi/ginkgo v1.11.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= +github.com/onsi/gomega v0.0.0-20170829124025-dcabb60a477c/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA= +github.com/onsi/gomega v1.7.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= +github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +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/sirupsen/logrus v1.7.0 h1:ShrD1U9pZB12TX0cVy0DtePoCH97K8EtX+mg7ZARUtM= +github.com/sirupsen/logrus v1.7.0/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= +github.com/spf13/pflag v0.0.0-20170130214245-9ff6c6923cff/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= +github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= +github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/objx v0.2.0/go.mod h1:qt09Ya8vawLte6SNmTgCsAVtYtaKzEcn8ATUoHMkEqE= +github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= +github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= +github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= +golang.org/x/crypto v0.0.0-20190611184440-5c40567a22f8/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/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-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +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-20180906233101-161cd47e91fd/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-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20190827160401-ba9fcec4b297/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-20201110031124-69a78807bb2b h1:uwuIcX0g4Yl1NC5XAz37xsr2lTtcqevgzYNVt49waME= +golang.org/x/net v0.0.0-20201110031124-69a78807bb2b/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= +golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= +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-20190423024810-112230192c58/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-20180909124046-d0be0721c37e/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-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190616124812-15dcb6c0061f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191005200804-aed5e4c7ecf9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20201112073958-5cba982894dd h1:5CtCZbICpIOFdgO940moixOPjc0178IU44m4EjOO5IY= +golang.org/x/sys v0.0.0-20201112073958-5cba982894dd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/text v0.3.0/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/text v0.3.4 h1:0YWbFKbhXG/wIiuHDSKpS0Iy7FSA+u45VtBMfQcFTTc= +golang.org/x/text v0.3.4/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20181030221726-6c7e314b6563/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-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= +golang.org/x/tools v0.0.0-20190614205625-5aca471b1d59/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +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/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= +google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= +google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= +google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= +google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= +google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= +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.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/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= +gopkg.in/inf.v0 v0.9.1 h1:73M5CoZyi3ZLMOyDlQh031Cx6N9NDJ2Vvfl76EDAgDc= +gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw= +gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= +gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.8 h1:obN1ZagJSUGI0Ek/LBmuj4SNLPfIny3KsKFopxRdj10= +gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +k8s.io/api v0.20.0 h1:WwrYoZNM1W1aQEbyl8HNG+oWGzLpZQBlcerS9BQw9yI= +k8s.io/api v0.20.0/go.mod h1:HyLC5l5eoS/ygQYl1BXBgFzWNlkHiAuyNAbevIn+FKg= +k8s.io/api v0.20.1 h1:ud1c3W3YNzGd6ABJlbFfKXBKXO+1KdGfcgGGNgFR03E= +k8s.io/api v0.20.1/go.mod h1:KqwcCVogGxQY3nBlRpwt+wpAMF/KjaCc7RpywacvqUo= +k8s.io/apimachinery v0.20.0 h1:jjzbTJRXk0unNS71L7h3lxGDH/2HPxMPaQY+MjECKL8= +k8s.io/apimachinery v0.20.0/go.mod h1:WlLqWAHZGg07AeltaI0MV5uk1Omp8xaN0JGLY6gkRpU= +k8s.io/apimachinery v0.20.1 h1:LAhz8pKbgR8tUwn7boK+b2HZdt7MiTu2mkYtFMUjTRQ= +k8s.io/apimachinery v0.20.1/go.mod h1:WlLqWAHZGg07AeltaI0MV5uk1Omp8xaN0JGLY6gkRpU= +k8s.io/gengo v0.0.0-20200413195148-3a45101e95ac/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0= +k8s.io/klog v1.0.0 h1:Pt+yjF5aB1xDSVbau4VsWe+dQNzA0qv1LlXdC2dF6Q8= +k8s.io/klog v1.0.0/go.mod h1:4Bi6QPql/J/LkTDqv7R/cd3hPo4k2DG6Ptcz060Ez5I= +k8s.io/klog/v2 v2.0.0/go.mod h1:PBfzABfn139FHAV07az/IF9Wp1bkk3vpT2XSJ76fSDE= +k8s.io/klog/v2 v2.4.0 h1:7+X0fUguPyrKEC4WjH8iGDg3laWgMo5tMnRTIGTTxGQ= +k8s.io/klog/v2 v2.4.0/go.mod h1:Od+F08eJP+W3HUb4pSrPpgp9DGU4GzlpG/TmITuYh/Y= +k8s.io/kube-openapi v0.0.0-20201113171705-d219536bb9fd/go.mod h1:WOJ3KddDSol4tAGcJo0Tvi+dK12EcqSLqcWsryKMpfM= +sigs.k8s.io/structured-merge-diff/v4 v4.0.2 h1:YHQV7Dajm86OuqnIR6zAelnDWBRjo+YhYV9PmGrh1s8= +sigs.k8s.io/structured-merge-diff/v4 v4.0.2/go.mod h1:bJZC9H9iH24zzfZ/41RGcq60oK1F7G282QMXDPYydCw= +sigs.k8s.io/yaml v1.1.0/go.mod h1:UJmg0vDUVViEyp3mgSv9WPwZCDxu4rQW1olrI1uml+o= +sigs.k8s.io/yaml v1.2.0/go.mod h1:yfXDCHCao9+ENCvLSE62v9VSji2MKu5jeNfTrofGhJc= diff --git a/infrastructure/lib/go/k8s/util/util.go b/infrastructure/lib/go/k8s/util/util.go new file mode 100644 index 0000000000..a024abce4e --- /dev/null +++ b/infrastructure/lib/go/k8s/util/util.go @@ -0,0 +1,105 @@ +package util + +import ( + "bytes" + "crypto/sha1" + "encoding/base64" + "fmt" + "io" + "reflect" + "sort" + "strings" + + meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + + v1 "k8s.io/api/core/v1" + "k8s.io/klog" +) + +//Config contains rolling upgrade configuration parameters +type Config struct { + Namespace string + ResourceName string + ResourceAnnotations map[string]string + Annotation string + SHAValue string + Type string +} + +// GenerateSHA from text +func GenerateSHA(data string) string { + hasher := sha1.New() + _, err := io.WriteString(hasher, data) + if err != nil { + klog.Errorf("Unable to write data in hash writer %v", err) + } + sha := hasher.Sum(nil) + return fmt.Sprintf("%x", sha) +} + +// GetSHAfromConfigmap generate SHA for a configmap +func GetSHAfromConfigmap(configmap *v1.ConfigMap) string { + values := []string{} + for k, v := range configmap.Data { + values = append(values, k+"="+v) + } + for k, v := range configmap.BinaryData { + values = append(values, k+"="+base64.StdEncoding.EncodeToString(v)) + } + sort.Strings(values) + return GenerateSHA(strings.Join(values, ";")) +} + +// InterfaceSlice converts an interface to an interface array +func InterfaceSlice(slice interface{}) []interface{} { + s := reflect.ValueOf(slice) + if s.Kind() != reflect.Slice { + klog.Errorf("InterfaceSlice() given a non-slice type") + } + + ret := make([]interface{}, s.Len()) + + for i := 0; i < s.Len(); i++ { + ret[i] = s.Index(i).Interface() + } + + return ret +} + +// Int32Ptr +func Int32Ptr(i int32) *int32 { return &i } + +// ConvertToEnvVarName converts the given text into a usable env var +// removing any special chars with '_' and transforming text to upper case +func ConvertToEnvVarName(text string) string { + var buffer bytes.Buffer + upper := strings.ToUpper(text) + lastCharValid := false + for i := 0; i < len(upper); i++ { + ch := upper[i] + if (ch >= 'A' && ch <= 'Z') || (ch >= '0' && ch <= '9') { + buffer.WriteString(string(ch)) + lastCharValid = true + } else { + if lastCharValid { + buffer.WriteString("_") + } + lastCharValid = false + } + } + return buffer.String() +} + +type ObjectMeta struct { + meta_v1.ObjectMeta +} + +func ToObjectMeta(kubernetesObject interface{}) ObjectMeta { + objectValue := reflect.ValueOf(kubernetesObject) + fieldName := reflect.TypeOf((*meta_v1.ObjectMeta)(nil)).Elem().Name() + field := objectValue.FieldByName(fieldName).Interface().(meta_v1.ObjectMeta) + + return ObjectMeta{ + ObjectMeta: field, + } +} diff --git a/infrastructure/network/ingress.yaml b/infrastructure/network/ingress.yaml index 85067cde3a..bce0ce57c2 100644 --- a/infrastructure/network/ingress.yaml +++ b/infrastructure/network/ingress.yaml @@ -2,7 +2,6 @@ kind: Ingress apiVersion: networking.k8s.io/v1 metadata: name: 'airy-core' - namespace: default spec: rules: - host: 'api.airy' diff --git a/infrastructure/scripts/conf.sh b/infrastructure/scripts/conf.sh index a1ba175833..59b00b0f68 100755 --- a/infrastructure/scripts/conf.sh +++ b/infrastructure/scripts/conf.sh @@ -2,45 +2,44 @@ set -eo pipefail IFS=$'\n\t' -source /vagrant/scripts/lib/k8s.sh -if [ -z ${AIRY_VERSION+x} ]; then - branch_name="$(git symbolic-ref HEAD 2>/dev/null)" || - branch_name="(unnamed branch)" # detached HEAD - - branch_name=${branch_name##refs/heads/} - case "$branch_name" in - develop ) - AIRY_VERSION=beta - ;; - release* ) - AIRY_VERSION=release - ;; - * ) - AIRY_VERSION=latest - ;; - esac +SCRIPT_PATH=$(cd "$(dirname "${BASH_SOURCE[0]}")" ; pwd -P) +INFRASTRUCTURE_PATH=$(cd ${SCRIPT_PATH}/../; pwd -P) + +if [[ ! -f ${INFRASTRUCTURE_PATH}/airy.conf ]]; then + echo "No airy.conf config file found" + exit 0 fi -kubectl delete pod startup-helper --force 2>/dev/null || true -kubectl run startup-helper --image busybox --command -- /bin/sh -c "tail -f /dev/null" -cd /vagrant/scripts +source ${INFRASTRUCTURE_PATH}/scripts/lib/k8s.sh + +DEPLOYED_AIRY_VERSION=`kubectl get configmap core-config -o jsonpath='{.data.APP_IMAGE_TAG}'` +if $(grep -q " appImageTag" ${INFRASTRUCTURE_PATH}/airy.conf); then + CONFIGURED_AIRY_VERSION=$(grep " appImageTag" ${INFRASTRUCTURE_PATH}/airy.conf | head -n 1 | awk '{ print $2}') +else + CONFIGURED_AIRY_VERSION="" +fi -if [ -f "/vagrant/airy.conf" ]; then - cp /vagrant/airy.conf ~/airy-core/helm-chart/charts/apps/values.yaml +if [ -z ${CONFIGURED_AIRY_VERSION} ]; then + AIRY_VERSION=${DEPLOYED_AIRY_VERSION} +else + AIRY_VERSION=${CONFIGURED_AIRY_VERSION} fi -helm upgrade airy ~/airy-core/helm-chart/ --set global.appImageTag=${AIRY_VERSION} --version 0.5.0 --timeout 1000s > /dev/null 2>&1 +kubectl delete pod startup-helper --force 2>/dev/null || true +kubectl run startup-helper --image busybox --command -- /bin/sh -c "tail -f /dev/null" + +helm upgrade core ${INFRASTRUCTURE_PATH}/helm-chart/ --values ${INFRASTRUCTURE_PATH}/airy.conf --set global.appImageTag=${AIRY_VERSION} --timeout 1000s > /dev/null 2>&1 -kubectl scale deployment airy-cp-schema-registry --replicas=1 +kubectl scale deployment schema-registry --replicas=1 wait-for-running-pod startup-helper -wait-for-service startup-helper airy-cp-schema-registry 8081 15 Schema-registry +wait-for-service startup-helper schema-registry 8081 15 "Schema registry" kubectl scale deployment -l type=api --replicas=1 kubectl scale deployment -l type=sources-chatplugin --replicas=1 kubectl scale deployment -l type=frontend --replicas=1 -wait-for-service startup-helper api-auth 80 10 Airy-auth +wait-for-service startup-helper api-auth 80 10 api-auth kubectl scale deployment -l type=sources-twilio --replicas=1 kubectl scale deployment -l type=sources-google --replicas=1 diff --git a/infrastructure/scripts/provision/core.sh b/infrastructure/scripts/provision/core.sh index b8cd0013de..3e99c62ee6 100755 --- a/infrastructure/scripts/provision/core.sh +++ b/infrastructure/scripts/provision/core.sh @@ -2,30 +2,26 @@ set -euo pipefail IFS=$'\n\t' -source /vagrant/scripts/lib/k8s.sh -APP_IMAGE_TAG="${AIRY_VERSION:-latest}" +SCRIPT_PATH=$(cd "$(dirname "${BASH_SOURCE[0]}")" ; pwd -P) +INFRASTRUCTURE_PATH=$(cd ${SCRIPT_PATH}/../../; pwd -P) -mkdir -p ~/airy-core -cd /vagrant -cp -u airy.conf.tpl airy.conf -cp -R /vagrant/helm-chart ~/airy-core/ +source ${INFRASTRUCTURE_PATH}/scripts/lib/k8s.sh +APP_IMAGE_TAG="${AIRY_VERSION:-latest}" echo "Deploying the Airy Core Platform with the ${APP_IMAGE_TAG} image tag" -cd /vagrant/scripts/ +cd ${INFRASTRUCTURE_PATH}/scripts/ wait-for-service-account -helm install airy ~/airy-core/helm-chart/ --set global.appImageTag=${APP_IMAGE_TAG} --version 0.5.0 --timeout 1000s > /dev/null 2>&1 +helm install core ${INFRASTRUCTURE_PATH}/helm-chart/ --set global.appImageTag=${APP_IMAGE_TAG} --version 0.5.0 --timeout 1000s > /dev/null 2>&1 kubectl run startup-helper --image busybox --command -- /bin/sh -c "tail -f /dev/null" -kubectl scale statefulset airy-cp-zookeeper --replicas=1 wait-for-running-pod startup-helper -wait-for-service startup-helper airy-cp-zookeeper 2181 15 ZooKeeper -kubectl scale statefulset airy-cp-kafka --replicas=1 -wait-for-service startup-helper airy-cp-kafka 9092 15 Kafka -kubectl cp provision/create-topics.sh airy-cp-kafka-0:/tmp -kubectl exec airy-cp-kafka-0 -- /tmp/create-topics.sh +wait-for-service startup-helper zookeeper 2181 15 ZooKeeper +wait-for-service startup-helper kafka 9092 15 Kafka +kubectl cp provision/create-topics.sh kafka-0:/tmp +kubectl exec kafka-0 -- /tmp/create-topics.sh kubectl scale deployment postgres --replicas=1 wait-for-service startup-helper postgres 5432 10 Postgres diff --git a/infrastructure/scripts/provision/create-topics.sh b/infrastructure/scripts/provision/create-topics.sh index dc8a925d8d..73e0549e04 100755 --- a/infrastructure/scripts/provision/create-topics.sh +++ b/infrastructure/scripts/provision/create-topics.sh @@ -7,7 +7,7 @@ set -euo pipefail IFS=$'\n\t' -ZOOKEEPER=airy-cp-zookeeper:2181 +ZOOKEEPER=zookeeper:2181 PARTITIONS=${PARTITIONS:-10} REPLICAS=${REPLICAS:-1} AIRY_CORE_NAMESPACE=${AIRY_CORE_NAMESPACE:-} @@ -21,23 +21,23 @@ then fi -kafka-topics --create --if-not-exists --zookeeper ${ZOOKEEPER} --replication-factor ${REPLICAS} --partitions ${PARTITIONS} --topic "${AIRY_CORE_NAMESPACE}application.communication.channels" 1>/dev/null +kafka-topics.sh --create --if-not-exists --zookeeper ${ZOOKEEPER} --replication-factor ${REPLICAS} --partitions ${PARTITIONS} --topic "${AIRY_CORE_NAMESPACE}application.communication.channels" 1>/dev/null -kafka-topics --create --if-not-exists --zookeeper ${ZOOKEEPER} --replication-factor ${REPLICAS} --partitions ${PARTITIONS} --topic "${AIRY_CORE_NAMESPACE}application.communication.messages" --config cleanup.policy=compact min.compaction.lag.ms=86400000 segment.bytes=10485760 1>/dev/null +kafka-topics.sh --create --if-not-exists --zookeeper ${ZOOKEEPER} --replication-factor ${REPLICAS} --partitions ${PARTITIONS} --topic "${AIRY_CORE_NAMESPACE}application.communication.messages" --config cleanup.policy=compact min.compaction.lag.ms=86400000 segment.bytes=10485760 1>/dev/null -kafka-topics --create --if-not-exists --zookeeper ${ZOOKEEPER} --replication-factor ${REPLICAS} --partitions ${PARTITIONS} --topic "${AIRY_CORE_NAMESPACE}application.communication.metadata" --config cleanup.policy=compact min.compaction.lag.ms=86400000 segment.bytes=10485760 1>/dev/null +kafka-topics.sh --create --if-not-exists --zookeeper ${ZOOKEEPER} --replication-factor ${REPLICAS} --partitions ${PARTITIONS} --topic "${AIRY_CORE_NAMESPACE}application.communication.metadata" --config cleanup.policy=compact min.compaction.lag.ms=86400000 segment.bytes=10485760 1>/dev/null -kafka-topics --create --if-not-exists --zookeeper ${ZOOKEEPER} --replication-factor ${REPLICAS} --partitions ${PARTITIONS} --topic "${AIRY_CORE_NAMESPACE}application.communication.read-receipt" --config cleanup.policy=compact min.compaction.lag.ms=86400000 segment.bytes=10485760 1>/dev/null +kafka-topics.sh --create --if-not-exists --zookeeper ${ZOOKEEPER} --replication-factor ${REPLICAS} --partitions ${PARTITIONS} --topic "${AIRY_CORE_NAMESPACE}application.communication.read-receipt" --config cleanup.policy=compact min.compaction.lag.ms=86400000 segment.bytes=10485760 1>/dev/null -kafka-topics --create --if-not-exists --zookeeper ${ZOOKEEPER} --replication-factor ${REPLICAS} --partitions ${PARTITIONS} --topic "${AIRY_CORE_NAMESPACE}application.communication.tags" --config cleanup.policy=compact min.compaction.lag.ms=86400000 segment.bytes=10485760 1>/dev/null +kafka-topics.sh --create --if-not-exists --zookeeper ${ZOOKEEPER} --replication-factor ${REPLICAS} --partitions ${PARTITIONS} --topic "${AIRY_CORE_NAMESPACE}application.communication.tags" --config cleanup.policy=compact min.compaction.lag.ms=86400000 segment.bytes=10485760 1>/dev/null -kafka-topics --create --if-not-exists --zookeeper ${ZOOKEEPER} --replication-factor ${REPLICAS} --partitions ${PARTITIONS} --topic "${AIRY_CORE_NAMESPACE}application.communication.webhooks" 1>/dev/null +kafka-topics.sh --create --if-not-exists --zookeeper ${ZOOKEEPER} --replication-factor ${REPLICAS} --partitions ${PARTITIONS} --topic "${AIRY_CORE_NAMESPACE}application.communication.webhooks" 1>/dev/null -kafka-topics --create --if-not-exists --zookeeper ${ZOOKEEPER} --replication-factor ${REPLICAS} --partitions ${PARTITIONS} --topic "${AIRY_CORE_NAMESPACE}ops.application.health" --config retention.ms=3600000 1>/dev/null +kafka-topics.sh --create --if-not-exists --zookeeper ${ZOOKEEPER} --replication-factor ${REPLICAS} --partitions ${PARTITIONS} --topic "${AIRY_CORE_NAMESPACE}ops.application.health" --config retention.ms=3600000 1>/dev/null -kafka-topics --create --if-not-exists --zookeeper ${ZOOKEEPER} --replication-factor ${REPLICAS} --partitions ${PARTITIONS} --topic "${AIRY_CORE_NAMESPACE}source.facebook.events" 1>/dev/null +kafka-topics.sh --create --if-not-exists --zookeeper ${ZOOKEEPER} --replication-factor ${REPLICAS} --partitions ${PARTITIONS} --topic "${AIRY_CORE_NAMESPACE}source.facebook.events" 1>/dev/null -kafka-topics --create --if-not-exists --zookeeper ${ZOOKEEPER} --replication-factor ${REPLICAS} --partitions ${PARTITIONS} --topic "${AIRY_CORE_NAMESPACE}source.google.events" 1>/dev/null +kafka-topics.sh --create --if-not-exists --zookeeper ${ZOOKEEPER} --replication-factor ${REPLICAS} --partitions ${PARTITIONS} --topic "${AIRY_CORE_NAMESPACE}source.google.events" 1>/dev/null -kafka-topics --create --if-not-exists --zookeeper ${ZOOKEEPER} --replication-factor ${REPLICAS} --partitions ${PARTITIONS} --topic "${AIRY_CORE_NAMESPACE}source.twilio.events" 1>/dev/null +kafka-topics.sh --create --if-not-exists --zookeeper ${ZOOKEEPER} --replication-factor ${REPLICAS} --partitions ${PARTITIONS} --topic "${AIRY_CORE_NAMESPACE}source.twilio.events" 1>/dev/null diff --git a/infrastructure/scripts/provision/prerequisites.sh b/infrastructure/scripts/provision/prerequisites.sh index cd30368228..16d16d04d2 100755 --- a/infrastructure/scripts/provision/prerequisites.sh +++ b/infrastructure/scripts/provision/prerequisites.sh @@ -21,12 +21,15 @@ mkdir -p /root/.kube ln -s /etc/rancher/k3s/k3s.yaml /root/.kube/config chmod o+r /etc/rancher/k3s/k3s.yaml -cat < /home/vagrant/.profile +if [[ -d /home/vagrant ]] +then + cat < /home/vagrant/.profile . /etc/profile . <(kubectl completion bash) alias k=kubectl complete -F __start_kubectl k EOF +fi cat < /root/.profile . /etc/profile diff --git a/infrastructure/scripts/status.sh b/infrastructure/scripts/status.sh index 8a48e8f626..062259b724 100755 --- a/infrastructure/scripts/status.sh +++ b/infrastructure/scripts/status.sh @@ -2,18 +2,22 @@ set -euo pipefail IFS=$'\n\t' -source /vagrant/scripts/lib/k8s.sh +SCRIPT_PATH=$(cd "$(dirname "${BASH_SOURCE[0]}")" ; pwd -P) +INFRASTRUCTURE_PATH=$(cd ${SCRIPT_PATH}/../; pwd -P) + +source ${INFRASTRUCTURE_PATH}/scripts/lib/k8s.sh kubectl delete pod startup-helper --force 2>/dev/null || true kubectl run startup-helper --image busybox --command -- /bin/sh -c "tail -f /dev/null" wait-for-ingress-service wait-for-running-pod startup-helper -wait-for-service startup-helper api-auth 80 10 Airy-auth +wait-for-service startup-helper api-auth 80 10 api-auth -FACEBOOK_WEBHOOK_PUBLIC_URL=`kubectl get configmap sources-config -o jsonpath='{.data.FACEBOOK_WEBHOOK_PUBLIC_URL}'` -GOOGLE_WEBHOOK_PUBLIC_URL=`kubectl get configmap sources-config -o jsonpath='{.data.GOOGLE_WEBHOOK_PUBLIC_URL}'` -TWILIO_WEBHOOK_PUBLIC_URL=`kubectl get configmap sources-config -o jsonpath='{.data.TWILIO_WEBHOOK_PUBLIC_URL}'` +CORE_ID=`kubectl get configmap core-config -o jsonpath='{.data.CORE_ID}'` +FACEBOOK_WEBHOOK_PUBLIC_URL="https://fb-${CORE_ID}.tunnel.airy.co" +GOOGLE_WEBHOOK_PUBLIC_URL="https://gl-${CORE_ID}.tunnel.airy.co" +TWILIO_WEBHOOK_PUBLIC_URL="https://tw-${CORE_ID}.tunnel.airy.co" echo echo "Your public url for the Facebook Webhook is:" diff --git a/infrastructure/scripts/trigger/start.sh b/infrastructure/scripts/trigger/start.sh index 0eba276c6b..7956bad5f0 100755 --- a/infrastructure/scripts/trigger/start.sh +++ b/infrastructure/scripts/trigger/start.sh @@ -2,29 +2,32 @@ set -euo pipefail IFS=$'\n\t' -source /vagrant/scripts/lib/k8s.sh +SCRIPT_PATH=$(cd "$(dirname "${BASH_SOURCE[0]}")" ; pwd -P) +INFRASTRUCTURE_PATH=$(cd ${SCRIPT_PATH}/../../; pwd -P) + +source ${INFRASTRUCTURE_PATH}/scripts/lib/k8s.sh kubectl delete pod startup-helper --force 2>/dev/null || true kubectl run startup-helper --image busybox --command -- /bin/sh -c "tail -f /dev/null" wait-for-running-pod startup-helper -kubectl scale statefulset airy-cp-zookeeper --replicas=1 -wait-for-service startup-helper airy-cp-zookeeper 2181 15 Zookeeper -kubectl scale statefulset airy-cp-kafka --replicas=1 -wait-for-service startup-helper airy-cp-kafka 9092 15 Kafka +kubectl scale statefulset zookeeper --replicas=1 +wait-for-service startup-helper zookeeper 2181 15 Zookeeper +kubectl scale statefulset kafka --replicas=1 +wait-for-service startup-helper kafka 9092 15 Kafka kubectl scale statefulset redis-cluster --replicas=1 wait-for-service startup-helper redis-cluster 6379 10 Redis kubectl scale deployment postgres --replicas=1 wait-for-service startup-helper postgres 5432 10 Postgres -kubectl scale deployment airy-cp-schema-registry --replicas=1 -wait-for-service startup-helper airy-cp-schema-registry 8081 15 Schema-registry +kubectl scale deployment schema-registry --replicas=1 +wait-for-service startup-helper schema-registry 8081 15 "Schema registry" echo "Starting up Airy Core Platform appplications" kubectl scale deployment -l type=api --replicas=1 kubectl scale deployment -l type=sources-chatplugin --replicas=1 kubectl scale deployment -l type=frontend --replicas=1 -wait-for-service startup-helper api-auth 80 10 Airy-auth +wait-for-service startup-helper api-auth 80 10 api-auth kubectl scale deployment -l type=sources-twilio --replicas=1 kubectl scale deployment -l type=sources-google --replicas=1 diff --git a/infrastructure/scripts/trigger/stop.sh b/infrastructure/scripts/trigger/stop.sh index aad97ef76f..cbe03d2f9c 100755 --- a/infrastructure/scripts/trigger/stop.sh +++ b/infrastructure/scripts/trigger/stop.sh @@ -11,8 +11,8 @@ kubectl scale deployment -l type=sources-chatplugin --replicas=0 kubectl scale deployment -l type=webhook --replicas=0 kubectl scale deployment -l type=sources-chatplugin --replicas=0 kubectl scale deployment -l type=api --replicas=0 -kubectl scale deployment airy-cp-schema-registry --replicas=0 -kubectl scale statefulset airy-cp-kafka --replicas=0 -kubectl scale statefulset airy-cp-zookeeper --replicas=0 +kubectl scale deployment schema-registry --replicas=0 +kubectl scale statefulset kafka --replicas=0 +kubectl scale statefulset zookeeper --replicas=0 kubectl scale deployment postgres --replicas=0 kubectl scale statefulset redis-cluster --replicas=0 diff --git a/infrastructure/tools/kafka-client.yaml b/infrastructure/tools/kafka-client.yaml index 03f7e6231a..dbf37e6f25 100644 --- a/infrastructure/tools/kafka-client.yaml +++ b/infrastructure/tools/kafka-client.yaml @@ -2,7 +2,7 @@ apiVersion: v1 kind: Pod metadata: name: kafka-client - namespace: default + namespace: {{ .Values.global.namespace }} spec: containers: - name: kafka-client diff --git a/infrastructure/tools/topics/src/main/java/co/airy/tools/topics/Application.java b/infrastructure/tools/topics/src/main/java/co/airy/tools/topics/Application.java index 058e09d3fe..e88b7149e2 100644 --- a/infrastructure/tools/topics/src/main/java/co/airy/tools/topics/Application.java +++ b/infrastructure/tools/topics/src/main/java/co/airy/tools/topics/Application.java @@ -12,7 +12,7 @@ public class Application { public static void main(String[] args) { - String createTopicTemplate = "kafka-topics --create --if-not-exists --zookeeper ${ZOOKEEPER} --replication-factor ${REPLICAS} --partitions ${PARTITIONS} --topic \"${AIRY_CORE_NAMESPACE}%s\" %s 1>/dev/null"; + String createTopicTemplate = "kafka-topics.sh --create --if-not-exists --zookeeper ${ZOOKEEPER} --replication-factor ${REPLICAS} --partitions ${PARTITIONS} --topic \"${AIRY_CORE_NAMESPACE}%s\" %s 1>/dev/null"; String headerTemplate = "#!/bin/bash\n" + "\n" + "##########################################################################\n" + @@ -22,7 +22,7 @@ public static void main(String[] args) { "set -euo pipefail\n" + "IFS=$'\\n\\t'\n" + "\n" + - "ZOOKEEPER=airy-cp-zookeeper:2181\n" + + "ZOOKEEPER=zookeeper:2181\n" + "PARTITIONS=${PARTITIONS:-10}\n" + "REPLICAS=${REPLICAS:-1}\n" + "AIRY_CORE_NAMESPACE=${AIRY_CORE_NAMESPACE:-}\n" + diff --git a/lib/go/apiclient/go.mod b/lib/go/apiclient/go.mod deleted file mode 100644 index 03945cb45c..0000000000 --- a/lib/go/apiclient/go.mod +++ /dev/null @@ -1,8 +0,0 @@ -module github.com/airyhq/airy/lib/go/apiclient - -go 1.12 - -require ( - github.com/stretchr/testify v1.6.1 - goji.io v2.0.2+incompatible -) diff --git a/lib/go/apiclient/payloads/go.mod b/lib/go/apiclient/payloads/go.mod deleted file mode 100644 index 0e6009a556..0000000000 --- a/lib/go/apiclient/payloads/go.mod +++ /dev/null @@ -1,3 +0,0 @@ -module github.com/airyhq/airy/lib/go/apiclient/payloads - -go 1.12 diff --git a/lib/go/apiclient/BUILD b/lib/go/httpclient/BUILD similarity index 50% rename from lib/go/apiclient/BUILD rename to lib/go/httpclient/BUILD index 786605d4df..01b9934a9b 100644 --- a/lib/go/apiclient/BUILD +++ b/lib/go/httpclient/BUILD @@ -1,15 +1,14 @@ -# gazelle:prefix apiclient +# gazelle:prefix httpclient # gazelle:importmap_prefix lib/go load("@io_bazel_rules_go//go:def.bzl", "go_library") go_library( - name = "apiclient", + name = "httpclient", srcs = [ - "apiclient.go", + "httpclient.go", "users.go", ], - importmap = "lib/go", - importpath = "apiclient", + importpath = "github.com/airyhq/airy/lib/go/httpclient", visibility = ["//visibility:public"], - deps = ["//lib/go/apiclient/payloads"], + deps = ["//lib/go/httpclient/payloads"], ) diff --git a/lib/go/httpclient/go.mod b/lib/go/httpclient/go.mod new file mode 100644 index 0000000000..763d31dd04 --- /dev/null +++ b/lib/go/httpclient/go.mod @@ -0,0 +1,5 @@ +module github.com/airyhq/airy/lib/go/httpclient + +go 1.12 + +require github.com/stretchr/testify v1.6.1 diff --git a/lib/go/apiclient/go.sum b/lib/go/httpclient/go.sum similarity index 85% rename from lib/go/apiclient/go.sum rename to lib/go/httpclient/go.sum index 5c8284cf73..afe7890c9a 100644 --- a/lib/go/apiclient/go.sum +++ b/lib/go/httpclient/go.sum @@ -5,8 +5,7 @@ github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZN github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/testify v1.6.1 h1:hDPOHmpOpP40lSULcqw7IrRb/u7w6RpDC9399XyoNd0= github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= -goji.io v2.0.2+incompatible h1:uIssv/elbKRLznFUy3Xj4+2Mz/qKhek/9aZQDUMae7c= -goji.io v2.0.2+incompatible/go.mod h1:sbqFwrtqZACxLBTQcdgVjFh54yGVCvwq8+w49MVMMIk= +gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c h1:dUUwHk2QECo/6vqA44rthZ8ie2QXMNeKRTHCNY2nXvo= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= diff --git a/lib/go/apiclient/api-client-test/BUILD b/lib/go/httpclient/http-client-test/BUILD similarity index 59% rename from lib/go/apiclient/api-client-test/BUILD rename to lib/go/httpclient/http-client-test/BUILD index 8503cff8b3..3a4a8ebe15 100644 --- a/lib/go/apiclient/api-client-test/BUILD +++ b/lib/go/httpclient/http-client-test/BUILD @@ -1,11 +1,11 @@ load("@io_bazel_rules_go//go:def.bzl", "go_test") go_test( - name = "api-client-test_test", + name = "http-client-test_test", srcs = ["users_test.go"], deps = [ - "//lib/go/apiclient", - "//lib/go/apiclient/payloads", + "//lib/go/httpclient", + "//lib/go/httpclient/payloads", "@com_github_stretchr_testify//assert", ], ) diff --git a/lib/go/apiclient/api-client-test/users_test.go b/lib/go/httpclient/http-client-test/users_test.go similarity index 92% rename from lib/go/apiclient/api-client-test/users_test.go rename to lib/go/httpclient/http-client-test/users_test.go index 0dd8e8b295..e2cb5ea19f 100644 --- a/lib/go/apiclient/api-client-test/users_test.go +++ b/lib/go/httpclient/http-client-test/users_test.go @@ -1,18 +1,19 @@ package tests import ( - "apiclient" - "apiclient/payloads" "fmt" "net/http" "net/http/httptest" "testing" + "github.com/airyhq/airy/lib/go/httpclient" + "github.com/airyhq/airy/lib/go/httpclient/payloads" + "github.com/stretchr/testify/assert" ) func TestSignup(t *testing.T) { - c := apiclient.NewClient() + c := httpclient.NewClient() ts := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { fmt.Fprintln(w, "{\"id\":\"a6c413a7-8d42-4c2b-8736-d033134eec59\",\"first_name\":\"Grace\",\"last_name\":\"Hopper\",\"token\":\"eyJhbGciOiJIUzI1NiJ9.eyJqdGkiOiJhNmM0MTNhNy04ZDQyLTRjMmItODczNi1kMDMzMTM0ZWVjNTkiLCJzdWIiOiJhNmM0MTNhNy04ZDQyLTRjMmItODczNi1kMDMzMTM0ZWVjNTkiLCJpYXQiOjE2MDczMzY2NjMsInVzZXJfaWQiOiJhNmM0MTNhNy04ZDQyLTRjMmItODczNi1kMDMzMTM0ZWVjNTkiLCJleHAiOjE2MDc0MjMwNjN9.I4sf2j36RQCPRrirzSYyRhJ4U3bG2sUmHfxX4yBJvQA\"}") @@ -31,7 +32,7 @@ func TestSignup(t *testing.T) { } func TestLogin(t *testing.T) { - c := apiclient.NewClient() + c := httpclient.NewClient() ts := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { fmt.Fprintln(w, "{\"id\":\"a6c413a7-8d42-4c2b-8736-d033134eec59\",\"first_name\":\"Grace\",\"last_name\":\"Hopper\",\"token\":\"eyJhbGciOiJIUzI1NiJ9.eyJqdGkiOiJhNmM0MTNhNy04ZDQyLTRjMmItODczNi1kMDMzMTM0ZWVjNTkiLCJzdWIiOiJhNmM0MTNhNy04ZDQyLTRjMmItODczNi1kMDMzMTM0ZWVjNTkiLCJpYXQiOjE2MDczMzY2NjMsInVzZXJfaWQiOiJhNmM0MTNhNy04ZDQyLTRjMmItODczNi1kMDMzMTM0ZWVjNTkiLCJleHAiOjE2MDc0MjMwNjN9.I4sf2j36RQCPRrirzSYyRhJ4U3bG2sUmHfxX4yBJvQA\"}") diff --git a/lib/go/apiclient/apiclient.go b/lib/go/httpclient/httpclient.go similarity index 98% rename from lib/go/apiclient/apiclient.go rename to lib/go/httpclient/httpclient.go index 8270630366..f557d556a9 100644 --- a/lib/go/apiclient/apiclient.go +++ b/lib/go/httpclient/httpclient.go @@ -1,4 +1,4 @@ -package apiclient +package httpclient import ( "bytes" diff --git a/lib/go/apiclient/payloads/BUILD b/lib/go/httpclient/payloads/BUILD similarity index 78% rename from lib/go/apiclient/payloads/BUILD rename to lib/go/httpclient/payloads/BUILD index a5de8df673..e313270567 100644 --- a/lib/go/apiclient/payloads/BUILD +++ b/lib/go/httpclient/payloads/BUILD @@ -8,7 +8,6 @@ go_library( "signup_request.go", "signup_response.go", ], - importmap = "lib/go/payloads", - importpath = "apiclient/payloads", + importpath = "github.com/airyhq/airy/lib/go/httpclient/payloads", visibility = ["//visibility:public"], ) diff --git a/lib/go/apiclient/payloads/login_request.go b/lib/go/httpclient/payloads/login_request.go similarity index 100% rename from lib/go/apiclient/payloads/login_request.go rename to lib/go/httpclient/payloads/login_request.go diff --git a/lib/go/apiclient/payloads/login_response.go b/lib/go/httpclient/payloads/login_response.go similarity index 100% rename from lib/go/apiclient/payloads/login_response.go rename to lib/go/httpclient/payloads/login_response.go diff --git a/lib/go/apiclient/payloads/signup_request.go b/lib/go/httpclient/payloads/signup_request.go similarity index 100% rename from lib/go/apiclient/payloads/signup_request.go rename to lib/go/httpclient/payloads/signup_request.go diff --git a/lib/go/apiclient/payloads/signup_response.go b/lib/go/httpclient/payloads/signup_response.go similarity index 100% rename from lib/go/apiclient/payloads/signup_response.go rename to lib/go/httpclient/payloads/signup_response.go diff --git a/lib/go/apiclient/users.go b/lib/go/httpclient/users.go similarity index 91% rename from lib/go/apiclient/users.go rename to lib/go/httpclient/users.go index b4b290669a..9c858be202 100644 --- a/lib/go/apiclient/users.go +++ b/lib/go/httpclient/users.go @@ -1,8 +1,9 @@ -package apiclient +package httpclient import ( - "apiclient/payloads" "encoding/json" + + "github.com/airyhq/airy/lib/go/httpclient/payloads" ) func (c *Client) Signup(signupRequestPayload payloads.SignupRequestPayload) (*payloads.SignupResponsePayload, error) { diff --git a/lib/java/mapping/src/main/java/co/airy/mapping/ContentMapper.java b/lib/java/mapping/src/main/java/co/airy/mapping/ContentMapper.java index 64b07e940f..533b85b4aa 100644 --- a/lib/java/mapping/src/main/java/co/airy/mapping/ContentMapper.java +++ b/lib/java/mapping/src/main/java/co/airy/mapping/ContentMapper.java @@ -4,10 +4,13 @@ import co.airy.avro.communication.SenderType; import co.airy.log.AiryLoggerFactory; import co.airy.mapping.model.Content; +import co.airy.mapping.model.DataUrl; import co.airy.mapping.model.Text; import org.slf4j.Logger; +import org.springframework.beans.factory.annotation.Value; import org.springframework.stereotype.Component; +import java.net.URL; import java.util.HashMap; import java.util.List; import java.util.Map; @@ -18,7 +21,8 @@ public class ContentMapper { private final Map mappers = new HashMap<>(); private final OutboundMapper outboundMapper; - public ContentMapper(List sourceMappers, OutboundMapper outboundMapper) { + public ContentMapper(List sourceMappers, + OutboundMapper outboundMapper) { for (SourceMapper mapper : sourceMappers) { mapper.getIdentifiers().forEach((identifier) -> mappers.put(identifier, mapper)); } @@ -26,6 +30,10 @@ public ContentMapper(List sourceMappers, OutboundMapper outboundMa } public List render(Message message) throws Exception { + return render(message, Map.of()); + } + + public List render(Message message, Map metadata) throws Exception { if (SenderType.APP_USER.equals(message.getSenderType()) || "chat_plugin".equals(message.getSource())) { return outboundMapper.render(message.getContent()); } @@ -35,12 +43,34 @@ public List render(Message message) throws Exception { throw new Exception("can not map message source " + message.getSource()); } - return sourceMapper.render(message.getContent()); + final List contentList = sourceMapper.render(message.getContent()); + + /* + * Source content can contain data urls that expire. Therefore we upload this data + * to a user provided storage and dynamically replace the urls here in the mapper + */ + for (Content content : contentList) { + // Replace the url if the metadata contains a key "data_{source url}" + if (content instanceof DataUrl) { + final String dataKey = String.format("data_%s", ((DataUrl) content).getUrl()); + final String persistentUrl = metadata.get(dataKey); + + if (persistentUrl != null) { + ((DataUrl) content).setUrl(persistentUrl); + } + } + } + + return contentList; } public List renderWithDefaultAndLog(Message message) { + return renderWithDefaultAndLog(message, Map.of()); + } + + public List renderWithDefaultAndLog(Message message, Map metadata) { try { - return this.render(message); + return this.render(message, metadata); } catch (Exception e) { log.error("Failed to render message {}", message, e); return List.of(new Text("This content cannot be displayed")); diff --git a/lib/java/mapping/src/main/java/co/airy/mapping/model/Audio.java b/lib/java/mapping/src/main/java/co/airy/mapping/model/Audio.java new file mode 100644 index 0000000000..dbc8f89f2a --- /dev/null +++ b/lib/java/mapping/src/main/java/co/airy/mapping/model/Audio.java @@ -0,0 +1,21 @@ +package co.airy.mapping.model; + +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.NoArgsConstructor; + +import javax.validation.constraints.NotNull; +import java.io.Serializable; + +@Data +@Builder +@NoArgsConstructor +@AllArgsConstructor +@EqualsAndHashCode(callSuper = false) +public class Audio extends Content implements DataUrl, Serializable { + @NotNull + private String url; +} + diff --git a/lib/java/mapping/src/main/java/co/airy/mapping/model/Content.java b/lib/java/mapping/src/main/java/co/airy/mapping/model/Content.java index 8f556fb313..ffb4681b99 100644 --- a/lib/java/mapping/src/main/java/co/airy/mapping/model/Content.java +++ b/lib/java/mapping/src/main/java/co/airy/mapping/model/Content.java @@ -5,7 +5,11 @@ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "type") @JsonSubTypes({ - @JsonSubTypes.Type(value = Text.class, name = "text") + @JsonSubTypes.Type(value = Text.class, name = "text"), + @JsonSubTypes.Type(value = Audio.class, name = "audio"), + @JsonSubTypes.Type(value = File.class, name = "file"), + @JsonSubTypes.Type(value = Image.class, name = "image"), + @JsonSubTypes.Type(value = Video.class, name = "video") }) public abstract class Content { } diff --git a/lib/java/mapping/src/main/java/co/airy/mapping/model/DataUrl.java b/lib/java/mapping/src/main/java/co/airy/mapping/model/DataUrl.java new file mode 100644 index 0000000000..f846ae8fef --- /dev/null +++ b/lib/java/mapping/src/main/java/co/airy/mapping/model/DataUrl.java @@ -0,0 +1,6 @@ +package co.airy.mapping.model; + +public interface DataUrl { + void setUrl(String url); + String getUrl(); +} diff --git a/lib/java/mapping/src/main/java/co/airy/mapping/model/File.java b/lib/java/mapping/src/main/java/co/airy/mapping/model/File.java new file mode 100644 index 0000000000..85281ca518 --- /dev/null +++ b/lib/java/mapping/src/main/java/co/airy/mapping/model/File.java @@ -0,0 +1,21 @@ +package co.airy.mapping.model; + +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.NoArgsConstructor; + +import javax.validation.constraints.NotNull; +import java.io.Serializable; + +@Data +@Builder +@NoArgsConstructor +@AllArgsConstructor +@EqualsAndHashCode(callSuper = false) +public class File extends Content implements DataUrl, Serializable { + @NotNull + private String url; +} + diff --git a/lib/java/mapping/src/main/java/co/airy/mapping/model/Image.java b/lib/java/mapping/src/main/java/co/airy/mapping/model/Image.java index ac22624d0c..622c0ea4df 100644 --- a/lib/java/mapping/src/main/java/co/airy/mapping/model/Image.java +++ b/lib/java/mapping/src/main/java/co/airy/mapping/model/Image.java @@ -14,7 +14,7 @@ @NoArgsConstructor @AllArgsConstructor @EqualsAndHashCode(callSuper = false) -public class Image extends Content implements Serializable { +public class Image extends Content implements DataUrl, Serializable { @NotNull private String url; } diff --git a/lib/java/mapping/src/main/java/co/airy/mapping/model/Video.java b/lib/java/mapping/src/main/java/co/airy/mapping/model/Video.java new file mode 100644 index 0000000000..e4db5ced10 --- /dev/null +++ b/lib/java/mapping/src/main/java/co/airy/mapping/model/Video.java @@ -0,0 +1,21 @@ +package co.airy.mapping.model; + +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.NoArgsConstructor; + +import javax.validation.constraints.NotNull; +import java.io.Serializable; + +@Data +@Builder +@NoArgsConstructor +@AllArgsConstructor +@EqualsAndHashCode(callSuper = false) +public class Video extends Content implements DataUrl, Serializable { + @NotNull + private String url; +} + diff --git a/lib/java/mapping/src/main/java/co/airy/mapping/sources/facebook/FacebookMapper.java b/lib/java/mapping/src/main/java/co/airy/mapping/sources/facebook/FacebookMapper.java index 1f0aca4db4..0c8c10fb0b 100644 --- a/lib/java/mapping/src/main/java/co/airy/mapping/sources/facebook/FacebookMapper.java +++ b/lib/java/mapping/src/main/java/co/airy/mapping/sources/facebook/FacebookMapper.java @@ -1,15 +1,20 @@ package co.airy.mapping.sources.facebook; import co.airy.mapping.SourceMapper; +import co.airy.mapping.model.Audio; import co.airy.mapping.model.Content; +import co.airy.mapping.model.File; import co.airy.mapping.model.Image; import co.airy.mapping.model.Text; +import co.airy.mapping.model.Video; import com.fasterxml.jackson.databind.JsonNode; import com.fasterxml.jackson.databind.ObjectMapper; import org.springframework.stereotype.Component; import java.util.ArrayList; import java.util.List; +import java.util.Map; +import java.util.function.Function; @Component public class FacebookMapper implements SourceMapper { @@ -20,6 +25,12 @@ public FacebookMapper() { this.objectMapper = new ObjectMapper(); } + private final Map> mediaContentFactory = Map.of( + "image", Image::new, + "video", Video::new, + "audio", Audio::new, + "file", File::new + ); @Override public List getIdentifiers() { return List.of("facebook"); @@ -40,9 +51,11 @@ public List render(String payload) throws Exception { messageNode.get("attachments") .elements() .forEachRemaining(attachmentNode -> { - if ("image".equalsIgnoreCase(attachmentNode.get("type").textValue())) { - contents.add(new Image(attachmentNode.get("payload").get("url").textValue())); - } + final String attachmentType = attachmentNode.get("type").textValue(); + final String url = attachmentNode.get("payload").get("url").textValue(); + + final Content mediaContent = mediaContentFactory.get(attachmentType).apply(url); + contents.add(mediaContent); }); } diff --git a/lib/java/mapping/src/main/java/co/airy/mapping/sources/twilio/TwilioMapper.java b/lib/java/mapping/src/main/java/co/airy/mapping/sources/twilio/TwilioMapper.java index ded091a26a..e971a426c0 100644 --- a/lib/java/mapping/src/main/java/co/airy/mapping/sources/twilio/TwilioMapper.java +++ b/lib/java/mapping/src/main/java/co/airy/mapping/sources/twilio/TwilioMapper.java @@ -1,9 +1,12 @@ package co.airy.mapping.sources.twilio; import co.airy.mapping.SourceMapper; +import co.airy.mapping.model.Audio; import co.airy.mapping.model.Content; +import co.airy.mapping.model.File; import co.airy.mapping.model.Image; import co.airy.mapping.model.Text; +import co.airy.mapping.model.Video; import org.springframework.stereotype.Component; import java.net.URLDecoder; @@ -13,12 +16,28 @@ import java.util.List; import java.util.Map; import java.util.Objects; +import java.util.function.BiFunction; import static java.util.stream.Collectors.toMap; @Component public class TwilioMapper implements SourceMapper { + private final Map>> mediaProcessFunctions = Map.of( + "jpg", processImageFun, + "jpeg", processImageFun, + "png", processImageFun, + "mp4", processVideoFun, + "mp3", processAudioFun, + "ogg", processAudioFun, + "pdf", processFileFun + ); + + private static final BiFunction> processImageFun = (mediaUrl, body) -> List.of(new Text(body), new Image(mediaUrl)); + private static final BiFunction> processVideoFun = (mediaUrl, body) -> List.of(new Video(mediaUrl)); + private static final BiFunction> processAudioFun = (mediaUrl, body) -> List.of(new Audio(mediaUrl)); + private static final BiFunction> processFileFun = (mediaUrl, body) -> List.of(new File(mediaUrl)); + @Override public List getIdentifiers() { return List.of("twilio.sms", "twilio.whatsapp"); @@ -29,11 +48,15 @@ public List render(String payload) { Map decodedPayload = parseUrlEncoded(payload); List contents = new ArrayList<>(); - contents.add(new Text(decodedPayload.get("Body"))); - final String mediaUrl = decodedPayload.get("MediaUrl"); + if (mediaUrl != null && !mediaUrl.isBlank()) { - contents.add(new Image(mediaUrl)); + final String[] mediaUrlParts = mediaUrl.split("\\."); + final String mediaExtension = mediaUrlParts[mediaUrlParts.length - 1].toLowerCase(); + final BiFunction> processMediaFunction = mediaProcessFunctions.get(mediaExtension); + contents = processMediaFunction.apply(mediaUrl, decodedPayload.get("Body")); + } else { + contents.add(new Text(decodedPayload.get("Body"))); } return contents; diff --git a/lib/java/mapping/src/test/java/co/airy/mapping/ContentMapperTest.java b/lib/java/mapping/src/test/java/co/airy/mapping/ContentMapperTest.java index cc3988160f..c2bc10c2d6 100644 --- a/lib/java/mapping/src/test/java/co/airy/mapping/ContentMapperTest.java +++ b/lib/java/mapping/src/test/java/co/airy/mapping/ContentMapperTest.java @@ -3,6 +3,8 @@ import co.airy.avro.communication.DeliveryState; import co.airy.avro.communication.Message; import co.airy.avro.communication.SenderType; +import co.airy.mapping.model.Audio; +import co.airy.mapping.model.Content; import co.airy.mapping.model.Text; import co.airy.spring.core.AirySpringBootApplication; import com.fasterxml.jackson.databind.JsonNode; @@ -14,9 +16,13 @@ import org.springframework.boot.test.mock.mockito.SpyBean; import java.time.Instant; +import java.util.List; +import java.util.Map; import static org.hamcrest.MatcherAssert.assertThat; +import static org.hamcrest.Matchers.endsWith; import static org.hamcrest.Matchers.equalTo; +import static org.hamcrest.Matchers.startsWith; @SpringBootTest(classes = AirySpringBootApplication.class) public class ContentMapperTest { @@ -59,4 +65,46 @@ void includesTypeInformation() throws Exception { assertThat(jsonNode.get("type").textValue(), equalTo("text")); assertThat(jsonNode.get("text").textValue(), equalTo(testText)); } + + + @Test + void replacesDataUrls() throws Exception { + final String originalUrl = "http://example.org/path/sound.wav"; + + final Message message = Message.newBuilder() + .setId("messageId") + .setSource("fakesource") + .setSentAt(Instant.now().toEpochMilli()) + .setSenderId("sourceConversationId") + .setSenderType(SenderType.SOURCE_CONTACT) + .setDeliveryState(DeliveryState.DELIVERED) + .setConversationId("conversationId") + .setChannelId("channelId") + .setContent("{\"audio\":\"" + originalUrl + "\"}") + .build(); + + final ContentMapper mapper = new ContentMapper(List.of(new SourceMapper() { + @Override + public List getIdentifiers() { + return List.of("fakesource"); + } + + @Override + public List render(String payload) { + return List.of(new Audio(originalUrl)); + } + }), outboundMapper); + + // No replacement without metadata + Audio audioMessage = (Audio) mapper.render(message).get(0); + assertThat(audioMessage.getUrl(), equalTo(originalUrl)); + + final String persistentUrl = "http://storage.org/path/data"; + final Map messageMetadata = Map.of("data_" + originalUrl, persistentUrl); + + // No replacement without metadata + audioMessage = (Audio) mapper.render(message, messageMetadata).get(0); + assertThat(audioMessage.getUrl(), equalTo(persistentUrl)); + } + } diff --git a/lib/java/mapping/src/test/java/co/airy/mapping/FacebookTest.java b/lib/java/mapping/src/test/java/co/airy/mapping/FacebookTest.java index cbcdf3beae..5f20f56751 100644 --- a/lib/java/mapping/src/test/java/co/airy/mapping/FacebookTest.java +++ b/lib/java/mapping/src/test/java/co/airy/mapping/FacebookTest.java @@ -1,8 +1,9 @@ package co.airy.mapping; +import co.airy.mapping.model.Audio; import co.airy.mapping.model.Content; -import co.airy.mapping.model.Image; -import co.airy.mapping.model.Text; +import co.airy.mapping.model.File; +import co.airy.mapping.model.Video; import co.airy.mapping.sources.facebook.FacebookMapper; import org.junit.jupiter.api.Test; import org.springframework.util.StreamUtils; @@ -12,6 +13,10 @@ import static org.hamcrest.MatcherAssert.assertThat; import static org.hamcrest.Matchers.equalTo; +import static org.hamcrest.Matchers.everyItem; +import static org.hamcrest.Matchers.hasProperty; +import static org.hamcrest.collection.IsCollectionWithSize.hasSize; +import static org.hamcrest.core.Is.isA; public class FacebookTest { @@ -22,9 +27,9 @@ void textMessage() throws Exception { final String text = "Hello world"; final String sourceContent = String.format(StreamUtils.copyToString(getClass().getClassLoader().getResourceAsStream("facebook/text.json"), StandardCharsets.UTF_8), text); - final Text message = (Text) mapper.render(sourceContent).get(0); - - assertThat(message.getText(), equalTo(text)); + final List contents = mapper.render(sourceContent); + assertThat(contents, hasSize(1)); + assertThat(contents, everyItem(hasProperty("text", equalTo(text)))); } @Test @@ -33,7 +38,40 @@ void canRenderImages() throws Exception { final String sourceContent = String.format(StreamUtils.copyToString(getClass().getClassLoader().getResourceAsStream("facebook/image.json"), StandardCharsets.UTF_8), imageUrl); final List contents = mapper.render(sourceContent); - final Image image = (Image) contents.get(0); - assertThat(image.getUrl(), equalTo(imageUrl)); + assertThat(contents, hasSize(1)); + assertThat(contents, everyItem(hasProperty("url", equalTo(imageUrl)))); + } + + @Test + void canRenderAudio() throws Exception { + final String audioUrl = "https://url-from-facebook-cdn.com/123-id.mp4"; + final String sourceContent = String.format(StreamUtils.copyToString(getClass().getClassLoader().getResourceAsStream("facebook/audio.json"), StandardCharsets.UTF_8), audioUrl); + + final List contents = mapper.render(sourceContent); + assertThat(contents, hasSize(1)); + assertThat(contents, everyItem(isA(Audio.class))); + assertThat(contents, everyItem(hasProperty("url", equalTo(audioUrl)))); + } + + @Test + void canRenderVideo() throws Exception { + final String videoUrl = "https://video.xx.fbcdn.net/v/t42.3356-2/10000000_3670351823059679_8252233555063215828_n.mp4/video-1608240605.mp4?_nc_cat=110&ccb=2&_nc_sid=060d78&_nc_ohc=o7KPshTGwGwAX9xsWIT&vabr=1741655&_nc_ht=video.xx&oh=76581365554981fa6e343c3b2fa65aef&oe=5FDD193B"; + final String sourceContent = String.format(StreamUtils.copyToString(getClass().getClassLoader().getResourceAsStream("facebook/video.json"), StandardCharsets.UTF_8), videoUrl); + + final List contents = mapper.render(sourceContent); + assertThat(contents, hasSize(1)); + assertThat(contents, everyItem(isA(Video.class))); + assertThat(contents, everyItem(hasProperty("url", equalTo(videoUrl)))); + } + + @Test + void canRenderFile() throws Exception { + final String fileUrl = "https://cdn.fbsbx.com/v/t59.2708-21/file_identifier.pdf/file_name.pdf"; + final String sourceContent = String.format(StreamUtils.copyToString(getClass().getClassLoader().getResourceAsStream("facebook/file.json"), StandardCharsets.UTF_8), fileUrl); + + final List contents = mapper.render(sourceContent); + assertThat(contents, hasSize(1)); + assertThat(contents, everyItem(isA(File.class))); + assertThat(contents, everyItem(hasProperty("url", equalTo(fileUrl)))); } } diff --git a/lib/java/mapping/src/test/java/co/airy/mapping/TwilioTest.java b/lib/java/mapping/src/test/java/co/airy/mapping/TwilioTest.java index b9dc416417..70109cc582 100644 --- a/lib/java/mapping/src/test/java/co/airy/mapping/TwilioTest.java +++ b/lib/java/mapping/src/test/java/co/airy/mapping/TwilioTest.java @@ -1,16 +1,23 @@ package co.airy.mapping; +import co.airy.mapping.model.Audio; import co.airy.mapping.model.Content; +import co.airy.mapping.model.File; import co.airy.mapping.model.Image; import co.airy.mapping.model.Text; +import co.airy.mapping.model.Video; import co.airy.mapping.sources.twilio.TwilioMapper; import org.junit.jupiter.api.Test; import java.util.List; +import static org.hamcrest.CoreMatchers.hasItem; import static org.hamcrest.MatcherAssert.assertThat; import static org.hamcrest.Matchers.equalTo; -import static org.hamcrest.Matchers.is; +import static org.hamcrest.Matchers.hasProperty; +import static org.hamcrest.collection.IsCollectionWithSize.hasSize; +import static org.hamcrest.core.Every.everyItem; +import static org.hamcrest.core.Is.isA; public class TwilioTest { private final TwilioMapper mapper = new TwilioMapper(); @@ -24,12 +31,13 @@ void canRenderText() { "&From=whatsapp%3A%2B&MessageSid=SMbc31b6419de618d65076200c54676476" + "&Body=" + body + "&AccountSid=AC64c9ab479b849275b7b50bd19540c602&NumMedia=0"; - final Text message = (Text) mapper.render(event).get(0); - assertThat(message.getText(), equalTo(body)); + final List contents = mapper.render(event); + assertThat(contents, hasSize(1)); + assertThat(contents, everyItem(hasProperty("text", equalTo(body)))); } @Test - void canRenderImage() throws Exception { + void canRenderImage() { final String body = "Heres a picture of an owl!"; final String imageUrl = "https://demo.twilio.com/owl.png"; @@ -40,7 +48,50 @@ void canRenderImage() throws Exception { "&MediaUrl=" + imageUrl; final List message = mapper.render(event); - final Image image = (Image) message.stream().filter(c -> c instanceof Image).findFirst().get(); - assertThat(image.getUrl(), is(imageUrl)); + assertThat(message, hasItem(isA(Text.class))); + assertThat(message, hasItem(isA(Image.class))); + assertThat(message, hasItem(hasProperty("url", equalTo(imageUrl)))); + } + + @Test + void canRenderAudio() { + final String audioUrl = "https://demo.twilio.com/owl.mp3"; + + String event = "ApiVersion=2010-04-01&SmsSid=SMbc31b6419de618d65076200c54676476&SmsStatus=received" + + "&SmsMessageSid=SMbc31b6419de618d65076200c54676476&NumSegments=1&To=whatsapp%3A%2B" + + "&From=whatsapp%3A%2B&MessageSid=SMbc31b6419de618d65076200c54676476" + + "&MediaUrl=" + audioUrl; + final List message = mapper.render(event); + + assertThat(message, everyItem(isA(Audio.class))); + assertThat(message, everyItem(hasProperty("url", equalTo(audioUrl)))); + } + + @Test + void canRenderVideo() { + final String videoUrl = "https://demo.twilio.com/owl.mp4"; + + String event = "ApiVersion=2010-04-01&SmsSid=SMbc31b6419de618d65076200c54676476&SmsStatus=received" + + "&SmsMessageSid=SMbc31b6419de618d65076200c54676476&NumSegments=1&To=whatsapp%3A%2B" + + "&From=whatsapp%3A%2B&MessageSid=SMbc31b6419de618d65076200c54676476" + + "&MediaUrl=" + videoUrl; + final List message = mapper.render(event); + + assertThat(message, everyItem(isA(Video.class))); + assertThat(message, everyItem(hasProperty("url", equalTo(videoUrl)))); + } + + @Test + void canRenderFile() { + final String fileUrl = "https://demo.twilio.com/file.pdf"; + + String event = "ApiVersion=2010-04-01&SmsSid=SMbc31b6419de618d65076200c54676476&SmsStatus=received" + + "&SmsMessageSid=SMbc31b6419de618d65076200c54676476&NumSegments=1&To=whatsapp%3A%2B" + + "&From=whatsapp%3A%2B&MessageSid=SMbc31b6419de618d65076200c54676476" + + "&MediaUrl=" + fileUrl; + final List message = mapper.render(event); + + assertThat(message, everyItem(isA(File.class))); + assertThat(message, everyItem(hasProperty("url", equalTo(fileUrl)))); } } diff --git a/lib/java/mapping/src/test/resources/facebook/audio.json b/lib/java/mapping/src/test/resources/facebook/audio.json new file mode 100644 index 0000000000..53f27884b0 --- /dev/null +++ b/lib/java/mapping/src/test/resources/facebook/audio.json @@ -0,0 +1,20 @@ +{ + "sender": { + "id": "4616529495039079" + }, + "recipient": { + "id": "778234505682382" + }, + "timestamp": 1609577719481, + "message": { + "mid": "m_pKvXdyjEV4mYkSF0F6otXRwIEODhgYRbCR-HCFhf7WzGQ4iAVNlyESVoVKZS-BHiErXDbdEvqFiDedW4h6twNQ", + "attachments": [ + { + "type": "audio", + "payload": { + "url": "%s" + } + } + ] + } +} \ No newline at end of file diff --git a/lib/java/mapping/src/test/resources/facebook/file.json b/lib/java/mapping/src/test/resources/facebook/file.json new file mode 100644 index 0000000000..32781c5e84 --- /dev/null +++ b/lib/java/mapping/src/test/resources/facebook/file.json @@ -0,0 +1,22 @@ +{ + "sender": { + "id": "205272702823080" + }, + "recipient": { + "id": "1988408424614138" + }, + "timestamp": 1608188342869, + "message": { + "mid": "m_nb9pmQ65hY39kEdLqIDYPA4G-2dMMotKb_j8BxVy_IrITEweFGxuCKq6AQZDpU0-L3nDIVgepkGoqcR4D8HGxg", + "is_echo": true, + "app_id": 113868326204563, + "attachments": [ + { + "type": "file", + "payload": { + "url": "%s" + } + } + ] + } +} \ No newline at end of file diff --git a/lib/java/mapping/src/test/resources/facebook/video.json b/lib/java/mapping/src/test/resources/facebook/video.json new file mode 100644 index 0000000000..f9a28a64d1 --- /dev/null +++ b/lib/java/mapping/src/test/resources/facebook/video.json @@ -0,0 +1,20 @@ +{ + "sender": { + "id": "3448289328620117" + }, + "recipient": { + "id": "569078233236402" + }, + "timestamp": 1608240605982, + "message": { + "mid": "m_b42WdoNzwv4d_UL-vuRmVwoQrkTsoIshZoEKAiAARYac6QzyDxKM3qnHXt5JifI5x86p7_Q2SPQM-8bBRFLbdA", + "attachments": [ + { + "type": "video", + "payload": { + "url": "%s" + } + } + ] + } +} \ No newline at end of file diff --git a/lib/typescript/httpclient/BUILD b/lib/typescript/httpclient/BUILD new file mode 100644 index 0000000000..216d0d5189 --- /dev/null +++ b/lib/typescript/httpclient/BUILD @@ -0,0 +1,11 @@ +load("@com_github_airyhq_bazel_tools//web:typescript.bzl", "ts_library") + +package(default_visibility = ["//visibility:public"]) + +ts_library( + name = "httpclient", + deps = [ + "//lib/typescript/types", + "@npm//@types/node", + ], +) diff --git a/lib/typescript/httpclient/README.md b/lib/typescript/httpclient/README.md new file mode 100644 index 0000000000..b90afc4eb7 --- /dev/null +++ b/lib/typescript/httpclient/README.md @@ -0,0 +1,41 @@ + +### HttpClient Library + +The HttpClient Library includes helper functions for using Airy's endpoints on the frontend. + +Each function performs an http request and returns a promise. + +To use the library's functions, import the library and call the module's methods. + + +For example: + +``` +import { HttpClient} from 'httpclient'; + +HttpClient.listChannels() + +``` + +Here is a list of the functions it includes: + +CHANNELS +- listChannels +- exploreChannels +- connectChannel +- disconnectChannel + +CONVERSATIONS +- listConversations + +TAGS +- listTags +- createTag +- updateTag +- deleteTag + +USER +- loginViaEmail + + + diff --git a/frontend/demo/src/api/airyConfig.ts b/lib/typescript/httpclient/api/airyConfig.ts similarity index 100% rename from frontend/demo/src/api/airyConfig.ts rename to lib/typescript/httpclient/api/airyConfig.ts diff --git a/frontend/demo/src/api/cookie.ts b/lib/typescript/httpclient/api/cookie.ts similarity index 100% rename from frontend/demo/src/api/cookie.ts rename to lib/typescript/httpclient/api/cookie.ts diff --git a/lib/typescript/httpclient/api/index.ts b/lib/typescript/httpclient/api/index.ts new file mode 100644 index 0000000000..a5b1f40baf --- /dev/null +++ b/lib/typescript/httpclient/api/index.ts @@ -0,0 +1,3 @@ +export * from './airyConfig'; +export * from './cookie'; +export * from './webStore'; diff --git a/frontend/demo/src/api/webStore.ts b/lib/typescript/httpclient/api/webStore.ts similarity index 100% rename from frontend/demo/src/api/webStore.ts rename to lib/typescript/httpclient/api/webStore.ts diff --git a/lib/typescript/httpclient/endpoints/connectChannel.ts b/lib/typescript/httpclient/endpoints/connectChannel.ts new file mode 100644 index 0000000000..768f182985 --- /dev/null +++ b/lib/typescript/httpclient/endpoints/connectChannel.ts @@ -0,0 +1,35 @@ +import {doFetchFromBackend} from '../api'; +import {ConnectChannelRequestPayload, ConnectChannelRequestApiPayload} from '../payload'; +import {Channel} from '../model'; +import {ChannelApiPayload} from '../payload/ChannelApiPayload'; + +const connectChannelApiMapper = (payload: ConnectChannelRequestPayload): ConnectChannelRequestApiPayload => { + return { + source: payload.source, + source_channel_id: payload.sourceChannelId, + token: payload.token, + name: payload.name, + image_url: payload.imageUrl, + }; +}; + +const channelMapper = (payload: ChannelApiPayload): Channel => { + return { + name: payload.name, + source: payload.source, + sourceChannelId: payload.source_channel_id, + imageUrl: payload.image_url, + connected: true, + }; +}; + +export function connectChannel(requestPayload: ConnectChannelRequestPayload) { + return doFetchFromBackend('channels.connect', connectChannelApiMapper(requestPayload)) + .then((response: ChannelApiPayload) => { + const channel = channelMapper(response); + return channel; + }) + .catch((error: Error) => { + return error; + }); +} diff --git a/lib/typescript/httpclient/endpoints/createTag.ts b/lib/typescript/httpclient/endpoints/createTag.ts new file mode 100644 index 0000000000..2313504601 --- /dev/null +++ b/lib/typescript/httpclient/endpoints/createTag.ts @@ -0,0 +1,19 @@ +import {doFetchFromBackend} from '../api'; +import {Tag, TagColor} from '../model'; +import {CreateTagRequestPayload} from '../payload'; +import {TagPayload} from '../payload/TagPayload'; + +export function createTag(requestPayload: CreateTagRequestPayload) { + return doFetchFromBackend('tags.create', requestPayload) + .then((response: TagPayload) => { + const tag: Tag = { + id: response.id, + name: requestPayload.name, + color: requestPayload.color as TagColor, + }; + return tag; + }) + .catch((error: Error) => { + return error; + }); +} diff --git a/lib/typescript/httpclient/endpoints/deleteTag.ts b/lib/typescript/httpclient/endpoints/deleteTag.ts new file mode 100644 index 0000000000..72abdf31d9 --- /dev/null +++ b/lib/typescript/httpclient/endpoints/deleteTag.ts @@ -0,0 +1,9 @@ +import {doFetchFromBackend} from '../api'; + +export function deleteTag(id: string) { + return doFetchFromBackend('tags.delete', { + id, + }) + .then(() => Promise.resolve(true)) + .catch((error: Error) => Promise.reject(error)); +} diff --git a/lib/typescript/httpclient/endpoints/disconnectChannel.ts b/lib/typescript/httpclient/endpoints/disconnectChannel.ts new file mode 100644 index 0000000000..c63d5ece66 --- /dev/null +++ b/lib/typescript/httpclient/endpoints/disconnectChannel.ts @@ -0,0 +1,32 @@ +import {doFetchFromBackend} from '../api'; +import {DisconnectChannelRequestPayload, DisconnectChannelRequestApiPayload} from '../payload'; +import {Channel} from '../model'; +import {ChannelsPayload} from '../payload/ChannelsPayload'; + +const channelsMapper = (payload: ChannelsPayload, source?: string): Channel[] => { + return payload.data.map( + (entry: Channel): Channel => { + return { + source, + ...entry, + }; + } + ); +}; + +const disconnectChannelApiMapper = (payload: DisconnectChannelRequestPayload): DisconnectChannelRequestApiPayload => { + return { + channel_id: payload.channelId, + }; +}; + +export function disconnectChannel(requestPayload: DisconnectChannelRequestPayload) { + return doFetchFromBackend('channels.disconnect', disconnectChannelApiMapper(requestPayload)) + .then((response: ChannelsPayload) => { + const channels = channelsMapper(response); + return channels; + }) + .catch((error: Error) => { + return error; + }); +} diff --git a/lib/typescript/httpclient/endpoints/exploreChannels.ts b/lib/typescript/httpclient/endpoints/exploreChannels.ts new file mode 100644 index 0000000000..6de5235e61 --- /dev/null +++ b/lib/typescript/httpclient/endpoints/exploreChannels.ts @@ -0,0 +1,26 @@ +import {doFetchFromBackend} from '../api'; +import {ExploreChannelRequestPayload} from '../payload'; +import {Channel} from '../model'; +import {ChannelsPayload} from '../payload/ChannelsPayload'; + +const channelsMapper = (payload: ChannelsPayload, source?: string): Channel[] => { + return payload.data.map( + (entry: Channel): Channel => { + return { + source, + ...entry, + }; + } + ); +}; + +export function exploreChannels(requestPayload: ExploreChannelRequestPayload) { + return doFetchFromBackend('channels.explore', requestPayload) + .then((response: ChannelsPayload) => { + const channels = channelsMapper(response, requestPayload.source); + return channels; + }) + .catch((error: Error) => { + return error; + }); +} diff --git a/lib/typescript/httpclient/endpoints/index.ts b/lib/typescript/httpclient/endpoints/index.ts new file mode 100644 index 0000000000..cb394896b7 --- /dev/null +++ b/lib/typescript/httpclient/endpoints/index.ts @@ -0,0 +1,10 @@ +export * from './listChannels'; +export * from './exploreChannels'; +export * from './connectChannel'; +export * from './disconnectChannel'; +export * from './listConversations'; +export * from './listTags'; +export * from './createTag'; +export * from './updateTag'; +export * from './deleteTag'; +export * from './loginViaEmail'; diff --git a/lib/typescript/httpclient/endpoints/listChannels.ts b/lib/typescript/httpclient/endpoints/listChannels.ts new file mode 100644 index 0000000000..bc1e47642e --- /dev/null +++ b/lib/typescript/httpclient/endpoints/listChannels.ts @@ -0,0 +1,25 @@ +import {doFetchFromBackend} from '../api'; +import {Channel} from '../model'; +import {ChannelsPayload} from '../payload/ChannelsPayload'; + +const channelsMapper = (payload: ChannelsPayload, source?: string): Channel[] => { + return payload.data.map( + (entry: Channel): Channel => { + return { + source, + ...entry, + }; + } + ); +}; + +export function listChannels() { + return doFetchFromBackend('channels.list') + .then((response: ChannelsPayload) => { + const channels = channelsMapper(response); + return channels; + }) + .catch((error: Error) => { + return error; + }); +} diff --git a/lib/typescript/httpclient/endpoints/listConversations.ts b/lib/typescript/httpclient/endpoints/listConversations.ts new file mode 100644 index 0000000000..1234aa1023 --- /dev/null +++ b/lib/typescript/httpclient/endpoints/listConversations.ts @@ -0,0 +1,54 @@ +import {doFetchFromBackend} from '../api'; +import {ListConversationsRequestPayload} from '../payload'; +import {Conversation, Message} from '../model'; +import {ConversationPayload} from '../payload/ConversationPayload'; +import {MessagePayload} from '../payload/MessagePayload'; +import {PaginatedPayload} from '../payload/PaginatedPayload'; + +const messageMapper = (payload: MessagePayload): Message => { + const message: Message = { + id: payload.id, + content: payload.content, + state: payload.state, + alignment: payload.alignment, + sentAt: payload.sent_at, + }; + return message; +}; + +const conversationMapper = (payload: ConversationPayload): Conversation => { + const conversation: Conversation = { + id: payload.id, + channel: payload.channel, + createdAt: payload.created_at, + contact: { + avatarUrl: payload.contact.avatar_url, + firstName: payload.contact.first_name, + lastName: payload.contact.last_name, + displayName: payload.contact.first_name + ' ' + payload.contact.last_name, + id: payload.contact.id, + }, + tags: payload.tags, + lastMessage: messageMapper(payload.last_message), + unreadMessageCount: payload.unread_message_count, + }; + return conversation; +}; + +const conversationsMapper = (payloadArray: ConversationPayload[]): Conversation[] => { + return (payloadArray || []).map(conversation => conversationMapper(conversation)); +}; + +export function listConversations(conversationListRequest: ListConversationsRequestPayload) { + conversationListRequest.page_size = conversationListRequest.page_size ?? 10; + conversationListRequest.cursor = conversationListRequest.cursor ?? null; + + return doFetchFromBackend('conversations.list', conversationListRequest) + .then((response: PaginatedPayload) => { + const {responseMetadata} = response; + return {data: conversationsMapper(response.data), metadata: responseMetadata}; + }) + .catch((error: Error) => { + return error; + }); +} diff --git a/lib/typescript/httpclient/endpoints/listTags.ts b/lib/typescript/httpclient/endpoints/listTags.ts new file mode 100644 index 0000000000..27fe74381b --- /dev/null +++ b/lib/typescript/httpclient/endpoints/listTags.ts @@ -0,0 +1,24 @@ +import {doFetchFromBackend} from '../api'; +import {Tag} from '../model'; +import {ListTagsResponsePayload} from '../payload'; + +const tagMapper = { + BLUE: 'tag-blue', + RED: 'tag-red', + GREEN: 'tag-green', + PURPLE: 'tag-purple', +}; + +const tagsMapper = (serverTags: Tag[]): Tag[] => { + return serverTags.map(t => ({id: t.id, name: t.name, color: tagMapper[t.color] || 'tag-blue'})); +}; + +export function listTags() { + return doFetchFromBackend('tags.list') + .then((response: ListTagsResponsePayload) => { + return tagsMapper(response.data); + }) + .catch((error: Error) => { + return error; + }); +} diff --git a/lib/typescript/httpclient/endpoints/loginViaEmail.ts b/lib/typescript/httpclient/endpoints/loginViaEmail.ts new file mode 100644 index 0000000000..e64db2f026 --- /dev/null +++ b/lib/typescript/httpclient/endpoints/loginViaEmail.ts @@ -0,0 +1,24 @@ +import {doFetchFromBackend} from '../api'; +import {User} from '../model'; +import {LoginViaEmailRequestPayload} from '../payload'; +import {UserPayload} from '../payload/UserPayload'; + +const userMapper = (payload: UserPayload): User => { + return { + id: payload.id, + firstName: payload.first_name, + lastName: payload.last_name, + displayName: payload.first_name + ' ' + payload.last_name, + token: payload.token, + }; +}; + +export function loginViaEmail(requestPayload: LoginViaEmailRequestPayload) { + return doFetchFromBackend('users.login', requestPayload) + .then((response: UserPayload) => { + return userMapper(response); + }) + .catch((error: Error) => { + return error; + }); +} diff --git a/lib/typescript/httpclient/endpoints/updateTag.ts b/lib/typescript/httpclient/endpoints/updateTag.ts new file mode 100644 index 0000000000..033a2e6e23 --- /dev/null +++ b/lib/typescript/httpclient/endpoints/updateTag.ts @@ -0,0 +1,8 @@ +import {doFetchFromBackend} from '../api'; +import {Tag} from '../model'; + +export function updateTag(tag: Tag) { + return doFetchFromBackend('tags.update', {...tag}) + .then(() => Promise.resolve(true)) + .catch((error: Error) => Promise.reject(error)); +} diff --git a/lib/typescript/httpclient/index.ts b/lib/typescript/httpclient/index.ts new file mode 100644 index 0000000000..ebe9609742 --- /dev/null +++ b/lib/typescript/httpclient/index.ts @@ -0,0 +1,32 @@ +import { + listChannels, + exploreChannels, + connectChannel, + disconnectChannel, + listConversations, + listTags, + createTag, + updateTag, + deleteTag, + loginViaEmail, +} from './endpoints'; + +export const HttpClient = (function() { + return { + listChannels: listChannels, + exploreChannels: exploreChannels, + connectChannel: connectChannel, + disconnectChannel: disconnectChannel, + listConversations: listConversations, + listTags: listTags, + createTag: createTag, + updateTag: updateTag, + deleteTag: deleteTag, + loginViaEmail: loginViaEmail, + }; +})(); + +export * from './api'; +export * from './model'; +export * from './endpoints'; +export * from './payload'; diff --git a/frontend/demo/src/model/AiryRequestConfig.ts b/lib/typescript/httpclient/model/AiryRequestConfig.ts similarity index 100% rename from frontend/demo/src/model/AiryRequestConfig.ts rename to lib/typescript/httpclient/model/AiryRequestConfig.ts diff --git a/lib/typescript/httpclient/model/Channel.ts b/lib/typescript/httpclient/model/Channel.ts new file mode 100644 index 0000000000..6d9fb0567e --- /dev/null +++ b/lib/typescript/httpclient/model/Channel.ts @@ -0,0 +1,7 @@ +export interface Channel { + name: string; + source: string; + sourceChannelId: string; + connected: boolean; + imageUrl?: string; +} diff --git a/frontend/demo/src/model/Contact.ts b/lib/typescript/httpclient/model/Contact.ts similarity index 100% rename from frontend/demo/src/model/Contact.ts rename to lib/typescript/httpclient/model/Contact.ts diff --git a/lib/typescript/httpclient/model/Conversation.ts b/lib/typescript/httpclient/model/Conversation.ts new file mode 100644 index 0000000000..df10890cfb --- /dev/null +++ b/lib/typescript/httpclient/model/Conversation.ts @@ -0,0 +1,18 @@ +import {Channel} from './Channel'; +import {Message} from './Message'; + +export interface Conversation { + id: string; + channel: Channel; + createdAt: string; + contact: { + avatarUrl: string; + firstName: string; + lastName: string; + displayName: string; + id: string; + }; + tags: string[]; + lastMessage: Message; + unreadMessageCount?: number; +} diff --git a/frontend/demo/src/model/Message.ts b/lib/typescript/httpclient/model/Message.ts similarity index 57% rename from frontend/demo/src/model/Message.ts rename to lib/typescript/httpclient/model/Message.ts index a89a9cce42..106d1a6d0c 100644 --- a/frontend/demo/src/model/Message.ts +++ b/lib/typescript/httpclient/model/Message.ts @@ -38,25 +38,3 @@ export interface Message { alignment: MessageAlignment; sentAt: string | Date; } - -export interface MessagePayload { - id: string; - content: { - text: string; - type: MessageType; - }; - state: MessageState; - alignment: MessageAlignment; - sent_at: string | Date; -} - -export const messageMapper = (payload: MessagePayload): Message => { - const message: Message = { - id: payload.id, - content: payload.content, - state: payload.state, - alignment: payload.alignment, - sentAt: payload.sent_at, - }; - return message; -}; diff --git a/lib/typescript/httpclient/model/Tag.ts b/lib/typescript/httpclient/model/Tag.ts new file mode 100644 index 0000000000..45c37b32bb --- /dev/null +++ b/lib/typescript/httpclient/model/Tag.ts @@ -0,0 +1,7 @@ +export type TagColor = 'tag-blue' | 'tag-red' | 'tag-green' | 'tag-purple'; + +export interface Tag { + id: string; + name: string; + color: TagColor; +} diff --git a/frontend/demo/src/model/User.ts b/lib/typescript/httpclient/model/User.ts similarity index 51% rename from frontend/demo/src/model/User.ts rename to lib/typescript/httpclient/model/User.ts index 8a619ad9db..1cf019aea9 100644 --- a/frontend/demo/src/model/User.ts +++ b/lib/typescript/httpclient/model/User.ts @@ -10,24 +10,6 @@ export interface User { error?: string; } -export interface UserPayload { - id: string; - first_name: string; - last_name: string; - token: string; -} - -export const userMapper = (payload: UserPayload): User => { - const user: User = { - id: payload.id, - firstName: payload.first_name, - lastName: payload.last_name, - displayName: payload.first_name + ' ' + payload.last_name, - token: payload.token, - }; - return user; -}; - export enum AUTH_STATE { NOT_AUTHENTICATED, REFRESHING, diff --git a/lib/typescript/httpclient/model/index.ts b/lib/typescript/httpclient/model/index.ts new file mode 100644 index 0000000000..ece77d9c6b --- /dev/null +++ b/lib/typescript/httpclient/model/index.ts @@ -0,0 +1,7 @@ +export * from './AiryRequestConfig'; +export * from './Channel'; +export * from './Contact'; +export * from './Conversation'; +export * from './Message'; +export * from './Tag'; +export * from './User'; diff --git a/lib/typescript/httpclient/payload/ChannelApiPayload.ts b/lib/typescript/httpclient/payload/ChannelApiPayload.ts new file mode 100644 index 0000000000..0be2de89c1 --- /dev/null +++ b/lib/typescript/httpclient/payload/ChannelApiPayload.ts @@ -0,0 +1,7 @@ +export interface ChannelApiPayload { + id: string; + name: string; + image_url: string; + source: string; + source_channel_id: string; +} diff --git a/lib/typescript/httpclient/payload/ChannelsPayload.ts b/lib/typescript/httpclient/payload/ChannelsPayload.ts new file mode 100644 index 0000000000..703b85f400 --- /dev/null +++ b/lib/typescript/httpclient/payload/ChannelsPayload.ts @@ -0,0 +1,5 @@ +import {Channel} from '../model'; + +export interface ChannelsPayload { + data: Channel[]; +} diff --git a/lib/typescript/httpclient/payload/ConnectChannelRequestApiPayload.ts b/lib/typescript/httpclient/payload/ConnectChannelRequestApiPayload.ts new file mode 100644 index 0000000000..1303e4abb9 --- /dev/null +++ b/lib/typescript/httpclient/payload/ConnectChannelRequestApiPayload.ts @@ -0,0 +1,7 @@ +export interface ConnectChannelRequestApiPayload { + source: string; + source_channel_id: string; + token: string; + name?: string; + image_url?: string; +} diff --git a/lib/typescript/httpclient/payload/ConnectChannelRequestPayload.ts b/lib/typescript/httpclient/payload/ConnectChannelRequestPayload.ts new file mode 100644 index 0000000000..52f46ac85b --- /dev/null +++ b/lib/typescript/httpclient/payload/ConnectChannelRequestPayload.ts @@ -0,0 +1,7 @@ +export interface ConnectChannelRequestPayload { + source: string; + sourceChannelId: string; + token: string; + name?: string; + imageUrl?: string; +} diff --git a/lib/typescript/httpclient/payload/ConversationPayload.ts b/lib/typescript/httpclient/payload/ConversationPayload.ts new file mode 100644 index 0000000000..d7bd809c40 --- /dev/null +++ b/lib/typescript/httpclient/payload/ConversationPayload.ts @@ -0,0 +1,17 @@ +import {Channel} from '../model'; +import {MessagePayload} from './MessagePayload'; + +export interface ConversationPayload { + id: string; + channel: Channel; + created_at: string; + contact: { + avatar_url: string; + first_name: string; + last_name: string; + id: string; + }; + tags: string[]; + last_message: MessagePayload; + unread_message_count?: number; +} diff --git a/lib/typescript/httpclient/payload/CreateTagRequestPayload.ts b/lib/typescript/httpclient/payload/CreateTagRequestPayload.ts new file mode 100644 index 0000000000..0bbb9d821d --- /dev/null +++ b/lib/typescript/httpclient/payload/CreateTagRequestPayload.ts @@ -0,0 +1,4 @@ +export interface CreateTagRequestPayload { + name: string; + color: string; +} diff --git a/lib/typescript/httpclient/payload/DisconnectChannelRequestApiPayload.ts b/lib/typescript/httpclient/payload/DisconnectChannelRequestApiPayload.ts new file mode 100644 index 0000000000..5997c2edba --- /dev/null +++ b/lib/typescript/httpclient/payload/DisconnectChannelRequestApiPayload.ts @@ -0,0 +1,3 @@ +export interface DisconnectChannelRequestApiPayload { + channel_id: string; +} diff --git a/lib/typescript/httpclient/payload/DisconnectChannelRequestPayload.ts b/lib/typescript/httpclient/payload/DisconnectChannelRequestPayload.ts new file mode 100644 index 0000000000..005d6fd7f1 --- /dev/null +++ b/lib/typescript/httpclient/payload/DisconnectChannelRequestPayload.ts @@ -0,0 +1,3 @@ +export interface DisconnectChannelRequestPayload { + channelId: string; +} diff --git a/lib/typescript/httpclient/payload/ExploreChannelRequestPayload.ts b/lib/typescript/httpclient/payload/ExploreChannelRequestPayload.ts new file mode 100644 index 0000000000..19f6f38670 --- /dev/null +++ b/lib/typescript/httpclient/payload/ExploreChannelRequestPayload.ts @@ -0,0 +1,4 @@ +export interface ExploreChannelRequestPayload { + source: string; + token: string; +} diff --git a/lib/typescript/httpclient/payload/ListConversationsRequestPayload.ts b/lib/typescript/httpclient/payload/ListConversationsRequestPayload.ts new file mode 100644 index 0000000000..a9841e1fa4 --- /dev/null +++ b/lib/typescript/httpclient/payload/ListConversationsRequestPayload.ts @@ -0,0 +1,4 @@ +export interface ListConversationsRequestPayload { + cursor?: string | null; + page_size?: number; +} diff --git a/lib/typescript/httpclient/payload/ListTagsResponsePayload.ts b/lib/typescript/httpclient/payload/ListTagsResponsePayload.ts new file mode 100644 index 0000000000..86cc74f4e7 --- /dev/null +++ b/lib/typescript/httpclient/payload/ListTagsResponsePayload.ts @@ -0,0 +1,5 @@ +import {Tag} from '../model'; + +export interface ListTagsResponsePayload { + data: Tag[]; +} diff --git a/lib/typescript/httpclient/payload/LoginViaEmailRequestPayload.ts b/lib/typescript/httpclient/payload/LoginViaEmailRequestPayload.ts new file mode 100644 index 0000000000..d1b98a784c --- /dev/null +++ b/lib/typescript/httpclient/payload/LoginViaEmailRequestPayload.ts @@ -0,0 +1,4 @@ +export interface LoginViaEmailRequestPayload { + email: String; + password: String; +} diff --git a/lib/typescript/httpclient/payload/MessagePayload.ts b/lib/typescript/httpclient/payload/MessagePayload.ts new file mode 100644 index 0000000000..587e3b7ead --- /dev/null +++ b/lib/typescript/httpclient/payload/MessagePayload.ts @@ -0,0 +1,12 @@ +import {MessageType, MessageState, MessageAlignment} from '../model'; + +export interface MessagePayload { + id: string; + content: { + text: string; + type: MessageType; + }; + state: MessageState; + alignment: MessageAlignment; + sent_at: string | Date; +} diff --git a/lib/typescript/httpclient/payload/PaginatedPayload.ts b/lib/typescript/httpclient/payload/PaginatedPayload.ts new file mode 100644 index 0000000000..327378568f --- /dev/null +++ b/lib/typescript/httpclient/payload/PaginatedPayload.ts @@ -0,0 +1,4 @@ +export interface PaginatedPayload { + data: T[]; + responseMetadata: {previousCursor: string; nextCursor: string; total: number}; +} diff --git a/lib/typescript/httpclient/payload/ResponseMetadataPayload.ts b/lib/typescript/httpclient/payload/ResponseMetadataPayload.ts new file mode 100644 index 0000000000..f1f03b2f5f --- /dev/null +++ b/lib/typescript/httpclient/payload/ResponseMetadataPayload.ts @@ -0,0 +1,5 @@ +export interface ResponseMetadataPayload { + previousCursor: string; + nextCursor: string; + total: number; +} diff --git a/lib/typescript/httpclient/payload/TagPayload.ts b/lib/typescript/httpclient/payload/TagPayload.ts new file mode 100644 index 0000000000..fad3aef4e0 --- /dev/null +++ b/lib/typescript/httpclient/payload/TagPayload.ts @@ -0,0 +1,3 @@ +export interface TagPayload { + id: string; +} diff --git a/lib/typescript/httpclient/payload/UserPayload.ts b/lib/typescript/httpclient/payload/UserPayload.ts new file mode 100644 index 0000000000..00c9c39532 --- /dev/null +++ b/lib/typescript/httpclient/payload/UserPayload.ts @@ -0,0 +1,6 @@ +export interface UserPayload { + id: string; + first_name: string; + last_name: string; + token: string; +} diff --git a/lib/typescript/httpclient/payload/index.ts b/lib/typescript/httpclient/payload/index.ts new file mode 100644 index 0000000000..ee0ddcfcd6 --- /dev/null +++ b/lib/typescript/httpclient/payload/index.ts @@ -0,0 +1,9 @@ +export * from './ConnectChannelRequestApiPayload'; +export * from './ConnectChannelRequestPayload'; +export * from './DisconnectChannelRequestApiPayload'; +export * from './DisconnectChannelRequestPayload'; +export * from './ExploreChannelRequestPayload'; +export * from './LoginViaEmailRequestPayload'; +export * from './ListTagsResponsePayload'; +export * from './CreateTagRequestPayload'; +export * from './ListConversationsRequestPayload'; diff --git a/scripts/.gitkeep b/scripts/.gitkeep deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/scripts/bootstrap.sh b/scripts/bootstrap.sh index 68c6a67a82..9cbff712af 100755 --- a/scripts/bootstrap.sh +++ b/scripts/bootstrap.sh @@ -4,7 +4,7 @@ IFS=$'\n\t' ARCH=$(uname -m) OS=$(uname) -SCRIPT_PATH=$( cd "$(dirname "${BASH_SOURCE[0]}")" ; pwd -P ) +SCRIPT_PATH=$(cd "$(dirname "${BASH_SOURCE[0]}")" ; pwd -P) infra_path="" infra_path+=$( dirname $SCRIPT_PATH ) diff --git a/scripts/push-images.sh b/scripts/push-images.sh new file mode 100755 index 0000000000..878c725e40 --- /dev/null +++ b/scripts/push-images.sh @@ -0,0 +1,29 @@ +#!/bin/bash + +set -eo pipefail +IFS=$'\n\t' + +BRANCH_TARGET=$(echo $1 | cut -d'/' -f3) + +echo "Branch target: ${BRANCH_TARGET}" + +case ${BRANCH_TARGET} in + develop) + tag="beta" + ;; + + main) + tag="latest" + ;; + + release) + tag="release" + ;; +esac + +release_targets=$(bazel query "filter("${tag}$", //...)" --output label) + +for target in $release_targets; do + echo "Deploying $target" + bazel run $target +done diff --git a/scripts/release.sh b/scripts/release.sh new file mode 100755 index 0000000000..922423c4ce --- /dev/null +++ b/scripts/release.sh @@ -0,0 +1,88 @@ +#!/bin/bash + +set -eo pipefail +IFS=$'\n\t' + +start() { + release_number=$1 + echo -e "Starting release ${release_number}\n" + create_issue + create_release_branch +} + +create_issue() { + issue_number=$(command curl -s \ + -X POST \ + -H "Accept: application/json" \ + -H "Authorization: token ${GITHUB_TOKEN}" \ + https://api.github.com/repos/airyhq/airy/issues \ + -d "{\"title\":\"Release ${release_number}\", \"labels\": [\"release\"]}" | jq '.number') + echo -e "Created issue number ${issue_number} on Github\n" +} + +create_release_branch() { + command git checkout develop + command git pull origin develop + command git checkout -b release/${release_number} + command git push origin release/${release_number} + echo -e "Created branch release/${release_number}\n" +} + +finish() { + release_number=$1 + echo -e "Finishing release ${release_number}\n" + increase_version + commit_version + merge_main + merge_develop + echo -e "Release ${release_number} is finished\n" +} + +increase_version() { + issue_number=$(curl -s\ + -H "Accept: application/vnd.github.v3+json" \ + "https://api.github.com/repos/airyhq/airy/issues?labels=release" | jq '.[0].number') + command echo ${release_number}> VERSION + echo -e "Updated VERSION file\n" +} + +commit_version() { + command git add VERSION + command git commit -m "Fixes #${issue_number}" + command git push origin release/${release_number} + echo -e "Updated VERSION file\n" +} + +merge_main() { + command git checkout main + command git pull origin main + command git merge --no-ff release/${release_number} + command git tag ${release_number} + command git push origin main + command git push origin ${release_number} + echo -e "Successfully merged into main branch\n" +} + +merge_develop() { + command git checkout develop + command git pull origin develop + command git merge --no-ff release/${release_number} + command git push origin develop + echo -e "Successfully merged into develop branch\n" +} + +if [[ -b $1 ]] && [[ -b $2 ]]; +then + case $1 in + "start") + start $2 + ;; + "finish") + finish $2 + esac +else + echo -ne "Error executing script\n" + echo -ne "Expected syntax: release.sh \n" + exit 1 +fi + diff --git a/tools/build/BUILD b/tools/build/BUILD index ff67069cd5..b6354b8b46 100644 --- a/tools/build/BUILD +++ b/tools/build/BUILD @@ -7,4 +7,5 @@ exports_files([ "springboot_pkg.sh", "helper.bzl", "log4j2.properties", + "nogo_config.json", ]) diff --git a/tools/build/container_push.bzl b/tools/build/container_push.bzl index 22063c0c3e..460cc9426f 100644 --- a/tools/build/container_push.bzl +++ b/tools/build/container_push.bzl @@ -14,3 +14,12 @@ def container_push(registry, repository): ) for tag in tags_to_push ] + + lib_push( + name = "local", + format = "Docker", + image = ":image", + registry = registry, + repository = repository, + tag = "{BUILD_USER}", + ) diff --git a/tools/build/nogo_config.json b/tools/build/nogo_config.json new file mode 100644 index 0000000000..0fcc2c3deb --- /dev/null +++ b/tools/build/nogo_config.json @@ -0,0 +1,218 @@ +{ + "unusedresult": { + "exclude_files": { + "airy_core/external/.*": "", + "airy_core/bazel-out/host/bin/external/.*": "" + } + }, + "unsafeptr": { + "exclude_files": { + "airy_core/external/.*": "", + "airy_core/bazel-out/host/bin/external/.*": "" + } + }, + "unreachable": { + "exclude_files": { + "airy_core/external/.*": "", + "airy_core/bazel-out/host/bin/external/.*": "" + } + }, + "unmarshal": { + "exclude_files": { + "airy_core/external/.*": "", + "airy_core/bazel-out/host/bin/external/.*": "" + } + }, + "tests": { + "exclude_files": { + "airy_core/external/.*": "", + "airy_core/bazel-out/host/bin/external/.*": "" + } + }, + "testinggoroutine": { + "exclude_files": { + "airy_core/external/.*": "", + "airy_core/bazel-out/host/bin/external/.*": "" + } + }, + "structtag": { + "exclude_files": { + "airy_core/external/.*": "", + "airy_core/bazel-out/host/bin/external/.*": "" + } + }, + "stringintconv": { + "exclude_files": { + "airy_core/external/.*": "", + "airy_core/bazel-out/host/bin/external/.*": "" + } + }, + "stdmethods": { + "exclude_files": { + "airy_core/external/.*": "", + "airy_core/bazel-out/host/bin/external/.*": "" + } + }, + "sortslice": { + "exclude_files": { + "airy_core/external/.*": "", + "airy_core/bazel-out/host/bin/external/.*": "" + } + }, + "shift": { + "exclude_files": { + "airy_core/external/.*": "", + "airy_core/bazel-out/host/bin/external/.*": "" + } + }, + "shadow": { + "exclude_files": { + "airy_core/external/.*": "", + "airy_core/bazel-out/host/bin/external/.*": "" + } + }, + "printf": { + "exclude_files": { + "airy_core/external/.*": "", + "airy_core/bazel-out/host/bin/external/.*": "" + } + }, + "pkgfact": { + "exclude_files": { + "airy_core/external/.*": "", + "airy_core/bazel-out/host/bin/external/.*": "" + } + }, + "nilness": { + "exclude_files": { + "airy_core/external/.*": "", + "airy_core/bazel-out/host/bin/external/.*": "" + } + }, + "nilfunc": { + "exclude_files": { + "airy_core/external/.*": "", + "airy_core/bazel-out/host/bin/external/.*": "" + } + }, + "lostcancel": { + "exclude_files": { + "airy_core/external/.*": "", + "airy_core/bazel-out/host/bin/external/.*": "" + } + }, + "loopclosure": { + "exclude_files": { + "airy_core/external/.*": "", + "airy_core/bazel-out/host/bin/external/.*": "" + } + }, + "ifaceassert": { + "exclude_files": { + "airy_core/external/.*": "", + "airy_core/bazel-out/host/bin/external/.*": "" + } + }, + "httpresponse": { + "exclude_files": { + "airy_core/external/.*": "", + "airy_core/bazel-out/host/bin/external/.*": "" + } + }, + "findcall": { + "exclude_files": { + "airy_core/external/.*": "", + "airy_core/bazel-out/host/bin/external/.*": "" + } + }, + "errorsas": { + "exclude_files": { + "airy_core/external/.*": "", + "airy_core/bazel-out/host/bin/external/.*": "" + } + }, + "deepequalerrors": { + "exclude_files": { + "airy_core/external/.*": "", + "airy_core/bazel-out/host/bin/external/.*": "" + } + }, + "ctrlflow": { + "exclude_files": { + "airy_core/external/.*": "", + "airy_core/bazel-out/host/bin/external/.*": "" + } + }, + "copylocks": { + "exclude_files": { + "airy_core/external/.*": "", + "airy_core/bazel-out/host/bin/external/.*": "" + } + }, + "composites": { + "exclude_files": { + "airy_core/external/.*": "", + "airy_core/bazel-out/host/bin/external/.*": "" + } + }, + "cgocall": { + "exclude_files": { + "airy_core/external/.*": "", + "airy_core/bazel-out/host/bin/external/.*": "" + } + }, + "buildtag": { + "exclude_files": { + "airy_core/external/.*": "", + "airy_core/bazel-out/host/bin/external/.*": "" + } + }, + "buildssa": { + "exclude_files": { + "airy_core/external/.*": "", + "airy_core/bazel-out/host/bin/external/.*": "" + } + }, + "bools": { + "exclude_files": { + "airy_core/external/.*": "", + "airy_core/bazel-out/host/bin/external/.*": "" + } + }, + "atomicalign": { + "exclude_files": { + "airy_core/external/.*": "", + "airy_core/bazel-out/host/bin/external/.*": "" + } + }, + "atomic": { + "exclude_files": { + "airy_core/external/.*": "", + "airy_core/bazel-out/host/bin/external/.*": "" + } + }, + "assign": { + "exclude_files": { + "airy_core/external/.*": "", + "airy_core/bazel-out/host/bin/external/.*": "" + } + }, + "inspect": { + "exclude_files": { + "airy_core/external/.*": "", + "airy_core/bazel-out/host/bin/external/.*": "" + } + }, + "asmdecl": { + "exclude_files": { + "airy_core/external/.*": "", + "airy_core/bazel-out/host/bin/external/.*": "" + } + }, + "analysisutil ": { + "exclude_files": { + "airy_core/external/.*": "", + "airy_core/bazel-out/host/bin/external/.*": "" + } + } +} \ No newline at end of file