store

package
v0.0.0-...-3434b8a Latest Latest
Warning

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

Go to latest
Published: Aug 13, 2023 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FormatError

func FormatError(err error) error

Types

type Store

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

func New

func New(db *sql.DB) *Store

func (*Store) CreateMood

func (s *Store) CreateMood(ctx context.Context, create *api.CreateMood) (*api.CreateMood, error)

func (*Store) CreateUser

func (s *Store) CreateUser(ctx context.Context, createUser *api.User) (*api.User, error)

func (*Store) FindUser

func (s *Store) FindUser(ctx context.Context, findUser *api.FindUser) (*api.User, error)

func (*Store) GetDB

func (s *Store) GetDB() *sql.DB

func (*Store) ListMoods

func (s *Store) ListMoods(ctx context.Context, find *api.FindMood) ([]*api.CreateMood, error)

func (*Store) ListUserSettings

func (s *Store) ListUserSettings(ctx context.Context, userId int) ([]*api.UserSetting, error)

func (*Store) ListUsers

func (s *Store) ListUsers(ctx context.Context, findUser *api.FindUser) ([]*api.User, error)

func (*Store) UpdateUser

func (s *Store) UpdateUser(ctx context.Context, updateUser *api.UpdateUser) (*api.User, error)

func (*Store) UpsertUserSetting

func (s *Store) UpsertUserSetting(ctx context.Context, upsert *api.UserSetting) (*api.UserSetting, error)

Jump to

Keyboard shortcuts

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