Documentation ¶
Overview ¶
internal/infrastructure/repository/postgres_video_repository.go
Index ¶
- func NewVideoRepository(cfg *config.Config, logger *slog.Logger) (interfaceRepo.VideoRepository, error)
- type MemoryVideoRepository
- type PostgresVideoRepository
- func (r *PostgresVideoRepository) Close() error
- func (r *PostgresVideoRepository) FindByID(ctx context.Context, id string) (*domain.Generation, error)
- func (r *PostgresVideoRepository) Save(ctx context.Context, video *domain.Generation) error
- func (r *PostgresVideoRepository) Update(ctx context.Context, video *domain.Generation) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewVideoRepository ¶
func NewVideoRepository(cfg *config.Config, logger *slog.Logger) (interfaceRepo.VideoRepository, error)
NewVideoRepository は VideoRepository インターフェースの新しいインスタンスを作成します
Types ¶
type MemoryVideoRepository ¶
type MemoryVideoRepository struct {
// contains filtered or unexported fields
}
func NewMemoryVideoRepository ¶
func NewMemoryVideoRepository(logger *slog.Logger) *MemoryVideoRepository
func (*MemoryVideoRepository) FindByID ¶
func (m *MemoryVideoRepository) FindByID(ctx context.Context, id string) (*domain.Generation, error)
FindByID implements repository.VideoRepository.
func (*MemoryVideoRepository) Save ¶
func (m *MemoryVideoRepository) Save(ctx context.Context, video *domain.Generation) error
Save implements repository.VideoRepository.
func (*MemoryVideoRepository) Update ¶
func (m *MemoryVideoRepository) Update(ctx context.Context, video *domain.Generation) error
Update implements repository.VideoRepository.
type PostgresVideoRepository ¶
type PostgresVideoRepository struct {
// contains filtered or unexported fields
}
func (*PostgresVideoRepository) Close ¶
func (r *PostgresVideoRepository) Close() error
func (*PostgresVideoRepository) FindByID ¶
func (r *PostgresVideoRepository) FindByID(ctx context.Context, id string) (*domain.Generation, error)
func (*PostgresVideoRepository) Save ¶
func (r *PostgresVideoRepository) Save(ctx context.Context, video *domain.Generation) error
func (*PostgresVideoRepository) Update ¶
func (r *PostgresVideoRepository) Update(ctx context.Context, video *domain.Generation) error
Click to show internal directories.
Click to hide internal directories.