Documentation ¶
Index ¶
- func TestDB(t *testing.T, databaseURL string) (*sql.DB, func(...string))
- type SegmentRepository
- func (r *SegmentRepository) AddUserToSegments(userID int, segList []*entity.Segment) error
- func (r *SegmentRepository) Create(seg *entity.Segment) error
- func (r *SegmentRepository) Delete(seg *entity.Segment) error
- func (r *SegmentRepository) DeleteUserFromSegments(userID int, segList []*entity.Segment) error
- func (r *SegmentRepository) FindBySlug(slug string) (*entity.Segment, error)
- func (r *SegmentRepository) FindByUser(userID int) ([]*entity.Segment, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type SegmentRepository ¶
type SegmentRepository struct {
// contains filtered or unexported fields
}
func NewSegmentRepository ¶
func NewSegmentRepository(db *sql.DB) *SegmentRepository
func (*SegmentRepository) AddUserToSegments ¶
func (r *SegmentRepository) AddUserToSegments(userID int, segList []*entity.Segment) error
func (*SegmentRepository) DeleteUserFromSegments ¶
func (r *SegmentRepository) DeleteUserFromSegments(userID int, segList []*entity.Segment) error
func (*SegmentRepository) FindBySlug ¶
func (r *SegmentRepository) FindBySlug(slug string) (*entity.Segment, error)
func (*SegmentRepository) FindByUser ¶
func (r *SegmentRepository) FindByUser(userID int) ([]*entity.Segment, error)
Click to show internal directories.
Click to hide internal directories.