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

@@ -30,20 +30,20 @@ type ApplicationChange struct {
type AppState int32
const (
APPSTATE_ACTIVE AppState = iota
APPSTATE_INACTIVE
AppStateActive AppState = iota
AppStateInactive
)
type AppType int32
const (
APPTYPE_UNDEFINED AppType = iota
APPTYPE_OIDC
APPTYPE_SAML
AppTypeUnspecified AppType = iota
AppTypeOIDC
AppTypeSAML
)
func NewApplication(projectID, appID string) *Application {
return &Application{ObjectRoot: es_models.ObjectRoot{AggregateID: projectID}, AppID: appID, State: APPSTATE_ACTIVE}
return &Application{ObjectRoot: es_models.ObjectRoot{AggregateID: projectID}, AppID: appID, State: AppStateActive}
}
func (a *Application) IsValid(includeConfig bool) bool {
@@ -53,7 +53,7 @@ func (a *Application) IsValid(includeConfig bool) bool {
if !includeConfig {
return true
}
if a.Type == APPTYPE_OIDC && !a.OIDCConfig.IsValid() {
if a.Type == AppTypeOIDC && !a.OIDCConfig.IsValid() {
return false
}
return true