db

package
v0.0.0-...-aeaa42d Latest Latest
Warning

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

Go to latest
Published: May 22, 2020 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Database *sql.DB
)

Database is the connection holder for database access

Functions

func Connect

func Connect(databaseURL string) error

Connect establishes a connection to the database server

func GetUsers

func GetUsers() (*[]User, error)

GetUsers returns a list of all users in database that have a twitch setting and have been on the webpage for the last 30 days or returns error.

Types

type User

type User struct {
	Avatar   string `json:"avatar"`
	ID       string `json:"id"`
	Username string `json:"username"`
	TwitchID string `json:"twitch_id"`
}

User database model

Jump to

Keyboard shortcuts

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