Documentation ¶
Index ¶
- func NewJWTAuthRepository(secretKey string) repositories.AuthRepository
- func NewPlanRepository(dbPath string) (repositories.PlanRepository, error)
- func NewReservationRepository(filePath string) (repositories.ReservationRepository, error)
- func NewUserRepository(dbPath string) (repositories.UserRepository, error)
- type JWTAuthRepository
- type UserRepository
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewJWTAuthRepository ¶
func NewJWTAuthRepository(secretKey string) repositories.AuthRepository
func NewPlanRepository ¶
func NewPlanRepository(dbPath string) (repositories.PlanRepository, error)
func NewReservationRepository ¶
func NewReservationRepository(filePath string) (repositories.ReservationRepository, error)
具象型のコンストラクタ.
func NewUserRepository ¶
func NewUserRepository(dbPath string) (repositories.UserRepository, error)
Types ¶
type JWTAuthRepository ¶
type JWTAuthRepository struct {
// contains filtered or unexported fields
}
func (*JWTAuthRepository) GenerateToken ¶
func (r *JWTAuthRepository) GenerateToken(_ context.Context, auth *models.Auth) (*models.Token, error)
GenerateToken はJWTトークンを生成します.
func (*JWTAuthRepository) ValidateToken ¶
func (r *JWTAuthRepository) ValidateToken(_ context.Context, tokenString string) (*models.Auth, error)
ValidateToken はJWTトークンを検証します.
type UserRepository ¶
type UserRepository struct {
// contains filtered or unexported fields
}
func (*UserRepository) FindByUserID ¶
FindByUserID はユーザー名からユーザーを検索します.
Click to show internal directories.
Click to hide internal directories.