🚧 Stub for config package
This commit is contained in:
parent
1efc8671f5
commit
91bbd0f8e2
5 changed files with 471 additions and 1 deletions
24
config/config.go
Normal file
24
config/config.go
Normal 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
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue