database

package
v0.0.0-...-d83782e Latest Latest
Warning

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

Go to latest
Published: Aug 31, 2020 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Database

type Database struct {
	DB *sql.DB
}

func NewDatabase

func NewDatabase(db *sql.DB) *Database

type File

type File struct {
	ID         int64  `json:"id"`
	Location   string `json:"location"`
	Filename   string `json:"filename"`
	Public     bool   `json:"public"`
	Owner      int64  `json:"owner"`
	ServerName string `json:"serverName"`
}

type Session

type Session struct {
	SessionToken   string `json:"sessionToken"`
	SessionExpires int64  `json:"sessionExpires"`
}

func NewSession

func NewSession() Session

type User

type User struct {
	ID             uint   `json:"id"`
	Username       string `json:"username"`
	Email          string `json:"email"`
	Hash           string `json:"-"`
	SessionToken   string `json:"sessionToken"`
	SessionExpires int64  `json:"sessionExpires"`
}

Jump to

Keyboard shortcuts

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