database

package
v0.0.0-...-f5a7d7a Latest Latest
Warning

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

Go to latest
Published: Oct 28, 2024 License: GPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Handler

func Handler() *gorm.DB

func NewClient

func NewClient(cfg *Config) error

Types

type Config

type Config struct {
	Host        string
	Port        string
	Name        string
	Username    string
	Password    string
	IdleConn    int
	OpenConn    int
	AutoMigrate bool
	LogLevel    string
}

type Leaderboard

type Leaderboard struct {
	ID       int64   `gorm:"column:id;primaryKey;autoIncrement:true" json:"id"`
	UserName string  `gorm:"column:user_name;not null" json:"user_name"`
	Country  string  `gorm:"column:country;not null;index:idx_leaderboard_country_score"`
	State    string  `gorm:"column:state;not null;index:idx_leaderboard_state_score"`
	Score    float64 `` /* 169-byte string literal not displayed */
}

Jump to

Keyboard shortcuts

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