Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AddExercise ¶
type AddExercise struct { DB store.Execer Repo ExerciseAdder }
func (*AddExercise) AddExercise ¶
func (a *AddExercise) AddExercise(ctx context.Context, title, description string) (*entity.Exercise, error)
*entity.Exercise型を引数で受け取った値で初期化し、RDBMSへ保存 user_idはcontextから習得する
type DeleteExercise ¶
type DeleteExercise struct { DB store.Execer Repo ExerciseDeleter }
func (*DeleteExercise) DeleteExercise ¶
func (d *DeleteExercise) DeleteExercise(ctx context.Context, id entity.ExerciseID) error
type ExerciseAdder ¶
type ExerciseDeleter ¶
type ExerciseGetter ¶
type ExerciseLister ¶
type ExerciseUpdater ¶
type GetExercise ¶
type GetExercise struct { DB store.Queryer Repo ExerciseGetter }
func (*GetExercise) GetExercise ¶
func (g *GetExercise) GetExercise(ctx context.Context, id entity.ExerciseID) (*entity.Exercise, error)
type ListExercise ¶
type ListExercise struct { DB store.Queryer Repo ExerciseLister }
func (*ListExercise) ListExercises ¶
contextからuser_idを取得 取得したユーザーの投稿を取得する
type Login ¶
type Login struct { DB store.Queryer Repo UserGetter TokenGenerator TokenGenerator }
type RegisterUser ¶
type RegisterUser struct { DB store.Execer Repo UserRegister }
func (*RegisterUser) RegisterUser ¶
type TokenGenerator ¶
type TokenGenerator interface {
GenerateToken(ctx context.Context, u *entity.User) ([]byte, error)
}
*auth.JWTerの直接参照を避ける
type UpdateExercise ¶
type UpdateExercise struct { DB store.Execer Repo ExerciseUpdater }
func (*UpdateExercise) UpdateExercise ¶
func (u *UpdateExercise) UpdateExercise(ctx context.Context, id entity.ExerciseID, title, description string) error
type UserGetter ¶
Click to show internal directories.
Click to hide internal directories.