bdkeeper

package
v0.0.0-...-98d3fe0 Latest Latest
Warning

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

Go to latest
Published: Jul 21, 2024 License: MIT Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BDKeeper

type BDKeeper struct {
	// contains filtered or unexported fields
}

func NewBDKeeper

func NewBDKeeper(dsn func() string, log Log, userUpdateInterval func() string) *BDKeeper

func (*BDKeeper) Close

func (kp *BDKeeper) Close() bool

func (*BDKeeper) DeleteTask

func (kp *BDKeeper) DeleteTask(ctx context.Context, id int) error

func (*BDKeeper) DeleteUser

func (kp *BDKeeper) DeleteUser(ctx context.Context, id int) error

func (*BDKeeper) GetNonUpdateUsers

func (kp *BDKeeper) GetNonUpdateUsers(ctx context.Context) ([]models.ExtUserData, error)

func (*BDKeeper) GetUser

func (bd *BDKeeper) GetUser(ctx context.Context, passportSerie, passportNumber int) (models.User, error)

func (*BDKeeper) GetUserTaskSummary

func (bd *BDKeeper) GetUserTaskSummary(ctx context.Context, userID int, startDate, endDate time.Time, userTimezone string, defaultEndTime time.Time) ([]models.TaskSummary, error)

func (*BDKeeper) LoadTasks

func (kp *BDKeeper) LoadTasks(ctx context.Context) (storage.StorageTasks, error)

func (*BDKeeper) LoadUsers

func (kp *BDKeeper) LoadUsers(ctx context.Context) (storage.StorageUsers, error)

func (*BDKeeper) Ping

func (kp *BDKeeper) Ping(ctx context.Context) bool

func (*BDKeeper) SaveTask

func (bd *BDKeeper) SaveTask(ctx context.Context, task models.Task) (int, error)

func (*BDKeeper) SaveUser

func (bd *BDKeeper) SaveUser(ctx context.Context, user models.User) (int, error)

func (*BDKeeper) StartTaskTracking

func (bd *BDKeeper) StartTaskTracking(ctx context.Context, entry models.TimeEntry) error

StartTaskTracking starts tracking time for a task

func (*BDKeeper) StopTaskTracking

func (bd *BDKeeper) StopTaskTracking(ctx context.Context, entry models.TimeEntry) error

func (*BDKeeper) UpdateTask

func (bd *BDKeeper) UpdateTask(ctx context.Context, task models.Task) error

UpdateTask updates an existing task in the database

func (*BDKeeper) UpdateUser

func (bd *BDKeeper) UpdateUser(ctx context.Context, user models.User) error

func (*BDKeeper) UpdateUsersInfo

func (bd *BDKeeper) UpdateUsersInfo(ctx context.Context, users []models.ExtUserData) (err error)

type Log

type Log interface {
	Info(string, ...zapcore.Field)
}

Jump to

Keyboard shortcuts

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