database

package
v0.0.0-...-0ed9d1a Latest Latest
Warning

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

Go to latest
Published: Sep 11, 2020 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Account_ID

func Account_ID(sess *dbr.Session, account string) (int, error)

func Disconnect

func Disconnect(db *DB) error

func HttpRequestAuth

func HttpRequestAuth(req *http.Request, w http.ResponseWriter, keys *jwt.JWTKeys, conf config.Connect_data) error

HttpRequestAuth HTTPリクエストに必ず必要な認証

func IsLogin

func IsLogin(sess *dbr.Session, account string, password string) error

func Plan_Answer

func Plan_Answer(sess *dbr.Session, key string) (int, error)

func Plan_Answer_Update

func Plan_Answer_Update(db *dbr.Connection, key string, count int) error

func Plan_Insert

func Plan_Insert(id int, key string, db *dbr.Connection) error

func Plan_Key

func Plan_Key(sess *dbr.Session, id int) ([]string, error)

Types

type DB

type DB struct {
	Conn *dbr.Connection
	Sess *dbr.Session
}

func Connect

func Connect(database config.DBconf) (*DB, error)

Jump to

Keyboard shortcuts

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