repo

package
v0.0.0-...-23b1354 Latest Latest
Warning

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

Go to latest
Published: Jul 2, 2021 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

Package repo saves data into the database.

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrSlideNotFound = errors.New("slide not found")
	ErrUnknown       = errors.New("unknown")
)

Functions

This section is empty.

Types

type Repo

type Repo interface {
	CreateSlide(ctx context.Context, slide model.Slide) (uint64, error)
	MultiCreateSlides(ctx context.Context, slides []model.Slide) (int64, error)
	UpdateSlide(ctx context.Context, slide model.Slide) (bool, error)
	DescribeSlide(ctx context.Context, slideID uint64) (*model.Slide, error)
	ListSlides(ctx context.Context, limit uint64, offset uint64) ([]model.Slide, error)
	RemoveSlide(ctx context.Context, slideID uint64) (bool, error)
}

Repo is the interface that wraps the basic methods of the database.

func NewRepo

func NewRepo(db *sqlx.DB) Repo

NewRepo returns the Repo interface

Jump to

Keyboard shortcuts

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