Skip to content
This repository was archived by the owner on Dec 6, 2024. It is now read-only.

monorepo: update client/api generators #79

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
The diff you're trying to view is too large. We only load the first 3000 changed files.
48 changes: 48 additions & 0 deletions client/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
GO ?= go

# # Setting SHELL to bash allows bash commands to be executed by recipes.
# Options are set to exit when a recipe line exits non-zero or a piped command fails.
SHELL = /usr/bin/env bash -o pipefail
.SHELLFLAGS = -ec

.PHONY: all
all: generate test

.PHONY: help
help: ## Display this help.
@awk 'BEGIN {FS = ":.*##"; printf "\nUsage:\n make \033[36m<target>\033[0m\n"} /^[a-zA-Z_0-9-]+:.*?##/ { printf " \033[36m%-15s\033[0m %s\n", $$1, $$2 } /^##@/ { printf "\n\033[1m%s\033[0m\n", substr($$0, 5) } ' $(MAKEFILE_LIST)

##@ Development

.PHONY: generate
generate: crds codegen fmt module vendor ## Run all code generation/modification tools.

.PHONY: test
test: vet ## Run all tests

##@ Generators

.PHONY: crds
crds: ## Generate CustomResourceDefinitions.
$(GO) run -v ./vendor/sigs.k8s.io/controller-tools/cmd/controller-gen crd paths="./apis/objectstorage/..."

.PHONY:
codegen: ## Generate deepcopy, client, informer, and lister implementations.
./hack/update-codegen.sh

.PHONY: fmt
fmt: ## Run go fmt
$(GO) fmt ./...

.PHONY: module ## Update go mod
$(GO) mod tidy

.PHONY: vendor
vendor: ## Update vendor dir
$(GO) mod vendor

##@ Tests

.PHONY: vet
vet: ## Run go vet
$(GO) vet ./...
13 changes: 6 additions & 7 deletions client/apis/bucket_info.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,23 +14,22 @@ See the License for the specific language governing permissions and
limitations under the License.
*/


package cosiapi

import (
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"sigs.k8s.io/container-object-storage-interface-api/apis/objectstorage/v1alpha1"
"sigs.k8s.io/container-object-storage-interface-api/client/apis/objectstorage/v1alpha1"
)

type SecretS3 struct {
Endpoint string `json:"endpoint"`
Region string `json:"region"`
AccessKeyID string `json:"accessKeyID"`
Endpoint string `json:"endpoint"`
Region string `json:"region"`
AccessKeyID string `json:"accessKeyID"`
AccessSecretKey string `json:"accessSecretKey"`
}

type SecretAzure struct {
AccessToken string `json:"accessToken"`
AccessToken string `json:"accessToken"`
ExpiryTimeStamp *metav1.Time `json:"expiryTimeStamp"`
}

Expand All @@ -45,7 +44,7 @@ type BucketInfo struct {
}

type BucketInfoSpec struct {
// BucketName is the name of the Bucket
// BucketName is the name of the Bucket
BucketName string `json:"bucketName"`

// AuthenticationType denotes the style of authentication
Expand Down
2 changes: 1 addition & 1 deletion client/apis/objectstorage/v1alpha1/register.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ package v1alpha1

import (
"k8s.io/apimachinery/pkg/runtime/schema"
"sigs.k8s.io/container-object-storage-interface-api/client/apis/objectstorage"
"sigs.k8s.io/controller-runtime/pkg/scheme"
objectstorage "sigs.k8s.io/container-object-storage-interface-api/apis/objectstorage"
)

var (
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

121 changes: 0 additions & 121 deletions client/clientset/internalversion/clientset.go

This file was deleted.

20 changes: 0 additions & 20 deletions client/clientset/internalversion/doc.go

This file was deleted.

85 changes: 0 additions & 85 deletions client/clientset/internalversion/fake/clientset_generated.go

This file was deleted.

20 changes: 0 additions & 20 deletions client/clientset/internalversion/fake/doc.go

This file was deleted.

Loading