pkg

package
v0.0.0-...-c313e85 Latest Latest
Warning

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

Go to latest
Published: Nov 21, 2022 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrFactNotFound      = errors.New("trivia not found")
	ErrFactAlreadyExists = errors.New("trivia already exists")
)

Functions

This section is empty.

Types

type Fact

type Fact struct {
	ID        int64
	Question  string
	Answer    string
	CreatedAt time.Time
}

type FactRepository

type FactRepository interface {
	Insert(context.Context, *Fact) error
	FindAll(context.Context) ([]Fact, error)
	FindByID(context.Context, int64) (*Fact, error)
	Update(context.Context, *Fact) error
	DeleteByID(context.Context, int64) error
}

FactRepository is the interface used to persists the Fact(s)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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