Documentation ¶
Index ¶
- type Repo
- type Repository
- func (r *Repository) Create(evidence models.DoubleOperationEvidence) error
- func (r *Repository) Last() (found bool, evidence models.DoubleOperationEvidenceExtended, err error)
- func (r *Repository) List(options models.DoubleOperationEvidenceQueryOptions) (count int64, evidences []models.DoubleOperationEvidenceExtended, err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Repo ¶
type Repo interface { List(options models.DoubleOperationEvidenceQueryOptions) (count int64, evidences []models.DoubleOperationEvidenceExtended, err error) Last() (found bool, evidence models.DoubleOperationEvidenceExtended, err error) Create(evidence models.DoubleOperationEvidence) 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.DoubleOperationEvidence) error
Create creates a DoubleOperationEvidence.
func (*Repository) Last ¶
func (r *Repository) Last() (found bool, evidence models.DoubleOperationEvidenceExtended, err error)
func (*Repository) List ¶
func (r *Repository) List(options models.DoubleOperationEvidenceQueryOptions) (count int64, evidences []models.DoubleOperationEvidenceExtended, err error)
List returns a list of evidences from the newest to oldest.
Click to show internal directories.
Click to hide internal directories.