Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CloudFeedAuth ¶
type CloudFeedAuth struct { AccountID uint `json:"account_id"` CloudFeedID uint `json:"cloud_feed_id"` AccessToken string `json:"-"` RefreshToken string `json:"-"` Expiry time.Time `json:"-"` AuthGrantToken string `json:"auth_grant_token"` }
A CloudFeedAuth stores auth information about CloudFeeds authorized by an account.
func MakeCloudFeedAuth ¶
func MakeCloudFeedAuth(accountID, cloudFeedID uint, accessToken string, refreshToken string, expiry time.Time, authGrantToken string) CloudFeedAuth
Create a new CloudFeedAuth.
type CloudFeedAuthRepository ¶
type CloudFeedAuthRepository interface { Find(cloudFeedAuth CloudFeedAuth) (CloudFeedAuth, error) FindOAuthInfo(accountID uint, cloudFeedID uint) (tokenURL string, refreshToken string, clientID string, clientSecret string, err error) FindFirstTokenToExpire() (accountID uint, cloudFeedID uint, expiry time.Time, err error) FindDevice(cloudFeedAuth CloudFeedAuth) (*device.Device, error) GetAll() ([]CloudFeedAuth, error) Create(CloudFeedAuth) (CloudFeedAuth, error) Update(CloudFeedAuth) (CloudFeedAuth, error) Delete(CloudFeedAuth) error }
A CloudFeedAuthRepository can load, store and delete cloudFeedAuths.
Click to show internal directories.
Click to hide internal directories.