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 (
	ErrPresentationNotFound = errors.New("presentation not found")
	ErrUnknown              = errors.New("unknown")
)

Functions

This section is empty.

Types

type Repo

type Repo interface {
	CreatePresentation(ctx context.Context, presentation model.Presentation) (uint64, error)
	MultiCreatePresentations(ctx context.Context, presentations []model.Presentation) (int64, error)
	UpdatePresentation(ctx context.Context, presentation model.Presentation) (bool, error)
	DescribePresentation(ctx context.Context, presentationID uint64) (*model.Presentation, error)
	ListPresentations(ctx context.Context, limit uint64, offset uint64) ([]model.Presentation, error)
	RemovePresentation(ctx context.Context, presentationID 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