db

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Dec 10, 2021 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetDataSourceName

func GetDataSourceName() (string, string, error)

func GetSQL

func GetSQL(name string, req interface{}) string

Types

type IpRepository

type IpRepository struct {
	*gorp.DbMap
}

func NewIpRepository

func NewIpRepository(dm *gorp.DbMap) *IpRepository

func (*IpRepository) CheckNow

func (r *IpRepository) CheckNow(id string) (models.NowNumber, error)

func (*IpRepository) DeleteExpiredData

func (r *IpRepository) DeleteExpiredData(ids []models.TranID) error

func (*IpRepository) GetExpired

func (r *IpRepository) GetExpired() ([]models.TranID, error)

func (*IpRepository) GetID

func (r *IpRepository) GetID(id string) (models.TranID, error)

func (*IpRepository) GetQuestion

func (r *IpRepository) GetQuestion(id string, num int) (models.TranQuestion, error)

func (*IpRepository) GetResults

func (r *IpRepository) GetResults(id string) ([]models.TranQuestion, error)

func (*IpRepository) InsertFirstData

func (r *IpRepository) InsertFirstData(mid models.TranID, tq models.TranQuestion) error

func (*IpRepository) InsertQuestion

func (r *IpRepository) InsertQuestion(tq models.TranQuestion) error

func (*IpRepository) UpdateID

func (r *IpRepository) UpdateID(tid models.TranID) error

func (*IpRepository) UpdateQuestion

func (r *IpRepository) UpdateQuestion(tq models.TranQuestion) error

Jump to

Keyboard shortcuts

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