sqlfavoritestore

package
v0.0.0-...-65468f9 Latest Latest
Warning

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

Go to latest
Published: Oct 31, 2024 License: BSD-3-Clause Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FavoriteStore

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

FavoriteStore implements the favorite.Store interface using an SQL database.

func New

func New(db pool.Pool) *FavoriteStore

New returns a new *FavoriteStore.

func (*FavoriteStore) Create

func (s *FavoriteStore) Create(ctx context.Context, req *favorites.SaveRequest) error

Create implements the favorites.Store interface.

func (*FavoriteStore) Delete

func (s *FavoriteStore) Delete(ctx context.Context, userId string, id string) error

Delete implements the favorites.Store interface.

func (*FavoriteStore) Get

Get implements the favorites.Store interface.

func (*FavoriteStore) List

func (s *FavoriteStore) List(ctx context.Context, userId string) ([]*favorites.Favorite, error)

List implements the favorites.Store interface.

func (*FavoriteStore) Liveness

func (s *FavoriteStore) Liveness(ctx context.Context) error

func (*FavoriteStore) Update

func (s *FavoriteStore) Update(ctx context.Context, req *favorites.SaveRequest, id string) error

Create implements the favorites.Store interface.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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