usecase

package
v0.0.0-...-0964d17 Latest Latest
Warning

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

Go to latest
Published: Nov 28, 2020 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CultivationUseCase

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

CultivationUseCase は栽培物に関係するアプリケーションロジックを担当する構造体です。

func NewCultivationUseCase

func NewCultivationUseCase(db *gorm.DB) *CultivationUseCase

NewCultivationUseCase はCultivationUseCaseのポインタを生成する関数です。

func (*CultivationUseCase) CheckCultivationByIDUID

func (c *CultivationUseCase) CheckCultivationByIDUID(id int, uid int) (bool, error)

ReadCultivation は栽培物を取得します。

func (*CultivationUseCase) CreateCultivation

func (c *CultivationUseCase) CreateCultivation(cultivation *entity.Cultivation) (*entity.Cultivation, error)

CreateCultivation はあるユーザの栽培物を作成します。

func (*CultivationUseCase) DeleteCultivation

func (c *CultivationUseCase) DeleteCultivation(id int) error

DeleteCultivation は栽培物を作成します。

func (*CultivationUseCase) ReadCultivation

func (c *CultivationUseCase) ReadCultivation(id int) (*entity.Cultivation, error)

ReadCultivation は栽培物を取得します。

func (*CultivationUseCase) ReadCultivationsByUID

func (c *CultivationUseCase) ReadCultivationsByUID(uid int) (*entity.Cultivations, error)

ReadCultivationsByUID はあるユーザの全ての栽培物を取得します。

func (*CultivationUseCase) UpdateCultivation

func (c *CultivationUseCase) UpdateCultivation(cultivation *entity.Cultivation) (*entity.Cultivation, error)

UpdateCultivation は栽培物を作成します。

type PlantUseCase

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

PlantUseCase は植物に関係するアプリケーションロジックを担当する構造体です。

func NewPlantUseCase

func NewPlantUseCase(db *gorm.DB) *PlantUseCase

NewPlantUseCase はPlantUseCaseのポインタを生成する関数です。

func (*PlantUseCase) CreatePlant

func (p *PlantUseCase) CreatePlant(plant *entity.Plant) (*entity.Plant, error)

CreatePlant は植物を作成します。

func (*PlantUseCase) DeletePlant

func (p *PlantUseCase) DeletePlant(id int) error

DeletePlant は植物を削除します。

func (*PlantUseCase) ReadPlant

func (p *PlantUseCase) ReadPlant(id int) (*entity.Plant, error)

ReadPlant は植物を取得します。

func (*PlantUseCase) ReadPlants

func (p *PlantUseCase) ReadPlants() (*entity.Plants, error)

ReadPlants は全植物を取得します。

func (*PlantUseCase) UpdatePlant

func (p *PlantUseCase) UpdatePlant(plant *entity.Plant) (*entity.Plant, error)

UpdatePlant は植物を編集します。

type UserUseCase

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

UserUseCase はユーザに関係するアプリケーションロジックを担当する構造体です。

func NewUserUseCase

func NewUserUseCase(db *gorm.DB) *UserUseCase

NewUserUseCase はUserUseCaseのポインタを生成する関数です。

func (*UserUseCase) CreateUser

func (u *UserUseCase) CreateUser(user *entity.User) (*entity.User, error)

CreateUser はユーザを作成します。

func (*UserUseCase) DeleteUser

func (u *UserUseCase) DeleteUser(id int) error

DeleteUser はユーザを作成します。

func (*UserUseCase) ReadUser

func (u *UserUseCase) ReadUser(id int) (*entity.User, error)

ReadUser はユーザを取得します。

func (*UserUseCase) ReadUserIDByUID

func (u *UserUseCase) ReadUserIDByUID(uid string) (int, error)

ReadUserIDByUID はユーザを取得します。

func (*UserUseCase) ReadUsers

func (u *UserUseCase) ReadUsers() (*entity.Users, error)

ReadUsers は全ユーザを取得します。

func (*UserUseCase) UpdateUser

func (u *UserUseCase) UpdateUser(user *entity.User) (*entity.User, error)

UpdateUser はユーザを作成します。

Jump to

Keyboard shortcuts

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