(host string)
| 12 | type tinyConfig map[string]string |
| 13 | |
| 14 | func (c tinyConfig) ActiveTokenWithRefresh(host string) (gh.Credential, gh.RefreshStatus, error) { |
| 15 | status := gh.RefreshStatusInapplicable |
| 16 | switch c["_refresh_status"] { |
| 17 | case "expired": |
| 18 | status = gh.RefreshStatusExpired |
| 19 | } |
| 20 | return gh.Credential{ |
| 21 | Token: c[fmt.Sprintf("%s:%s", host, "oauth_token")], |
| 22 | Source: c["_source"], |
| 23 | RefreshToken: c["_refresh_token"], |
| 24 | }, status, nil |
| 25 | } |
| 26 | |
| 27 | func (c tinyConfig) ActiveUser(host string) (string, error) { |
| 28 | return c[fmt.Sprintf("%s:%s", host, "user")], nil |
nothing calls this directly
no outgoing calls
no test coverage detected