double_baking

package
v0.0.0-...-71505b4 Latest Latest
Warning

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

Go to latest
Published: Dec 4, 2019 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Repo

type Repo interface {
	List(options models.DoubleBakingEvidenceQueryOptions) (count int64, evidences []models.DoubleBakingEvidence, err error)
	Last() (found bool, evidence models.DoubleBakingEvidence, err error)
	Create(evidence models.DoubleBakingEvidence) error
}

type Repository

type Repository struct {
	// contains filtered or unexported fields
}

Repository is the baking evidences repo implementation.

func New

func New(db *gorm.DB) *Repository

New creates an instance of repository using the provided db.

func (*Repository) Create

func (r *Repository) Create(evidence models.DoubleBakingEvidence) error

Create creates a DoubleBakingEvidence.

func (*Repository) Last

func (r *Repository) Last() (found bool, evidence models.DoubleBakingEvidence, err error)

func (*Repository) List

func (r *Repository) List(options models.DoubleBakingEvidenceQueryOptions) (count int64, evidences []models.DoubleBakingEvidence, err error)

List returns a list of evidences from the newest to oldest.

Jump to

Keyboard shortcuts

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