database

package
v0.0.0-...-63e291d Latest Latest
Warning

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

Go to latest
Published: Nov 20, 2023 License: GPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Db *sql.DB

Functions

func InitDb

func InitDb() (err error)

Types

type Character

type Character struct {
	Id            uint8
	ShortName     string
	LongName      string
	FightingStyle string
	Nationality   string
	Height        uint16
	Weight        uint16
	Gender        string
}

func GetCharacters

func GetCharacters() (characters []Character, err error)

type ConnectionString

type ConnectionString struct {
	// contains filtered or unexported fields
}

ConnectionString contains the parameters needed to make a database connection

func NewConnectionString

func NewConnectionString(
	username string,
	password string,
	host string,
	port int,
	databaseName string,
) *ConnectionString

NewConnectionString creates a connection string ensuring you supply all the required parameters

func (ConnectionString) Get

func (cs ConnectionString) Get() string

Get returns the connection string in the correct format to make a database connection

func (ConnectionString) String

func (cs ConnectionString) String() string

String returns the connection string formatted correctly to make a database connection

Jump to

Keyboard shortcuts

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