Documentation
¶
Index ¶
- func AddOperation(ctx context.Context, db SQLQueryExec, value *entities.Operation) (int, error)
- func AgentPing(ctx context.Context, db SQLQueryExec, id int, status, statusText string) int
- func CreateExpression(ctx context.Context, db SQLQueryExec, expression entities.Expression) (int, error)
- func CreateOperationsTime(ctx context.Context, db SQLQueryExec) (int, error)
- func CreateUser(ctx context.Context, db SQLQueryExec, user entities.User) (int, error)
- func DeleteAgent(ctx context.Context, db SQLQueryExec, id int) error
- func DeleteOperation(ctx context.Context, db SQLQueryExec, id int) error
- func GetAllAgents(ctx context.Context, db SQLQueryExec) ([]entities.Agent, error)
- func GetAllExpressions(ctx context.Context, db SQLQueryExec) ([]entities.Expression, error)
- func GetAllOperations(ctx context.Context, db SQLQueryExec) ([]entities.Operation, error)
- func GetExpressionByID(ctx context.Context, db SQLQueryExec, id int) (entities.Expression, error)
- func GetOperationByID(ctx context.Context, db SQLQueryExec, id int) (entities.Operation, error)
- func GetOperationsTimeByID(ctx context.Context, db SQLQueryExec, id int) (entities.OperationsTime, error)
- func GetOperationsTimeByUserID(ctx context.Context, db SQLQueryExec, id int) (entities.OperationsTime, error)
- func GetReadyToExecuteOperations(ctx context.Context, db SQLQueryExec) ([]entities.IdSoup, error)
- func GetUserByID(ctx context.Context, db SQLQueryExec, id int) (entities.User, error)
- func GetUserByName(ctx context.Context, db SQLQueryExec, name string) (entities.User, error)
- func IsReadyToExecuteOperation(ctx context.Context, db SQLQueryExec, id int) (bool, error)
- func OhNoExpressionError(ctx context.Context, db SQLQueryExec, id int)
- func OpenDb(ctx context.Context, connectionString string) (*sql.DB, error)
- func UpdateExpression(ctx context.Context, db SQLQueryExec, id int, newResult float64, status string) error
- func UpdateFatherOperation(ctx context.Context, db SQLQueryExec, id, fatherId, side int) error
- func UpdateLeftOperation(ctx context.Context, db SQLQueryExec, id int, leftData float64) error
- func UpdateOperationsTimeByID(ctx context.Context, db SQLQueryExec, operationsTimes entities.OperationsTime, ...) error
- func UpdateOperationsTimeByUserID(ctx context.Context, db SQLQueryExec, operationsTimes entities.OperationsTime, ...) error
- func UpdateRightOperation(ctx context.Context, db SQLQueryExec, id int, rightData float64) error
- type SQLQueryExec
- type SQLTXQueryExec
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddOperation ¶
func CreateExpression ¶
func CreateExpression(ctx context.Context, db SQLQueryExec, expression entities.Expression) (int, error)
func CreateOperationsTime ¶
func CreateOperationsTime(ctx context.Context, db SQLQueryExec) (int, error)
func CreateUser ¶
func DeleteAgent ¶
func DeleteAgent(ctx context.Context, db SQLQueryExec, id int) error
func DeleteOperation ¶
func DeleteOperation(ctx context.Context, db SQLQueryExec, id int) error
func GetAllAgents ¶
func GetAllExpressions ¶
func GetAllExpressions(ctx context.Context, db SQLQueryExec) ([]entities.Expression, error)
func GetAllOperations ¶
func GetExpressionByID ¶
func GetExpressionByID(ctx context.Context, db SQLQueryExec, id int) (entities.Expression, error)
func GetOperationByID ¶
func GetOperationsTimeByID ¶
func GetOperationsTimeByID(ctx context.Context, db SQLQueryExec, id int) (entities.OperationsTime, error)
func GetOperationsTimeByUserID ¶
func GetOperationsTimeByUserID(ctx context.Context, db SQLQueryExec, id int) (entities.OperationsTime, error)
func GetUserByID ¶
func GetUserByName ¶
func OhNoExpressionError ¶
func OhNoExpressionError(ctx context.Context, db SQLQueryExec, id int)
func UpdateExpression ¶
func UpdateFatherOperation ¶
func UpdateFatherOperation(ctx context.Context, db SQLQueryExec, id, fatherId, side int) error
func UpdateLeftOperation ¶
func UpdateOperationsTimeByID ¶
func UpdateOperationsTimeByID(ctx context.Context, db SQLQueryExec, operationsTimes entities.OperationsTime, id int) error
func UpdateOperationsTimeByUserID ¶
func UpdateOperationsTimeByUserID(ctx context.Context, db SQLQueryExec, operationsTimes entities.OperationsTime, userId int) error
func UpdateRightOperation ¶
Types ¶
type SQLQueryExec ¶
type SQLQueryExec interface {
Exec(query string, args ...any) (sql.Result, error)
Query(query string, args ...any) (*sql.Rows, error)
QueryRow(query string, args ...any) *sql.Row
ExecContext(ctx context.Context, query string, args ...any) (sql.Result, error)
QueryContext(ctx context.Context, query string, args ...any) (*sql.Rows, error)
QueryRowContext(ctx context.Context, query string, args ...any) *sql.Row
}
type SQLTXQueryExec ¶
type SQLTXQueryExec interface {
BeginTx(ctx context.Context, opts *sql.TxOptions) (*sql.Tx, error)
Exec(query string, args ...any) (sql.Result, error)
Query(query string, args ...any) (*sql.Rows, error)
QueryRow(query string, args ...any) *sql.Row
ExecContext(ctx context.Context, query string, args ...any) (sql.Result, error)
QueryContext(ctx context.Context, query string, args ...any) (*sql.Rows, error)
QueryRowContext(ctx context.Context, query string, args ...any) *sql.Row
}
Click to show internal directories.
Click to hide internal directories.