Skip to content

Commit

Permalink
update api token type enums
Browse files Browse the repository at this point in the history
  • Loading branch information
imjaroiswebdev committed Aug 11, 2023
1 parent f7bbc4c commit 0662454
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions pagerduty/pagerduty.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,19 +37,19 @@ func (d authTokenType) String() string {
}

var authTokenTypeToStringMapping = map[authTokenType]string{
authTokenTypeAPIToken: "apiToken",
authTokenTypeScopedOauthToken: "scopedOauthToken",
authTokenTypeUseAppCredentials: "useAppCredentials",
authTokenTypeAPIToken: "api_token",
authTokenTypeScopedOauthToken: "scoped_oauth_token",
authTokenTypeUseAppCredentials: "use_app_credentials",
}

func authTokenTypeFromString(s string) authTokenType {
return authTokenTypeFromStringMapping[s]
}

var authTokenTypeFromStringMapping = map[string]authTokenType{
"apiToken": authTokenTypeAPIToken,
"scopedOauthToken": authTokenTypeScopedOauthToken,
"useAppCredentials": authTokenTypeUseAppCredentials,
"api_token": authTokenTypeAPIToken,
"scoped_oauth_token": authTokenTypeScopedOauthToken,
"use_app_credentials": authTokenTypeUseAppCredentials,
}

type service struct {
Expand Down

0 comments on commit 0662454

Please sign in to comment.