domain

package
v0.0.0-...-a9180e6 Latest Latest
Warning

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

Go to latest
Published: Nov 12, 2020 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Label

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

func NewLabel

func NewLabel(reaction string, id int) *Label

func (Label) ID

func (l Label) ID() int

type LabelDataStoreInterface

type LabelDataStoreInterface interface {
	GetByReaction(channel string, reaction string) (Label, error)
}

type Project

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

func NewProject

func NewProject(id int, channel string, workspaceID int) *Project

func (Project) Channel

func (p Project) Channel() string

func (*Project) CreateTask

func (p *Project) CreateTask(labelRepository LabelDataStoreInterface, timeStamp string, reaction string) (Task, error)

func (Project) DeleteTask

func (p Project) DeleteTask(taskRepository TaskDataStoreInterface, zube ZubeInterface, task Task) error

func (*Project) GetTaskByTimestamp

func (p *Project) GetTaskByTimestamp(labelRepository LabelDataStoreInterface, taskRepository TaskDataStoreInterface, timeStamp string, reaction string) (Task, error)

func (Project) ID

func (p Project) ID() int

func (Project) WorkspaceID

func (p Project) WorkspaceID() int

type ProjectDataStoreInterface

type ProjectDataStoreInterface interface {
	GetByChannel(channel string) (Project, error)
}

type ProjectService

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

func NewProjectService

func NewProjectService(projectRepository ProjectDataStoreInterface) *ProjectService

func (ProjectService) GetProjectByChannel

func (s ProjectService) GetProjectByChannel(channel string) (Project, error)

type SecretManagerInterface

type SecretManagerInterface interface {
	GetSecret(secretName string) ([]byte, error)
}

type SlackInterface

type SlackInterface interface {
	GetMessage(channel string, timestamp string) (SlackMessage, error)
}

type SlackMessage

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

func NewSlackMessage

func NewSlackMessage(title string, body string) *SlackMessage

func (SlackMessage) Body

func (s SlackMessage) Body() string

func (SlackMessage) Title

func (s SlackMessage) Title() string

type Task

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

func NewTask

func NewTask(project Project, timestamp string, title string, body string, cardID int, label int) *Task

func (Task) Body

func (t Task) Body() string

func (Task) CardID

func (t Task) CardID() int

func (Task) Labels

func (t Task) Labels() []int

func (Task) Project

func (t Task) Project() Project

func (*Task) SetBody

func (t *Task) SetBody(body string)

func (*Task) SetCardID

func (t *Task) SetCardID(cardID int)

func (*Task) SetProject

func (t *Task) SetProject(project Project)

func (*Task) SetTitle

func (t *Task) SetTitle(title string)

func (Task) Timestamp

func (t Task) Timestamp() string

func (Task) Title

func (t Task) Title() string

type TaskDataStoreInterface

type TaskDataStoreInterface interface {
	Create(task Task) error
	Delete(channel string, timeStamp string) error
	Get(channel string, timeStamp string) (*Task, error)
}

type TaskService

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

func NewTaskService

func NewTaskService(taskRepository TaskDataStoreInterface, slack SlackInterface, zube ZubeInterface) *TaskService

func (TaskService) IsExist

func (s TaskService) IsExist(task Task) (bool, error)

func (TaskService) Store

func (s TaskService) Store(task Task) (Task, error)

type ZubeInterface

type ZubeInterface interface {
	Create(task Task) (int, error)
	Delete(cardID int) error
}

Jump to

Keyboard shortcuts

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