Documentation ¶
Index ¶
- Variables
- type DataStore
- type FitbitClient
- type TokenStore
- type Usecase
- func (u *Usecase) Callback(ctx context.Context, code string, verifier string) error
- func (u *Usecase) GetHeartNow(ctx context.Context, userID string) (domain.HeartData, error)
- func (u *Usecase) RecordHeart(ctx context.Context, defaultFrom synchro.Time[tz.AsiaTokyo], userID string) error
- func (u *Usecase) SignIn() (string, string, url.URL, error)
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrNotFound = errors.New("not found")
Functions ¶
This section is empty.
Types ¶
type FitbitClient ¶
type FitbitClient interface { GenerateAuthURL(state string) (url.URL, string, error) Callback(ctx context.Context, code string, verifier string) (string, domain.OAuth2Token, error) GetName(ctx context.Context, token domain.OAuth2Token) (string, domain.OAuth2Token, error) GetHeartData(ctx context.Context, token domain.OAuth2Token, timeRange domain.FitbitTimeRange[tz.AsiaTokyo], detail domain.HeartDetail) ([]domain.HeartData, domain.OAuth2Token, error) }
type TokenStore ¶
type Usecase ¶
type Usecase struct {
// contains filtered or unexported fields
}
func NewUsecase ¶
func NewUsecase(fitbitClient FitbitClient, tokenStore TokenStore, dataStore DataStore) *Usecase
func (*Usecase) GetHeartNow ¶
func (*Usecase) RecordHeart ¶
Click to show internal directories.
Click to hide internal directories.