controller

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Aug 23, 2020 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewTask

func NewTask(query *TaskQuery, command *TaskCommand) proto.TaskServiceHandler

NewTask はタスクに関する Controller を生成します。

Types

type TaskCommand

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

TaskCommand はタスクに関する Command 系の Controller の定義です。

func NewTaskCommand

func NewTaskCommand(
	createTaskInputPort port.CreateTask,
	deleteTaskInputPort port.DeleteTask,
) *TaskCommand

NewTaskCommand はタスクに関する Command 系の Controller を生成します。

func (*TaskCommand) Create

func (c *TaskCommand) Create(
	ctx context.Context,
	req *proto.CreateRequest,
	rsp *proto.CreateResponse,
) error

Create は input / output を制御し、タスク生成処理を行います。

func (*TaskCommand) Delete

func (c *TaskCommand) Delete(
	ctx context.Context,
	req *proto.DeleteRequest,
	rsp *proto.DeleteResponse,
) error

Delete は input / output を制御し、タスク削除処理を行います。

type TaskQuery

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

TaskQuery はタスクに関する Query 系の Controller の定義です。

func NewTaskQuery

func NewTaskQuery(
	listTasksInputPort port.ListTasks,
	getTaskInputPort port.GetTask,
) *TaskQuery

NewTaskQuery はタスクに関する Query 系の Controller を生成します。

func (*TaskQuery) Get

func (c *TaskQuery) Get(
	ctx context.Context,
	req *proto.GetRequest,
	rsp *proto.GetResponse,
) error

Get は input / output を制御し、タスク取得処理を行います。

func (*TaskQuery) List

func (c *TaskQuery) List(
	ctx context.Context,
	req *proto.ListRequest,
	rsp *proto.ListResponse,
) error

List は input / output を制御し、タスク一覧の取得処理を行います。

Jump to

Keyboard shortcuts

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