├── .github ├── dependabot.yml └── workflows │ ├── codeql.yaml │ ├── config │ └── reviewdog.yaml │ ├── docgen.yaml │ ├── e2e.yaml │ ├── gotest.yaml │ ├── licenses.yaml │ ├── release.yaml │ └── static.yaml ├── .gitignore ├── .goreleaser.yaml ├── LICENSE ├── LICENSES └── vendor │ ├── cloud.google.com │ └── go │ │ ├── billing │ │ └── LICENSE │ │ ├── compute │ │ └── metadata │ │ │ └── LICENSE │ │ ├── iam │ │ └── LICENSE │ │ ├── internal │ │ └── LICENSE │ │ ├── logging │ │ └── LICENSE │ │ ├── longrunning │ │ └── LICENSE │ │ ├── pubsub │ │ └── LICENSE │ │ └── storage │ │ └── LICENSE │ ├── contrib.go.opencensus.io │ └── exporter │ │ ├── ocagent │ │ └── LICENSE │ │ ├── prometheus │ │ └── LICENSE │ │ └── zipkin │ │ └── LICENSE │ ├── github.com │ ├── Azure │ │ ├── azure-sdk-for-go │ │ │ ├── LICENSE.txt │ │ │ ├── NOTICE.txt │ │ │ └── sdk │ │ │ │ └── azcore │ │ │ │ └── to │ │ │ │ └── LICENSE.txt │ │ └── go-autorest │ │ │ ├── autorest │ │ │ ├── LICENSE │ │ │ ├── adal │ │ │ │ └── LICENSE │ │ │ ├── azure │ │ │ │ ├── auth │ │ │ │ │ └── LICENSE │ │ │ │ └── cli │ │ │ │ │ └── LICENSE │ │ │ ├── date │ │ │ │ └── LICENSE │ │ │ ├── to │ │ │ │ └── LICENSE │ │ │ └── validation │ │ │ │ └── LICENSE │ │ │ ├── logger │ │ │ └── LICENSE │ │ │ └── tracing │ │ │ └── LICENSE │ ├── antlr │ │ └── antlr4 │ │ │ └── runtime │ │ │ └── Go │ │ │ └── antlr │ │ │ └── LICENSE │ ├── asaskevich │ │ └── govalidator │ │ │ └── LICENSE │ ├── aws │ │ └── aws-sdk-go │ │ │ ├── LICENSE.txt │ │ │ ├── NOTICE.txt │ │ │ └── internal │ │ │ └── sync │ │ │ └── singleflight │ │ │ └── LICENSE │ ├── beorn7 │ │ └── perks │ │ │ └── quantile │ │ │ └── LICENSE │ ├── blendle │ │ └── zapdriver │ │ │ └── LICENSE │ ├── census-instrumentation │ │ └── opencensus-proto │ │ │ └── gen-go │ │ │ └── LICENSE │ ├── cespare │ │ └── xxhash │ │ │ └── v2 │ │ │ └── LICENSE.txt │ ├── cloudevents │ │ └── sdk-go │ │ │ ├── observability │ │ │ └── opencensus │ │ │ │ └── v2 │ │ │ │ └── LICENSE │ │ │ └── v2 │ │ │ └── LICENSE │ ├── cpuguy83 │ │ └── go-md2man │ │ │ └── v2 │ │ │ └── md2man │ │ │ └── LICENSE.md │ ├── davecgh │ │ └── go-spew │ │ │ └── spew │ │ │ └── LICENSE │ ├── digitalocean │ │ └── godo │ │ │ └── LICENSE.txt │ ├── dimchansky │ │ └── utfbom │ │ │ └── LICENSE │ ├── docker │ │ ├── distribution │ │ │ └── LICENSE │ │ ├── docker │ │ │ ├── LICENSE │ │ │ └── NOTICE │ │ ├── go-connections │ │ │ └── LICENSE │ │ └── go-units │ │ │ └── LICENSE │ ├── emicklei │ │ └── go-restful │ │ │ └── v3 │ │ │ └── LICENSE │ ├── evanphx │ │ └── json-patch │ │ │ └── v5 │ │ │ └── LICENSE │ ├── go-kit │ │ └── log │ │ │ └── LICENSE │ ├── go-logfmt │ │ └── logfmt │ │ │ └── LICENSE │ ├── go-logr │ │ └── logr │ │ │ └── LICENSE │ ├── go-openapi │ │ ├── jsonpointer │ │ │ └── LICENSE │ │ ├── jsonreference │ │ │ └── LICENSE │ │ └── swag │ │ │ └── LICENSE │ ├── gogo │ │ └── protobuf │ │ │ └── LICENSE │ ├── golang-jwt │ │ └── jwt │ │ │ └── v4 │ │ │ └── LICENSE │ ├── golang │ │ ├── groupcache │ │ │ └── lru │ │ │ │ └── LICENSE │ │ └── protobuf │ │ │ └── LICENSE │ ├── google │ │ ├── cel-go │ │ │ └── LICENSE │ │ ├── gnostic │ │ │ └── LICENSE │ │ ├── go-cmp │ │ │ └── cmp │ │ │ │ └── LICENSE │ │ ├── go-containerregistry │ │ │ └── pkg │ │ │ │ └── name │ │ │ │ └── LICENSE │ │ ├── go-querystring │ │ │ └── query │ │ │ │ └── LICENSE │ │ ├── gofuzz │ │ │ └── LICENSE │ │ ├── s2a-go │ │ │ └── LICENSE.md │ │ └── uuid │ │ │ └── LICENSE │ ├── googleapis │ │ ├── enterprise-certificate-proxy │ │ │ └── client │ │ │ │ └── LICENSE │ │ └── gax-go │ │ │ └── v2 │ │ │ └── LICENSE │ ├── grpc-ecosystem │ │ └── grpc-gateway │ │ │ └── v2 │ │ │ └── LICENSE.txt │ ├── hashicorp │ │ ├── go-cleanhttp │ │ │ ├── LICENSE │ │ │ ├── README.md │ │ │ ├── cleanhttp.go │ │ │ ├── doc.go │ │ │ ├── go.mod │ │ │ ├── handlers.go │ │ │ └── handlers_test.go │ │ ├── go-retryablehttp │ │ │ ├── .circleci │ │ │ │ └── config.yml │ │ │ ├── .gitignore │ │ │ ├── LICENSE │ │ │ ├── Makefile │ │ │ ├── README.md │ │ │ ├── client.go │ │ │ ├── client_test.go │ │ │ ├── go.mod │ │ │ ├── go.sum │ │ │ ├── roundtripper.go │ │ │ └── roundtripper_test.go │ │ └── golang-lru │ │ │ ├── .gitignore │ │ │ ├── 2q.go │ │ │ ├── 2q_test.go │ │ │ ├── LICENSE │ │ │ ├── README.md │ │ │ ├── arc.go │ │ │ ├── arc_test.go │ │ │ ├── doc.go │ │ │ ├── go.mod │ │ │ ├── lru.go │ │ │ ├── lru_test.go │ │ │ └── simplelru │ │ │ ├── lru.go │ │ │ ├── lru_interface.go │ │ │ └── lru_test.go │ ├── imdario │ │ └── mergo │ │ │ └── LICENSE │ ├── jmespath │ │ └── go-jmespath │ │ │ └── LICENSE │ ├── josharian │ │ └── intern │ │ │ └── license.md │ ├── jroimartin │ │ └── gocui │ │ │ └── LICENSE │ ├── json-iterator │ │ └── go │ │ │ └── LICENSE │ ├── kelseyhightower │ │ └── envconfig │ │ │ └── LICENSE │ ├── mailru │ │ └── easyjson │ │ │ └── LICENSE │ ├── mattn │ │ └── go-runewidth │ │ │ └── LICENSE │ ├── matttproud │ │ └── golang_protobuf_extensions │ │ │ └── pbutil │ │ │ ├── LICENSE │ │ │ └── NOTICE │ ├── mitchellh │ │ ├── go-homedir │ │ │ └── LICENSE │ │ └── mapstructure │ │ │ └── LICENSE │ ├── modern-go │ │ ├── concurrent │ │ │ └── LICENSE │ │ └── reflect2 │ │ │ └── LICENSE │ ├── munnerz │ │ └── goautoneg │ │ │ └── LICENSE │ ├── nsf │ │ └── termbox-go │ │ │ └── LICENSE │ ├── opencontainers │ │ ├── go-digest │ │ │ └── LICENSE │ │ └── image-spec │ │ │ └── specs-go │ │ │ └── LICENSE │ ├── openzipkin │ │ └── zipkin-go │ │ │ └── LICENSE │ ├── pkg │ │ └── errors │ │ │ └── LICENSE │ ├── prometheus │ │ ├── client_golang │ │ │ └── prometheus │ │ │ │ ├── LICENSE │ │ │ │ └── NOTICE │ │ ├── client_model │ │ │ └── go │ │ │ │ ├── LICENSE │ │ │ │ └── NOTICE │ │ ├── common │ │ │ ├── LICENSE │ │ │ ├── NOTICE │ │ │ └── internal │ │ │ │ └── bitbucket.org │ │ │ │ └── ww │ │ │ │ └── goautoneg │ │ │ │ └── README.txt │ │ ├── procfs │ │ │ ├── LICENSE │ │ │ └── NOTICE │ │ └── statsd_exporter │ │ │ └── pkg │ │ │ └── mapper │ │ │ ├── LICENSE │ │ │ └── NOTICE │ ├── rickb777 │ │ ├── date │ │ │ └── period │ │ │ │ └── LICENSE │ │ └── plural │ │ │ └── LICENSE │ ├── russross │ │ └── blackfriday │ │ │ └── v2 │ │ │ └── LICENSE.txt │ ├── spf13 │ │ ├── cobra │ │ │ └── LICENSE.txt │ │ └── pflag │ │ │ └── LICENSE │ ├── stoewer │ │ └── go-strcase │ │ │ └── LICENSE │ ├── tidwall │ │ ├── gjson │ │ │ └── LICENSE │ │ ├── match │ │ │ └── LICENSE │ │ └── pretty │ │ │ └── LICENSE │ └── triggermesh │ │ ├── brokers │ │ └── pkg │ │ │ └── config │ │ │ └── broker │ │ │ └── LICENSE │ │ ├── tmctl │ │ └── LICENSE │ │ ├── triggermesh-core │ │ └── pkg │ │ │ └── apis │ │ │ └── eventing │ │ │ └── LICENSE │ │ └── triggermesh │ │ └── pkg │ │ └── LICENSE │ ├── go.opencensus.io │ └── LICENSE │ ├── go.uber.org │ ├── atomic │ │ └── LICENSE.txt │ ├── multierr │ │ └── LICENSE.txt │ └── zap │ │ └── LICENSE.txt │ ├── golang.org │ └── x │ │ ├── crypto │ │ └── LICENSE │ │ ├── net │ │ └── LICENSE │ │ ├── oauth2 │ │ └── LICENSE │ │ ├── sync │ │ └── LICENSE │ │ ├── sys │ │ └── LICENSE │ │ ├── term │ │ └── LICENSE │ │ ├── text │ │ └── LICENSE │ │ ├── time │ │ └── rate │ │ │ └── LICENSE │ │ └── xerrors │ │ └── LICENSE │ ├── gomodules.xyz │ └── jsonpatch │ │ └── v2 │ │ └── LICENSE │ ├── google.golang.org │ ├── api │ │ ├── LICENSE │ │ └── internal │ │ │ └── third_party │ │ │ └── uritemplates │ │ │ └── LICENSE │ ├── appengine │ │ └── LICENSE │ ├── genproto │ │ └── LICENSE │ ├── grpc │ │ ├── LICENSE │ │ └── NOTICE.txt │ └── protobuf │ │ └── LICENSE │ ├── gopkg.in │ ├── inf.v0 │ │ └── LICENSE │ ├── yaml.v2 │ │ ├── LICENSE │ │ └── NOTICE │ └── yaml.v3 │ │ ├── LICENSE │ │ └── NOTICE │ ├── k8s.io │ ├── api │ │ └── LICENSE │ ├── apimachinery │ │ ├── pkg │ │ │ └── LICENSE │ │ └── third_party │ │ │ └── forked │ │ │ └── golang │ │ │ └── LICENSE │ ├── client-go │ │ └── LICENSE │ ├── klog │ │ └── v2 │ │ │ └── LICENSE │ ├── kube-openapi │ │ └── pkg │ │ │ ├── LICENSE │ │ │ ├── internal │ │ │ └── third_party │ │ │ │ └── go-json-experiment │ │ │ │ └── json │ │ │ │ └── LICENSE │ │ │ └── validation │ │ │ ├── errors │ │ │ └── LICENSE │ │ │ ├── spec │ │ │ └── LICENSE │ │ │ ├── strfmt │ │ │ └── LICENSE │ │ │ └── validate │ │ │ └── LICENSE │ └── utils │ │ ├── LICENSE │ │ └── internal │ │ └── third_party │ │ └── forked │ │ └── golang │ │ └── net │ │ └── LICENSE │ ├── knative.dev │ ├── eventing │ │ └── pkg │ │ │ └── LICENSE │ ├── networking │ │ └── pkg │ │ │ └── LICENSE │ ├── pkg │ │ └── LICENSE │ └── serving │ │ └── pkg │ │ └── LICENSE │ └── sigs.k8s.io │ ├── json │ └── LICENSE │ ├── structured-merge-diff │ └── v4 │ │ └── LICENSE │ └── yaml │ └── LICENSE ├── README.md ├── cmd ├── brokers │ └── brokers.go ├── cmd.go ├── config │ └── cmd.go ├── create │ ├── broker.go │ ├── cmd.go │ ├── completion.go │ ├── source.go │ ├── target.go │ ├── transformation.go │ └── trigger.go ├── delete │ ├── broker.go │ ├── cmd.go │ ├── source.go │ ├── target.go │ ├── transformation.go │ └── trigger.go ├── describe │ └── describe.go ├── dump │ └── dump.go ├── import │ └── import.go ├── logs │ └── logs.go ├── sendevent │ └── sendevent.go ├── start │ └── start.go ├── stop │ └── stop.go ├── version │ └── version.go └── watch │ └── watch.go ├── docs ├── tmctl.md ├── tmctl_brokers.md ├── tmctl_config.md ├── tmctl_config_get.md ├── tmctl_config_set.md ├── tmctl_create.md ├── tmctl_create_broker.md ├── tmctl_create_source.md ├── tmctl_create_target.md ├── tmctl_create_transformation.md ├── tmctl_create_trigger.md ├── tmctl_delete.md ├── tmctl_delete_broker.md ├── tmctl_delete_source.md ├── tmctl_delete_target.md ├── tmctl_delete_transformation.md ├── tmctl_delete_trigger.md ├── tmctl_describe.md ├── tmctl_dump.md ├── tmctl_import.md ├── tmctl_logs.md ├── tmctl_send-event.md ├── tmctl_start.md ├── tmctl_stop.md ├── tmctl_version.md └── tmctl_watch.md ├── go.mod ├── go.sum ├── hack ├── boilerplate │ ├── boilerplate.go.txt │ └── boilerplate.yaml.txt └── install.sh ├── main.go ├── pkg ├── completion │ ├── completion.go │ └── completion_test.go ├── config │ ├── config.go │ └── overrides.go ├── docker │ ├── client.go │ ├── compose.go │ ├── config.go │ └── config_test.go ├── gui │ └── transformation │ │ ├── gui.go │ │ ├── keybindings.go │ │ ├── layout.go │ │ ├── process.go │ │ └── schema.go ├── kubernetes │ ├── object.go │ └── object_test.go ├── load │ └── load.go ├── log │ └── log.go ├── manifest │ ├── manifest.go │ └── manifest_test.go ├── output │ └── output.go ├── triggermesh │ ├── adapter │ │ ├── adapter.go │ │ ├── adapter_test.go │ │ ├── ce │ │ │ ├── ce.go │ │ │ ├── sources.go │ │ │ └── targets.go │ │ ├── env │ │ │ ├── env.go │ │ │ ├── extensions.go │ │ │ ├── flow.go │ │ │ ├── routing.go │ │ │ ├── sources.go │ │ │ └── targets.go │ │ └── reconciler │ │ │ ├── external │ │ │ ├── aws │ │ │ │ ├── common.go │ │ │ │ ├── eventbridgesource.go │ │ │ │ └── s3source.go │ │ │ ├── azure │ │ │ │ ├── activitylogs.go │ │ │ │ ├── auth.go │ │ │ │ ├── blobstorage.go │ │ │ │ ├── eventgrid.go │ │ │ │ └── servicebustopic.go │ │ │ └── gcp │ │ │ │ ├── auditlogssource.go │ │ │ │ ├── billingsource.go │ │ │ │ ├── common.go │ │ │ │ ├── pubsubsource.go │ │ │ │ ├── sourcerepositories.go │ │ │ │ └── storagesource.go │ │ │ └── reconciler.go │ ├── components │ │ ├── broker │ │ │ ├── broker.go │ │ │ ├── config.go │ │ │ └── trigger.go │ │ ├── components.go │ │ ├── components_test.go │ │ ├── secret │ │ │ └── secret.go │ │ ├── service │ │ │ └── service.go │ │ ├── source │ │ │ └── source.go │ │ ├── target │ │ │ └── target.go │ │ └── transformation │ │ │ └── transformation.go │ ├── constants.go │ ├── crd │ │ ├── crd.go │ │ ├── schema.go │ │ └── secret.go │ ├── interfaces.go │ └── pkg │ │ └── pkg.go └── wiretap │ └── wiretap.go └── test ├── e2e └── run_e2e_test.sh ├── fixtures ├── broker.conf ├── crd.yaml └── manifest.yaml └── test.go /.github/dependabot.yml: -------------------------------------------------------------------------------- 1 | # Dependabot configuration 2 | # 3 | # For more information, please refer to: 4 | # https://docs.github.com/en/code-security/dependabot/dependabot-version-updates 5 | 6 | version: 2 7 | 8 | updates: 9 | 10 | # Maintain Go modules 11 | - package-ecosystem: gomod 12 | directory: / 13 | schedule: 14 | interval: weekly 15 | ignore: 16 | # We prefer to keep control over Knative module imports. 17 | - dependency-name: knative.dev/* 18 | # The version of Kubernetes module imports needs to be consistent across all 19 | # modules. Besides, that version is determined by the current Knative version. 20 | - dependency-name: k8s.io/* 21 | 22 | # Maintain dependencies for GitHub Actions 23 | - package-ecosystem: github-actions 24 | directory: / 25 | schedule: 26 | interval: weekly 27 | -------------------------------------------------------------------------------- /.github/workflows/codeql.yaml: -------------------------------------------------------------------------------- 1 | name: CodeQL 2 | 3 | on: 4 | schedule: 5 | - cron: '0 0 * * 0' # At 00:00 every Sunday 6 | 7 | jobs: 8 | 9 | codeql: 10 | name: Code Analysis 11 | runs-on: ubuntu-latest 12 | env: 13 | # Force CodeQL to run the extraction on the files compiled by our custom 14 | # build command, as opposed to letting the autobuilder figure it out. 15 | # This approach is more efficient because TriggerMesh is composed of 16 | # multiple small programs. 17 | CODEQL_EXTRACTOR_GO_BUILD_TRACING: 'on' 18 | 19 | permissions: 20 | security-events: write 21 | 22 | steps: 23 | - uses: actions/checkout@v3 24 | 25 | - name: Set up Go 26 | uses: actions/setup-go@v4 27 | with: 28 | go-version: '1.19' 29 | 30 | - name: Go caches 31 | uses: actions/cache@v3 32 | with: 33 | path: | 34 | ~/.cache/go-build 35 | ~/go/pkg/mod 36 | key: ${{ github.job }}-${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} 37 | restore-keys: | 38 | ${{ github.job }}-${{ runner.os }}-go- 39 | 40 | - name: Initialize CodeQL 41 | uses: github/codeql-action/init@v2 42 | with: 43 | languages: go 44 | 45 | # The code compiled in this step is also the one being analyzed in the next 46 | # step, due to build tracing being enabled via the CODEQL_EXTRACTOR_GO_BUILD_TRACING 47 | # environment variable. 48 | - name: Build Go code 49 | run: go build ./... 50 | 51 | # This step follows the three-step extraction process described at 52 | # https://lgtm.com/help/lgtm/go-extraction 53 | - name: Perform CodeQL Analysis 54 | uses: github/codeql-action/analyze@v2 55 | -------------------------------------------------------------------------------- /.github/workflows/config/reviewdog.yaml: -------------------------------------------------------------------------------- 1 | # reviewdog configuration 2 | 3 | runner: 4 | license-go: 5 | # Uses https://github.com/mattmoor/boilerplate-check 6 | cmd: >- 7 | boilerplate-check check 8 | --boilerplate=hack/boilerplate/boilerplate.go.txt 9 | --file-extension=go 10 | --exclude=vendor 11 | # See 'errorformat' documentation at https://vimhelp.org/quickfix.txt.html#error-file-format 12 | errorformat: 13 | - '%A%f:%l: %m' 14 | - '%C%.%#' 15 | -------------------------------------------------------------------------------- /.github/workflows/docgen.yaml: -------------------------------------------------------------------------------- 1 | name: CLI documentation 2 | 3 | on: 4 | push: 5 | branches: [ main ] 6 | pull_request: 7 | branches: [ main ] 8 | 9 | jobs: 10 | 11 | docs: 12 | name: CLI command reference 13 | runs-on: ubuntu-latest 14 | 15 | steps: 16 | - uses: actions/checkout@v3 17 | 18 | - name: Set up Go 19 | uses: actions/setup-go@v4 20 | with: 21 | go-version: '1.19' 22 | 23 | - name: Go caches 24 | uses: actions/cache@v3 25 | with: 26 | path: | 27 | ~/.cache/go-build 28 | ~/go/pkg/mod 29 | key: ${{ github.job }}-${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} 30 | restore-keys: | 31 | ${{ github.job }}-${{ runner.os }}-go- 32 | 33 | - name: CLI ref check 34 | run: | 35 | TMCTL_GENERATE_DOCS=true go run main.go 36 | 37 | git_status="$(git status --porcelain)" 38 | if [[ ${git_status} ]]; then 39 | echo -e 'Generated CLI references are out-of-date. Please run `TMCTL_GENERATE_DOCS=true go run main.go`\n' 40 | echo "${git_status}" 41 | exit 1 42 | fi 43 | 44 | -------------------------------------------------------------------------------- /.github/workflows/e2e.yaml: -------------------------------------------------------------------------------- 1 | name: E2E 2 | 3 | on: 4 | push: 5 | branches: [ main ] 6 | pull_request: 7 | branches: [ main ] 8 | 9 | jobs: 10 | 11 | test: 12 | runs-on: ubuntu-latest 13 | steps: 14 | - uses: actions/checkout@v3 15 | 16 | - name: Set up Go 17 | uses: actions/setup-go@v4 18 | with: 19 | go-version: 1.19 20 | 21 | - name: Go caches 22 | uses: actions/cache@v3 23 | with: 24 | path: | 25 | ~/.cache/go-build 26 | ~/go/pkg/mod 27 | key: ${{ github.job }}-${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} 28 | restore-keys: | 29 | ${{ github.job }}-${{ runner.os }}-go- 30 | 31 | - name: Test 32 | run: bash ./test/e2e/run_e2e_test.sh 33 | -------------------------------------------------------------------------------- /.github/workflows/gotest.yaml: -------------------------------------------------------------------------------- 1 | name: Unit test 2 | 3 | on: 4 | push: 5 | branches: [ main ] 6 | pull_request: 7 | branches: [ main ] 8 | 9 | jobs: 10 | 11 | tests: 12 | runs-on: ubuntu-latest 13 | steps: 14 | - uses: actions/checkout@v3 15 | 16 | - name: Set up Go 17 | uses: actions/setup-go@v4 18 | with: 19 | go-version: 1.19 20 | 21 | - name: Go caches 22 | uses: actions/cache@v3 23 | with: 24 | path: | 25 | ~/.cache/go-build 26 | ~/go/pkg/mod 27 | key: ${{ github.job }}-${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} 28 | restore-keys: | 29 | ${{ github.job }}-${{ runner.os }}-go- 30 | 31 | - name: Test 32 | run: go test -v ./... --cover 33 | -------------------------------------------------------------------------------- /.github/workflows/licenses.yaml: -------------------------------------------------------------------------------- 1 | name: OSS Licenses 2 | 3 | on: 4 | push: 5 | branches: [ main ] 6 | pull_request: 7 | branches: [ main ] 8 | 9 | jobs: 10 | 11 | boilerplate: 12 | name: Apache 2.0 License 13 | runs-on: ubuntu-latest 14 | 15 | steps: 16 | - uses: actions/checkout@v3 17 | 18 | - name: Set up Go 19 | uses: actions/setup-go@v4 20 | with: 21 | go-version: '1.19' 22 | 23 | - name: Go caches 24 | uses: actions/cache@v3 25 | with: 26 | path: | 27 | ~/.cache/go-build 28 | ~/go/pkg/mod 29 | key: ${{ github.job }}-${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} 30 | restore-keys: | 31 | ${{ github.job }}-${{ runner.os }}-go- 32 | 33 | - name: Install reviewdog 34 | uses: reviewdog/action-setup@v1 35 | 36 | - name: Install boilerplate-check 37 | run: go install github.com/mattmoor/boilerplate-check/cmd/boilerplate-check@latest 38 | 39 | - name: Check license boilerplate 40 | env: 41 | REVIEWDOG_GITHUB_API_TOKEN: ${{ secrets.GITHUB_TOKEN }} 42 | run: | 43 | reviewdog -conf=.github/workflows/config/reviewdog.yaml \ 44 | -runners=license-go \ 45 | -filter-mode=diff_context \ 46 | -reporter=github-check \ 47 | -fail-on-error=true 48 | 49 | vendor: 50 | name: Third-Party Licenses 51 | runs-on: ubuntu-latest 52 | 53 | steps: 54 | - uses: actions/checkout@v3 55 | 56 | - name: Set up Go 57 | uses: actions/setup-go@v4 58 | with: 59 | go-version: '1.19' 60 | 61 | - name: Go caches 62 | uses: actions/cache@v3 63 | with: 64 | path: | 65 | ~/.cache/go-build 66 | ~/go/pkg/mod 67 | key: ${{ github.job }}-${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} 68 | restore-keys: | 69 | ${{ github.job }}-${{ runner.os }}-go- 70 | 71 | - name: Install go-licenses 72 | run: go install github.com/google/go-licenses@v1.5.0 73 | 74 | - name: Check third-party licenses 75 | run: | 76 | go-licenses save ./... --save_path LICENSES/vendor/ --force 77 | 78 | git_status="$(git status --porcelain)" 79 | if [[ ${git_status} ]]; then 80 | echo -e 'Third-party licenses are out-of-date. Please run `go-licenses save`\n' 81 | echo "${git_status}" 82 | exit 1 83 | fi 84 | 85 | -------------------------------------------------------------------------------- /.github/workflows/release.yaml: -------------------------------------------------------------------------------- 1 | name: release 2 | 3 | on: 4 | push: 5 | tags: 6 | - 'v*' 7 | 8 | permissions: 9 | contents: write 10 | packages: write 11 | 12 | jobs: 13 | release: 14 | runs-on: ubuntu-latest 15 | steps: 16 | - name: Checkout 17 | uses: actions/checkout@v3 18 | with: 19 | fetch-depth: 0 20 | - name: Set up Go 21 | uses: actions/setup-go@v4 22 | with: 23 | go-version: 1.19 24 | - name: Run GoReleaser 25 | uses: goreleaser/goreleaser-action@v4 26 | with: 27 | distribution: goreleaser 28 | version: latest 29 | args: release --rm-dist 30 | env: 31 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 32 | TAP_GITHUB_TOKEN: ${{ secrets.TAP_GITHUB_TOKEN }} 33 | -------------------------------------------------------------------------------- /.github/workflows/static.yaml: -------------------------------------------------------------------------------- 1 | name: Static Code Analysis 2 | 3 | on: 4 | push: 5 | branches: [ main ] 6 | pull_request: 7 | branches: [ main ] 8 | 9 | jobs: 10 | 11 | lint-code: 12 | name: Code Linting 13 | runs-on: ubuntu-latest 14 | 15 | steps: 16 | - uses: actions/checkout@v3 17 | 18 | - name: Set up Go 19 | uses: actions/setup-go@v4 20 | with: 21 | go-version: '1.19' 22 | 23 | # This action takes care of caching/restoring modules and build caches. 24 | # Therefore, this step should remain the first one that is executed after 25 | # the Go setup, in case other steps are added to this job in the future. 26 | - name: Lint Go code 27 | uses: golangci/golangci-lint-action@v3 28 | with: 29 | # (hack) By default, errors are reported to the GitHub commit view only 30 | # (or the "Files changed" tab on PRs). We also want errors to be logged 31 | # with line numbers to the execution logs of the workflow. 32 | # 33 | # The args below result in the following flags being passed to the 34 | # linter command, which works, quite surprisingly: 35 | # --out-format=github-actions --out-format=colored-line-number 36 | # 37 | # Ref. https://github.com/golangci/golangci-lint-action/issues/119#issuecomment-981090648 38 | args: --out-${NO_FUTURE}format=colored-line-number --timeout 15m 39 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | test/e2e/_run/ 2 | releases/ 3 | -------------------------------------------------------------------------------- /.goreleaser.yaml: -------------------------------------------------------------------------------- 1 | dist: releases 2 | 3 | builds: 4 | - id: default 5 | mod_timestamp: "{{ .CommitTimestamp }}" 6 | env: 7 | - CGO_ENABLED=0 8 | goos: 9 | - linux 10 | - windows 11 | - darwin 12 | goarch: 13 | - amd64 14 | - arm64 15 | - arm 16 | ignore: 17 | - goos: windows 18 | goarch: arm64 19 | - goos: windows 20 | goarch: arm 21 | ldflags: 22 | - -X "main.Version=v{{ .Version }}" 23 | - -X "main.Commit={{ .FullCommit }}" 24 | 25 | archives: 26 | - id: default 27 | name_template: '{{ .ProjectName }}_{{ .Os }}_{{ .Arch }}{{ with .Arm }}v{{ . }}{{ end }}{{ if not (eq .Amd64 "v1") }}{{ .Amd64 }}{{ end }}' 28 | format_overrides: 29 | - goos: windows 30 | format: zip 31 | 32 | checksum: 33 | name_template: 'checksums.txt' 34 | 35 | snapshot: 36 | name_template: "{{ incpatch .Version }}-next" 37 | 38 | changelog: 39 | use: github 40 | sort: asc 41 | filters: 42 | exclude: 43 | - "^docs:" 44 | - "^test:" 45 | - "^Merge pull request" 46 | 47 | brews: 48 | - description: "tmctl" 49 | homepage: "https://github.com/triggermesh/tmctl" 50 | license: "Apache 2.0" 51 | tap: 52 | owner: triggermesh 53 | name: homebrew-cli 54 | token: "{{ .Env.TAP_GITHUB_TOKEN }}" 55 | install: | 56 | bin.install "tmctl" 57 | generate_completions_from_executable(bin/"tmctl", "completion", shells: [:bash, :zsh]) 58 | -------------------------------------------------------------------------------- /LICENSES/vendor/github.com/Azure/azure-sdk-for-go/LICENSE.txt: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) Microsoft Corporation. 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /LICENSES/vendor/github.com/Azure/azure-sdk-for-go/NOTICE.txt: -------------------------------------------------------------------------------- 1 | NOTICES AND INFORMATION 2 | Do Not Translate or Localize 3 | 4 | This software incorporates material from third parties. Microsoft makes certain 5 | open source code available at https://3rdpartysource.microsoft.com, or you may 6 | send a check or money order for US $5.00, including the product name, the open 7 | source component name, and version number, to: 8 | 9 | Source Code Compliance Team 10 | Microsoft Corporation 11 | One Microsoft Way 12 | Redmond, WA 98052 13 | USA 14 | 15 | Notwithstanding any other terms, you may reverse engineer this software to the 16 | extent required to debug changes to any libraries licensed under the GNU Lesser 17 | General Public License. 18 | 19 | ------------------------------------------------------------------------------ 20 | 21 | Azure SDK for Go uses third-party libraries or other resources that may be 22 | distributed under licenses different than the Azure SDK for Go software. 23 | 24 | In the event that we accidentally failed to list a required notice, please 25 | bring it to our attention. Post an issue or email us: 26 | 27 | azgosdkhelp@microsoft.com 28 | 29 | The attached notices are provided for information only. 30 | -------------------------------------------------------------------------------- /LICENSES/vendor/github.com/Azure/azure-sdk-for-go/sdk/azcore/to/LICENSE.txt: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) Microsoft Corporation. 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE 22 | -------------------------------------------------------------------------------- /LICENSES/vendor/github.com/antlr/antlr4/runtime/Go/antlr/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright 2021 The ANTLR Project 2 | 3 | Redistribution and use in source and binary forms, with or without modification, 4 | are permitted provided that the following conditions are met: 5 | 6 | 1. Redistributions of source code must retain the above copyright notice, 7 | this list of conditions and the following disclaimer. 8 | 9 | 2. Redistributions in binary form must reproduce the above copyright notice, 10 | this list of conditions and the following disclaimer in the documentation 11 | and/or other materials provided with the distribution. 12 | 13 | 3. Neither the name of the copyright holder nor the names of its 14 | contributors may be used to endorse or promote products derived from this 15 | software without specific prior written permission. 16 | 17 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 18 | ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 19 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 20 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 21 | FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 22 | DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 23 | SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 24 | CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 25 | OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 26 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27 | -------------------------------------------------------------------------------- /LICENSES/vendor/github.com/asaskevich/govalidator/LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2014 Alex Saskevich 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. -------------------------------------------------------------------------------- /LICENSES/vendor/github.com/aws/aws-sdk-go/NOTICE.txt: -------------------------------------------------------------------------------- 1 | AWS SDK for Go 2 | Copyright 2015 Amazon.com, Inc. or its affiliates. All Rights Reserved. 3 | Copyright 2014-2015 Stripe, Inc. 4 | -------------------------------------------------------------------------------- /LICENSES/vendor/github.com/aws/aws-sdk-go/internal/sync/singleflight/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2009 The Go Authors. All rights reserved. 2 | 3 | Redistribution and use in source and binary forms, with or without 4 | modification, are permitted provided that the following conditions are 5 | met: 6 | 7 | * Redistributions of source code must retain the above copyright 8 | notice, this list of conditions and the following disclaimer. 9 | * Redistributions in binary form must reproduce the above 10 | copyright notice, this list of conditions and the following disclaimer 11 | in the documentation and/or other materials provided with the 12 | distribution. 13 | * Neither the name of Google Inc. nor the names of its 14 | contributors may be used to endorse or promote products derived from 15 | this software without specific prior written permission. 16 | 17 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 18 | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 19 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 20 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 21 | OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 22 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 23 | LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 24 | DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 25 | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 26 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 27 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 | -------------------------------------------------------------------------------- /LICENSES/vendor/github.com/beorn7/perks/quantile/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (C) 2013 Blake Mizerany 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining 4 | a copy of this software and associated documentation files (the 5 | "Software"), to deal in the Software without restriction, including 6 | without limitation the rights to use, copy, modify, merge, publish, 7 | distribute, sublicense, and/or sell copies of the Software, and to 8 | permit persons to whom the Software is furnished to do so, subject to 9 | the following conditions: 10 | 11 | The above copyright notice and this permission notice shall be 12 | included in all copies or substantial portions of the Software. 13 | 14 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 15 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 16 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 17 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 18 | LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 19 | OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 20 | WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 21 | -------------------------------------------------------------------------------- /LICENSES/vendor/github.com/blendle/zapdriver/LICENSE: -------------------------------------------------------------------------------- 1 | ISC License 2 | 3 | Copyright (c) Blendle 4 | 5 | Permission to use, copy, modify, and/or distribute this software for any 6 | purpose with or without fee is hereby granted, provided that the above 7 | copyright notice and this permission notice appear in all copies. 8 | 9 | THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 10 | WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 11 | MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 12 | ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 13 | WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 14 | ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF 15 | OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 16 | -------------------------------------------------------------------------------- /LICENSES/vendor/github.com/cespare/xxhash/v2/LICENSE.txt: -------------------------------------------------------------------------------- 1 | Copyright (c) 2016 Caleb Spare 2 | 3 | MIT License 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining 6 | a copy of this software and associated documentation files (the 7 | "Software"), to deal in the Software without restriction, including 8 | without limitation the rights to use, copy, modify, merge, publish, 9 | distribute, sublicense, and/or sell copies of the Software, and to 10 | permit persons to whom the Software is furnished to do so, subject to 11 | the following conditions: 12 | 13 | The above copyright notice and this permission notice shall be 14 | included in all copies or substantial portions of the Software. 15 | 16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 17 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 18 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 19 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 20 | LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 21 | OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 22 | WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 23 | -------------------------------------------------------------------------------- /LICENSES/vendor/github.com/cpuguy83/go-md2man/v2/md2man/LICENSE.md: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2014 Brian Goff 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /LICENSES/vendor/github.com/davecgh/go-spew/spew/LICENSE: -------------------------------------------------------------------------------- 1 | ISC License 2 | 3 | Copyright (c) 2012-2016 Dave Collins 4 | 5 | Permission to use, copy, modify, and/or distribute this software for any 6 | purpose with or without fee is hereby granted, provided that the above 7 | copyright notice and this permission notice appear in all copies. 8 | 9 | THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 10 | WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 11 | MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 12 | ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 13 | WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 14 | ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF 15 | OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 16 | -------------------------------------------------------------------------------- /LICENSES/vendor/github.com/docker/docker/NOTICE: -------------------------------------------------------------------------------- 1 | Docker 2 | Copyright 2012-2017 Docker, Inc. 3 | 4 | This product includes software developed at Docker, Inc. (https://www.docker.com). 5 | 6 | This product contains software (https://github.com/creack/pty) developed 7 | by Keith Rarick, licensed under the MIT License. 8 | 9 | The following is courtesy of our legal counsel: 10 | 11 | 12 | Use and transfer of Docker may be subject to certain restrictions by the 13 | United States and other governments. 14 | It is your responsibility to ensure that your use and/or transfer does not 15 | violate applicable laws. 16 | 17 | For more information, please see https://www.bis.doc.gov 18 | 19 | See also https://www.apache.org/dev/crypto.html and/or seek legal counsel. 20 | -------------------------------------------------------------------------------- /LICENSES/vendor/github.com/emicklei/go-restful/v3/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2012,2013 Ernest Micklei 2 | 3 | MIT License 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining 6 | a copy of this software and associated documentation files (the 7 | "Software"), to deal in the Software without restriction, including 8 | without limitation the rights to use, copy, modify, merge, publish, 9 | distribute, sublicense, and/or sell copies of the Software, and to 10 | permit persons to whom the Software is furnished to do so, subject to 11 | the following conditions: 12 | 13 | The above copyright notice and this permission notice shall be 14 | included in all copies or substantial portions of the Software. 15 | 16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 17 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 18 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 19 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 20 | LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 21 | OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 22 | WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -------------------------------------------------------------------------------- /LICENSES/vendor/github.com/evanphx/json-patch/v5/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2014, Evan Phoenix 2 | All rights reserved. 3 | 4 | Redistribution and use in source and binary forms, with or without 5 | modification, are permitted provided that the following conditions are met: 6 | 7 | * Redistributions of source code must retain the above copyright notice, this 8 | list of conditions and the following disclaimer. 9 | * Redistributions in binary form must reproduce the above copyright notice, 10 | this list of conditions and the following disclaimer in the documentation 11 | and/or other materials provided with the distribution. 12 | * Neither the name of the Evan Phoenix nor the names of its contributors 13 | may be used to endorse or promote products derived from this software 14 | without specific prior written permission. 15 | 16 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 17 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 18 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 19 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE 20 | FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 21 | DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 22 | SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 23 | CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 24 | OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 25 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 | -------------------------------------------------------------------------------- /LICENSES/vendor/github.com/go-kit/log/LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2021 Go kit 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /LICENSES/vendor/github.com/go-logfmt/logfmt/LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2015 go-logfmt 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | 23 | -------------------------------------------------------------------------------- /LICENSES/vendor/github.com/gogo/protobuf/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2013, The GoGo Authors. All rights reserved. 2 | 3 | Protocol Buffers for Go with Gadgets 4 | 5 | Go support for Protocol Buffers - Google's data interchange format 6 | 7 | Copyright 2010 The Go Authors. All rights reserved. 8 | https://github.com/golang/protobuf 9 | 10 | Redistribution and use in source and binary forms, with or without 11 | modification, are permitted provided that the following conditions are 12 | met: 13 | 14 | * Redistributions of source code must retain the above copyright 15 | notice, this list of conditions and the following disclaimer. 16 | * Redistributions in binary form must reproduce the above 17 | copyright notice, this list of conditions and the following disclaimer 18 | in the documentation and/or other materials provided with the 19 | distribution. 20 | * Neither the name of Google Inc. nor the names of its 21 | contributors may be used to endorse or promote products derived from 22 | this software without specific prior written permission. 23 | 24 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 25 | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 26 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 27 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 28 | OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 29 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 30 | LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 31 | DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 32 | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 33 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 34 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 35 | 36 | -------------------------------------------------------------------------------- /LICENSES/vendor/github.com/golang-jwt/jwt/v4/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2012 Dave Grijalva 2 | Copyright (c) 2021 golang-jwt maintainers 3 | 4 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 5 | 6 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 7 | 8 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 9 | 10 | -------------------------------------------------------------------------------- /LICENSES/vendor/github.com/golang/protobuf/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright 2010 The Go Authors. All rights reserved. 2 | 3 | Redistribution and use in source and binary forms, with or without 4 | modification, are permitted provided that the following conditions are 5 | met: 6 | 7 | * Redistributions of source code must retain the above copyright 8 | notice, this list of conditions and the following disclaimer. 9 | * Redistributions in binary form must reproduce the above 10 | copyright notice, this list of conditions and the following disclaimer 11 | in the documentation and/or other materials provided with the 12 | distribution. 13 | * Neither the name of Google Inc. nor the names of its 14 | contributors may be used to endorse or promote products derived from 15 | this software without specific prior written permission. 16 | 17 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 18 | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 19 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 20 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 21 | OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 22 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 23 | LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 24 | DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 25 | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 26 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 27 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 | 29 | -------------------------------------------------------------------------------- /LICENSES/vendor/github.com/google/go-cmp/cmp/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2017 The Go Authors. All rights reserved. 2 | 3 | Redistribution and use in source and binary forms, with or without 4 | modification, are permitted provided that the following conditions are 5 | met: 6 | 7 | * Redistributions of source code must retain the above copyright 8 | notice, this list of conditions and the following disclaimer. 9 | * Redistributions in binary form must reproduce the above 10 | copyright notice, this list of conditions and the following disclaimer 11 | in the documentation and/or other materials provided with the 12 | distribution. 13 | * Neither the name of Google Inc. nor the names of its 14 | contributors may be used to endorse or promote products derived from 15 | this software without specific prior written permission. 16 | 17 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 18 | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 19 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 20 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 21 | OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 22 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 23 | LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 24 | DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 25 | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 26 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 27 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 | -------------------------------------------------------------------------------- /LICENSES/vendor/github.com/google/go-querystring/query/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2013 Google. All rights reserved. 2 | 3 | Redistribution and use in source and binary forms, with or without 4 | modification, are permitted provided that the following conditions are 5 | met: 6 | 7 | * Redistributions of source code must retain the above copyright 8 | notice, this list of conditions and the following disclaimer. 9 | * Redistributions in binary form must reproduce the above 10 | copyright notice, this list of conditions and the following disclaimer 11 | in the documentation and/or other materials provided with the 12 | distribution. 13 | * Neither the name of Google Inc. nor the names of its 14 | contributors may be used to endorse or promote products derived from 15 | this software without specific prior written permission. 16 | 17 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 18 | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 19 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 20 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 21 | OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 22 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 23 | LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 24 | DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 25 | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 26 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 27 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 | -------------------------------------------------------------------------------- /LICENSES/vendor/github.com/google/uuid/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2009,2014 Google Inc. All rights reserved. 2 | 3 | Redistribution and use in source and binary forms, with or without 4 | modification, are permitted provided that the following conditions are 5 | met: 6 | 7 | * Redistributions of source code must retain the above copyright 8 | notice, this list of conditions and the following disclaimer. 9 | * Redistributions in binary form must reproduce the above 10 | copyright notice, this list of conditions and the following disclaimer 11 | in the documentation and/or other materials provided with the 12 | distribution. 13 | * Neither the name of Google Inc. nor the names of its 14 | contributors may be used to endorse or promote products derived from 15 | this software without specific prior written permission. 16 | 17 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 18 | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 19 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 20 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 21 | OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 22 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 23 | LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 24 | DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 25 | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 26 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 27 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 | -------------------------------------------------------------------------------- /LICENSES/vendor/github.com/googleapis/gax-go/v2/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright 2016, Google Inc. 2 | All rights reserved. 3 | Redistribution and use in source and binary forms, with or without 4 | modification, are permitted provided that the following conditions are 5 | met: 6 | 7 | * Redistributions of source code must retain the above copyright 8 | notice, this list of conditions and the following disclaimer. 9 | * Redistributions in binary form must reproduce the above 10 | copyright notice, this list of conditions and the following disclaimer 11 | in the documentation and/or other materials provided with the 12 | distribution. 13 | * Neither the name of Google Inc. nor the names of its 14 | contributors may be used to endorse or promote products derived from 15 | this software without specific prior written permission. 16 | 17 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 18 | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 19 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 20 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 21 | OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 22 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 23 | LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 24 | DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 25 | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 26 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 27 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 | -------------------------------------------------------------------------------- /LICENSES/vendor/github.com/grpc-ecosystem/grpc-gateway/v2/LICENSE.txt: -------------------------------------------------------------------------------- 1 | Copyright (c) 2015, Gengo, Inc. 2 | All rights reserved. 3 | 4 | Redistribution and use in source and binary forms, with or without modification, 5 | are permitted provided that the following conditions are met: 6 | 7 | * Redistributions of source code must retain the above copyright notice, 8 | this list of conditions and the following disclaimer. 9 | 10 | * Redistributions in binary form must reproduce the above copyright notice, 11 | this list of conditions and the following disclaimer in the documentation 12 | and/or other materials provided with the distribution. 13 | 14 | * Neither the name of Gengo, Inc. nor the names of its 15 | contributors may be used to endorse or promote products derived from this 16 | software without specific prior written permission. 17 | 18 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 19 | ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 20 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 21 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR 22 | ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 23 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 24 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON 25 | ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 26 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 27 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 | -------------------------------------------------------------------------------- /LICENSES/vendor/github.com/hashicorp/go-cleanhttp/README.md: -------------------------------------------------------------------------------- 1 | # cleanhttp 2 | 3 | Functions for accessing "clean" Go http.Client values 4 | 5 | ------------- 6 | 7 | The Go standard library contains a default `http.Client` called 8 | `http.DefaultClient`. It is a common idiom in Go code to start with 9 | `http.DefaultClient` and tweak it as necessary, and in fact, this is 10 | encouraged; from the `http` package documentation: 11 | 12 | > The Client's Transport typically has internal state (cached TCP connections), 13 | so Clients should be reused instead of created as needed. Clients are safe for 14 | concurrent use by multiple goroutines. 15 | 16 | Unfortunately, this is a shared value, and it is not uncommon for libraries to 17 | assume that they are free to modify it at will. With enough dependencies, it 18 | can be very easy to encounter strange problems and race conditions due to 19 | manipulation of this shared value across libraries and goroutines (clients are 20 | safe for concurrent use, but writing values to the client struct itself is not 21 | protected). 22 | 23 | Making things worse is the fact that a bare `http.Client` will use a default 24 | `http.Transport` called `http.DefaultTransport`, which is another global value 25 | that behaves the same way. So it is not simply enough to replace 26 | `http.DefaultClient` with `&http.Client{}`. 27 | 28 | This repository provides some simple functions to get a "clean" `http.Client` 29 | -- one that uses the same default values as the Go standard library, but 30 | returns a client that does not share any state with other clients. 31 | -------------------------------------------------------------------------------- /LICENSES/vendor/github.com/hashicorp/go-cleanhttp/cleanhttp.go: -------------------------------------------------------------------------------- 1 | package cleanhttp 2 | 3 | import ( 4 | "net" 5 | "net/http" 6 | "runtime" 7 | "time" 8 | ) 9 | 10 | // DefaultTransport returns a new http.Transport with similar default values to 11 | // http.DefaultTransport, but with idle connections and keepalives disabled. 12 | func DefaultTransport() *http.Transport { 13 | transport := DefaultPooledTransport() 14 | transport.DisableKeepAlives = true 15 | transport.MaxIdleConnsPerHost = -1 16 | return transport 17 | } 18 | 19 | // DefaultPooledTransport returns a new http.Transport with similar default 20 | // values to http.DefaultTransport. Do not use this for transient transports as 21 | // it can leak file descriptors over time. Only use this for transports that 22 | // will be re-used for the same host(s). 23 | func DefaultPooledTransport() *http.Transport { 24 | transport := &http.Transport{ 25 | Proxy: http.ProxyFromEnvironment, 26 | DialContext: (&net.Dialer{ 27 | Timeout: 30 * time.Second, 28 | KeepAlive: 30 * time.Second, 29 | DualStack: true, 30 | }).DialContext, 31 | MaxIdleConns: 100, 32 | IdleConnTimeout: 90 * time.Second, 33 | TLSHandshakeTimeout: 10 * time.Second, 34 | ExpectContinueTimeout: 1 * time.Second, 35 | ForceAttemptHTTP2: true, 36 | MaxIdleConnsPerHost: runtime.GOMAXPROCS(0) + 1, 37 | } 38 | return transport 39 | } 40 | 41 | // DefaultClient returns a new http.Client with similar default values to 42 | // http.Client, but with a non-shared Transport, idle connections disabled, and 43 | // keepalives disabled. 44 | func DefaultClient() *http.Client { 45 | return &http.Client{ 46 | Transport: DefaultTransport(), 47 | } 48 | } 49 | 50 | // DefaultPooledClient returns a new http.Client with similar default values to 51 | // http.Client, but with a shared Transport. Do not use this function for 52 | // transient clients as it can leak file descriptors over time. Only use this 53 | // for clients that will be re-used for the same host(s). 54 | func DefaultPooledClient() *http.Client { 55 | return &http.Client{ 56 | Transport: DefaultPooledTransport(), 57 | } 58 | } 59 | -------------------------------------------------------------------------------- /LICENSES/vendor/github.com/hashicorp/go-cleanhttp/doc.go: -------------------------------------------------------------------------------- 1 | // Package cleanhttp offers convenience utilities for acquiring "clean" 2 | // http.Transport and http.Client structs. 3 | // 4 | // Values set on http.DefaultClient and http.DefaultTransport affect all 5 | // callers. This can have detrimental effects, esepcially in TLS contexts, 6 | // where client or root certificates set to talk to multiple endpoints can end 7 | // up displacing each other, leading to hard-to-debug issues. This package 8 | // provides non-shared http.Client and http.Transport structs to ensure that 9 | // the configuration will not be overwritten by other parts of the application 10 | // or dependencies. 11 | // 12 | // The DefaultClient and DefaultTransport functions disable idle connections 13 | // and keepalives. Without ensuring that idle connections are closed before 14 | // garbage collection, short-term clients/transports can leak file descriptors, 15 | // eventually leading to "too many open files" errors. If you will be 16 | // connecting to the same hosts repeatedly from the same client, you can use 17 | // DefaultPooledClient to receive a client that has connection pooling 18 | // semantics similar to http.DefaultClient. 19 | // 20 | package cleanhttp 21 | -------------------------------------------------------------------------------- /LICENSES/vendor/github.com/hashicorp/go-cleanhttp/go.mod: -------------------------------------------------------------------------------- 1 | module github.com/hashicorp/go-cleanhttp 2 | 3 | go 1.13 4 | -------------------------------------------------------------------------------- /LICENSES/vendor/github.com/hashicorp/go-cleanhttp/handlers.go: -------------------------------------------------------------------------------- 1 | package cleanhttp 2 | 3 | import ( 4 | "net/http" 5 | "strings" 6 | "unicode" 7 | ) 8 | 9 | // HandlerInput provides input options to cleanhttp's handlers 10 | type HandlerInput struct { 11 | ErrStatus int 12 | } 13 | 14 | // PrintablePathCheckHandler is a middleware that ensures the request path 15 | // contains only printable runes. 16 | func PrintablePathCheckHandler(next http.Handler, input *HandlerInput) http.Handler { 17 | // Nil-check on input to make it optional 18 | if input == nil { 19 | input = &HandlerInput{ 20 | ErrStatus: http.StatusBadRequest, 21 | } 22 | } 23 | 24 | // Default to http.StatusBadRequest on error 25 | if input.ErrStatus == 0 { 26 | input.ErrStatus = http.StatusBadRequest 27 | } 28 | 29 | return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { 30 | if r != nil { 31 | // Check URL path for non-printable characters 32 | idx := strings.IndexFunc(r.URL.Path, func(c rune) bool { 33 | return !unicode.IsPrint(c) 34 | }) 35 | 36 | if idx != -1 { 37 | w.WriteHeader(input.ErrStatus) 38 | return 39 | } 40 | 41 | if next != nil { 42 | next.ServeHTTP(w, r) 43 | } 44 | } 45 | 46 | return 47 | }) 48 | } 49 | -------------------------------------------------------------------------------- /LICENSES/vendor/github.com/hashicorp/go-cleanhttp/handlers_test.go: -------------------------------------------------------------------------------- 1 | package cleanhttp 2 | 3 | import ( 4 | "fmt" 5 | "net/http" 6 | "net/http/httptest" 7 | "testing" 8 | ) 9 | 10 | func TestPrintablePathCheckHandler(t *testing.T) { 11 | getTestHandler := http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { 12 | fmt.Fprintln(w, "Hello, client") 13 | }) 14 | 15 | cases := map[string]struct { 16 | path string 17 | expectCode int 18 | input *HandlerInput 19 | }{ 20 | "valid nil input": { 21 | path: "/valid", 22 | expectCode: http.StatusOK, 23 | input: nil, 24 | }, 25 | 26 | "valid empty error status": { 27 | path: "/valid", 28 | expectCode: http.StatusOK, 29 | input: &HandlerInput{}, 30 | }, 31 | 32 | "invalid newline": { 33 | path: "/invalid%0A", 34 | expectCode: http.StatusBadRequest, 35 | }, 36 | 37 | "invalid carriage return": { 38 | path: "/invalid%0D", 39 | expectCode: http.StatusBadRequest, 40 | }, 41 | 42 | "invalid null": { 43 | path: "/invalid%00", 44 | expectCode: http.StatusBadRequest, 45 | }, 46 | 47 | "invalid alternate status": { 48 | path: "/invalid%0A", 49 | expectCode: http.StatusInternalServerError, 50 | input: &HandlerInput{ 51 | ErrStatus: http.StatusInternalServerError, 52 | }, 53 | }, 54 | } 55 | 56 | for name, tc := range cases { 57 | t.Run(name, func(t *testing.T) { 58 | // Create test HTTP server 59 | ts := httptest.NewServer(PrintablePathCheckHandler(getTestHandler, tc.input)) 60 | defer ts.Close() 61 | 62 | res, err := http.Get(ts.URL + tc.path) 63 | if err != nil { 64 | t.Fatal(err) 65 | } 66 | 67 | if tc.expectCode != res.StatusCode { 68 | t.Fatalf("expected %d, got :%d", tc.expectCode, res.StatusCode) 69 | } 70 | }) 71 | } 72 | } 73 | -------------------------------------------------------------------------------- /LICENSES/vendor/github.com/hashicorp/go-retryablehttp/.circleci/config.yml: -------------------------------------------------------------------------------- 1 | version: 2.1 2 | 3 | orbs: 4 | go: circleci/go@1.1.1 5 | 6 | references: 7 | environments: 8 | tmp: &TEST_RESULTS_PATH /tmp/test-results 9 | 10 | environment: &ENVIRONMENT 11 | TEST_RESULTS: "/tmp/test-results" 12 | 13 | jobs: 14 | run-tests: 15 | executor: 16 | name: go/default 17 | tag: << parameters.go-version >> 18 | parameters: 19 | go-version: 20 | type: string 21 | environment: 22 | TEST_RESULTS: *TEST_RESULTS_PATH 23 | steps: 24 | - checkout 25 | - run: mkdir -p $TEST_RESULTS/go-retryablyhttp 26 | - go/load-cache 27 | - go/mod-download 28 | - go/save-cache 29 | - run: 30 | name: Run go format 31 | command: | 32 | files=$(go fmt ./...) 33 | if [ -n "$files" ]; then 34 | echo "The following file(s) do not conform to go fmt:" 35 | echo "$files" 36 | exit 1 37 | fi 38 | - run: 39 | name: Run tests with gotestsum 40 | command: | 41 | PACKAGE_NAMES=$(go list ./...) 42 | gotestsum --format=short-verbose --junitfile $TEST_RESULTS/go-retryablyhttp/gotestsum-report.xml -- $PACKAGE_NAMES 43 | - store_test_results: 44 | path: *TEST_RESULTS_PATH 45 | - store_artifacts: 46 | path: *TEST_RESULTS_PATH 47 | 48 | workflows: 49 | go-retryablehttp: 50 | jobs: 51 | - run-tests: 52 | matrix: 53 | parameters: 54 | go-version: ["1.14.2"] 55 | name: test-go-<< matrix.go-version >> 56 | -------------------------------------------------------------------------------- /LICENSES/vendor/github.com/hashicorp/go-retryablehttp/.gitignore: -------------------------------------------------------------------------------- 1 | .idea/ 2 | *.iml 3 | *.test 4 | .vscode/ -------------------------------------------------------------------------------- /LICENSES/vendor/github.com/hashicorp/go-retryablehttp/Makefile: -------------------------------------------------------------------------------- 1 | default: test 2 | 3 | test: 4 | go vet ./... 5 | go test -race ./... 6 | 7 | updatedeps: 8 | go get -f -t -u ./... 9 | go get -f -u ./... 10 | 11 | .PHONY: default test updatedeps 12 | -------------------------------------------------------------------------------- /LICENSES/vendor/github.com/hashicorp/go-retryablehttp/go.mod: -------------------------------------------------------------------------------- 1 | module github.com/hashicorp/go-retryablehttp 2 | 3 | require ( 4 | github.com/hashicorp/go-cleanhttp v0.5.1 5 | github.com/hashicorp/go-hclog v0.9.2 6 | ) 7 | 8 | go 1.13 9 | -------------------------------------------------------------------------------- /LICENSES/vendor/github.com/hashicorp/go-retryablehttp/go.sum: -------------------------------------------------------------------------------- 1 | github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= 2 | github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= 3 | github.com/hashicorp/go-cleanhttp v0.5.1 h1:dH3aiDG9Jvb5r5+bYHsikaOUIpcM0xvgMXVoDkXMzJM= 4 | github.com/hashicorp/go-cleanhttp v0.5.1/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80= 5 | github.com/hashicorp/go-hclog v0.9.2 h1:CG6TE5H9/JXsFWJCfoIVpKFIkFe6ysEuHirp4DxCsHI= 6 | github.com/hashicorp/go-hclog v0.9.2/go.mod h1:5CU+agLiy3J7N7QjHK5d05KxGsuXiQLrjA0H7acj2lQ= 7 | github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= 8 | github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= 9 | github.com/stretchr/testify v1.2.2 h1:bSDNvY7ZPG5RlJ8otE/7V6gMiyenm9RtJ7IUVIAoJ1w= 10 | github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= 11 | -------------------------------------------------------------------------------- /LICENSES/vendor/github.com/hashicorp/go-retryablehttp/roundtripper.go: -------------------------------------------------------------------------------- 1 | package retryablehttp 2 | 3 | import ( 4 | "errors" 5 | "net/http" 6 | "net/url" 7 | "sync" 8 | ) 9 | 10 | // RoundTripper implements the http.RoundTripper interface, using a retrying 11 | // HTTP client to execute requests. 12 | // 13 | // It is important to note that retryablehttp doesn't always act exactly as a 14 | // RoundTripper should. This is highly dependent on the retryable client's 15 | // configuration. 16 | type RoundTripper struct { 17 | // The client to use during requests. If nil, the default retryablehttp 18 | // client and settings will be used. 19 | Client *Client 20 | 21 | // once ensures that the logic to initialize the default client runs at 22 | // most once, in a single thread. 23 | once sync.Once 24 | } 25 | 26 | // init initializes the underlying retryable client. 27 | func (rt *RoundTripper) init() { 28 | if rt.Client == nil { 29 | rt.Client = NewClient() 30 | } 31 | } 32 | 33 | // RoundTrip satisfies the http.RoundTripper interface. 34 | func (rt *RoundTripper) RoundTrip(req *http.Request) (*http.Response, error) { 35 | rt.once.Do(rt.init) 36 | 37 | // Convert the request to be retryable. 38 | retryableReq, err := FromRequest(req) 39 | if err != nil { 40 | return nil, err 41 | } 42 | 43 | // Execute the request. 44 | resp, err := rt.Client.Do(retryableReq) 45 | // If we got an error returned by standard library's `Do` method, unwrap it 46 | // otherwise we will wind up erroneously re-nesting the error. 47 | if _, ok := err.(*url.Error); ok { 48 | return resp, errors.Unwrap(err) 49 | } 50 | 51 | return resp, err 52 | } 53 | -------------------------------------------------------------------------------- /LICENSES/vendor/github.com/hashicorp/golang-lru/.gitignore: -------------------------------------------------------------------------------- 1 | # Compiled Object files, Static and Dynamic libs (Shared Objects) 2 | *.o 3 | *.a 4 | *.so 5 | 6 | # Folders 7 | _obj 8 | _test 9 | 10 | # Architecture specific extensions/prefixes 11 | *.[568vq] 12 | [568vq].out 13 | 14 | *.cgo1.go 15 | *.cgo2.c 16 | _cgo_defun.c 17 | _cgo_gotypes.go 18 | _cgo_export.* 19 | 20 | _testmain.go 21 | 22 | *.exe 23 | *.test 24 | -------------------------------------------------------------------------------- /LICENSES/vendor/github.com/hashicorp/golang-lru/README.md: -------------------------------------------------------------------------------- 1 | golang-lru 2 | ========== 3 | 4 | This provides the `lru` package which implements a fixed-size 5 | thread safe LRU cache. It is based on the cache in Groupcache. 6 | 7 | Documentation 8 | ============= 9 | 10 | Full docs are available on [Godoc](http://godoc.org/github.com/hashicorp/golang-lru) 11 | 12 | Example 13 | ======= 14 | 15 | Using the LRU is very simple: 16 | 17 | ```go 18 | l, _ := New(128) 19 | for i := 0; i < 256; i++ { 20 | l.Add(i, nil) 21 | } 22 | if l.Len() != 128 { 23 | panic(fmt.Sprintf("bad len: %v", l.Len())) 24 | } 25 | ``` 26 | -------------------------------------------------------------------------------- /LICENSES/vendor/github.com/hashicorp/golang-lru/doc.go: -------------------------------------------------------------------------------- 1 | // Package lru provides three different LRU caches of varying sophistication. 2 | // 3 | // Cache is a simple LRU cache. It is based on the 4 | // LRU implementation in groupcache: 5 | // https://github.com/golang/groupcache/tree/master/lru 6 | // 7 | // TwoQueueCache tracks frequently used and recently used entries separately. 8 | // This avoids a burst of accesses from taking out frequently used entries, 9 | // at the cost of about 2x computational overhead and some extra bookkeeping. 10 | // 11 | // ARCCache is an adaptive replacement cache. It tracks recent evictions as 12 | // well as recent usage in both the frequent and recent caches. Its 13 | // computational overhead is comparable to TwoQueueCache, but the memory 14 | // overhead is linear with the size of the cache. 15 | // 16 | // ARC has been patented by IBM, so do not use it if that is problematic for 17 | // your program. 18 | // 19 | // All caches in this package take locks while operating, and are therefore 20 | // thread-safe for consumers. 21 | package lru 22 | -------------------------------------------------------------------------------- /LICENSES/vendor/github.com/hashicorp/golang-lru/go.mod: -------------------------------------------------------------------------------- 1 | module github.com/hashicorp/golang-lru 2 | 3 | go 1.12 4 | -------------------------------------------------------------------------------- /LICENSES/vendor/github.com/hashicorp/golang-lru/simplelru/lru_interface.go: -------------------------------------------------------------------------------- 1 | package simplelru 2 | 3 | // LRUCache is the interface for simple LRU cache. 4 | type LRUCache interface { 5 | // Adds a value to the cache, returns true if an eviction occurred and 6 | // updates the "recently used"-ness of the key. 7 | Add(key, value interface{}) bool 8 | 9 | // Returns key's value from the cache and 10 | // updates the "recently used"-ness of the key. #value, isFound 11 | Get(key interface{}) (value interface{}, ok bool) 12 | 13 | // Checks if a key exists in cache without updating the recent-ness. 14 | Contains(key interface{}) (ok bool) 15 | 16 | // Returns key's value without updating the "recently used"-ness of the key. 17 | Peek(key interface{}) (value interface{}, ok bool) 18 | 19 | // Removes a key from the cache. 20 | Remove(key interface{}) bool 21 | 22 | // Removes the oldest entry from cache. 23 | RemoveOldest() (interface{}, interface{}, bool) 24 | 25 | // Returns the oldest entry from the cache. #key, value, isFound 26 | GetOldest() (interface{}, interface{}, bool) 27 | 28 | // Returns a slice of the keys in the cache, from oldest to newest. 29 | Keys() []interface{} 30 | 31 | // Returns the number of items in the cache. 32 | Len() int 33 | 34 | // Clears all cache entries. 35 | Purge() 36 | 37 | // Resizes cache, returning number evicted 38 | Resize(int) int 39 | } 40 | -------------------------------------------------------------------------------- /LICENSES/vendor/github.com/imdario/mergo/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2013 Dario Castañé. All rights reserved. 2 | Copyright (c) 2012 The Go Authors. All rights reserved. 3 | 4 | Redistribution and use in source and binary forms, with or without 5 | modification, are permitted provided that the following conditions are 6 | met: 7 | 8 | * Redistributions of source code must retain the above copyright 9 | notice, this list of conditions and the following disclaimer. 10 | * Redistributions in binary form must reproduce the above 11 | copyright notice, this list of conditions and the following disclaimer 12 | in the documentation and/or other materials provided with the 13 | distribution. 14 | * Neither the name of Google Inc. nor the names of its 15 | contributors may be used to endorse or promote products derived from 16 | this software without specific prior written permission. 17 | 18 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 19 | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 20 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 21 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 22 | OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 23 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 24 | LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 25 | DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 26 | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 27 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 28 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | -------------------------------------------------------------------------------- /LICENSES/vendor/github.com/jmespath/go-jmespath/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright 2015 James Saryerwinnie 2 | 3 | Licensed under the Apache License, Version 2.0 (the "License"); 4 | you may not use this file except in compliance with the License. 5 | You may obtain a copy of the License at 6 | 7 | http://www.apache.org/licenses/LICENSE-2.0 8 | 9 | Unless required by applicable law or agreed to in writing, software 10 | distributed under the License is distributed on an "AS IS" BASIS, 11 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | See the License for the specific language governing permissions and 13 | limitations under the License. 14 | -------------------------------------------------------------------------------- /LICENSES/vendor/github.com/josharian/intern/license.md: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2019 Josh Bleecher Snyder 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /LICENSES/vendor/github.com/jroimartin/gocui/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2014 The gocui Authors. All rights reserved. 2 | 3 | Redistribution and use in source and binary forms, with or without 4 | modification, are permitted provided that the following conditions are met: 5 | * Redistributions of source code must retain the above copyright 6 | notice, this list of conditions and the following disclaimer. 7 | * Redistributions in binary form must reproduce the above copyright 8 | notice, this list of conditions and the following disclaimer in the 9 | documentation and/or other materials provided with the distribution. 10 | * Neither the name of the gocui Authors nor the names of its contributors 11 | may be used to endorse or promote products derived from this software 12 | without specific prior written permission. 13 | 14 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 15 | ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 16 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 17 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR 18 | ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 19 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 20 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 21 | ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 22 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 23 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 24 | -------------------------------------------------------------------------------- /LICENSES/vendor/github.com/json-iterator/go/LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2016 json-iterator 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /LICENSES/vendor/github.com/kelseyhightower/envconfig/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2013 Kelsey Hightower 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy of 4 | this software and associated documentation files (the "Software"), to deal in 5 | the Software without restriction, including without limitation the rights to 6 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies 7 | of the Software, and to permit persons to whom the Software is furnished to do 8 | so, subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in all 11 | copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 19 | SOFTWARE. 20 | -------------------------------------------------------------------------------- /LICENSES/vendor/github.com/mailru/easyjson/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2016 Mail.Ru Group 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 4 | 5 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 6 | 7 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 8 | -------------------------------------------------------------------------------- /LICENSES/vendor/github.com/mattn/go-runewidth/LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2016 Yasuhiro Matsumoto 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /LICENSES/vendor/github.com/matttproud/golang_protobuf_extensions/pbutil/NOTICE: -------------------------------------------------------------------------------- 1 | Copyright 2012 Matt T. Proud (matt.proud@gmail.com) 2 | -------------------------------------------------------------------------------- /LICENSES/vendor/github.com/mitchellh/go-homedir/LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2013 Mitchell Hashimoto 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in 13 | all copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | THE SOFTWARE. 22 | -------------------------------------------------------------------------------- /LICENSES/vendor/github.com/mitchellh/mapstructure/LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2013 Mitchell Hashimoto 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in 13 | all copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | THE SOFTWARE. 22 | -------------------------------------------------------------------------------- /LICENSES/vendor/github.com/munnerz/goautoneg/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2011, Open Knowledge Foundation Ltd. 2 | All rights reserved. 3 | 4 | Redistribution and use in source and binary forms, with or without 5 | modification, are permitted provided that the following conditions are 6 | met: 7 | 8 | Redistributions of source code must retain the above copyright 9 | notice, this list of conditions and the following disclaimer. 10 | 11 | Redistributions in binary form must reproduce the above copyright 12 | notice, this list of conditions and the following disclaimer in 13 | the documentation and/or other materials provided with the 14 | distribution. 15 | 16 | Neither the name of the Open Knowledge Foundation Ltd. nor the 17 | names of its contributors may be used to endorse or promote 18 | products derived from this software without specific prior written 19 | permission. 20 | 21 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 22 | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 23 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 24 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 25 | HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 26 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 27 | LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 28 | DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 29 | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 30 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 31 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 32 | -------------------------------------------------------------------------------- /LICENSES/vendor/github.com/nsf/termbox-go/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (C) 2012 termbox-go authors 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy 4 | of this software and associated documentation files (the "Software"), to deal 5 | in the Software without restriction, including without limitation the rights 6 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | copies of the Software, and to permit persons to whom the Software is 8 | furnished to do so, subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in 11 | all copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 19 | THE SOFTWARE. 20 | -------------------------------------------------------------------------------- /LICENSES/vendor/github.com/pkg/errors/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2015, Dave Cheney 2 | All rights reserved. 3 | 4 | Redistribution and use in source and binary forms, with or without 5 | modification, are permitted provided that the following conditions are met: 6 | 7 | * Redistributions of source code must retain the above copyright notice, this 8 | list of conditions and the following disclaimer. 9 | 10 | * Redistributions in binary form must reproduce the above copyright notice, 11 | this list of conditions and the following disclaimer in the documentation 12 | and/or other materials provided with the distribution. 13 | 14 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 15 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 16 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 17 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 18 | FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 19 | DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 20 | SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 21 | CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 22 | OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 23 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 24 | -------------------------------------------------------------------------------- /LICENSES/vendor/github.com/prometheus/client_golang/prometheus/NOTICE: -------------------------------------------------------------------------------- 1 | Prometheus instrumentation library for Go applications 2 | Copyright 2012-2015 The Prometheus Authors 3 | 4 | This product includes software developed at 5 | SoundCloud Ltd. (http://soundcloud.com/). 6 | 7 | 8 | The following components are included in this product: 9 | 10 | perks - a fork of https://github.com/bmizerany/perks 11 | https://github.com/beorn7/perks 12 | Copyright 2013-2015 Blake Mizerany, Björn Rabenstein 13 | See https://github.com/beorn7/perks/blob/master/README.md for license details. 14 | 15 | Go support for Protocol Buffers - Google's data interchange format 16 | http://github.com/golang/protobuf/ 17 | Copyright 2010 The Go Authors 18 | See source code for license details. 19 | 20 | Support for streaming Protocol Buffer messages for the Go language (golang). 21 | https://github.com/matttproud/golang_protobuf_extensions 22 | Copyright 2013 Matt T. Proud 23 | Licensed under the Apache License, Version 2.0 24 | -------------------------------------------------------------------------------- /LICENSES/vendor/github.com/prometheus/client_model/go/NOTICE: -------------------------------------------------------------------------------- 1 | Data model artifacts for Prometheus. 2 | Copyright 2012-2015 The Prometheus Authors 3 | 4 | This product includes software developed at 5 | SoundCloud Ltd. (http://soundcloud.com/). 6 | -------------------------------------------------------------------------------- /LICENSES/vendor/github.com/prometheus/common/NOTICE: -------------------------------------------------------------------------------- 1 | Common libraries shared by Prometheus Go components. 2 | Copyright 2015 The Prometheus Authors 3 | 4 | This product includes software developed at 5 | SoundCloud Ltd. (http://soundcloud.com/). 6 | -------------------------------------------------------------------------------- /LICENSES/vendor/github.com/prometheus/procfs/NOTICE: -------------------------------------------------------------------------------- 1 | procfs provides functions to retrieve system, kernel and process 2 | metrics from the pseudo-filesystem proc. 3 | 4 | Copyright 2014-2015 The Prometheus Authors 5 | 6 | This product includes software developed at 7 | SoundCloud Ltd. (http://soundcloud.com/). 8 | -------------------------------------------------------------------------------- /LICENSES/vendor/github.com/prometheus/statsd_exporter/pkg/mapper/NOTICE: -------------------------------------------------------------------------------- 1 | StatsD-to-Prometheus exporter 2 | Copyright 2013-2015 The Prometheus Authors 3 | 4 | This product includes software developed at 5 | SoundCloud Ltd. (http://soundcloud.com/). 6 | -------------------------------------------------------------------------------- /LICENSES/vendor/github.com/rickb777/date/period/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2015 The Go Authors & Rick Beton. All rights reserved. 2 | 3 | Redistribution and use in source and binary forms, with or without 4 | modification, are permitted provided that the following conditions are 5 | met: 6 | 7 | * Redistributions of source code must retain the above copyright 8 | notice, this list of conditions and the following disclaimer. 9 | * Redistributions in binary form must reproduce the above 10 | copyright notice, this list of conditions and the following disclaimer 11 | in the documentation and/or other materials provided with the 12 | distribution. 13 | * Neither the name of Google Inc. nor the names of its 14 | contributors may be used to endorse or promote products derived from 15 | this software without specific prior written permission. 16 | 17 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 18 | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 19 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 20 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 21 | OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 22 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 23 | LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 24 | DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 25 | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 26 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 27 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 | -------------------------------------------------------------------------------- /LICENSES/vendor/github.com/rickb777/plural/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2016, Rick Beton 2 | All rights reserved. 3 | 4 | Redistribution and use in source and binary forms, with or without 5 | modification, are permitted provided that the following conditions are met: 6 | 7 | * Redistributions of source code must retain the above copyright notice, this 8 | list of conditions and the following disclaimer. 9 | 10 | * Redistributions in binary form must reproduce the above copyright notice, 11 | this list of conditions and the following disclaimer in the documentation 12 | and/or other materials provided with the distribution. 13 | 14 | * Neither the name of plural nor the names of its 15 | contributors may be used to endorse or promote products derived from 16 | this software without specific prior written permission. 17 | 18 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 19 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 20 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 21 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 22 | FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 23 | DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 24 | SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 25 | CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 26 | OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 27 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 | -------------------------------------------------------------------------------- /LICENSES/vendor/github.com/russross/blackfriday/v2/LICENSE.txt: -------------------------------------------------------------------------------- 1 | Blackfriday is distributed under the Simplified BSD License: 2 | 3 | > Copyright © 2011 Russ Ross 4 | > All rights reserved. 5 | > 6 | > Redistribution and use in source and binary forms, with or without 7 | > modification, are permitted provided that the following conditions 8 | > are met: 9 | > 10 | > 1. Redistributions of source code must retain the above copyright 11 | > notice, this list of conditions and the following disclaimer. 12 | > 13 | > 2. Redistributions in binary form must reproduce the above 14 | > copyright notice, this list of conditions and the following 15 | > disclaimer in the documentation and/or other materials provided with 16 | > the distribution. 17 | > 18 | > THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 19 | > "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 20 | > LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS 21 | > FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE 22 | > COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 23 | > INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, 24 | > BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 25 | > LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 26 | > CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 27 | > LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN 28 | > ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 29 | > POSSIBILITY OF SUCH DAMAGE. 30 | -------------------------------------------------------------------------------- /LICENSES/vendor/github.com/spf13/pflag/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2012 Alex Ogier. All rights reserved. 2 | Copyright (c) 2012 The Go Authors. All rights reserved. 3 | 4 | Redistribution and use in source and binary forms, with or without 5 | modification, are permitted provided that the following conditions are 6 | met: 7 | 8 | * Redistributions of source code must retain the above copyright 9 | notice, this list of conditions and the following disclaimer. 10 | * Redistributions in binary form must reproduce the above 11 | copyright notice, this list of conditions and the following disclaimer 12 | in the documentation and/or other materials provided with the 13 | distribution. 14 | * Neither the name of Google Inc. nor the names of its 15 | contributors may be used to endorse or promote products derived from 16 | this software without specific prior written permission. 17 | 18 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 19 | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 20 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 21 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 22 | OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 23 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 24 | LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 25 | DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 26 | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 27 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 28 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | -------------------------------------------------------------------------------- /LICENSES/vendor/github.com/stoewer/go-strcase/LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2017, Adrian Stoewer 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /LICENSES/vendor/github.com/tidwall/gjson/LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2016 Josh Baker 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy of 6 | this software and associated documentation files (the "Software"), to deal in 7 | the Software without restriction, including without limitation the rights to 8 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 9 | the Software, and to permit persons to whom the Software is furnished to do so, 10 | subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 17 | FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 18 | COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 19 | IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 20 | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 21 | -------------------------------------------------------------------------------- /LICENSES/vendor/github.com/tidwall/match/LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2016 Josh Baker 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy of 6 | this software and associated documentation files (the "Software"), to deal in 7 | the Software without restriction, including without limitation the rights to 8 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 9 | the Software, and to permit persons to whom the Software is furnished to do so, 10 | subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 17 | FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 18 | COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 19 | IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 20 | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 21 | -------------------------------------------------------------------------------- /LICENSES/vendor/github.com/tidwall/pretty/LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2017 Josh Baker 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy of 6 | this software and associated documentation files (the "Software"), to deal in 7 | the Software without restriction, including without limitation the rights to 8 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 9 | the Software, and to permit persons to whom the Software is furnished to do so, 10 | subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 17 | FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 18 | COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 19 | IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 20 | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 21 | -------------------------------------------------------------------------------- /LICENSES/vendor/go.uber.org/atomic/LICENSE.txt: -------------------------------------------------------------------------------- 1 | Copyright (c) 2016 Uber Technologies, Inc. 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy 4 | of this software and associated documentation files (the "Software"), to deal 5 | in the Software without restriction, including without limitation the rights 6 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | copies of the Software, and to permit persons to whom the Software is 8 | furnished to do so, subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in 11 | all copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 19 | THE SOFTWARE. 20 | -------------------------------------------------------------------------------- /LICENSES/vendor/go.uber.org/multierr/LICENSE.txt: -------------------------------------------------------------------------------- 1 | Copyright (c) 2017-2021 Uber Technologies, Inc. 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy 4 | of this software and associated documentation files (the "Software"), to deal 5 | in the Software without restriction, including without limitation the rights 6 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | copies of the Software, and to permit persons to whom the Software is 8 | furnished to do so, subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in 11 | all copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 19 | THE SOFTWARE. 20 | -------------------------------------------------------------------------------- /LICENSES/vendor/go.uber.org/zap/LICENSE.txt: -------------------------------------------------------------------------------- 1 | Copyright (c) 2016-2017 Uber Technologies, Inc. 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy 4 | of this software and associated documentation files (the "Software"), to deal 5 | in the Software without restriction, including without limitation the rights 6 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | copies of the Software, and to permit persons to whom the Software is 8 | furnished to do so, subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in 11 | all copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 19 | THE SOFTWARE. 20 | -------------------------------------------------------------------------------- /LICENSES/vendor/golang.org/x/crypto/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2009 The Go Authors. All rights reserved. 2 | 3 | Redistribution and use in source and binary forms, with or without 4 | modification, are permitted provided that the following conditions are 5 | met: 6 | 7 | * Redistributions of source code must retain the above copyright 8 | notice, this list of conditions and the following disclaimer. 9 | * Redistributions in binary form must reproduce the above 10 | copyright notice, this list of conditions and the following disclaimer 11 | in the documentation and/or other materials provided with the 12 | distribution. 13 | * Neither the name of Google Inc. nor the names of its 14 | contributors may be used to endorse or promote products derived from 15 | this software without specific prior written permission. 16 | 17 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 18 | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 19 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 20 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 21 | OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 22 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 23 | LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 24 | DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 25 | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 26 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 27 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 | -------------------------------------------------------------------------------- /LICENSES/vendor/golang.org/x/net/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2009 The Go Authors. All rights reserved. 2 | 3 | Redistribution and use in source and binary forms, with or without 4 | modification, are permitted provided that the following conditions are 5 | met: 6 | 7 | * Redistributions of source code must retain the above copyright 8 | notice, this list of conditions and the following disclaimer. 9 | * Redistributions in binary form must reproduce the above 10 | copyright notice, this list of conditions and the following disclaimer 11 | in the documentation and/or other materials provided with the 12 | distribution. 13 | * Neither the name of Google Inc. nor the names of its 14 | contributors may be used to endorse or promote products derived from 15 | this software without specific prior written permission. 16 | 17 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 18 | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 19 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 20 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 21 | OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 22 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 23 | LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 24 | DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 25 | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 26 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 27 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 | -------------------------------------------------------------------------------- /LICENSES/vendor/golang.org/x/oauth2/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2009 The Go Authors. All rights reserved. 2 | 3 | Redistribution and use in source and binary forms, with or without 4 | modification, are permitted provided that the following conditions are 5 | met: 6 | 7 | * Redistributions of source code must retain the above copyright 8 | notice, this list of conditions and the following disclaimer. 9 | * Redistributions in binary form must reproduce the above 10 | copyright notice, this list of conditions and the following disclaimer 11 | in the documentation and/or other materials provided with the 12 | distribution. 13 | * Neither the name of Google Inc. nor the names of its 14 | contributors may be used to endorse or promote products derived from 15 | this software without specific prior written permission. 16 | 17 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 18 | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 19 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 20 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 21 | OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 22 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 23 | LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 24 | DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 25 | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 26 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 27 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 | -------------------------------------------------------------------------------- /LICENSES/vendor/golang.org/x/sync/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2009 The Go Authors. All rights reserved. 2 | 3 | Redistribution and use in source and binary forms, with or without 4 | modification, are permitted provided that the following conditions are 5 | met: 6 | 7 | * Redistributions of source code must retain the above copyright 8 | notice, this list of conditions and the following disclaimer. 9 | * Redistributions in binary form must reproduce the above 10 | copyright notice, this list of conditions and the following disclaimer 11 | in the documentation and/or other materials provided with the 12 | distribution. 13 | * Neither the name of Google Inc. nor the names of its 14 | contributors may be used to endorse or promote products derived from 15 | this software without specific prior written permission. 16 | 17 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 18 | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 19 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 20 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 21 | OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 22 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 23 | LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 24 | DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 25 | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 26 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 27 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 | -------------------------------------------------------------------------------- /LICENSES/vendor/golang.org/x/sys/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2009 The Go Authors. All rights reserved. 2 | 3 | Redistribution and use in source and binary forms, with or without 4 | modification, are permitted provided that the following conditions are 5 | met: 6 | 7 | * Redistributions of source code must retain the above copyright 8 | notice, this list of conditions and the following disclaimer. 9 | * Redistributions in binary form must reproduce the above 10 | copyright notice, this list of conditions and the following disclaimer 11 | in the documentation and/or other materials provided with the 12 | distribution. 13 | * Neither the name of Google Inc. nor the names of its 14 | contributors may be used to endorse or promote products derived from 15 | this software without specific prior written permission. 16 | 17 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 18 | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 19 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 20 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 21 | OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 22 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 23 | LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 24 | DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 25 | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 26 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 27 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 | -------------------------------------------------------------------------------- /LICENSES/vendor/golang.org/x/term/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2009 The Go Authors. All rights reserved. 2 | 3 | Redistribution and use in source and binary forms, with or without 4 | modification, are permitted provided that the following conditions are 5 | met: 6 | 7 | * Redistributions of source code must retain the above copyright 8 | notice, this list of conditions and the following disclaimer. 9 | * Redistributions in binary form must reproduce the above 10 | copyright notice, this list of conditions and the following disclaimer 11 | in the documentation and/or other materials provided with the 12 | distribution. 13 | * Neither the name of Google Inc. nor the names of its 14 | contributors may be used to endorse or promote products derived from 15 | this software without specific prior written permission. 16 | 17 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 18 | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 19 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 20 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 21 | OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 22 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 23 | LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 24 | DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 25 | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 26 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 27 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 | -------------------------------------------------------------------------------- /LICENSES/vendor/golang.org/x/text/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2009 The Go Authors. All rights reserved. 2 | 3 | Redistribution and use in source and binary forms, with or without 4 | modification, are permitted provided that the following conditions are 5 | met: 6 | 7 | * Redistributions of source code must retain the above copyright 8 | notice, this list of conditions and the following disclaimer. 9 | * Redistributions in binary form must reproduce the above 10 | copyright notice, this list of conditions and the following disclaimer 11 | in the documentation and/or other materials provided with the 12 | distribution. 13 | * Neither the name of Google Inc. nor the names of its 14 | contributors may be used to endorse or promote products derived from 15 | this software without specific prior written permission. 16 | 17 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 18 | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 19 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 20 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 21 | OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 22 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 23 | LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 24 | DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 25 | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 26 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 27 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 | -------------------------------------------------------------------------------- /LICENSES/vendor/golang.org/x/time/rate/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2009 The Go Authors. All rights reserved. 2 | 3 | Redistribution and use in source and binary forms, with or without 4 | modification, are permitted provided that the following conditions are 5 | met: 6 | 7 | * Redistributions of source code must retain the above copyright 8 | notice, this list of conditions and the following disclaimer. 9 | * Redistributions in binary form must reproduce the above 10 | copyright notice, this list of conditions and the following disclaimer 11 | in the documentation and/or other materials provided with the 12 | distribution. 13 | * Neither the name of Google Inc. nor the names of its 14 | contributors may be used to endorse or promote products derived from 15 | this software without specific prior written permission. 16 | 17 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 18 | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 19 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 20 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 21 | OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 22 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 23 | LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 24 | DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 25 | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 26 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 27 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 | -------------------------------------------------------------------------------- /LICENSES/vendor/golang.org/x/xerrors/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2019 The Go Authors. All rights reserved. 2 | 3 | Redistribution and use in source and binary forms, with or without 4 | modification, are permitted provided that the following conditions are 5 | met: 6 | 7 | * Redistributions of source code must retain the above copyright 8 | notice, this list of conditions and the following disclaimer. 9 | * Redistributions in binary form must reproduce the above 10 | copyright notice, this list of conditions and the following disclaimer 11 | in the documentation and/or other materials provided with the 12 | distribution. 13 | * Neither the name of Google Inc. nor the names of its 14 | contributors may be used to endorse or promote products derived from 15 | this software without specific prior written permission. 16 | 17 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 18 | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 19 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 20 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 21 | OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 22 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 23 | LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 24 | DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 25 | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 26 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 27 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 | -------------------------------------------------------------------------------- /LICENSES/vendor/google.golang.org/api/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2011 Google Inc. All rights reserved. 2 | 3 | Redistribution and use in source and binary forms, with or without 4 | modification, are permitted provided that the following conditions are 5 | met: 6 | 7 | * Redistributions of source code must retain the above copyright 8 | notice, this list of conditions and the following disclaimer. 9 | * Redistributions in binary form must reproduce the above 10 | copyright notice, this list of conditions and the following disclaimer 11 | in the documentation and/or other materials provided with the 12 | distribution. 13 | * Neither the name of Google Inc. nor the names of its 14 | contributors may be used to endorse or promote products derived from 15 | this software without specific prior written permission. 16 | 17 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 18 | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 19 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 20 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 21 | OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 22 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 23 | LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 24 | DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 25 | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 26 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 27 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 | -------------------------------------------------------------------------------- /LICENSES/vendor/google.golang.org/api/internal/third_party/uritemplates/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2013 Joshua Tacoma. All rights reserved. 2 | 3 | Redistribution and use in source and binary forms, with or without 4 | modification, are permitted provided that the following conditions are 5 | met: 6 | 7 | * Redistributions of source code must retain the above copyright 8 | notice, this list of conditions and the following disclaimer. 9 | * Redistributions in binary form must reproduce the above 10 | copyright notice, this list of conditions and the following disclaimer 11 | in the documentation and/or other materials provided with the 12 | distribution. 13 | * Neither the name of Google Inc. nor the names of its 14 | contributors may be used to endorse or promote products derived from 15 | this software without specific prior written permission. 16 | 17 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 18 | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 19 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 20 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 21 | OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 22 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 23 | LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 24 | DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 25 | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 26 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 27 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 | -------------------------------------------------------------------------------- /LICENSES/vendor/google.golang.org/grpc/NOTICE.txt: -------------------------------------------------------------------------------- 1 | Copyright 2014 gRPC authors. 2 | 3 | Licensed under the Apache License, Version 2.0 (the "License"); 4 | you may not use this file except in compliance with the License. 5 | You may obtain a copy of the License at 6 | 7 | http://www.apache.org/licenses/LICENSE-2.0 8 | 9 | Unless required by applicable law or agreed to in writing, software 10 | distributed under the License is distributed on an "AS IS" BASIS, 11 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | See the License for the specific language governing permissions and 13 | limitations under the License. 14 | -------------------------------------------------------------------------------- /LICENSES/vendor/google.golang.org/protobuf/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2018 The Go Authors. All rights reserved. 2 | 3 | Redistribution and use in source and binary forms, with or without 4 | modification, are permitted provided that the following conditions are 5 | met: 6 | 7 | * Redistributions of source code must retain the above copyright 8 | notice, this list of conditions and the following disclaimer. 9 | * Redistributions in binary form must reproduce the above 10 | copyright notice, this list of conditions and the following disclaimer 11 | in the documentation and/or other materials provided with the 12 | distribution. 13 | * Neither the name of Google Inc. nor the names of its 14 | contributors may be used to endorse or promote products derived from 15 | this software without specific prior written permission. 16 | 17 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 18 | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 19 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 20 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 21 | OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 22 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 23 | LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 24 | DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 25 | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 26 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 27 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 | -------------------------------------------------------------------------------- /LICENSES/vendor/gopkg.in/inf.v0/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2012 Péter Surányi. Portions Copyright (c) 2009 The Go 2 | Authors. All rights reserved. 3 | 4 | Redistribution and use in source and binary forms, with or without 5 | modification, are permitted provided that the following conditions are 6 | met: 7 | 8 | * Redistributions of source code must retain the above copyright 9 | notice, this list of conditions and the following disclaimer. 10 | * Redistributions in binary form must reproduce the above 11 | copyright notice, this list of conditions and the following disclaimer 12 | in the documentation and/or other materials provided with the 13 | distribution. 14 | * Neither the name of Google Inc. nor the names of its 15 | contributors may be used to endorse or promote products derived from 16 | this software without specific prior written permission. 17 | 18 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 19 | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 20 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 21 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 22 | OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 23 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 24 | LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 25 | DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 26 | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 27 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 28 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | -------------------------------------------------------------------------------- /LICENSES/vendor/gopkg.in/yaml.v2/NOTICE: -------------------------------------------------------------------------------- 1 | Copyright 2011-2016 Canonical Ltd. 2 | 3 | Licensed under the Apache License, Version 2.0 (the "License"); 4 | you may not use this file except in compliance with the License. 5 | You may obtain a copy of the License at 6 | 7 | http://www.apache.org/licenses/LICENSE-2.0 8 | 9 | Unless required by applicable law or agreed to in writing, software 10 | distributed under the License is distributed on an "AS IS" BASIS, 11 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | See the License for the specific language governing permissions and 13 | limitations under the License. 14 | -------------------------------------------------------------------------------- /LICENSES/vendor/gopkg.in/yaml.v3/LICENSE: -------------------------------------------------------------------------------- 1 | 2 | This project is covered by two different licenses: MIT and Apache. 3 | 4 | #### MIT License #### 5 | 6 | The following files were ported to Go from C files of libyaml, and thus 7 | are still covered by their original MIT license, with the additional 8 | copyright staring in 2011 when the project was ported over: 9 | 10 | apic.go emitterc.go parserc.go readerc.go scannerc.go 11 | writerc.go yamlh.go yamlprivateh.go 12 | 13 | Copyright (c) 2006-2010 Kirill Simonov 14 | Copyright (c) 2006-2011 Kirill Simonov 15 | 16 | Permission is hereby granted, free of charge, to any person obtaining a copy of 17 | this software and associated documentation files (the "Software"), to deal in 18 | the Software without restriction, including without limitation the rights to 19 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies 20 | of the Software, and to permit persons to whom the Software is furnished to do 21 | so, subject to the following conditions: 22 | 23 | The above copyright notice and this permission notice shall be included in all 24 | copies or substantial portions of the Software. 25 | 26 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 27 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 28 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 29 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 30 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 31 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 32 | SOFTWARE. 33 | 34 | ### Apache License ### 35 | 36 | All the remaining project files are covered by the Apache license: 37 | 38 | Copyright (c) 2011-2019 Canonical Ltd 39 | 40 | Licensed under the Apache License, Version 2.0 (the "License"); 41 | you may not use this file except in compliance with the License. 42 | You may obtain a copy of the License at 43 | 44 | http://www.apache.org/licenses/LICENSE-2.0 45 | 46 | Unless required by applicable law or agreed to in writing, software 47 | distributed under the License is distributed on an "AS IS" BASIS, 48 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 49 | See the License for the specific language governing permissions and 50 | limitations under the License. 51 | -------------------------------------------------------------------------------- /LICENSES/vendor/gopkg.in/yaml.v3/NOTICE: -------------------------------------------------------------------------------- 1 | Copyright 2011-2016 Canonical Ltd. 2 | 3 | Licensed under the Apache License, Version 2.0 (the "License"); 4 | you may not use this file except in compliance with the License. 5 | You may obtain a copy of the License at 6 | 7 | http://www.apache.org/licenses/LICENSE-2.0 8 | 9 | Unless required by applicable law or agreed to in writing, software 10 | distributed under the License is distributed on an "AS IS" BASIS, 11 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | See the License for the specific language governing permissions and 13 | limitations under the License. 14 | -------------------------------------------------------------------------------- /LICENSES/vendor/k8s.io/apimachinery/third_party/forked/golang/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2009 The Go Authors. All rights reserved. 2 | 3 | Redistribution and use in source and binary forms, with or without 4 | modification, are permitted provided that the following conditions are 5 | met: 6 | 7 | * Redistributions of source code must retain the above copyright 8 | notice, this list of conditions and the following disclaimer. 9 | * Redistributions in binary form must reproduce the above 10 | copyright notice, this list of conditions and the following disclaimer 11 | in the documentation and/or other materials provided with the 12 | distribution. 13 | * Neither the name of Google Inc. nor the names of its 14 | contributors may be used to endorse or promote products derived from 15 | this software without specific prior written permission. 16 | 17 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 18 | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 19 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 20 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 21 | OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 22 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 23 | LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 24 | DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 25 | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 26 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 27 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 | -------------------------------------------------------------------------------- /LICENSES/vendor/k8s.io/kube-openapi/pkg/internal/third_party/go-json-experiment/json/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2020 The Go Authors. All rights reserved. 2 | 3 | Redistribution and use in source and binary forms, with or without 4 | modification, are permitted provided that the following conditions are 5 | met: 6 | 7 | * Redistributions of source code must retain the above copyright 8 | notice, this list of conditions and the following disclaimer. 9 | * Redistributions in binary form must reproduce the above 10 | copyright notice, this list of conditions and the following disclaimer 11 | in the documentation and/or other materials provided with the 12 | distribution. 13 | * Neither the name of Google Inc. nor the names of its 14 | contributors may be used to endorse or promote products derived from 15 | this software without specific prior written permission. 16 | 17 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 18 | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 19 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 20 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 21 | OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 22 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 23 | LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 24 | DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 25 | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 26 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 27 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 | -------------------------------------------------------------------------------- /LICENSES/vendor/k8s.io/utils/internal/third_party/forked/golang/net/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2012 The Go Authors. All rights reserved. 2 | 3 | Redistribution and use in source and binary forms, with or without 4 | modification, are permitted provided that the following conditions are 5 | met: 6 | 7 | * Redistributions of source code must retain the above copyright 8 | notice, this list of conditions and the following disclaimer. 9 | * Redistributions in binary form must reproduce the above 10 | copyright notice, this list of conditions and the following disclaimer 11 | in the documentation and/or other materials provided with the 12 | distribution. 13 | * Neither the name of Google Inc. nor the names of its 14 | contributors may be used to endorse or promote products derived from 15 | this software without specific prior written permission. 16 | 17 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 18 | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 19 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 20 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 21 | OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 22 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 23 | LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 24 | DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 25 | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 26 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 27 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 | -------------------------------------------------------------------------------- /cmd/config/cmd.go: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2022 TriggerMesh Inc. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | 17 | package config 18 | 19 | import ( 20 | "fmt" 21 | 22 | "github.com/spf13/cobra" 23 | 24 | cliconfig "github.com/triggermesh/tmctl/pkg/config" 25 | ) 26 | 27 | func NewCmd() *cobra.Command { 28 | configCmd := &cobra.Command{ 29 | Use: "config [set|get]", 30 | Short: "Read and write config values", 31 | Run: func(cmd *cobra.Command, args []string) { 32 | cmd.HelpFunc()(cmd, args) 33 | }, 34 | } 35 | configCmd.AddCommand(getCmd()) 36 | configCmd.AddCommand(setCmd()) 37 | return configCmd 38 | } 39 | 40 | func getCmd() *cobra.Command { 41 | return &cobra.Command{ 42 | Use: "get [key]", 43 | Short: "Read config value", 44 | Args: cobra.RangeArgs(0, 1), 45 | RunE: func(cmd *cobra.Command, args []string) error { 46 | key := "" 47 | if len(args) == 1 { 48 | key = args[0] 49 | } 50 | value, err := cliconfig.Get(key) 51 | if err != nil { 52 | return err 53 | } 54 | fmt.Println(value) 55 | return nil 56 | }, 57 | } 58 | } 59 | 60 | func setCmd() *cobra.Command { 61 | return &cobra.Command{ 62 | Use: "set ", 63 | Short: "Write config value", 64 | Args: cobra.ExactArgs(2), 65 | RunE: func(cmd *cobra.Command, args []string) error { 66 | return cliconfig.Set(args[0], args[1]) 67 | }, 68 | } 69 | } 70 | -------------------------------------------------------------------------------- /cmd/delete/broker.go: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2022 TriggerMesh Inc. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | 17 | package delete 18 | 19 | import ( 20 | "fmt" 21 | "os" 22 | "path/filepath" 23 | 24 | "github.com/spf13/cobra" 25 | 26 | "github.com/triggermesh/tmctl/pkg/completion" 27 | "github.com/triggermesh/tmctl/pkg/manifest" 28 | "github.com/triggermesh/tmctl/pkg/triggermesh" 29 | ) 30 | 31 | func (o *CliOptions) deleteBrokerCmd() *cobra.Command { 32 | return &cobra.Command{ 33 | Use: "broker ", 34 | Short: "Delete TriggerMesh Broker", 35 | Example: "tmctl delete broker foo", 36 | Args: cobra.ExactArgs(1), 37 | ValidArgsFunction: func(cmd *cobra.Command, args []string, _ string) ([]string, cobra.ShellCompDirective) { 38 | return completion.ListObjectsByKind("RedisBroker", o.Manifest), cobra.ShellCompDirectiveNoFileComp 39 | }, RunE: func(cmd *cobra.Command, args []string) error { 40 | return o.deleteBroker(args[0]) 41 | }, 42 | } 43 | } 44 | 45 | func (o *CliOptions) deleteBroker(broker string) error { 46 | oo := *o 47 | oo.Config.Context = broker 48 | oo.Manifest = manifest.New(filepath.Join(oo.Config.ConfigHome, broker, triggermesh.ManifestFile)) 49 | cobra.CheckErr(oo.Manifest.Read()) 50 | 51 | if err := oo.deleteBrokerComponents([]string{}, true); err != nil { 52 | return fmt.Errorf("deleting component: %w", err) 53 | } 54 | if err := os.RemoveAll(filepath.Join(oo.Config.ConfigHome, broker)); err != nil { 55 | return fmt.Errorf("delete broker %q: %v", broker, err) 56 | } 57 | if broker == o.Config.Context { 58 | return o.switchContext() 59 | } 60 | return nil 61 | } 62 | -------------------------------------------------------------------------------- /cmd/delete/source.go: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2022 TriggerMesh Inc. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | 17 | package delete 18 | 19 | import ( 20 | "context" 21 | "fmt" 22 | 23 | "github.com/spf13/cobra" 24 | "github.com/triggermesh/tmctl/pkg/completion" 25 | "github.com/triggermesh/tmctl/pkg/docker" 26 | ) 27 | 28 | func (o *CliOptions) deleteSourceCmd() *cobra.Command { 29 | return &cobra.Command{ 30 | Use: "source ", 31 | Short: "Delete TriggerMesh Source", 32 | Example: "tmctl delete source foo", 33 | Args: cobra.MinimumNArgs(1), 34 | ValidArgsFunction: func(cmd *cobra.Command, args []string, _ string) ([]string, cobra.ShellCompDirective) { 35 | return append(completion.ListObjectsByAPI("sources.triggermesh.io/v1alpha1", o.Manifest), 36 | completion.ListObjectsByAPI("serving.knative.dev/v1", o.Manifest)...), 37 | cobra.ShellCompDirectiveNoFileComp 38 | }, 39 | RunE: func(cmd *cobra.Command, args []string) error { 40 | return o.deleteSources(args) 41 | }, 42 | } 43 | } 44 | 45 | func (o *CliOptions) deleteSources(names []string) error { 46 | ctx := context.Background() 47 | client, err := docker.NewClient() 48 | if err != nil { 49 | return fmt.Errorf("docker client: %w", err) 50 | } 51 | for _, object := range o.Manifest.Objects { 52 | if object.APIVersion != "sources.triggermesh.io/v1alpha1" && 53 | object.APIVersion != "serving.knative.dev/v1" { 54 | continue 55 | } 56 | for _, name := range names { 57 | if name == object.Metadata.Name { 58 | o.deleteEverything(ctx, object, client) 59 | break 60 | } 61 | } 62 | } 63 | return nil 64 | } 65 | -------------------------------------------------------------------------------- /cmd/delete/target.go: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2022 TriggerMesh Inc. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | 17 | package delete 18 | 19 | import ( 20 | "context" 21 | "fmt" 22 | 23 | "github.com/spf13/cobra" 24 | "github.com/triggermesh/tmctl/pkg/completion" 25 | "github.com/triggermesh/tmctl/pkg/docker" 26 | ) 27 | 28 | func (o *CliOptions) deleteTargetCmd() *cobra.Command { 29 | return &cobra.Command{ 30 | Use: "target ", 31 | Short: "Delete TriggerMesh Target", 32 | Example: "tmctl delete target foo", 33 | Args: cobra.MinimumNArgs(1), 34 | ValidArgsFunction: func(cmd *cobra.Command, args []string, _ string) ([]string, cobra.ShellCompDirective) { 35 | return append(completion.ListObjectsByAPI("targets.triggermesh.io/v1alpha1", o.Manifest), 36 | completion.ListObjectsByAPI("serving.knative.dev/v1", o.Manifest)...), 37 | cobra.ShellCompDirectiveNoFileComp 38 | }, 39 | RunE: func(cmd *cobra.Command, args []string) error { 40 | return o.deleteTarget(args) 41 | }, 42 | } 43 | } 44 | 45 | func (o *CliOptions) deleteTarget(names []string) error { 46 | ctx := context.Background() 47 | client, err := docker.NewClient() 48 | if err != nil { 49 | return fmt.Errorf("docker client: %w", err) 50 | } 51 | for _, object := range o.Manifest.Objects { 52 | if object.APIVersion != "targets.triggermesh.io/v1alpha1" && 53 | object.APIVersion != "serving.knative.dev/v1" { 54 | continue 55 | } 56 | for _, name := range names { 57 | if name == object.Metadata.Name { 58 | o.deleteEverything(ctx, object, client) 59 | break 60 | } 61 | } 62 | } 63 | return nil 64 | } 65 | -------------------------------------------------------------------------------- /cmd/delete/transformation.go: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2022 TriggerMesh Inc. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | 17 | package delete 18 | 19 | import ( 20 | "context" 21 | "fmt" 22 | 23 | "github.com/spf13/cobra" 24 | "github.com/triggermesh/tmctl/pkg/completion" 25 | "github.com/triggermesh/tmctl/pkg/docker" 26 | ) 27 | 28 | func (o *CliOptions) deleteTransformationCmd() *cobra.Command { 29 | return &cobra.Command{ 30 | Use: "transformation ", 31 | Short: "Delete TriggerMesh Transformation", 32 | Example: "tmctl delete transformation foo", 33 | Args: cobra.MinimumNArgs(1), 34 | ValidArgsFunction: func(cmd *cobra.Command, args []string, _ string) ([]string, cobra.ShellCompDirective) { 35 | return completion.ListObjectsByKind("Transformation", o.Manifest), cobra.ShellCompDirectiveNoFileComp 36 | }, 37 | RunE: func(cmd *cobra.Command, args []string) error { 38 | return o.deleteTransformation(args) 39 | }, 40 | } 41 | } 42 | 43 | func (o *CliOptions) deleteTransformation(names []string) error { 44 | ctx := context.Background() 45 | client, err := docker.NewClient() 46 | if err != nil { 47 | return fmt.Errorf("docker client: %w", err) 48 | } 49 | for _, object := range o.Manifest.Objects { 50 | if object.Kind != "Transformation" { 51 | continue 52 | } 53 | for _, name := range names { 54 | if name == object.Metadata.Name { 55 | o.deleteEverything(ctx, object, client) 56 | break 57 | } 58 | } 59 | } 60 | return nil 61 | } 62 | -------------------------------------------------------------------------------- /cmd/delete/trigger.go: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2022 TriggerMesh Inc. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | 17 | package delete 18 | 19 | import ( 20 | "context" 21 | "fmt" 22 | 23 | "github.com/spf13/cobra" 24 | "github.com/triggermesh/tmctl/pkg/completion" 25 | "github.com/triggermesh/tmctl/pkg/docker" 26 | ) 27 | 28 | func (o *CliOptions) deleteTriggerCmd() *cobra.Command { 29 | return &cobra.Command{ 30 | Use: "trigger ", 31 | Short: "Delete TriggerMesh Trigger", 32 | Example: "tmctl delete trigger foo", 33 | Args: cobra.MinimumNArgs(1), 34 | ValidArgsFunction: func(cmd *cobra.Command, args []string, _ string) ([]string, cobra.ShellCompDirective) { 35 | return completion.ListObjectsByKind("Trigger", o.Manifest), cobra.ShellCompDirectiveNoFileComp 36 | }, 37 | RunE: func(cmd *cobra.Command, args []string) error { 38 | return o.deleteTrigger(args) 39 | }, 40 | } 41 | } 42 | 43 | func (o *CliOptions) deleteTrigger(names []string) error { 44 | ctx := context.Background() 45 | client, err := docker.NewClient() 46 | if err != nil { 47 | return fmt.Errorf("docker client: %w", err) 48 | } 49 | for _, object := range o.Manifest.Objects { 50 | if object.Kind != "Trigger" { 51 | continue 52 | } 53 | for _, name := range names { 54 | if name == object.Metadata.Name { 55 | o.deleteEverything(ctx, object, client) 56 | break 57 | } 58 | } 59 | } 60 | return nil 61 | } 62 | -------------------------------------------------------------------------------- /cmd/import/import.go: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2022 TriggerMesh Inc. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | 17 | package import_ 18 | 19 | import ( 20 | "github.com/spf13/cobra" 21 | 22 | "github.com/triggermesh/tmctl/pkg/config" 23 | "github.com/triggermesh/tmctl/pkg/load" 24 | "github.com/triggermesh/tmctl/pkg/triggermesh/crd" 25 | ) 26 | 27 | func NewCmd(config *config.Config, crd map[string]crd.CRD) *cobra.Command { 28 | var from string 29 | importCmd := &cobra.Command{ 30 | Use: "import -f /", 31 | Short: "Import TriggerMesh manifest", 32 | Example: "tmctl import -f manifest.yaml", 33 | RunE: func(cmd *cobra.Command, args []string) error { 34 | return load.Import(from, config, crd) 35 | }, 36 | } 37 | importCmd.Flags().StringVarP(&from, "from", "f", "", "Import manifest from") 38 | cobra.CheckErr(importCmd.MarkFlagRequired("from")) 39 | return importCmd 40 | } 41 | -------------------------------------------------------------------------------- /cmd/version/version.go: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2022 TriggerMesh Inc. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | 17 | package version 18 | 19 | import ( 20 | "context" 21 | "fmt" 22 | "runtime" 23 | 24 | "github.com/spf13/cobra" 25 | 26 | "github.com/triggermesh/tmctl/pkg/config" 27 | "github.com/triggermesh/tmctl/pkg/docker" 28 | ) 29 | 30 | func NewCmd(ver, commit string, c *config.Config) *cobra.Command { 31 | versionCmd := &cobra.Command{ 32 | Use: "version", 33 | Short: "CLI version information", 34 | ValidArgsFunction: func(cmd *cobra.Command, args []string, _ string) ([]string, cobra.ShellCompDirective) { 35 | return []string{}, cobra.ShellCompDirectiveNoFileComp 36 | }, 37 | Run: func(_ *cobra.Command, _ []string) { 38 | fmt.Println("CLI:") 39 | fmt.Println(" Version: ", ver) 40 | fmt.Println(" Commit: ", commit) 41 | fmt.Printf(" OS/Arch: %s/%s\n", runtime.GOOS, runtime.GOARCH) 42 | fmt.Println("\nTriggerMesh:") 43 | fmt.Println(" Components version: ", c.Triggermesh.ComponentsVersion) 44 | fmt.Println("\nDocker:") 45 | fmt.Println(" ", dockerVersion()) 46 | }, 47 | } 48 | return versionCmd 49 | } 50 | 51 | func dockerVersion() string { 52 | client, err := docker.NewClient() 53 | if err != nil { 54 | return fmt.Sprintf("Not available (%v)", err) 55 | } 56 | ver, err := client.ServerVersion(context.Background()) 57 | if err != nil { 58 | return fmt.Sprintf("Not available (%v)", err) 59 | } 60 | return ver.Platform.Name 61 | } 62 | -------------------------------------------------------------------------------- /docs/tmctl.md: -------------------------------------------------------------------------------- 1 | ## tmctl 2 | 3 | A command line interface to build event-driven applications 4 | 5 | ### Synopsis 6 | 7 | tmctl is a CLI to help you create event brokers, sources, targets and transformations. 8 | 9 | Find more information at: https://docs.triggermesh.io 10 | 11 | ### Options 12 | 13 | ``` 14 | -h, --help help for tmctl 15 | --version string TriggerMesh components version. (default "v1.26.0") 16 | ``` 17 | 18 | ### SEE ALSO 19 | 20 | * [tmctl brokers](tmctl_brokers.md) - Show list and switch between existing brokers 21 | * [tmctl config](tmctl_config.md) - Read and write config values 22 | * [tmctl create](tmctl_create.md) - Create TriggerMesh component 23 | * [tmctl delete](tmctl_delete.md) - Delete TriggerMesh component 24 | * [tmctl describe](tmctl_describe.md) - List broker components and their statuses 25 | * [tmctl dump](tmctl_dump.md) - Generate TriggerMesh manifests 26 | * [tmctl import](tmctl_import.md) - Import TriggerMesh manifest 27 | * [tmctl logs](tmctl_logs.md) - Display components logs 28 | * [tmctl send-event](tmctl_send-event.md) - Send CloudEvent to the target 29 | * [tmctl start](tmctl_start.md) - Starts TriggerMesh components 30 | * [tmctl stop](tmctl_stop.md) - Stops TriggerMesh components, removes docker containers 31 | * [tmctl version](tmctl_version.md) - CLI version information 32 | * [tmctl watch](tmctl_watch.md) - Watch events flowing through the broker 33 | 34 | -------------------------------------------------------------------------------- /docs/tmctl_brokers.md: -------------------------------------------------------------------------------- 1 | ## tmctl brokers 2 | 3 | Show list and switch between existing brokers 4 | 5 | ``` 6 | tmctl brokers [--set ] [flags] 7 | ``` 8 | 9 | ### Options 10 | 11 | ``` 12 | -h, --help help for brokers 13 | --set string Change the current broker 14 | ``` 15 | 16 | ### Options inherited from parent commands 17 | 18 | ``` 19 | --version string TriggerMesh components version. (default "v1.26.0") 20 | ``` 21 | 22 | ### SEE ALSO 23 | 24 | * [tmctl](tmctl.md) - A command line interface to build event-driven applications 25 | 26 | -------------------------------------------------------------------------------- /docs/tmctl_config.md: -------------------------------------------------------------------------------- 1 | ## tmctl config 2 | 3 | Read and write config values 4 | 5 | ``` 6 | tmctl config [set|get] [flags] 7 | ``` 8 | 9 | ### Options 10 | 11 | ``` 12 | -h, --help help for config 13 | ``` 14 | 15 | ### Options inherited from parent commands 16 | 17 | ``` 18 | --version string TriggerMesh components version. (default "v1.26.0") 19 | ``` 20 | 21 | ### SEE ALSO 22 | 23 | * [tmctl](tmctl.md) - A command line interface to build event-driven applications 24 | * [tmctl config get](tmctl_config_get.md) - Read config value 25 | * [tmctl config set](tmctl_config_set.md) - Write config value 26 | 27 | -------------------------------------------------------------------------------- /docs/tmctl_config_get.md: -------------------------------------------------------------------------------- 1 | ## tmctl config get 2 | 3 | Read config value 4 | 5 | ``` 6 | tmctl config get [key] [flags] 7 | ``` 8 | 9 | ### Options 10 | 11 | ``` 12 | -h, --help help for get 13 | ``` 14 | 15 | ### Options inherited from parent commands 16 | 17 | ``` 18 | --version string TriggerMesh components version. (default "v1.26.0") 19 | ``` 20 | 21 | ### SEE ALSO 22 | 23 | * [tmctl config](tmctl_config.md) - Read and write config values 24 | 25 | -------------------------------------------------------------------------------- /docs/tmctl_config_set.md: -------------------------------------------------------------------------------- 1 | ## tmctl config set 2 | 3 | Write config value 4 | 5 | ``` 6 | tmctl config set [flags] 7 | ``` 8 | 9 | ### Options 10 | 11 | ``` 12 | -h, --help help for set 13 | ``` 14 | 15 | ### Options inherited from parent commands 16 | 17 | ``` 18 | --version string TriggerMesh components version. (default "v1.26.0") 19 | ``` 20 | 21 | ### SEE ALSO 22 | 23 | * [tmctl config](tmctl_config.md) - Read and write config values 24 | 25 | -------------------------------------------------------------------------------- /docs/tmctl_create.md: -------------------------------------------------------------------------------- 1 | ## tmctl create 2 | 3 | Create TriggerMesh component 4 | 5 | ### Options 6 | 7 | ``` 8 | -h, --help help for create 9 | ``` 10 | 11 | ### Options inherited from parent commands 12 | 13 | ``` 14 | --version string TriggerMesh components version. (default "v1.26.0") 15 | ``` 16 | 17 | ### SEE ALSO 18 | 19 | * [tmctl](tmctl.md) - A command line interface to build event-driven applications 20 | * [tmctl create broker](tmctl_create_broker.md) - Create TriggerMesh Broker. More information at https://docs.triggermesh.io/brokers/ 21 | * [tmctl create source](tmctl_create_source.md) - Create TriggerMesh source. More information at https://docs.triggermesh.io 22 | * [tmctl create target](tmctl_create_target.md) - Create TriggerMesh target. More information at https://docs.triggermesh.io 23 | * [tmctl create transformation](tmctl_create_transformation.md) - Create TriggerMesh transformation. More information at https://docs.triggermesh.io/transformation/jsontransformation/ 24 | * [tmctl create trigger](tmctl_create_trigger.md) - Create TriggerMesh trigger. More information at https://docs.triggermesh.io/brokers/triggers/ 25 | 26 | -------------------------------------------------------------------------------- /docs/tmctl_create_broker.md: -------------------------------------------------------------------------------- 1 | ## tmctl create broker 2 | 3 | Create TriggerMesh Broker. More information at https://docs.triggermesh.io/brokers/ 4 | 5 | ``` 6 | tmctl create broker [flags] 7 | ``` 8 | 9 | ### Examples 10 | 11 | ``` 12 | tmctl create broker foo 13 | ``` 14 | 15 | ### Options 16 | 17 | ``` 18 | -h, --help help for broker 19 | --version string TriggerMesh broker version. (default "v1.4.0") 20 | ``` 21 | 22 | ### SEE ALSO 23 | 24 | * [tmctl create](tmctl_create.md) - Create TriggerMesh component 25 | 26 | -------------------------------------------------------------------------------- /docs/tmctl_create_source.md: -------------------------------------------------------------------------------- 1 | ## tmctl create source 2 | 3 | Create TriggerMesh source. More information at https://docs.triggermesh.io 4 | 5 | ``` 6 | tmctl create source [kind]/[--from-image ][--name ] [flags] 7 | ``` 8 | 9 | ### Examples 10 | 11 | ``` 12 | tmctl create source httppoller \ 13 | --endpoint https://www.example.com \ 14 | --eventType sample-event \ 15 | --interval 30s \ 16 | --method GET 17 | ``` 18 | 19 | ### Options 20 | 21 | ``` 22 | -h, --help help for source 23 | ``` 24 | 25 | ### Options inherited from parent commands 26 | 27 | ``` 28 | --version string TriggerMesh components version. (default "v1.26.0") 29 | ``` 30 | 31 | ### SEE ALSO 32 | 33 | * [tmctl create](tmctl_create.md) - Create TriggerMesh component 34 | 35 | -------------------------------------------------------------------------------- /docs/tmctl_create_target.md: -------------------------------------------------------------------------------- 1 | ## tmctl create target 2 | 3 | Create TriggerMesh target. More information at https://docs.triggermesh.io 4 | 5 | ``` 6 | tmctl create target [kind]/[--from-image ][--name ][--source ...][--eventTypes ...] [flags] 7 | ``` 8 | 9 | ### Examples 10 | 11 | ``` 12 | tmctl create target http \ 13 | --endpoint https://image-charts.com \ 14 | --method GET \ 15 | --response.eventType qr-data.response 16 | ``` 17 | 18 | ### Options 19 | 20 | ``` 21 | -h, --help help for target 22 | ``` 23 | 24 | ### Options inherited from parent commands 25 | 26 | ``` 27 | --version string TriggerMesh components version. (default "v1.26.0") 28 | ``` 29 | 30 | ### SEE ALSO 31 | 32 | * [tmctl create](tmctl_create.md) - Create TriggerMesh component 33 | 34 | -------------------------------------------------------------------------------- /docs/tmctl_create_transformation.md: -------------------------------------------------------------------------------- 1 | ## tmctl create transformation 2 | 3 | Create TriggerMesh transformation. More information at https://docs.triggermesh.io/transformation/jsontransformation/ 4 | 5 | ``` 6 | tmctl create transformation [--target ][--source ...][--eventTypes ...][--from ][--wizard] [flags] 7 | ``` 8 | 9 | ### Examples 10 | 11 | ``` 12 | tmctl create transformation < [--source ...][--eventTypes ...] [flags] 7 | ``` 8 | 9 | ### Examples 10 | 11 | ``` 12 | tmctl create trigger --target sockeye --source foo-httppollersource 13 | ``` 14 | 15 | ### Options 16 | 17 | ``` 18 | --eventTypes strings Event types filter 19 | --filter string Raw filter JSON 20 | -h, --help help for trigger 21 | --name string Trigger name 22 | --source strings Event sources filter 23 | --target string Target name 24 | ``` 25 | 26 | ### Options inherited from parent commands 27 | 28 | ``` 29 | --version string TriggerMesh components version. (default "v1.26.0") 30 | ``` 31 | 32 | ### SEE ALSO 33 | 34 | * [tmctl create](tmctl_create.md) - Create TriggerMesh component 35 | 36 | -------------------------------------------------------------------------------- /docs/tmctl_delete.md: -------------------------------------------------------------------------------- 1 | ## tmctl delete 2 | 3 | Delete TriggerMesh component 4 | 5 | ### Options 6 | 7 | ``` 8 | -h, --help help for delete 9 | ``` 10 | 11 | ### Options inherited from parent commands 12 | 13 | ``` 14 | --version string TriggerMesh components version. (default "v1.26.0") 15 | ``` 16 | 17 | ### SEE ALSO 18 | 19 | * [tmctl](tmctl.md) - A command line interface to build event-driven applications 20 | * [tmctl delete broker](tmctl_delete_broker.md) - Delete TriggerMesh Broker 21 | * [tmctl delete source](tmctl_delete_source.md) - Delete TriggerMesh Source 22 | * [tmctl delete target](tmctl_delete_target.md) - Delete TriggerMesh Target 23 | * [tmctl delete transformation](tmctl_delete_transformation.md) - Delete TriggerMesh Transformation 24 | * [tmctl delete trigger](tmctl_delete_trigger.md) - Delete TriggerMesh Trigger 25 | 26 | -------------------------------------------------------------------------------- /docs/tmctl_delete_broker.md: -------------------------------------------------------------------------------- 1 | ## tmctl delete broker 2 | 3 | Delete TriggerMesh Broker 4 | 5 | ``` 6 | tmctl delete broker [flags] 7 | ``` 8 | 9 | ### Examples 10 | 11 | ``` 12 | tmctl delete broker foo 13 | ``` 14 | 15 | ### Options 16 | 17 | ``` 18 | -h, --help help for broker 19 | ``` 20 | 21 | ### Options inherited from parent commands 22 | 23 | ``` 24 | --version string TriggerMesh components version. (default "v1.26.0") 25 | ``` 26 | 27 | ### SEE ALSO 28 | 29 | * [tmctl delete](tmctl_delete.md) - Delete TriggerMesh component 30 | 31 | -------------------------------------------------------------------------------- /docs/tmctl_delete_source.md: -------------------------------------------------------------------------------- 1 | ## tmctl delete source 2 | 3 | Delete TriggerMesh Source 4 | 5 | ``` 6 | tmctl delete source [flags] 7 | ``` 8 | 9 | ### Examples 10 | 11 | ``` 12 | tmctl delete source foo 13 | ``` 14 | 15 | ### Options 16 | 17 | ``` 18 | -h, --help help for source 19 | ``` 20 | 21 | ### Options inherited from parent commands 22 | 23 | ``` 24 | --version string TriggerMesh components version. (default "v1.26.0") 25 | ``` 26 | 27 | ### SEE ALSO 28 | 29 | * [tmctl delete](tmctl_delete.md) - Delete TriggerMesh component 30 | 31 | -------------------------------------------------------------------------------- /docs/tmctl_delete_target.md: -------------------------------------------------------------------------------- 1 | ## tmctl delete target 2 | 3 | Delete TriggerMesh Target 4 | 5 | ``` 6 | tmctl delete target [flags] 7 | ``` 8 | 9 | ### Examples 10 | 11 | ``` 12 | tmctl delete target foo 13 | ``` 14 | 15 | ### Options 16 | 17 | ``` 18 | -h, --help help for target 19 | ``` 20 | 21 | ### Options inherited from parent commands 22 | 23 | ``` 24 | --version string TriggerMesh components version. (default "v1.26.0") 25 | ``` 26 | 27 | ### SEE ALSO 28 | 29 | * [tmctl delete](tmctl_delete.md) - Delete TriggerMesh component 30 | 31 | -------------------------------------------------------------------------------- /docs/tmctl_delete_transformation.md: -------------------------------------------------------------------------------- 1 | ## tmctl delete transformation 2 | 3 | Delete TriggerMesh Transformation 4 | 5 | ``` 6 | tmctl delete transformation [flags] 7 | ``` 8 | 9 | ### Examples 10 | 11 | ``` 12 | tmctl delete transformation foo 13 | ``` 14 | 15 | ### Options 16 | 17 | ``` 18 | -h, --help help for transformation 19 | ``` 20 | 21 | ### Options inherited from parent commands 22 | 23 | ``` 24 | --version string TriggerMesh components version. (default "v1.26.0") 25 | ``` 26 | 27 | ### SEE ALSO 28 | 29 | * [tmctl delete](tmctl_delete.md) - Delete TriggerMesh component 30 | 31 | -------------------------------------------------------------------------------- /docs/tmctl_delete_trigger.md: -------------------------------------------------------------------------------- 1 | ## tmctl delete trigger 2 | 3 | Delete TriggerMesh Trigger 4 | 5 | ``` 6 | tmctl delete trigger [flags] 7 | ``` 8 | 9 | ### Examples 10 | 11 | ``` 12 | tmctl delete trigger foo 13 | ``` 14 | 15 | ### Options 16 | 17 | ``` 18 | -h, --help help for trigger 19 | ``` 20 | 21 | ### Options inherited from parent commands 22 | 23 | ``` 24 | --version string TriggerMesh components version. (default "v1.26.0") 25 | ``` 26 | 27 | ### SEE ALSO 28 | 29 | * [tmctl delete](tmctl_delete.md) - Delete TriggerMesh component 30 | 31 | -------------------------------------------------------------------------------- /docs/tmctl_describe.md: -------------------------------------------------------------------------------- 1 | ## tmctl describe 2 | 3 | List broker components and their statuses 4 | 5 | ``` 6 | tmctl describe [broker] [flags] 7 | ``` 8 | 9 | ### Examples 10 | 11 | ``` 12 | tmctl describe 13 | ``` 14 | 15 | ### Options 16 | 17 | ``` 18 | -h, --help help for describe 19 | ``` 20 | 21 | ### Options inherited from parent commands 22 | 23 | ``` 24 | --version string TriggerMesh components version. (default "v1.26.0") 25 | ``` 26 | 27 | ### SEE ALSO 28 | 29 | * [tmctl](tmctl.md) - A command line interface to build event-driven applications 30 | 31 | -------------------------------------------------------------------------------- /docs/tmctl_dump.md: -------------------------------------------------------------------------------- 1 | ## tmctl dump 2 | 3 | Generate TriggerMesh manifests 4 | 5 | ``` 6 | tmctl dump [broker] -p [-o json] [flags] 7 | ``` 8 | 9 | ### Examples 10 | 11 | ``` 12 | tmctl dump 13 | ``` 14 | 15 | ### Options 16 | 17 | ``` 18 | -i, --do-instance string DigitalOcean instance size (default "professional-xs") 19 | -r, --do-region string DigitalOcean region (default "fra") 20 | -h, --help help for dump 21 | --no-secrets Remove secret values from the manifest 22 | -o, --output string Output format (default "yaml") 23 | -p, --platform string Target platform. One of kubernetes, knative, docker-compose, digitalocean (default "kubernetes") 24 | ``` 25 | 26 | ### Options inherited from parent commands 27 | 28 | ``` 29 | --version string TriggerMesh components version. (default "v1.26.0") 30 | ``` 31 | 32 | ### SEE ALSO 33 | 34 | * [tmctl](tmctl.md) - A command line interface to build event-driven applications 35 | 36 | -------------------------------------------------------------------------------- /docs/tmctl_import.md: -------------------------------------------------------------------------------- 1 | ## tmctl import 2 | 3 | Import TriggerMesh manifest 4 | 5 | ``` 6 | tmctl import -f / [flags] 7 | ``` 8 | 9 | ### Examples 10 | 11 | ``` 12 | tmctl import -f manifest.yaml 13 | ``` 14 | 15 | ### Options 16 | 17 | ``` 18 | -f, --from string Import manifest from 19 | -h, --help help for import 20 | ``` 21 | 22 | ### Options inherited from parent commands 23 | 24 | ``` 25 | --version string TriggerMesh components version. (default "v1.26.0") 26 | ``` 27 | 28 | ### SEE ALSO 29 | 30 | * [tmctl](tmctl.md) - A command line interface to build event-driven applications 31 | 32 | -------------------------------------------------------------------------------- /docs/tmctl_logs.md: -------------------------------------------------------------------------------- 1 | ## tmctl logs 2 | 3 | Display components logs 4 | 5 | ``` 6 | tmctl logs [name] [flags] 7 | ``` 8 | 9 | ### Examples 10 | 11 | ``` 12 | tmctl logs 13 | ``` 14 | 15 | ### Options 16 | 17 | ``` 18 | -f, --follow Follow logs output 19 | -h, --help help for logs 20 | ``` 21 | 22 | ### Options inherited from parent commands 23 | 24 | ``` 25 | --version string TriggerMesh components version. (default "v1.26.0") 26 | ``` 27 | 28 | ### SEE ALSO 29 | 30 | * [tmctl](tmctl.md) - A command line interface to build event-driven applications 31 | 32 | -------------------------------------------------------------------------------- /docs/tmctl_send-event.md: -------------------------------------------------------------------------------- 1 | ## tmctl send-event 2 | 3 | Send CloudEvent to the target 4 | 5 | ``` 6 | tmctl send-event [--eventType ][--target ][--file ] [flags] 7 | ``` 8 | 9 | ### Examples 10 | 11 | ``` 12 | tmctl send-event '{"hello":"world"}' 13 | ``` 14 | 15 | ### Options 16 | 17 | ``` 18 | --eventType string CloudEvent Type attribute (default "triggermesh-local-event") 19 | -f, --file string File containing a list of events 20 | -h, --help help for send-event 21 | --target string Component to send the event to. Default is the broker 22 | ``` 23 | 24 | ### Options inherited from parent commands 25 | 26 | ``` 27 | --version string TriggerMesh components version. (default "v1.26.0") 28 | ``` 29 | 30 | ### SEE ALSO 31 | 32 | * [tmctl](tmctl.md) - A command line interface to build event-driven applications 33 | 34 | -------------------------------------------------------------------------------- /docs/tmctl_start.md: -------------------------------------------------------------------------------- 1 | ## tmctl start 2 | 3 | Starts TriggerMesh components 4 | 5 | ``` 6 | tmctl start [broker] [flags] 7 | ``` 8 | 9 | ### Examples 10 | 11 | ``` 12 | tmctl start 13 | ``` 14 | 15 | ### Options 16 | 17 | ``` 18 | -h, --help help for start 19 | --restart Restart components 20 | ``` 21 | 22 | ### Options inherited from parent commands 23 | 24 | ``` 25 | --version string TriggerMesh components version. (default "v1.26.0") 26 | ``` 27 | 28 | ### SEE ALSO 29 | 30 | * [tmctl](tmctl.md) - A command line interface to build event-driven applications 31 | 32 | -------------------------------------------------------------------------------- /docs/tmctl_stop.md: -------------------------------------------------------------------------------- 1 | ## tmctl stop 2 | 3 | Stops TriggerMesh components, removes docker containers 4 | 5 | ``` 6 | tmctl stop [broker] [flags] 7 | ``` 8 | 9 | ### Examples 10 | 11 | ``` 12 | tmctl stop 13 | ``` 14 | 15 | ### Options 16 | 17 | ``` 18 | -h, --help help for stop 19 | ``` 20 | 21 | ### Options inherited from parent commands 22 | 23 | ``` 24 | --version string TriggerMesh components version. (default "v1.26.0") 25 | ``` 26 | 27 | ### SEE ALSO 28 | 29 | * [tmctl](tmctl.md) - A command line interface to build event-driven applications 30 | 31 | -------------------------------------------------------------------------------- /docs/tmctl_version.md: -------------------------------------------------------------------------------- 1 | ## tmctl version 2 | 3 | CLI version information 4 | 5 | ``` 6 | tmctl version [flags] 7 | ``` 8 | 9 | ### Options 10 | 11 | ``` 12 | -h, --help help for version 13 | ``` 14 | 15 | ### Options inherited from parent commands 16 | 17 | ``` 18 | --version string TriggerMesh components version. (default "v1.26.0") 19 | ``` 20 | 21 | ### SEE ALSO 22 | 23 | * [tmctl](tmctl.md) - A command line interface to build event-driven applications 24 | 25 | -------------------------------------------------------------------------------- /docs/tmctl_watch.md: -------------------------------------------------------------------------------- 1 | ## tmctl watch 2 | 3 | Watch events flowing through the broker 4 | 5 | ``` 6 | tmctl watch [broker] [flags] 7 | ``` 8 | 9 | ### Examples 10 | 11 | ``` 12 | tmctl watch 13 | ``` 14 | 15 | ### Options 16 | 17 | ``` 18 | -h, --help help for watch 19 | ``` 20 | 21 | ### Options inherited from parent commands 22 | 23 | ``` 24 | --version string TriggerMesh components version. (default "v1.26.0") 25 | ``` 26 | 27 | ### SEE ALSO 28 | 29 | * [tmctl](tmctl.md) - A command line interface to build event-driven applications 30 | 31 | -------------------------------------------------------------------------------- /hack/boilerplate/boilerplate.go.txt: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2022 TriggerMesh Inc. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | -------------------------------------------------------------------------------- /hack/boilerplate/boilerplate.yaml.txt: -------------------------------------------------------------------------------- 1 | # Copyright 2022 TriggerMesh Inc. 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | -------------------------------------------------------------------------------- /hack/install.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -e 3 | 4 | PKG_NAME=tmctl 5 | GITHUB_URL=https://github.com/triggermesh/tmctl 6 | 7 | PLATFORM= 8 | ARCH= 9 | 10 | SUDO=sudo 11 | CURL=curl 12 | BIN_DIR= 13 | 14 | info() { 15 | echo '[INFO] ' "$@" 16 | } 17 | 18 | warn() { 19 | echo '[WARN] ' "$@" >&2 20 | } 21 | 22 | fatal() { 23 | echo '[ERROR] ' "$@" >&2 24 | exit 1 25 | } 26 | 27 | if [ $(id -u) -eq 0 ]; then 28 | SUDO= 29 | fi 30 | 31 | # if BIN_DIR is not specified, install to "/usr/local/bin" 32 | if [ -z "${BIN_DIR}" ]; then 33 | BIN_DIR="/usr/local/bin" 34 | fi 35 | 36 | # os platform 37 | EXT=".tar.gz" 38 | BIN_NAME="tmctl" 39 | if [ -z "${PLATFORM}" ]; then 40 | case $(uname) in 41 | Linux) 42 | PLATFORM="linux" 43 | ;; 44 | Darwin) 45 | PLATFORM="macOS" 46 | ;; 47 | Windows) 48 | PLATFORM="windows" 49 | EXT=".zip" 50 | BIN_NAME="tmctl.exe" 51 | ;; 52 | *) 53 | fatal "Unsupported platform ${PLATFORM}" 54 | ;; 55 | esac 56 | fi 57 | 58 | # system architecture 59 | if [ -z "${ARCH}" ]; then 60 | case $(uname -m) in 61 | x86_64|amd64) 62 | ARCH="amd64" 63 | ;; 64 | arm64|aarch64) 65 | ARCH="arm64" 66 | ;; 67 | *) 68 | fatal "Unsupported architecture ${ARCH}" 69 | ;; 70 | esac 71 | fi 72 | 73 | # check if curl command is available 74 | if ! [ -x "$(command -v ${CURL})" ]; then 75 | fatal "Command not found: ${CURL}" 76 | return 1 77 | fi 78 | 79 | # generate download URL 80 | if [ -n "${PKG_VERSION}" ]; then 81 | DOWNLOAD_URL="${GITHUB_URL}/releases/download/${PKG_VERSION}/${PKG_NAME}_${PLATFORM}_${ARCH}${EXT}" 82 | else 83 | DOWNLOAD_URL="${GITHUB_URL}/releases/latest/download/${PKG_NAME}_${PLATFORM}_${ARCH}${EXT}" 84 | fi 85 | 86 | TMP_DIR=$(mktemp -d -t tmctl-install.XXXXXX) 87 | TMP_ARCHIVE=${TMP_DIR}/${PKG_NAME}_${PLATFORM}_${ARCH}${EXT} 88 | TMP_BIN=${TMP_DIR}/${BIN_NAME} 89 | cleanup() { 90 | code=$? 91 | set +e 92 | trap - EXIT 93 | rm -rf ${TMP_DIR} 94 | exit $code 95 | } 96 | trap cleanup INT EXIT 97 | 98 | info "Downloading ${DOWNLOAD_URL}... to ${TMP_ARCHIVE}" 99 | ${CURL} -sfL ${DOWNLOAD_URL} -o ${TMP_ARCHIVE} 100 | 101 | if [ "${EXT}" = ".zip" ]; then 102 | unzip ${TMP_ARCHIVE} -d ${TMP_DIR} 103 | else 104 | tar xzf ${TMP_ARCHIVE} -C ${TMP_DIR} 105 | fi 106 | 107 | info "Installing to ${BIN_DIR}/${PKG_NAME}" 108 | chmod 755 ${TMP_BIN} 109 | ${SUDO} chown root ${TMP_BIN} 110 | ${SUDO} mv -f ${TMP_BIN} ${BIN_DIR}/${BIN_NAME} 111 | -------------------------------------------------------------------------------- /main.go: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2022 TriggerMesh Inc. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | 17 | package main 18 | 19 | import ( 20 | "github.com/triggermesh/tmctl/cmd" 21 | "github.com/triggermesh/tmctl/pkg/log" 22 | ) 23 | 24 | var ( 25 | Version string = "dev" 26 | Commit string = "unknown" 27 | ) 28 | 29 | func main() { 30 | if err := cmd.NewRootCommand(Version, Commit).Execute(); err != nil { 31 | log.Fatal(err) 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /pkg/config/overrides.go: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2022 TriggerMesh Inc. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | 17 | package config 18 | 19 | import "strings" 20 | 21 | type configOverride func(*Config) bool 22 | 23 | var overrides = []configOverride{ 24 | brokerImageReplacement(), 25 | dockerTimeoutAppend(), 26 | schemaRegistryAppend(), 27 | } 28 | 29 | func (c *Config) applyOverrides() error { 30 | overwritten := false 31 | for _, override := range overrides { 32 | if override(c) { 33 | overwritten = true 34 | } 35 | } 36 | if overwritten { 37 | return c.Save() 38 | } 39 | return nil 40 | } 41 | 42 | func brokerImageReplacement() configOverride { 43 | return func(c *Config) bool { 44 | if c.Triggermesh.Broker.Image == "" { 45 | return false 46 | } 47 | imageRef := strings.Split(c.Triggermesh.Broker.Image, ":") 48 | if len(imageRef) == 2 { 49 | if c.Triggermesh.Broker.Version == "" { 50 | if imageRef[1] == "latest" { 51 | imageRef[1] = latestOrDefaultTag("brokers", defaultBrokerVersion) 52 | } 53 | c.Triggermesh.Broker.Version = imageRef[1] 54 | } 55 | } 56 | if c.Triggermesh.Broker.Version == "" { 57 | c.Triggermesh.Broker.Version = latestOrDefaultTag("brokers", defaultBrokerVersion) 58 | } 59 | c.Triggermesh.Broker.Image = "" 60 | return true 61 | } 62 | } 63 | 64 | func dockerTimeoutAppend() configOverride { 65 | return func(c *Config) bool { 66 | if c.Docker.StartTimeout != "" { 67 | return false 68 | } 69 | c.Docker.StartTimeout = defaultDockerTimeout 70 | return true 71 | } 72 | } 73 | 74 | func schemaRegistryAppend() configOverride { 75 | return func(c *Config) bool { 76 | if c.SchemaRegistry != "" { 77 | return false 78 | } 79 | c.SchemaRegistry = defaultSchemaRegistryURL 80 | return true 81 | } 82 | } 83 | -------------------------------------------------------------------------------- /pkg/docker/compose.go: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2022 TriggerMesh Inc. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | 17 | package docker 18 | 19 | type ComposeService struct { 20 | ContainerName string `json:"container_name"` 21 | Entrypoint []string `json:"entrypoint,omitempty"` 22 | Image string `json:"image"` 23 | Ports []string `json:"ports"` 24 | Environment []string `json:"environment"` 25 | } 26 | -------------------------------------------------------------------------------- /pkg/docker/config.go: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2022 TriggerMesh Inc. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | 17 | package docker 18 | 19 | import ( 20 | "strconv" 21 | 22 | "github.com/docker/docker/api/types/container" 23 | "github.com/docker/go-connections/nat" 24 | 25 | "github.com/triggermesh/tmctl/pkg/triggermesh/pkg" 26 | ) 27 | 28 | const errorLoggingLevel = `K_LOGGING_CONFIG={"zap-logger-config":"{\"level\": \"error\"}"}` 29 | 30 | type ContainerOption func(*container.Config) 31 | type HostOption func(*container.HostConfig) 32 | 33 | func WithImage(image string) ContainerOption { 34 | return func(cc *container.Config) { 35 | cc.Image = image 36 | } 37 | } 38 | 39 | func WithEnv(env []string) ContainerOption { 40 | return func(cc *container.Config) { 41 | cc.Env = append(cc.Env, env...) 42 | } 43 | } 44 | 45 | func WithPort(port nat.Port) ContainerOption { 46 | return func(cc *container.Config) { 47 | cc.ExposedPorts = nat.PortSet{ 48 | port: struct{}{}, 49 | } 50 | } 51 | } 52 | 53 | func WithEntrypoint(entrypoint []string) ContainerOption { 54 | return func(cc *container.Config) { 55 | cc.Entrypoint = entrypoint 56 | } 57 | } 58 | 59 | func WithVolumeBind(bind string) HostOption { 60 | return func(hc *container.HostConfig) { 61 | hc.Binds = []string{bind} 62 | } 63 | } 64 | 65 | func WithHostPortBinding(containerPort nat.Port) HostOption { 66 | return func(hc *container.HostConfig) { 67 | hc.PortBindings = nat.PortMap{ 68 | containerPort: []nat.PortBinding{ 69 | { 70 | HostIP: "0.0.0.0", 71 | HostPort: strconv.Itoa(pkg.OpenPort()), 72 | }, 73 | }, 74 | } 75 | } 76 | } 77 | 78 | func WithExtraHost() HostOption { 79 | return func(hc *container.HostConfig) { 80 | hc.ExtraHosts = []string{"host.docker.internal:host-gateway"} 81 | } 82 | } 83 | 84 | func WithErrorLoggingLevel() ContainerOption { 85 | return func(cc *container.Config) { 86 | cc.Env = append(cc.Env, errorLoggingLevel) 87 | } 88 | } 89 | -------------------------------------------------------------------------------- /pkg/log/log.go: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2022 TriggerMesh Inc. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | 17 | package log 18 | 19 | import ( 20 | glog "log" 21 | 22 | "github.com/triggermesh/tmctl/pkg/config" 23 | ) 24 | 25 | var broker = "-" 26 | 27 | func init() { 28 | c, _ := config.New() 29 | if c != nil && c.Context != "" { 30 | broker = c.Context 31 | } 32 | } 33 | 34 | // Println is standard's log output supplied with the broker name. 35 | func Println(message string) { 36 | glog.Printf("%s | %s", broker, message) 37 | } 38 | 39 | // Printf is standard's log formattable output supplied with the broker name. 40 | func Printf(format string, v ...any) { 41 | glog.Printf(broker+" | "+format, v...) 42 | } 43 | 44 | // Fatal is the local fatal function. 45 | func Fatal(v ...any) { 46 | glog.Fatal(v...) 47 | } 48 | -------------------------------------------------------------------------------- /pkg/manifest/manifest_test.go: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2022 TriggerMesh Inc. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | 17 | package manifest 18 | 19 | import ( 20 | "testing" 21 | 22 | "github.com/stretchr/testify/assert" 23 | 24 | "github.com/triggermesh/tmctl/pkg/triggermesh/components/service" 25 | "github.com/triggermesh/tmctl/test" 26 | ) 27 | 28 | func TestRead(t *testing.T) { 29 | m := New("wrong/path") 30 | assert.Error(t, m.Read()) 31 | 32 | m = New(test.Manifest()) 33 | assert.NoError(t, m.Read()) 34 | assert.Lenf(t, m.Objects, 7, "Test manifest %q len is incorrect", test.Manifest()) 35 | 36 | existingComponent := service.New("sockeye", "docker.io/n3wscott/sockeye:v0.7.0", "foo", service.Consumer, nil) 37 | updatedComponent := service.New("sockeye", "docker.io/n3wscott/sockeye:v0.7.0", "foo", service.Consumer, map[string]string{ 38 | "new-env-var": "new-env-value", 39 | }) 40 | newComponent := service.New("test-service", "triggermesh/image", "foo", service.Consumer, nil) 41 | 42 | changed, err := m.Add(existingComponent) 43 | assert.NoError(t, err) 44 | assert.Equal(t, false, changed, "Existing component triggered manifest update") 45 | 46 | changed, err = m.Add(updatedComponent) 47 | assert.NoError(t, err) 48 | assert.Equal(t, true, changed, "Updated component didn't trigger manifest update") 49 | 50 | changed, err = m.Add(newComponent) 51 | assert.NoError(t, err) 52 | assert.Equal(t, true, changed, "New component didn't trigger manifest update") 53 | 54 | assert.NoError(t, m.Remove(newComponent.GetName(), newComponent.GetKind())) 55 | 56 | changed, err = m.Add(existingComponent) 57 | assert.NoError(t, err) 58 | assert.Equal(t, true, changed, "Restoring original component didn't update the manifest") 59 | 60 | assert.Lenf(t, m.Objects, 7, "Test manifest %q objects len differs after test", test.Manifest()) 61 | } 62 | -------------------------------------------------------------------------------- /pkg/triggermesh/adapter/ce/ce.go: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2022 TriggerMesh Inc. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | 17 | package ce 18 | 19 | import ( 20 | "fmt" 21 | 22 | "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" 23 | ) 24 | 25 | type EventAttributes struct { 26 | ProducedEventSource string 27 | ProducedEventTypes []string 28 | AcceptedEventTypes []string 29 | } 30 | 31 | func Attributes(o unstructured.Unstructured) (EventAttributes, error) { 32 | switch o.GetAPIVersion() { 33 | case "sources.triggermesh.io/v1alpha1": 34 | return sources(o) 35 | case "targets.triggermesh.io/v1alpha1": 36 | return targets(o) 37 | // case "flow.triggermesh.io/v1alpha1": 38 | // return flow(o) 39 | // case "extensions.triggermesh.io/v1alpha1": 40 | // return extensions(o) 41 | // case "routing.triggermesh.io/v1alpha1": 42 | // return routing(o) 43 | } 44 | return EventAttributes{}, fmt.Errorf("API group %q is not supported", o.GetKind()) 45 | } 46 | -------------------------------------------------------------------------------- /pkg/triggermesh/adapter/env/env.go: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2022 TriggerMesh Inc. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | 17 | package env 18 | 19 | import ( 20 | "fmt" 21 | 22 | corev1 "k8s.io/api/core/v1" 23 | "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" 24 | ) 25 | 26 | func Build(o unstructured.Unstructured) ([]corev1.EnvVar, error) { 27 | switch o.GetAPIVersion() { 28 | case "sources.triggermesh.io/v1alpha1": 29 | return sources(o) 30 | case "targets.triggermesh.io/v1alpha1": 31 | return targets(o) 32 | case "flow.triggermesh.io/v1alpha1": 33 | return flow(o) 34 | case "extensions.triggermesh.io/v1alpha1": 35 | return extensions(o) 36 | case "routing.triggermesh.io/v1alpha1": 37 | return routing(o) 38 | } 39 | return nil, fmt.Errorf("API group %q is not supported", o.GetKind()) 40 | } 41 | -------------------------------------------------------------------------------- /pkg/triggermesh/adapter/env/extensions.go: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2022 TriggerMesh Inc. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | 17 | package env 18 | 19 | import ( 20 | "fmt" 21 | 22 | corev1 "k8s.io/api/core/v1" 23 | "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" 24 | "k8s.io/apimachinery/pkg/runtime" 25 | 26 | extensionsv1alpha1 "github.com/triggermesh/triggermesh/pkg/apis/extensions/v1alpha1" 27 | "github.com/triggermesh/triggermesh/pkg/extensions/reconciler/function" 28 | ) 29 | 30 | func extensions(object unstructured.Unstructured) ([]corev1.EnvVar, error) { 31 | switch object.GetKind() { 32 | // Extensions API group 33 | case "Function": 34 | var o *extensionsv1alpha1.Function 35 | if err := runtime.DefaultUnstructuredConverter.FromUnstructured(object.Object, &o); err != nil { 36 | return nil, err 37 | } 38 | return function.MakeAppEnv(o), nil 39 | } 40 | return nil, fmt.Errorf("kind %q is not supported", object.GetKind()) 41 | } 42 | -------------------------------------------------------------------------------- /pkg/triggermesh/adapter/env/flow.go: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2022 TriggerMesh Inc. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | 17 | package env 18 | 19 | import ( 20 | "fmt" 21 | 22 | corev1 "k8s.io/api/core/v1" 23 | "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" 24 | "k8s.io/apimachinery/pkg/runtime" 25 | 26 | flowv1alpha1 "github.com/triggermesh/triggermesh/pkg/apis/flow/v1alpha1" 27 | 28 | "github.com/triggermesh/triggermesh/pkg/flow/reconciler/jqtransformation" 29 | "github.com/triggermesh/triggermesh/pkg/flow/reconciler/transformation" 30 | "github.com/triggermesh/triggermesh/pkg/flow/reconciler/xmltojsontransformation" 31 | "github.com/triggermesh/triggermesh/pkg/flow/reconciler/xslttransformation" 32 | ) 33 | 34 | func flow(object unstructured.Unstructured) ([]corev1.EnvVar, error) { 35 | switch object.GetKind() { 36 | // Flow API group 37 | case "Transformation": 38 | var o *flowv1alpha1.Transformation 39 | if err := runtime.DefaultUnstructuredConverter.FromUnstructured(object.Object, &o); err != nil { 40 | return nil, err 41 | } 42 | return transformation.MakeAppEnv(o), nil 43 | case "XSLTTransformation": 44 | var o *flowv1alpha1.XSLTTransformation 45 | if err := runtime.DefaultUnstructuredConverter.FromUnstructured(object.Object, &o); err != nil { 46 | return nil, err 47 | } 48 | return xslttransformation.MakeAppEnv(o), nil 49 | case "XMLToJSONTransformation": 50 | var o *flowv1alpha1.XMLToJSONTransformation 51 | if err := runtime.DefaultUnstructuredConverter.FromUnstructured(object.Object, &o); err != nil { 52 | return nil, err 53 | } 54 | return xmltojsontransformation.MakeAppEnv(o), nil 55 | case "JQTransformation": 56 | var o *flowv1alpha1.JQTransformation 57 | if err := runtime.DefaultUnstructuredConverter.FromUnstructured(object.Object, &o); err != nil { 58 | return nil, err 59 | } 60 | return jqtransformation.MakeAppEnv(o), nil 61 | } 62 | return nil, fmt.Errorf("kind %q is not supported", object.GetKind()) 63 | } 64 | -------------------------------------------------------------------------------- /pkg/triggermesh/adapter/env/routing.go: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2022 TriggerMesh Inc. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | 17 | package env 18 | 19 | import ( 20 | "fmt" 21 | 22 | corev1 "k8s.io/api/core/v1" 23 | "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" 24 | ) 25 | 26 | func routing(object unstructured.Unstructured) ([]corev1.EnvVar, error) { 27 | return nil, fmt.Errorf("kind %q is not supported", object.GetKind()) 28 | } 29 | -------------------------------------------------------------------------------- /pkg/triggermesh/adapter/reconciler/external/aws/common.go: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2022 TriggerMesh Inc. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | 17 | package aws 18 | 19 | import "fmt" 20 | 21 | const ( 22 | awsAccessKeyEnv = "accessKeyID" 23 | awsSecretKeyEnv = "secretAccessKey" 24 | ) 25 | 26 | func readSecret(secrets map[string]string) (string, string, error) { 27 | accessKey, exists := secrets[awsAccessKeyEnv] 28 | if !exists { 29 | return "", "", fmt.Errorf("%q secret is missing", awsAccessKeyEnv) 30 | } 31 | secretKey, exists := secrets[awsSecretKeyEnv] 32 | if !exists { 33 | return "", "", fmt.Errorf("%q secret is missing", awsSecretKeyEnv) 34 | } 35 | return accessKey, secretKey, nil 36 | } 37 | -------------------------------------------------------------------------------- /pkg/triggermesh/adapter/reconciler/external/aws/eventbridgesource.go: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2022 TriggerMesh Inc. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | 17 | package aws 18 | 19 | import ( 20 | "fmt" 21 | 22 | awscore "github.com/aws/aws-sdk-go/aws" 23 | "github.com/aws/aws-sdk-go/aws/credentials" 24 | "github.com/aws/aws-sdk-go/aws/session" 25 | "github.com/aws/aws-sdk-go/service/eventbridge" 26 | "github.com/aws/aws-sdk-go/service/sqs" 27 | 28 | sourcesv1alpha1 "github.com/triggermesh/triggermesh/pkg/apis/sources/v1alpha1" 29 | ) 30 | 31 | func EBClient(src *sourcesv1alpha1.AWSEventBridgeSource, secrets map[string]string) (*eventbridge.EventBridge, *sqs.SQS, error) { 32 | accessKey, secretKey, err := readSecret(secrets) 33 | if err != nil { 34 | return nil, nil, fmt.Errorf("secrets read: %w", err) 35 | } 36 | creds := &credentials.Value{ 37 | AccessKeyID: accessKey, 38 | SecretAccessKey: secretKey, 39 | } 40 | 41 | sess := session.Must(session.NewSession(awscore.NewConfig(). 42 | WithRegion(src.Spec.ARN.Region). 43 | WithCredentials(credentials.NewStaticCredentialsFromCreds(*creds)), 44 | )) 45 | 46 | return eventbridge.New(sess), sqs.New(sess), nil 47 | } 48 | -------------------------------------------------------------------------------- /pkg/triggermesh/adapter/reconciler/external/azure/activitylogs.go: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2022 TriggerMesh Inc. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | 17 | package azure 18 | 19 | import ( 20 | "errors" 21 | "net/http" 22 | "time" 23 | 24 | "github.com/Azure/azure-sdk-for-go/profiles/2020-09-01/monitor/mgmt/insights" 25 | "github.com/Azure/go-autorest/autorest" 26 | 27 | "github.com/triggermesh/triggermesh/pkg/apis/sources/v1alpha1" 28 | ) 29 | 30 | const ActivityLogsCrudTimeout = time.Second * 15 31 | 32 | func ActivityLogsDiagsName(src *v1alpha1.AzureActivityLogsSource) string { 33 | // hardcoded value from the upstream 34 | return "io.triggermesh.azureactivitylogssource." + src.Namespace + "." + src.Name 35 | } 36 | 37 | func IsNotFoundErr(err error) bool { 38 | if dErr := (autorest.DetailedError{}); errors.As(err, &dErr) { 39 | return dErr.StatusCode == http.StatusNotFound 40 | } 41 | return false 42 | } 43 | 44 | func ActivityLogsClient(src *v1alpha1.AzureActivityLogsSource, authorizer autorest.Authorizer) (insights.EventCategoriesClient, insights.DiagnosticSettingsClient, error) { 45 | eventCatCli := insights.NewEventCategoriesClient(src.Spec.SubscriptionID) 46 | eventCatCli.Authorizer = authorizer 47 | 48 | diagSettingsCli := insights.NewDiagnosticSettingsClient(src.Spec.SubscriptionID) 49 | diagSettingsCli.Authorizer = authorizer 50 | return eventCatCli, diagSettingsCli, nil 51 | } 52 | -------------------------------------------------------------------------------- /pkg/triggermesh/adapter/reconciler/external/azure/auth.go: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2022 TriggerMesh Inc. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | 17 | package azure 18 | 19 | import ( 20 | "fmt" 21 | 22 | "github.com/Azure/go-autorest/autorest" 23 | "github.com/Azure/go-autorest/autorest/azure" 24 | autorestauth "github.com/Azure/go-autorest/autorest/azure/auth" 25 | ) 26 | 27 | func Client(secrets map[string]string) (autorest.Authorizer, error) { 28 | tenantID, exists := secrets["tenantID"] 29 | if !exists { 30 | return nil, fmt.Errorf("\"tenantID\" spec value is missing") 31 | } 32 | clientID, exists := secrets["clientID"] 33 | if !exists { 34 | return nil, fmt.Errorf("\"clientID\" spec value is missing") 35 | } 36 | clientSecret, exists := secrets["clientSecret"] 37 | if !exists { 38 | return nil, fmt.Errorf("\"clientSecret\" spec value is missing") 39 | } 40 | azureEnv := &azure.PublicCloud 41 | authSettings := autorestauth.EnvironmentSettings{ 42 | Values: map[string]string{ 43 | autorestauth.TenantID: tenantID, 44 | autorestauth.ClientID: clientID, 45 | autorestauth.ClientSecret: clientSecret, 46 | autorestauth.Resource: azureEnv.ResourceManagerEndpoint, 47 | }, 48 | Environment: *azureEnv, 49 | } 50 | return authSettings.GetAuthorizer() 51 | } 52 | -------------------------------------------------------------------------------- /pkg/triggermesh/adapter/reconciler/external/azure/blobstorage.go: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2022 TriggerMesh Inc. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | 17 | package azure 18 | 19 | import ( 20 | "github.com/Azure/azure-sdk-for-go/profiles/latest/eventgrid/mgmt/eventgrid" 21 | "github.com/Azure/azure-sdk-for-go/profiles/latest/eventhub/mgmt/eventhub" 22 | "github.com/Azure/go-autorest/autorest" 23 | 24 | "github.com/triggermesh/triggermesh/pkg/apis/sources/v1alpha1" 25 | "github.com/triggermesh/triggermesh/pkg/sources/client/azure/storage" 26 | ) 27 | 28 | func BlobStorage(src *v1alpha1.AzureBlobStorageSource, authorizer autorest.Authorizer) (storage.EventSubscriptionsClient, storage.EventHubsClient) { 29 | eventSubsCli := eventgrid.NewEventSubscriptionsClient(src.Spec.StorageAccountID.SubscriptionID) 30 | eventSubsCli.Authorizer = authorizer 31 | eventHubsCli := eventhub.NewEventHubsClient(src.Spec.StorageAccountID.SubscriptionID) 32 | eventHubsCli.Authorizer = authorizer 33 | return eventSubsCli, eventHubsCli 34 | } 35 | -------------------------------------------------------------------------------- /pkg/triggermesh/adapter/reconciler/external/azure/eventgrid.go: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2022 TriggerMesh Inc. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | 17 | package azure 18 | 19 | import ( 20 | azureeventgrid "github.com/Azure/azure-sdk-for-go/profiles/latest/eventgrid/mgmt/eventgrid" 21 | "github.com/Azure/azure-sdk-for-go/profiles/latest/eventhub/mgmt/eventhub" 22 | "github.com/Azure/azure-sdk-for-go/profiles/latest/resources/mgmt/resources" 23 | "github.com/Azure/go-autorest/autorest" 24 | 25 | "github.com/triggermesh/triggermesh/pkg/apis/sources/v1alpha1" 26 | "github.com/triggermesh/triggermesh/pkg/sources/client/azure/eventgrid" 27 | ) 28 | 29 | func EventGridClient(src *v1alpha1.AzureEventGridSource, authorizer autorest.Authorizer) ( 30 | eventgrid.SystemTopicsClient, eventgrid.ProvidersClient, eventgrid.ResourceGroupsClient, eventgrid.EventSubscriptionsClient, eventgrid.EventHubsClient) { 31 | sysTopicsCli := &eventgrid.SystemTopicsClientImpl{ 32 | SystemTopicsClient: azureeventgrid.NewSystemTopicsClient(src.Spec.Scope.SubscriptionID), 33 | } 34 | sysTopicsCli.Authorizer = authorizer 35 | 36 | providersCli := resources.NewProvidersClient(src.Spec.Scope.SubscriptionID) 37 | providersCli.Authorizer = authorizer 38 | 39 | resGroupsCli := resources.NewGroupsClient(src.Spec.Scope.SubscriptionID) 40 | resGroupsCli.Authorizer = authorizer 41 | 42 | eventSubsCli := &eventgrid.EventSubscriptionsClientImpl{ 43 | SystemTopicEventSubscriptionsClient: azureeventgrid.NewSystemTopicEventSubscriptionsClient(src.Spec.Scope.SubscriptionID), 44 | } 45 | eventSubsCli.Authorizer = authorizer 46 | 47 | eventHubsCli := eventhub.NewEventHubsClient(src.Spec.Scope.SubscriptionID) 48 | eventHubsCli.Authorizer = authorizer 49 | return sysTopicsCli, providersCli, resGroupsCli, eventSubsCli, eventHubsCli 50 | } 51 | -------------------------------------------------------------------------------- /pkg/triggermesh/adapter/reconciler/external/azure/servicebustopic.go: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2022 TriggerMesh Inc. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | 17 | package azure 18 | 19 | import ( 20 | "github.com/Azure/azure-sdk-for-go/profiles/latest/servicebus/mgmt/servicebus" 21 | "github.com/Azure/go-autorest/autorest" 22 | 23 | "github.com/triggermesh/triggermesh/pkg/apis/sources/v1alpha1" 24 | "github.com/triggermesh/triggermesh/pkg/sources/client/azure/servicebustopics" 25 | ) 26 | 27 | func ServiceBus(src *v1alpha1.AzureServiceBusTopicSource, authorizer autorest.Authorizer) servicebustopics.SubscriptionsClient { 28 | subsCli := servicebus.NewSubscriptionsClient(src.Spec.TopicID.SubscriptionID) 29 | subsCli.Authorizer = authorizer 30 | return subsCli 31 | } 32 | -------------------------------------------------------------------------------- /pkg/triggermesh/adapter/reconciler/external/gcp/auditlogssource.go: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2022 TriggerMesh Inc. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | 17 | package gcp 18 | 19 | import ( 20 | "context" 21 | "fmt" 22 | 23 | "cloud.google.com/go/logging/logadmin" 24 | "cloud.google.com/go/pubsub" 25 | 26 | sourcesv1alpha1 "github.com/triggermesh/triggermesh/pkg/apis/sources/v1alpha1" 27 | ) 28 | 29 | func AuditLogsClient(ctx context.Context, src *sourcesv1alpha1.GoogleCloudAuditLogsSource, secrets map[string]string) (*pubsub.Client, *logadmin.Client, error) { 30 | psCli, credsCliOpt, err := pubSubClient(ctx, src.Spec.PubSub, secrets) 31 | if err != nil { 32 | return nil, nil, err 33 | } 34 | 35 | var pubsubProject string 36 | if project := src.Spec.PubSub.Project; project != nil { 37 | pubsubProject = *project 38 | } else if topic := src.Spec.PubSub.Topic; topic != nil { 39 | pubsubProject = topic.Project 40 | } 41 | 42 | laCli, err := logadmin.NewClient(ctx, pubsubProject, credsCliOpt) 43 | if err != nil { 44 | return nil, nil, fmt.Errorf("creating Google Cloud Log Admin API client: %w", err) 45 | } 46 | 47 | return psCli, laCli, nil 48 | } 49 | -------------------------------------------------------------------------------- /pkg/triggermesh/adapter/reconciler/external/gcp/billingsource.go: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2022 TriggerMesh Inc. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | 17 | package gcp 18 | 19 | import ( 20 | "context" 21 | "fmt" 22 | 23 | billing "cloud.google.com/go/billing/budgets/apiv1" 24 | "cloud.google.com/go/pubsub" 25 | 26 | sourcesv1alpha1 "github.com/triggermesh/triggermesh/pkg/apis/sources/v1alpha1" 27 | ) 28 | 29 | func CloudBillingClient(src *sourcesv1alpha1.GoogleCloudBillingSource, secrets map[string]string) (*pubsub.Client, *billing.BudgetClient, error) { 30 | ctx := context.Background() 31 | psClient, credsClientOptions, err := pubSubClient(ctx, src.Spec.PubSub, secrets) 32 | if err != nil { 33 | return nil, nil, err 34 | } 35 | biClient, err := billing.NewBudgetClient(ctx, credsClientOptions) 36 | if err != nil { 37 | return nil, nil, fmt.Errorf("creating Google Cloud Billing Budget API client: %w", err) 38 | } 39 | return psClient, biClient, nil 40 | } 41 | -------------------------------------------------------------------------------- /pkg/triggermesh/adapter/reconciler/external/gcp/common.go: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2022 TriggerMesh Inc. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | 17 | package gcp 18 | 19 | import ( 20 | "context" 21 | "fmt" 22 | 23 | "cloud.google.com/go/pubsub" 24 | "google.golang.org/api/option" 25 | 26 | sourcesv1alpha1 "github.com/triggermesh/triggermesh/pkg/apis/sources/v1alpha1" 27 | ) 28 | 29 | func pubSubClient(ctx context.Context, spec sourcesv1alpha1.GoogleCloudSourcePubSubSpec, secrets map[string]string) (*pubsub.Client, option.ClientOption, error) { 30 | saKey, exists := secrets["serviceAccountKey"] 31 | if !exists { 32 | return nil, nil, fmt.Errorf("\"serviceAccountKey\" is missing") 33 | } 34 | credsCliOpt := option.WithCredentialsJSON([]byte(saKey)) 35 | 36 | var pubsubProject string 37 | if project := spec.Project; project != nil { 38 | pubsubProject = *project 39 | } else if topic := spec.Topic; topic != nil { 40 | pubsubProject = topic.Project 41 | } 42 | psCli, err := pubsub.NewClient(ctx, pubsubProject, credsCliOpt) 43 | if err != nil { 44 | return nil, nil, fmt.Errorf("creating Google Cloud Pub/Sub API client: %w", err) 45 | } 46 | return psCli, credsCliOpt, nil 47 | } 48 | -------------------------------------------------------------------------------- /pkg/triggermesh/adapter/reconciler/external/gcp/pubsubsource.go: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2022 TriggerMesh Inc. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | 17 | package gcp 18 | 19 | import ( 20 | "context" 21 | "fmt" 22 | 23 | "cloud.google.com/go/pubsub" 24 | "google.golang.org/api/option" 25 | 26 | sourcesv1alpha1 "github.com/triggermesh/triggermesh/pkg/apis/sources/v1alpha1" 27 | ) 28 | 29 | func PubSubClient(src *sourcesv1alpha1.GoogleCloudPubSubSource, secrets map[string]string) (*pubsub.Client, error) { 30 | saKey, exists := secrets["serviceAccountKey"] 31 | if !exists { 32 | return nil, fmt.Errorf("\"serviceAccountKey\" is missing") 33 | } 34 | return pubsub.NewClient(context.Background(), src.Spec.Topic.Project, option.WithCredentialsJSON([]byte(saKey))) 35 | } 36 | -------------------------------------------------------------------------------- /pkg/triggermesh/adapter/reconciler/external/gcp/sourcerepositories.go: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2022 TriggerMesh Inc. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | 17 | package gcp 18 | 19 | import ( 20 | "context" 21 | "fmt" 22 | 23 | "cloud.google.com/go/pubsub" 24 | "google.golang.org/api/sourcerepo/v1" 25 | 26 | sourcesv1alpha1 "github.com/triggermesh/triggermesh/pkg/apis/sources/v1alpha1" 27 | ) 28 | 29 | func SourceRepoClient(ctx context.Context, src *sourcesv1alpha1.GoogleCloudSourceRepositoriesSource, secrets map[string]string) (*pubsub.Client, *sourcerepo.Service, error) { 30 | psCli, credsCliOpt, err := pubSubClient(ctx, src.Spec.PubSub, secrets) 31 | if err != nil { 32 | return nil, nil, err 33 | } 34 | stCli, err := sourcerepo.NewService(ctx, credsCliOpt) 35 | if err != nil { 36 | return nil, nil, fmt.Errorf("creating Google Cloud Source Repositories API client: %w", err) 37 | } 38 | return psCli, stCli, nil 39 | } 40 | -------------------------------------------------------------------------------- /pkg/triggermesh/adapter/reconciler/external/gcp/storagesource.go: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2022 TriggerMesh Inc. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | 17 | package gcp 18 | 19 | import ( 20 | "context" 21 | "fmt" 22 | 23 | "cloud.google.com/go/pubsub" 24 | "cloud.google.com/go/storage" 25 | 26 | sourcesv1alpha1 "github.com/triggermesh/triggermesh/pkg/apis/sources/v1alpha1" 27 | ) 28 | 29 | func StorageClient(ctx context.Context, src *sourcesv1alpha1.GoogleCloudStorageSource, secrets map[string]string) (*pubsub.Client, *storage.Client, error) { 30 | psCli, credsCliOpt, err := pubSubClient(ctx, src.Spec.PubSub, secrets) 31 | if err != nil { 32 | return nil, nil, err 33 | } 34 | stCli, err := storage.NewClient(ctx, credsCliOpt) 35 | if err != nil { 36 | return nil, nil, fmt.Errorf("creating Google Cloud Storage API client: %w", err) 37 | } 38 | return psCli, stCli, nil 39 | } 40 | -------------------------------------------------------------------------------- /pkg/triggermesh/components/secret/secret.go: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2022 TriggerMesh Inc. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | 17 | package secret 18 | 19 | import ( 20 | "github.com/triggermesh/tmctl/pkg/kubernetes" 21 | "github.com/triggermesh/tmctl/pkg/triggermesh" 22 | ) 23 | 24 | var _ triggermesh.Component = (*Secret)(nil) 25 | 26 | type Secret struct { 27 | Name string 28 | Context string 29 | 30 | data map[string]string 31 | } 32 | 33 | func (s *Secret) AsK8sObject() (kubernetes.Object, error) { 34 | return kubernetes.Object{ 35 | APIVersion: "v1", 36 | Kind: s.GetKind(), 37 | Metadata: kubernetes.Metadata{ 38 | Name: s.Name, 39 | Namespace: triggermesh.Namespace, 40 | Labels: map[string]string{ 41 | "triggermesh.io/context": s.Context, 42 | }, 43 | }, 44 | Type: "Opaque", 45 | Data: s.data, 46 | }, nil 47 | } 48 | 49 | func (s *Secret) GetName() string { 50 | return s.Name 51 | } 52 | 53 | func (s *Secret) GetKind() string { 54 | return "Secret" 55 | } 56 | 57 | func (s *Secret) GetAPIVersion() string { 58 | return "v1" 59 | } 60 | 61 | func (s *Secret) GetSpec() map[string]interface{} { 62 | spec := make(map[string]interface{}, len(s.data)) 63 | for k, v := range s.data { 64 | spec[k] = v 65 | } 66 | return spec 67 | } 68 | 69 | func (s *Secret) SetSpec(data map[string]interface{}) { 70 | for k, v := range data { 71 | s.data[k] = v.(string) 72 | } 73 | } 74 | 75 | func New(name, context string, data map[string]string) triggermesh.Component { 76 | return &Secret{ 77 | Name: name, 78 | Context: context, 79 | 80 | data: data, 81 | } 82 | } 83 | -------------------------------------------------------------------------------- /pkg/triggermesh/constants.go: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2022 TriggerMesh Inc. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | 17 | package triggermesh 18 | 19 | // TriggerMesh constant values used as default paths, configs, etc. 20 | const ( 21 | Namespace = "local" 22 | ManifestFile = "manifest.yaml" 23 | BrokerConfigFile = "broker.conf" 24 | 25 | UserInputTag = "" 26 | 27 | // objects meta 28 | ContextLabel = "triggermesh.io/context" 29 | ExternalResourcesAnnotation = "triggermesh.io/external-resources" 30 | ) 31 | -------------------------------------------------------------------------------- /pkg/triggermesh/crd/secret.go: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2022 TriggerMesh Inc. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | 17 | package crd 18 | 19 | import ( 20 | "encoding/base64" 21 | "fmt" 22 | "strings" 23 | 24 | "k8s.io/kube-openapi/pkg/validation/spec" 25 | ) 26 | 27 | // secret objects in TriggerMesh are named 28 | // secretKeyRef or valueFromSecret 29 | 30 | func isSecretRef(s spec.Schema) (string, bool) { 31 | for k := range s.Properties { 32 | if k == "valueFromSecret" || k == "secretKeyRef" { 33 | return k, true 34 | } 35 | } 36 | return "", false 37 | } 38 | 39 | func ExtractSecrets(componentName string, schema Schema, spec map[string]interface{}) (map[string]string, error) { 40 | result := make(map[string]string) 41 | for k, v := range spec { 42 | if nestedSchema, ok := schema.schema.Properties[k]; ok { 43 | if key, ok := isSecretRef(nestedSchema); ok { 44 | if secretValue, ok := v.(string); ok { 45 | result[k] = base64.StdEncoding.EncodeToString([]byte(secretValue)) 46 | } else { 47 | return nil, fmt.Errorf("%q is expected to contain secret string, got %T", k, v) 48 | } 49 | spec[k] = map[string]interface{}{ 50 | key: map[string]interface{}{ 51 | "name": strings.ToLower(componentName) + "-secret", 52 | "key": k, 53 | }, 54 | } 55 | } 56 | if nestedSpec, ok := v.(map[string]interface{}); ok { 57 | nestedSecrets, err := ExtractSecrets(componentName, Schema{nestedSchema}, nestedSpec) 58 | if err != nil { 59 | return nil, err 60 | } 61 | for nestedKey, nestedValue := range nestedSecrets { 62 | result[nestedKey] = nestedValue 63 | } 64 | } 65 | } 66 | } 67 | return result, nil 68 | } 69 | -------------------------------------------------------------------------------- /pkg/triggermesh/pkg/pkg.go: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2022 TriggerMesh Inc. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | 17 | package pkg 18 | 19 | import ( 20 | "fmt" 21 | "net" 22 | "strings" 23 | 24 | corev1 "k8s.io/api/core/v1" 25 | ) 26 | 27 | func ParseArgs(args map[string]string) map[string]interface{} { 28 | result := make(map[string]interface{}, len(args)) 29 | for key, value := range args { 30 | keys := strings.Split(key, ".") 31 | if len(keys) == 1 { 32 | result[key] = value 33 | continue 34 | } 35 | result = mergeMaps(result, nestedMap(keys, value)) 36 | } 37 | return result 38 | } 39 | 40 | func nestedMap(key []string, value string) map[string]interface{} { 41 | if len(key) == 1 { 42 | return map[string]interface{}{key[0]: value} 43 | } 44 | return map[string]interface{}{key[0]: nestedMap(key[1:], value)} 45 | } 46 | 47 | func mergeMaps(src, dst map[string]interface{}) map[string]interface{} { 48 | for srcK, srcV := range src { 49 | if _, exists := dst[srcK]; exists { 50 | if _, ok := srcV.(map[string]interface{}); ok { 51 | if _, ok := dst[srcK].(map[string]interface{}); ok { 52 | dst[srcK] = mergeMaps(srcV.(map[string]interface{}), dst[srcK].(map[string]interface{})) 53 | } else { 54 | continue 55 | } 56 | } else { 57 | dst[srcK] = srcV 58 | } 59 | } else { 60 | dst[srcK] = srcV 61 | } 62 | } 63 | return dst 64 | } 65 | 66 | func EnvsToString(envs []corev1.EnvVar) []string { 67 | result := []string{} 68 | for _, env := range envs { 69 | result = append(result, fmt.Sprintf("%s=%s", env.Name, env.Value)) 70 | } 71 | return result 72 | } 73 | 74 | func OpenPort() int { 75 | listener, err := net.Listen("tcp", ":0") 76 | if err != nil { 77 | panic(err) 78 | } 79 | listener.Close() 80 | return listener.Addr().(*net.TCPAddr).Port 81 | } 82 | -------------------------------------------------------------------------------- /test/fixtures/broker.conf: -------------------------------------------------------------------------------- 1 | triggers: 2 | foo-trigger-6ada801c: 3 | filters: 4 | - all: [] 5 | any: [] 6 | not: null 7 | exact: 8 | type: com.amazon.s3.objectcreated 9 | prefix: {} 10 | suffix: {} 11 | target: 12 | url: http://host.docker.internal:59944 13 | component: foo-transformation 14 | foo-trigger-9dad7875: 15 | filters: 16 | - all: [] 17 | any: [] 18 | not: null 19 | exact: 20 | type: foo-transformation.output 21 | prefix: {} 22 | suffix: {} 23 | target: 24 | url: http://host.docker.internal:59852 25 | component: sockeye 26 | -------------------------------------------------------------------------------- /test/test.go: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2022 TriggerMesh Inc. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | 17 | package test 18 | 19 | import ( 20 | "os" 21 | "path" 22 | "runtime" 23 | 24 | "github.com/triggermesh/tmctl/pkg/triggermesh/crd" 25 | ) 26 | 27 | func Manifest() string { 28 | _, filename, _, _ := runtime.Caller(0) 29 | return path.Dir(filename) + "/fixtures/manifest.yaml" 30 | } 31 | 32 | func CRD() map[string]crd.CRD { 33 | _, filename, _, _ := runtime.Caller(0) 34 | reader, err := os.Open(path.Dir(filename) + "/fixtures/crd.yaml") 35 | if err != nil { 36 | panic(err) 37 | } 38 | crds, err := crd.Parse(reader) 39 | if err != nil { 40 | panic(err) 41 | } 42 | return crds 43 | } 44 | 45 | func ConfigBase() string { 46 | _, filename, _, _ := runtime.Caller(0) 47 | return path.Dir(filename) + "/fixtures" 48 | } 49 | --------------------------------------------------------------------------------