database

package
v0.2.3 Latest Latest
Warning

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

Go to latest
Published: May 31, 2022 License: BSD-3-Clause Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Host     string
	Name     string
	User     string
	Password string
	Port     string
}

type Database

type Database struct {
	*gorm.DB
}

func Connect

func Connect(conf Config) (Database, error)

func (*Database) InsertData

func (db *Database) InsertData(folder, namesFile, surnamesFile string)

func (*Database) RandomName

func (db *Database) RandomName(gender int) models.Name

gender must be 0 - male or 1 - female else it will return random name

func (*Database) RandomNameNormativeStatus added in v0.2.0

func (db *Database) RandomNameNormativeStatus(normativeStatus string, gender int) models.Name

func (*Database) RandomSurname

func (db *Database) RandomSurname() models.Surname

Jump to

Keyboard shortcuts

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