database

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

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

Go to latest
Published: Apr 13, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InsertUser

func InsertUser(ctx context.Context, db *sql.DB, user *authorization.User) (int64, error)

Добавление нового пользователя в таблицу

func MakeDB

func MakeDB(db *sql.DB)

func SelectUser

func SelectUser(ctx context.Context, db *sql.DB, name string) (authorization.User, error)

Получение пользователя по имени

func StartDB

func StartDB() *sql.DB

Подключение к базе данных

Types

type MainExpression

type MainExpression struct {
	Id         int
	Expression string
	Answer     any
	State      int
	UserID     int
}

func GetExpressionData

func GetExpressionData(db *sql.DB, userID int64) []MainExpression

Получение списка выражений

type Server

type Server struct {
	ServerId int
	NextPing string
	State    int
}

func GetSereverInfo

func GetSereverInfo(db *sql.DB) []Server

Получение информации о вычислителях

Jump to

Keyboard shortcuts

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