user

package
v0.0.0-...-c4bfc47 Latest Latest
Warning

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

Go to latest
Published: Jul 17, 2021 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ChangeUserInformation

func ChangeUserInformation(token string, changer func(Information) Information)

ChangeUserInformation requires the token of the user and a function which gives the actual information and returns the new information.

func SetUserInformation

func SetUserInformation(token string, information Information)

SetUserInformation sets the user's information by its token.

Types

type Information

type Information struct {
	Name           string        `json:"name"`
	MovieGenres    []string      `json:"movie_genres"`
	MovieBlacklist []string      `json:"movie_blacklist"`
	Reminders      []Reminder    `json:"reminders"`
	SpotifyToken   *oauth2.Token `json:"spotify_token"`
	SpotifyID      string        `json:"spotify_id"`
	SpotifySecret  string        `json:"spotify_secret"`
}

Information is the user's information retrieved from the client

func GetUserInformation

func GetUserInformation(token string) Information

GetUserInformation returns the information of a user with his token

type Reminder

type Reminder struct {
	Reason string `json:"reason"`
	Date   string `json:"date"`
}

A Reminder is something the user asked for Olivia to remember

Jump to

Keyboard shortcuts

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