Documentation ¶
Index ¶
- type DB
- type MySQL
- func (mysql *MySQL) Close() error
- func (mysql *MySQL) FindLedger(ledgerID uint) (*model.Ledger, bool, error)
- func (mysql *MySQL) FindLedgers(userID string) ([]*model.Ledger, error)
- func (mysql *MySQL) FindUserLogIn(userID string) (*model.UserLogIn, bool, error)
- func (mysql *MySQL) InsertLedger(userID, desc, date string, income int) (int, error)
- func (mysql *MySQL) InsertUserAccount(email string) error
- func (mysql *MySQL) InsertUserLogIn(email, passwd string) error
- func (mysql *MySQL) Migrate(path string) error
- func (mysql *MySQL) Ping() error
- func (mysql *MySQL) RetryPing(interval time.Duration, reps int) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MySQL ¶
type MySQL struct {
// contains filtered or unexported fields
}
MySQL communicates with MySQL server.
func (*MySQL) FindLedger ¶
FindLedger retrieves ledger data with given ledgerID.
func (*MySQL) FindLedgers ¶
FindLedgers retrieves ledger data with given userID.
func (*MySQL) FindUserLogIn ¶
FindUserLogIn retrieves user login data from user_login with given userID.
func (*MySQL) InsertLedger ¶
InsertLedger inserts ledger data and returns ledger_id.
func (*MySQL) InsertUserAccount ¶
InsertUserAccount inserts user account data to db.
func (*MySQL) InsertUserLogIn ¶
InsertUserLogIn inserts user login data to db.
Click to show internal directories.
Click to hide internal directories.