🚧 Stub for config package

This commit is contained in:
Dan Jones 2025-04-02 20:59:40 -05:00
commit 91bbd0f8e2
5 changed files with 471 additions and 1 deletions

24
config/config.go Normal file
View file

@ -0,0 +1,24 @@
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
}