repository

package
v0.0.0-...-88a9cf2 Latest Latest
Warning

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

Go to latest
Published: Mar 13, 2022 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ProvideNumberRepository

func ProvideNumberRepository(s Storage) api.NumberRepository

func SetupDatabase

func SetupDatabase() (*sql.DB, error)

Types

type Storage

type Storage interface {
	Initialize() error
	CloseConnections()

	GetAll() ([]api.Number, error)
	Get(id int) (api.Number, error)
	Create(n api.NewNumberRequest) error
	Update(n api.Number, id int) error
	Remove(id int) error
}

func NewStorage

func NewStorage(db *sql.DB) Storage

Jump to

Keyboard shortcuts

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