Documentation ¶
Index ¶
- type CultivationUseCase
- func (c *CultivationUseCase) CheckCultivationByIDUID(id int, uid int) (bool, error)
- func (c *CultivationUseCase) CreateCultivation(cultivation *entity.Cultivation) (*entity.Cultivation, error)
- func (c *CultivationUseCase) DeleteCultivation(id int) error
- func (c *CultivationUseCase) ReadCultivation(id int) (*entity.Cultivation, error)
- func (c *CultivationUseCase) ReadCultivationsByUID(uid int) (*entity.Cultivations, error)
- func (c *CultivationUseCase) UpdateCultivation(cultivation *entity.Cultivation) (*entity.Cultivation, error)
- type PlantUseCase
- func (p *PlantUseCase) CreatePlant(plant *entity.Plant) (*entity.Plant, error)
- func (p *PlantUseCase) DeletePlant(id int) error
- func (p *PlantUseCase) ReadPlant(id int) (*entity.Plant, error)
- func (p *PlantUseCase) ReadPlants() (*entity.Plants, error)
- func (p *PlantUseCase) UpdatePlant(plant *entity.Plant) (*entity.Plant, error)
- type UserUseCase
- func (u *UserUseCase) CreateUser(user *entity.User) (*entity.User, error)
- func (u *UserUseCase) DeleteUser(id int) error
- func (u *UserUseCase) ReadUser(id int) (*entity.User, error)
- func (u *UserUseCase) ReadUserIDByUID(uid string) (int, error)
- func (u *UserUseCase) ReadUsers() (*entity.Users, error)
- func (u *UserUseCase) UpdateUser(user *entity.User) (*entity.User, error)
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 ¶
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 ¶
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 ¶
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 ¶
UpdateUser はユーザを作成します。