db

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Jan 10, 2025 License: CC0-1.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConnectDB

func ConnectDB() *mongo.Client

func InsertUser

func InsertUser(user DBUser) (string, error)

func UpdateUser

func UpdateUser(user DBUser) error

Types

type DBUser

type DBUser struct {
	SpotifyId    string `bson:"spotifyId"`
	Id           string `bson:"id"`
	AccessToken  string `bson:"accessToken"`
	RefreshToken string `bson:"refreshToken"`
}

func GetUserById

func GetUserById(id string) (DBUser, error)

func GetUserBySpotifyId

func GetUserBySpotifyId(spotifyId string) (DBUser, error)

Jump to

Keyboard shortcuts

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