24 lines
700 B
Go
24 lines
700 B
Go
package config
|
|
|
|
import (
|
|
"context"
|
|
|
|
"codeberg.org/danjones000/trakter/trakt"
|
|
)
|
|
|
|
//go:generate mockgen -source config.go -destination ../internal/mocks/config/config.go -package config -typed
|
|
|
|
type Config interface {
|
|
AppId(ctx context.Context) string
|
|
AppSecret(ctx context.Context) string
|
|
|
|
Device(ctx context.Context) trakt.OauthDevice
|
|
UserOauth(ctx context.Context) trakt.Oauth
|
|
AccessToken(ctx context.Context) string
|
|
RefreshToken(ctx context.Context) string
|
|
|
|
SetAppId(ctx context.Context, appID string) error
|
|
SetAppSecret(ctx context.Context, appSecret string) error
|
|
SetDevice(ctx context.Context, dev trakt.OauthDevice) error
|
|
SetUserOauth(ctx context.Context, user trakt.Oauth) error
|
|
}
|