gormDb

package
v0.1.5 Latest Latest
Warning

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

Go to latest
Published: Jan 20, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DynamoTable

type DynamoTable[T any] interface {
	Put(item T) error
	Get(hash string) (T, error)
	Delete(hash string) (T, error)
	GetFiltered(result T, filter map[string]string, orderBy string, limit int, offset int) (int64, error)
}

type Repository

type Repository[T any] struct {
	// contains filtered or unexported fields
}

func NewPostgresRepository

func NewPostgresRepository[T any](url string) (Repository[T], error)

func (*Repository[T]) Delete

func (r *Repository[T]) Delete(id int) (T, error)

func (*Repository[T]) Get

func (r *Repository[T]) Get(id int) (T, error)

func (*Repository[T]) GetFiltered

func (r *Repository[T]) GetFiltered(filters map[string]string, orderBy string, limit int, offset int) ([]T, int64, error)

func (*Repository[T]) Init

func (r *Repository[T]) Init(models []interface{}) error

func (*Repository[T]) Put

func (r *Repository[T]) Put(data *T) error

Jump to

Keyboard shortcuts

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