mysql

package
v0.0.0-...-d4b980f Latest Latest
Warning

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

Go to latest
Published: Jan 19, 2020 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ChecksumRepository

type ChecksumRepository struct {
	DB *sqlx.DB
}

func (*ChecksumRepository) Get

func (c *ChecksumRepository) Get(name string) (cs string, err error)

func (*ChecksumRepository) Set

func (c *ChecksumRepository) Set(name string, cs string) (err error)

type Connector

type Connector struct {
	SCHEME   string `envconfig:"scheme" default:"mysql"`
	User     string `envconfig:"user" required:"true"`
	Password string `envconfig:"password" required:"true"`
	IP       string `envconfig:"ip" required:"true"`
	Port     string `envconfig:"port" default:"3306"`
	DATABASE string `envconfig:"database" required:"true"`
}

func (*Connector) Connect

func (c *Connector) Connect(ctx context.Context) (repo repository.Wage, err error)

type PrefectureRepository

type PrefectureRepository struct {
	DB *sqlx.DB
}

func (*PrefectureRepository) FindAll

func (p *PrefectureRepository) FindAll() (result []domain.Prefecture, err error)

FindAll gets all of prefectures on database

type WageRepository

type WageRepository struct {
	DB *sqlx.DB
}

func (*WageRepository) Checksum

func (w *WageRepository) Checksum() repository.Checksum

func (*WageRepository) Find

func (w *WageRepository) Find(name string, prefectureID int) (result *domain.Wage, err error)

func (*WageRepository) FindByID

func (w *WageRepository) FindByID(id int) (result *domain.Wage, err error)

func (*WageRepository) FindByPrefectureID

func (w *WageRepository) FindByPrefectureID(id int) (result []domain.Wage, err error)

func (*WageRepository) Prefecture

func (w *WageRepository) Prefecture() repository.Prefecture

func (*WageRepository) Set

func (w *WageRepository) Set(req domain.Wage) (err error)

Jump to

Keyboard shortcuts

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