task

package
v0.0.0-...-46aa976 Latest Latest
Warning

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

Go to latest
Published: Mar 11, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type RepoImpl

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

func New

func New(db *sql.DB) *RepoImpl

func (*RepoImpl) Delete

func (ri *RepoImpl) Delete(ctx context.Context, id string) error

func (*RepoImpl) GetByID

func (ri *RepoImpl) GetByID(ctx context.Context, id string) (entity.Task, error)

func (*RepoImpl) GetStartedTask

func (ri *RepoImpl) GetStartedTask(ctx context.Context) (entity.Task, error)

func (*RepoImpl) GetUncompleteParentTasks

func (ri *RepoImpl) GetUncompleteParentTasks(ctx context.Context, projectID string) (entity.Tasks, error)

func (*RepoImpl) GetUncompleteSubTask

func (ri *RepoImpl) GetUncompleteSubTask(ctx context.Context, projectID string) (map[string]entity.Tasks, error)

func (*RepoImpl) Insert

func (ri *RepoImpl) Insert(ctx context.Context, taskEntity entity.Task) error

func (*RepoImpl) SetStartedTask

func (ri *RepoImpl) SetStartedTask(ctx context.Context, task entity.Task) error

func (*RepoImpl) Update

func (ri *RepoImpl) Update(ctx context.Context, taskEntity entity.Task) error

func (*RepoImpl) Upsert

func (ri *RepoImpl) Upsert(ctx context.Context, taskEntity entity.Task) error

type TaskHistoryModel

type TaskHistoryModel struct {
	StartedAt time.Time `json:"started_at"`
	StoppedAt time.Time `json:"stopped_at"`
}

type TaskIntegrationModel

type TaskIntegrationModel struct {
	ID   string `json:"id"`
	Type string `json:"type"`
}

type TaskModel

type TaskModel struct {
	ID           string
	ProjectID    string
	Name         string
	Description  sql.NullString
	IsStarted    bool
	CompletedAt  sql.NullTime
	ParentTaskID sql.NullString
	Integration  sql.NullString
	Histories    sql.NullString
}

func CreateModel

func CreateModel(task entity.Task) (TaskModel, error)

func (TaskModel) ToEntity

func (tm TaskModel) ToEntity() (entity.Task, error)

Jump to

Keyboard shortcuts

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