Documentation
¶
Index ¶
Constants ¶
View Source
const StaleLockAge = 45 * time.Second
StaleLockAge is how old a credentials lock may be before it is treated as abandoned. Must exceed the session refresh HTTP budget so a live refresh is not interrupted.
Variables ¶
View Source
var ErrNotFound = errors.New("no stored credentials; run daco login")
Functions ¶
func DefaultPath ¶
Types ¶
type FileStore ¶
type FileStore struct {
Path string
}
func (FileStore) Save ¶
Save writes credentials. Callers that already hold WithLock should use SaveUnlocked.
func (FileStore) SaveUnlocked ¶
type Session ¶
type Session struct {
ClientID string `json:"clientId"`
AccessToken string `json:"accessToken"`
RefreshToken string `json:"refreshToken"`
OrganizationID string `json:"organizationId"`
UserID string `json:"userId"`
UserEmail string `json:"userEmail"`
ExpiresAt time.Time `json:"expiresAt"`
AuthAPI string `json:"authApi"`
BaseURL string `json:"baseUrl,omitempty"`
}
Click to show internal directories.
Click to hide internal directories.