Skip to content

Commit

Permalink
feat(gopinto): update to the newest version of pinto API
Browse files Browse the repository at this point in the history
  • Loading branch information
secustor committed Aug 18, 2021
1 parent a6f8db0 commit 8cfe67c
Show file tree
Hide file tree
Showing 35 changed files with 1,781 additions and 1,476 deletions.
18 changes: 10 additions & 8 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -12,22 +12,24 @@ IMAGE_TAG ?= $(shell git rev-parse --short HEAD)
PACKAGE ?= "gopinto"
SOURCE_URL ?= "https://pinto.irgendwo.co/api/swagger/dns-swagger.json"

GIT_HOST ?= "gitlab.com"
GIT_REPOSITORY_NAMESPACE ?= "whizus/customer/pinto"
GIT_REPOSITORY_NAME ?= "cert-manager-webhook-pinto"
GIT_HOST ?= "github.com"
GIT_REPOSITORY_NAMESPACE ?= "camaoag"
GIT_REPOSITORY_NAME ?= "cert-manager-webhook-project-pinto"

# Kubebuilder
KUBEBUILDER_VERSION=2.3.1

# Testing
CODE_PATHS ?= ./pkg/... ./internal/...
TEST_ZONE_NAME ?= example.com.

# Run tests
test: unit-test tests/kubebuilder
TEST_ZONE_NAME=$(TEST_ZONE_NAME) go test -v ./... -coverprofile cover.out
TEST_ZONE_NAME=$(TEST_ZONE_NAME) go test -v $(CODE_PATHS) -coverprofile cover.out

.PHONY: unit-test
unit-test:
go test -v -race ./pkg/...
go test -v -race $(CODE_PATHS)

tests/kubebuilder:
curl -fsSL https://github.com/kubernetes-sigs/kubebuilder/releases/download/v$(KUBEBUILDER_VERSION)/kubebuilder_$(KUBEBUILDER_VERSION)_$(OS)_$(ARCH).tar.gz -o kubebuilder-tools.tar.gz
Expand All @@ -48,11 +50,11 @@ docker-build:

.PHONY: get-dependencies
get-dependencies:
go get -v -t -d ./...
go get -v -t -d $(CODE_PATHS)

.PHONY: vet
vet:
go vet ./...
go vet $(CODE_PATHS)

.PHONY: fmt-fix
fmt-fix:
Expand All @@ -70,5 +72,5 @@ generate-openapi:
--git-repo-id $(GIT_REPOSITORY_NAME) \
--git-user-id $(GIT_REPOSITORY_NAMESPACE) \
--git-host $(GIT_HOST) \
--additional-properties=generateInterfaces=true,isGoSubmodule=true
--additional-properties=generateInterfaces=true,isGoSubmodule=true,enumClassPrefix=true
rm internal/gopinto/go.mod internal/gopinto/go.sum
16 changes: 10 additions & 6 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,15 @@ go 1.16

require (
github.com/jetstack/cert-manager v1.3.1
github.com/jinzhu/copier v0.3.0
github.com/jinzhu/copier v0.3.2
github.com/sirupsen/logrus v1.8.1
golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d
k8s.io/api v0.19.3
k8s.io/apiextensions-apiserver v0.19.3
k8s.io/apimachinery v0.19.3
k8s.io/client-go v0.19.3
golang.org/x/oauth2 v0.0.0-20210218202405-ba52d332ba99
google.golang.org/grpc v1.39.1 // indirect
k8s.io/api v0.19.0
k8s.io/apiextensions-apiserver v0.19.0
k8s.io/apimachinery v0.19.0
k8s.io/client-go v0.19.0
)

// v1.30.0 removes an API which is needed for go.etcd.io/etcd/proxy/grpcproxy, but etcd does not pin its dependency
replace google.golang.org/grpc v1.39.1 => google.golang.org/grpc v1.29.1
182 changes: 154 additions & 28 deletions go.sum

Large diffs are not rendered by default.

24 changes: 0 additions & 24 deletions internal/gopinto/.gitignore

This file was deleted.

10 changes: 6 additions & 4 deletions internal/gopinto/.openapi-generator/FILES
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,23 @@
.travis.yml
README.md
api/openapi.yaml
api_records.go
api_zones.go
api_record.go
api_zone.go
client.go
configuration.go
docs/AccessOptions.md
docs/CreateRecordRequestModel.md
docs/CreateZoneRequestModel.md
docs/Record.md
docs/RecordApi.md
docs/RecordClass.md
docs/RecordType.md
docs/RecordsApi.md
docs/Zone.md
docs/ZonesApi.md
docs/ZoneApi.md
git_push.sh
go.mod
go.sum
model_access_options.go
model_create_record_request_model.go
model_create_zone_request_model.go
model_record.go
Expand Down
2 changes: 1 addition & 1 deletion internal/gopinto/.openapi-generator/VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
5.1.1
5.2.0
32 changes: 15 additions & 17 deletions internal/gopinto/README.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,6 @@
# Go API client for gopinto

<h1>Additional info</h1>
<h2><a href=\"/nexus-info\">Nexus Info (DNS - CloudProviders)</h2></a>

<h2><a href=\"/markdown/OPENAPIGATEWAY-USAGE.MD\">OPENAPIGATEWAY-USAGE.MD</h2></a>
<h2><a href=\"/markdown/CHANGELOG.md\">CHANGELOG.md</h2></a>
<h2><a href=\"/markdown/version.md\">version.md</h2></a>

No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)

## Overview
This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project. By using the [OpenAPI-spec](https://www.openapis.org/) from a remote server, you can easily generate an API client.
Expand Down Expand Up @@ -84,17 +78,18 @@ All URIs are relative to *http://localhost*

Class | Method | HTTP request | Description
------------ | ------------- | ------------- | -------------
*RecordsApi* | [**ApiDnsRecordsDelete**](docs/RecordsApi.md#apidnsrecordsdelete) | **Delete** /api/dns/Records | Deletes records which match the specified criterias
*RecordsApi* | [**ApiDnsRecordsGet**](docs/RecordsApi.md#apidnsrecordsget) | **Get** /api/dns/Records | Retrieves the DNS zone&#39;s resource records
*RecordsApi* | [**ApiDnsRecordsPost**](docs/RecordsApi.md#apidnsrecordspost) | **Post** /api/dns/Records | Creates a new DNS resource record
*ZonesApi* | [**ApiDnsZonesGet**](docs/ZonesApi.md#apidnszonesget) | **Get** /api/dns/Zones | Retrieves the DNS zones assigned to the account
*ZonesApi* | [**ApiDnsZonesPost**](docs/ZonesApi.md#apidnszonespost) | **Post** /api/dns/Zones | Creates a new DNS zone
*ZonesApi* | [**ApiDnsZonesZoneDelete**](docs/ZonesApi.md#apidnszoneszonedelete) | **Delete** /api/dns/Zones/{zone} | Deletes a DNS zone from the passed provider
*ZonesApi* | [**ApiDnsZonesZoneGet**](docs/ZonesApi.md#apidnszoneszoneget) | **Get** /api/dns/Zones/{zone} | Loads the specified DNS zone
*RecordApi* | [**DnsApiRecordsDelete**](docs/RecordApi.md#dnsapirecordsdelete) | **Delete** /dns/api/Records | Deletes records which match the specified criterias
*RecordApi* | [**DnsApiRecordsGet**](docs/RecordApi.md#dnsapirecordsget) | **Get** /dns/api/Records | Retrieves the DNS zone&#39;s resource records
*RecordApi* | [**DnsApiRecordsPost**](docs/RecordApi.md#dnsapirecordspost) | **Post** /dns/api/Records | Creates a new DNS resource record
*ZoneApi* | [**DnsApiZonesDelete**](docs/ZoneApi.md#dnsapizonesdelete) | **Delete** /dns/api/Zones | Deletes a DNS zone from the passed provider
*ZoneApi* | [**DnsApiZonesGet**](docs/ZoneApi.md#dnsapizonesget) | **Get** /dns/api/Zones | Retrieves the DNS zones assigned to the account
*ZoneApi* | [**DnsApiZonesPost**](docs/ZoneApi.md#dnsapizonespost) | **Post** /dns/api/Zones | Creates a new DNS zone
*ZoneApi* | [**DnsApiZonesZoneGet**](docs/ZoneApi.md#dnsapizoneszoneget) | **Get** /dns/api/Zones/{zone} | Loads the specified DNS zone


## Documentation For Models

- [AccessOptions](docs/AccessOptions.md)
- [CreateRecordRequestModel](docs/CreateRecordRequestModel.md)
- [CreateZoneRequestModel](docs/CreateZoneRequestModel.md)
- [Record](docs/Record.md)
Expand All @@ -112,10 +107,13 @@ Class | Method | HTTP request | Description

- **Type**: OAuth
- **Flow**: accessCode
- **Authorization URL**: https://auth.pinto.irgendwo.co/connect/authorize
- **Authorization URL**: https://localhost:9100/connect/authorize
- **Scopes**:
- **nexus**: Nexus - API
- **openapigateway**: OpenApiGateway - API
- **fava_business_api**: Fava - Business - API
- **fava_credentials_api**: Fava - Credentials - API
- **fava_openapi_gateway**: Fava - OpenApiGateway - API
- **pinto_citadel**: Pinto - Citadel - Certificates - API
- **pinto_nexus**: Pinto - Nexus - DNS - API

Example

Expand Down
Loading

0 comments on commit 8cfe67c

Please sign in to comment.