maindb

package
v0.0.0-...-e8c1540 Latest Latest
Warning

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

Go to latest
Published: Aug 6, 2018 License: BSD-3-Clause Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type PSQL

type PSQL struct {
	DB *sqlx.DB
	// contains filtered or unexported fields
}

func InitPSQL

func InitPSQL() (ps *PSQL)

func (*PSQL) ChangeTaskStatus

func (ps *PSQL) ChangeTaskStatus(taskID int, activeStatus bool) (err error)

func (*PSQL) CreateDatabase

func (ps *PSQL) CreateDatabase(setStrings map[string]interface{}) (result sql.Result, err error)

func (*PSQL) CreateTask

func (ps *PSQL) CreateTask(setStrings map[string]interface{}) (result sql.Result, err error)

func (*PSQL) CreateUser

func (ps *PSQL) CreateUser(setStrings map[string]interface{}) (result sql.Result, err error)

func (*PSQL) DeleteDatabase

func (ps *PSQL) DeleteDatabase(databaseID int) (result sql.Result, err error)

func (*PSQL) DeleteTask

func (ps *PSQL) DeleteTask(taskId int) (result sql.Result, err error)

func (*PSQL) DeleteUser

func (ps *PSQL) DeleteUser(userID int) (result sql.Result, err error)

func (*PSQL) GetDatabase

func (ps *PSQL) GetDatabase(databaseId int) (database structs.APIDatabase, err error)

func (*PSQL) GetDatabases

func (ps *PSQL) GetDatabases(isActive string, dbType string) (databaseArr []structs.APIDatabase, err error)

func (*PSQL) GetLastTaskID

func (ps *PSQL) GetLastTaskID() (id int, err error)

func (*PSQL) GetTask

func (ps *PSQL) GetTask(taskId int, isSimple bool) (task structs.APITask, err error)

func (*PSQL) GetTaskByName

func (ps *PSQL) GetTaskByName(taskName string) (task structs.APITask, err error)

func (*PSQL) GetTasks

func (ps *PSQL) GetTasks(isActive string) (taskArr []structs.APITasks, err error)

func (*PSQL) GetTasksCount

func (ps *PSQL) GetTasksCount() (taskStat structs.APITasksCount, err error)

func (*PSQL) GetUser

func (ps *PSQL) GetUser(userId int) (user structs.APIUser, err error)

func (*PSQL) GetUserByToken

func (ps *PSQL) GetUserByToken(token string) (isExist bool, err error)

func (*PSQL) GetUsers

func (ps *PSQL) GetUsers() (usersArr []structs.APIUser, err error)

func (*PSQL) UpdateDatabase

func (ps *PSQL) UpdateDatabase(databaseIDInt int, setStrings map[string]interface{}) (result sql.Result, err error)

func (*PSQL) UpdateTask

func (ps *PSQL) UpdateTask(taskIDInt int, setStrings map[string]interface{}) (result sql.Result, err error)

func (*PSQL) UpdateUser

func (ps *PSQL) UpdateUser(userIDInt int, setStrings map[string]interface{}) (result sql.Result, err error)

Jump to

Keyboard shortcuts

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