mysql

package
v0.0.0-...-36c2e07 Latest Latest
Warning

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

Go to latest
Published: Jun 20, 2024 License: Apache-2.0 Imports: 9 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetCenter

func GetCenter(obj *models.Universe) *models.Coord

func RoundTime

func RoundTime(input float64) int

Types

type UniverseModel

type UniverseModel struct {
	DB *sql.DB
}

func (*UniverseModel) Get

func (m *UniverseModel) Get(id int) (*models.Universe, error)

func (*UniverseModel) Insert

func (m *UniverseModel) Insert(obj *models.Universe) (int, error)

func (*UniverseModel) Latest

func (m *UniverseModel) Latest(num int) ([]*models.Universe, error)

type UserModel

type UserModel struct {
	DB *sql.DB
}

func (*UserModel) Authenticate

func (m *UserModel) Authenticate(email, password string) (int, error)

func (*UserModel) Exists

func (m *UserModel) Exists(id int) (bool, error)

func (*UserModel) Insert

func (m *UserModel) Insert(name, email, password string) error

Jump to

Keyboard shortcuts

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