cloudfeedauth

package
v0.0.0-...-ebd6d4f Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 4, 2024 License: Apache-2.0 Imports: 2 Imported by: 0

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL