fix: all enums same style (#262)

* fix: all enums same style

* fix: rename process to reduce

* add some missing enum renaming

Co-authored-by: Livio Amstutz <livio.a@gmail.com>
This commit is contained in:
Fabi
2020-06-23 14:47:47 +02:00
committed by GitHub
parent c376b92315
commit 3cd3a238c2
152 changed files with 1026 additions and 1024 deletions

View File

@@ -8,7 +8,7 @@ import (
type ApplicationSearchRequest proj_model.ApplicationSearchRequest
type ApplicationSearchQuery proj_model.ApplicationSearchQuery
type ApplicationSearchKey proj_model.ApplicationSearchKey
type ApplicationSearchKey proj_model.AppSearchKey
func (req ApplicationSearchRequest) GetLimit() uint64 {
return req.Limit
@@ -19,7 +19,7 @@ func (req ApplicationSearchRequest) GetOffset() uint64 {
}
func (req ApplicationSearchRequest) GetSortingColumn() view.ColumnKey {
if req.SortingColumn == proj_model.APPLICATIONSEARCHKEY_UNSPECIFIED {
if req.SortingColumn == proj_model.AppSearchKeyUnspecified {
return nil
}
return ApplicationSearchKey(req.SortingColumn)
@@ -50,14 +50,14 @@ func (req ApplicationSearchQuery) GetValue() interface{} {
}
func (key ApplicationSearchKey) ToColumnName() string {
switch proj_model.ApplicationSearchKey(key) {
case proj_model.APPLICATIONSEARCHKEY_APP_ID:
switch proj_model.AppSearchKey(key) {
case proj_model.AppSearchKeyAppID:
return ApplicationKeyID
case proj_model.APPLICATIONSEARCHKEY_NAME:
case proj_model.AppSearchKeyName:
return ApplicationKeyName
case proj_model.APPLICATIONSEARCHKEY_PROJECT_ID:
case proj_model.AppSearchKeyProjectID:
return ApplicationKeyProjectID
case proj_model.APPLICATIONSEARCHKEY_OIDC_CLIENT_ID:
case proj_model.AppSearchKeyOIDCClientID:
return ApplicationKeyOIDCClientID
default:
return ""