sqlrepository

package
v0.0.0-...-c9f8eaf Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 10, 2023 License: AGPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func TestDB

func TestDB(t *testing.T, databaseURL string) (*sql.DB, func(...string))

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) Create

func (r *SegmentRepository) Create(seg *entity.Segment) error

func (*SegmentRepository) Delete

func (r *SegmentRepository) Delete(seg *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)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL