examples

package
v0.0.2-rc2 Latest Latest
Warning

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

Go to latest
Published: Sep 2, 2020 License: BSD-3-Clause Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type IStudentUseCase

type IStudentUseCase interface {
	Create(model StudentModel) (result *StudentModel, err error)
	Find() (result []*StudentModel)
}

IStudentUseCase UseCase層のインターフェイス

func NewStudentUseCase

func NewStudentUseCase(repo StudentRepo) IStudentUseCase

NewStudentUseCase UseCase層の実装を持つインスタンス @service

type StudentHandle

type StudentHandle interface {
	Post(c interfaces.Context)
	Get(c interfaces.Context)
}

StudentHandle application層のインターフェイス

func NewStudentHandler

func NewStudentHandler(u IStudentUseCase) StudentHandle

NewStudentHandler application層の実装を持つインスタンス @handler

type StudentModel

type StudentModel struct {
	ID   int
	Name string
}

StudentModel モデル

type StudentRepo

type StudentRepo interface {
	Create(model StudentModel) (result *StudentModel, err error)
	Find() (result []*StudentModel)
}

StudentRepo リポジトリインターフェイス

func NewStudentInfra

func NewStudentInfra(db *infra.DB) StudentRepo

NewStudentInfra infrastructure層の実装を持つインスタンス @repo

Jump to

Keyboard shortcuts

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