├── vendor ├── github.com │ ├── spf13 │ │ └── pflag │ │ │ ├── .gitignore │ │ │ ├── .travis.yml │ │ │ └── LICENSE │ ├── go-openapi │ │ ├── jsonpointer │ │ │ ├── .gitignore │ │ │ ├── .editorconfig │ │ │ └── README.md │ │ ├── jsonreference │ │ │ ├── .gitignore │ │ │ ├── README.md │ │ │ ├── .golangci.yml │ │ │ └── internal │ │ │ │ └── normalize_url.go │ │ └── swag │ │ │ ├── .gitignore │ │ │ ├── .gitattributes │ │ │ ├── .editorconfig │ │ │ ├── post_go18.go │ │ │ ├── pre_go18.go │ │ │ ├── file.go │ │ │ ├── .golangci.yml │ │ │ ├── doc.go │ │ │ ├── README.md │ │ │ ├── net.go │ │ │ ├── path.go │ │ │ ├── post_go19.go │ │ │ ├── pre_go19.go │ │ │ └── name_lexem.go │ ├── go-errors │ │ └── errors │ │ │ ├── .travis.yml │ │ │ ├── error_1_13.go │ │ │ ├── LICENSE.MIT │ │ │ └── error_backward.go │ ├── google │ │ ├── gnostic-models │ │ │ ├── jsonschema │ │ │ │ └── README.md │ │ │ ├── compiler │ │ │ │ ├── README.md │ │ │ │ ├── main.go │ │ │ │ ├── context.go │ │ │ │ └── error.go │ │ │ ├── extensions │ │ │ │ ├── README.md │ │ │ │ └── extensions.go │ │ │ └── openapiv2 │ │ │ │ ├── README.md │ │ │ │ └── document.go │ │ ├── gofuzz │ │ │ ├── .travis.yml │ │ │ └── doc.go │ │ └── go-cmp │ │ │ ├── cmp │ │ │ ├── internal │ │ │ │ ├── flags │ │ │ │ │ └── flags.go │ │ │ │ ├── diff │ │ │ │ │ └── debug_disable.go │ │ │ │ └── value │ │ │ │ │ ├── pointer_purego.go │ │ │ │ │ └── pointer_unsafe.go │ │ │ ├── export_panic.go │ │ │ ├── export_unsafe.go │ │ │ └── report.go │ │ │ └── LICENSE │ ├── josharian │ │ └── intern │ │ │ ├── README.md │ │ │ ├── intern.go │ │ │ └── license.md │ ├── golang │ │ └── protobuf │ │ │ ├── AUTHORS │ │ │ ├── CONTRIBUTORS │ │ │ ├── ptypes │ │ │ └── doc.go │ │ │ ├── proto │ │ │ ├── wrappers.go │ │ │ ├── discard.go │ │ │ ├── defaults.go │ │ │ └── wire.go │ │ │ └── LICENSE │ ├── mattn │ │ └── go-runewidth │ │ │ ├── runewidth_appengine.go │ │ │ ├── runewidth_js.go │ │ │ ├── .travis.yml │ │ │ ├── go.test.sh │ │ │ ├── runewidth_windows.go │ │ │ ├── README.md │ │ │ ├── LICENSE │ │ │ └── runewidth_posix.go │ ├── olekukonko │ │ └── tablewriter │ │ │ ├── .gitignore │ │ │ ├── .travis.yml │ │ │ ├── LICENSE.md │ │ │ └── csv.go │ ├── mailru │ │ └── easyjson │ │ │ ├── jlexer │ │ │ ├── error.go │ │ │ ├── bytestostr_nounsafe.go │ │ │ └── bytestostr.go │ │ │ └── LICENSE │ └── davecgh │ │ └── go-spew │ │ ├── LICENSE │ │ └── spew │ │ └── bypasssafe.go ├── k8s.io │ └── kube-openapi │ │ └── pkg │ │ ├── validation │ │ └── spec │ │ │ ├── .gitignore │ │ │ ├── license.go │ │ │ ├── contact_info.go │ │ │ └── external_docs.go │ │ └── internal │ │ ├── third_party │ │ └── go-json-experiment │ │ │ └── json │ │ │ ├── AUTHORS │ │ │ ├── CONTRIBUTORS │ │ │ ├── LICENSE │ │ │ └── fold.go │ │ ├── flags.go │ │ └── serialization.go ├── sigs.k8s.io │ ├── json │ │ ├── OWNERS │ │ ├── code-of-conduct.md │ │ ├── SECURITY_CONTACTS │ │ ├── doc.go │ │ ├── Makefile │ │ ├── internal │ │ │ └── golang │ │ │ │ └── encoding │ │ │ │ └── json │ │ │ │ ├── fuzz.go │ │ │ │ └── tags.go │ │ ├── SECURITY.md │ │ ├── README.md │ │ └── CONTRIBUTING.md │ ├── yaml │ │ ├── code-of-conduct.md │ │ ├── .gitignore │ │ ├── .travis.yml │ │ ├── yaml_go110.go │ │ ├── OWNERS │ │ ├── RELEASE.md │ │ ├── SECURITY_CONTACTS │ │ └── CONTRIBUTING.md │ └── kustomize │ │ └── kyaml │ │ ├── openapi │ │ ├── kubernetesapi │ │ │ ├── v1_21_2 │ │ │ │ └── swagger.pb │ │ │ └── openapiinfo.go │ │ └── Makefile │ │ ├── sliceutil │ │ └── slice.go │ │ ├── internal │ │ └── forked │ │ │ └── github.com │ │ │ └── go-yaml │ │ │ └── yaml │ │ │ ├── NOTICE │ │ │ ├── writerc.go │ │ │ └── LICENSE │ │ ├── yaml │ │ ├── const.go │ │ ├── mapnode.go │ │ ├── internal │ │ │ └── k8sgen │ │ │ │ └── pkg │ │ │ │ ├── util │ │ │ │ └── sets │ │ │ │ │ └── empty.go │ │ │ │ ├── selection │ │ │ │ └── operator.go │ │ │ │ └── labels │ │ │ │ └── copied.deepcopy.go │ │ ├── schema │ │ │ └── schema.go │ │ ├── doc.go │ │ └── util.go │ │ ├── sets │ │ ├── stringlist.go │ │ └── string.go │ │ ├── errors │ │ └── errors.go │ │ └── utils │ │ └── pathsplitter.go ├── gopkg.in │ ├── yaml.v2 │ │ ├── .travis.yml │ │ ├── NOTICE │ │ ├── writerc.go │ │ └── LICENSE.libyaml │ └── yaml.v3 │ │ ├── NOTICE │ │ ├── writerc.go │ │ └── LICENSE └── google.golang.org │ └── protobuf │ ├── encoding │ └── prototext │ │ └── doc.go │ ├── internal │ ├── flags │ │ ├── proto_legacy_enable.go │ │ ├── proto_legacy_disable.go │ │ └── flags.go │ ├── impl │ │ ├── codec_map_go112.go │ │ ├── codec_unsafe.go │ │ ├── enum.go │ │ ├── codec_map_go111.go │ │ └── weak.go │ ├── errors │ │ ├── is_go113.go │ │ └── is_go112.go │ ├── genid │ │ ├── doc.go │ │ ├── wrappers.go │ │ ├── map_entry.go │ │ ├── empty_gen.go │ │ ├── goname.go │ │ ├── field_mask_gen.go │ │ ├── source_context_gen.go │ │ ├── any_gen.go │ │ ├── duration_gen.go │ │ └── timestamp_gen.go │ ├── strs │ │ └── strings_pure.go │ ├── pragma │ │ └── pragma.go │ ├── descopts │ │ └── options.go │ ├── set │ │ └── ints.go │ ├── encoding │ │ └── text │ │ │ └── doc.go │ └── detrand │ │ └── rand.go │ ├── runtime │ ├── protoiface │ │ └── legacy.go │ └── protoimpl │ │ ├── impl.go │ │ └── version.go │ ├── proto │ ├── proto_reflect.go │ ├── proto_methods.go │ ├── reset.go │ ├── wrappers.go │ ├── proto.go │ ├── size_gen.go │ ├── equal.go │ └── checkinit.go │ ├── PATENTS │ ├── reflect │ └── protoreflect │ │ ├── value_pure.go │ │ └── methods.go │ └── LICENSE ├── images ├── doc_gen_break.png ├── values-example.png ├── doc_gen_break_preview.png └── values-example-preview.png ├── .gitignore ├── .github ├── .kodiak.toml └── workflows │ ├── ci.yml │ └── release.yml ├── hack ├── license │ ├── go.txt │ ├── bash.txt │ ├── dockerfile.txt │ └── makefile.txt ├── test.sh ├── e2e.sh ├── fmt.sh └── build.sh ├── testdata ├── doc.json └── doc.yaml ├── templates └── lib.go ├── walk ├── comment.go ├── visitor.go ├── scalar.go └── nonassociative_sequence.go ├── go.mod └── api └── types.go /vendor/github.com/spf13/pflag/.gitignore: -------------------------------------------------------------------------------- 1 | .idea/* 2 | 3 | -------------------------------------------------------------------------------- /vendor/github.com/go-openapi/jsonpointer/.gitignore: -------------------------------------------------------------------------------- 1 | secrets.yml 2 | -------------------------------------------------------------------------------- /vendor/github.com/go-openapi/jsonreference/.gitignore: -------------------------------------------------------------------------------- 1 | secrets.yml 2 | -------------------------------------------------------------------------------- /vendor/github.com/go-openapi/swag/.gitignore: -------------------------------------------------------------------------------- 1 | secrets.yml 2 | vendor 3 | Godeps 4 | .idea 5 | -------------------------------------------------------------------------------- /vendor/k8s.io/kube-openapi/pkg/validation/spec/.gitignore: -------------------------------------------------------------------------------- 1 | secrets.yml 2 | coverage.out 3 | -------------------------------------------------------------------------------- /images/doc_gen_break.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kubepack/chart-doc-gen/HEAD/images/doc_gen_break.png -------------------------------------------------------------------------------- /images/values-example.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kubepack/chart-doc-gen/HEAD/images/values-example.png -------------------------------------------------------------------------------- /images/doc_gen_break_preview.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kubepack/chart-doc-gen/HEAD/images/doc_gen_break_preview.png -------------------------------------------------------------------------------- /images/values-example-preview.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kubepack/chart-doc-gen/HEAD/images/values-example-preview.png -------------------------------------------------------------------------------- /vendor/github.com/go-openapi/swag/.gitattributes: -------------------------------------------------------------------------------- 1 | # gofmt always uses LF, whereas Git uses CRLF on Windows. 2 | *.go text eol=lf 3 | -------------------------------------------------------------------------------- /vendor/sigs.k8s.io/json/OWNERS: -------------------------------------------------------------------------------- 1 | # See the OWNERS docs at https://go.k8s.io/owners 2 | 3 | approvers: 4 | - deads2k 5 | - lavalamp 6 | - liggitt 7 | -------------------------------------------------------------------------------- /vendor/github.com/go-errors/errors/.travis.yml: -------------------------------------------------------------------------------- 1 | language: go 2 | 3 | go: 4 | - "1.8.x" 5 | - "1.10.x" 6 | - "1.13.x" 7 | - "1.14.x" 8 | - "1.16.x" 9 | -------------------------------------------------------------------------------- /vendor/github.com/google/gnostic-models/jsonschema/README.md: -------------------------------------------------------------------------------- 1 | # jsonschema 2 | 3 | This directory contains code for reading, writing, and manipulating JSON 4 | schemas. 5 | -------------------------------------------------------------------------------- /vendor/github.com/google/gnostic-models/compiler/README.md: -------------------------------------------------------------------------------- 1 | # Compiler support code 2 | 3 | This directory contains compiler support code used by Gnostic and Gnostic 4 | extensions. 5 | -------------------------------------------------------------------------------- /vendor/github.com/google/gofuzz/.travis.yml: -------------------------------------------------------------------------------- 1 | language: go 2 | 3 | go: 4 | - 1.11.x 5 | - 1.12.x 6 | - 1.13.x 7 | - master 8 | 9 | script: 10 | - go test -cover 11 | -------------------------------------------------------------------------------- /vendor/github.com/josharian/intern/README.md: -------------------------------------------------------------------------------- 1 | Docs: https://godoc.org/github.com/josharian/intern 2 | 3 | See also [Go issue 5160](https://golang.org/issue/5160). 4 | 5 | License: MIT 6 | -------------------------------------------------------------------------------- /vendor/sigs.k8s.io/json/code-of-conduct.md: -------------------------------------------------------------------------------- 1 | # Kubernetes Community Code of Conduct 2 | 3 | Please refer to our [Kubernetes Community Code of Conduct](https://git.k8s.io/community/code-of-conduct.md) 4 | -------------------------------------------------------------------------------- /vendor/sigs.k8s.io/yaml/code-of-conduct.md: -------------------------------------------------------------------------------- 1 | # Kubernetes Community Code of Conduct 2 | 3 | Please refer to our [Kubernetes Community Code of Conduct](https://git.k8s.io/community/code-of-conduct.md) 4 | -------------------------------------------------------------------------------- /vendor/sigs.k8s.io/kustomize/kyaml/openapi/kubernetesapi/v1_21_2/swagger.pb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kubepack/chart-doc-gen/HEAD/vendor/sigs.k8s.io/kustomize/kyaml/openapi/kubernetesapi/v1_21_2/swagger.pb -------------------------------------------------------------------------------- /vendor/github.com/golang/protobuf/AUTHORS: -------------------------------------------------------------------------------- 1 | # This source code refers to The Go Authors for copyright purposes. 2 | # The master list of authors is in the main Go distribution, 3 | # visible at http://tip.golang.org/AUTHORS. 4 | -------------------------------------------------------------------------------- /vendor/github.com/golang/protobuf/CONTRIBUTORS: -------------------------------------------------------------------------------- 1 | # This source code was written by the Go contributors. 2 | # The master list of contributors is in the main Go distribution, 3 | # visible at http://tip.golang.org/CONTRIBUTORS. 4 | -------------------------------------------------------------------------------- /vendor/github.com/mattn/go-runewidth/runewidth_appengine.go: -------------------------------------------------------------------------------- 1 | // +build appengine 2 | 3 | package runewidth 4 | 5 | // IsEastAsian return true if the current locale is CJK 6 | func IsEastAsian() bool { 7 | return false 8 | } 9 | -------------------------------------------------------------------------------- /vendor/k8s.io/kube-openapi/pkg/internal/third_party/go-json-experiment/json/AUTHORS: -------------------------------------------------------------------------------- 1 | # This source code refers to The Go Authors for copyright purposes. 2 | # The master list of authors is in the main Go distribution, 3 | # visible at https://tip.golang.org/AUTHORS. 4 | -------------------------------------------------------------------------------- /vendor/k8s.io/kube-openapi/pkg/internal/third_party/go-json-experiment/json/CONTRIBUTORS: -------------------------------------------------------------------------------- 1 | # This source code was written by the Go contributors. 2 | # The master list of contributors is in the main Go distribution, 3 | # visible at https://tip.golang.org/CONTRIBUTORS. 4 | -------------------------------------------------------------------------------- /vendor/github.com/mattn/go-runewidth/runewidth_js.go: -------------------------------------------------------------------------------- 1 | // +build js 2 | // +build !appengine 3 | 4 | package runewidth 5 | 6 | func IsEastAsian() bool { 7 | // TODO: Implement this for the web. Detect east asian in a compatible way, and return true. 8 | return false 9 | } 10 | -------------------------------------------------------------------------------- /vendor/gopkg.in/yaml.v2/.travis.yml: -------------------------------------------------------------------------------- 1 | language: go 2 | 3 | go: 4 | - "1.4.x" 5 | - "1.5.x" 6 | - "1.6.x" 7 | - "1.7.x" 8 | - "1.8.x" 9 | - "1.9.x" 10 | - "1.10.x" 11 | - "1.11.x" 12 | - "1.12.x" 13 | - "1.13.x" 14 | - "1.14.x" 15 | - "tip" 16 | 17 | go_import_path: gopkg.in/yaml.v2 18 | -------------------------------------------------------------------------------- /vendor/github.com/mattn/go-runewidth/.travis.yml: -------------------------------------------------------------------------------- 1 | language: go 2 | sudo: false 3 | go: 4 | - 1.13.x 5 | - tip 6 | 7 | before_install: 8 | - go get -t -v ./... 9 | 10 | script: 11 | - go generate 12 | - git diff --cached --exit-code 13 | - ./go.test.sh 14 | 15 | after_success: 16 | - bash <(curl -s https://codecov.io/bash) 17 | -------------------------------------------------------------------------------- /vendor/google.golang.org/protobuf/encoding/prototext/doc.go: -------------------------------------------------------------------------------- 1 | // Copyright 2019 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // Package prototext marshals and unmarshals protocol buffer messages as the 6 | // textproto format. 7 | package prototext 8 | -------------------------------------------------------------------------------- /vendor/google.golang.org/protobuf/internal/flags/proto_legacy_enable.go: -------------------------------------------------------------------------------- 1 | // Copyright 2018 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build protolegacy 6 | // +build protolegacy 7 | 8 | package flags 9 | 10 | const protoLegacy = true 11 | -------------------------------------------------------------------------------- /vendor/google.golang.org/protobuf/internal/flags/proto_legacy_disable.go: -------------------------------------------------------------------------------- 1 | // Copyright 2018 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build !protolegacy 6 | // +build !protolegacy 7 | 8 | package flags 9 | 10 | const protoLegacy = false 11 | -------------------------------------------------------------------------------- /vendor/github.com/mattn/go-runewidth/go.test.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | set -e 4 | echo "" > coverage.txt 5 | 6 | for d in $(go list ./... | grep -v vendor); do 7 | go test -race -coverprofile=profile.out -covermode=atomic "$d" 8 | if [ -f profile.out ]; then 9 | cat profile.out >> coverage.txt 10 | rm profile.out 11 | fi 12 | done 13 | -------------------------------------------------------------------------------- /vendor/github.com/olekukonko/tablewriter/.gitignore: -------------------------------------------------------------------------------- 1 | # Created by .ignore support plugin (hsz.mobi) 2 | ### Go template 3 | # Binaries for programs and plugins 4 | *.exe 5 | *.exe~ 6 | *.dll 7 | *.so 8 | *.dylib 9 | 10 | # Test binary, build with `go test -c` 11 | *.test 12 | 13 | # Output of the go coverage tool, specifically when used with LiteIDE 14 | *.out 15 | 16 | -------------------------------------------------------------------------------- /vendor/github.com/olekukonko/tablewriter/.travis.yml: -------------------------------------------------------------------------------- 1 | language: go 2 | arch: 3 | - ppc64le 4 | - amd64 5 | go: 6 | - 1.3 7 | - 1.4 8 | - 1.5 9 | - 1.6 10 | - 1.7 11 | - 1.8 12 | - 1.9 13 | - "1.10" 14 | - tip 15 | jobs: 16 | exclude : 17 | - arch : ppc64le 18 | go : 19 | - 1.3 20 | - arch : ppc64le 21 | go : 22 | - 1.4 23 | -------------------------------------------------------------------------------- /vendor/github.com/spf13/pflag/.travis.yml: -------------------------------------------------------------------------------- 1 | sudo: false 2 | 3 | language: go 4 | 5 | go: 6 | - 1.9.x 7 | - 1.10.x 8 | - 1.11.x 9 | - tip 10 | 11 | matrix: 12 | allow_failures: 13 | - go: tip 14 | 15 | install: 16 | - go get golang.org/x/lint/golint 17 | - export PATH=$GOPATH/bin:$PATH 18 | - go install ./... 19 | 20 | script: 21 | - verify/all.sh -v 22 | - go test ./... 23 | -------------------------------------------------------------------------------- /vendor/github.com/google/go-cmp/cmp/internal/flags/flags.go: -------------------------------------------------------------------------------- 1 | // Copyright 2019, The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package flags 6 | 7 | // Deterministic controls whether the output of Diff should be deterministic. 8 | // This is only used for testing. 9 | var Deterministic bool 10 | -------------------------------------------------------------------------------- /vendor/sigs.k8s.io/yaml/.gitignore: -------------------------------------------------------------------------------- 1 | # OSX leaves these everywhere on SMB shares 2 | ._* 3 | 4 | # Eclipse files 5 | .classpath 6 | .project 7 | .settings/** 8 | 9 | # Idea files 10 | .idea/** 11 | .idea/ 12 | 13 | # Emacs save files 14 | *~ 15 | 16 | # Vim-related files 17 | [._]*.s[a-w][a-z] 18 | [._]s[a-w][a-z] 19 | *.un~ 20 | Session.vim 21 | .netrwhist 22 | 23 | # Go test binaries 24 | *.test 25 | -------------------------------------------------------------------------------- /vendor/sigs.k8s.io/yaml/.travis.yml: -------------------------------------------------------------------------------- 1 | language: go 2 | arch: arm64 3 | dist: focal 4 | go: 1.15.x 5 | script: 6 | - diff -u <(echo -n) <(gofmt -d *.go) 7 | - diff -u <(echo -n) <(golint $(go list -e ./...) | grep -v YAMLToJSON) 8 | - GO111MODULE=on go vet . 9 | - GO111MODULE=on go test -v -race ./... 10 | - git diff --exit-code 11 | install: 12 | - GO111MODULE=off go get golang.org/x/lint/golint 13 | -------------------------------------------------------------------------------- /vendor/google.golang.org/protobuf/internal/impl/codec_map_go112.go: -------------------------------------------------------------------------------- 1 | // Copyright 2019 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build go1.12 6 | // +build go1.12 7 | 8 | package impl 9 | 10 | import "reflect" 11 | 12 | func mapRange(v reflect.Value) *reflect.MapIter { return v.MapRange() } 13 | -------------------------------------------------------------------------------- /vendor/google.golang.org/protobuf/internal/errors/is_go113.go: -------------------------------------------------------------------------------- 1 | // Copyright 2020 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build go1.13 6 | // +build go1.13 7 | 8 | package errors 9 | 10 | import "errors" 11 | 12 | // Is is errors.Is. 13 | func Is(err, target error) bool { return errors.Is(err, target) } 14 | -------------------------------------------------------------------------------- /vendor/google.golang.org/protobuf/runtime/protoiface/legacy.go: -------------------------------------------------------------------------------- 1 | // Copyright 2018 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package protoiface 6 | 7 | type MessageV1 interface { 8 | Reset() 9 | String() string 10 | ProtoMessage() 11 | } 12 | 13 | type ExtensionRangeV1 struct { 14 | Start, End int32 // both inclusive 15 | } 16 | -------------------------------------------------------------------------------- /vendor/sigs.k8s.io/yaml/yaml_go110.go: -------------------------------------------------------------------------------- 1 | // This file contains changes that are only compatible with go 1.10 and onwards. 2 | 3 | // +build go1.10 4 | 5 | package yaml 6 | 7 | import "encoding/json" 8 | 9 | // DisallowUnknownFields configures the JSON decoder to error out if unknown 10 | // fields come along, instead of dropping them by default. 11 | func DisallowUnknownFields(d *json.Decoder) *json.Decoder { 12 | d.DisallowUnknownFields() 13 | return d 14 | } 15 | -------------------------------------------------------------------------------- /vendor/github.com/mailru/easyjson/jlexer/error.go: -------------------------------------------------------------------------------- 1 | package jlexer 2 | 3 | import "fmt" 4 | 5 | // LexerError implements the error interface and represents all possible errors that can be 6 | // generated during parsing the JSON data. 7 | type LexerError struct { 8 | Reason string 9 | Offset int 10 | Data string 11 | } 12 | 13 | func (l *LexerError) Error() string { 14 | return fmt.Sprintf("parse error: %s near offset %d of '%s'", l.Reason, l.Offset, l.Data) 15 | } 16 | -------------------------------------------------------------------------------- /vendor/sigs.k8s.io/yaml/OWNERS: -------------------------------------------------------------------------------- 1 | # See the OWNERS docs at https://go.k8s.io/owners 2 | 3 | approvers: 4 | - dims 5 | - lavalamp 6 | - smarterclayton 7 | - deads2k 8 | - sttts 9 | - liggitt 10 | - caesarxuchao 11 | reviewers: 12 | - dims 13 | - thockin 14 | - lavalamp 15 | - smarterclayton 16 | - wojtek-t 17 | - deads2k 18 | - derekwaynecarr 19 | - caesarxuchao 20 | - mikedanese 21 | - liggitt 22 | - gmarek 23 | - sttts 24 | - ncdc 25 | - tallclair 26 | labels: 27 | - sig/api-machinery 28 | -------------------------------------------------------------------------------- /vendor/github.com/mailru/easyjson/jlexer/bytestostr_nounsafe.go: -------------------------------------------------------------------------------- 1 | // This file is included to the build if any of the buildtags below 2 | // are defined. Refer to README notes for more details. 3 | 4 | //+build easyjson_nounsafe appengine 5 | 6 | package jlexer 7 | 8 | // bytesToStr creates a string normally from []byte 9 | // 10 | // Note that this method is roughly 1.5x slower than using the 'unsafe' method. 11 | func bytesToStr(data []byte) string { 12 | return string(data) 13 | } 14 | -------------------------------------------------------------------------------- /vendor/google.golang.org/protobuf/internal/genid/doc.go: -------------------------------------------------------------------------------- 1 | // Copyright 2019 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // Package genid contains constants for declarations in descriptor.proto 6 | // and the well-known types. 7 | package genid 8 | 9 | import protoreflect "google.golang.org/protobuf/reflect/protoreflect" 10 | 11 | const GoogleProtobuf_package protoreflect.FullName = "google.protobuf" 12 | -------------------------------------------------------------------------------- /vendor/github.com/google/go-cmp/cmp/export_panic.go: -------------------------------------------------------------------------------- 1 | // Copyright 2017, The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build purego 6 | // +build purego 7 | 8 | package cmp 9 | 10 | import "reflect" 11 | 12 | const supportExporters = false 13 | 14 | func retrieveUnexportedField(reflect.Value, reflect.StructField, bool) reflect.Value { 15 | panic("no support for forcibly accessing unexported fields") 16 | } 17 | -------------------------------------------------------------------------------- /vendor/github.com/google/gnostic-models/extensions/README.md: -------------------------------------------------------------------------------- 1 | # Extensions 2 | 3 | **Extension Support is experimental.** 4 | 5 | This directory contains support code for building Gnostic extensio handlers and 6 | associated examples. 7 | 8 | Extension handlers can be used to compile vendor or specification extensions 9 | into protocol buffer structures. 10 | 11 | Like plugins, extension handlers are built as separate executables. Extension 12 | bodies are written to extension handlers as serialized 13 | ExtensionHandlerRequests. 14 | -------------------------------------------------------------------------------- /vendor/github.com/google/go-cmp/cmp/internal/diff/debug_disable.go: -------------------------------------------------------------------------------- 1 | // Copyright 2017, The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build !cmp_debug 6 | // +build !cmp_debug 7 | 8 | package diff 9 | 10 | var debug debugger 11 | 12 | type debugger struct{} 13 | 14 | func (debugger) Begin(_, _ int, f EqualFunc, _, _ *EditScript) EqualFunc { 15 | return f 16 | } 17 | func (debugger) Update() {} 18 | func (debugger) Finish() {} 19 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Compiled Object files, Static and Dynamic libs (Shared Objects) 2 | *.o 3 | *.a 4 | *.so 5 | 6 | # Folders 7 | _obj 8 | _test 9 | 10 | # Architecture specific extensions/prefixes 11 | *.[568vq] 12 | [568vq].out 13 | 14 | *.cgo1.go 15 | *.cgo2.c 16 | _cgo_defun.c 17 | _cgo_gotypes.go 18 | _cgo_export.* 19 | 20 | _testmain.go 21 | 22 | *.exe 23 | *.test 24 | *.prof 25 | .idea/ 26 | dist/ 27 | **/junit.xml 28 | **/.env 29 | .vscode/ 30 | coverage.txt 31 | 32 | /bin 33 | /.go 34 | 35 | apiserver.local.config/** 36 | 37 | chart-doc-gen 38 | -------------------------------------------------------------------------------- /vendor/github.com/golang/protobuf/ptypes/doc.go: -------------------------------------------------------------------------------- 1 | // Copyright 2016 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // Package ptypes provides functionality for interacting with well-known types. 6 | // 7 | // Deprecated: Well-known types have specialized functionality directly 8 | // injected into the generated packages for each message type. 9 | // See the deprecation notice for each function for the suggested alternative. 10 | package ptypes 11 | -------------------------------------------------------------------------------- /.github/.kodiak.toml: -------------------------------------------------------------------------------- 1 | version = 1 2 | 3 | [merge] 4 | method = "squash" # default: "merge" 5 | delete_branch_on_merge = true # default: false 6 | optimistic_updates = true # default: true 7 | prioritize_ready_to_merge = true # default: false 8 | 9 | [merge.message] 10 | title = "pull_request_title" # default: "github_default" 11 | body = "github_default" # default: "github_default" 12 | strip_html_comments = true # default: false 13 | 14 | [update] 15 | always = true # default: false 16 | 17 | [approve] 18 | auto_approve_usernames = ["1gtm", "tamalsaha"] 19 | -------------------------------------------------------------------------------- /vendor/google.golang.org/protobuf/internal/genid/wrappers.go: -------------------------------------------------------------------------------- 1 | // Copyright 2019 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package genid 6 | 7 | import protoreflect "google.golang.org/protobuf/reflect/protoreflect" 8 | 9 | // Generic field name and number for messages in wrappers.proto. 10 | const ( 11 | WrapperValue_Value_field_name protoreflect.Name = "value" 12 | WrapperValue_Value_field_number protoreflect.FieldNumber = 1 13 | ) 14 | -------------------------------------------------------------------------------- /vendor/sigs.k8s.io/kustomize/kyaml/openapi/kubernetesapi/openapiinfo.go: -------------------------------------------------------------------------------- 1 | // Copyright 2020 The Kubernetes Authors. 2 | // SPDX-License-Identifier: Apache-2.0 3 | 4 | // Code generated by ./scripts/makeOpenApiInfoDotGo.sh; DO NOT EDIT. 5 | 6 | package kubernetesapi 7 | 8 | import ( 9 | "sigs.k8s.io/kustomize/kyaml/openapi/kubernetesapi/v1_21_2" 10 | ) 11 | 12 | const Info = "{title:Kubernetes,version:v1.21.2}" 13 | 14 | var OpenAPIMustAsset = map[string]func(string) []byte{ 15 | "v1.21.2": v1_21_2.MustAsset, 16 | } 17 | 18 | const DefaultOpenAPI = "v1.21.2" 19 | -------------------------------------------------------------------------------- /vendor/sigs.k8s.io/yaml/RELEASE.md: -------------------------------------------------------------------------------- 1 | # Release Process 2 | 3 | The `yaml` Project is released on an as-needed basis. The process is as follows: 4 | 5 | 1. An issue is proposing a new release with a changelog since the last release 6 | 1. All [OWNERS](OWNERS) must LGTM this release 7 | 1. An OWNER runs `git tag -s $VERSION` and inserts the changelog and pushes the tag with `git push $VERSION` 8 | 1. The release issue is closed 9 | 1. An announcement email is sent to `kubernetes-dev@googlegroups.com` with the subject `[ANNOUNCE] kubernetes-template-project $VERSION is released` 10 | -------------------------------------------------------------------------------- /vendor/github.com/mattn/go-runewidth/runewidth_windows.go: -------------------------------------------------------------------------------- 1 | // +build windows 2 | // +build !appengine 3 | 4 | package runewidth 5 | 6 | import ( 7 | "syscall" 8 | ) 9 | 10 | var ( 11 | kernel32 = syscall.NewLazyDLL("kernel32") 12 | procGetConsoleOutputCP = kernel32.NewProc("GetConsoleOutputCP") 13 | ) 14 | 15 | // IsEastAsian return true if the current locale is CJK 16 | func IsEastAsian() bool { 17 | r1, _, _ := procGetConsoleOutputCP.Call() 18 | if r1 == 0 { 19 | return false 20 | } 21 | 22 | switch int(r1) { 23 | case 932, 51932, 936, 949, 950: 24 | return true 25 | } 26 | 27 | return false 28 | } 29 | -------------------------------------------------------------------------------- /vendor/gopkg.in/yaml.v2/NOTICE: -------------------------------------------------------------------------------- 1 | Copyright 2011-2016 Canonical Ltd. 2 | 3 | Licensed under the Apache License, Version 2.0 (the "License"); 4 | you may not use this file except in compliance with the License. 5 | You may obtain a copy of the License at 6 | 7 | http://www.apache.org/licenses/LICENSE-2.0 8 | 9 | Unless required by applicable law or agreed to in writing, software 10 | distributed under the License is distributed on an "AS IS" BASIS, 11 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | See the License for the specific language governing permissions and 13 | limitations under the License. 14 | -------------------------------------------------------------------------------- /vendor/gopkg.in/yaml.v3/NOTICE: -------------------------------------------------------------------------------- 1 | Copyright 2011-2016 Canonical Ltd. 2 | 3 | Licensed under the Apache License, Version 2.0 (the "License"); 4 | you may not use this file except in compliance with the License. 5 | You may obtain a copy of the License at 6 | 7 | http://www.apache.org/licenses/LICENSE-2.0 8 | 9 | Unless required by applicable law or agreed to in writing, software 10 | distributed under the License is distributed on an "AS IS" BASIS, 11 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | See the License for the specific language governing permissions and 13 | limitations under the License. 14 | -------------------------------------------------------------------------------- /vendor/sigs.k8s.io/json/SECURITY_CONTACTS: -------------------------------------------------------------------------------- 1 | # Defined below are the security contacts for this repo. 2 | # 3 | # They are the contact point for the Product Security Committee to reach out 4 | # to for triaging and handling of incoming issues. 5 | # 6 | # The below names agree to abide by the 7 | # [Embargo Policy](https://git.k8s.io/security/private-distributors-list.md#embargo-policy) 8 | # and will be removed and replaced if they violate that agreement. 9 | # 10 | # DO NOT REPORT SECURITY VULNERABILITIES DIRECTLY TO THESE NAMES, FOLLOW THE 11 | # INSTRUCTIONS AT https://kubernetes.io/security/ 12 | 13 | deads2k 14 | lavalamp 15 | liggitt 16 | -------------------------------------------------------------------------------- /hack/license/go.txt: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright The Kubepack Authors. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | 17 | -------------------------------------------------------------------------------- /vendor/google.golang.org/protobuf/proto/proto_reflect.go: -------------------------------------------------------------------------------- 1 | // Copyright 2019 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // The protoreflect build tag disables use of fast-path methods. 6 | //go:build protoreflect 7 | // +build protoreflect 8 | 9 | package proto 10 | 11 | import ( 12 | "google.golang.org/protobuf/reflect/protoreflect" 13 | "google.golang.org/protobuf/runtime/protoiface" 14 | ) 15 | 16 | const hasProtoMethods = false 17 | 18 | func protoMethods(m protoreflect.Message) *protoiface.Methods { 19 | return nil 20 | } 21 | -------------------------------------------------------------------------------- /hack/license/bash.txt: -------------------------------------------------------------------------------- 1 | # Copyright The Kubepack Authors. 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | 15 | -------------------------------------------------------------------------------- /vendor/google.golang.org/protobuf/internal/impl/codec_unsafe.go: -------------------------------------------------------------------------------- 1 | // Copyright 2019 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build !purego && !appengine 6 | // +build !purego,!appengine 7 | 8 | package impl 9 | 10 | // When using unsafe pointers, we can just treat enum values as int32s. 11 | 12 | var ( 13 | coderEnumNoZero = coderInt32NoZero 14 | coderEnum = coderInt32 15 | coderEnumPtr = coderInt32Ptr 16 | coderEnumSlice = coderInt32Slice 17 | coderEnumPackedSlice = coderInt32PackedSlice 18 | ) 19 | -------------------------------------------------------------------------------- /hack/license/dockerfile.txt: -------------------------------------------------------------------------------- 1 | # Copyright The Kubepack Authors. 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | 15 | -------------------------------------------------------------------------------- /vendor/google.golang.org/protobuf/proto/proto_methods.go: -------------------------------------------------------------------------------- 1 | // Copyright 2019 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // The protoreflect build tag disables use of fast-path methods. 6 | //go:build !protoreflect 7 | // +build !protoreflect 8 | 9 | package proto 10 | 11 | import ( 12 | "google.golang.org/protobuf/reflect/protoreflect" 13 | "google.golang.org/protobuf/runtime/protoiface" 14 | ) 15 | 16 | const hasProtoMethods = true 17 | 18 | func protoMethods(m protoreflect.Message) *protoiface.Methods { 19 | return m.ProtoMethods() 20 | } 21 | -------------------------------------------------------------------------------- /vendor/sigs.k8s.io/kustomize/kyaml/sliceutil/slice.go: -------------------------------------------------------------------------------- 1 | // Copyright 2021 The Kubernetes Authors. 2 | // SPDX-License-Identifier: Apache-2.0 3 | 4 | package sliceutil 5 | 6 | // Contains return true if string e is present in slice s 7 | func Contains(s []string, e string) bool { 8 | for _, a := range s { 9 | if a == e { 10 | return true 11 | } 12 | } 13 | return false 14 | } 15 | 16 | // Remove removes the first occurrence of r in slice s 17 | // and returns remaining slice 18 | func Remove(s []string, r string) []string { 19 | for i, v := range s { 20 | if v == r { 21 | return append(s[:i], s[i+1:]...) 22 | } 23 | } 24 | return s 25 | } 26 | -------------------------------------------------------------------------------- /vendor/google.golang.org/protobuf/internal/genid/map_entry.go: -------------------------------------------------------------------------------- 1 | // Copyright 2019 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package genid 6 | 7 | import protoreflect "google.golang.org/protobuf/reflect/protoreflect" 8 | 9 | // Generic field names and numbers for synthetic map entry messages. 10 | const ( 11 | MapEntry_Key_field_name protoreflect.Name = "key" 12 | MapEntry_Value_field_name protoreflect.Name = "value" 13 | 14 | MapEntry_Key_field_number protoreflect.FieldNumber = 1 15 | MapEntry_Value_field_number protoreflect.FieldNumber = 2 16 | ) 17 | -------------------------------------------------------------------------------- /vendor/google.golang.org/protobuf/internal/genid/empty_gen.go: -------------------------------------------------------------------------------- 1 | // Copyright 2019 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // Code generated by generate-protos. DO NOT EDIT. 6 | 7 | package genid 8 | 9 | import ( 10 | protoreflect "google.golang.org/protobuf/reflect/protoreflect" 11 | ) 12 | 13 | const File_google_protobuf_empty_proto = "google/protobuf/empty.proto" 14 | 15 | // Names for google.protobuf.Empty. 16 | const ( 17 | Empty_message_name protoreflect.Name = "Empty" 18 | Empty_message_fullname protoreflect.FullName = "google.protobuf.Empty" 19 | ) 20 | -------------------------------------------------------------------------------- /vendor/sigs.k8s.io/kustomize/kyaml/internal/forked/github.com/go-yaml/yaml/NOTICE: -------------------------------------------------------------------------------- 1 | Copyright 2011-2016 Canonical Ltd. 2 | 3 | Licensed under the Apache License, Version 2.0 (the "License"); 4 | you may not use this file except in compliance with the License. 5 | You may obtain a copy of the License at 6 | 7 | http://www.apache.org/licenses/LICENSE-2.0 8 | 9 | Unless required by applicable law or agreed to in writing, software 10 | distributed under the License is distributed on an "AS IS" BASIS, 11 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | See the License for the specific language governing permissions and 13 | limitations under the License. 14 | -------------------------------------------------------------------------------- /hack/license/makefile.txt: -------------------------------------------------------------------------------- 1 | # Copyright 2019 AppsCode Inc. 2 | # Copyright 2016 The Kubernetes Authors. 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | -------------------------------------------------------------------------------- /vendor/github.com/go-openapi/swag/.editorconfig: -------------------------------------------------------------------------------- 1 | # top-most EditorConfig file 2 | root = true 3 | 4 | # Unix-style newlines with a newline ending every file 5 | [*] 6 | end_of_line = lf 7 | insert_final_newline = true 8 | indent_style = space 9 | indent_size = 2 10 | trim_trailing_whitespace = true 11 | 12 | # Set default charset 13 | [*.{js,py,go,scala,rb,java,html,css,less,sass,md}] 14 | charset = utf-8 15 | 16 | # Tab indentation (no size specified) 17 | [*.go] 18 | indent_style = tab 19 | 20 | [*.md] 21 | trim_trailing_whitespace = false 22 | 23 | # Matches the exact files either package.json or .travis.yml 24 | [{package.json,.travis.yml}] 25 | indent_style = space 26 | indent_size = 2 27 | -------------------------------------------------------------------------------- /vendor/github.com/go-openapi/jsonpointer/.editorconfig: -------------------------------------------------------------------------------- 1 | # top-most EditorConfig file 2 | root = true 3 | 4 | # Unix-style newlines with a newline ending every file 5 | [*] 6 | end_of_line = lf 7 | insert_final_newline = true 8 | indent_style = space 9 | indent_size = 2 10 | trim_trailing_whitespace = true 11 | 12 | # Set default charset 13 | [*.{js,py,go,scala,rb,java,html,css,less,sass,md}] 14 | charset = utf-8 15 | 16 | # Tab indentation (no size specified) 17 | [*.go] 18 | indent_style = tab 19 | 20 | [*.md] 21 | trim_trailing_whitespace = false 22 | 23 | # Matches the exact files either package.json or .travis.yml 24 | [{package.json,.travis.yml}] 25 | indent_style = space 26 | indent_size = 2 27 | -------------------------------------------------------------------------------- /vendor/sigs.k8s.io/json/doc.go: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2021 The Kubernetes Authors. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | 17 | package json // import "sigs.k8s.io/json" 18 | -------------------------------------------------------------------------------- /testdata/doc.json: -------------------------------------------------------------------------------- 1 | { 2 | "project": { 3 | "name": "Stash by AppsCode", 4 | "shortName": "Stash", 5 | "url": "https://github.com/stashed/stash", 6 | "description": "Backup your Kubernetes Volumes", 7 | "app": "a Stash operator" 8 | }, 9 | "repository": { 10 | "url": "https://charts.appscode.com/stable/", 11 | "name": "appscode" 12 | }, 13 | "chart": { 14 | "name": "stash", 15 | "version": "v0.9.0-rc.0", 16 | "values": "-- generate from values file --", 17 | "valuesExample": "-- generate from values file --" 18 | }, 19 | "prerequisites": ["Kubernetes 1.11+"], 20 | "release": { 21 | "name": "stash-operator", 22 | "namespace": "kube-system" 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /vendor/sigs.k8s.io/yaml/SECURITY_CONTACTS: -------------------------------------------------------------------------------- 1 | # Defined below are the security contacts for this repo. 2 | # 3 | # They are the contact point for the Product Security Team to reach out 4 | # to for triaging and handling of incoming issues. 5 | # 6 | # The below names agree to abide by the 7 | # [Embargo Policy](https://github.com/kubernetes/sig-release/blob/master/security-release-process-documentation/security-release-process.md#embargo-policy) 8 | # and will be removed and replaced if they violate that agreement. 9 | # 10 | # DO NOT REPORT SECURITY VULNERABILITIES DIRECTLY TO THESE NAMES, FOLLOW THE 11 | # INSTRUCTIONS AT https://kubernetes.io/security/ 12 | 13 | cjcullen 14 | jessfraz 15 | liggitt 16 | philips 17 | tallclair 18 | -------------------------------------------------------------------------------- /vendor/google.golang.org/protobuf/internal/impl/enum.go: -------------------------------------------------------------------------------- 1 | // Copyright 2019 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package impl 6 | 7 | import ( 8 | "reflect" 9 | 10 | "google.golang.org/protobuf/reflect/protoreflect" 11 | ) 12 | 13 | type EnumInfo struct { 14 | GoReflectType reflect.Type // int32 kind 15 | Desc protoreflect.EnumDescriptor 16 | } 17 | 18 | func (t *EnumInfo) New(n protoreflect.EnumNumber) protoreflect.Enum { 19 | return reflect.ValueOf(n).Convert(t.GoReflectType).Interface().(protoreflect.Enum) 20 | } 21 | func (t *EnumInfo) Descriptor() protoreflect.EnumDescriptor { return t.Desc } 22 | -------------------------------------------------------------------------------- /vendor/github.com/google/gnostic-models/openapiv2/README.md: -------------------------------------------------------------------------------- 1 | # OpenAPI v2 Protocol Buffer Models 2 | 3 | This directory contains a Protocol Buffer-language model and related code for 4 | supporting OpenAPI v2. 5 | 6 | Gnostic applications and plugins can use OpenAPIv2.proto to generate Protocol 7 | Buffer support code for their preferred languages. 8 | 9 | OpenAPIv2.go is used by Gnostic to read JSON and YAML OpenAPI descriptions into 10 | the Protocol Buffer-based datastructures generated from OpenAPIv2.proto. 11 | 12 | OpenAPIv2.proto and OpenAPIv2.go are generated by the Gnostic compiler 13 | generator, and OpenAPIv2.pb.go is generated by protoc, the Protocol Buffer 14 | compiler, and protoc-gen-go, the Protocol Buffer Go code generation plugin. 15 | -------------------------------------------------------------------------------- /vendor/github.com/google/gofuzz/doc.go: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2014 Google Inc. All rights reserved. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | 17 | // Package fuzz is a library for populating go objects with random values. 18 | package fuzz 19 | -------------------------------------------------------------------------------- /testdata/doc.yaml: -------------------------------------------------------------------------------- 1 | project: 2 | name: Stash by AppsCode 3 | shortName: Stash 4 | url: https://github.com/stashed/stash 5 | description: Backup your Kubernetes Volumes 6 | app: a Stash operator 7 | repository: 8 | url: https://charts.appscode.com/stable/ 9 | name: appscode 10 | chart: 11 | name: stash 12 | version: v0.9.0-rc.0 13 | values: "-- generate from values file --" 14 | valuesExample: "-- generate from values file --" 15 | prerequisites: 16 | - "Kubernetes v1.14+" 17 | - "`--allow-privileged` flag must be set to true for both the API server and the kubelet" 18 | - "(If you use Docker) The Docker daemon of the cluster nodes must allow shared mounts" 19 | - "Pre-installed HashiCorp Vault server." 20 | release: 21 | name: stash-operator 22 | namespace: kube-system 23 | -------------------------------------------------------------------------------- /vendor/google.golang.org/protobuf/internal/strs/strings_pure.go: -------------------------------------------------------------------------------- 1 | // Copyright 2018 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build purego || appengine 6 | // +build purego appengine 7 | 8 | package strs 9 | 10 | import pref "google.golang.org/protobuf/reflect/protoreflect" 11 | 12 | func UnsafeString(b []byte) string { 13 | return string(b) 14 | } 15 | 16 | func UnsafeBytes(s string) []byte { 17 | return []byte(s) 18 | } 19 | 20 | type Builder struct{} 21 | 22 | func (*Builder) AppendFullName(prefix pref.FullName, name pref.Name) pref.FullName { 23 | return prefix.Append(name) 24 | } 25 | 26 | func (*Builder) MakeString(b []byte) string { 27 | return string(b) 28 | } 29 | -------------------------------------------------------------------------------- /vendor/gopkg.in/yaml.v2/writerc.go: -------------------------------------------------------------------------------- 1 | package yaml 2 | 3 | // Set the writer error and return false. 4 | func yaml_emitter_set_writer_error(emitter *yaml_emitter_t, problem string) bool { 5 | emitter.error = yaml_WRITER_ERROR 6 | emitter.problem = problem 7 | return false 8 | } 9 | 10 | // Flush the output buffer. 11 | func yaml_emitter_flush(emitter *yaml_emitter_t) bool { 12 | if emitter.write_handler == nil { 13 | panic("write handler not set") 14 | } 15 | 16 | // Check if the buffer is empty. 17 | if emitter.buffer_pos == 0 { 18 | return true 19 | } 20 | 21 | if err := emitter.write_handler(emitter, emitter.buffer[:emitter.buffer_pos]); err != nil { 22 | return yaml_emitter_set_writer_error(emitter, "write error: "+err.Error()) 23 | } 24 | emitter.buffer_pos = 0 25 | return true 26 | } 27 | -------------------------------------------------------------------------------- /vendor/github.com/google/gnostic-models/compiler/main.go: -------------------------------------------------------------------------------- 1 | // Copyright 2017 Google LLC. All Rights Reserved. 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | 15 | // Package compiler provides support functions to generated compiler code. 16 | package compiler 17 | -------------------------------------------------------------------------------- /vendor/github.com/go-errors/errors/error_1_13.go: -------------------------------------------------------------------------------- 1 | // +build go1.13 2 | 3 | package errors 4 | 5 | import ( 6 | baseErrors "errors" 7 | ) 8 | 9 | // find error in any wrapped error 10 | func As(err error, target interface{}) bool { 11 | return baseErrors.As(err, target) 12 | } 13 | 14 | // Is detects whether the error is equal to a given error. Errors 15 | // are considered equal by this function if they are matched by errors.Is 16 | // or if their contained errors are matched through errors.Is 17 | func Is(e error, original error) bool { 18 | if baseErrors.Is(e, original) { 19 | return true 20 | } 21 | 22 | if e, ok := e.(*Error); ok { 23 | return Is(e.Err, original) 24 | } 25 | 26 | if original, ok := original.(*Error); ok { 27 | return Is(e, original.Err) 28 | } 29 | 30 | return false 31 | } 32 | -------------------------------------------------------------------------------- /templates/lib.go: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright The Kubepack Authors. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | 17 | package templates 18 | 19 | import ( 20 | "embed" 21 | iofs "io/fs" 22 | ) 23 | 24 | //go:embed readme.tpl 25 | var fs embed.FS 26 | 27 | func FS() iofs.FS { 28 | return fs 29 | } 30 | -------------------------------------------------------------------------------- /vendor/google.golang.org/protobuf/internal/genid/goname.go: -------------------------------------------------------------------------------- 1 | // Copyright 2019 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package genid 6 | 7 | // Go names of implementation-specific struct fields in generated messages. 8 | const ( 9 | State_goname = "state" 10 | 11 | SizeCache_goname = "sizeCache" 12 | SizeCacheA_goname = "XXX_sizecache" 13 | 14 | WeakFields_goname = "weakFields" 15 | WeakFieldsA_goname = "XXX_weak" 16 | 17 | UnknownFields_goname = "unknownFields" 18 | UnknownFieldsA_goname = "XXX_unrecognized" 19 | 20 | ExtensionFields_goname = "extensionFields" 21 | ExtensionFieldsA_goname = "XXX_InternalExtensions" 22 | ExtensionFieldsB_goname = "XXX_extensions" 23 | 24 | WeakFieldPrefix_goname = "XXX_weak_" 25 | ) 26 | -------------------------------------------------------------------------------- /vendor/github.com/davecgh/go-spew/LICENSE: -------------------------------------------------------------------------------- 1 | ISC License 2 | 3 | Copyright (c) 2012-2016 Dave Collins 4 | 5 | Permission to use, copy, modify, and/or distribute this software for any 6 | purpose with or without fee is hereby granted, provided that the above 7 | copyright notice and this permission notice appear in all copies. 8 | 9 | THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 10 | WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 11 | MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 12 | ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 13 | WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 14 | ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF 15 | OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 16 | -------------------------------------------------------------------------------- /.github/workflows/ci.yml: -------------------------------------------------------------------------------- 1 | name: CI 2 | 3 | on: 4 | pull_request: 5 | branches: 6 | - '*' 7 | push: 8 | branches: 9 | - master 10 | # Allows you to run this workflow manually from the Actions tab 11 | workflow_dispatch: 12 | 13 | concurrency: 14 | group: ${{ github.workflow }}-${{ github.head_ref || github.ref }} 15 | cancel-in-progress: true 16 | jobs: 17 | 18 | build: 19 | name: Build 20 | runs-on: ubuntu-24.04 21 | steps: 22 | 23 | - name: Set up Go 1.25 24 | uses: actions/setup-go@v5 25 | with: 26 | go-version: '1.25' 27 | id: go 28 | 29 | - uses: actions/checkout@v4 30 | 31 | - name: Prepare Host 32 | run: | 33 | sudo apt-get -qq update || true 34 | sudo apt-get install -y bzr 35 | 36 | - name: Run checks 37 | run: | 38 | make ci 39 | -------------------------------------------------------------------------------- /walk/comment.go: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright The Kubepack Authors. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | 17 | package walk 18 | 19 | import "strings" 20 | 21 | func CommentValue(line string) string { 22 | result := strings.TrimSpace(line) 23 | result = strings.TrimPrefix(result, "#") 24 | result = strings.TrimSpace(result) 25 | return result 26 | } 27 | -------------------------------------------------------------------------------- /vendor/github.com/go-openapi/swag/post_go18.go: -------------------------------------------------------------------------------- 1 | // Copyright 2015 go-swagger maintainers 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | 15 | //go:build go1.8 16 | // +build go1.8 17 | 18 | package swag 19 | 20 | import "net/url" 21 | 22 | func pathUnescape(path string) (string, error) { 23 | return url.PathUnescape(path) 24 | } 25 | -------------------------------------------------------------------------------- /vendor/github.com/go-openapi/swag/pre_go18.go: -------------------------------------------------------------------------------- 1 | // Copyright 2015 go-swagger maintainers 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | 15 | //go:build !go1.8 16 | // +build !go1.8 17 | 18 | package swag 19 | 20 | import "net/url" 21 | 22 | func pathUnescape(path string) (string, error) { 23 | return url.QueryUnescape(path) 24 | } 25 | -------------------------------------------------------------------------------- /vendor/sigs.k8s.io/json/Makefile: -------------------------------------------------------------------------------- 1 | .PHONY: default build test benchmark fmt vet 2 | 3 | default: build 4 | 5 | build: 6 | go build ./... 7 | 8 | test: 9 | go test sigs.k8s.io/json/... 10 | 11 | benchmark: 12 | go test sigs.k8s.io/json -bench . -benchmem 13 | 14 | fmt: 15 | go mod tidy 16 | gofmt -s -w *.go 17 | 18 | vet: 19 | go vet sigs.k8s.io/json 20 | 21 | @echo "checking for external dependencies" 22 | @deps=$$(go mod graph); \ 23 | if [ -n "$${deps}" ]; then \ 24 | echo "only stdlib dependencies allowed, found:"; \ 25 | echo "$${deps}"; \ 26 | exit 1; \ 27 | fi 28 | 29 | @echo "checking for unsafe use" 30 | @unsafe=$$(go list -f '{{.ImportPath}} depends on {{.Imports}}' sigs.k8s.io/json/... | grep unsafe || true); \ 31 | if [ -n "$${unsafe}" ]; then \ 32 | echo "no dependencies on unsafe allowed, found:"; \ 33 | echo "$${unsafe}"; \ 34 | exit 1; \ 35 | fi 36 | -------------------------------------------------------------------------------- /vendor/sigs.k8s.io/kustomize/kyaml/yaml/const.go: -------------------------------------------------------------------------------- 1 | // Copyright 2019 The Kubernetes Authors. 2 | // SPDX-License-Identifier: Apache-2.0 3 | 4 | package yaml 5 | 6 | const ( 7 | // NodeTagNull is the tag set for a yaml.Document that contains no data; 8 | // e.g. it isn't a Map, Slice, Document, etc 9 | NodeTagNull = "!!null" 10 | NodeTagFloat = "!!float" 11 | NodeTagString = "!!str" 12 | NodeTagBool = "!!bool" 13 | NodeTagInt = "!!int" 14 | NodeTagMap = "!!map" 15 | NodeTagSeq = "!!seq" 16 | NodeTagEmpty = "" 17 | ) 18 | 19 | // Field names 20 | const ( 21 | AnnotationsField = "annotations" 22 | APIVersionField = "apiVersion" 23 | KindField = "kind" 24 | MetadataField = "metadata" 25 | DataField = "data" 26 | BinaryDataField = "binaryData" 27 | NameField = "name" 28 | NamespaceField = "namespace" 29 | LabelsField = "labels" 30 | ) 31 | -------------------------------------------------------------------------------- /vendor/github.com/mailru/easyjson/jlexer/bytestostr.go: -------------------------------------------------------------------------------- 1 | // This file will only be included to the build if neither 2 | // easyjson_nounsafe nor appengine build tag is set. See README notes 3 | // for more details. 4 | 5 | //+build !easyjson_nounsafe 6 | //+build !appengine 7 | 8 | package jlexer 9 | 10 | import ( 11 | "reflect" 12 | "unsafe" 13 | ) 14 | 15 | // bytesToStr creates a string pointing at the slice to avoid copying. 16 | // 17 | // Warning: the string returned by the function should be used with care, as the whole input data 18 | // chunk may be either blocked from being freed by GC because of a single string or the buffer.Data 19 | // may be garbage-collected even when the string exists. 20 | func bytesToStr(data []byte) string { 21 | h := (*reflect.SliceHeader)(unsafe.Pointer(&data)) 22 | shdr := reflect.StringHeader{Data: h.Data, Len: h.Len} 23 | return *(*string)(unsafe.Pointer(&shdr)) 24 | } 25 | -------------------------------------------------------------------------------- /walk/visitor.go: -------------------------------------------------------------------------------- 1 | // Copyright 2019 The Kubernetes Authors. 2 | // SPDX-License-Identifier: Apache-2.0 3 | 4 | package walk 5 | 6 | import ( 7 | "sigs.k8s.io/kustomize/kyaml/openapi" 8 | "sigs.k8s.io/kustomize/kyaml/yaml" 9 | ) 10 | 11 | type ListKind int32 12 | 13 | const ( 14 | AssociativeList ListKind = 1 + iota 15 | NonAssociateList 16 | ) 17 | 18 | // Visitor is invoked by walk with source and destination node pairs 19 | type Visitor interface { 20 | VisitMap(*yaml.RNode, *openapi.ResourceSchema) (*yaml.RNode, error) 21 | 22 | VisitScalar(*yaml.RNode, *openapi.ResourceSchema) (*yaml.RNode, error) 23 | 24 | VisitList(*yaml.RNode, *openapi.ResourceSchema, ListKind) (*yaml.RNode, error) 25 | 26 | VisitLeaf(*yaml.RNode, *yaml.RNode, string, *openapi.ResourceSchema) (*yaml.RNode, error) 27 | } 28 | 29 | // ClearNode is returned if GrepFilter should do nothing after calling Set 30 | var ClearNode *yaml.RNode 31 | -------------------------------------------------------------------------------- /vendor/github.com/mattn/go-runewidth/README.md: -------------------------------------------------------------------------------- 1 | go-runewidth 2 | ============ 3 | 4 | [![Build Status](https://travis-ci.org/mattn/go-runewidth.png?branch=master)](https://travis-ci.org/mattn/go-runewidth) 5 | [![Codecov](https://codecov.io/gh/mattn/go-runewidth/branch/master/graph/badge.svg)](https://codecov.io/gh/mattn/go-runewidth) 6 | [![GoDoc](https://godoc.org/github.com/mattn/go-runewidth?status.svg)](http://godoc.org/github.com/mattn/go-runewidth) 7 | [![Go Report Card](https://goreportcard.com/badge/github.com/mattn/go-runewidth)](https://goreportcard.com/report/github.com/mattn/go-runewidth) 8 | 9 | Provides functions to get fixed width of the character or string. 10 | 11 | Usage 12 | ----- 13 | 14 | ```go 15 | runewidth.StringWidth("つのだ☆HIRO") == 12 16 | ``` 17 | 18 | 19 | Author 20 | ------ 21 | 22 | Yasuhiro Matsumoto 23 | 24 | License 25 | ------- 26 | 27 | under the MIT License: http://mattn.mit-license.org/2013 28 | -------------------------------------------------------------------------------- /hack/test.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | # Copyright The Kubepack Authors. 4 | # 5 | # Licensed under the Apache License, Version 2.0 (the "License"); 6 | # you may not use this file except in compliance with the License. 7 | # You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License. 16 | 17 | set -eou pipefail 18 | 19 | export CGO_ENABLED=1 20 | export GO111MODULE=on 21 | export GOFLAGS="-mod=vendor" 22 | 23 | TARGETS=$(for d in "$@"; do echo ./$d/...; done) 24 | 25 | echo "Running tests:" 26 | go test -race -installsuffix "static" ${TARGETS} 27 | echo 28 | -------------------------------------------------------------------------------- /vendor/sigs.k8s.io/kustomize/kyaml/sets/stringlist.go: -------------------------------------------------------------------------------- 1 | // Copyright 2019 The Kubernetes Authors. 2 | // SPDX-License-Identifier: Apache-2.0 3 | 4 | package sets 5 | 6 | // StringList is a set, where each element of 7 | // the set is a string slice. 8 | type StringList [][]string 9 | 10 | func (s StringList) Len() int { 11 | return len(s) 12 | } 13 | 14 | func (s StringList) Insert(val []string) StringList { 15 | if !s.Has(val) { 16 | return append(s, val) 17 | } 18 | return s 19 | } 20 | 21 | func (s StringList) Has(val []string) bool { 22 | if len(s) == 0 { 23 | return false 24 | } 25 | 26 | for i := range s { 27 | if isStringSliceEqual(s[i], val) { 28 | return true 29 | } 30 | } 31 | return false 32 | } 33 | 34 | func isStringSliceEqual(s []string, t []string) bool { 35 | if len(s) != len(t) { 36 | return false 37 | } 38 | for i := range s { 39 | if s[i] != t[i] { 40 | return false 41 | } 42 | } 43 | return true 44 | } 45 | -------------------------------------------------------------------------------- /vendor/k8s.io/kube-openapi/pkg/validation/spec/license.go: -------------------------------------------------------------------------------- 1 | // Copyright 2015 go-swagger maintainers 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | 15 | package spec 16 | 17 | // License information for the exposed API. 18 | // 19 | // For more information: http://goo.gl/8us55a#licenseObject 20 | type License struct { 21 | Name string `json:"name,omitempty"` 22 | URL string `json:"url,omitempty"` 23 | } 24 | -------------------------------------------------------------------------------- /walk/scalar.go: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright The Kubepack Authors. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | // Copyright 2019 The Kubernetes Authors. 17 | // SPDX-License-Identifier: Apache-2.0 18 | 19 | package walk 20 | 21 | import "sigs.k8s.io/kustomize/kyaml/yaml" 22 | 23 | // walkScalar returns the value of VisitScalar 24 | func (l Walker) walkScalar() (*yaml.RNode, error) { 25 | return l.VisitScalar(l.Source, l.Schema) 26 | } 27 | -------------------------------------------------------------------------------- /vendor/google.golang.org/protobuf/internal/impl/codec_map_go111.go: -------------------------------------------------------------------------------- 1 | // Copyright 2019 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build !go1.12 6 | // +build !go1.12 7 | 8 | package impl 9 | 10 | import "reflect" 11 | 12 | type mapIter struct { 13 | v reflect.Value 14 | keys []reflect.Value 15 | } 16 | 17 | // mapRange provides a less-efficient equivalent to 18 | // the Go 1.12 reflect.Value.MapRange method. 19 | func mapRange(v reflect.Value) *mapIter { 20 | return &mapIter{v: v} 21 | } 22 | 23 | func (i *mapIter) Next() bool { 24 | if i.keys == nil { 25 | i.keys = i.v.MapKeys() 26 | } else { 27 | i.keys = i.keys[1:] 28 | } 29 | return len(i.keys) > 0 30 | } 31 | 32 | func (i *mapIter) Key() reflect.Value { 33 | return i.keys[0] 34 | } 35 | 36 | func (i *mapIter) Value() reflect.Value { 37 | return i.v.MapIndex(i.keys[0]) 38 | } 39 | -------------------------------------------------------------------------------- /vendor/sigs.k8s.io/json/internal/golang/encoding/json/fuzz.go: -------------------------------------------------------------------------------- 1 | // Copyright 2019 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build gofuzz 6 | 7 | package json 8 | 9 | import ( 10 | "fmt" 11 | ) 12 | 13 | func Fuzz(data []byte) (score int) { 14 | for _, ctor := range []func() any{ 15 | func() any { return new(any) }, 16 | func() any { return new(map[string]any) }, 17 | func() any { return new([]any) }, 18 | } { 19 | v := ctor() 20 | err := Unmarshal(data, v) 21 | if err != nil { 22 | continue 23 | } 24 | score = 1 25 | 26 | m, err := Marshal(v) 27 | if err != nil { 28 | fmt.Printf("v=%#v\n", v) 29 | panic(err) 30 | } 31 | 32 | u := ctor() 33 | err = Unmarshal(m, u) 34 | if err != nil { 35 | fmt.Printf("v=%#v\n", v) 36 | fmt.Printf("m=%s\n", m) 37 | panic(err) 38 | } 39 | } 40 | 41 | return 42 | } 43 | -------------------------------------------------------------------------------- /vendor/sigs.k8s.io/kustomize/kyaml/yaml/mapnode.go: -------------------------------------------------------------------------------- 1 | // Copyright 2019 The Kubernetes Authors. 2 | // SPDX-License-Identifier: Apache-2.0 3 | 4 | package yaml 5 | 6 | // MapNode wraps a field key and value. 7 | type MapNode struct { 8 | Key *RNode 9 | Value *RNode 10 | } 11 | 12 | // IsNilOrEmpty returns true if the MapNode is nil, 13 | // has no value, or has a value that appears empty. 14 | func (mn *MapNode) IsNilOrEmpty() bool { 15 | return mn == nil || mn.Value.IsNilOrEmpty() 16 | } 17 | 18 | type MapNodeSlice []*MapNode 19 | 20 | func (m MapNodeSlice) Keys() []*RNode { 21 | var keys []*RNode 22 | for i := range m { 23 | if m[i] != nil { 24 | keys = append(keys, m[i].Key) 25 | } 26 | } 27 | return keys 28 | } 29 | 30 | func (m MapNodeSlice) Values() []*RNode { 31 | var values []*RNode 32 | for i := range m { 33 | if m[i] != nil { 34 | values = append(values, m[i].Value) 35 | } else { 36 | values = append(values, nil) 37 | } 38 | } 39 | return values 40 | } 41 | -------------------------------------------------------------------------------- /vendor/k8s.io/kube-openapi/pkg/internal/flags.go: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2022 The Kubernetes Authors. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | 17 | package internal 18 | 19 | // Used by tests to selectively disable experimental JSON unmarshaler 20 | var UseOptimizedJSONUnmarshaling bool = true 21 | var UseOptimizedJSONUnmarshalingV3 bool = true 22 | 23 | // Used by tests to selectively disable experimental JSON marshaler 24 | var UseOptimizedJSONMarshaling bool = true 25 | -------------------------------------------------------------------------------- /vendor/google.golang.org/protobuf/internal/errors/is_go112.go: -------------------------------------------------------------------------------- 1 | // Copyright 2020 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build !go1.13 6 | // +build !go1.13 7 | 8 | package errors 9 | 10 | import "reflect" 11 | 12 | // Is is a copy of Go 1.13's errors.Is for use with older Go versions. 13 | func Is(err, target error) bool { 14 | if target == nil { 15 | return err == target 16 | } 17 | 18 | isComparable := reflect.TypeOf(target).Comparable() 19 | for { 20 | if isComparable && err == target { 21 | return true 22 | } 23 | if x, ok := err.(interface{ Is(error) bool }); ok && x.Is(target) { 24 | return true 25 | } 26 | if err = unwrap(err); err == nil { 27 | return false 28 | } 29 | } 30 | } 31 | 32 | func unwrap(err error) error { 33 | u, ok := err.(interface { 34 | Unwrap() error 35 | }) 36 | if !ok { 37 | return nil 38 | } 39 | return u.Unwrap() 40 | } 41 | -------------------------------------------------------------------------------- /vendor/github.com/josharian/intern/intern.go: -------------------------------------------------------------------------------- 1 | // Package intern interns strings. 2 | // Interning is best effort only. 3 | // Interned strings may be removed automatically 4 | // at any time without notification. 5 | // All functions may be called concurrently 6 | // with themselves and each other. 7 | package intern 8 | 9 | import "sync" 10 | 11 | var ( 12 | pool sync.Pool = sync.Pool{ 13 | New: func() interface{} { 14 | return make(map[string]string) 15 | }, 16 | } 17 | ) 18 | 19 | // String returns s, interned. 20 | func String(s string) string { 21 | m := pool.Get().(map[string]string) 22 | c, ok := m[s] 23 | if ok { 24 | pool.Put(m) 25 | return c 26 | } 27 | m[s] = s 28 | pool.Put(m) 29 | return s 30 | } 31 | 32 | // Bytes returns b converted to a string, interned. 33 | func Bytes(b []byte) string { 34 | m := pool.Get().(map[string]string) 35 | c, ok := m[string(b)] 36 | if ok { 37 | pool.Put(m) 38 | return c 39 | } 40 | s := string(b) 41 | m[s] = s 42 | pool.Put(m) 43 | return s 44 | } 45 | -------------------------------------------------------------------------------- /vendor/k8s.io/kube-openapi/pkg/validation/spec/contact_info.go: -------------------------------------------------------------------------------- 1 | // Copyright 2015 go-swagger maintainers 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | 15 | package spec 16 | 17 | // ContactInfo contact information for the exposed API. 18 | // 19 | // For more information: http://goo.gl/8us55a#contactObject 20 | type ContactInfo struct { 21 | Name string `json:"name,omitempty"` 22 | URL string `json:"url,omitempty"` 23 | Email string `json:"email,omitempty"` 24 | } 25 | -------------------------------------------------------------------------------- /vendor/github.com/go-openapi/jsonreference/README.md: -------------------------------------------------------------------------------- 1 | # gojsonreference [![Build Status](https://travis-ci.org/go-openapi/jsonreference.svg?branch=master)](https://travis-ci.org/go-openapi/jsonreference) [![codecov](https://codecov.io/gh/go-openapi/jsonreference/branch/master/graph/badge.svg)](https://codecov.io/gh/go-openapi/jsonreference) [![Slack Status](https://slackin.goswagger.io/badge.svg)](https://slackin.goswagger.io) 2 | 3 | [![license](http://img.shields.io/badge/license-Apache%20v2-orange.svg)](https://raw.githubusercontent.com/go-openapi/jsonreference/master/LICENSE) [![GoDoc](https://godoc.org/github.com/go-openapi/jsonreference?status.svg)](http://godoc.org/github.com/go-openapi/jsonreference) 4 | An implementation of JSON Reference - Go language 5 | 6 | ## Status 7 | Feature complete. Stable API 8 | 9 | ## Dependencies 10 | https://github.com/go-openapi/jsonpointer 11 | 12 | ## References 13 | http://tools.ietf.org/html/draft-ietf-appsawg-json-pointer-07 14 | 15 | http://tools.ietf.org/html/draft-pbryan-zyp-json-ref-03 16 | -------------------------------------------------------------------------------- /walk/nonassociative_sequence.go: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright The Kubepack Authors. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | // Copyright 2019 The Kubernetes Authors. 17 | // SPDX-License-Identifier: Apache-2.0 18 | 19 | package walk 20 | 21 | import ( 22 | "sigs.k8s.io/kustomize/kyaml/yaml" 23 | ) 24 | 25 | // walkNonAssociativeSequence returns the value of VisitList 26 | func (l Walker) walkNonAssociativeSequence() (*yaml.RNode, error) { 27 | return l.VisitList(l.Source, l.Schema, NonAssociateList) 28 | } 29 | -------------------------------------------------------------------------------- /vendor/github.com/go-openapi/jsonreference/.golangci.yml: -------------------------------------------------------------------------------- 1 | linters-settings: 2 | govet: 3 | check-shadowing: true 4 | gocyclo: 5 | min-complexity: 30 6 | maligned: 7 | suggest-new: true 8 | dupl: 9 | threshold: 100 10 | goconst: 11 | min-len: 2 12 | min-occurrences: 4 13 | paralleltest: 14 | ignore-missing: true 15 | linters: 16 | enable-all: true 17 | disable: 18 | - maligned 19 | - lll 20 | - gochecknoglobals 21 | - godox 22 | - gocognit 23 | - whitespace 24 | - wsl 25 | - funlen 26 | - gochecknoglobals 27 | - gochecknoinits 28 | - scopelint 29 | - wrapcheck 30 | - exhaustivestruct 31 | - exhaustive 32 | - nlreturn 33 | - testpackage 34 | - gci 35 | - gofumpt 36 | - goerr113 37 | - gomnd 38 | - tparallel 39 | - nestif 40 | - godot 41 | - errorlint 42 | - varcheck 43 | - interfacer 44 | - deadcode 45 | - golint 46 | - ifshort 47 | - structcheck 48 | - nosnakecase 49 | - varnamelen 50 | - exhaustruct 51 | -------------------------------------------------------------------------------- /vendor/k8s.io/kube-openapi/pkg/validation/spec/external_docs.go: -------------------------------------------------------------------------------- 1 | // Copyright 2015 go-swagger maintainers 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | 15 | package spec 16 | 17 | // ExternalDocumentation allows referencing an external resource for 18 | // extended documentation. 19 | // 20 | // For more information: http://goo.gl/8us55a#externalDocumentationObject 21 | type ExternalDocumentation struct { 22 | Description string `json:"description,omitempty"` 23 | URL string `json:"url,omitempty"` 24 | } 25 | -------------------------------------------------------------------------------- /vendor/github.com/go-openapi/jsonpointer/README.md: -------------------------------------------------------------------------------- 1 | # gojsonpointer [![Build Status](https://travis-ci.org/go-openapi/jsonpointer.svg?branch=master)](https://travis-ci.org/go-openapi/jsonpointer) [![codecov](https://codecov.io/gh/go-openapi/jsonpointer/branch/master/graph/badge.svg)](https://codecov.io/gh/go-openapi/jsonpointer) [![Slack Status](https://slackin.goswagger.io/badge.svg)](https://slackin.goswagger.io) 2 | 3 | [![license](http://img.shields.io/badge/license-Apache%20v2-orange.svg)](https://raw.githubusercontent.com/go-openapi/jsonpointer/master/LICENSE) [![GoDoc](https://godoc.org/github.com/go-openapi/jsonpointer?status.svg)](http://godoc.org/github.com/go-openapi/jsonpointer) 4 | An implementation of JSON Pointer - Go language 5 | 6 | ## Status 7 | Completed YES 8 | 9 | Tested YES 10 | 11 | ## References 12 | http://tools.ietf.org/html/draft-ietf-appsawg-json-pointer-07 13 | 14 | ### Note 15 | The 4.Evaluation part of the previous reference, starting with 'If the currently referenced value is a JSON array, the reference token MUST contain either...' is not implemented. 16 | -------------------------------------------------------------------------------- /vendor/github.com/google/go-cmp/cmp/internal/value/pointer_purego.go: -------------------------------------------------------------------------------- 1 | // Copyright 2018, The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build purego 6 | // +build purego 7 | 8 | package value 9 | 10 | import "reflect" 11 | 12 | // Pointer is an opaque typed pointer and is guaranteed to be comparable. 13 | type Pointer struct { 14 | p uintptr 15 | t reflect.Type 16 | } 17 | 18 | // PointerOf returns a Pointer from v, which must be a 19 | // reflect.Ptr, reflect.Slice, or reflect.Map. 20 | func PointerOf(v reflect.Value) Pointer { 21 | // NOTE: Storing a pointer as an uintptr is technically incorrect as it 22 | // assumes that the GC implementation does not use a moving collector. 23 | return Pointer{v.Pointer(), v.Type()} 24 | } 25 | 26 | // IsNil reports whether the pointer is nil. 27 | func (p Pointer) IsNil() bool { 28 | return p.p == 0 29 | } 30 | 31 | // Uintptr returns the pointer as a uintptr. 32 | func (p Pointer) Uintptr() uintptr { 33 | return p.p 34 | } 35 | -------------------------------------------------------------------------------- /vendor/google.golang.org/protobuf/internal/genid/field_mask_gen.go: -------------------------------------------------------------------------------- 1 | // Copyright 2019 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // Code generated by generate-protos. DO NOT EDIT. 6 | 7 | package genid 8 | 9 | import ( 10 | protoreflect "google.golang.org/protobuf/reflect/protoreflect" 11 | ) 12 | 13 | const File_google_protobuf_field_mask_proto = "google/protobuf/field_mask.proto" 14 | 15 | // Names for google.protobuf.FieldMask. 16 | const ( 17 | FieldMask_message_name protoreflect.Name = "FieldMask" 18 | FieldMask_message_fullname protoreflect.FullName = "google.protobuf.FieldMask" 19 | ) 20 | 21 | // Field names for google.protobuf.FieldMask. 22 | const ( 23 | FieldMask_Paths_field_name protoreflect.Name = "paths" 24 | 25 | FieldMask_Paths_field_fullname protoreflect.FullName = "google.protobuf.FieldMask.paths" 26 | ) 27 | 28 | // Field numbers for google.protobuf.FieldMask. 29 | const ( 30 | FieldMask_Paths_field_number protoreflect.FieldNumber = 1 31 | ) 32 | -------------------------------------------------------------------------------- /hack/e2e.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | # Copyright The Kubepack Authors. 4 | # 5 | # Licensed under the Apache License, Version 2.0 (the "License"); 6 | # you may not use this file except in compliance with the License. 7 | # You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License. 16 | 17 | set -eou pipefail 18 | 19 | export CGO_ENABLED=1 20 | export GO111MODULE=on 21 | export GOFLAGS="-mod=vendor" 22 | 23 | GINKGO_ARGS=${GINKGO_ARGS:-} 24 | TEST_ARGS=${TEST_ARGS:-} 25 | DOCKER_REGISTRY=${DOCKER_REGISTRY:-} 26 | 27 | echo "Running e2e tests:" 28 | cmd="ginkgo -r --v -race --progress --trace --noisyPendings=false ${GINKGO_ARGS} test -- --docker-registry=${DOCKER_REGISTRY} ${TEST_ARGS}" 29 | echo $cmd; $cmd 30 | -------------------------------------------------------------------------------- /vendor/github.com/mailru/easyjson/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2016 Mail.Ru Group 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 4 | 5 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 6 | 7 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 8 | -------------------------------------------------------------------------------- /vendor/github.com/go-openapi/swag/file.go: -------------------------------------------------------------------------------- 1 | // Copyright 2015 go-swagger maintainers 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | 15 | package swag 16 | 17 | import "mime/multipart" 18 | 19 | // File represents an uploaded file. 20 | type File struct { 21 | Data multipart.File 22 | Header *multipart.FileHeader 23 | } 24 | 25 | // Read bytes from the file 26 | func (f *File) Read(p []byte) (n int, err error) { 27 | return f.Data.Read(p) 28 | } 29 | 30 | // Close the file 31 | func (f *File) Close() error { 32 | return f.Data.Close() 33 | } 34 | -------------------------------------------------------------------------------- /hack/fmt.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | # Copyright The Kubepack Authors. 4 | # 5 | # Licensed under the Apache License, Version 2.0 (the "License"); 6 | # you may not use this file except in compliance with the License. 7 | # You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License. 16 | 17 | set -eou pipefail 18 | 19 | export CGO_ENABLED=0 20 | export GO111MODULE=on 21 | export GOFLAGS="-mod=vendor" 22 | 23 | TARGETS="$@" 24 | 25 | echo "Running reimport.py" 26 | cmd="reimport3.py ${REPO_PKG} ${TARGETS}" 27 | $cmd 28 | echo 29 | 30 | echo "Running goimports:" 31 | cmd="goimports -w ${TARGETS}" 32 | echo $cmd; $cmd 33 | echo 34 | 35 | echo "Running gofmt:" 36 | cmd="gofmt -s -w ${TARGETS}" 37 | echo $cmd; $cmd 38 | echo 39 | -------------------------------------------------------------------------------- /vendor/sigs.k8s.io/kustomize/kyaml/yaml/internal/k8sgen/pkg/util/sets/empty.go: -------------------------------------------------------------------------------- 1 | // Code generated by k8scopy from k8s.io/apimachinery@v0.19.8; DO NOT EDIT. 2 | // File content copied from k8s.io/apimachinery@v0.19.8/pkg/util/sets/empty.go 3 | 4 | /* 5 | Copyright The Kubernetes Authors. 6 | 7 | Licensed under the Apache License, Version 2.0 (the "License"); 8 | you may not use this file except in compliance with the License. 9 | You may obtain a copy of the License at 10 | 11 | http://www.apache.org/licenses/LICENSE-2.0 12 | 13 | Unless required by applicable law or agreed to in writing, software 14 | distributed under the License is distributed on an "AS IS" BASIS, 15 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | See the License for the specific language governing permissions and 17 | limitations under the License. 18 | */ 19 | 20 | package sets 21 | 22 | // Empty is public since it is used by some internal API objects for conversions between external 23 | // string arrays and internal sets, and conversion logic requires public types today. 24 | type Empty struct{} 25 | -------------------------------------------------------------------------------- /vendor/github.com/go-errors/errors/LICENSE.MIT: -------------------------------------------------------------------------------- 1 | Copyright (c) 2015 Conrad Irwin 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 4 | 5 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 6 | 7 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 8 | -------------------------------------------------------------------------------- /vendor/github.com/go-openapi/swag/.golangci.yml: -------------------------------------------------------------------------------- 1 | linters-settings: 2 | govet: 3 | check-shadowing: true 4 | golint: 5 | min-confidence: 0 6 | gocyclo: 7 | min-complexity: 25 8 | maligned: 9 | suggest-new: true 10 | dupl: 11 | threshold: 100 12 | goconst: 13 | min-len: 3 14 | min-occurrences: 2 15 | 16 | linters: 17 | enable-all: true 18 | disable: 19 | - maligned 20 | - lll 21 | - gochecknoinits 22 | - gochecknoglobals 23 | - nlreturn 24 | - testpackage 25 | - wrapcheck 26 | - gomnd 27 | - exhaustive 28 | - exhaustivestruct 29 | - goerr113 30 | - wsl 31 | - whitespace 32 | - gofumpt 33 | - godot 34 | - nestif 35 | - godox 36 | - funlen 37 | - gci 38 | - gocognit 39 | - paralleltest 40 | - thelper 41 | - ifshort 42 | - gomoddirectives 43 | - cyclop 44 | - forcetypeassert 45 | - ireturn 46 | - tagliatelle 47 | - varnamelen 48 | - goimports 49 | - tenv 50 | - golint 51 | - exhaustruct 52 | - nilnil 53 | - nonamedreturns 54 | - nosnakecase 55 | -------------------------------------------------------------------------------- /vendor/github.com/google/go-cmp/cmp/internal/value/pointer_unsafe.go: -------------------------------------------------------------------------------- 1 | // Copyright 2018, The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build !purego 6 | // +build !purego 7 | 8 | package value 9 | 10 | import ( 11 | "reflect" 12 | "unsafe" 13 | ) 14 | 15 | // Pointer is an opaque typed pointer and is guaranteed to be comparable. 16 | type Pointer struct { 17 | p unsafe.Pointer 18 | t reflect.Type 19 | } 20 | 21 | // PointerOf returns a Pointer from v, which must be a 22 | // reflect.Ptr, reflect.Slice, or reflect.Map. 23 | func PointerOf(v reflect.Value) Pointer { 24 | // The proper representation of a pointer is unsafe.Pointer, 25 | // which is necessary if the GC ever uses a moving collector. 26 | return Pointer{unsafe.Pointer(v.Pointer()), v.Type()} 27 | } 28 | 29 | // IsNil reports whether the pointer is nil. 30 | func (p Pointer) IsNil() bool { 31 | return p.p == nil 32 | } 33 | 34 | // Uintptr returns the pointer as a uintptr. 35 | func (p Pointer) Uintptr() uintptr { 36 | return uintptr(p.p) 37 | } 38 | -------------------------------------------------------------------------------- /vendor/google.golang.org/protobuf/internal/genid/source_context_gen.go: -------------------------------------------------------------------------------- 1 | // Copyright 2019 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // Code generated by generate-protos. DO NOT EDIT. 6 | 7 | package genid 8 | 9 | import ( 10 | protoreflect "google.golang.org/protobuf/reflect/protoreflect" 11 | ) 12 | 13 | const File_google_protobuf_source_context_proto = "google/protobuf/source_context.proto" 14 | 15 | // Names for google.protobuf.SourceContext. 16 | const ( 17 | SourceContext_message_name protoreflect.Name = "SourceContext" 18 | SourceContext_message_fullname protoreflect.FullName = "google.protobuf.SourceContext" 19 | ) 20 | 21 | // Field names for google.protobuf.SourceContext. 22 | const ( 23 | SourceContext_FileName_field_name protoreflect.Name = "file_name" 24 | 25 | SourceContext_FileName_field_fullname protoreflect.FullName = "google.protobuf.SourceContext.file_name" 26 | ) 27 | 28 | // Field numbers for google.protobuf.SourceContext. 29 | const ( 30 | SourceContext_FileName_field_number protoreflect.FieldNumber = 1 31 | ) 32 | -------------------------------------------------------------------------------- /vendor/github.com/olekukonko/tablewriter/LICENSE.md: -------------------------------------------------------------------------------- 1 | Copyright (C) 2014 by Oleku Konko 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy 4 | of this software and associated documentation files (the "Software"), to deal 5 | in the Software without restriction, including without limitation the rights 6 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | copies of the Software, and to permit persons to whom the Software is 8 | furnished to do so, subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in 11 | all copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 19 | THE SOFTWARE. 20 | -------------------------------------------------------------------------------- /vendor/sigs.k8s.io/json/SECURITY.md: -------------------------------------------------------------------------------- 1 | # Security Policy 2 | 3 | ## Security Announcements 4 | 5 | Join the [kubernetes-security-announce] group for security and vulnerability announcements. 6 | 7 | You can also subscribe to an RSS feed of the above using [this link][kubernetes-security-announce-rss]. 8 | 9 | ## Reporting a Vulnerability 10 | 11 | Instructions for reporting a vulnerability can be found on the 12 | [Kubernetes Security and Disclosure Information] page. 13 | 14 | ## Supported Versions 15 | 16 | Information about supported Kubernetes versions can be found on the 17 | [Kubernetes version and version skew support policy] page on the Kubernetes website. 18 | 19 | [kubernetes-security-announce]: https://groups.google.com/forum/#!forum/kubernetes-security-announce 20 | [kubernetes-security-announce-rss]: https://groups.google.com/forum/feed/kubernetes-security-announce/msgs/rss_v2_0.xml?num=50 21 | [Kubernetes version and version skew support policy]: https://kubernetes.io/docs/setup/release/version-skew-policy/#supported-versions 22 | [Kubernetes Security and Disclosure Information]: https://kubernetes.io/docs/reference/issues-security/security/#report-a-vulnerability 23 | -------------------------------------------------------------------------------- /go.mod: -------------------------------------------------------------------------------- 1 | module kubepack.dev/chart-doc-gen 2 | 3 | go 1.20 4 | 5 | require ( 6 | github.com/go-errors/errors v1.4.2 7 | github.com/olekukonko/tablewriter v0.0.5 8 | github.com/spf13/pflag v1.0.5 9 | k8s.io/apimachinery v0.28.2 10 | sigs.k8s.io/kustomize/kyaml v0.14.3 11 | sigs.k8s.io/yaml v1.3.0 12 | ) 13 | 14 | require ( 15 | github.com/davecgh/go-spew v1.1.1 // indirect 16 | github.com/go-openapi/jsonpointer v0.19.6 // indirect 17 | github.com/go-openapi/jsonreference v0.20.2 // indirect 18 | github.com/go-openapi/swag v0.22.3 // indirect 19 | github.com/golang/protobuf v1.5.3 // indirect 20 | github.com/google/gnostic-models v0.6.8 // indirect 21 | github.com/google/go-cmp v0.5.9 // indirect 22 | github.com/google/gofuzz v1.2.0 // indirect 23 | github.com/josharian/intern v1.0.0 // indirect 24 | github.com/mailru/easyjson v0.7.7 // indirect 25 | github.com/mattn/go-runewidth v0.0.9 // indirect 26 | google.golang.org/protobuf v1.30.0 // indirect 27 | gopkg.in/yaml.v2 v2.4.0 // indirect 28 | gopkg.in/yaml.v3 v3.0.1 // indirect 29 | k8s.io/kube-openapi v0.0.0-20230717233707-2695361300d9 // indirect 30 | sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect 31 | ) 32 | -------------------------------------------------------------------------------- /vendor/github.com/josharian/intern/license.md: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2019 Josh Bleecher Snyder 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /vendor/sigs.k8s.io/json/internal/golang/encoding/json/tags.go: -------------------------------------------------------------------------------- 1 | // Copyright 2011 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package json 6 | 7 | import ( 8 | "strings" 9 | ) 10 | 11 | // tagOptions is the string following a comma in a struct field's "json" 12 | // tag, or the empty string. It does not include the leading comma. 13 | type tagOptions string 14 | 15 | // parseTag splits a struct field's json tag into its name and 16 | // comma-separated options. 17 | func parseTag(tag string) (string, tagOptions) { 18 | tag, opt, _ := strings.Cut(tag, ",") 19 | return tag, tagOptions(opt) 20 | } 21 | 22 | // Contains reports whether a comma-separated list of options 23 | // contains a particular substr flag. substr must be surrounded by a 24 | // string boundary or commas. 25 | func (o tagOptions) Contains(optionName string) bool { 26 | if len(o) == 0 { 27 | return false 28 | } 29 | s := string(o) 30 | for s != "" { 31 | var name string 32 | name, s, _ = strings.Cut(s, ",") 33 | if name == optionName { 34 | return true 35 | } 36 | } 37 | return false 38 | } 39 | -------------------------------------------------------------------------------- /vendor/github.com/mattn/go-runewidth/LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2016 Yasuhiro Matsumoto 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /vendor/sigs.k8s.io/kustomize/kyaml/yaml/schema/schema.go: -------------------------------------------------------------------------------- 1 | // Copyright 2019 The Kubernetes Authors. 2 | // SPDX-License-Identifier: Apache-2.0 3 | 4 | // Package schema contains libraries for working with the yaml and openapi packages. 5 | package schema 6 | 7 | import ( 8 | "strings" 9 | 10 | "sigs.k8s.io/kustomize/kyaml/openapi" 11 | "sigs.k8s.io/kustomize/kyaml/yaml" 12 | ) 13 | 14 | // IsAssociative returns true if all elements in the list contain an 15 | // AssociativeSequenceKey as a field. 16 | func IsAssociative(schema *openapi.ResourceSchema, nodes []*yaml.RNode, infer bool) bool { 17 | if schema != nil { 18 | return schemaHasMergeStrategy(schema) 19 | } 20 | if !infer { 21 | return false 22 | } 23 | for i := range nodes { 24 | node := nodes[i] 25 | if yaml.IsMissingOrNull(node) { 26 | continue 27 | } 28 | if node.IsAssociative() { 29 | return true 30 | } 31 | } 32 | return false 33 | } 34 | 35 | func schemaHasMergeStrategy(schema *openapi.ResourceSchema) bool { 36 | tmp, _ := schema.PatchStrategyAndKey() 37 | strategies := strings.Split(tmp, ",") 38 | for _, s := range strategies { 39 | if s == "merge" { 40 | return true 41 | } 42 | } 43 | return false 44 | } 45 | -------------------------------------------------------------------------------- /vendor/google.golang.org/protobuf/internal/genid/any_gen.go: -------------------------------------------------------------------------------- 1 | // Copyright 2019 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // Code generated by generate-protos. DO NOT EDIT. 6 | 7 | package genid 8 | 9 | import ( 10 | protoreflect "google.golang.org/protobuf/reflect/protoreflect" 11 | ) 12 | 13 | const File_google_protobuf_any_proto = "google/protobuf/any.proto" 14 | 15 | // Names for google.protobuf.Any. 16 | const ( 17 | Any_message_name protoreflect.Name = "Any" 18 | Any_message_fullname protoreflect.FullName = "google.protobuf.Any" 19 | ) 20 | 21 | // Field names for google.protobuf.Any. 22 | const ( 23 | Any_TypeUrl_field_name protoreflect.Name = "type_url" 24 | Any_Value_field_name protoreflect.Name = "value" 25 | 26 | Any_TypeUrl_field_fullname protoreflect.FullName = "google.protobuf.Any.type_url" 27 | Any_Value_field_fullname protoreflect.FullName = "google.protobuf.Any.value" 28 | ) 29 | 30 | // Field numbers for google.protobuf.Any. 31 | const ( 32 | Any_TypeUrl_field_number protoreflect.FieldNumber = 1 33 | Any_Value_field_number protoreflect.FieldNumber = 2 34 | ) 35 | -------------------------------------------------------------------------------- /vendor/google.golang.org/protobuf/internal/flags/flags.go: -------------------------------------------------------------------------------- 1 | // Copyright 2018 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // Package flags provides a set of flags controlled by build tags. 6 | package flags 7 | 8 | // ProtoLegacy specifies whether to enable support for legacy functionality 9 | // such as MessageSets, weak fields, and various other obscure behavior 10 | // that is necessary to maintain backwards compatibility with proto1 or 11 | // the pre-release variants of proto2 and proto3. 12 | // 13 | // This is disabled by default unless built with the "protolegacy" tag. 14 | // 15 | // WARNING: The compatibility agreement covers nothing provided by this flag. 16 | // As such, functionality may suddenly be removed or changed at our discretion. 17 | const ProtoLegacy = protoLegacy 18 | 19 | // LazyUnmarshalExtensions specifies whether to lazily unmarshal extensions. 20 | // 21 | // Lazy extension unmarshaling validates the contents of message-valued 22 | // extension fields at unmarshal time, but defers creating the message 23 | // structure until the extension is first accessed. 24 | const LazyUnmarshalExtensions = ProtoLegacy 25 | -------------------------------------------------------------------------------- /vendor/github.com/go-openapi/swag/doc.go: -------------------------------------------------------------------------------- 1 | // Copyright 2015 go-swagger maintainers 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | 15 | /* 16 | Package swag contains a bunch of helper functions for go-openapi and go-swagger projects. 17 | 18 | You may also use it standalone for your projects. 19 | 20 | - convert between value and pointers for builtin types 21 | - convert from string to builtin types (wraps strconv) 22 | - fast json concatenation 23 | - search in path 24 | - load from file or http 25 | - name mangling 26 | 27 | This repo has only few dependencies outside of the standard library: 28 | 29 | - YAML utilities depend on gopkg.in/yaml.v2 30 | */ 31 | package swag 32 | -------------------------------------------------------------------------------- /vendor/google.golang.org/protobuf/proto/reset.go: -------------------------------------------------------------------------------- 1 | // Copyright 2019 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package proto 6 | 7 | import ( 8 | "fmt" 9 | 10 | "google.golang.org/protobuf/reflect/protoreflect" 11 | ) 12 | 13 | // Reset clears every field in the message. 14 | // The resulting message shares no observable memory with its previous state 15 | // other than the memory for the message itself. 16 | func Reset(m Message) { 17 | if mr, ok := m.(interface{ Reset() }); ok && hasProtoMethods { 18 | mr.Reset() 19 | return 20 | } 21 | resetMessage(m.ProtoReflect()) 22 | } 23 | 24 | func resetMessage(m protoreflect.Message) { 25 | if !m.IsValid() { 26 | panic(fmt.Sprintf("cannot reset invalid %v message", m.Descriptor().FullName())) 27 | } 28 | 29 | // Clear all known fields. 30 | fds := m.Descriptor().Fields() 31 | for i := 0; i < fds.Len(); i++ { 32 | m.Clear(fds.Get(i)) 33 | } 34 | 35 | // Clear extension fields. 36 | m.Range(func(fd protoreflect.FieldDescriptor, _ protoreflect.Value) bool { 37 | m.Clear(fd) 38 | return true 39 | }) 40 | 41 | // Clear unknown fields. 42 | m.SetUnknown(nil) 43 | } 44 | -------------------------------------------------------------------------------- /vendor/google.golang.org/protobuf/proto/wrappers.go: -------------------------------------------------------------------------------- 1 | // Copyright 2019 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package proto 6 | 7 | // Bool stores v in a new bool value and returns a pointer to it. 8 | func Bool(v bool) *bool { return &v } 9 | 10 | // Int32 stores v in a new int32 value and returns a pointer to it. 11 | func Int32(v int32) *int32 { return &v } 12 | 13 | // Int64 stores v in a new int64 value and returns a pointer to it. 14 | func Int64(v int64) *int64 { return &v } 15 | 16 | // Float32 stores v in a new float32 value and returns a pointer to it. 17 | func Float32(v float32) *float32 { return &v } 18 | 19 | // Float64 stores v in a new float64 value and returns a pointer to it. 20 | func Float64(v float64) *float64 { return &v } 21 | 22 | // Uint32 stores v in a new uint32 value and returns a pointer to it. 23 | func Uint32(v uint32) *uint32 { return &v } 24 | 25 | // Uint64 stores v in a new uint64 value and returns a pointer to it. 26 | func Uint64(v uint64) *uint64 { return &v } 27 | 28 | // String stores v in a new string value and returns a pointer to it. 29 | func String(v string) *string { return &v } 30 | -------------------------------------------------------------------------------- /vendor/github.com/go-openapi/swag/README.md: -------------------------------------------------------------------------------- 1 | # Swag [![Build Status](https://travis-ci.org/go-openapi/swag.svg?branch=master)](https://travis-ci.org/go-openapi/swag) [![codecov](https://codecov.io/gh/go-openapi/swag/branch/master/graph/badge.svg)](https://codecov.io/gh/go-openapi/swag) [![Slack Status](https://slackin.goswagger.io/badge.svg)](https://slackin.goswagger.io) 2 | 3 | [![license](http://img.shields.io/badge/license-Apache%20v2-orange.svg)](https://raw.githubusercontent.com/go-openapi/swag/master/LICENSE) 4 | [![GoDoc](https://godoc.org/github.com/go-openapi/swag?status.svg)](http://godoc.org/github.com/go-openapi/swag) 5 | [![Go Report Card](https://goreportcard.com/badge/github.com/go-openapi/swag)](https://goreportcard.com/report/github.com/go-openapi/swag) 6 | 7 | Contains a bunch of helper functions for go-openapi and go-swagger projects. 8 | 9 | You may also use it standalone for your projects. 10 | 11 | * convert between value and pointers for builtin types 12 | * convert from string to builtin types (wraps strconv) 13 | * fast json concatenation 14 | * search in path 15 | * load from file or http 16 | * name mangling 17 | 18 | 19 | This repo has only few dependencies outside of the standard library: 20 | 21 | * YAML utilities depend on gopkg.in/yaml.v2 22 | -------------------------------------------------------------------------------- /vendor/google.golang.org/protobuf/internal/pragma/pragma.go: -------------------------------------------------------------------------------- 1 | // Copyright 2018 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // Package pragma provides types that can be embedded into a struct to 6 | // statically enforce or prevent certain language properties. 7 | package pragma 8 | 9 | import "sync" 10 | 11 | // NoUnkeyedLiterals can be embedded in a struct to prevent unkeyed literals. 12 | type NoUnkeyedLiterals struct{} 13 | 14 | // DoNotImplement can be embedded in an interface to prevent trivial 15 | // implementations of the interface. 16 | // 17 | // This is useful to prevent unauthorized implementations of an interface 18 | // so that it can be extended in the future for any protobuf language changes. 19 | type DoNotImplement interface{ ProtoInternal(DoNotImplement) } 20 | 21 | // DoNotCompare can be embedded in a struct to prevent comparability. 22 | type DoNotCompare [0]func() 23 | 24 | // DoNotCopy can be embedded in a struct to help prevent shallow copies. 25 | // This does not rely on a Go language feature, but rather a special case 26 | // within the vet checker. 27 | // 28 | // See https://golang.org/issues/8005. 29 | type DoNotCopy [0]sync.Mutex 30 | -------------------------------------------------------------------------------- /vendor/github.com/go-openapi/swag/net.go: -------------------------------------------------------------------------------- 1 | // Copyright 2015 go-swagger maintainers 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | 15 | package swag 16 | 17 | import ( 18 | "net" 19 | "strconv" 20 | ) 21 | 22 | // SplitHostPort splits a network address into a host and a port. 23 | // The port is -1 when there is no port to be found 24 | func SplitHostPort(addr string) (host string, port int, err error) { 25 | h, p, err := net.SplitHostPort(addr) 26 | if err != nil { 27 | return "", -1, err 28 | } 29 | if p == "" { 30 | return "", -1, &net.AddrError{Err: "missing port in address", Addr: addr} 31 | } 32 | 33 | pi, err := strconv.Atoi(p) 34 | if err != nil { 35 | return "", -1, err 36 | } 37 | return h, pi, nil 38 | } 39 | -------------------------------------------------------------------------------- /vendor/google.golang.org/protobuf/internal/descopts/options.go: -------------------------------------------------------------------------------- 1 | // Copyright 2019 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // Package descopts contains the nil pointers to concrete descriptor options. 6 | // 7 | // This package exists as a form of reverse dependency injection so that certain 8 | // packages (e.g., internal/filedesc and internal/filetype can avoid a direct 9 | // dependency on the descriptor proto package). 10 | package descopts 11 | 12 | import pref "google.golang.org/protobuf/reflect/protoreflect" 13 | 14 | // These variables are set by the init function in descriptor.pb.go via logic 15 | // in internal/filetype. In other words, so long as the descriptor proto package 16 | // is linked in, these variables will be populated. 17 | // 18 | // Each variable is populated with a nil pointer to the options struct. 19 | var ( 20 | File pref.ProtoMessage 21 | Enum pref.ProtoMessage 22 | EnumValue pref.ProtoMessage 23 | Message pref.ProtoMessage 24 | Field pref.ProtoMessage 25 | Oneof pref.ProtoMessage 26 | ExtensionRange pref.ProtoMessage 27 | Service pref.ProtoMessage 28 | Method pref.ProtoMessage 29 | ) 30 | -------------------------------------------------------------------------------- /vendor/google.golang.org/protobuf/internal/genid/duration_gen.go: -------------------------------------------------------------------------------- 1 | // Copyright 2019 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // Code generated by generate-protos. DO NOT EDIT. 6 | 7 | package genid 8 | 9 | import ( 10 | protoreflect "google.golang.org/protobuf/reflect/protoreflect" 11 | ) 12 | 13 | const File_google_protobuf_duration_proto = "google/protobuf/duration.proto" 14 | 15 | // Names for google.protobuf.Duration. 16 | const ( 17 | Duration_message_name protoreflect.Name = "Duration" 18 | Duration_message_fullname protoreflect.FullName = "google.protobuf.Duration" 19 | ) 20 | 21 | // Field names for google.protobuf.Duration. 22 | const ( 23 | Duration_Seconds_field_name protoreflect.Name = "seconds" 24 | Duration_Nanos_field_name protoreflect.Name = "nanos" 25 | 26 | Duration_Seconds_field_fullname protoreflect.FullName = "google.protobuf.Duration.seconds" 27 | Duration_Nanos_field_fullname protoreflect.FullName = "google.protobuf.Duration.nanos" 28 | ) 29 | 30 | // Field numbers for google.protobuf.Duration. 31 | const ( 32 | Duration_Seconds_field_number protoreflect.FieldNumber = 1 33 | Duration_Nanos_field_number protoreflect.FieldNumber = 2 34 | ) 35 | -------------------------------------------------------------------------------- /vendor/google.golang.org/protobuf/internal/genid/timestamp_gen.go: -------------------------------------------------------------------------------- 1 | // Copyright 2019 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // Code generated by generate-protos. DO NOT EDIT. 6 | 7 | package genid 8 | 9 | import ( 10 | protoreflect "google.golang.org/protobuf/reflect/protoreflect" 11 | ) 12 | 13 | const File_google_protobuf_timestamp_proto = "google/protobuf/timestamp.proto" 14 | 15 | // Names for google.protobuf.Timestamp. 16 | const ( 17 | Timestamp_message_name protoreflect.Name = "Timestamp" 18 | Timestamp_message_fullname protoreflect.FullName = "google.protobuf.Timestamp" 19 | ) 20 | 21 | // Field names for google.protobuf.Timestamp. 22 | const ( 23 | Timestamp_Seconds_field_name protoreflect.Name = "seconds" 24 | Timestamp_Nanos_field_name protoreflect.Name = "nanos" 25 | 26 | Timestamp_Seconds_field_fullname protoreflect.FullName = "google.protobuf.Timestamp.seconds" 27 | Timestamp_Nanos_field_fullname protoreflect.FullName = "google.protobuf.Timestamp.nanos" 28 | ) 29 | 30 | // Field numbers for google.protobuf.Timestamp. 31 | const ( 32 | Timestamp_Seconds_field_number protoreflect.FieldNumber = 1 33 | Timestamp_Nanos_field_number protoreflect.FieldNumber = 2 34 | ) 35 | -------------------------------------------------------------------------------- /vendor/sigs.k8s.io/kustomize/kyaml/sets/string.go: -------------------------------------------------------------------------------- 1 | // Copyright 2019 The Kubernetes Authors. 2 | // SPDX-License-Identifier: Apache-2.0 3 | 4 | package sets 5 | 6 | type String map[string]interface{} 7 | 8 | func (s String) Len() int { 9 | return len(s) 10 | } 11 | 12 | func (s String) List() []string { 13 | val := make([]string, 0, len(s)) 14 | for k := range s { 15 | val = append(val, k) 16 | } 17 | return val 18 | } 19 | 20 | func (s String) Has(val string) bool { 21 | _, found := s[val] 22 | return found 23 | } 24 | 25 | func (s String) Insert(vals ...string) { 26 | for _, val := range vals { 27 | s[val] = nil 28 | } 29 | } 30 | 31 | func (s String) Difference(s2 String) String { 32 | s3 := String{} 33 | for k := range s { 34 | if _, found := s2[k]; !found { 35 | s3.Insert(k) 36 | } 37 | } 38 | return s3 39 | } 40 | 41 | func (s String) SymmetricDifference(s2 String) String { 42 | s3 := String{} 43 | for k := range s { 44 | if _, found := s2[k]; !found { 45 | s3.Insert(k) 46 | } 47 | } 48 | for k := range s2 { 49 | if _, found := s[k]; !found { 50 | s3.Insert(k) 51 | } 52 | } 53 | return s3 54 | } 55 | 56 | func (s String) Intersection(s2 String) String { 57 | s3 := String{} 58 | for k := range s { 59 | if _, found := s2[k]; found { 60 | s3.Insert(k) 61 | } 62 | } 63 | return s3 64 | } 65 | -------------------------------------------------------------------------------- /vendor/github.com/go-errors/errors/error_backward.go: -------------------------------------------------------------------------------- 1 | // +build !go1.13 2 | 3 | package errors 4 | 5 | import ( 6 | "reflect" 7 | ) 8 | 9 | type unwrapper interface { 10 | Unwrap() error 11 | } 12 | 13 | // As assigns error or any wrapped error to the value target points 14 | // to. If there is no value of the target type of target As returns 15 | // false. 16 | func As(err error, target interface{}) bool { 17 | targetType := reflect.TypeOf(target) 18 | 19 | for { 20 | errType := reflect.TypeOf(err) 21 | 22 | if errType == nil { 23 | return false 24 | } 25 | 26 | if reflect.PtrTo(errType) == targetType { 27 | reflect.ValueOf(target).Elem().Set(reflect.ValueOf(err)) 28 | return true 29 | } 30 | 31 | wrapped, ok := err.(unwrapper) 32 | if ok { 33 | err = wrapped.Unwrap() 34 | } else { 35 | return false 36 | } 37 | } 38 | } 39 | 40 | // Is detects whether the error is equal to a given error. Errors 41 | // are considered equal by this function if they are the same object, 42 | // or if they both contain the same error inside an errors.Error. 43 | func Is(e error, original error) bool { 44 | if e == original { 45 | return true 46 | } 47 | 48 | if e, ok := e.(*Error); ok { 49 | return Is(e.Err, original) 50 | } 51 | 52 | if original, ok := original.(*Error); ok { 53 | return Is(e, original.Err) 54 | } 55 | 56 | return false 57 | } 58 | -------------------------------------------------------------------------------- /vendor/sigs.k8s.io/kustomize/kyaml/yaml/internal/k8sgen/pkg/selection/operator.go: -------------------------------------------------------------------------------- 1 | // Code generated by k8scopy from k8s.io/apimachinery@v0.19.8; DO NOT EDIT. 2 | // File content copied from k8s.io/apimachinery@v0.19.8/pkg/selection/operator.go 3 | 4 | /* 5 | Copyright 2016 The Kubernetes Authors. 6 | 7 | Licensed under the Apache License, Version 2.0 (the "License"); 8 | you may not use this file except in compliance with the License. 9 | You may obtain a copy of the License at 10 | 11 | http://www.apache.org/licenses/LICENSE-2.0 12 | 13 | Unless required by applicable law or agreed to in writing, software 14 | distributed under the License is distributed on an "AS IS" BASIS, 15 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | See the License for the specific language governing permissions and 17 | limitations under the License. 18 | */ 19 | 20 | package selection 21 | 22 | // Operator represents a key/field's relationship to value(s). 23 | // See labels.Requirement and fields.Requirement for more details. 24 | type Operator string 25 | 26 | const ( 27 | DoesNotExist Operator = "!" 28 | Equals Operator = "=" 29 | DoubleEquals Operator = "==" 30 | In Operator = "in" 31 | NotEquals Operator = "!=" 32 | NotIn Operator = "notin" 33 | Exists Operator = "exists" 34 | GreaterThan Operator = "gt" 35 | LessThan Operator = "lt" 36 | ) 37 | -------------------------------------------------------------------------------- /vendor/google.golang.org/protobuf/PATENTS: -------------------------------------------------------------------------------- 1 | Additional IP Rights Grant (Patents) 2 | 3 | "This implementation" means the copyrightable works distributed by 4 | Google as part of the Go project. 5 | 6 | Google hereby grants to You a perpetual, worldwide, non-exclusive, 7 | no-charge, royalty-free, irrevocable (except as stated in this section) 8 | patent license to make, have made, use, offer to sell, sell, import, 9 | transfer and otherwise run, modify and propagate the contents of this 10 | implementation of Go, where such license applies only to those patent 11 | claims, both currently owned or controlled by Google and acquired in 12 | the future, licensable by Google that are necessarily infringed by this 13 | implementation of Go. This grant does not include claims that would be 14 | infringed only as a consequence of further modification of this 15 | implementation. If you or your agent or exclusive licensee institute or 16 | order or agree to the institution of patent litigation against any 17 | entity (including a cross-claim or counterclaim in a lawsuit) alleging 18 | that this implementation of Go or any code incorporated within this 19 | implementation of Go constitutes direct or contributory patent 20 | infringement, or inducement of patent infringement, then any patent 21 | rights granted to you under this License for this implementation of Go 22 | shall terminate as of the date such litigation is filed. 23 | -------------------------------------------------------------------------------- /vendor/github.com/golang/protobuf/proto/wrappers.go: -------------------------------------------------------------------------------- 1 | // Copyright 2019 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package proto 6 | 7 | // Bool stores v in a new bool value and returns a pointer to it. 8 | func Bool(v bool) *bool { return &v } 9 | 10 | // Int stores v in a new int32 value and returns a pointer to it. 11 | // 12 | // Deprecated: Use Int32 instead. 13 | func Int(v int) *int32 { return Int32(int32(v)) } 14 | 15 | // Int32 stores v in a new int32 value and returns a pointer to it. 16 | func Int32(v int32) *int32 { return &v } 17 | 18 | // Int64 stores v in a new int64 value and returns a pointer to it. 19 | func Int64(v int64) *int64 { return &v } 20 | 21 | // Uint32 stores v in a new uint32 value and returns a pointer to it. 22 | func Uint32(v uint32) *uint32 { return &v } 23 | 24 | // Uint64 stores v in a new uint64 value and returns a pointer to it. 25 | func Uint64(v uint64) *uint64 { return &v } 26 | 27 | // Float32 stores v in a new float32 value and returns a pointer to it. 28 | func Float32(v float32) *float32 { return &v } 29 | 30 | // Float64 stores v in a new float64 value and returns a pointer to it. 31 | func Float64(v float64) *float64 { return &v } 32 | 33 | // String stores v in a new string value and returns a pointer to it. 34 | func String(v string) *string { return &v } 35 | -------------------------------------------------------------------------------- /vendor/github.com/google/go-cmp/cmp/export_unsafe.go: -------------------------------------------------------------------------------- 1 | // Copyright 2017, The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build !purego 6 | // +build !purego 7 | 8 | package cmp 9 | 10 | import ( 11 | "reflect" 12 | "unsafe" 13 | ) 14 | 15 | const supportExporters = true 16 | 17 | // retrieveUnexportedField uses unsafe to forcibly retrieve any field from 18 | // a struct such that the value has read-write permissions. 19 | // 20 | // The parent struct, v, must be addressable, while f must be a StructField 21 | // describing the field to retrieve. If addr is false, 22 | // then the returned value will be shallowed copied to be non-addressable. 23 | func retrieveUnexportedField(v reflect.Value, f reflect.StructField, addr bool) reflect.Value { 24 | ve := reflect.NewAt(f.Type, unsafe.Pointer(uintptr(unsafe.Pointer(v.UnsafeAddr()))+f.Offset)).Elem() 25 | if !addr { 26 | // A field is addressable if and only if the struct is addressable. 27 | // If the original parent value was not addressable, shallow copy the 28 | // value to make it non-addressable to avoid leaking an implementation 29 | // detail of how forcibly exporting a field works. 30 | if ve.Kind() == reflect.Interface && ve.IsNil() { 31 | return reflect.Zero(f.Type) 32 | } 33 | return reflect.ValueOf(ve.Interface()).Convert(f.Type) 34 | } 35 | return ve 36 | } 37 | -------------------------------------------------------------------------------- /vendor/gopkg.in/yaml.v2/LICENSE.libyaml: -------------------------------------------------------------------------------- 1 | The following files were ported to Go from C files of libyaml, and thus 2 | are still covered by their original copyright and license: 3 | 4 | apic.go 5 | emitterc.go 6 | parserc.go 7 | readerc.go 8 | scannerc.go 9 | writerc.go 10 | yamlh.go 11 | yamlprivateh.go 12 | 13 | Copyright (c) 2006 Kirill Simonov 14 | 15 | Permission is hereby granted, free of charge, to any person obtaining a copy of 16 | this software and associated documentation files (the "Software"), to deal in 17 | the Software without restriction, including without limitation the rights to 18 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies 19 | of the Software, and to permit persons to whom the Software is furnished to do 20 | so, subject to the following conditions: 21 | 22 | The above copyright notice and this permission notice shall be included in all 23 | copies or substantial portions of the Software. 24 | 25 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 26 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 27 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 28 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 29 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 30 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 31 | SOFTWARE. 32 | -------------------------------------------------------------------------------- /vendor/google.golang.org/protobuf/internal/set/ints.go: -------------------------------------------------------------------------------- 1 | // Copyright 2018 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // Package set provides simple set data structures for uint64s. 6 | package set 7 | 8 | import "math/bits" 9 | 10 | // int64s represents a set of integers within the range of 0..63. 11 | type int64s uint64 12 | 13 | func (bs *int64s) Len() int { 14 | return bits.OnesCount64(uint64(*bs)) 15 | } 16 | func (bs *int64s) Has(n uint64) bool { 17 | return uint64(*bs)&(uint64(1)< 0 18 | } 19 | func (bs *int64s) Set(n uint64) { 20 | *(*uint64)(bs) |= uint64(1) << n 21 | } 22 | func (bs *int64s) Clear(n uint64) { 23 | *(*uint64)(bs) &^= uint64(1) << n 24 | } 25 | 26 | // Ints represents a set of integers within the range of 0..math.MaxUint64. 27 | type Ints struct { 28 | lo int64s 29 | hi map[uint64]struct{} 30 | } 31 | 32 | func (bs *Ints) Len() int { 33 | return bs.lo.Len() + len(bs.hi) 34 | } 35 | func (bs *Ints) Has(n uint64) bool { 36 | if n < 64 { 37 | return bs.lo.Has(n) 38 | } 39 | _, ok := bs.hi[n] 40 | return ok 41 | } 42 | func (bs *Ints) Set(n uint64) { 43 | if n < 64 { 44 | bs.lo.Set(n) 45 | return 46 | } 47 | if bs.hi == nil { 48 | bs.hi = make(map[uint64]struct{}) 49 | } 50 | bs.hi[n] = struct{}{} 51 | } 52 | func (bs *Ints) Clear(n uint64) { 53 | if n < 64 { 54 | bs.lo.Clear(n) 55 | return 56 | } 57 | delete(bs.hi, n) 58 | } 59 | -------------------------------------------------------------------------------- /.github/workflows/release.yml: -------------------------------------------------------------------------------- 1 | name: Release 2 | 3 | on: 4 | push: 5 | tags: 6 | - '*.*' 7 | # Allows you to run this workflow manually from the Actions tab 8 | workflow_dispatch: 9 | 10 | concurrency: 11 | group: ${{ github.workflow }}-${{ github.head_ref || github.ref }} 12 | cancel-in-progress: true 13 | jobs: 14 | 15 | build: 16 | name: Build 17 | runs-on: ubuntu-24.04 18 | steps: 19 | 20 | - name: Check out code into the Go module directory 21 | uses: actions/checkout@v1 22 | 23 | - name: Print version info 24 | id: semver 25 | run: | 26 | make version 27 | 28 | - name: Set up QEMU 29 | id: qemu 30 | uses: docker/setup-qemu-action@v3 31 | with: 32 | cache-image: false 33 | 34 | - name: Set up Docker Buildx 35 | uses: docker/setup-buildx-action@v3 36 | 37 | - name: Build 38 | env: 39 | APPSCODE_ENV: prod 40 | run: | 41 | make release 42 | 43 | - name: Release 44 | uses: softprops/action-gh-release@v1 45 | if: startsWith(github.ref, 'refs/tags/') 46 | with: 47 | files: | 48 | bin/chart-doc-gen-linux-amd64 49 | bin/chart-doc-gen-linux-arm 50 | bin/chart-doc-gen-linux-arm64 51 | bin/chart-doc-gen-windows-amd64.exe 52 | bin/chart-doc-gen-darwin-amd64 53 | env: 54 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 55 | -------------------------------------------------------------------------------- /vendor/sigs.k8s.io/kustomize/kyaml/errors/errors.go: -------------------------------------------------------------------------------- 1 | // Copyright 2019 The Kubernetes Authors. 2 | // SPDX-License-Identifier: Apache-2.0 3 | 4 | // Package errors provides libraries for working with the go-errors/errors library. 5 | package errors 6 | 7 | import ( 8 | "fmt" 9 | 10 | goerrors "github.com/go-errors/errors" 11 | ) 12 | 13 | // Wrap returns err wrapped in a go-error. If err is nil, returns nil. 14 | func Wrap(err interface{}) error { 15 | if err == nil { 16 | return nil 17 | } 18 | return goerrors.Wrap(err, 1) 19 | } 20 | 21 | // WrapPrefixf returns err wrapped in a go-error with a message prefix. If err is nil, returns nil. 22 | func WrapPrefixf(err interface{}, msg string, args ...interface{}) error { 23 | if err == nil { 24 | return nil 25 | } 26 | return goerrors.WrapPrefix(err, fmt.Sprintf(msg, args...), 1) 27 | } 28 | 29 | // Errorf returns a new go-error. 30 | func Errorf(msg string, args ...interface{}) error { 31 | return goerrors.Wrap(fmt.Errorf(msg, args...), 1) 32 | } 33 | 34 | // As finds the targeted error in any wrapped error. 35 | func As(err error, target interface{}) bool { 36 | return goerrors.As(err, target) 37 | } 38 | 39 | // Is detects whether the error is equal to a given error. 40 | func Is(err error, target error) bool { 41 | return goerrors.Is(err, target) 42 | } 43 | 44 | // GetStack returns a stack trace for the error if it has one 45 | func GetStack(err error) string { 46 | if e, ok := err.(*goerrors.Error); ok { 47 | return string(e.Stack()) 48 | } 49 | return "" 50 | } 51 | -------------------------------------------------------------------------------- /vendor/google.golang.org/protobuf/reflect/protoreflect/value_pure.go: -------------------------------------------------------------------------------- 1 | // Copyright 2018 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build purego || appengine 6 | // +build purego appengine 7 | 8 | package protoreflect 9 | 10 | import "google.golang.org/protobuf/internal/pragma" 11 | 12 | type valueType int 13 | 14 | const ( 15 | nilType valueType = iota 16 | boolType 17 | int32Type 18 | int64Type 19 | uint32Type 20 | uint64Type 21 | float32Type 22 | float64Type 23 | stringType 24 | bytesType 25 | enumType 26 | ifaceType 27 | ) 28 | 29 | // value is a union where only one type can be represented at a time. 30 | // This uses a distinct field for each type. This is type safe in Go, but 31 | // occupies more memory than necessary (72B). 32 | type value struct { 33 | pragma.DoNotCompare // 0B 34 | 35 | typ valueType // 8B 36 | num uint64 // 8B 37 | str string // 16B 38 | bin []byte // 24B 39 | iface interface{} // 16B 40 | } 41 | 42 | func valueOfString(v string) Value { 43 | return Value{typ: stringType, str: v} 44 | } 45 | func valueOfBytes(v []byte) Value { 46 | return Value{typ: bytesType, bin: v} 47 | } 48 | func valueOfIface(v interface{}) Value { 49 | return Value{typ: ifaceType, iface: v} 50 | } 51 | 52 | func (v Value) getString() string { 53 | return v.str 54 | } 55 | func (v Value) getBytes() []byte { 56 | return v.bin 57 | } 58 | func (v Value) getIface() interface{} { 59 | return v.iface 60 | } 61 | -------------------------------------------------------------------------------- /vendor/github.com/google/gnostic-models/openapiv2/document.go: -------------------------------------------------------------------------------- 1 | // Copyright 2020 Google LLC. All Rights Reserved. 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | 15 | package openapi_v2 16 | 17 | import ( 18 | "gopkg.in/yaml.v3" 19 | 20 | "github.com/google/gnostic-models/compiler" 21 | ) 22 | 23 | // ParseDocument reads an OpenAPI v2 description from a YAML/JSON representation. 24 | func ParseDocument(b []byte) (*Document, error) { 25 | info, err := compiler.ReadInfoFromBytes("", b) 26 | if err != nil { 27 | return nil, err 28 | } 29 | root := info.Content[0] 30 | return NewDocument(root, compiler.NewContextWithExtensions("$root", root, nil, nil)) 31 | } 32 | 33 | // YAMLValue produces a serialized YAML representation of the document. 34 | func (d *Document) YAMLValue(comment string) ([]byte, error) { 35 | rawInfo := d.ToRawInfo() 36 | rawInfo = &yaml.Node{ 37 | Kind: yaml.DocumentNode, 38 | Content: []*yaml.Node{rawInfo}, 39 | HeadComment: comment, 40 | } 41 | return yaml.Marshal(rawInfo) 42 | } 43 | -------------------------------------------------------------------------------- /vendor/github.com/olekukonko/tablewriter/csv.go: -------------------------------------------------------------------------------- 1 | // Copyright 2014 Oleku Konko All rights reserved. 2 | // Use of this source code is governed by a MIT 3 | // license that can be found in the LICENSE file. 4 | 5 | // This module is a Table Writer API for the Go Programming Language. 6 | // The protocols were written in pure Go and works on windows and unix systems 7 | 8 | package tablewriter 9 | 10 | import ( 11 | "encoding/csv" 12 | "io" 13 | "os" 14 | ) 15 | 16 | // Start A new table by importing from a CSV file 17 | // Takes io.Writer and csv File name 18 | func NewCSV(writer io.Writer, fileName string, hasHeader bool) (*Table, error) { 19 | file, err := os.Open(fileName) 20 | if err != nil { 21 | return &Table{}, err 22 | } 23 | defer file.Close() 24 | csvReader := csv.NewReader(file) 25 | t, err := NewCSVReader(writer, csvReader, hasHeader) 26 | return t, err 27 | } 28 | 29 | // Start a New Table Writer with csv.Reader 30 | // This enables customisation such as reader.Comma = ';' 31 | // See http://golang.org/src/pkg/encoding/csv/reader.go?s=3213:3671#L94 32 | func NewCSVReader(writer io.Writer, csvReader *csv.Reader, hasHeader bool) (*Table, error) { 33 | t := NewWriter(writer) 34 | if hasHeader { 35 | // Read the first row 36 | headers, err := csvReader.Read() 37 | if err != nil { 38 | return &Table{}, err 39 | } 40 | t.SetHeader(headers) 41 | } 42 | for { 43 | record, err := csvReader.Read() 44 | if err == io.EOF { 45 | break 46 | } else if err != nil { 47 | return &Table{}, err 48 | } 49 | t.Append(record) 50 | } 51 | return t, nil 52 | } 53 | -------------------------------------------------------------------------------- /vendor/github.com/google/go-cmp/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2017 The Go Authors. All rights reserved. 2 | 3 | Redistribution and use in source and binary forms, with or without 4 | modification, are permitted provided that the following conditions are 5 | met: 6 | 7 | * Redistributions of source code must retain the above copyright 8 | notice, this list of conditions and the following disclaimer. 9 | * Redistributions in binary form must reproduce the above 10 | copyright notice, this list of conditions and the following disclaimer 11 | in the documentation and/or other materials provided with the 12 | distribution. 13 | * Neither the name of Google Inc. nor the names of its 14 | contributors may be used to endorse or promote products derived from 15 | this software without specific prior written permission. 16 | 17 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 18 | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 19 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 20 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 21 | OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 22 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 23 | LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 24 | DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 25 | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 26 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 27 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 | -------------------------------------------------------------------------------- /vendor/google.golang.org/protobuf/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2018 The Go Authors. All rights reserved. 2 | 3 | Redistribution and use in source and binary forms, with or without 4 | modification, are permitted provided that the following conditions are 5 | met: 6 | 7 | * Redistributions of source code must retain the above copyright 8 | notice, this list of conditions and the following disclaimer. 9 | * Redistributions in binary form must reproduce the above 10 | copyright notice, this list of conditions and the following disclaimer 11 | in the documentation and/or other materials provided with the 12 | distribution. 13 | * Neither the name of Google Inc. nor the names of its 14 | contributors may be used to endorse or promote products derived from 15 | this software without specific prior written permission. 16 | 17 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 18 | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 19 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 20 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 21 | OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 22 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 23 | LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 24 | DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 25 | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 26 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 27 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 | -------------------------------------------------------------------------------- /vendor/google.golang.org/protobuf/proto/proto.go: -------------------------------------------------------------------------------- 1 | // Copyright 2018 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package proto 6 | 7 | import ( 8 | "google.golang.org/protobuf/internal/errors" 9 | "google.golang.org/protobuf/reflect/protoreflect" 10 | ) 11 | 12 | // Message is the top-level interface that all messages must implement. 13 | // It provides access to a reflective view of a message. 14 | // Any implementation of this interface may be used with all functions in the 15 | // protobuf module that accept a Message, except where otherwise specified. 16 | // 17 | // This is the v2 interface definition for protobuf messages. 18 | // The v1 interface definition is "github.com/golang/protobuf/proto".Message. 19 | // 20 | // To convert a v1 message to a v2 message, 21 | // use "github.com/golang/protobuf/proto".MessageV2. 22 | // To convert a v2 message to a v1 message, 23 | // use "github.com/golang/protobuf/proto".MessageV1. 24 | type Message = protoreflect.ProtoMessage 25 | 26 | // Error matches all errors produced by packages in the protobuf module. 27 | // 28 | // That is, errors.Is(err, Error) reports whether an error is produced 29 | // by this module. 30 | var Error error 31 | 32 | func init() { 33 | Error = errors.Error 34 | } 35 | 36 | // MessageName returns the full name of m. 37 | // If m is nil, it returns an empty string. 38 | func MessageName(m Message) protoreflect.FullName { 39 | if m == nil { 40 | return "" 41 | } 42 | return m.ProtoReflect().Descriptor().FullName() 43 | } 44 | -------------------------------------------------------------------------------- /vendor/github.com/golang/protobuf/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright 2010 The Go Authors. All rights reserved. 2 | 3 | Redistribution and use in source and binary forms, with or without 4 | modification, are permitted provided that the following conditions are 5 | met: 6 | 7 | * Redistributions of source code must retain the above copyright 8 | notice, this list of conditions and the following disclaimer. 9 | * Redistributions in binary form must reproduce the above 10 | copyright notice, this list of conditions and the following disclaimer 11 | in the documentation and/or other materials provided with the 12 | distribution. 13 | * Neither the name of Google Inc. nor the names of its 14 | contributors may be used to endorse or promote products derived from 15 | this software without specific prior written permission. 16 | 17 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 18 | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 19 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 20 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 21 | OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 22 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 23 | LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 24 | DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 25 | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 26 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 27 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 | 29 | -------------------------------------------------------------------------------- /vendor/google.golang.org/protobuf/internal/encoding/text/doc.go: -------------------------------------------------------------------------------- 1 | // Copyright 2018 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // Package text implements the text format for protocol buffers. 6 | // This package has no semantic understanding for protocol buffers and is only 7 | // a parser and composer for the format. 8 | // 9 | // There is no formal specification for the protobuf text format, as such the 10 | // C++ implementation (see google::protobuf::TextFormat) is the reference 11 | // implementation of the text format. 12 | // 13 | // This package is neither a superset nor a subset of the C++ implementation. 14 | // This implementation permits a more liberal grammar in some cases to be 15 | // backwards compatible with the historical Go implementation. 16 | // Future parsings unique to Go should not be added. 17 | // Some grammars allowed by the C++ implementation are deliberately 18 | // not implemented here because they are considered a bug by the protobuf team 19 | // and should not be replicated. 20 | // 21 | // The Go implementation should implement a sufficient amount of the C++ 22 | // grammar such that the default text serialization by C++ can be parsed by Go. 23 | // However, just because the C++ parser accepts some input does not mean that 24 | // the Go implementation should as well. 25 | // 26 | // The text format is almost a superset of JSON except: 27 | // - message keys are not quoted strings, but identifiers 28 | // - the top-level value must be a message without the delimiters 29 | package text 30 | -------------------------------------------------------------------------------- /vendor/sigs.k8s.io/kustomize/kyaml/yaml/internal/k8sgen/pkg/labels/copied.deepcopy.go: -------------------------------------------------------------------------------- 1 | // Code generated by k8scopy from k8s.io/apimachinery@v0.19.8; DO NOT EDIT. 2 | // File content copied from k8s.io/apimachinery@v0.19.8/pkg/labels/zz_generated.deepcopy.go 3 | 4 | //go:build !ignore_autogenerated 5 | // +build !ignore_autogenerated 6 | 7 | /* 8 | Copyright The Kubernetes Authors. 9 | 10 | Licensed under the Apache License, Version 2.0 (the "License"); 11 | you may not use this file except in compliance with the License. 12 | You may obtain a copy of the License at 13 | 14 | http://www.apache.org/licenses/LICENSE-2.0 15 | 16 | Unless required by applicable law or agreed to in writing, software 17 | distributed under the License is distributed on an "AS IS" BASIS, 18 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 19 | See the License for the specific language governing permissions and 20 | limitations under the License. 21 | */ 22 | 23 | package labels 24 | 25 | // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. 26 | func (in *Requirement) DeepCopyInto(out *Requirement) { 27 | *out = *in 28 | if in.strValues != nil { 29 | in, out := &in.strValues, &out.strValues 30 | *out = make([]string, len(*in)) 31 | copy(*out, *in) 32 | } 33 | return 34 | } 35 | 36 | // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Requirement. 37 | func (in *Requirement) DeepCopy() *Requirement { 38 | if in == nil { 39 | return nil 40 | } 41 | out := new(Requirement) 42 | in.DeepCopyInto(out) 43 | return out 44 | } 45 | -------------------------------------------------------------------------------- /api/types.go: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright The Kubepack Authors. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | 17 | package api 18 | 19 | type DocInfo struct { 20 | Project ProjectInfo `json:"project"` 21 | Repository RepositoryInfo `json:"repository"` 22 | Chart ChartInfo `json:"chart"` 23 | Prerequisites []string `json:"prerequisites"` 24 | Release ReleaseInfo `json:"release"` 25 | } 26 | 27 | type ProjectInfo struct { 28 | Name string `json:"name"` 29 | ShortName string `json:"shortName"` 30 | URL string `json:"url"` 31 | Description string `json:"description"` 32 | App string `json:"app"` 33 | } 34 | 35 | type RepositoryInfo struct { 36 | URL string `json:"url"` 37 | Name string `json:"name"` 38 | } 39 | 40 | type ChartInfo struct { 41 | Name string `json:"name"` 42 | Version string `json:"version,omitempty"` 43 | Values string `json:"values"` 44 | ValuesExample string `json:"valuesExample"` 45 | } 46 | 47 | type ReleaseInfo struct { 48 | Name string `json:"name"` 49 | Namespace string `json:"namespace"` 50 | } 51 | -------------------------------------------------------------------------------- /vendor/k8s.io/kube-openapi/pkg/internal/third_party/go-json-experiment/json/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2020 The Go Authors. All rights reserved. 2 | 3 | Redistribution and use in source and binary forms, with or without 4 | modification, are permitted provided that the following conditions are 5 | met: 6 | 7 | * Redistributions of source code must retain the above copyright 8 | notice, this list of conditions and the following disclaimer. 9 | * Redistributions in binary form must reproduce the above 10 | copyright notice, this list of conditions and the following disclaimer 11 | in the documentation and/or other materials provided with the 12 | distribution. 13 | * Neither the name of Google Inc. nor the names of its 14 | contributors may be used to endorse or promote products derived from 15 | this software without specific prior written permission. 16 | 17 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 18 | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 19 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 20 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 21 | OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 22 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 23 | LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 24 | DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 25 | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 26 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 27 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 | -------------------------------------------------------------------------------- /vendor/github.com/spf13/pflag/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2012 Alex Ogier. All rights reserved. 2 | Copyright (c) 2012 The Go Authors. All rights reserved. 3 | 4 | Redistribution and use in source and binary forms, with or without 5 | modification, are permitted provided that the following conditions are 6 | met: 7 | 8 | * Redistributions of source code must retain the above copyright 9 | notice, this list of conditions and the following disclaimer. 10 | * Redistributions in binary form must reproduce the above 11 | copyright notice, this list of conditions and the following disclaimer 12 | in the documentation and/or other materials provided with the 13 | distribution. 14 | * Neither the name of Google Inc. nor the names of its 15 | contributors may be used to endorse or promote products derived from 16 | this software without specific prior written permission. 17 | 18 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 19 | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 20 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 21 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 22 | OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 23 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 24 | LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 25 | DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 26 | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 27 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 28 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | -------------------------------------------------------------------------------- /vendor/google.golang.org/protobuf/runtime/protoimpl/impl.go: -------------------------------------------------------------------------------- 1 | // Copyright 2018 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // Package protoimpl contains the default implementation for messages 6 | // generated by protoc-gen-go. 7 | // 8 | // WARNING: This package should only ever be imported by generated messages. 9 | // The compatibility agreement covers nothing except for functionality needed 10 | // to keep existing generated messages operational. Breakages that occur due 11 | // to unauthorized usages of this package are not the author's responsibility. 12 | package protoimpl 13 | 14 | import ( 15 | "google.golang.org/protobuf/internal/filedesc" 16 | "google.golang.org/protobuf/internal/filetype" 17 | "google.golang.org/protobuf/internal/impl" 18 | ) 19 | 20 | // UnsafeEnabled specifies whether package unsafe can be used. 21 | const UnsafeEnabled = impl.UnsafeEnabled 22 | 23 | type ( 24 | // Types used by generated code in init functions. 25 | DescBuilder = filedesc.Builder 26 | TypeBuilder = filetype.Builder 27 | 28 | // Types used by generated code to implement EnumType, MessageType, and ExtensionType. 29 | EnumInfo = impl.EnumInfo 30 | MessageInfo = impl.MessageInfo 31 | ExtensionInfo = impl.ExtensionInfo 32 | 33 | // Types embedded in generated messages. 34 | MessageState = impl.MessageState 35 | SizeCache = impl.SizeCache 36 | WeakFields = impl.WeakFields 37 | UnknownFields = impl.UnknownFields 38 | ExtensionFields = impl.ExtensionFields 39 | ExtensionFieldV1 = impl.ExtensionField 40 | 41 | Pointer = impl.Pointer 42 | ) 43 | 44 | var X impl.Export 45 | -------------------------------------------------------------------------------- /vendor/k8s.io/kube-openapi/pkg/internal/third_party/go-json-experiment/json/fold.go: -------------------------------------------------------------------------------- 1 | // Copyright 2020 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package json 6 | 7 | import ( 8 | "unicode" 9 | "unicode/utf8" 10 | ) 11 | 12 | // foldName returns a folded string such that foldName(x) == foldName(y) 13 | // is similar to strings.EqualFold(x, y), but ignores underscore and dashes. 14 | // This allows foldName to match common naming conventions. 15 | func foldName(in []byte) []byte { 16 | // This is inlinable to take advantage of "function outlining". 17 | // See https://blog.filippo.io/efficient-go-apis-with-the-inliner/ 18 | var arr [32]byte // large enough for most JSON names 19 | return appendFoldedName(arr[:0], in) 20 | } 21 | func appendFoldedName(out, in []byte) []byte { 22 | for i := 0; i < len(in); { 23 | // Handle single-byte ASCII. 24 | if c := in[i]; c < utf8.RuneSelf { 25 | if c != '_' && c != '-' { 26 | if 'a' <= c && c <= 'z' { 27 | c -= 'a' - 'A' 28 | } 29 | out = append(out, c) 30 | } 31 | i++ 32 | continue 33 | } 34 | // Handle multi-byte Unicode. 35 | r, n := utf8.DecodeRune(in[i:]) 36 | out = utf8.AppendRune(out, foldRune(r)) 37 | i += n 38 | } 39 | return out 40 | } 41 | 42 | // foldRune is a variation on unicode.SimpleFold that returns the same rune 43 | // for all runes in the same fold set. 44 | // 45 | // Invariant: 46 | // 47 | // foldRune(x) == foldRune(y) ⇔ strings.EqualFold(string(x), string(y)) 48 | func foldRune(r rune) rune { 49 | for { 50 | r2 := unicode.SimpleFold(r) 51 | if r2 <= r { 52 | return r2 // smallest character in the fold set 53 | } 54 | r = r2 55 | } 56 | } 57 | -------------------------------------------------------------------------------- /vendor/github.com/google/go-cmp/cmp/report.go: -------------------------------------------------------------------------------- 1 | // Copyright 2017, The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package cmp 6 | 7 | // defaultReporter implements the reporter interface. 8 | // 9 | // As Equal serially calls the PushStep, Report, and PopStep methods, the 10 | // defaultReporter constructs a tree-based representation of the compared value 11 | // and the result of each comparison (see valueNode). 12 | // 13 | // When the String method is called, the FormatDiff method transforms the 14 | // valueNode tree into a textNode tree, which is a tree-based representation 15 | // of the textual output (see textNode). 16 | // 17 | // Lastly, the textNode.String method produces the final report as a string. 18 | type defaultReporter struct { 19 | root *valueNode 20 | curr *valueNode 21 | } 22 | 23 | func (r *defaultReporter) PushStep(ps PathStep) { 24 | r.curr = r.curr.PushStep(ps) 25 | if r.root == nil { 26 | r.root = r.curr 27 | } 28 | } 29 | func (r *defaultReporter) Report(rs Result) { 30 | r.curr.Report(rs) 31 | } 32 | func (r *defaultReporter) PopStep() { 33 | r.curr = r.curr.PopStep() 34 | } 35 | 36 | // String provides a full report of the differences detected as a structured 37 | // literal in pseudo-Go syntax. String may only be called after the entire tree 38 | // has been traversed. 39 | func (r *defaultReporter) String() string { 40 | assert(r.root != nil && r.curr == nil) 41 | if r.root.NumDiff == 0 { 42 | return "" 43 | } 44 | ptrs := new(pointerReferences) 45 | text := formatOptions{}.FormatDiff(r.root, ptrs) 46 | resolveReferences(text) 47 | return text.String() 48 | } 49 | 50 | func assert(ok bool) { 51 | if !ok { 52 | panic("assertion failure") 53 | } 54 | } 55 | -------------------------------------------------------------------------------- /vendor/github.com/mattn/go-runewidth/runewidth_posix.go: -------------------------------------------------------------------------------- 1 | // +build !windows 2 | // +build !js 3 | // +build !appengine 4 | 5 | package runewidth 6 | 7 | import ( 8 | "os" 9 | "regexp" 10 | "strings" 11 | ) 12 | 13 | var reLoc = regexp.MustCompile(`^[a-z][a-z][a-z]?(?:_[A-Z][A-Z])?\.(.+)`) 14 | 15 | var mblenTable = map[string]int{ 16 | "utf-8": 6, 17 | "utf8": 6, 18 | "jis": 8, 19 | "eucjp": 3, 20 | "euckr": 2, 21 | "euccn": 2, 22 | "sjis": 2, 23 | "cp932": 2, 24 | "cp51932": 2, 25 | "cp936": 2, 26 | "cp949": 2, 27 | "cp950": 2, 28 | "big5": 2, 29 | "gbk": 2, 30 | "gb2312": 2, 31 | } 32 | 33 | func isEastAsian(locale string) bool { 34 | charset := strings.ToLower(locale) 35 | r := reLoc.FindStringSubmatch(locale) 36 | if len(r) == 2 { 37 | charset = strings.ToLower(r[1]) 38 | } 39 | 40 | if strings.HasSuffix(charset, "@cjk_narrow") { 41 | return false 42 | } 43 | 44 | for pos, b := range []byte(charset) { 45 | if b == '@' { 46 | charset = charset[:pos] 47 | break 48 | } 49 | } 50 | max := 1 51 | if m, ok := mblenTable[charset]; ok { 52 | max = m 53 | } 54 | if max > 1 && (charset[0] != 'u' || 55 | strings.HasPrefix(locale, "ja") || 56 | strings.HasPrefix(locale, "ko") || 57 | strings.HasPrefix(locale, "zh")) { 58 | return true 59 | } 60 | return false 61 | } 62 | 63 | // IsEastAsian return true if the current locale is CJK 64 | func IsEastAsian() bool { 65 | locale := os.Getenv("LC_ALL") 66 | if locale == "" { 67 | locale = os.Getenv("LC_CTYPE") 68 | } 69 | if locale == "" { 70 | locale = os.Getenv("LANG") 71 | } 72 | 73 | // ignore C locale 74 | if locale == "POSIX" || locale == "C" { 75 | return false 76 | } 77 | if len(locale) > 1 && locale[0] == 'C' && (locale[1] == '.' || locale[1] == '-') { 78 | return false 79 | } 80 | 81 | return isEastAsian(locale) 82 | } 83 | -------------------------------------------------------------------------------- /vendor/github.com/golang/protobuf/proto/discard.go: -------------------------------------------------------------------------------- 1 | // Copyright 2019 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package proto 6 | 7 | import ( 8 | "google.golang.org/protobuf/reflect/protoreflect" 9 | ) 10 | 11 | // DiscardUnknown recursively discards all unknown fields from this message 12 | // and all embedded messages. 13 | // 14 | // When unmarshaling a message with unrecognized fields, the tags and values 15 | // of such fields are preserved in the Message. This allows a later call to 16 | // marshal to be able to produce a message that continues to have those 17 | // unrecognized fields. To avoid this, DiscardUnknown is used to 18 | // explicitly clear the unknown fields after unmarshaling. 19 | func DiscardUnknown(m Message) { 20 | if m != nil { 21 | discardUnknown(MessageReflect(m)) 22 | } 23 | } 24 | 25 | func discardUnknown(m protoreflect.Message) { 26 | m.Range(func(fd protoreflect.FieldDescriptor, val protoreflect.Value) bool { 27 | switch { 28 | // Handle singular message. 29 | case fd.Cardinality() != protoreflect.Repeated: 30 | if fd.Message() != nil { 31 | discardUnknown(m.Get(fd).Message()) 32 | } 33 | // Handle list of messages. 34 | case fd.IsList(): 35 | if fd.Message() != nil { 36 | ls := m.Get(fd).List() 37 | for i := 0; i < ls.Len(); i++ { 38 | discardUnknown(ls.Get(i).Message()) 39 | } 40 | } 41 | // Handle map of messages. 42 | case fd.IsMap(): 43 | if fd.MapValue().Message() != nil { 44 | ms := m.Get(fd).Map() 45 | ms.Range(func(_ protoreflect.MapKey, v protoreflect.Value) bool { 46 | discardUnknown(v.Message()) 47 | return true 48 | }) 49 | } 50 | } 51 | return true 52 | }) 53 | 54 | // Discard unknown fields. 55 | if len(m.GetUnknown()) > 0 { 56 | m.SetUnknown(nil) 57 | } 58 | } 59 | -------------------------------------------------------------------------------- /hack/build.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | # Copyright The Kubepack Authors. 4 | # 5 | # Licensed under the Apache License, Version 2.0 (the "License"); 6 | # you may not use this file except in compliance with the License. 7 | # You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License. 16 | 17 | set -eou pipefail 18 | 19 | if [ -z "${OS:-}" ]; then 20 | echo "OS must be set" 21 | exit 1 22 | fi 23 | if [ -z "${ARCH:-}" ]; then 24 | echo "ARCH must be set" 25 | exit 1 26 | fi 27 | if [ -z "${VERSION:-}" ]; then 28 | echo "VERSION must be set" 29 | exit 1 30 | fi 31 | 32 | export CGO_ENABLED=0 33 | export GOARCH="${ARCH}" 34 | export GOOS="${OS}" 35 | export GO111MODULE=on 36 | export GOFLAGS="-mod=vendor" 37 | 38 | go install \ 39 | -installsuffix "static" \ 40 | -ldflags " \ 41 | -X main.Version=${VERSION} \ 42 | -X main.VersionStrategy=${version_strategy:-} \ 43 | -X main.GitTag=${git_tag:-} \ 44 | -X main.GitBranch=${git_branch:-} \ 45 | -X main.CommitHash=${commit_hash:-} \ 46 | -X main.CommitTimestamp=${commit_timestamp:-} \ 47 | -X main.GoVersion=$(go version | cut -d " " -f 3) \ 48 | -X main.Compiler=$(go env CC) \ 49 | -X main.Platform=${OS}/${ARCH} \ 50 | " \ 51 | ./... 52 | -------------------------------------------------------------------------------- /vendor/github.com/davecgh/go-spew/spew/bypasssafe.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2015-2016 Dave Collins 2 | // 3 | // Permission to use, copy, modify, and distribute this software for any 4 | // purpose with or without fee is hereby granted, provided that the above 5 | // copyright notice and this permission notice appear in all copies. 6 | // 7 | // THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 8 | // WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 9 | // MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 10 | // ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 11 | // WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 12 | // ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF 13 | // OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 14 | 15 | // NOTE: Due to the following build constraints, this file will only be compiled 16 | // when the code is running on Google App Engine, compiled by GopherJS, or 17 | // "-tags safe" is added to the go build command line. The "disableunsafe" 18 | // tag is deprecated and thus should not be used. 19 | // +build js appengine safe disableunsafe !go1.4 20 | 21 | package spew 22 | 23 | import "reflect" 24 | 25 | const ( 26 | // UnsafeDisabled is a build-time constant which specifies whether or 27 | // not access to the unsafe package is available. 28 | UnsafeDisabled = true 29 | ) 30 | 31 | // unsafeReflectValue typically converts the passed reflect.Value into a one 32 | // that bypasses the typical safety restrictions preventing access to 33 | // unaddressable and unexported data. However, doing this relies on access to 34 | // the unsafe package. This is a stub version which simply returns the passed 35 | // reflect.Value when the unsafe package is not available. 36 | func unsafeReflectValue(v reflect.Value) reflect.Value { 37 | return v 38 | } 39 | -------------------------------------------------------------------------------- /vendor/github.com/go-openapi/swag/path.go: -------------------------------------------------------------------------------- 1 | // Copyright 2015 go-swagger maintainers 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | 15 | package swag 16 | 17 | import ( 18 | "os" 19 | "path/filepath" 20 | "runtime" 21 | "strings" 22 | ) 23 | 24 | const ( 25 | // GOPATHKey represents the env key for gopath 26 | GOPATHKey = "GOPATH" 27 | ) 28 | 29 | // FindInSearchPath finds a package in a provided lists of paths 30 | func FindInSearchPath(searchPath, pkg string) string { 31 | pathsList := filepath.SplitList(searchPath) 32 | for _, path := range pathsList { 33 | if evaluatedPath, err := filepath.EvalSymlinks(filepath.Join(path, "src", pkg)); err == nil { 34 | if _, err := os.Stat(evaluatedPath); err == nil { 35 | return evaluatedPath 36 | } 37 | } 38 | } 39 | return "" 40 | } 41 | 42 | // FindInGoSearchPath finds a package in the $GOPATH:$GOROOT 43 | func FindInGoSearchPath(pkg string) string { 44 | return FindInSearchPath(FullGoSearchPath(), pkg) 45 | } 46 | 47 | // FullGoSearchPath gets the search paths for finding packages 48 | func FullGoSearchPath() string { 49 | allPaths := os.Getenv(GOPATHKey) 50 | if allPaths == "" { 51 | allPaths = filepath.Join(os.Getenv("HOME"), "go") 52 | } 53 | if allPaths != "" { 54 | allPaths = strings.Join([]string{allPaths, runtime.GOROOT()}, ":") 55 | } else { 56 | allPaths = runtime.GOROOT() 57 | } 58 | return allPaths 59 | } 60 | -------------------------------------------------------------------------------- /vendor/github.com/golang/protobuf/proto/defaults.go: -------------------------------------------------------------------------------- 1 | // Copyright 2019 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package proto 6 | 7 | import ( 8 | "google.golang.org/protobuf/reflect/protoreflect" 9 | ) 10 | 11 | // SetDefaults sets unpopulated scalar fields to their default values. 12 | // Fields within a oneof are not set even if they have a default value. 13 | // SetDefaults is recursively called upon any populated message fields. 14 | func SetDefaults(m Message) { 15 | if m != nil { 16 | setDefaults(MessageReflect(m)) 17 | } 18 | } 19 | 20 | func setDefaults(m protoreflect.Message) { 21 | fds := m.Descriptor().Fields() 22 | for i := 0; i < fds.Len(); i++ { 23 | fd := fds.Get(i) 24 | if !m.Has(fd) { 25 | if fd.HasDefault() && fd.ContainingOneof() == nil { 26 | v := fd.Default() 27 | if fd.Kind() == protoreflect.BytesKind { 28 | v = protoreflect.ValueOf(append([]byte(nil), v.Bytes()...)) // copy the default bytes 29 | } 30 | m.Set(fd, v) 31 | } 32 | continue 33 | } 34 | } 35 | 36 | m.Range(func(fd protoreflect.FieldDescriptor, v protoreflect.Value) bool { 37 | switch { 38 | // Handle singular message. 39 | case fd.Cardinality() != protoreflect.Repeated: 40 | if fd.Message() != nil { 41 | setDefaults(m.Get(fd).Message()) 42 | } 43 | // Handle list of messages. 44 | case fd.IsList(): 45 | if fd.Message() != nil { 46 | ls := m.Get(fd).List() 47 | for i := 0; i < ls.Len(); i++ { 48 | setDefaults(ls.Get(i).Message()) 49 | } 50 | } 51 | // Handle map of messages. 52 | case fd.IsMap(): 53 | if fd.MapValue().Message() != nil { 54 | ms := m.Get(fd).Map() 55 | ms.Range(func(_ protoreflect.MapKey, v protoreflect.Value) bool { 56 | setDefaults(v.Message()) 57 | return true 58 | }) 59 | } 60 | } 61 | return true 62 | }) 63 | } 64 | -------------------------------------------------------------------------------- /vendor/sigs.k8s.io/json/README.md: -------------------------------------------------------------------------------- 1 | # sigs.k8s.io/json 2 | 3 | [![Go Reference](https://pkg.go.dev/badge/sigs.k8s.io/json.svg)](https://pkg.go.dev/sigs.k8s.io/json) 4 | 5 | ## Introduction 6 | 7 | This library is a subproject of [sig-api-machinery](https://github.com/kubernetes/community/tree/master/sig-api-machinery#json). 8 | It provides case-sensitive, integer-preserving JSON unmarshaling functions based on `encoding/json` `Unmarshal()`. 9 | 10 | ## Compatibility 11 | 12 | The `UnmarshalCaseSensitivePreserveInts()` function behaves like `encoding/json#Unmarshal()` with the following differences: 13 | 14 | - JSON object keys are treated case-sensitively. 15 | Object keys must exactly match json tag names (for tagged struct fields) 16 | or struct field names (for untagged struct fields). 17 | - JSON integers are unmarshaled into `interface{}` fields as an `int64` instead of a 18 | `float64` when possible, falling back to `float64` on any parse or overflow error. 19 | - Syntax errors do not return an `encoding/json` `*SyntaxError` error. 20 | Instead, they return an error which can be passed to `SyntaxErrorOffset()` to obtain an offset. 21 | 22 | ## Additional capabilities 23 | 24 | The `UnmarshalStrict()` function decodes identically to `UnmarshalCaseSensitivePreserveInts()`, 25 | and also returns non-fatal strict errors encountered while decoding: 26 | 27 | - Duplicate fields encountered 28 | - Unknown fields encountered 29 | 30 | ### Community, discussion, contribution, and support 31 | 32 | You can reach the maintainers of this project via the 33 | [sig-api-machinery mailing list / channels](https://github.com/kubernetes/community/tree/master/sig-api-machinery#contact). 34 | 35 | ### Code of conduct 36 | 37 | Participation in the Kubernetes community is governed by the [Kubernetes Code of Conduct](code-of-conduct.md). 38 | 39 | [owners]: https://git.k8s.io/community/contributors/guide/owners.md 40 | [Creative Commons 4.0]: https://git.k8s.io/website/LICENSE 41 | -------------------------------------------------------------------------------- /vendor/github.com/google/gnostic-models/compiler/context.go: -------------------------------------------------------------------------------- 1 | // Copyright 2017 Google LLC. All Rights Reserved. 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | 15 | package compiler 16 | 17 | import ( 18 | yaml "gopkg.in/yaml.v3" 19 | ) 20 | 21 | // Context contains state of the compiler as it traverses a document. 22 | type Context struct { 23 | Parent *Context 24 | Name string 25 | Node *yaml.Node 26 | ExtensionHandlers *[]ExtensionHandler 27 | } 28 | 29 | // NewContextWithExtensions returns a new object representing the compiler state 30 | func NewContextWithExtensions(name string, node *yaml.Node, parent *Context, extensionHandlers *[]ExtensionHandler) *Context { 31 | return &Context{Name: name, Node: node, Parent: parent, ExtensionHandlers: extensionHandlers} 32 | } 33 | 34 | // NewContext returns a new object representing the compiler state 35 | func NewContext(name string, node *yaml.Node, parent *Context) *Context { 36 | if parent != nil { 37 | return &Context{Name: name, Node: node, Parent: parent, ExtensionHandlers: parent.ExtensionHandlers} 38 | } 39 | return &Context{Name: name, Parent: parent, ExtensionHandlers: nil} 40 | } 41 | 42 | // Description returns a text description of the compiler state 43 | func (context *Context) Description() string { 44 | name := context.Name 45 | if context.Parent != nil { 46 | name = context.Parent.Description() + "." + name 47 | } 48 | return name 49 | } 50 | -------------------------------------------------------------------------------- /vendor/sigs.k8s.io/kustomize/kyaml/openapi/Makefile: -------------------------------------------------------------------------------- 1 | # Copyright 2020 The Kubernetes Authors. 2 | # SPDX-License-Identifier: Apache-2.0 3 | 4 | MYGOBIN = $(shell go env GOBIN) 5 | ifeq ($(MYGOBIN),) 6 | MYGOBIN = $(shell go env GOPATH)/bin 7 | endif 8 | KIND_VERSION := "v0.11.1" 9 | API_VERSION ?= "v1.21.2" 10 | 11 | .PHONY: all 12 | all: \ 13 | kustomizationapi/swagger.go \ 14 | kubernetesapi/swagger.go \ 15 | kubernetesapi/openapiinfo.go 16 | 17 | .PHONY: clean 18 | clean: 19 | rm kustomizationapi/swagger.go 20 | rm kubernetesapi/openapiinfo.go 21 | 22 | # This will remove all currently built-in schema, 23 | # so think twice before deleting. 24 | # To replace what this will delete typically requires the ability 25 | # to contact a live kubernetes API server. 26 | .PHONY: nuke 27 | nuke: clean 28 | rm -r kubernetesapi/* 29 | 30 | $(MYGOBIN)/go-bindata: 31 | go install github.com/go-bindata/go-bindata/v3/go-bindata@latest 32 | 33 | $(MYGOBIN)/kind: 34 | ( \ 35 | set -e; \ 36 | d=$(shell mktemp -d); cd $$d; \ 37 | wget -O ./kind https://github.com/kubernetes-sigs/kind/releases/download/$(KIND_VERSION)/kind-$(shell uname)-amd64; \ 38 | chmod +x ./kind; \ 39 | mv ./kind $(MYGOBIN); \ 40 | rm -rf $$d; \ 41 | ) 42 | 43 | .PHONY: kubernetesapi/openapiinfo.go 44 | kubernetesapi/openapiinfo.go: 45 | ./scripts/makeOpenApiInfoDotGo.sh 46 | 47 | kustomizationapi/swagger.go: $(MYGOBIN)/go-bindata kustomizationapi/swagger.json 48 | $(MYGOBIN)/go-bindata \ 49 | --pkg kustomizationapi \ 50 | -o kustomizationapi/swagger.go \ 51 | kustomizationapi/swagger.json 52 | 53 | .PHONY: kubernetesapi/swagger.pb 54 | kubernetesapi/swagger.pb: $(MYGOBIN)/kind $(MYGOBIN)/kustomize 55 | ./scripts/fetchSchemaFromCluster.sh $(API_VERSION) 56 | 57 | .PHONY: kubernetesapi/swagger.go 58 | kubernetesapi/swagger.go: $(MYGOBIN)/go-bindata kubernetesapi/swagger.pb 59 | ./scripts/generateSwaggerDotGo.sh $(API_VERSION) 60 | 61 | $(MYGOBIN)/kustomize: 62 | $(shell cd ../.. && MYGOBIN=$(MYGOBIN) make $(MYGOBIN)/kustomize) 63 | -------------------------------------------------------------------------------- /vendor/sigs.k8s.io/yaml/CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # Contributing Guidelines 2 | 3 | Welcome to Kubernetes. We are excited about the prospect of you joining our [community](https://github.com/kubernetes/community)! The Kubernetes community abides by the CNCF [code of conduct](code-of-conduct.md). Here is an excerpt: 4 | 5 | _As contributors and maintainers of this project, and in the interest of fostering an open and welcoming community, we pledge to respect all people who contribute through reporting issues, posting feature requests, updating documentation, submitting pull requests or patches, and other activities._ 6 | 7 | ## Getting Started 8 | 9 | We have full documentation on how to get started contributing here: 10 | 11 | 14 | 15 | - [Contributor License Agreement](https://git.k8s.io/community/CLA.md) Kubernetes projects require that you sign a Contributor License Agreement (CLA) before we can accept your pull requests 16 | - [Kubernetes Contributor Guide](http://git.k8s.io/community/contributors/guide) - Main contributor documentation, or you can just jump directly to the [contributing section](http://git.k8s.io/community/contributors/guide#contributing) 17 | - [Contributor Cheat Sheet](https://git.k8s.io/community/contributors/guide/contributor-cheatsheet.md) - Common resources for existing developers 18 | 19 | ## Mentorship 20 | 21 | - [Mentoring Initiatives](https://git.k8s.io/community/mentoring) - We have a diverse set of mentorship programs available that are always looking for volunteers! 22 | 23 | 32 | -------------------------------------------------------------------------------- /vendor/google.golang.org/protobuf/internal/detrand/rand.go: -------------------------------------------------------------------------------- 1 | // Copyright 2018 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // Package detrand provides deterministically random functionality. 6 | // 7 | // The pseudo-randomness of these functions is seeded by the program binary 8 | // itself and guarantees that the output does not change within a program, 9 | // while ensuring that the output is unstable across different builds. 10 | package detrand 11 | 12 | import ( 13 | "encoding/binary" 14 | "hash/fnv" 15 | "os" 16 | ) 17 | 18 | // Disable disables detrand such that all functions returns the zero value. 19 | // This function is not concurrent-safe and must be called during program init. 20 | func Disable() { 21 | randSeed = 0 22 | } 23 | 24 | // Bool returns a deterministically random boolean. 25 | func Bool() bool { 26 | return randSeed%2 == 1 27 | } 28 | 29 | // Intn returns a deterministically random integer between 0 and n-1, inclusive. 30 | func Intn(n int) int { 31 | if n <= 0 { 32 | panic("must be positive") 33 | } 34 | return int(randSeed % uint64(n)) 35 | } 36 | 37 | // randSeed is a best-effort at an approximate hash of the Go binary. 38 | var randSeed = binaryHash() 39 | 40 | func binaryHash() uint64 { 41 | // Open the Go binary. 42 | s, err := os.Executable() 43 | if err != nil { 44 | return 0 45 | } 46 | f, err := os.Open(s) 47 | if err != nil { 48 | return 0 49 | } 50 | defer f.Close() 51 | 52 | // Hash the size and several samples of the Go binary. 53 | const numSamples = 8 54 | var buf [64]byte 55 | h := fnv.New64() 56 | fi, err := f.Stat() 57 | if err != nil { 58 | return 0 59 | } 60 | binary.LittleEndian.PutUint64(buf[:8], uint64(fi.Size())) 61 | h.Write(buf[:8]) 62 | for i := int64(0); i < numSamples; i++ { 63 | if _, err := f.ReadAt(buf[:], i*fi.Size()/numSamples); err != nil { 64 | return 0 65 | } 66 | h.Write(buf[:]) 67 | } 68 | return h.Sum64() 69 | } 70 | -------------------------------------------------------------------------------- /vendor/gopkg.in/yaml.v3/writerc.go: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (c) 2011-2019 Canonical Ltd 3 | // Copyright (c) 2006-2010 Kirill Simonov 4 | // 5 | // Permission is hereby granted, free of charge, to any person obtaining a copy of 6 | // this software and associated documentation files (the "Software"), to deal in 7 | // the Software without restriction, including without limitation the rights to 8 | // use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies 9 | // of the Software, and to permit persons to whom the Software is furnished to do 10 | // so, subject to the following conditions: 11 | // 12 | // The above copyright notice and this permission notice shall be included in all 13 | // copies or substantial portions of the Software. 14 | // 15 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | // SOFTWARE. 22 | 23 | package yaml 24 | 25 | // Set the writer error and return false. 26 | func yaml_emitter_set_writer_error(emitter *yaml_emitter_t, problem string) bool { 27 | emitter.error = yaml_WRITER_ERROR 28 | emitter.problem = problem 29 | return false 30 | } 31 | 32 | // Flush the output buffer. 33 | func yaml_emitter_flush(emitter *yaml_emitter_t) bool { 34 | if emitter.write_handler == nil { 35 | panic("write handler not set") 36 | } 37 | 38 | // Check if the buffer is empty. 39 | if emitter.buffer_pos == 0 { 40 | return true 41 | } 42 | 43 | if err := emitter.write_handler(emitter, emitter.buffer[:emitter.buffer_pos]); err != nil { 44 | return yaml_emitter_set_writer_error(emitter, "write error: "+err.Error()) 45 | } 46 | emitter.buffer_pos = 0 47 | return true 48 | } 49 | -------------------------------------------------------------------------------- /vendor/github.com/go-openapi/swag/post_go19.go: -------------------------------------------------------------------------------- 1 | // Copyright 2015 go-swagger maintainers 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | 15 | //go:build go1.9 16 | // +build go1.9 17 | 18 | package swag 19 | 20 | import ( 21 | "sort" 22 | "sync" 23 | ) 24 | 25 | // indexOfInitialisms is a thread-safe implementation of the sorted index of initialisms. 26 | // Since go1.9, this may be implemented with sync.Map. 27 | type indexOfInitialisms struct { 28 | sortMutex *sync.Mutex 29 | index *sync.Map 30 | } 31 | 32 | func newIndexOfInitialisms() *indexOfInitialisms { 33 | return &indexOfInitialisms{ 34 | sortMutex: new(sync.Mutex), 35 | index: new(sync.Map), 36 | } 37 | } 38 | 39 | func (m *indexOfInitialisms) load(initial map[string]bool) *indexOfInitialisms { 40 | m.sortMutex.Lock() 41 | defer m.sortMutex.Unlock() 42 | for k, v := range initial { 43 | m.index.Store(k, v) 44 | } 45 | return m 46 | } 47 | 48 | func (m *indexOfInitialisms) isInitialism(key string) bool { 49 | _, ok := m.index.Load(key) 50 | return ok 51 | } 52 | 53 | func (m *indexOfInitialisms) add(key string) *indexOfInitialisms { 54 | m.index.Store(key, true) 55 | return m 56 | } 57 | 58 | func (m *indexOfInitialisms) sorted() (result []string) { 59 | m.sortMutex.Lock() 60 | defer m.sortMutex.Unlock() 61 | m.index.Range(func(key, value interface{}) bool { 62 | k := key.(string) 63 | result = append(result, k) 64 | return true 65 | }) 66 | sort.Sort(sort.Reverse(byInitialism(result))) 67 | return 68 | } 69 | -------------------------------------------------------------------------------- /vendor/github.com/go-openapi/jsonreference/internal/normalize_url.go: -------------------------------------------------------------------------------- 1 | package internal 2 | 3 | import ( 4 | "net/url" 5 | "regexp" 6 | "strings" 7 | ) 8 | 9 | const ( 10 | defaultHTTPPort = ":80" 11 | defaultHTTPSPort = ":443" 12 | ) 13 | 14 | // Regular expressions used by the normalizations 15 | var rxPort = regexp.MustCompile(`(:\d+)/?$`) 16 | var rxDupSlashes = regexp.MustCompile(`/{2,}`) 17 | 18 | // NormalizeURL will normalize the specified URL 19 | // This was added to replace a previous call to the no longer maintained purell library: 20 | // The call that was used looked like the following: 21 | // 22 | // url.Parse(purell.NormalizeURL(parsed, purell.FlagsSafe|purell.FlagRemoveDuplicateSlashes)) 23 | // 24 | // To explain all that was included in the call above, purell.FlagsSafe was really just the following: 25 | // - FlagLowercaseScheme 26 | // - FlagLowercaseHost 27 | // - FlagRemoveDefaultPort 28 | // - FlagRemoveDuplicateSlashes (and this was mixed in with the |) 29 | // 30 | // This also normalizes the URL into its urlencoded form by removing RawPath and RawFragment. 31 | func NormalizeURL(u *url.URL) { 32 | lowercaseScheme(u) 33 | lowercaseHost(u) 34 | removeDefaultPort(u) 35 | removeDuplicateSlashes(u) 36 | 37 | u.RawPath = "" 38 | u.RawFragment = "" 39 | } 40 | 41 | func lowercaseScheme(u *url.URL) { 42 | if len(u.Scheme) > 0 { 43 | u.Scheme = strings.ToLower(u.Scheme) 44 | } 45 | } 46 | 47 | func lowercaseHost(u *url.URL) { 48 | if len(u.Host) > 0 { 49 | u.Host = strings.ToLower(u.Host) 50 | } 51 | } 52 | 53 | func removeDefaultPort(u *url.URL) { 54 | if len(u.Host) > 0 { 55 | scheme := strings.ToLower(u.Scheme) 56 | u.Host = rxPort.ReplaceAllStringFunc(u.Host, func(val string) string { 57 | if (scheme == "http" && val == defaultHTTPPort) || (scheme == "https" && val == defaultHTTPSPort) { 58 | return "" 59 | } 60 | return val 61 | }) 62 | } 63 | } 64 | 65 | func removeDuplicateSlashes(u *url.URL) { 66 | if len(u.Path) > 0 { 67 | u.Path = rxDupSlashes.ReplaceAllString(u.Path, "/") 68 | } 69 | } 70 | -------------------------------------------------------------------------------- /vendor/sigs.k8s.io/kustomize/kyaml/yaml/doc.go: -------------------------------------------------------------------------------- 1 | // Copyright 2019 The Kubernetes Authors. 2 | // SPDX-License-Identifier: Apache-2.0 3 | 4 | // Package yaml contains libraries for manipulating individual Kubernetes Resource 5 | // Configuration as yaml, keeping yaml structure and comments. 6 | // 7 | // Parsing Resources 8 | // 9 | // Typically Resources will be initialized as collections through the kio package libraries. 10 | // However it is possible to directly initialize Resources using Parse. 11 | // resource, err := yaml.Parse("apiVersion: apps/v1\nkind: Deployment") 12 | // 13 | // Processing Resources 14 | // 15 | // Individual Resources are manipulated using the Pipe and PipeE to apply Filter functions 16 | // to transform the Resource data. 17 | // err := resource.PipeE(yaml.SetAnnotation("key", "value")) 18 | // 19 | // If multiple Filter functions are provided to Pipe or PipeE, each function is applied to 20 | // the result of the last function -- e.g. yaml.Lookup(...), yaml.SetField(...) 21 | // 22 | // Field values may also be retrieved using Pipe. 23 | // annotationValue, err := resource.Pipe(yaml.GetAnnotation("key")) 24 | // 25 | // See http://www.linfo.org/filters.html for a definition of filters. 26 | // 27 | // Common Filters 28 | // 29 | // There are a number of standard filter functions provided by the yaml package. 30 | // 31 | // Working with annotations: 32 | // [AnnotationSetter{}, AnnotationGetter{}, AnnotationClearer{}] 33 | // 34 | // Working with fields by path: 35 | // [PathMatcher{}, PathGetter{}] 36 | // 37 | // Working with individual fields on Maps and Objects: 38 | // [FieldMatcher{}, FieldSetter{}, FieldGetter{}] 39 | // 40 | // Working with individual elements in Sequences: 41 | // [ElementAppender{}, ElementSetter{}, ElementMatcher{}] 42 | // 43 | // Writing Filters 44 | // 45 | // Users may implement their own filter functions. When doing so, can be necessary to work with 46 | // the RNode directly rather than through Pipe. RNode provides a number of functions for doing 47 | // so. See: 48 | // [GetMeta(), Fields(), Elements(), String()] 49 | package yaml 50 | -------------------------------------------------------------------------------- /vendor/sigs.k8s.io/kustomize/kyaml/internal/forked/github.com/go-yaml/yaml/writerc.go: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (c) 2011-2019 Canonical Ltd 3 | // Copyright (c) 2006-2010 Kirill Simonov 4 | // 5 | // Permission is hereby granted, free of charge, to any person obtaining a copy of 6 | // this software and associated documentation files (the "Software"), to deal in 7 | // the Software without restriction, including without limitation the rights to 8 | // use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies 9 | // of the Software, and to permit persons to whom the Software is furnished to do 10 | // so, subject to the following conditions: 11 | // 12 | // The above copyright notice and this permission notice shall be included in all 13 | // copies or substantial portions of the Software. 14 | // 15 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | // SOFTWARE. 22 | 23 | package yaml 24 | 25 | // Set the writer error and return false. 26 | func yaml_emitter_set_writer_error(emitter *yaml_emitter_t, problem string) bool { 27 | emitter.error = yaml_WRITER_ERROR 28 | emitter.problem = problem 29 | return false 30 | } 31 | 32 | // Flush the output buffer. 33 | func yaml_emitter_flush(emitter *yaml_emitter_t) bool { 34 | if emitter.write_handler == nil { 35 | panic("write handler not set") 36 | } 37 | 38 | // Check if the buffer is empty. 39 | if emitter.buffer_pos == 0 { 40 | return true 41 | } 42 | 43 | if err := emitter.write_handler(emitter, emitter.buffer[:emitter.buffer_pos]); err != nil { 44 | return yaml_emitter_set_writer_error(emitter, "write error: "+err.Error()) 45 | } 46 | emitter.buffer_pos = 0 47 | return true 48 | } 49 | -------------------------------------------------------------------------------- /vendor/github.com/go-openapi/swag/pre_go19.go: -------------------------------------------------------------------------------- 1 | // Copyright 2015 go-swagger maintainers 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | 15 | //go:build !go1.9 16 | // +build !go1.9 17 | 18 | package swag 19 | 20 | import ( 21 | "sort" 22 | "sync" 23 | ) 24 | 25 | // indexOfInitialisms is a thread-safe implementation of the sorted index of initialisms. 26 | // Before go1.9, this may be implemented with a mutex on the map. 27 | type indexOfInitialisms struct { 28 | getMutex *sync.Mutex 29 | index map[string]bool 30 | } 31 | 32 | func newIndexOfInitialisms() *indexOfInitialisms { 33 | return &indexOfInitialisms{ 34 | getMutex: new(sync.Mutex), 35 | index: make(map[string]bool, 50), 36 | } 37 | } 38 | 39 | func (m *indexOfInitialisms) load(initial map[string]bool) *indexOfInitialisms { 40 | m.getMutex.Lock() 41 | defer m.getMutex.Unlock() 42 | for k, v := range initial { 43 | m.index[k] = v 44 | } 45 | return m 46 | } 47 | 48 | func (m *indexOfInitialisms) isInitialism(key string) bool { 49 | m.getMutex.Lock() 50 | defer m.getMutex.Unlock() 51 | _, ok := m.index[key] 52 | return ok 53 | } 54 | 55 | func (m *indexOfInitialisms) add(key string) *indexOfInitialisms { 56 | m.getMutex.Lock() 57 | defer m.getMutex.Unlock() 58 | m.index[key] = true 59 | return m 60 | } 61 | 62 | func (m *indexOfInitialisms) sorted() (result []string) { 63 | m.getMutex.Lock() 64 | defer m.getMutex.Unlock() 65 | for k := range m.index { 66 | result = append(result, k) 67 | } 68 | sort.Sort(sort.Reverse(byInitialism(result))) 69 | return 70 | } 71 | -------------------------------------------------------------------------------- /vendor/google.golang.org/protobuf/proto/size_gen.go: -------------------------------------------------------------------------------- 1 | // Copyright 2018 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // Code generated by generate-types. DO NOT EDIT. 6 | 7 | package proto 8 | 9 | import ( 10 | "google.golang.org/protobuf/encoding/protowire" 11 | "google.golang.org/protobuf/reflect/protoreflect" 12 | ) 13 | 14 | func (o MarshalOptions) sizeSingular(num protowire.Number, kind protoreflect.Kind, v protoreflect.Value) int { 15 | switch kind { 16 | case protoreflect.BoolKind: 17 | return protowire.SizeVarint(protowire.EncodeBool(v.Bool())) 18 | case protoreflect.EnumKind: 19 | return protowire.SizeVarint(uint64(v.Enum())) 20 | case protoreflect.Int32Kind: 21 | return protowire.SizeVarint(uint64(int32(v.Int()))) 22 | case protoreflect.Sint32Kind: 23 | return protowire.SizeVarint(protowire.EncodeZigZag(int64(int32(v.Int())))) 24 | case protoreflect.Uint32Kind: 25 | return protowire.SizeVarint(uint64(uint32(v.Uint()))) 26 | case protoreflect.Int64Kind: 27 | return protowire.SizeVarint(uint64(v.Int())) 28 | case protoreflect.Sint64Kind: 29 | return protowire.SizeVarint(protowire.EncodeZigZag(v.Int())) 30 | case protoreflect.Uint64Kind: 31 | return protowire.SizeVarint(v.Uint()) 32 | case protoreflect.Sfixed32Kind: 33 | return protowire.SizeFixed32() 34 | case protoreflect.Fixed32Kind: 35 | return protowire.SizeFixed32() 36 | case protoreflect.FloatKind: 37 | return protowire.SizeFixed32() 38 | case protoreflect.Sfixed64Kind: 39 | return protowire.SizeFixed64() 40 | case protoreflect.Fixed64Kind: 41 | return protowire.SizeFixed64() 42 | case protoreflect.DoubleKind: 43 | return protowire.SizeFixed64() 44 | case protoreflect.StringKind: 45 | return protowire.SizeBytes(len(v.String())) 46 | case protoreflect.BytesKind: 47 | return protowire.SizeBytes(len(v.Bytes())) 48 | case protoreflect.MessageKind: 49 | return protowire.SizeBytes(o.size(v.Message())) 50 | case protoreflect.GroupKind: 51 | return protowire.SizeGroup(num, o.size(v.Message())) 52 | default: 53 | return 0 54 | } 55 | } 56 | -------------------------------------------------------------------------------- /vendor/google.golang.org/protobuf/proto/equal.go: -------------------------------------------------------------------------------- 1 | // Copyright 2019 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package proto 6 | 7 | import ( 8 | "reflect" 9 | 10 | "google.golang.org/protobuf/reflect/protoreflect" 11 | ) 12 | 13 | // Equal reports whether two messages are equal, 14 | // by recursively comparing the fields of the message. 15 | // 16 | // - Bytes fields are equal if they contain identical bytes. 17 | // Empty bytes (regardless of nil-ness) are considered equal. 18 | // 19 | // - Floating-point fields are equal if they contain the same value. 20 | // Unlike the == operator, a NaN is equal to another NaN. 21 | // 22 | // - Other scalar fields are equal if they contain the same value. 23 | // 24 | // - Message fields are equal if they have 25 | // the same set of populated known and extension field values, and 26 | // the same set of unknown fields values. 27 | // 28 | // - Lists are equal if they are the same length and 29 | // each corresponding element is equal. 30 | // 31 | // - Maps are equal if they have the same set of keys and 32 | // the corresponding value for each key is equal. 33 | // 34 | // An invalid message is not equal to a valid message. 35 | // An invalid message is only equal to another invalid message of the 36 | // same type. An invalid message often corresponds to a nil pointer 37 | // of the concrete message type. For example, (*pb.M)(nil) is not equal 38 | // to &pb.M{}. 39 | // If two valid messages marshal to the same bytes under deterministic 40 | // serialization, then Equal is guaranteed to report true. 41 | func Equal(x, y Message) bool { 42 | if x == nil || y == nil { 43 | return x == nil && y == nil 44 | } 45 | if reflect.TypeOf(x).Kind() == reflect.Ptr && x == y { 46 | // Avoid an expensive comparison if both inputs are identical pointers. 47 | return true 48 | } 49 | mx := x.ProtoReflect() 50 | my := y.ProtoReflect() 51 | if mx.IsValid() != my.IsValid() { 52 | return false 53 | } 54 | vx := protoreflect.ValueOfMessage(mx) 55 | vy := protoreflect.ValueOfMessage(my) 56 | return vx.Equal(vy) 57 | } 58 | -------------------------------------------------------------------------------- /vendor/github.com/google/gnostic-models/extensions/extensions.go: -------------------------------------------------------------------------------- 1 | // Copyright 2017 Google LLC. All Rights Reserved. 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | 15 | package gnostic_extension_v1 16 | 17 | import ( 18 | "io/ioutil" 19 | "log" 20 | "os" 21 | 22 | "github.com/golang/protobuf/proto" 23 | "github.com/golang/protobuf/ptypes" 24 | ) 25 | 26 | type extensionHandler func(name string, yamlInput string) (bool, proto.Message, error) 27 | 28 | // Main implements the main program of an extension handler. 29 | func Main(handler extensionHandler) { 30 | // unpack the request 31 | data, err := ioutil.ReadAll(os.Stdin) 32 | if err != nil { 33 | log.Println("File error:", err.Error()) 34 | os.Exit(1) 35 | } 36 | if len(data) == 0 { 37 | log.Println("No input data.") 38 | os.Exit(1) 39 | } 40 | request := &ExtensionHandlerRequest{} 41 | err = proto.Unmarshal(data, request) 42 | if err != nil { 43 | log.Println("Input error:", err.Error()) 44 | os.Exit(1) 45 | } 46 | // call the handler 47 | handled, output, err := handler(request.Wrapper.ExtensionName, request.Wrapper.Yaml) 48 | // respond with the output of the handler 49 | response := &ExtensionHandlerResponse{ 50 | Handled: false, // default assumption 51 | Errors: make([]string, 0), 52 | } 53 | if err != nil { 54 | response.Errors = append(response.Errors, err.Error()) 55 | } else if handled { 56 | response.Handled = true 57 | response.Value, err = ptypes.MarshalAny(output) 58 | if err != nil { 59 | response.Errors = append(response.Errors, err.Error()) 60 | } 61 | } 62 | responseBytes, _ := proto.Marshal(response) 63 | os.Stdout.Write(responseBytes) 64 | } 65 | -------------------------------------------------------------------------------- /vendor/github.com/google/gnostic-models/compiler/error.go: -------------------------------------------------------------------------------- 1 | // Copyright 2017 Google LLC. All Rights Reserved. 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | 15 | package compiler 16 | 17 | import "fmt" 18 | 19 | // Error represents compiler errors and their location in the document. 20 | type Error struct { 21 | Context *Context 22 | Message string 23 | } 24 | 25 | // NewError creates an Error. 26 | func NewError(context *Context, message string) *Error { 27 | return &Error{Context: context, Message: message} 28 | } 29 | 30 | func (err *Error) locationDescription() string { 31 | if err.Context.Node != nil { 32 | return fmt.Sprintf("[%d,%d] %s", err.Context.Node.Line, err.Context.Node.Column, err.Context.Description()) 33 | } 34 | return err.Context.Description() 35 | } 36 | 37 | // Error returns the string value of an Error. 38 | func (err *Error) Error() string { 39 | if err.Context == nil { 40 | return err.Message 41 | } 42 | return err.locationDescription() + " " + err.Message 43 | } 44 | 45 | // ErrorGroup is a container for groups of Error values. 46 | type ErrorGroup struct { 47 | Errors []error 48 | } 49 | 50 | // NewErrorGroupOrNil returns a new ErrorGroup for a slice of errors or nil if the slice is empty. 51 | func NewErrorGroupOrNil(errors []error) error { 52 | if len(errors) == 0 { 53 | return nil 54 | } else if len(errors) == 1 { 55 | return errors[0] 56 | } else { 57 | return &ErrorGroup{Errors: errors} 58 | } 59 | } 60 | 61 | func (group *ErrorGroup) Error() string { 62 | result := "" 63 | for i, err := range group.Errors { 64 | if i > 0 { 65 | result += "\n" 66 | } 67 | result += err.Error() 68 | } 69 | return result 70 | } 71 | -------------------------------------------------------------------------------- /vendor/k8s.io/kube-openapi/pkg/internal/serialization.go: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2023 The Kubernetes Authors. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | 17 | package internal 18 | 19 | import ( 20 | "github.com/go-openapi/jsonreference" 21 | jsonv2 "k8s.io/kube-openapi/pkg/internal/third_party/go-json-experiment/json" 22 | ) 23 | 24 | // DeterministicMarshal calls the jsonv2 library with the deterministic 25 | // flag in order to have stable marshaling. 26 | func DeterministicMarshal(in any) ([]byte, error) { 27 | return jsonv2.MarshalOptions{Deterministic: true}.Marshal(jsonv2.EncodeOptions{}, in) 28 | } 29 | 30 | // JSONRefFromMap populates a json reference object if the map v contains a $ref key. 31 | func JSONRefFromMap(jsonRef *jsonreference.Ref, v map[string]interface{}) error { 32 | if v == nil { 33 | return nil 34 | } 35 | if vv, ok := v["$ref"]; ok { 36 | if str, ok := vv.(string); ok { 37 | ref, err := jsonreference.New(str) 38 | if err != nil { 39 | return err 40 | } 41 | *jsonRef = ref 42 | } 43 | } 44 | return nil 45 | } 46 | 47 | // SanitizeExtensions sanitizes the input map such that non extension 48 | // keys (non x-*, X-*) keys are dropped from the map. Returns the new 49 | // modified map, or nil if the map is now empty. 50 | func SanitizeExtensions(e map[string]interface{}) map[string]interface{} { 51 | for k := range e { 52 | if !IsExtensionKey(k) { 53 | delete(e, k) 54 | } 55 | } 56 | if len(e) == 0 { 57 | e = nil 58 | } 59 | return e 60 | } 61 | 62 | // IsExtensionKey returns true if the input string is of format x-* or X-* 63 | func IsExtensionKey(k string) bool { 64 | return len(k) > 1 && (k[0] == 'x' || k[0] == 'X') && k[1] == '-' 65 | } 66 | -------------------------------------------------------------------------------- /vendor/github.com/golang/protobuf/proto/wire.go: -------------------------------------------------------------------------------- 1 | // Copyright 2019 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package proto 6 | 7 | import ( 8 | protoV2 "google.golang.org/protobuf/proto" 9 | "google.golang.org/protobuf/runtime/protoiface" 10 | ) 11 | 12 | // Size returns the size in bytes of the wire-format encoding of m. 13 | func Size(m Message) int { 14 | if m == nil { 15 | return 0 16 | } 17 | mi := MessageV2(m) 18 | return protoV2.Size(mi) 19 | } 20 | 21 | // Marshal returns the wire-format encoding of m. 22 | func Marshal(m Message) ([]byte, error) { 23 | b, err := marshalAppend(nil, m, false) 24 | if b == nil { 25 | b = zeroBytes 26 | } 27 | return b, err 28 | } 29 | 30 | var zeroBytes = make([]byte, 0, 0) 31 | 32 | func marshalAppend(buf []byte, m Message, deterministic bool) ([]byte, error) { 33 | if m == nil { 34 | return nil, ErrNil 35 | } 36 | mi := MessageV2(m) 37 | nbuf, err := protoV2.MarshalOptions{ 38 | Deterministic: deterministic, 39 | AllowPartial: true, 40 | }.MarshalAppend(buf, mi) 41 | if err != nil { 42 | return buf, err 43 | } 44 | if len(buf) == len(nbuf) { 45 | if !mi.ProtoReflect().IsValid() { 46 | return buf, ErrNil 47 | } 48 | } 49 | return nbuf, checkRequiredNotSet(mi) 50 | } 51 | 52 | // Unmarshal parses a wire-format message in b and places the decoded results in m. 53 | // 54 | // Unmarshal resets m before starting to unmarshal, so any existing data in m is always 55 | // removed. Use UnmarshalMerge to preserve and append to existing data. 56 | func Unmarshal(b []byte, m Message) error { 57 | m.Reset() 58 | return UnmarshalMerge(b, m) 59 | } 60 | 61 | // UnmarshalMerge parses a wire-format message in b and places the decoded results in m. 62 | func UnmarshalMerge(b []byte, m Message) error { 63 | mi := MessageV2(m) 64 | out, err := protoV2.UnmarshalOptions{ 65 | AllowPartial: true, 66 | Merge: true, 67 | }.UnmarshalState(protoiface.UnmarshalInput{ 68 | Buf: b, 69 | Message: mi.ProtoReflect(), 70 | }) 71 | if err != nil { 72 | return err 73 | } 74 | if out.Flags&protoiface.UnmarshalInitialized > 0 { 75 | return nil 76 | } 77 | return checkRequiredNotSet(mi) 78 | } 79 | -------------------------------------------------------------------------------- /vendor/google.golang.org/protobuf/proto/checkinit.go: -------------------------------------------------------------------------------- 1 | // Copyright 2019 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package proto 6 | 7 | import ( 8 | "google.golang.org/protobuf/internal/errors" 9 | "google.golang.org/protobuf/reflect/protoreflect" 10 | "google.golang.org/protobuf/runtime/protoiface" 11 | ) 12 | 13 | // CheckInitialized returns an error if any required fields in m are not set. 14 | func CheckInitialized(m Message) error { 15 | // Treat a nil message interface as an "untyped" empty message, 16 | // which we assume to have no required fields. 17 | if m == nil { 18 | return nil 19 | } 20 | 21 | return checkInitialized(m.ProtoReflect()) 22 | } 23 | 24 | // CheckInitialized returns an error if any required fields in m are not set. 25 | func checkInitialized(m protoreflect.Message) error { 26 | if methods := protoMethods(m); methods != nil && methods.CheckInitialized != nil { 27 | _, err := methods.CheckInitialized(protoiface.CheckInitializedInput{ 28 | Message: m, 29 | }) 30 | return err 31 | } 32 | return checkInitializedSlow(m) 33 | } 34 | 35 | func checkInitializedSlow(m protoreflect.Message) error { 36 | md := m.Descriptor() 37 | fds := md.Fields() 38 | for i, nums := 0, md.RequiredNumbers(); i < nums.Len(); i++ { 39 | fd := fds.ByNumber(nums.Get(i)) 40 | if !m.Has(fd) { 41 | return errors.RequiredNotSet(string(fd.FullName())) 42 | } 43 | } 44 | var err error 45 | m.Range(func(fd protoreflect.FieldDescriptor, v protoreflect.Value) bool { 46 | switch { 47 | case fd.IsList(): 48 | if fd.Message() == nil { 49 | return true 50 | } 51 | for i, list := 0, v.List(); i < list.Len() && err == nil; i++ { 52 | err = checkInitialized(list.Get(i).Message()) 53 | } 54 | case fd.IsMap(): 55 | if fd.MapValue().Message() == nil { 56 | return true 57 | } 58 | v.Map().Range(func(key protoreflect.MapKey, v protoreflect.Value) bool { 59 | err = checkInitialized(v.Message()) 60 | return err == nil 61 | }) 62 | default: 63 | if fd.Message() == nil { 64 | return true 65 | } 66 | err = checkInitialized(v.Message()) 67 | } 68 | return err == nil 69 | }) 70 | return err 71 | } 72 | -------------------------------------------------------------------------------- /vendor/github.com/go-openapi/swag/name_lexem.go: -------------------------------------------------------------------------------- 1 | // Copyright 2015 go-swagger maintainers 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | 15 | package swag 16 | 17 | import "unicode" 18 | 19 | type ( 20 | nameLexem interface { 21 | GetUnsafeGoName() string 22 | GetOriginal() string 23 | IsInitialism() bool 24 | } 25 | 26 | initialismNameLexem struct { 27 | original string 28 | matchedInitialism string 29 | } 30 | 31 | casualNameLexem struct { 32 | original string 33 | } 34 | ) 35 | 36 | func newInitialismNameLexem(original, matchedInitialism string) *initialismNameLexem { 37 | return &initialismNameLexem{ 38 | original: original, 39 | matchedInitialism: matchedInitialism, 40 | } 41 | } 42 | 43 | func newCasualNameLexem(original string) *casualNameLexem { 44 | return &casualNameLexem{ 45 | original: original, 46 | } 47 | } 48 | 49 | func (l *initialismNameLexem) GetUnsafeGoName() string { 50 | return l.matchedInitialism 51 | } 52 | 53 | func (l *casualNameLexem) GetUnsafeGoName() string { 54 | var first rune 55 | var rest string 56 | for i, orig := range l.original { 57 | if i == 0 { 58 | first = orig 59 | continue 60 | } 61 | if i > 0 { 62 | rest = l.original[i:] 63 | break 64 | } 65 | } 66 | if len(l.original) > 1 { 67 | return string(unicode.ToUpper(first)) + lower(rest) 68 | } 69 | 70 | return l.original 71 | } 72 | 73 | func (l *initialismNameLexem) GetOriginal() string { 74 | return l.original 75 | } 76 | 77 | func (l *casualNameLexem) GetOriginal() string { 78 | return l.original 79 | } 80 | 81 | func (l *initialismNameLexem) IsInitialism() bool { 82 | return true 83 | } 84 | 85 | func (l *casualNameLexem) IsInitialism() bool { 86 | return false 87 | } 88 | -------------------------------------------------------------------------------- /vendor/google.golang.org/protobuf/runtime/protoimpl/version.go: -------------------------------------------------------------------------------- 1 | // Copyright 2019 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package protoimpl 6 | 7 | import ( 8 | "google.golang.org/protobuf/internal/version" 9 | ) 10 | 11 | const ( 12 | // MaxVersion is the maximum supported version for generated .pb.go files. 13 | // It is always the current version of the module. 14 | MaxVersion = version.Minor 15 | 16 | // GenVersion is the runtime version required by generated .pb.go files. 17 | // This is incremented when generated code relies on new functionality 18 | // in the runtime. 19 | GenVersion = 20 20 | 21 | // MinVersion is the minimum supported version for generated .pb.go files. 22 | // This is incremented when the runtime drops support for old code. 23 | MinVersion = 0 24 | ) 25 | 26 | // EnforceVersion is used by code generated by protoc-gen-go 27 | // to statically enforce minimum and maximum versions of this package. 28 | // A compilation failure implies either that: 29 | // - the runtime package is too old and needs to be updated OR 30 | // - the generated code is too old and needs to be regenerated. 31 | // 32 | // The runtime package can be upgraded by running: 33 | // 34 | // go get google.golang.org/protobuf 35 | // 36 | // The generated code can be regenerated by running: 37 | // 38 | // protoc --go_out=${PROTOC_GEN_GO_ARGS} ${PROTO_FILES} 39 | // 40 | // Example usage by generated code: 41 | // 42 | // const ( 43 | // // Verify that this generated code is sufficiently up-to-date. 44 | // _ = protoimpl.EnforceVersion(genVersion - protoimpl.MinVersion) 45 | // // Verify that runtime/protoimpl is sufficiently up-to-date. 46 | // _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - genVersion) 47 | // ) 48 | // 49 | // The genVersion is the current minor version used to generated the code. 50 | // This compile-time check relies on negative integer overflow of a uint 51 | // being a compilation failure (guaranteed by the Go specification). 52 | type EnforceVersion uint 53 | 54 | // This enforces the following invariant: 55 | // 56 | // MinVersion ≤ GenVersion ≤ MaxVersion 57 | const ( 58 | _ = EnforceVersion(GenVersion - MinVersion) 59 | _ = EnforceVersion(MaxVersion - GenVersion) 60 | ) 61 | -------------------------------------------------------------------------------- /vendor/gopkg.in/yaml.v3/LICENSE: -------------------------------------------------------------------------------- 1 | 2 | This project is covered by two different licenses: MIT and Apache. 3 | 4 | #### MIT License #### 5 | 6 | The following files were ported to Go from C files of libyaml, and thus 7 | are still covered by their original MIT license, with the additional 8 | copyright staring in 2011 when the project was ported over: 9 | 10 | apic.go emitterc.go parserc.go readerc.go scannerc.go 11 | writerc.go yamlh.go yamlprivateh.go 12 | 13 | Copyright (c) 2006-2010 Kirill Simonov 14 | Copyright (c) 2006-2011 Kirill Simonov 15 | 16 | Permission is hereby granted, free of charge, to any person obtaining a copy of 17 | this software and associated documentation files (the "Software"), to deal in 18 | the Software without restriction, including without limitation the rights to 19 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies 20 | of the Software, and to permit persons to whom the Software is furnished to do 21 | so, subject to the following conditions: 22 | 23 | The above copyright notice and this permission notice shall be included in all 24 | copies or substantial portions of the Software. 25 | 26 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 27 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 28 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 29 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 30 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 31 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 32 | SOFTWARE. 33 | 34 | ### Apache License ### 35 | 36 | All the remaining project files are covered by the Apache license: 37 | 38 | Copyright (c) 2011-2019 Canonical Ltd 39 | 40 | Licensed under the Apache License, Version 2.0 (the "License"); 41 | you may not use this file except in compliance with the License. 42 | You may obtain a copy of the License at 43 | 44 | http://www.apache.org/licenses/LICENSE-2.0 45 | 46 | Unless required by applicable law or agreed to in writing, software 47 | distributed under the License is distributed on an "AS IS" BASIS, 48 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 49 | See the License for the specific language governing permissions and 50 | limitations under the License. 51 | -------------------------------------------------------------------------------- /vendor/google.golang.org/protobuf/reflect/protoreflect/methods.go: -------------------------------------------------------------------------------- 1 | // Copyright 2020 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package protoreflect 6 | 7 | import ( 8 | "google.golang.org/protobuf/internal/pragma" 9 | ) 10 | 11 | // The following types are used by the fast-path Message.ProtoMethods method. 12 | // 13 | // To avoid polluting the public protoreflect API with types used only by 14 | // low-level implementations, the canonical definitions of these types are 15 | // in the runtime/protoiface package. The definitions here and in protoiface 16 | // must be kept in sync. 17 | type ( 18 | methods = struct { 19 | pragma.NoUnkeyedLiterals 20 | Flags supportFlags 21 | Size func(sizeInput) sizeOutput 22 | Marshal func(marshalInput) (marshalOutput, error) 23 | Unmarshal func(unmarshalInput) (unmarshalOutput, error) 24 | Merge func(mergeInput) mergeOutput 25 | CheckInitialized func(checkInitializedInput) (checkInitializedOutput, error) 26 | } 27 | supportFlags = uint64 28 | sizeInput = struct { 29 | pragma.NoUnkeyedLiterals 30 | Message Message 31 | Flags uint8 32 | } 33 | sizeOutput = struct { 34 | pragma.NoUnkeyedLiterals 35 | Size int 36 | } 37 | marshalInput = struct { 38 | pragma.NoUnkeyedLiterals 39 | Message Message 40 | Buf []byte 41 | Flags uint8 42 | } 43 | marshalOutput = struct { 44 | pragma.NoUnkeyedLiterals 45 | Buf []byte 46 | } 47 | unmarshalInput = struct { 48 | pragma.NoUnkeyedLiterals 49 | Message Message 50 | Buf []byte 51 | Flags uint8 52 | Resolver interface { 53 | FindExtensionByName(field FullName) (ExtensionType, error) 54 | FindExtensionByNumber(message FullName, field FieldNumber) (ExtensionType, error) 55 | } 56 | Depth int 57 | } 58 | unmarshalOutput = struct { 59 | pragma.NoUnkeyedLiterals 60 | Flags uint8 61 | } 62 | mergeInput = struct { 63 | pragma.NoUnkeyedLiterals 64 | Source Message 65 | Destination Message 66 | } 67 | mergeOutput = struct { 68 | pragma.NoUnkeyedLiterals 69 | Flags uint8 70 | } 71 | checkInitializedInput = struct { 72 | pragma.NoUnkeyedLiterals 73 | Message Message 74 | } 75 | checkInitializedOutput = struct { 76 | pragma.NoUnkeyedLiterals 77 | } 78 | ) 79 | -------------------------------------------------------------------------------- /vendor/google.golang.org/protobuf/internal/impl/weak.go: -------------------------------------------------------------------------------- 1 | // Copyright 2019 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package impl 6 | 7 | import ( 8 | "fmt" 9 | 10 | "google.golang.org/protobuf/reflect/protoreflect" 11 | "google.golang.org/protobuf/reflect/protoregistry" 12 | ) 13 | 14 | // weakFields adds methods to the exported WeakFields type for internal use. 15 | // 16 | // The exported type is an alias to an unnamed type, so methods can't be 17 | // defined directly on it. 18 | type weakFields WeakFields 19 | 20 | func (w weakFields) get(num protoreflect.FieldNumber) (protoreflect.ProtoMessage, bool) { 21 | m, ok := w[int32(num)] 22 | return m, ok 23 | } 24 | 25 | func (w *weakFields) set(num protoreflect.FieldNumber, m protoreflect.ProtoMessage) { 26 | if *w == nil { 27 | *w = make(weakFields) 28 | } 29 | (*w)[int32(num)] = m 30 | } 31 | 32 | func (w *weakFields) clear(num protoreflect.FieldNumber) { 33 | delete(*w, int32(num)) 34 | } 35 | 36 | func (Export) HasWeak(w WeakFields, num protoreflect.FieldNumber) bool { 37 | _, ok := w[int32(num)] 38 | return ok 39 | } 40 | 41 | func (Export) ClearWeak(w *WeakFields, num protoreflect.FieldNumber) { 42 | delete(*w, int32(num)) 43 | } 44 | 45 | func (Export) GetWeak(w WeakFields, num protoreflect.FieldNumber, name protoreflect.FullName) protoreflect.ProtoMessage { 46 | if m, ok := w[int32(num)]; ok { 47 | return m 48 | } 49 | mt, _ := protoregistry.GlobalTypes.FindMessageByName(name) 50 | if mt == nil { 51 | panic(fmt.Sprintf("message %v for weak field is not linked in", name)) 52 | } 53 | return mt.Zero().Interface() 54 | } 55 | 56 | func (Export) SetWeak(w *WeakFields, num protoreflect.FieldNumber, name protoreflect.FullName, m protoreflect.ProtoMessage) { 57 | if m != nil { 58 | mt, _ := protoregistry.GlobalTypes.FindMessageByName(name) 59 | if mt == nil { 60 | panic(fmt.Sprintf("message %v for weak field is not linked in", name)) 61 | } 62 | if mt != m.ProtoReflect().Type() { 63 | panic(fmt.Sprintf("invalid message type for weak field: got %T, want %T", m, mt.Zero().Interface())) 64 | } 65 | } 66 | if m == nil || !m.ProtoReflect().IsValid() { 67 | delete(*w, int32(num)) 68 | return 69 | } 70 | if *w == nil { 71 | *w = make(weakFields) 72 | } 73 | (*w)[int32(num)] = m 74 | } 75 | -------------------------------------------------------------------------------- /vendor/sigs.k8s.io/kustomize/kyaml/utils/pathsplitter.go: -------------------------------------------------------------------------------- 1 | // Copyright 2021 The Kubernetes Authors. 2 | // SPDX-License-Identifier: Apache-2.0 3 | 4 | package utils 5 | 6 | import "strings" 7 | 8 | // TODO: Move these to kyaml 9 | 10 | // PathSplitter splits a delimited string, permitting escaped delimiters. 11 | func PathSplitter(path string, delimiter string) []string { 12 | ps := strings.Split(path, delimiter) 13 | var res []string 14 | 15 | // allow path to start with forward slash 16 | // i.e. /a/b/c 17 | if len(ps) > 1 && ps[0] == "" { 18 | ps = ps[1:] 19 | } 20 | 21 | res = append(res, ps[0]) 22 | for i := 1; i < len(ps); i++ { 23 | last := len(res) - 1 24 | if strings.HasSuffix(res[last], `\`) { 25 | res[last] = strings.TrimSuffix(res[last], `\`) + delimiter + ps[i] 26 | } else { 27 | res = append(res, ps[i]) 28 | } 29 | } 30 | return res 31 | } 32 | 33 | // SmarterPathSplitter splits a path, retaining bracketed elements. 34 | // If the element is a list entry identifier (defined by the '='), 35 | // it will retain the brackets. 36 | // E.g. "[name=com.foo.someapp]" survives as one thing after splitting 37 | // "spec.template.spec.containers.[name=com.foo.someapp].image" 38 | // See kyaml/yaml/match.go for use of list entry identifiers. 39 | // If the element is a mapping entry identifier, it will remove the 40 | // brackets. 41 | // E.g. "a.b.c" survives as one thing after splitting 42 | // "metadata.annotations.[a.b.c] 43 | // This function uses `PathSplitter`, so it also respects escaped delimiters. 44 | func SmarterPathSplitter(path string, delimiter string) []string { 45 | var result []string 46 | split := PathSplitter(path, delimiter) 47 | 48 | for i := 0; i < len(split); i++ { 49 | elem := split[i] 50 | if strings.HasPrefix(elem, "[") && !strings.HasSuffix(elem, "]") { 51 | // continue until we find the matching "]" 52 | bracketed := []string{elem} 53 | for i < len(split)-1 { 54 | i++ 55 | bracketed = append(bracketed, split[i]) 56 | if strings.HasSuffix(split[i], "]") { 57 | break 58 | } 59 | } 60 | bracketedStr := strings.Join(bracketed, delimiter) 61 | if strings.Contains(bracketedStr, "=") { 62 | result = append(result, bracketedStr) 63 | } else { 64 | result = append(result, strings.Trim(bracketedStr, "[]")) 65 | } 66 | } else { 67 | result = append(result, elem) 68 | } 69 | } 70 | return result 71 | } 72 | -------------------------------------------------------------------------------- /vendor/sigs.k8s.io/kustomize/kyaml/internal/forked/github.com/go-yaml/yaml/LICENSE: -------------------------------------------------------------------------------- 1 | 2 | This project is covered by two different licenses: MIT and Apache. 3 | 4 | #### MIT License #### 5 | 6 | The following files were ported to Go from C files of libyaml, and thus 7 | are still covered by their original MIT license, with the additional 8 | copyright staring in 2011 when the project was ported over: 9 | 10 | apic.go emitterc.go parserc.go readerc.go scannerc.go 11 | writerc.go yamlh.go yamlprivateh.go 12 | 13 | Copyright (c) 2006-2010 Kirill Simonov 14 | Copyright (c) 2006-2011 Kirill Simonov 15 | 16 | Permission is hereby granted, free of charge, to any person obtaining a copy of 17 | this software and associated documentation files (the "Software"), to deal in 18 | the Software without restriction, including without limitation the rights to 19 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies 20 | of the Software, and to permit persons to whom the Software is furnished to do 21 | so, subject to the following conditions: 22 | 23 | The above copyright notice and this permission notice shall be included in all 24 | copies or substantial portions of the Software. 25 | 26 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 27 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 28 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 29 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 30 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 31 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 32 | SOFTWARE. 33 | 34 | ### Apache License ### 35 | 36 | All the remaining project files are covered by the Apache license: 37 | 38 | Copyright (c) 2011-2019 Canonical Ltd 39 | 40 | Licensed under the Apache License, Version 2.0 (the "License"); 41 | you may not use this file except in compliance with the License. 42 | You may obtain a copy of the License at 43 | 44 | http://www.apache.org/licenses/LICENSE-2.0 45 | 46 | Unless required by applicable law or agreed to in writing, software 47 | distributed under the License is distributed on an "AS IS" BASIS, 48 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 49 | See the License for the specific language governing permissions and 50 | limitations under the License. 51 | -------------------------------------------------------------------------------- /vendor/sigs.k8s.io/kustomize/kyaml/yaml/util.go: -------------------------------------------------------------------------------- 1 | // Copyright 2021 The Kubernetes Authors. 2 | // SPDX-License-Identifier: Apache-2.0 3 | 4 | package yaml 5 | 6 | import ( 7 | "strings" 8 | ) 9 | 10 | // DeriveSeqIndentStyle derives the sequence indentation annotation value for the resource, 11 | // originalYAML is the input yaml string, 12 | // the style is decided by deriving the existing sequence indentation of first sequence node 13 | func DeriveSeqIndentStyle(originalYAML string) string { 14 | lines := strings.Split(originalYAML, "\n") 15 | for i, line := range lines { 16 | elems := strings.SplitN(line, "- ", 2) 17 | if len(elems) != 2 { 18 | continue 19 | } 20 | // prefix of "- " must be sequence of spaces 21 | if strings.Trim(elems[0], " ") != "" { 22 | continue 23 | } 24 | numSpacesBeforeSeqElem := len(elems[0]) 25 | 26 | // keyLine is the line before the first sequence element 27 | keyLine := keyLineBeforeSeqElem(lines, i) 28 | if keyLine == "" { 29 | // there is no keyLine for this sequence node 30 | // all of those lines are comments 31 | continue 32 | } 33 | numSpacesBeforeKeyElem := len(keyLine) - len(strings.TrimLeft(keyLine, " ")) 34 | trimmedKeyLine := strings.Trim(keyLine, " ") 35 | if strings.Count(trimmedKeyLine, ":") != 1 || !strings.HasSuffix(trimmedKeyLine, ":") { 36 | // if the key line doesn't contain only one : that too at the end, 37 | // this is not a sequence node, it is a wrapped sequence node string 38 | // ignore it 39 | continue 40 | } 41 | 42 | if numSpacesBeforeSeqElem == numSpacesBeforeKeyElem { 43 | return string(CompactSequenceStyle) 44 | } 45 | 46 | if numSpacesBeforeSeqElem-numSpacesBeforeKeyElem == 2 { 47 | return string(WideSequenceStyle) 48 | } 49 | } 50 | 51 | return string(CompactSequenceStyle) 52 | } 53 | 54 | // keyLineBeforeSeqElem iterates through the lines before the first seqElement 55 | // and tries to find the non-comment key line for the sequence node 56 | func keyLineBeforeSeqElem(lines []string, seqElemIndex int) string { 57 | // start with the previous line of sequence element 58 | i := seqElemIndex - 1 59 | for ; i >= 0; i-- { 60 | line := lines[i] 61 | trimmedLine := strings.Trim(line, " ") 62 | if strings.HasPrefix(trimmedLine, "#") { // commented line 63 | continue 64 | } 65 | // we have a non-commented line which can have a trailing comment 66 | parts := strings.SplitN(line, "#", 2) 67 | return parts[0] // throw away the trailing comment part 68 | } 69 | return "" 70 | } 71 | -------------------------------------------------------------------------------- /vendor/sigs.k8s.io/json/CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # Contributing Guidelines 2 | 3 | Welcome to Kubernetes. We are excited about the prospect of you joining our [community](https://git.k8s.io/community)! The Kubernetes community abides by the CNCF [code of conduct](code-of-conduct.md). Here is an excerpt: 4 | 5 | _As contributors and maintainers of this project, and in the interest of fostering an open and welcoming community, we pledge to respect all people who contribute through reporting issues, posting feature requests, updating documentation, submitting pull requests or patches, and other activities._ 6 | 7 | ## Criteria for adding code here 8 | 9 | This library adapts the stdlib `encoding/json` decoder to be compatible with 10 | Kubernetes JSON decoding, and is not expected to actively add new features. 11 | 12 | It may be updated with changes from the stdlib `encoding/json` decoder. 13 | 14 | Any code that is added must: 15 | * Have full unit test and benchmark coverage 16 | * Be backward compatible with the existing exposed go API 17 | * Have zero external dependencies 18 | * Preserve existing benchmark performance 19 | * Preserve compatibility with existing decoding behavior of `UnmarshalCaseSensitivePreserveInts()` or `UnmarshalStrict()` 20 | * Avoid use of `unsafe` 21 | 22 | ## Getting Started 23 | 24 | We have full documentation on how to get started contributing here: 25 | 26 | 29 | 30 | - [Contributor License Agreement](https://git.k8s.io/community/CLA.md) Kubernetes projects require that you sign a Contributor License Agreement (CLA) before we can accept your pull requests 31 | - [Kubernetes Contributor Guide](https://git.k8s.io/community/contributors/guide) - Main contributor documentation, or you can just jump directly to the [contributing section](https://git.k8s.io/community/contributors/guide#contributing) 32 | - [Contributor Cheat Sheet](https://git.k8s.io/community/contributors/guide/contributor-cheatsheet) - Common resources for existing developers 33 | 34 | ## Community, discussion, contribution, and support 35 | 36 | You can reach the maintainers of this project via the 37 | [sig-api-machinery mailing list / channels](https://github.com/kubernetes/community/tree/master/sig-api-machinery#contact). 38 | 39 | ## Mentorship 40 | 41 | - [Mentoring Initiatives](https://git.k8s.io/community/mentoring) - We have a diverse set of mentorship programs available that are always looking for volunteers! 42 | 43 | --------------------------------------------------------------------------------