repositories

package
v0.8.3 Latest Latest
Warning

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

Go to latest
Published: Aug 16, 2022 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewDatabase

func NewDatabase(dsn string, timeout time.Duration, debug bool) *database

NewDatabase Create a new database

Types

type ProRepository

type ProRepository struct {
	TableName string
	// contains filtered or unexported fields
}

ProRepository a repository for example

func NewProRepository

func NewProRepository(conf config.Config, db *database, tableName string, version int) *ProRepository

NewProRepository Create a new ProRepository

func (*ProRepository) FindByID

func (r *ProRepository) FindByID() errors.NoFound

FindByID find something by id

type UserRepository

type UserRepository struct {
	TableName string
	// contains filtered or unexported fields
}

UserRepository the user repository for example

func NewUserRepository

func NewUserRepository(conf *config2.Config, db *database, tableName string) *UserRepository

NewUserRepository Create a new UserRepository

func (*UserRepository) FindByID

func (r *UserRepository) FindByID() error

FindByID find something by id

Jump to

Keyboard shortcuts

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