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 <[email protected]>
This commit is contained in:
Fabi
2020-06-23 14:47:47 +02:00
committed by GitHub
co-authored by Livio Amstutz
parent c376b92315
commit 3cd3a238c2
152 changed files with 1026 additions and 1024 deletions
+4 -4
View File
@@ -27,7 +27,7 @@ func (o *OPStorage) GetClientByClientID(ctx context.Context, id string) (op.Clie
if err != nil {
return nil, err
}
if client.State != proj_model.APPSTATE_ACTIVE {
if client.State != proj_model.AppStateActive {
return nil, errors.ThrowPreconditionFailed(nil, "OIDC-sdaGg", "client is not active")
}
return ClientFromBusiness(client, o.defaultLoginURL, o.defaultAccessTokenLifetime, o.defaultIdTokenLifetime)
@@ -86,11 +86,11 @@ func (o *OPStorage) GetUserinfoFromScopes(ctx context.Context, userID string, sc
func getGender(gender user_model.Gender) string {
switch gender {
case user_model.GENDER_FEMALE:
case user_model.GenderFemale:
return "female"
case user_model.GENDER_MALE:
case user_model.GenderMale:
return "male"
case user_model.GENDER_DIVERSE:
case user_model.GenderDiverse:
return "diverse"
}
return ""
+3 -3
View File
@@ -61,11 +61,11 @@ func (c *Client) AccessTokenType() op.AccessTokenType {
func authMethodToOIDC(authType model.OIDCAuthMethodType) op.AuthMethod {
switch authType {
case model.OIDCAUTHMETHODTYPE_BASIC:
case model.OIDCAuthMethodTypeBasic:
return op.AuthMethodBasic
case model.OIDCAUTHMETHODTYPE_POST:
case model.OIDCAuthMethodTypePost:
return op.AuthMethodPost
case model.OIDCAUTHMETHODTYPE_NONE:
case model.OIDCAuthMethodTypeNone:
return op.AuthMethodNone
default:
return op.AuthMethodBasic