Documentation
¶
Index ¶
- Variables
- type AuthCache
- type AuthState
- type AuthTokenData
- type FileAuthCache
- func (c *FileAuthCache) Clear()
- func (c *FileAuthCache) ClearE() error
- func (c *FileAuthCache) FullName() string
- func (c *FileAuthCache) MustLoggedIn()
- func (c *FileAuthCache) MustToken() string
- func (c *FileAuthCache) RefreshToken() string
- func (c *FileAuthCache) SetAuthData(dataBytes []byte) (err error)
- func (c *FileAuthCache) State() AuthState
- func (c *FileAuthCache) StateE() (AuthState, error)
- func (c *FileAuthCache) Token() string
Constants ¶
This section is empty.
Variables ¶
View Source
var DefaultAuthCacheFilePath string
Functions ¶
This section is empty.
Types ¶
type AuthCache ¶
type AuthCache interface {
State() AuthState
StateE() (AuthState, error)
SetAuthData([]byte) error
Clear()
ClearE() error
FullName() string
Token() string
MustToken() string
RefreshToken() string
}
func DefaultAuthCache ¶
func DefaultAuthCache() AuthCache
type AuthTokenData ¶
type AuthTokenData struct {
AccessToken string `json:"access_token"`
RefreshToken string `json:"refresh_token"`
CreatedAt int64 `json:"created_at"`
TokenType string `json:"token_type"`
ExpiresIn int64 `json:"expires_in"`
Data struct {
Id string `json:"id"`
Attributes struct {
FullName string `json:"full-name"`
}
}
}
type FileAuthCache ¶
type FileAuthCache struct {
// contains filtered or unexported fields
}
func NewFileAuthCache ¶
func NewFileAuthCache(path string) (c *FileAuthCache, err error)
func (*FileAuthCache) Clear ¶
func (c *FileAuthCache) Clear()
func (*FileAuthCache) ClearE ¶
func (c *FileAuthCache) ClearE() error
func (*FileAuthCache) FullName ¶
func (c *FileAuthCache) FullName() string
func (*FileAuthCache) MustLoggedIn ¶
func (c *FileAuthCache) MustLoggedIn()
func (*FileAuthCache) MustToken ¶
func (c *FileAuthCache) MustToken() string
func (*FileAuthCache) RefreshToken ¶ added in v1.0.1
func (c *FileAuthCache) RefreshToken() string
func (*FileAuthCache) SetAuthData ¶
func (c *FileAuthCache) SetAuthData(dataBytes []byte) (err error)
func (*FileAuthCache) State ¶
func (c *FileAuthCache) State() AuthState
func (*FileAuthCache) StateE ¶
func (c *FileAuthCache) StateE() (AuthState, error)
func (*FileAuthCache) Token ¶
func (c *FileAuthCache) Token() string
Click to show internal directories.
Click to hide internal directories.