db

package
v0.0.0-...-34c6fba Latest Latest
Warning

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

Go to latest
Published: Sep 5, 2020 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Close

func Close()

func InsertMeow

func InsertMeow(ctx context.Context, meow schema.Meow) error

func ListMeows

func ListMeows(ctx context.Context, skip uint64, take uint64) ([]schema.Meow, error)

func SetRepository

func SetRepository(repository Repository)

Types

type PostgresRepository

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

func NewPostgres

func NewPostgres(url string) (*PostgresRepository, error)

func (*PostgresRepository) Close

func (r *PostgresRepository) Close()

func (*PostgresRepository) InsertMeow

func (r *PostgresRepository) InsertMeow(ctx context.Context, meow schema.Meow) error

func (*PostgresRepository) ListMeows

func (r *PostgresRepository) ListMeows(ctx context.Context, skip uint64, take uint64) ([]schema.Meow, error)

type Repository

type Repository interface {
	Close()
	InsertMeow(ctx context.Context, meow schema.Meow) error
	ListMeows(ctx context.Context, skip uint64, take uint64) ([]schema.Meow, error)
}

Jump to

Keyboard shortcuts

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