MCPcopy Create free account
hub / github.com/dropbox/dbxcli / loginTokenType

Function loginTokenType

cmd/login.go:24–35  ·  view source on GitHub ↗
(name string)

Source from the content-addressed store, hash-verified

22)
23
24func loginTokenType(name string) (string, error) {
25 switch name {
26 case "", tokenPersonal:
27 return tokenPersonal, nil
28 case tokenTeamAccess, "team-access", "team_access":
29 return tokenTeamAccess, nil
30 case tokenTeamManage, "team-manage", "team_manage":
31 return tokenTeamManage, nil
32 default:
33 return "", fmt.Errorf("unknown login token type %q; expected personal, team-access, or team-manage", name)
34 }
35}
36
37func loginAppKeyFromFlag(cmd *cobra.Command, tokType string) error {
38 appKey, _ := cmd.Flags().GetString("app-key")

Callers 3

TestLoginTokenTypeFunction · 0.85
loginFunction · 0.85

Calls

no outgoing calls

Tested by 2

TestLoginTokenTypeFunction · 0.68