Documentation ¶
Index ¶
- func NewCategoryRepository(db *gorm.DB) *categoryRepo
- func NewRepository(db *gorm.DB) *repository
- func NewSessionRepository(db *gorm.DB) *sessionRepo
- func NewUserRepository(db *gorm.DB) *userRepo
- func NewVideoRepository(db *gorm.DB) *videoRepo
- type CategoryRepository
- type Repository
- type SessionRepository
- type UserRepository
- type VideoRepository
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewCategoryRepository ¶
func NewRepository ¶
func NewSessionRepository ¶
func NewUserRepository ¶
func NewVideoRepository ¶
Types ¶
type CategoryRepository ¶
type CategoryRepository interface { Create(ctx context.Context, data *model.Category) (*model.Category, error) GetByName(ctx context.Context, name string) (*model.Category, error) GetByIDs(ctx context.Context, ids []uint64) ([]model.Category, error) GetAll(ctx context.Context) ([]model.Category, error) }
type Repository ¶
type Repository interface { User() UserRepository Session() SessionRepository Category() CategoryRepository Video() VideoRepository }
type SessionRepository ¶
type UserRepository ¶
type VideoRepository ¶
type VideoRepository interface { Create(ctx context.Context, data *model.Video) (*model.Video, error) Find(ctx context.Context, conds map[string]interface{}, moreInfo ...string) (*model.Video, error) List( ctx context.Context, filter *model.VideoFilter, paging *core.Paging, moreKeys ...string, ) ([]model.Video, error) CreateVideoCategory(ctx context.Context, data *model.VideoCategory) (*model.VideoCategory, error) CreateVideoFile(ctx context.Context, data *model.VideoFile) (*model.VideoFile, error) GetVideoCategories(ctx context.Context, id uint64) ([]model.VideoCategory, error) GetVideoFile(ctx context.Context, id uint64) (*model.VideoFile, error) }
Click to show internal directories.
Click to hide internal directories.