tournament

package
v0.0.0-...-c899244 Latest Latest
Warning

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

Go to latest
Published: Nov 26, 2020 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type HTTPService

type HTTPService interface {
	Register(*gin.Engine)
}

HTTPService ...

func NewHTTPTransport

func NewHTTPTransport(s Service) HTTPService

NewHTTPTransport ...

type Player

type Player struct {
	ID   int64  `db:"id"`
	Name string `db:"name"`
	Num  int64  `db:"num"`
	Team int64  `db:"idteamFK"`
}

Player ...

func NewPlayer

func NewPlayer(n string, i int64, t int64) *Player

NewPlayer ...

type Service

type Service interface {
	AddTeam(*Team) (*Team, error)
	GetAllTeams() ([]*Team, error)
	GetTeam(int64) (*Team, error)
	DeleteTeam(int64) error
	EditTeam(string, int64) error

	AddPlayer(*Player) (*Player, error)
	GetPlayersByTeam(int64) ([]*Player, error)
	GetAllPlayers() ([]*Player, error)
}

Service interface

Ya se que no deberia recibir parametros de tipo string pero no encontre la forma de poder convertir los parametros de la request en un estructura

func New

func New(db *sqlx.DB, c *config.Config) (Service, error)

New ...

type Team

type Team struct {
	ID   int64  `db:"id"`
	Name string `db:"name"`
}

Team ...

func NewTeam

func NewTeam(s string) *Team

NewTeam ...

Jump to

Keyboard shortcuts

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