Skip to content
This repository has been archived by the owner on Dec 21, 2023. It is now read-only.

Commit

Permalink
#1492 refactoring of go-utils (#148)
Browse files Browse the repository at this point in the history
* started cleanup and restructuring

* moved sli handler functions

* #1492 added api models

* #1492 restructured packages

* #1492 updated golang version in travis file

* #1492 cleanup

* #1492 fixed unit tests

* #1492 added CreateProject and CreateService models

* #1492 added CreateProject and CreateService models

* #1492 added CreateServiceInStage function

* #1492 added CreateConfigurationServiceProject function

* #1492 fixed extraction of Keptn Context

* #1492 set default protocol of helpers to http
  • Loading branch information
bacherfl authored Apr 2, 2020
1 parent e6ef292 commit a4ac0d7
Show file tree
Hide file tree
Showing 84 changed files with 2,052 additions and 3,261 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ dist: xenial
language: go

go:
- 1.12.x
- 1.13.x

# Don't email me the results of the test runs.
notifications:
Expand Down
9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,15 @@ import {
)
```
## Updating model definitions
After updating the model definitions in the `swagger.yaml` file, execute the command
```
swagger generate model --spec=swagger.yaml -t=./pkg/api/
```
to update the models located in `./pkg/api/models`
## Automation
Within [.travis.yml](.travis.yml) we have included an automation that creates a Pull Request to
Expand Down
38 changes: 3 additions & 35 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,50 +1,18 @@
module github.com/keptn/go-utils

go 1.12
go 1.13

require (
github.com/Azure/go-autorest/autorest v0.2.0
github.com/Masterminds/goutils v1.1.0 // indirect
github.com/Masterminds/semver v1.5.0 // indirect
github.com/Masterminds/sprig v2.22.0+incompatible // indirect
github.com/cloudevents/sdk-go v0.10.0
github.com/cyphar/filepath-securejoin v0.2.2 // indirect
github.com/go-openapi/errors v0.19.2
github.com/go-openapi/strfmt v0.19.3
github.com/go-openapi/swag v0.19.5
github.com/go-openapi/validate v0.19.4
github.com/gobwas/glob v0.2.3 // indirect
github.com/gogo/protobuf v1.3.1 // indirect
github.com/go-test/deep v1.0.5
github.com/gogo/protobuf v1.2.0 // indirect
github.com/google/uuid v1.1.1
github.com/googleapis/gnostic v0.3.1 // indirect
github.com/gophercloud/gophercloud v0.6.0 // indirect
github.com/gorilla/websocket v1.4.1
github.com/huandu/xstrings v1.2.0 // indirect
github.com/imdario/mergo v0.3.8 // indirect
github.com/json-iterator/go v1.1.7 // indirect
github.com/magiconair/properties v1.8.1
github.com/mitchellh/copystructure v1.0.0 // indirect
github.com/spf13/pflag v1.0.5 // indirect
github.com/stretchr/testify v1.4.0
golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550 // indirect
golang.org/x/net v0.0.0-20191021144547-ec77196f6094 // indirect
golang.org/x/time v0.0.0-20191023065245-6d3f0bb11be5 // indirect
gopkg.in/inf.v0 v0.9.1 // indirect
gopkg.in/src-d/go-git.v4 v4.13.1
gopkg.in/yaml.v2 v2.2.4
k8s.io/api v0.0.0-20190313235455-40a48860b5ab
k8s.io/apimachinery v0.0.0-20190313205120-d7deff9243b1
k8s.io/client-go v11.0.0+incompatible
k8s.io/helm v2.14.3+incompatible
k8s.io/klog v1.0.0 // indirect
k8s.io/utils v0.0.0-20191010214722-8d271d903fe4 // indirect
sigs.k8s.io/yaml v1.1.0 // indirect
)

// using kubernetes-1.15.0 for api/apimachinery

replace (
k8s.io/api => k8s.io/api v0.0.0-20190313235455-40a48860b5ab
k8s.io/apimachinery => k8s.io/apimachinery v0.0.0-20190313205120-d7deff9243b1
k8s.io/client-go => k8s.io/client-go v11.0.0+incompatible
)
115 changes: 10 additions & 105 deletions go.sum

Large diffs are not rendered by default.

19 changes: 0 additions & 19 deletions pkg/api/models/contenttype.go

This file was deleted.

89 changes: 89 additions & 0 deletions pkg/api/models/create_project.go

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

69 changes: 69 additions & 0 deletions pkg/api/models/create_service.go

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

10 changes: 0 additions & 10 deletions pkg/api/models/data.go

This file was deleted.

12 changes: 4 additions & 8 deletions pkg/api/models/error.go

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

Loading

0 comments on commit a4ac0d7

Please sign in to comment.