repository

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: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrRecordNotFound = errors.New("record not found")
)

Functions

func NewDB

func NewDB(config *Config) (*sql.DB, error)

Types

type Config

type Config struct {
	DatabaseURL string
}

func NewConfig

func NewConfig() *Config

type SegmentRepository

type SegmentRepository interface {
	Create(*entity.Segment) error
	FindBySlug(string) (*entity.Segment, error)
	Delete(*entity.Segment) error
	AddUserToSegments(int, []*entity.Segment) error
	DeleteUserFromSegments(int, []*entity.Segment) error
	FindByUser(int) ([]*entity.Segment, error)
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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