Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
devel:kubic
harbor-cli
harbor-cli-0.0.1.obscpio
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File harbor-cli-0.0.1.obscpio of Package harbor-cli
07070100000000000041ED00000000000000000000000265E8411F00000000000000000000000000000000000000000000001900000000harbor-cli-0.0.1/.github07070100000001000081A400000000000000000000000165E8411F00000067000000000000000000000000000000000000002800000000harbor-cli-0.0.1/.github/dependabot.ymlversion: 2 updates: - package-ecosystem: gomod directory: "/" schedule: interval: daily07070100000002000041ED00000000000000000000000265E8411F00000000000000000000000000000000000000000000002300000000harbor-cli-0.0.1/.github/workflows07070100000003000081A400000000000000000000000165E8411F0000021A000000000000000000000000000000000000003700000000harbor-cli-0.0.1/.github/workflows/publish_release.ymlname: Publish Release on: push: tags: - v* jobs: build: runs-on: ubuntu-20.04 steps: - name: Check out code uses: actions/checkout@v4 with: fetch-depth: 0 - name: Setup go env uses: actions/setup-go@master with: go-version: "1.21" - name: goreleaser with tag uses: goreleaser/goreleaser-action@v5 with: version: latest args: release --rm-dist env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 07070100000004000081A400000000000000000000000165E8411F000001F2000000000000000000000000000000000000001C00000000harbor-cli-0.0.1/.gitignore# If you prefer the allow list template instead of the deny list, see community template: # https://github.com/github/gitignore/blob/main/community/Golang/Go.AllowList.gitignore # # Binaries for programs and plugins *.exe *.exe~ *.dll *.so *.dylib # Test binary, built with `go test -c` *.test # Output of the go coverage tool, specifically when used with LiteIDE *.out # Dependency directories (remove the comment below to include it) # vendor/ # Go workspace file go.work /bin /harbor dist/ 07070100000005000081A400000000000000000000000165E8411F000002FF000000000000000000000000000000000000002200000000harbor-cli-0.0.1/.goreleaser.yamlproject_name: harbor before: hooks: - go mod tidy builds: - main: ./cmd/harbor/main.go env: - CGO_ENABLED=0 ldflags: - -w -s -X github.com/goharbor/harbor-cli/cmd/harbor/internal/version.GitCommit={{.FullCommit}} goos: - linux - windows - darwin goarch: - amd64 - arm64 - arm ignore: - goos: windows goarch: arm - goos: windows goarch: arm64 archives: - format: tar.gz format_overrides: - goos: windows format: zip checksum: name_template: 'checksums.txt' snapshot: name_template: "{{ .Tag }}-next" release: name_template: "HarborCLI {{.Tag}}" # draft: true # prerelease: auto changelog: sort: asc filters: exclude: - "^docs:" - "^test:"07070100000006000081A400000000000000000000000165E8411F00000081000000000000000000000000000000000000002400000000harbor-cli-0.0.1/CODE_OF_CONDUCT.md# Code of Conduct Harbor follows the [CNCF Code of Conduct](https://github.com/cncf/foundation/blob/master/code-of-conduct.md). 07070100000007000081A400000000000000000000000165E8411F00000000000000000000000000000000000000000000002100000000harbor-cli-0.0.1/CONTRIBUTING.md07070100000008000081A400000000000000000000000165E8411F00002C5D000000000000000000000000000000000000001900000000harbor-cli-0.0.1/LICENSE Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 1. Definitions. "License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. "Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. "Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. "You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. "Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. "Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. "Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). "Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. "Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." "Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. 2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. 3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. 4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: (a) You must give any other recipients of the Work or Derivative Works a copy of this License; and (b) You must cause any modified files to carry prominent notices stating that You changed the files; and (c) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and (d) If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. 5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. 6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. 7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. 8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. 9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. END OF TERMS AND CONDITIONS APPENDIX: How to apply the Apache License to your work. To apply the Apache License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives. Copyright [yyyy] [name of copyright owner] 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. 07070100000009000081A400000000000000000000000165E8411F0000059D000000000000000000000000000000000000001A00000000harbor-cli-0.0.1/MakefilePROJECT_PKG=github.com/goharbor/harbor-cli VERSION_PKG=$(PROJECT_PKG)/cmd/harbor/internal/version GITCOMMIT := $(shell git rev-parse --short=8 HEAD) GO_VERSION := $(shell go version | cut -c 14- | cut -d' ' -f1) BUILD_TIME := "$(shell date +'%a_%b_%d_%T_%Y')" RELEASE_CHANNEL=edge LDFLAGS := -w -s \ -X $(VERSION_PKG).GitCommit=$(GITCOMMIT) \ -X $(VERSION_PKG).GoVersion=$(GO_VERSION) \ -X $(VERSION_PKG).BuildTime=$(BUILD_TIME) \ -X $(VERSION_PKG).ReleaseChannel=$(RELEASE_CHANNEL) ARCH := amd64 GO_EXE = go make: gofmt -l -s -w . go build -v -ldflags "${LDFLAGS}" -o harbor cmd/harbor/main.go windows: go build -ldflags "${LDFLAGS}" -o harbor.exe cmd/harbor/main.go .PHONY: build-win-amd64 build-win-amd64: ## build for windows amd64 CGO_ENABLED=0 GOARCH=$(ARCH) GOOS=windows $(GO_EXE) build -v --ldflags "$(LDFLAGS)" \ -o bin/harbor-windows-$(ARCH).exe ./cmd/harbor/main.go .PHONY: build-linux-amd64 build-linux-amd64: ## build for linux amd64 CGO_ENABLED=0 GOARCH=$(ARCH) GOOS=linux $(GO_EXE) build -v --ldflags "$(LDFLAGS)" \ -o bin/harbor-linux-$(ARCH) ./cmd/harbor/main.go .PHONY: build-darwin-amd64 build-darwin-amd64: ## build for darwin amd64 CGO_ENABLED=0 GOARCH=$(ARCH) GOOS=darwin $(GO_EXE) build -v --ldflags "$(LDFLAGS)" \ -o bin/harbor-darwin-$(ARCH) ./cmd/harbor/main.go .PHONY: clean clean: rm -rf bin .PHONY: lint lint: golangci-lint run --timeout 5m0707010000000A000081A400000000000000000000000165E8411F00000489000000000000000000000000000000000000001B00000000harbor-cli-0.0.1/README.md# harbor-cli LFX mentorship program project original author https://github.com/akshatdalton https://github.com/cncf/mentoring/tree/main/programs/lfx-mentorship/2023/01-Mar-May#an-official-golang-api-client-and-cli-for-harbor https://mentorship.lfx.linuxfoundation.org/project/7e8cb88a-5b37-471c-8db8-e11907b5a661 #Under Contstruction! # How to Install: - Run `go mod download` to install the dependencies - Run `go build -o harbor` to generate the build file # How to Use: If you have completed the above steps, now you are all set to use this project. <br> <br> `./harbor --help` or do `./harbor help`: ```shell Official Harbor CLI Usage: harbor [command] Available Commands: completion Generate the autocompletion script for the specified shell create create project, registry, etc. delete delete project, registry, etc. get get project, registry, etc. help Help about any command list list project, registry, etc. login Log in to Harbor registry update update registry, etc. Flags: -h, --help help for harbor Use "harbor [command] --help" for more information about a command. ``` 0707010000000B000041ED00000000000000000000000265E8411F00000000000000000000000000000000000000000000001500000000harbor-cli-0.0.1/cmd0707010000000C000041ED00000000000000000000000265E8411F00000000000000000000000000000000000000000000001C00000000harbor-cli-0.0.1/cmd/harbor0707010000000D000041ED00000000000000000000000265E8411F00000000000000000000000000000000000000000000002500000000harbor-cli-0.0.1/cmd/harbor/internal0707010000000E000041ED00000000000000000000000265E8411F00000000000000000000000000000000000000000000002D00000000harbor-cli-0.0.1/cmd/harbor/internal/version0707010000000F000081A400000000000000000000000165E8411F0000025C000000000000000000000000000000000000003800000000harbor-cli-0.0.1/cmd/harbor/internal/version/version.gopackage version import "runtime/debug" var ( Version = "0.1.0" GitCommit = "" BuildTime = "" ReleaseChannel = "dev" GoVersion = "" OS = func() string { if info, ok := debug.ReadBuildInfo(); ok { for _, setting := range info.Settings { if setting.Key == "GOOS" { return setting.Value } } } return "" } Arch = func() string { if info, ok := debug.ReadBuildInfo(); ok { for _, setting := range info.Settings { if setting.Key == "GOARCH" { return setting.Value } } } return "" } System = OS() + "/" + Arch() ) 07070100000010000081A400000000000000000000000165E8411F000000A1000000000000000000000000000000000000002400000000harbor-cli-0.0.1/cmd/harbor/main.gopackage main import ( "os" "github.com/goharbor/harbor-cli/cmd/harbor/root" ) func main() { err := root.New().Execute() if err != nil { os.Exit(1) } } 07070100000011000041ED00000000000000000000000265E8411F00000000000000000000000000000000000000000000002100000000harbor-cli-0.0.1/cmd/harbor/root07070100000012000081A400000000000000000000000165E8411F00000D18000000000000000000000000000000000000002800000000harbor-cli-0.0.1/cmd/harbor/root/cmd.gopackage root import ( "fmt" "github.com/goharbor/harbor-cli/cmd/harbor/internal/version" "github.com/goharbor/harbor-cli/cmd/harbor/root/project" "github.com/goharbor/harbor-cli/cmd/harbor/root/registry" "github.com/goharbor/harbor-cli/pkg/constants" "github.com/spf13/cobra" ) // versionCommand creates a new `harbor version` command func versionCommand() *cobra.Command { return &cobra.Command{ Use: "version", Short: "get Harbor CLI version", Long: `Get Harbor CLI version, git commit, go version, build time, release channel, os/arch, etc.`, Run: func(cmd *cobra.Command, args []string) { fmt.Printf("Version: %s\n", version.Version) fmt.Printf("Go version: %s\n", version.GoVersion) fmt.Printf("Git commit: %s\n", version.GitCommit) fmt.Printf("Built: %s\n", version.BuildTime) fmt.Printf("OS/Arch: %s\n", version.System) }, } } // newGetCommand creates a new `harbor get` command func newGetCommand() *cobra.Command { cmd := &cobra.Command{ Use: "get [COMMAND]", Short: "get project, registry, etc.", Long: `Get project, registry`, } cmd.PersistentFlags().String(constants.CredentialNameOption, "", constants.CredentialNameHelp) cmd.AddCommand(project.GetProjectCommand()) cmd.AddCommand(registry.GetRegistryCommand()) return cmd } // newListCommand creates a new `harbor list` command func newListCommand() *cobra.Command { cmd := &cobra.Command{ Use: "list [COMMAND]", Short: "list project, registry, etc.", Long: `List project, registry`, } cmd.PersistentFlags().String(constants.CredentialNameOption, "", constants.CredentialNameHelp) cmd.AddCommand(project.ListProjectCommand()) cmd.AddCommand(registry.ListRegistryCommand()) return cmd } // newCreateCommand creates a new `harbor create` command func newCreateCommand() *cobra.Command { cmd := &cobra.Command{ Use: "create [COMMAND]", Short: "create project, registry, etc.", Long: `Create project, registry`, } cmd.PersistentFlags().String(constants.CredentialNameOption, "", constants.CredentialNameHelp) cmd.AddCommand(project.CreateProjectCommand()) cmd.AddCommand(registry.CreateRegistryCommand()) return cmd } // newDeleteCommand creates a new `harbor delete` command func newDeleteCommand() *cobra.Command { cmd := &cobra.Command{ Use: "delete [COMMAND]", Short: "delete project, registry, etc.", Long: `Delete project, registry`, } cmd.PersistentFlags().String(constants.CredentialNameOption, "", constants.CredentialNameHelp) cmd.AddCommand(project.DeleteProjectCommand()) cmd.AddCommand(registry.DeleteRegistryCommand()) return cmd } // newUpdateCommand creates a new `harbor update` command func newUpdateCommand() *cobra.Command { cmd := &cobra.Command{ Use: "update [COMMAND]", Short: "update registry, etc.", Long: `Update registry`, } cmd.PersistentFlags().String(constants.CredentialNameOption, "", constants.CredentialNameHelp) cmd.AddCommand(registry.UpdateRegistryCommand()) return cmd } // CreateHarborCLI creates a new Harbor CLI func New() *cobra.Command { cmd := &cobra.Command{ Use: "harbor [command]", Short: "Official Harbor CLI", } cmd.AddCommand( versionCommand(), LoginCommand(), newGetCommand(), newListCommand(), newCreateCommand(), newDeleteCommand(), newUpdateCommand(), ) return cmd } 07070100000013000081A400000000000000000000000165E8411F00000749000000000000000000000000000000000000002A00000000harbor-cli-0.0.1/cmd/harbor/root/login.gopackage root import ( "context" "fmt" "github.com/goharbor/go-client/pkg/harbor" "github.com/goharbor/go-client/pkg/sdk/v2.0/client/user" "github.com/goharbor/harbor-cli/pkg/utils" "github.com/spf13/cobra" ) type loginOptions struct { name string serverAddress string username string password string } // LoginCommand creates a new `harbor login` command func LoginCommand() *cobra.Command { var opts loginOptions cmd := &cobra.Command{ Use: "login [SERVER]", Short: "Log in to Harbor registry", Long: "Authenticate with Harbor Registry.", Args: cobra.ExactArgs(1), RunE: func(cmd *cobra.Command, args []string) error { opts.serverAddress = args[0] return runLogin(opts) }, } flags := cmd.Flags() flags.StringVarP(&opts.name, "name", "", "", "name for the set of credentials") flags.StringVarP(&opts.username, "username", "u", "", "Username") if err := cmd.MarkFlagRequired("username"); err != nil { panic(err) } flags.StringVarP(&opts.password, "password", "p", "", "Password") if err := cmd.MarkFlagRequired("password"); err != nil { panic(err) } return cmd } func runLogin(opts loginOptions) error { clientConfig := &harbor.ClientSetConfig{ URL: opts.serverAddress, Username: opts.username, Password: opts.password, } client := utils.GetClientByConfig(clientConfig) ctx := context.Background() _, err := client.User.GetCurrentUserInfo(ctx, &user.GetCurrentUserInfoParams{}) if err != nil { return fmt.Errorf("login failed, please check your credentials: %s", err) } cred := utils.Credential{ Name: opts.name, Username: opts.username, Password: opts.password, ServerAddress: opts.serverAddress, } if err = utils.StoreCredential(cred, true); err != nil { return fmt.Errorf("Failed to store the credential: %s", err) } return nil } 07070100000014000041ED00000000000000000000000265E8411F00000000000000000000000000000000000000000000002900000000harbor-cli-0.0.1/cmd/harbor/root/project07070100000015000081A400000000000000000000000165E8411F000006CF000000000000000000000000000000000000003B00000000harbor-cli-0.0.1/cmd/harbor/root/project/create_project.gopackage project import ( "context" "github.com/goharbor/go-client/pkg/sdk/v2.0/client/project" "github.com/goharbor/go-client/pkg/sdk/v2.0/models" "github.com/goharbor/harbor-cli/pkg/constants" "github.com/goharbor/harbor-cli/pkg/utils" "github.com/spf13/cobra" ) type createProjectOptions struct { projectName string public bool registryID int64 storageLimit int64 } // CreateProjectCommand creates a new `harbor create project` command func CreateProjectCommand() *cobra.Command { var opts createProjectOptions cmd := &cobra.Command{ Use: "project", Short: "create project", RunE: func(cmd *cobra.Command, args []string) error { credentialName, err := cmd.Flags().GetString(constants.CredentialNameOption) if err != nil { return err } return runCreateProject(opts, credentialName) }, } flags := cmd.Flags() flags.StringVarP(&opts.projectName, "name", "", "", "Name of the project") flags.BoolVarP(&opts.public, "public", "", true, "Project is public or private") flags.Int64VarP(&opts.registryID, "registry-id", "", 1, "ID of referenced registry when creating the proxy cache project") flags.Int64VarP(&opts.storageLimit, "storage-limit", "", -1, "Storage quota of the project") return cmd } func runCreateProject(opts createProjectOptions, credentialName string) error { client := utils.GetClientByCredentialName(credentialName) ctx := context.Background() response, err := client.Project.CreateProject(ctx, &project.CreateProjectParams{Project: &models.ProjectReq{ProjectName: opts.projectName, Public: &opts.public, RegistryID: &opts.registryID, StorageLimit: &opts.storageLimit}}) if err != nil { return err } utils.PrintPayloadInJSONFormat(response) return nil } 07070100000016000081A400000000000000000000000165E8411F000004BF000000000000000000000000000000000000003B00000000harbor-cli-0.0.1/cmd/harbor/root/project/delete_project.gopackage project import ( "context" "github.com/goharbor/go-client/pkg/sdk/v2.0/client/project" "github.com/goharbor/harbor-cli/pkg/constants" "github.com/goharbor/harbor-cli/pkg/utils" "github.com/spf13/cobra" ) type deleteProjectOptions struct { projectNameOrID string } // DeleteProjectCommand creates a new `harbor delete project` command func DeleteProjectCommand() *cobra.Command { var opts deleteProjectOptions cmd := &cobra.Command{ Use: "project [NAME|ID]", Short: "delete project by name or id", Args: cobra.ExactArgs(1), RunE: func(cmd *cobra.Command, args []string) error { opts.projectNameOrID = args[0] credentialName, err := cmd.Flags().GetString(constants.CredentialNameOption) if err != nil { return err } return runDeleteProject(opts, credentialName) }, } return cmd } func runDeleteProject(opts deleteProjectOptions, credentialName string) error { client := utils.GetClientByCredentialName(credentialName) ctx := context.Background() response, err := client.Project.DeleteProject(ctx, &project.DeleteProjectParams{ProjectNameOrID: opts.projectNameOrID}) if err != nil { return err } utils.PrintPayloadInJSONFormat(response) return nil } 07070100000017000081A400000000000000000000000165E8411F0000080E000000000000000000000000000000000000003700000000harbor-cli-0.0.1/cmd/harbor/root/project/ls_project.gopackage project import ( "context" "github.com/goharbor/go-client/pkg/sdk/v2.0/client/project" "github.com/goharbor/harbor-cli/pkg/constants" "github.com/goharbor/harbor-cli/pkg/utils" "github.com/spf13/cobra" ) type listProjectOptions struct { name string owner string page int64 pageSize int64 public bool q string sort string withDetail bool } // NewListProjectCommand creates a new `harbor list project` command func ListProjectCommand() *cobra.Command { var opts listProjectOptions cmd := &cobra.Command{ Use: "project", Short: "list project", RunE: func(cmd *cobra.Command, args []string) error { credentialName, err := cmd.Flags().GetString(constants.CredentialNameOption) if err != nil { return err } return runListProject(opts, credentialName) }, } flags := cmd.Flags() flags.StringVarP(&opts.name, "name", "", "", "Name of the project") flags.StringVarP(&opts.owner, "owner", "", "", "Name of the project owner") flags.Int64VarP(&opts.page, "page", "", 1, "Page number") flags.Int64VarP(&opts.pageSize, "page-size", "", 10, "Size of per page") flags.BoolVarP(&opts.public, "public", "", true, "Project is public or private") flags.StringVarP(&opts.q, "query", "q", "", "Query string to query resources") flags.StringVarP(&opts.sort, "sort", "", "", "Sort the resource list in ascending or descending order") flags.BoolVarP(&opts.withDetail, "with-detail", "", true, "Bool value indicating whether return detailed information of the project") return cmd } func runListProject(opts listProjectOptions, credentialName string) error { client := utils.GetClientByCredentialName(credentialName) ctx := context.Background() response, err := client.Project.ListProjects(ctx, &project.ListProjectsParams{Name: &opts.name, Owner: &opts.owner, Page: &opts.page, PageSize: &opts.pageSize, Public: &opts.public, Q: &opts.q, Sort: &opts.sort, WithDetail: &opts.withDetail}) if err != nil { return err } utils.PrintPayloadInJSONFormat(response) return nil } 07070100000018000081A400000000000000000000000165E8411F0000049E000000000000000000000000000000000000003900000000harbor-cli-0.0.1/cmd/harbor/root/project/view_project.gopackage project import ( "context" "github.com/goharbor/go-client/pkg/sdk/v2.0/client/project" "github.com/goharbor/harbor-cli/pkg/constants" "github.com/goharbor/harbor-cli/pkg/utils" "github.com/spf13/cobra" ) type getProjectOptions struct { projectNameOrID string } // GetProjectCommand creates a new `harbor get project` command func GetProjectCommand() *cobra.Command { var opts getProjectOptions cmd := &cobra.Command{ Use: "project [NAME|ID]", Short: "get project by name or id", Args: cobra.ExactArgs(1), RunE: func(cmd *cobra.Command, args []string) error { opts.projectNameOrID = args[0] credentialName, err := cmd.Flags().GetString(constants.CredentialNameOption) if err != nil { return err } return runGetProject(opts, credentialName) }, } return cmd } func runGetProject(opts getProjectOptions, credentialName string) error { client := utils.GetClientByCredentialName(credentialName) ctx := context.Background() response, err := client.Project.GetProject(ctx, &project.GetProjectParams{ProjectNameOrID: opts.projectNameOrID}) if err != nil { return err } utils.PrintPayloadInJSONFormat(response) return nil } 07070100000019000041ED00000000000000000000000265E8411F00000000000000000000000000000000000000000000002A00000000harbor-cli-0.0.1/cmd/harbor/root/registry0707010000001A000081A400000000000000000000000165E8411F000009BE000000000000000000000000000000000000003D00000000harbor-cli-0.0.1/cmd/harbor/root/registry/create_registry.gopackage registry import ( "context" "github.com/goharbor/go-client/pkg/sdk/v2.0/client/registry" "github.com/goharbor/go-client/pkg/sdk/v2.0/models" "github.com/goharbor/harbor-cli/pkg/constants" "github.com/goharbor/harbor-cli/pkg/utils" "github.com/spf13/cobra" ) type createRegistrytOptions struct { name string _type string url string description string insecure bool credential struct { accessKey string accessSecret string _type string } } // NewCreateRegistryCommand creates a new `harbor create registry` command func CreateRegistryCommand() *cobra.Command { var opts createRegistrytOptions cmd := &cobra.Command{ Use: "registry", Short: "create registry", RunE: func(cmd *cobra.Command, args []string) error { credentialName, err := cmd.Flags().GetString(constants.CredentialNameOption) if err != nil { return err } return runCreateRegistry(opts, credentialName) }, } flags := cmd.Flags() flags.StringVarP(&opts.name, "name", "", "", "Name of the registry") flags.StringVarP(&opts._type, "type", "", "harbor", "Type of the registry") flags.StringVarP(&opts.url, "url", "", "", "Registry endpoint URL") flags.StringVarP(&opts.description, "description", "", "", "Description of the registry") flags.BoolVarP(&opts.insecure, "insecure", "", true, "Whether or not the certificate will be verified when Harbor tries to access the server") flags.StringVarP(&opts.credential.accessKey, "credential-access-key", "", "", "Access key, e.g. user name when credential type is 'basic'") flags.StringVarP(&opts.credential.accessKey, "credential-access-secret", "", "", "Access secret, e.g. password when credential type is 'basic'") flags.StringVarP(&opts.credential._type, "credential-type", "", "basic", "Credential type, such as 'basic', 'oauth'") return cmd } func runCreateRegistry(opts createRegistrytOptions, credentialName string) error { client := utils.GetClientByCredentialName(credentialName) ctx := context.Background() response, err := client.Registry.CreateRegistry(ctx, ®istry.CreateRegistryParams{Registry: &models.Registry{Credential: &models.RegistryCredential{AccessKey: opts.credential.accessKey, AccessSecret: opts.credential.accessSecret, Type: opts.credential._type}, Description: opts.description, Insecure: opts.insecure, Name: opts.name, Type: opts._type, URL: opts.url}}) if err != nil { return err } utils.PrintPayloadInJSONFormat(response) return nil } 0707010000001B000081A400000000000000000000000165E8411F00000538000000000000000000000000000000000000003D00000000harbor-cli-0.0.1/cmd/harbor/root/registry/delete_registry.gopackage registry import ( "context" "fmt" "strconv" "github.com/goharbor/go-client/pkg/sdk/v2.0/client/registry" "github.com/goharbor/harbor-cli/pkg/constants" "github.com/goharbor/harbor-cli/pkg/utils" "github.com/spf13/cobra" ) type deleteRegistryOptions struct { id int64 } // NewDeleteRegistryCommand creates a new `harbor delete registry` command func DeleteRegistryCommand() *cobra.Command { var opts deleteRegistryOptions cmd := &cobra.Command{ Use: "registry [ID]", Short: "delete registry by id", Args: cobra.ExactArgs(1), RunE: func(cmd *cobra.Command, args []string) error { id, err := strconv.Atoi(args[0]) if err != nil { fmt.Printf("Invalid argument: %s. Expected an integer.\n", args[0]) return err } opts.id = int64(id) credentialName, err := cmd.Flags().GetString(constants.CredentialNameOption) if err != nil { return err } return runDeleteRegistry(opts, credentialName) }, } return cmd } func runDeleteRegistry(opts deleteRegistryOptions, credentialName string) error { client := utils.GetClientByCredentialName(credentialName) ctx := context.Background() response, err := client.Registry.DeleteRegistry(ctx, ®istry.DeleteRegistryParams{ID: opts.id}) if err != nil { return err } utils.PrintPayloadInJSONFormat(response) return nil } 0707010000001C000081A400000000000000000000000165E8411F00000618000000000000000000000000000000000000003900000000harbor-cli-0.0.1/cmd/harbor/root/registry/ls_registry.gopackage registry import ( "context" "github.com/goharbor/go-client/pkg/sdk/v2.0/client/registry" "github.com/goharbor/harbor-cli/pkg/constants" "github.com/goharbor/harbor-cli/pkg/utils" "github.com/spf13/cobra" ) type listRegistryOptions struct { page int64 pageSize int64 q string sort string } // NewListRegistryCommand creates a new `harbor list registry` command func ListRegistryCommand() *cobra.Command { var opts listRegistryOptions cmd := &cobra.Command{ Use: "registry", Short: "list registry", RunE: func(cmd *cobra.Command, args []string) error { credentialName, err := cmd.Flags().GetString(constants.CredentialNameOption) if err != nil { return err } return runListRegistry(opts, credentialName) }, } flags := cmd.Flags() flags.Int64VarP(&opts.page, "page", "", 1, "Page number") flags.Int64VarP(&opts.pageSize, "page-size", "", 10, "Size of per page") flags.StringVarP(&opts.q, "query", "q", "", "Query string to query resources") flags.StringVarP(&opts.sort, "sort", "", "", "Sort the resource list in ascending or descending order") return cmd } func runListRegistry(opts listRegistryOptions, credentialName string) error { client := utils.GetClientByCredentialName(credentialName) ctx := context.Background() response, err := client.Registry.ListRegistries(ctx, ®istry.ListRegistriesParams{Page: &opts.page, PageSize: &opts.pageSize, Q: &opts.q, Sort: &opts.sort}) if err != nil { return err } utils.PrintPayloadInJSONFormat(response.GetPayload()) return nil } 0707010000001D000081A400000000000000000000000165E8411F00000BFC000000000000000000000000000000000000003D00000000harbor-cli-0.0.1/cmd/harbor/root/registry/update_registry.gopackage registry import ( "context" "fmt" "strconv" "github.com/goharbor/go-client/pkg/sdk/v2.0/client/registry" "github.com/goharbor/go-client/pkg/sdk/v2.0/models" "github.com/goharbor/harbor-cli/pkg/constants" "github.com/goharbor/harbor-cli/pkg/utils" "github.com/spf13/cobra" ) type updateRegistrytOptions struct { id int64 name string _type string url string description string insecure bool credential struct { accessKey string accessSecret string _type string } } // NewUpdateRegistryCommand creates a new `harbor update registry` command func UpdateRegistryCommand() *cobra.Command { var opts updateRegistrytOptions cmd := &cobra.Command{ Use: "registry [ID]", Short: "update registry", Args: cobra.ExactArgs(1), RunE: func(cmd *cobra.Command, args []string) error { id, err := strconv.Atoi(args[0]) if err != nil { fmt.Printf("Invalid argument: %s. Expected an integer.\n", args[0]) return err } opts.id = int64(id) credentialName, err := cmd.Flags().GetString(constants.CredentialNameOption) if err != nil { return err } return runUpdateRegistry(opts, credentialName) }, } flags := cmd.Flags() flags.StringVarP(&opts.name, "name", "", "", "Name of the registry") flags.StringVarP(&opts._type, "type", "", "", "Type of the registry") flags.StringVarP(&opts.url, "url", "", "", "Registry endpoint URL") flags.StringVarP(&opts.description, "description", "", "", "Description of the registry") flags.BoolVarP(&opts.insecure, "insecure", "", true, "Whether or not the certificate will be verified when Harbor tries to access the server") flags.StringVarP(&opts.credential.accessKey, "credential-access-key", "", "", "Access key, e.g. user name when credential type is 'basic'") flags.StringVarP(&opts.credential.accessKey, "credential-access-secret", "", "", "Access secret, e.g. password when credential type is 'basic'") flags.StringVarP(&opts.credential._type, "credential-type", "", "", "Credential type, such as 'basic', 'oauth'") return cmd } func runUpdateRegistry(opts updateRegistrytOptions, credentialName string) error { client := utils.GetClientByCredentialName(credentialName) ctx := context.Background() registryUpdate := &models.RegistryUpdate{} if opts.credential.accessKey != "" { registryUpdate.AccessKey = &opts.credential.accessKey } if opts.credential.accessSecret != "" { registryUpdate.AccessSecret = &opts.credential.accessSecret } if opts.credential._type != "" { registryUpdate.CredentialType = &opts.credential._type } if opts.description != "" { registryUpdate.Description = &opts.description } if opts.name != "" { registryUpdate.Name = &opts.name } if opts.url != "" { registryUpdate.URL = &opts.url } registryUpdate.Insecure = &opts.insecure response, err := client.Registry.UpdateRegistry(ctx, ®istry.UpdateRegistryParams{ID: opts.id, Registry: registryUpdate}) if err != nil { return err } utils.PrintPayloadInJSONFormat(response) return nil } 0707010000001E000081A400000000000000000000000165E8411F00000524000000000000000000000000000000000000003B00000000harbor-cli-0.0.1/cmd/harbor/root/registry/view_registry.gopackage registry import ( "context" "fmt" "strconv" "github.com/goharbor/go-client/pkg/sdk/v2.0/client/registry" "github.com/goharbor/harbor-cli/pkg/constants" "github.com/goharbor/harbor-cli/pkg/utils" "github.com/spf13/cobra" ) type getRegistryOptions struct { id int64 } // NewGetRegistryCommand creates a new `harbor get registry` command func GetRegistryCommand() *cobra.Command { var opts getRegistryOptions cmd := &cobra.Command{ Use: "registry [ID]", Short: "get registry by id", Args: cobra.ExactArgs(1), RunE: func(cmd *cobra.Command, args []string) error { id, err := strconv.Atoi(args[0]) if err != nil { fmt.Printf("Invalid argument: %s. Expected an integer.\n", args[0]) return err } opts.id = int64(id) credentialName, err := cmd.Flags().GetString(constants.CredentialNameOption) if err != nil { return err } return runGetRegistry(opts, credentialName) }, } return cmd } func runGetRegistry(opts getRegistryOptions, credentialName string) error { client := utils.GetClientByCredentialName(credentialName) ctx := context.Background() response, err := client.Registry.GetRegistry(ctx, ®istry.GetRegistryParams{ID: opts.id}) if err != nil { return err } utils.PrintPayloadInJSONFormat(response.GetPayload()) return nil } 0707010000001F000041ED00000000000000000000000265E8411F00000000000000000000000000000000000000000000001500000000harbor-cli-0.0.1/doc07070100000020000081A400000000000000000000000165E8411F0000016A000000000000000000000000000000000000001C00000000harbor-cli-0.0.1/doc/doc.mdWe can create a worker function to automatically generate documents for users whenever a new release is available. This function will streamline the process of document generation and ensure that users have up-to-date information. By automating this task, we can improve efficiency and provide clear and concise documentation in a user-friendly manner. //@amands07070100000021000081A400000000000000000000000165E8411F00000627000000000000000000000000000000000000001800000000harbor-cli-0.0.1/go.modmodule github.com/goharbor/harbor-cli go 1.21 require github.com/spf13/cobra v1.7.0 require ( github.com/google/go-cmp v0.5.9 // indirect github.com/stretchr/testify v1.8.1 // indirect ) require ( github.com/PuerkitoBio/purell v1.1.1 // indirect github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578 // indirect github.com/adrg/xdg v0.4.0 github.com/asaskevich/govalidator v0.0.0-20210307081110-f21760c49a8d // indirect github.com/go-openapi/analysis v0.20.1 // indirect github.com/go-openapi/errors v0.20.1 // indirect github.com/go-openapi/jsonpointer v0.19.5 // indirect github.com/go-openapi/jsonreference v0.19.6 // indirect github.com/go-openapi/loads v0.21.0 // indirect github.com/go-openapi/runtime v0.21.0 // indirect github.com/go-openapi/spec v0.20.4 // indirect github.com/go-openapi/strfmt v0.21.0 // indirect github.com/go-openapi/swag v0.19.15 // indirect github.com/go-openapi/validate v0.20.3 // indirect github.com/go-stack/stack v1.8.0 // indirect github.com/goharbor/go-client v0.26.2 github.com/inconshreveable/mousetrap v1.1.0 // indirect github.com/josharian/intern v1.0.0 // indirect github.com/mailru/easyjson v0.7.6 // indirect github.com/mitchellh/mapstructure v1.5.0 // indirect github.com/oklog/ulid v1.3.1 // indirect github.com/opentracing/opentracing-go v1.2.0 // indirect github.com/spf13/pflag v1.0.5 // indirect go.mongodb.org/mongo-driver v1.7.3 // indirect golang.org/x/net v0.4.0 // indirect golang.org/x/sys v0.3.0 // indirect golang.org/x/text v0.5.0 // indirect gopkg.in/yaml.v2 v2.4.0 ) 07070100000022000081A400000000000000000000000165E8411F0000804B000000000000000000000000000000000000001800000000harbor-cli-0.0.1/go.sumgithub.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= github.com/PuerkitoBio/purell v1.1.0/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0= github.com/PuerkitoBio/purell v1.1.1 h1:WEQqlqaGbrPkxLJWfBwQmfEAE1Z7ONdDLqrN38tNFfI= github.com/PuerkitoBio/purell v1.1.1/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0= github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578 h1:d+Bc7a5rLufV/sSk/8dngufqelfh6jnri85riMAaF/M= github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578/go.mod h1:uGdkoq3SwY9Y+13GIhn11/XLaGBb4BfwItxLd5jeuXE= github.com/adrg/xdg v0.4.0 h1:RzRqFcjH4nE5C6oTAxhBtoE2IRyjBSa62SCbyPidvls= github.com/adrg/xdg v0.4.0/go.mod h1:N6ag73EX4wyxeaoeHctc1mas01KZgsj5tYiAIwqJE/E= github.com/agnivade/levenshtein v1.0.1/go.mod h1:CURSv5d9Uaml+FovSIICkLbAUZ9S4RqaHDIsdSBg7lM= github.com/andreyvit/diff v0.0.0-20170406064948-c7f18ee00883/go.mod h1:rCTlJbsFo29Kk6CurOXKm700vrz8f0KW0JNfpkRJY/8= github.com/asaskevich/govalidator v0.0.0-20180720115003-f9ffefc3facf/go.mod h1:lB+ZfQJz7igIIfQNfa7Ml4HSf2uFQQRzpGGRXenZAgY= github.com/asaskevich/govalidator v0.0.0-20190424111038-f61b66f89f4a/go.mod h1:lB+ZfQJz7igIIfQNfa7Ml4HSf2uFQQRzpGGRXenZAgY= github.com/asaskevich/govalidator v0.0.0-20200108200545-475eaeb16496/go.mod h1:oGkLhpf+kjZl6xBf758TQhh5XrAeiJv/7FRz/2spLIg= github.com/asaskevich/govalidator v0.0.0-20200428143746-21a406dcc535/go.mod h1:oGkLhpf+kjZl6xBf758TQhh5XrAeiJv/7FRz/2spLIg= github.com/asaskevich/govalidator v0.0.0-20200907205600-7a23bdc65eef/go.mod h1:WaHUgvxTVq04UNunO+XhnAqY/wQc+bxr74GqbsZ/Jqw= github.com/asaskevich/govalidator v0.0.0-20210307081110-f21760c49a8d h1:Byv0BzEl3/e6D5CLfI0j/7hiIEtvGVFPCZ7Ei2oq8iQ= github.com/asaskevich/govalidator v0.0.0-20210307081110-f21760c49a8d/go.mod h1:WaHUgvxTVq04UNunO+XhnAqY/wQc+bxr74GqbsZ/Jqw= github.com/aws/aws-sdk-go v1.34.28/go.mod h1:H7NKnBqNVzoTJpGfLrQkkD+ytBA93eiDYi/+8rV9s48= github.com/cpuguy83/go-md2man/v2 v2.0.2/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/docker/go-units v0.3.3/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= github.com/docker/go-units v0.4.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= github.com/globalsign/mgo v0.0.0-20180905125535-1ca0a4f7cbcb/go.mod h1:xkRDCp4j0OGD1HRkm4kmhM+pmpv3AKq5SU7GMg4oO/Q= github.com/globalsign/mgo v0.0.0-20181015135952-eeefdecb41b8/go.mod h1:xkRDCp4j0OGD1HRkm4kmhM+pmpv3AKq5SU7GMg4oO/Q= github.com/go-openapi/analysis v0.0.0-20180825180245-b006789cd277/go.mod h1:k70tL6pCuVxPJOHXQ+wIac1FUrvNkHolPie/cLEU6hI= github.com/go-openapi/analysis v0.17.0/go.mod h1:IowGgpVeD0vNm45So8nr+IcQ3pxVtpRoBWb8PVZO0ik= github.com/go-openapi/analysis v0.18.0/go.mod h1:IowGgpVeD0vNm45So8nr+IcQ3pxVtpRoBWb8PVZO0ik= github.com/go-openapi/analysis v0.19.2/go.mod h1:3P1osvZa9jKjb8ed2TPng3f0i/UY9snX6gxi44djMjk= github.com/go-openapi/analysis v0.19.4/go.mod h1:3P1osvZa9jKjb8ed2TPng3f0i/UY9snX6gxi44djMjk= github.com/go-openapi/analysis v0.19.5/go.mod h1:hkEAkxagaIvIP7VTn8ygJNkd4kAYON2rCu0v0ObL0AU= github.com/go-openapi/analysis v0.19.10/go.mod h1:qmhS3VNFxBlquFJ0RGoDtylO9y4pgTAUNE9AEEMdlJQ= github.com/go-openapi/analysis v0.19.16/go.mod h1:GLInF007N83Ad3m8a/CbQ5TPzdnGT7workfHwuVjNVk= github.com/go-openapi/analysis v0.20.0/go.mod h1:BMchjvaHDykmRMsK40iPtvyOfFdMMxlOmQr9FBZk+Og= github.com/go-openapi/analysis v0.20.1 h1:zdVbw8yoD4SWZeq+cWdGgquaB0W4VrsJvDJHJND/Ktc= github.com/go-openapi/analysis v0.20.1/go.mod h1:BMchjvaHDykmRMsK40iPtvyOfFdMMxlOmQr9FBZk+Og= github.com/go-openapi/errors v0.17.0/go.mod h1:LcZQpmvG4wyF5j4IhA73wkLFQg+QJXOQHVjmcZxhka0= github.com/go-openapi/errors v0.18.0/go.mod h1:LcZQpmvG4wyF5j4IhA73wkLFQg+QJXOQHVjmcZxhka0= github.com/go-openapi/errors v0.19.2/go.mod h1:qX0BLWsyaKfvhluLejVpVNwNRdXZhEbTA4kxxpKBC94= github.com/go-openapi/errors v0.19.3/go.mod h1:qX0BLWsyaKfvhluLejVpVNwNRdXZhEbTA4kxxpKBC94= github.com/go-openapi/errors v0.19.6/go.mod h1:cM//ZKUKyO06HSwqAelJ5NsEMMcpa6VpXe8DOa1Mi1M= github.com/go-openapi/errors v0.19.7/go.mod h1:cM//ZKUKyO06HSwqAelJ5NsEMMcpa6VpXe8DOa1Mi1M= github.com/go-openapi/errors v0.19.8/go.mod h1:cM//ZKUKyO06HSwqAelJ5NsEMMcpa6VpXe8DOa1Mi1M= github.com/go-openapi/errors v0.19.9/go.mod h1:cM//ZKUKyO06HSwqAelJ5NsEMMcpa6VpXe8DOa1Mi1M= github.com/go-openapi/errors v0.20.1 h1:j23mMDtRxMwIobkpId7sWh7Ddcx4ivaoqUbfXx5P+a8= github.com/go-openapi/errors v0.20.1/go.mod h1:cM//ZKUKyO06HSwqAelJ5NsEMMcpa6VpXe8DOa1Mi1M= github.com/go-openapi/jsonpointer v0.17.0/go.mod h1:cOnomiV+CVVwFLk0A/MExoFMjwdsUdVpsRhURCKh+3M= github.com/go-openapi/jsonpointer v0.18.0/go.mod h1:cOnomiV+CVVwFLk0A/MExoFMjwdsUdVpsRhURCKh+3M= github.com/go-openapi/jsonpointer v0.19.2/go.mod h1:3akKfEdA7DF1sugOqz1dVQHBcuDBPKZGEoHC/NkiQRg= github.com/go-openapi/jsonpointer v0.19.3/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg= github.com/go-openapi/jsonpointer v0.19.5 h1:gZr+CIYByUqjcgeLXnQu2gHYQC9o73G2XUeOFYEICuY= github.com/go-openapi/jsonpointer v0.19.5/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg= github.com/go-openapi/jsonreference v0.17.0/go.mod h1:g4xxGn04lDIRh0GJb5QlpE3HfopLOL6uZrK/VgnsK9I= github.com/go-openapi/jsonreference v0.18.0/go.mod h1:g4xxGn04lDIRh0GJb5QlpE3HfopLOL6uZrK/VgnsK9I= github.com/go-openapi/jsonreference v0.19.2/go.mod h1:jMjeRr2HHw6nAVajTXJ4eiUwohSTlpa0o73RUL1owJc= github.com/go-openapi/jsonreference v0.19.3/go.mod h1:rjx6GuL8TTa9VaixXglHmQmIL98+wF9xc8zWvFonSJ8= github.com/go-openapi/jsonreference v0.19.5/go.mod h1:RdybgQwPxbL4UEjuAruzK1x3nE69AqPYEJeo/TWfEeg= github.com/go-openapi/jsonreference v0.19.6 h1:UBIxjkht+AWIgYzCDSv2GN+E/togfwXUJFRTWhl2Jjs= github.com/go-openapi/jsonreference v0.19.6/go.mod h1:diGHMEHg2IqXZGKxqyvWdfWU/aim5Dprw5bqpKkTvns= github.com/go-openapi/loads v0.17.0/go.mod h1:72tmFy5wsWx89uEVddd0RjRWPZm92WRLhf7AC+0+OOU= github.com/go-openapi/loads v0.18.0/go.mod h1:72tmFy5wsWx89uEVddd0RjRWPZm92WRLhf7AC+0+OOU= github.com/go-openapi/loads v0.19.0/go.mod h1:72tmFy5wsWx89uEVddd0RjRWPZm92WRLhf7AC+0+OOU= github.com/go-openapi/loads v0.19.2/go.mod h1:QAskZPMX5V0C2gvfkGZzJlINuP7Hx/4+ix5jWFxsNPs= github.com/go-openapi/loads v0.19.3/go.mod h1:YVfqhUCdahYwR3f3iiwQLhicVRvLlU/WO5WPaZvcvSI= github.com/go-openapi/loads v0.19.5/go.mod h1:dswLCAdonkRufe/gSUC3gN8nTSaB9uaS2es0x5/IbjY= github.com/go-openapi/loads v0.19.6/go.mod h1:brCsvE6j8mnbmGBh103PT/QLHfbyDxA4hsKvYBNEGVc= github.com/go-openapi/loads v0.19.7/go.mod h1:brCsvE6j8mnbmGBh103PT/QLHfbyDxA4hsKvYBNEGVc= github.com/go-openapi/loads v0.20.0/go.mod h1:2LhKquiE513rN5xC6Aan6lYOSddlL8Mp20AW9kpviM4= github.com/go-openapi/loads v0.20.2/go.mod h1:hTVUotJ+UonAMMZsvakEgmWKgtulweO9vYP2bQYKA/o= github.com/go-openapi/loads v0.21.0 h1:jYtUO4wwP7psAweisP/MDoOpdzsYEESdoPcsWjHDR68= github.com/go-openapi/loads v0.21.0/go.mod h1:rHYve9nZrQ4CJhyeIIFJINGCg1tQpx2yJrrNo8sf1ws= github.com/go-openapi/runtime v0.0.0-20180920151709-4f900dc2ade9/go.mod h1:6v9a6LTXWQCdL8k1AO3cvqx5OtZY/Y9wKTgaoP6YRfA= github.com/go-openapi/runtime v0.19.0/go.mod h1:OwNfisksmmaZse4+gpV3Ne9AyMOlP1lt4sK4FXt0O64= github.com/go-openapi/runtime v0.19.4/go.mod h1:X277bwSUBxVlCYR3r7xgZZGKVvBd/29gLDlFGtJ8NL4= github.com/go-openapi/runtime v0.19.15/go.mod h1:dhGWCTKRXlAfGnQG0ONViOZpjfg0m2gUt9nTQPQZuoo= github.com/go-openapi/runtime v0.19.16/go.mod h1:5P9104EJgYcizotuXhEuUrzVc+j1RiSjahULvYmlv98= github.com/go-openapi/runtime v0.19.24/go.mod h1:Lm9YGCeecBnUUkFTxPC4s1+lwrkJ0pthx8YvyjCfkgk= github.com/go-openapi/runtime v0.21.0 h1:giZ8eT26R+/rx6RX2MkYjZPY8vPYVKDhP/mOazrQHzM= github.com/go-openapi/runtime v0.21.0/go.mod h1:aQg+kaIQEn+A2CRSY1TxbM8+sT9g2V3aLc1FbIAnbbs= github.com/go-openapi/spec v0.17.0/go.mod h1:XkF/MOi14NmjsfZ8VtAKf8pIlbZzyoTvZsdfssdxcBI= github.com/go-openapi/spec v0.18.0/go.mod h1:XkF/MOi14NmjsfZ8VtAKf8pIlbZzyoTvZsdfssdxcBI= github.com/go-openapi/spec v0.19.2/go.mod h1:sCxk3jxKgioEJikev4fgkNmwS+3kuYdJtcsZsD5zxMY= github.com/go-openapi/spec v0.19.3/go.mod h1:FpwSN1ksY1eteniUU7X0N/BgJ7a4WvBFVA8Lj9mJglo= github.com/go-openapi/spec v0.19.6/go.mod h1:Hm2Jr4jv8G1ciIAo+frC/Ft+rR2kQDh8JHKHb3gWUSk= github.com/go-openapi/spec v0.19.8/go.mod h1:Hm2Jr4jv8G1ciIAo+frC/Ft+rR2kQDh8JHKHb3gWUSk= github.com/go-openapi/spec v0.19.15/go.mod h1:+81FIL1JwC5P3/Iuuozq3pPE9dXdIEGxFutcFKaVbmU= github.com/go-openapi/spec v0.20.0/go.mod h1:+81FIL1JwC5P3/Iuuozq3pPE9dXdIEGxFutcFKaVbmU= github.com/go-openapi/spec v0.20.1/go.mod h1:93x7oh+d+FQsmsieroS4cmR3u0p/ywH649a3qwC9OsQ= github.com/go-openapi/spec v0.20.3/go.mod h1:gG4F8wdEDN+YPBMVnzE85Rbhf+Th2DTvA9nFPQ5AYEg= github.com/go-openapi/spec v0.20.4 h1:O8hJrt0UMnhHcluhIdUgCLRWyM2x7QkBXRvOs7m+O1M= github.com/go-openapi/spec v0.20.4/go.mod h1:faYFR1CvsJZ0mNsmsphTMSoRrNV3TEDoAM7FOEWeq8I= github.com/go-openapi/strfmt v0.17.0/go.mod h1:P82hnJI0CXkErkXi8IKjPbNBM6lV6+5pLP5l494TcyU= github.com/go-openapi/strfmt v0.18.0/go.mod h1:P82hnJI0CXkErkXi8IKjPbNBM6lV6+5pLP5l494TcyU= github.com/go-openapi/strfmt v0.19.0/go.mod h1:+uW+93UVvGGq2qGaZxdDeJqSAqBqBdl+ZPMF/cC8nDY= github.com/go-openapi/strfmt v0.19.2/go.mod h1:0yX7dbo8mKIvc3XSKp7MNfxw4JytCfCD6+bY1AVL9LU= github.com/go-openapi/strfmt v0.19.3/go.mod h1:0yX7dbo8mKIvc3XSKp7MNfxw4JytCfCD6+bY1AVL9LU= github.com/go-openapi/strfmt v0.19.4/go.mod h1:eftuHTlB/dI8Uq8JJOyRlieZf+WkkxUuk0dgdHXr2Qk= github.com/go-openapi/strfmt v0.19.5/go.mod h1:eftuHTlB/dI8Uq8JJOyRlieZf+WkkxUuk0dgdHXr2Qk= github.com/go-openapi/strfmt v0.19.11/go.mod h1:UukAYgTaQfqJuAFlNxxMWNvMYiwiXtLsF2VwmoFtbtc= github.com/go-openapi/strfmt v0.20.0/go.mod h1:UukAYgTaQfqJuAFlNxxMWNvMYiwiXtLsF2VwmoFtbtc= github.com/go-openapi/strfmt v0.20.2/go.mod h1:43urheQI9dNtE5lTZQfuFJvjYJKPrxicATpEfZwHUNk= github.com/go-openapi/strfmt v0.21.0 h1:hX2qEZKmYks+t0hKeb4VTJpUm2UYsdL3+DCid5swxIs= github.com/go-openapi/strfmt v0.21.0/go.mod h1:ZRQ409bWMj+SOgXofQAGTIo2Ebu72Gs+WaRADcS5iNg= github.com/go-openapi/swag v0.17.0/go.mod h1:AByQ+nYG6gQg71GINrmuDXCPWdL640yX49/kXLo40Tg= github.com/go-openapi/swag v0.18.0/go.mod h1:AByQ+nYG6gQg71GINrmuDXCPWdL640yX49/kXLo40Tg= github.com/go-openapi/swag v0.19.2/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk= github.com/go-openapi/swag v0.19.5/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk= github.com/go-openapi/swag v0.19.7/go.mod h1:ao+8BpOPyKdpQz3AOJfbeEVpLmWAvlT1IfTe5McPyhY= github.com/go-openapi/swag v0.19.9/go.mod h1:ao+8BpOPyKdpQz3AOJfbeEVpLmWAvlT1IfTe5McPyhY= github.com/go-openapi/swag v0.19.12/go.mod h1:eFdyEBkTdoAf/9RXBvj4cr1nH7GD8Kzo5HTt47gr72M= github.com/go-openapi/swag v0.19.13/go.mod h1:QYRuS/SOXUCsnplDa677K7+DxSOj6IPNl/eQntq43wQ= github.com/go-openapi/swag v0.19.14/go.mod h1:QYRuS/SOXUCsnplDa677K7+DxSOj6IPNl/eQntq43wQ= github.com/go-openapi/swag v0.19.15 h1:D2NRCBzS9/pEY3gP9Nl8aDqGUcPFrwG2p+CNFrLyrCM= github.com/go-openapi/swag v0.19.15/go.mod h1:QYRuS/SOXUCsnplDa677K7+DxSOj6IPNl/eQntq43wQ= github.com/go-openapi/validate v0.18.0/go.mod h1:Uh4HdOzKt19xGIGm1qHf/ofbX1YQ4Y+MYsct2VUrAJ4= github.com/go-openapi/validate v0.19.2/go.mod h1:1tRCw7m3jtI8eNWEEliiAqUIcBztB2KDnRCRMUi7GTA= github.com/go-openapi/validate v0.19.3/go.mod h1:90Vh6jjkTn+OT1Eefm0ZixWNFjhtOH7vS9k0lo6zwJo= github.com/go-openapi/validate v0.19.10/go.mod h1:RKEZTUWDkxKQxN2jDT7ZnZi2bhZlbNMAuKvKB+IaGx8= github.com/go-openapi/validate v0.19.12/go.mod h1:Rzou8hA/CBw8donlS6WNEUQupNvUZ0waH08tGe6kAQ4= github.com/go-openapi/validate v0.19.15/go.mod h1:tbn/fdOwYHgrhPBzidZfJC2MIVvs9GA7monOmWBbeCI= github.com/go-openapi/validate v0.20.1/go.mod h1:b60iJT+xNNLfaQJUqLI7946tYiFEOuE9E4k54HpKcJ0= github.com/go-openapi/validate v0.20.3 h1:GZPPhhKSZrE8HjB4eEkoYAZmoWA4+tCemSgINH1/vKw= github.com/go-openapi/validate v0.20.3/go.mod h1:goDdqVGiigM3jChcrYJxD2joalke3ZXeftD16byIjA4= github.com/go-sql-driver/mysql v1.5.0/go.mod h1:DCzpHaOWr8IXmIStZouvnhqoel9Qv2LBy8hT2VhHyBg= github.com/go-stack/stack v1.8.0 h1:5SgMzNM5HxrEjV0ww2lTmX6E2Izsfxas4+YHWRs3Lsk= github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= github.com/gobuffalo/attrs v0.0.0-20190224210810-a9411de4debd/go.mod h1:4duuawTqi2wkkpB4ePgWMaai6/Kc6WEz83bhFwpHzj0= github.com/gobuffalo/depgen v0.0.0-20190329151759-d478694a28d3/go.mod h1:3STtPUQYuzV0gBVOY3vy6CfMm/ljR4pABfrTeHNLHUY= github.com/gobuffalo/depgen v0.1.0/go.mod h1:+ifsuy7fhi15RWncXQQKjWS9JPkdah5sZvtHc2RXGlg= github.com/gobuffalo/envy v1.6.15/go.mod h1:n7DRkBerg/aorDM8kbduw5dN3oXGswK5liaSCx4T5NI= github.com/gobuffalo/envy v1.7.0/go.mod h1:n7DRkBerg/aorDM8kbduw5dN3oXGswK5liaSCx4T5NI= github.com/gobuffalo/flect v0.1.0/go.mod h1:d2ehjJqGOH/Kjqcoz+F7jHTBbmDb38yXA598Hb50EGs= github.com/gobuffalo/flect v0.1.1/go.mod h1:8JCgGVbRjJhVgD6399mQr4fx5rRfGKVzFjbj6RE/9UI= github.com/gobuffalo/flect v0.1.3/go.mod h1:8JCgGVbRjJhVgD6399mQr4fx5rRfGKVzFjbj6RE/9UI= github.com/gobuffalo/genny v0.0.0-20190329151137-27723ad26ef9/go.mod h1:rWs4Z12d1Zbf19rlsn0nurr75KqhYp52EAGGxTbBhNk= github.com/gobuffalo/genny v0.0.0-20190403191548-3ca520ef0d9e/go.mod h1:80lIj3kVJWwOrXWWMRzzdhW3DsrdjILVil/SFKBzF28= github.com/gobuffalo/genny v0.1.0/go.mod h1:XidbUqzak3lHdS//TPu2OgiFB+51Ur5f7CSnXZ/JDvo= github.com/gobuffalo/genny v0.1.1/go.mod h1:5TExbEyY48pfunL4QSXxlDOmdsD44RRq4mVZ0Ex28Xk= github.com/gobuffalo/gitgen v0.0.0-20190315122116-cc086187d211/go.mod h1:vEHJk/E9DmhejeLeNt7UVvlSGv3ziL+djtTr3yyzcOw= github.com/gobuffalo/gogen v0.0.0-20190315121717-8f38393713f5/go.mod h1:V9QVDIxsgKNZs6L2IYiGR8datgMhB577vzTDqypH360= github.com/gobuffalo/gogen v0.1.0/go.mod h1:8NTelM5qd8RZ15VjQTFkAW6qOMx5wBbW4dSCS3BY8gg= github.com/gobuffalo/gogen v0.1.1/go.mod h1:y8iBtmHmGc4qa3urIyo1shvOD8JftTtfcKi+71xfDNE= github.com/gobuffalo/logger v0.0.0-20190315122211-86e12af44bc2/go.mod h1:QdxcLw541hSGtBnhUc4gaNIXRjiDppFGaDqzbrBd3v8= github.com/gobuffalo/mapi v1.0.1/go.mod h1:4VAGh89y6rVOvm5A8fKFxYG+wIW6LO1FMTG9hnKStFc= github.com/gobuffalo/mapi v1.0.2/go.mod h1:4VAGh89y6rVOvm5A8fKFxYG+wIW6LO1FMTG9hnKStFc= github.com/gobuffalo/packd v0.0.0-20190315124812-a385830c7fc0/go.mod h1:M2Juc+hhDXf/PnmBANFCqx4DM3wRbgDvnVWeG2RIxq4= github.com/gobuffalo/packd v0.1.0/go.mod h1:M2Juc+hhDXf/PnmBANFCqx4DM3wRbgDvnVWeG2RIxq4= github.com/gobuffalo/packr/v2 v2.0.9/go.mod h1:emmyGweYTm6Kdper+iywB6YK5YzuKchGtJQZ0Odn4pQ= github.com/gobuffalo/packr/v2 v2.2.0/go.mod h1:CaAwI0GPIAv+5wKLtv8Afwl+Cm78K/I/VCm/3ptBN+0= github.com/gobuffalo/syncx v0.0.0-20190224160051-33c29581e754/go.mod h1:HhnNqWY95UYwwW3uSASeV7vtgYkT2t16hJgV3AEPUpw= github.com/goharbor/go-client v0.26.2 h1:pu79j/vmrsR7HF5YztHJqUU/Ki2VLJo+c4pMUvdjJmg= github.com/goharbor/go-client v0.26.2/go.mod h1:XMWHucuHU9VTRx6U6wYwbRuyCVhE6ffJGRjaeo0nvwo= github.com/golang/snappy v0.0.1/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38= github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/uuid v1.0.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.1.2 h1:EVhdT+1Kseyi1/pUmXKaFxYsDNy9RQYkMWRH68J/W7Y= github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2s0bqwp9tc8= github.com/inconshreveable/mousetrap v1.1.0/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw= github.com/jmespath/go-jmespath v0.4.0/go.mod h1:T8mJZnbsbmF+m6zOOFylbeCJqk5+pHWvzYPziyZiYoo= github.com/jmespath/go-jmespath/internal/testify v1.5.1/go.mod h1:L3OGu8Wl2/fWfCI6z80xFu9LTZmf1ZRjMHUOPmWr69U= github.com/joho/godotenv v1.3.0/go.mod h1:7hK45KPybAkOC6peb+G5yklZfMxEjkZhHbwpqxOKXbg= github.com/josharian/intern v1.0.0 h1:vlS4z54oSdjm0bgjRigI+G1HpF+tI+9rE5LLzOg8HmY= github.com/josharian/intern v1.0.0/go.mod h1:5DoeVV0s6jJacbCEi61lwdGj/aVlrQvzHFFd8Hwg//Y= github.com/karrick/godirwalk v1.8.0/go.mod h1:H5KPZjojv4lE+QYImBI8xVtrBRgYrIVsaRPx4tDPEn4= github.com/karrick/godirwalk v1.10.3/go.mod h1:RoGL9dQei4vP9ilrpETWE8CLOZ1kiN0LhBygSwrAsHA= github.com/kisielk/errcheck v1.2.0/go.mod h1:/BMXB+zMLi60iA8Vv6Ksmxu/1UDYcXs4uQLJ+jE2L00= github.com/klauspost/compress v1.9.5/go.mod h1:RyIbtBH6LamlWaDj8nUwkbUhJ87Yi3uG0guNDohfE1A= github.com/klauspost/compress v1.13.6/go.mod h1:/3/Vjq9QcHkK5uEr5lBEmyoZ1iFhe47etQ6QUkpK6sk= github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/konsorten/go-windows-terminal-sequences v1.0.2/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/pty v1.1.5/go.mod h1:9r2w37qlBe7rQ6e1fg1S/9xpWHSnaqNdHD3WcMdbPDA= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= github.com/mailru/easyjson v0.0.0-20180823135443-60711f1a8329/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= github.com/mailru/easyjson v0.0.0-20190312143242-1de009706dbe/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= github.com/mailru/easyjson v0.0.0-20190614124828-94de47d64c63/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= github.com/mailru/easyjson v0.0.0-20190626092158-b2ccc519800e/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= github.com/mailru/easyjson v0.7.1/go.mod h1:KAzv3t3aY1NaHWoQz1+4F1ccyAH66Jk7yos7ldAVICs= github.com/mailru/easyjson v0.7.6 h1:8yTIVnZgCoiM1TgqoeTl+LfU5Jg6/xL3QhGQnimLYnA= github.com/mailru/easyjson v0.7.6/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc= github.com/markbates/oncer v0.0.0-20181203154359-bf2de49a0be2/go.mod h1:Ld9puTsIW75CHf65OeIOkyKbteujpZVXDpWK6YGZbxE= github.com/markbates/safe v1.0.1/go.mod h1:nAqgmRi7cY2nqMc92/bSEeQA+R4OheNU2T1kNSCBdG0= github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= github.com/mitchellh/mapstructure v1.3.2/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= github.com/mitchellh/mapstructure v1.3.3/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= github.com/mitchellh/mapstructure v1.4.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= github.com/mitchellh/mapstructure v1.4.1/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= github.com/mitchellh/mapstructure v1.5.0 h1:jeMsZIYE/09sWLaz43PL7Gy6RuMjD2eJVyuac5Z2hdY= github.com/mitchellh/mapstructure v1.5.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= github.com/montanaflynn/stats v0.0.0-20171201202039-1bf9dbcd8cbe/go.mod h1:wL8QJuTMNUDYhXwkmfOly8iTdp5TEcJFWZD2D7SIkUc= github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e h1:fD57ERR4JtEqsWbfPhv4DMiApHyliiK5xCTNVSPiaAs= github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno= github.com/oklog/ulid v1.3.1 h1:EGfNDEx6MqHz8B3uNV6QAib1UR2Lm97sHi3ocA6ESJ4= github.com/oklog/ulid v1.3.1/go.mod h1:CirwcVhetQ6Lv90oh/F+FBtV6XMibvdAFo93nm5qn4U= github.com/opentracing/opentracing-go v1.2.0 h1:uEJPy/1a5RIPAJ0Ov+OIO8OxWu77jEv+1B0VhjKrZUs= github.com/opentracing/opentracing-go v1.2.0/go.mod h1:GxEUsuufX4nBwe+T+Wl9TAgYrxe9dPLANfrWvHYVTgc= github.com/pborman/uuid v1.2.0/go.mod h1:X/NO0urCmaxf9VXbdlT7C2Yzkj2IKimNn4k+gtPdI/k= github.com/pelletier/go-toml v1.4.0/go.mod h1:PN7xzY2wHTK0K9p34ErDQMlFxa51Fk0OUruD3k1mMwo= github.com/pelletier/go-toml v1.7.0/go.mod h1:vwGMzjaWMwyfHwgIBhI2YUM4fB6nL6lVAvS1LBMMhTE= github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/rogpeppe/go-internal v1.1.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= github.com/rogpeppe/go-internal v1.2.2/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/sergi/go-diff v1.0.0/go.mod h1:0CfEIISq7TuYL3j771MWULgwwjU+GofnZX9QAmXWZgo= github.com/sirupsen/logrus v1.4.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= github.com/sirupsen/logrus v1.4.1/go.mod h1:ni0Sbl8bgC9z8RoU9G6nDWqqs/fq4eDPysMBDgk/93Q= github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= github.com/spf13/cobra v0.0.3/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ= github.com/spf13/cobra v1.7.0 h1:hyqWnYt1ZQShIddO5kBpj3vu05/++x6tJ6dg8EC572I= github.com/spf13/cobra v1.7.0/go.mod h1:uLxZILRyS/50WlhOIKD7W6V5bgeIt+4sICxh6uRMrb0= github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.2.0/go.mod h1:qt09Ya8vawLte6SNmTgCsAVtYtaKzEcn8ATUoHMkEqE= github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= github.com/stretchr/testify v1.8.1 h1:w7B6lhMri9wdJUVmEZPGGhZzrYTPvgJArz7wNPgYKsk= github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= github.com/tidwall/pretty v1.0.0 h1:HsD+QiTn7sK6flMKIvNmpqz1qrpP3Ps6jOKIKMooyg4= github.com/tidwall/pretty v1.0.0/go.mod h1:XNkn88O1ChpSDQmQeStsy+sBenx6DDtFZJxhVysOjyk= github.com/vektah/gqlparser v1.1.2/go.mod h1:1ycwN7Ij5njmMkPPAOaRFY4rET2Enx7IkVv3vaXspKw= github.com/xdg-go/pbkdf2 v1.0.0/go.mod h1:jrpuAogTd400dnrH08LKmI/xc1MbPOebTwRqcT5RDeI= github.com/xdg-go/scram v1.0.2/go.mod h1:1WAq6h33pAW+iRreB34OORO2Nf7qel3VV3fjBj+hCSs= github.com/xdg-go/stringprep v1.0.2/go.mod h1:8F9zXuvzgwmyT5DUm4GUfZGDdT3W+LCvS6+da4O5kxM= github.com/xdg/scram v0.0.0-20180814205039-7eeb5667e42c/go.mod h1:lB8K/P019DLNhemzwFU4jHLhdvlE6uDZjXFejJXr49I= github.com/xdg/stringprep v0.0.0-20180714160509-73f8eece6fdc/go.mod h1:Jhud4/sHMO4oL310DaZAKk9ZaJ08SJfe+sJh0HrGL1Y= github.com/youmark/pkcs8 v0.0.0-20181117223130-1be2e3e5546d/go.mod h1:rHwXgn7JulP+udvsHwJoVG1YGAP6VLg4y9I5dyZdqmA= go.mongodb.org/mongo-driver v1.0.3/go.mod h1:u7ryQJ+DOzQmeO7zB6MHyr8jkEQvC8vH7qLUO4lqsUM= go.mongodb.org/mongo-driver v1.1.1/go.mod h1:u7ryQJ+DOzQmeO7zB6MHyr8jkEQvC8vH7qLUO4lqsUM= go.mongodb.org/mongo-driver v1.3.0/go.mod h1:MSWZXKOynuguX+JSvwP8i+58jYCXxbia8HS3gZBapIE= go.mongodb.org/mongo-driver v1.3.4/go.mod h1:MSWZXKOynuguX+JSvwP8i+58jYCXxbia8HS3gZBapIE= go.mongodb.org/mongo-driver v1.4.3/go.mod h1:WcMNYLx/IlOxLe6JRJiv2uXuCz6zBLndR4SoGjYphSc= go.mongodb.org/mongo-driver v1.4.4/go.mod h1:WcMNYLx/IlOxLe6JRJiv2uXuCz6zBLndR4SoGjYphSc= go.mongodb.org/mongo-driver v1.4.6/go.mod h1:WcMNYLx/IlOxLe6JRJiv2uXuCz6zBLndR4SoGjYphSc= go.mongodb.org/mongo-driver v1.5.1/go.mod h1:gRXCHX4Jo7J0IJ1oDQyUxF7jfy19UfxniMS4xxMmUqw= go.mongodb.org/mongo-driver v1.7.3 h1:G4l/eYY9VrQAK/AUgkV0koQKzQnyddnWxrd/Etf0jIs= go.mongodb.org/mongo-driver v1.7.3/go.mod h1:NqaYOwnXWr5Pm7AOpO5QFxKJ503nbMse/R79oO62zWg= golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20190320223903-b7391e95e576/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20190422162423-af44ce270edf/go.mod h1:WFFai1msRO1wXaEeE5yQxYXgSfI8pQAWXbQop6sCtWE= golang.org/x/crypto v0.0.0-20190530122614-20be4c3c3ed5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190611184440-5c40567a22f8/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190617133340-57b3e21c3d56/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20200302210943-78000ba7a073/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/net v0.0.0-20181005035420-146acd28ed58/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190320064053-1272bf9dcd53/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190827160401-ba9fcec4b297/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200202094626-16171245cfb2/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200602114024-627f9648deb9/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= golang.org/x/net v0.0.0-20201110031124-69a78807bb2b/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20201202161906-c7110b5ffcbb/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20201224014010-6772e930b67b/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210119194325-5f4716e94777/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210421230115-4e50805a0758/go.mod h1:72T/g9IO56b78aLF+1Kcs5dz7/ng1VjMUvfKvpfy+jM= golang.org/x/net v0.4.0 h1:Q5QPcMlvfxFTAPV0+07Xz/MpK9NTXu2VDUuy0FeMfaU= golang.org/x/net v0.4.0/go.mod h1:MBQ8lrhLObU/6UmLb4fmbmk5OcyYmqtbGd/9yIeKjEE= golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190412183630-56d357773e84/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190321052220-f7bb7a8bee54/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190403152447-81d4e9dc473e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190419153524-e8e3143a4f4a/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190531175056-4c3a928424d2/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190616124812-15dcb6c0061f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210420072515-93ed5bcd2bfe/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20211025201205-69cdffdb9359/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.3.0 h1:w8ZOecv6NaNa/zC8944JTU3vz4u6Lagfk4RPQxv92NQ= golang.org/x/sys v0.3.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.4/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= golang.org/x/text v0.5.0 h1:OLmvp0KP+FVG99Ct/qFiL/Fhk4zp4QQnZ7b2U+5piUM= golang.org/x/text v0.5.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20181030221726-6c7e314b6563/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190125232054-d66bd3c5d5a6/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190329151228-23e29df326fe/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190416151739-9c9e1878f421/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190420181800-aa740d480789/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190531172133-b3315ee88b7d/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= golang.org/x/tools v0.0.0-20190614205625-5aca471b1d59/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= golang.org/x/tools v0.0.0-20190617190820-da514acc4774/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f h1:BLraFXnmrev5lT+xlilqcH8XK9/i0At2xKjWk4p6zsU= gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.0-20200605160147-a5ece683394c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.0-20200615113413-eeeca48fe776/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= 07070100000023000041ED00000000000000000000000265E8411F00000000000000000000000000000000000000000000001500000000harbor-cli-0.0.1/pkg07070100000024000041ED00000000000000000000000265E8411F00000000000000000000000000000000000000000000001F00000000harbor-cli-0.0.1/pkg/constants07070100000025000081A400000000000000000000000165E8411F000000ED000000000000000000000000000000000000002C00000000harbor-cli-0.0.1/pkg/constants/constants.gopackage constants const ( HarborCredentialName = "HARBORCREDENTIALNAME" CredentialNameOption = "credential-name" CredentialNameHelp = "Name of the credential to use for authentication (defaults to the current logged in session)" ) 07070100000026000041ED00000000000000000000000265E8411F00000000000000000000000000000000000000000000001B00000000harbor-cli-0.0.1/pkg/utils07070100000027000081A400000000000000000000000165E8411F00000F72000000000000000000000000000000000000002F00000000harbor-cli-0.0.1/pkg/utils/credential_store.gopackage utils import ( "fmt" "log" "net/url" "os" "path/filepath" "github.com/adrg/xdg" "github.com/goharbor/harbor-cli/pkg/constants" "gopkg.in/yaml.v2" ) var configFile = filepath.Join(xdg.Home, ".harbor", "config") type Credential struct { Name string `yaml:"name"` Username string `yaml:"username"` Password string `yaml:"password"` ServerAddress string `yaml:"serveraddress"` } type CredentialStore struct { CurrentCredentialName string `yaml:"current-credential-name"` Credentials []Credential `yaml:"credentials"` } func checkAndUpdateCredentialName(credential *Credential) { if credential.Name != "" { return } parsedUrl, err := url.Parse(credential.ServerAddress) if err != nil { panic(err) } credential.Name = parsedUrl.Hostname() + "-" + credential.Username log.Println("credential name not specified, storing the credential with the name as:", credential.Name) } func readCredentialStore() (CredentialStore, error) { configInfo, err := os.ReadFile(configFile) if err != nil { return CredentialStore{}, err } var credentialStore CredentialStore if err := yaml.Unmarshal(configInfo, &credentialStore); err != nil { return CredentialStore{}, err } return credentialStore, nil } func checkAndCreateConfigFile() { if _, err := os.Stat(configFile); os.IsNotExist(err) { // Create the parent directory if it doesn't exist if err := os.MkdirAll(filepath.Dir(configFile), os.ModePerm); err != nil { panic(err) } if _, err := os.Create(configFile); err != nil { panic(err) } } else if err != nil { panic(err) } } func StoreCredential(credential Credential, setAsCurrentCredential bool) error { checkAndUpdateCredentialName(&credential) checkAndCreateConfigFile() credentialStore, err := readCredentialStore() if err != nil { return fmt.Errorf("failed to read credential store: %s", err) } // Check and remove the credential with same username and serveraddress. removeIndex := -1 for i, cred := range credentialStore.Credentials { if cred.Username == credential.Username && cred.ServerAddress == credential.ServerAddress { removeIndex = i break } } if removeIndex != -1 { credentialStore.Credentials = append(credentialStore.Credentials[:removeIndex], credentialStore.Credentials[removeIndex+1:]...) } credentialStore.Credentials = append(credentialStore.Credentials, credential) if setAsCurrentCredential { credentialStore.CurrentCredentialName = credential.Name } bytes, err := yaml.Marshal(credentialStore) if err != nil { return err } if err = os.WriteFile(configFile, bytes, 0600); err != nil { return err } log.Println("Saving credentials to:", configFile) return nil } // resolveCredential resolves the credential in the following priority order: // 1. credentialName specified by the user via CLI argument // 2. credentialName specified by the user via environment variable // 3. current active credential func resolveCredential(credentialName string) (Credential, error) { credentialStore, err := readCredentialStore() if err != nil { return Credential{}, fmt.Errorf("failed to read credential store: %s", err) } // If credentialName is not specified, check environment variable if credentialName == "" { credentialName = os.Getenv(constants.HarborCredentialName) } // If user has not specified the credential to use, use the current active credential if credentialName == "" { credentialName = credentialStore.CurrentCredentialName } if credentialName == "" { return Credential{}, fmt.Errorf("current credential name not set, please login again") } // Look for the credential with the given name for _, cred := range credentialStore.Credentials { if cred.Name == credentialName { return cred, nil } } return Credential{}, fmt.Errorf("no credential found for the name: %s, please login again with the credential name: %s", credentialName, credentialName) } 07070100000028000081A400000000000000000000000165E8411F00000408000000000000000000000000000000000000002400000000harbor-cli-0.0.1/pkg/utils/utils.gopackage utils import ( "encoding/json" "fmt" "os" "github.com/goharbor/go-client/pkg/harbor" v2client "github.com/goharbor/go-client/pkg/sdk/v2.0/client" ) // Returns Harbor v2 client for given clientConfig func GetClientByConfig(clientConfig *harbor.ClientSetConfig) *v2client.HarborAPI { cs, err := harbor.NewClientSet(clientConfig) if err != nil { panic(err) } return cs.V2() } // Returns Harbor v2 client after resolving the credential name func GetClientByCredentialName(credentialName string) *v2client.HarborAPI { credential, err := resolveCredential(credentialName) if err != nil { fmt.Print(err) os.Exit(1) } clientConfig := &harbor.ClientSetConfig{ URL: credential.ServerAddress, Username: credential.Username, Password: credential.Password, } return GetClientByConfig(clientConfig) } func PrintPayloadInJSONFormat(payload any) { if payload == nil { return } jsonStr, err := json.MarshalIndent(payload, "", " ") if err != nil { panic(err) } fmt.Println(string(jsonStr)) } 07070100000029000041ED00000000000000000000000265E8411F00000000000000000000000000000000000000000000001600000000harbor-cli-0.0.1/test0707010000002A000041ED00000000000000000000000265E8411F00000000000000000000000000000000000000000000001A00000000harbor-cli-0.0.1/test/e2e0707010000002B000081A400000000000000000000000165E8411F00000023000000000000000000000000000000000000002200000000harbor-cli-0.0.1/test/e2e/test.mde2e tests for cmd can slide in here07070100000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000B00000000TRAILER!!!166 blocks
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor