database

package
v0.0.0-...-60f7d2f Latest Latest
Warning

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

Go to latest
Published: Nov 27, 2020 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddNewTask

func AddNewTask(userID int64, task *data.Task) error

AddNewTask ...

func ChangeLanguage

func ChangeLanguage(userID int64, lang string) error

ChangeLanguage ...

func ChangeTimeFormat

func ChangeTimeFormat(userID int64, tf int) error

ChangeTimeFormat ...

func ChangeTimeZone

func ChangeTimeZone(userID int64, tz string) error

ChangeTimeZone ...

func Connect

func Connect() (*sql.DB, error)

Connect ...

func DeleteOldCommonTask

func DeleteOldCommonTask(userID int64, tz string)

DeleteOldCommonTask ...

func DeleteTask

func DeleteTask(userID int64, ID int) error

DeleteTask ...

func DeleteUserAccount

func DeleteUserAccount(userID int64) error

DeleteUserAccount ...

func GetTasks

func GetTasks(userID int64, typeTask string, timeFormat int) ([]data.Task, error)

GetTasks ...

func GetUserData

func GetUserData(userID int64, user *data.UserData)

GetUserData ...

func IfUserAdmin

func IfUserAdmin(userID int64) bool

IfUserAdmin ...

func IfUserExists

func IfUserExists(userID int64) bool

IfUserExists ...

func NewUser

func NewUser(user *data.UserData, userID int64) error

NewUser ...

func TodayTasks

func TodayTasks(userID int64, tz string, timeFormat int) ([]data.Task, error)

TodayTasks ...

func UpdateHolidayTask

func UpdateHolidayTask(userID int64, taskID int, date string) error

UpdateHolidayTask ...

Types

type Users

type Users struct {
	Language    string
	TypeAccount string
	TimeZone    string
	UserID      int64
	TimeFormat  int
}

Users ...

func GetUsers

func GetUsers() ([]Users, error)

GetUsers ...

Jump to

Keyboard shortcuts

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