account

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: May 28, 2022 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Auth

type Auth struct {
	Client      spotify.Client
	RedirectURL string
	Token       *oauth2.Token
	Storage     *TokenStorage
	// contains filtered or unexported fields
}

func NewAuth

func NewAuth(options ...AuthOption) *Auth

func (*Auth) GetAuthURL

func (auth *Auth) GetAuthURL(clientId string, secretKey string) string

func (*Auth) PingUser

func (auth *Auth) PingUser() bool

func (*Auth) SaveToken

func (auth *Auth) SaveToken() error

func (*Auth) StartVerificationServer

func (auth *Auth) StartVerificationServer(port string, onComplete chan bool)

type AuthOption

type AuthOption func(*Auth)

func WithToken

func WithToken() AuthOption

func WithoutToken

func WithoutToken(redirectURL string) AuthOption

type PersistDetails

type PersistDetails struct {
	RedirectURL string
	Token       *oauth2.Token
}

type TokenStorage

type TokenStorage struct {
	// contains filtered or unexported fields
}

func NewTokenStorage

func NewTokenStorage() *TokenStorage

func (*TokenStorage) ClearToken

func (ts *TokenStorage) ClearToken() error

func (*TokenStorage) ReadToken

func (ts *TokenStorage) ReadToken(a interface{}) error

func (*TokenStorage) SaveToken

func (ts *TokenStorage) SaveToken(b interface{}) error

Jump to

Keyboard shortcuts

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