mysql

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

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

Go to latest
Published: Jul 12, 2019 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Builder

type Builder struct {
}

func NewBuilder

func NewBuilder() *Builder

func (*Builder) Build

func (f *Builder) Build() (*MySQL, error)

type Config

type Config struct {
	Host     string `envconfig:"MYSQL_HOST" default:"localhost"`
	Port     string `envconfig:"MYSQL_PORT" default:"3306"`
	Username string `envconfig:"MYSQL_USERNAME" default:"root"`
	Password string `envconfig:"MYSQL_PASSWORD" default:"password"`
	Database string `envconfig:"MYSQL_DATABASE" default:"meizamDB"`
}

type MySQL

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

func NewMySQL

func NewMySQL(db *sql.DB) *MySQL

func (*MySQL) CreateCompetition

func (mysql *MySQL) CreateCompetition(name, competitionType string, externalEntityId *string) (*models.Competition, error)

func (*MySQL) CreateTeam

func (mysql *MySQL) CreateTeam(teamName string, externalEntityId, imageUrl *string) (*models.Team, error)

func (*MySQL) ListCompetitions

func (mysql *MySQL) ListCompetitions(limit, offset int) ([]*models.Competition, error)

func (*MySQL) ListTeams

func (mysql *MySQL) ListTeams(limit, offset int) ([]*models.Team, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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