db

package
v0.0.0-...-f0f0ab8 Latest Latest
Warning

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

Go to latest
Published: Oct 29, 2022 License: Apache-2.0 Imports: 1 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type EmptyRepository

type EmptyRepository struct{}

notest

func (EmptyRepository) FirstOrCreate

func (er EmptyRepository) FirstOrCreate(Validator) (v Validator, e error)

func (EmptyRepository) Migrate

func (er EmptyRepository) Migrate() error

func (EmptyRepository) Update

func (er EmptyRepository) Update(Validator) error

func (EmptyRepository) Validator

func (er EmptyRepository) Validator(index uint) (v Validator, e error)

type Repository

type Repository interface {
	FirstOrCreate(Validator) (Validator, error)
	Update(Validator) error
	Validator(index uint) (Validator, error)
	Migrate() error
}

type SQLiteRepository

type SQLiteRepository struct {
	DB *gorm.DB
}

func (*SQLiteRepository) FirstOrCreate

func (r *SQLiteRepository) FirstOrCreate(v Validator) (Validator, error)

func (*SQLiteRepository) Migrate

func (r *SQLiteRepository) Migrate() error

func (*SQLiteRepository) Update

func (r *SQLiteRepository) Update(v Validator) error

func (*SQLiteRepository) Validator

func (r *SQLiteRepository) Validator(index uint) (Validator, error)

type Validator

type Validator struct {
	Idx             uint
	Balance         uint64
	MissedAtts      uint
	MissedAttsTotal uint
}

type ValidatorORM

type ValidatorORM struct {
	gorm.Model
	Validator
}

Jump to

Keyboard shortcuts

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