From 19b84a3a264ef5419cd249ef92fbd456693e0134 Mon Sep 17 00:00:00 2001 From: MUzairS15 Date: Wed, 25 Sep 2024 22:36:52 +0530 Subject: [PATCH] inital layout Signed-off-by: MUzairS15 --- .goreleaser.yml | 2 +- Makefile | 453 --------------------------------- build/Makefile | 47 ++++ build/Makefile.core.mk | 1 + build/component_info.json | 5 + cmd/helm-kanvas-plugin/main.go | 1 + go.mod | 12 + go.sum | 23 ++ internal/errors/error.go | 3 + internal/log/logger.go | 4 + 10 files changed, 97 insertions(+), 454 deletions(-) delete mode 100644 Makefile create mode 100644 build/Makefile create mode 100644 build/Makefile.core.mk create mode 100644 build/component_info.json create mode 100644 cmd/helm-kanvas-plugin/main.go create mode 100644 go.mod create mode 100644 go.sum create mode 100644 internal/errors/error.go create mode 100644 internal/log/logger.go diff --git a/.goreleaser.yml b/.goreleaser.yml index 097329bccac..a09874dade3 100644 --- a/.goreleaser.yml +++ b/.goreleaser.yml @@ -1,7 +1,7 @@ # This is an example goreleaser.yaml file with some sane defaults. # Make sure to check the documentation at http://goreleaser.com -project_name: mesheryctl +project_name: kanvas-snapshot before: hooks: diff --git a/Makefile b/Makefile deleted file mode 100644 index a2fe516076c..00000000000 --- a/Makefile +++ /dev/null @@ -1,453 +0,0 @@ -# Copyright Meshery Authors -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -include install/Makefile.core.mk -include install/Makefile.show-help.mk - -#----------------------------------------------------------------------------- -# Docker-based Builds -#----------------------------------------------------------------------------- -.PHONY: docker-build docker-local-cloud docker-cloud docker-playground-build docker-testing-env-build docker-testing-env - -## Build Meshery Server and UI container. -docker-build: - # `make docker-build` builds Meshery inside of a multi-stage Docker container. - # This method does NOT require that you have Go, NPM, etc. installed locally. - DOCKER_BUILDKIT=1 docker build -f install/docker/Dockerfile -t layer5/meshery --build-arg TOKEN=$(GLOBAL_TOKEN) --build-arg GIT_COMMITSHA=$(GIT_COMMITSHA) --build-arg GIT_VERSION=$(GIT_VERSION) --build-arg RELEASE_CHANNEL=${RELEASE_CHANNEL} . - -## Build Meshery Server and UI container in Playground mode. -docker-playground-build: - # `make docker-playground-build` builds Meshery inside of a multi-stage Docker container. - # This method does NOT require that you have Go, NPM, etc. installed locally. - DOCKER_BUILDKIT=1 docker build -f install/docker/Dockerfile -t layer5/meshery --build-arg TOKEN=$(GLOBAL_TOKEN) --build-arg GIT_COMMITSHA=$(GIT_COMMITSHA) --build-arg GIT_VERSION=$(GIT_VERSION) --build-arg RELEASE_CHANNEL=${RELEASE_CHANNEL} --build-arg PROVIDER=$(LOCAL_PROVIDER) --build-arg PROVIDER_BASE_URLS=$(MESHERY_CLOUD_PROD) --build-arg PLAYGROUND=true . - -## Build Meshery Server and UI container for e2e testing. -docker-testing-env-build: - # `make docker-build` builds Meshery inside of a multi-stage Docker container. - # This method does NOT require that you have Go, NPM, etc. installed locally. - DOCKER_BUILDKIT=1 docker build -f install/docker/testing/Dockerfile -t layer5/meshery-testing-env --build-arg GIT_VERSION=$(GIT_VERSION) . - -## Meshery Cloud for user authentication. -## Runs Meshery in a container locally and points to locally-running -docker-local-cloud: - (docker rm -f meshery) || true - docker run --name meshery -d \ - --link meshery-cloud:meshery-cloud \ - -e PROVIDER_BASE_URLS=$(REMOTE_PROVIDER_LOCAL) \ - -e DEBUG=true \ - -e ADAPTER_URLS=$(ADAPTER_URLS) \ - -e KEYS_PATH=$(KEYS_PATH) \ - -p 9081:8080 \ - layer5/meshery ./meshery - -## Runs Meshery in a container locally and points to remote -## Remote Provider for user authentication. -docker-cloud: - (docker rm -f meshery) || true - docker run --name meshery -d \ - -e PROVIDER_BASE_URLS=$(MESHERY_CLOUD_PROD) \ - -e DEBUG=true \ - -e ADAPTER_URLS=$(ADAPTER_URLS) \ - -e KEYS_PATH=$(KEYS_PATH) \ - -v meshery-config:/home/appuser/.meshery/config \ - -v $(HOME)/.kube:/home/appuser/.kube:ro \ - -p 9081:8080 \ - layer5/meshery ./meshery - -## Runs Meshery in a container locally and points to remote -## Remote Provider for user authentication. -docker-testing-env: - docker run --rm --name mesherytesting -d \ - -e PROVIDER_BASE_URLS=$(MESHERY_CLOUD_PROD) \ - -e DEBUG=true \ - -e ADAPTER_URLS=$(ADAPTER_URLS) \ - -e KEYS_PATH=$(KEYS_PATH) \ - -v meshery-config:/home/appuser/.meshery/config \ - -v $(HOME)/.kube:/home/appuser/.kube:ro \ - -p 9081:8080 \ - layer5/meshery-testing-env ./meshery - -#----------------------------------------------------------------------------- -# Meshery Server Native Builds -#----------------------------------------------------------------------------- -.PHONY: server wrk2-setup nighthawk-setup server-local server-skip-compgen server-no-content golangci proto-build error build-server server-binary -## Setup wrk2 for local development. -wrk2-setup: - echo "setup-wrk does not work on Mac Catalina at the moment" - cd server; cd cmd; git clone https://github.com/layer5io/wrk2.git; cd wrk2; make; cd .. - -## Setup nighthawk for local development. -nighthawk-setup: dep-check - cd server; cd cmd; git clone https://github.com/layer5io/nighthawk-go.git; cd nighthawk-go; make setup; cd .. - -run-local: server-local error - -## Build and run Meshery Server on your local machine -## and point to (expect) a locally running Remote Provider -## for user authentication. -server-local: dep-check - cd server; cd cmd; go clean; go mod tidy; \ - BUILD="$(GIT_VERSION)" \ - PROVIDER_BASE_URLS=$(REMOTE_PROVIDER_LOCAL) \ - PORT=9081 \ - DEBUG=true \ - ADAPTER_URLS=$(ADAPTER_URLS) \ - APP_PATH=$(APPLICATIONCONFIGPATH) \ - KEYS_PATH=$(KEYS_PATH) \ - go run main.go error.go - -## Build Meshery Server on your local machine. -build-server: dep-check - cd server; cd cmd; go mod tidy; cd "../.." - BUILD="$(GIT_VERSION)" \ - PROVIDER_BASE_URLS=$(MESHERY_CLOUD_PROD) \ - PORT=9081 \ - DEBUG=true \ - ADAPTER_URLS=$(ADAPTER_URLS) \ - APP_PATH=$(APPLICATIONCONFIGPATH) \ - KEYS_PATH=$(KEYS_PATH) \ - GOPROXY=https://proxy.golang.org,direct GO111MODULE=on go build ./server/cmd/main.go ./server/cmd/error.go - chmod +x ./main - -## Running the meshery server using binary. -server-binary: - cd server/cmd; BUILD="$(GIT_VERSION)" PROVIDER_BASE_URLS=$(MESHERY_CLOUD_STAGING) ../../main; cd ../../ - -## Build and run Meshery Server on your local machine -## and point to Remote Provider in staging environment -server-stg: dep-check - cd server; cd cmd; go mod tidy; \ - BUILD="$(GIT_VERSION)" \ - PROVIDER_BASE_URLS=$(MESHERY_CLOUD_STAGING) \ - PORT=9081 \ - DEBUG=true \ - ADAPTER_URLS=$(ADAPTER_URLS) \ - APP_PATH=$(APPLICATIONCONFIGPATH) \ - KEYS_PATH=$(KEYS_PATH) \ - go run main.go error.go; - -## Build and run Meshery Server on your local machine. -server: dep-check - cd server; cd cmd; go mod tidy; \ - BUILD="$(GIT_VERSION)" \ - PROVIDER_BASE_URLS=$(MESHERY_CLOUD_PROD) \ - PORT=9081 \ - DEBUG=true \ - APP_PATH=$(APPLICATIONCONFIGPATH) \ - KEYS_PATH=$(KEYS_PATH) \ - go run main.go error.go; - -## Build and run Meshery Server with some Meshery Adapters on your local machine. -server-with-adapters: dep-check - cd server; cd cmd; go mod tidy; \ - BUILD="$(GIT_VERSION)" \ - PROVIDER_BASE_URLS=$(MESHERY_CLOUD_PROD) \ - PORT=9081 \ - DEBUG=true \ - ADAPTER_URLS=$(ADAPTER_URLS) \ - APP_PATH=$(APPLICATIONCONFIGPATH) \ - KEYS_PATH=$(KEYS_PATH) \ - go run main.go error.go; - -## Build and run Meshery Server on your local machine. -## Disable deployment of the Meshery Operator to your Kubernetes cluster(s). -server-without-operator: dep-check - cd server; cd cmd; go mod tidy; \ - BUILD="$(GIT_VERSION)" \ - PROVIDER_BASE_URLS=$(MESHERY_CLOUD_PROD) \ - PORT=9081 \ - DISABLE_OPERATOR=true \ - DEBUG=true \ - ADAPTER_URLS=$(ADAPTER_URLS) \ - APP_PATH=$(APPLICATIONCONFIGPATH) \ - KEYS_PATH=$(KEYS_PATH) \ - go run main.go error.go; - -## Build and run Meshery Server with no Kubernetes components on your local machine. -server-skip-compgen: - cd server; cd cmd; go mod tidy; \ - BUILD="$(GIT_VERSION)" \ - PROVIDER_BASE_URLS=$(MESHERY_CLOUD_PROD) \ - PORT=9081 \ - DEBUG=true \ - ADAPTER_URLS=$(ADAPTER_URLS) \ - APP_PATH=$(APPLICATIONCONFIGPATH) \ - SKIP_COMP_GEN=true \ - KEYS_PATH=$(KEYS_PATH) \ - go run main.go error.go; - -## Build and run Meshery Server on your local machine. -## Do not generate and register Kubernetes models. -server-without-k8s: dep-check - cd server; cd cmd; go mod tidy; \ - BUILD="$(GIT_VERSION)" \ - REGISTER_STATIC_K8S=false \ - PROVIDER_BASE_URLS=$(MESHERY_CLOUD_PROD) \ - PORT=9081 \ - DEBUG=true \ - ADAPTER_URLS=$(ADAPTER_URLS) \ - APP_PATH=$(APPLICATIONCONFIGPATH) \ - KEYS_PATH=$(KEYS_PATH) \ - go run main.go error.go; - -server-remote-provider: dep-check - cd server; cd cmd; go mod tidy; \ - BUILD="$(GIT_VERSION)" \ - PROVIDER=$(REMOTE_PROVIDER) \ - PROVIDER_BASE_URLS=$(MESHERY_CLOUD_PROD) \ - PORT=9081 \ - DEBUG=true \ - ADAPTER_URLS=$(ADAPTER_URLS) \ - APP_PATH=$(APPLICATIONCONFIGPATH) \ - KEYS_PATH=$(KEYS_PATH) \ - go run main.go error.go; - -server-local-provider: dep-check - cd server; cd cmd; go mod tidy; \ - BUILD="$(GIT_VERSION)" \ - PROVIDER=$(LOCAL_PROVIDER) \ - PROVIDER_BASE_URLS=$(MESHERY_CLOUD_DEV) \ - PORT=9081 \ - DEBUG=true \ - ADAPTER_URLS=$(ADAPTER_URLS) \ - APP_PATH=$(APPLICATIONCONFIGPATH) \ - KEYS_PATH=$(KEYS_PATH) \ - go run main.go error.go; - -## Build and run Meshery Server with no seed content. -server-no-content: - cd server; cd cmd; go mod tidy; \ - BUILD="$(GIT_VERSION)" \ - PROVIDER_BASE_URLS=$(MESHERY_CLOUD_PROD) \ - PORT=9081 \ - DEBUG=true \ - ADAPTER_URLS=$(ADAPTER_URLS) \ - APP_PATH=$(APPLICATIONCONFIGPATH) \ - SKIP_DOWNLOAD_CONTENT=true \ - KEYS_PATH=$(KEYS_PATH) \ - go run main.go error.go; - -server-playground: dep-check - cd server; cd cmd; go mod tidy; \ - BUILD="$(GIT_VERSION)" \ - PROVIDER=$(REMOTE_PROVIDER) \ - PROVIDER_BASE_URLS=$(MESHERY_CLOUD_PROD) \ - PORT=9081 \ - DEBUG=true \ - ADAPTER_URLS=$(ADAPTER_URLS) \ - APP_PATH=$(APPLICATIONCONFIGPATH) \ - PLAYGROUND=true \ - KEYS_PATH=$(KEYS_PATH) \ - go run main.go error.go; - -## Lint check Meshery Server. -golangci: error dep-check - golangci-lint run - -## Build Meshery's protobufs. -proto-build: - # see https://developers.google.com/protocol-buffers/docs/reference/go-generated - # see https://grpc.io/docs/languages/go/quickstart/ - export PATH=$(PATH):$(GOBIN) - go install google.golang.org/protobuf/cmd/protoc-gen-go@latest - go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@latest - protoc --proto_path=server/meshes --go_out=server/meshes --go_opt=paths=source_relative --go-grpc_out=server/meshes --go-grpc_opt=paths=source_relative meshops.proto - -## Analyze error codes -error: dep-check - go run github.com/layer5io/meshkit/cmd/errorutil -d . analyze -i ./server/helpers -o ./server/helpers --skip-dirs mesheryctl - -## Runs meshkit error utility to update error codes for meshery server only. -error-util: - go run github.com/layer5io/meshkit/cmd/errorutil -d . --skip-dirs mesheryctl update -i ./server/helpers/ -o ./server/helpers - -## Build Meshery UI; Build and run Meshery Server on your local machine. -ui-server: ui-meshery-build ui-provider-build server - -#----------------------------------------------------------------------------- -# Meshery UI Native Builds. -#----------------------------------------------------------------------------- -.PHONY: ui-setup ui ui-meshery-build ui-provider ui-lint ui-provider ui-meshery ui-build ui-provider-build ui-provider-test - -UI_BUILD_SCRIPT = build16 -UI_DEV_SCRIPT = dev16 - -ifeq ($(findstring v19, $(shell node --version)), v19) - UI_BUILD_SCRIPT = build - UI_DEV_SCRIPT = dev -else ifeq ($(findstring v18, $(shell node --version)), v18) - UI_BUILD_SCRIPT = build - UI_DEV_SCRIPT = dev -else ifeq ($(findstring v17, $(shell node --version)), v17) - UI_BUILD_SCRIPT = build - UI_DEV_SCRIPT = dev -endif - -## Install dependencies for building Meshery UI. -ui-setup: - cd ui; npm i; cd .. - cd provider-ui; npm i; cd .. - -## Run Meshery UI on your local machine. Listen for changes. -ui: - cd ui; npm run dev; cd ..; - -## Run Meshery Provider UI on your local machine. Listen for changes. -ui-provider: - cd provider-ui; npm run dev; cd .. - -## Lint check Meshery UI and Provider UI on your local machine. -ui-lint: - cd ui; npm run lint; cd .. - -## Lint check Meshery Provider UI on your local machine. -ui-provider-lint: - cd provider-ui; npm run lint; cd .. - -## Test Meshery Provider UI on your local machine. -ui-provider-test: - cd provider-ui; npm run test; cd .. - -## Buils all Meshery UIs on your local machine. -ui-build: ui-setup - cd ui; npm run lint:fix && npm run build && npm run export; cd .. - cd provider-ui; npm run lint:fix && npm run build && npm run export; cd .. - -## Build only Meshery UI on your local machine. -ui-meshery-build: - cd ui; npm run build && npm run export; cd .. - -## Builds only the provider user interface on your local machine -ui-provider-build: - cd provider-ui; npm run build && npm run export; cd .. - -## Run Meshery End-to-End Integration Tests against your local Meshery UI (runs in non-interactive mode). -ui-integration-tests: ui-setup - cd ui; npm run ci-test-integration; cd .. - -#----------------------------------------------------------------------------- -# Meshery Docs -#----------------------------------------------------------------------------- -#Incorporating Make docs commands from the Docs Makefile -.PHONY: docs docs-build site docs-docker docs-mesheryctl -jekyll=bundle exec jekyll - -site: docs -site-serve: docs-serve - -## Run Meshery Docs. Listen for changes. -docs: - cd docs; bundle install; bundle exec jekyll serve --drafts --incremental --config _config_dev.yml - -## Run Meshery Docs. Do not listen for changes. -docs-serve: - cd docs; bundle install; bundle exec jekyll serve --drafts --config _config_dev.yml - -## Build Meshery Docs on your local machine. -docs-build: - cd docs; $(jekyll) build --drafts - -## Run Meshery Docs in a Docker container. Listen for changes. -docs-docker: - cd docs; docker run --name meshery-docs --rm -p 4000:4000 -v `pwd`:"/srv/jekyll" jekyll/jekyll:4.0 bash -c "bundle install; jekyll serve --drafts --livereload" - -## Build Meshery CLI docs -docs-mesheryctl: - cd mesheryctl; make docs; -#----------------------------------------------------------------------------- -# Meshery Helm Charts -#----------------------------------------------------------------------------- -.PHONY: helm-docs helm-operator-docs helm-meshery-docs helm-operator-lint helm-lint -## Generate all Meshery Helm Chart documentation in markdown format. -helm-docs: helm-operator-docs helm-meshery-docs - -## Generate Meshery Operator Helm Chart documentation in markdown format. -helm-operator-docs: dep-check - GO111MODULE=on go get github.com/norwoodj/helm-docs/cmd/helm-docs - $(GOPATH)/bin/helm-docs -c install/kubernetes/helm/meshery-operator - -## Generate Meshery Server and Adapters Helm Chart documentation in markdown format. -helm-meshery-docs: dep-check - GO111MODULE=on go get github.com/norwoodj/helm-docs/cmd/helm-docs - $(GOPATH)/bin/helm-docs -c install/kubernetes/helm/meshery - -## Lint all of Meshery's Helm Charts -helm-lint: helm-operator-lint helm-meshery-lint - -## Lint Meshery Operator Helm Chart -helm-operator-lint: - helm lint install/kubernetes/helm/meshery-operator --with-subcharts -## Lint Meshery Server and Adapter Helm Charts -helm-meshery-lint: - helm lint install/kubernetes/helm/meshery --with-subcharts - -#----------------------------------------------------------------------------- -# Meshery APIs -#----------------------------------------------------------------------------- -.PHONY: swagger-build swagger swagger-docs-build graphql-docs-build graphql-build -## Build Meshery REST API specifications -swagger-build: - swagger generate spec -o ./server/helpers/swagger.yaml --scan-models - -## Generate and serve Meshery REST API specifications -swagger: swagger-build - swagger serve ./server/helpers/swagger.yaml - -## Build Meshery REST API documentation -swagger-docs-build: - swagger generate spec -o ./docs/_data/swagger.yml --scan-models; \ - swagger flatten ./docs/_data/swagger.yml -o ./docs/_data/swagger.yml --with-expand --format=yaml - - -## Building Meshery docs with redocly -redocly-docs-build: - npx @redocly/cli build-docs ./docs/_data/swagger.yml --config='redocly.yaml' -t custom.hbs - -## Build Meshery GraphQL API documentation -graphql-docs-build: - cd docs; bundle exec rake graphql:compile_docs - -## Build Meshery GraphQl API specifications -graphql-build: dep-check - cd server; cd internal/graphql; go run -mod=mod github.com/99designs/gqlgen generate - - - -## testing -test-setup-ui: - cd ui; npm ci; npx playwright install --with-deps; cd .. - -test-ui: - cd ui; npm run test:e2e; cd .. - -#----------------------------------------------------------------------------- -# Dependencies -#----------------------------------------------------------------------------- -.PHONY: dep-check -#.SILENT: dep-check - -INSTALLED_GO_VERSION=$(shell go version) - -dep-check: - -ifeq (,$(findstring $(GOVERSION), $(INSTALLED_GO_VERSION))) -# Only send a warning. - @echo "Dependency missing: go$(GOVERSION). Ensure 'go$(GOVERSION).x' is installed and available in your 'PATH'" - @echo "GOVERSION: " $(GOVERSION) - @echo "INSTALLED_GO_VERSION: " $(INSTALLED_GO_VERSION) -# Force error and stop. -# $(error Found $(INSTALLED_GO_VERSION). \ -# Required golang version is: 'go$(GOVERSION).x'. \ -# Ensure go '$(GOVERSION).x' is installed and available in your 'PATH'.) -endif \ No newline at end of file diff --git a/build/Makefile b/build/Makefile new file mode 100644 index 00000000000..e6b706aef79 --- /dev/null +++ b/build/Makefile @@ -0,0 +1,47 @@ +# Copyright Meshery Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +include Makefile.core.mk + + +## Lint check +golangci: error dep-check + golangci-lint run + +## Analyze error codes +error: dep-check + go run github.com/layer5io/meshkit/cmd/errorutil -d ../internal/errors analyze -i . -o . + +## Runs meshkit error utility to update error codes. +error-util: + go run github.com/layer5io/meshkit/cmd/errorutil -d ../internal/errors update -i . -o . + + + +#----------------------------------------------------------------------------- +# Dependencies +#----------------------------------------------------------------------------- +.PHONY: dep-check +#.SILENT: dep-check + +INSTALLED_GO_VERSION=$(shell go version) + +dep-check: + +ifeq (,$(findstring $(GOVERSION), $(INSTALLED_GO_VERSION))) +# Only send a warning. + @echo "Dependency missing: go$(GOVERSION). Ensure 'go$(GOVERSION).x' is installed and available in your 'PATH'" + @echo "GOVERSION: " $(GOVERSION) + @echo "INSTALLED_GO_VERSION: " $(INSTALLED_GO_VERSION) +endif \ No newline at end of file diff --git a/build/Makefile.core.mk b/build/Makefile.core.mk new file mode 100644 index 00000000000..32f6c7586a1 --- /dev/null +++ b/build/Makefile.core.mk @@ -0,0 +1 @@ +GOVERSION = 1.23 diff --git a/build/component_info.json b/build/component_info.json new file mode 100644 index 00000000000..8b473baad3d --- /dev/null +++ b/build/component_info.json @@ -0,0 +1,5 @@ +{ + "name": "kanvas-snapshot", + "type": "componenet", + "next_error_code": 1000 +} \ No newline at end of file diff --git a/cmd/helm-kanvas-plugin/main.go b/cmd/helm-kanvas-plugin/main.go new file mode 100644 index 00000000000..85f0393b7b9 --- /dev/null +++ b/cmd/helm-kanvas-plugin/main.go @@ -0,0 +1 @@ +package main \ No newline at end of file diff --git a/go.mod b/go.mod new file mode 100644 index 00000000000..88c90a5b94e --- /dev/null +++ b/go.mod @@ -0,0 +1,12 @@ +module github.com/meshery/helm-kanvas-snapshot + +go 1.23.1 + +require ( + github.com/inconshreveable/mousetrap v1.1.0 // indirect + github.com/layer5io/meshkit v0.7.76 // indirect + github.com/sirupsen/logrus v1.9.3 // indirect + github.com/spf13/cobra v1.8.1 // indirect + github.com/spf13/pflag v1.0.5 // indirect + golang.org/x/sys v0.22.0 // indirect +) diff --git a/go.sum b/go.sum new file mode 100644 index 00000000000..933ab536a9b --- /dev/null +++ b/go.sum @@ -0,0 +1,23 @@ +github.com/cpuguy83/go-md2man/v2 v2.0.4/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= +github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2s0bqwp9tc8= +github.com/inconshreveable/mousetrap v1.1.0/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw= +github.com/layer5io/meshkit v0.7.76 h1:uXivwO2oo3RSPe/61u7LqvqEDvgqVQjqoAuiLl7ZRCc= +github.com/layer5io/meshkit v0.7.76/go.mod h1:fK7eqynmZm/2+JSOIM/UIfPt4KfwzM8C3HPlNd67iRo= +github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= +github.com/sirupsen/logrus v1.9.3 h1:dueUQJ1C2q9oE3F7wvmSGAaVtTmUizReu6fjN8uqzbQ= +github.com/sirupsen/logrus v1.9.3/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= +github.com/spf13/cobra v1.8.1 h1:e5/vxKd/rZsfSJMUX1agtjeTDf+qv1/JdBF8gg5k9ZM= +github.com/spf13/cobra v1.8.1/go.mod h1:wHxEcudfqmLYa8iTfL+OuZPbBZkmvliBWKIezN3kD9Y= +github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= +github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= +github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.22.0 h1:RI27ohtqKCnwULzJLqkv897zojh5/DwS/ENaMzUOaWI= +golang.org/x/sys v0.22.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= diff --git a/internal/errors/error.go b/internal/errors/error.go new file mode 100644 index 00000000000..d726403b2ad --- /dev/null +++ b/internal/errors/error.go @@ -0,0 +1,3 @@ +package errors + +// define meshkit errors \ No newline at end of file diff --git a/internal/log/logger.go b/internal/log/logger.go new file mode 100644 index 00000000000..84ee3661f8c --- /dev/null +++ b/internal/log/logger.go @@ -0,0 +1,4 @@ +package log + +// initialize meshkit logger instance + \ No newline at end of file