credentials

package
v0.0.0-...-fe64300 Latest Latest
Warning

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

Go to latest
Published: Feb 8, 2021 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Credentials

type Credentials struct {
	UserId       string
	Token        string
	RefreshToken string
	ExpiresAt    time.Time
}

type CredentialsStore

type CredentialsStore interface {
	Get(userId string) (*Credentials, error)
}

type DeezerCredentials

type DeezerCredentials struct {
	Token string
}

type DeezerStore

type DeezerStore struct {
	Client redis.Conn
}

func NewDeezerStore

func NewDeezerStore(conn redis.Conn) *DeezerStore

func (*DeezerStore) Get

func (s *DeezerStore) Get(userId string) (*Credentials, error)

type SpotifyCredentials

type SpotifyCredentials struct {
	UserId       string
	Token        string
	RefreshToken string
	ExpiresAt    time.Time
}

SpotifyCredentials contains tokens used to make requests to the Spotify API on a user's behalf

type SpotifyStore

type SpotifyStore struct {
	Client redis.Conn
}

SpotifyStore fetches Spotify user credentials from Redis

func NewSpotifyStore

func NewSpotifyStore(conn redis.Conn) *SpotifyStore

NewSpotifyStore creates a Spotify store

func (*SpotifyStore) Get

func (s *SpotifyStore) Get(userId string) (*Credentials, error)

func (*SpotifyStore) Set

func (s *SpotifyStore) Set(credentials *Credentials) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
JackTT - Gopher 🇻🇳