sql

package
v0.0.0-...-984c388 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewEntClient

func NewEntClient(cfg Config) (*ent.Client, func(), error)

func NewEntClientWithAutoMigrate

func NewEntClientWithAutoMigrate(cfg Config) (*ent.Client, func(), error)

Types

type CardStorage

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

func NewCardStorage

func NewCardStorage(e *ent.Client) CardStorage

func (CardStorage) Find

func (c CardStorage) Find(ctx context.Context, cr storage.Criteria) (items []card.Card, nextPage storage.PageToken, err error)

func (CardStorage) Get

func (c CardStorage) Get(ctx context.Context, id string) (*card.Card, error)

func (CardStorage) GetUserCards

func (c CardStorage) GetUserCards(ctx context.Context, cr storage.Criteria,
	userID string) ([]card.Card, storage.PageToken, error)

func (CardStorage) Remove

func (c CardStorage) Remove(ctx context.Context, id string) error

func (CardStorage) Save

func (c CardStorage) Save(ctx context.Context, v card.Card) error

type Config

type Config struct {
	ConnectionString string
}

func NewConfig

func NewConfig() Config

type ContactStorage

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

func NewContactStorage

func NewContactStorage(e *ent.Client) ContactStorage

func (ContactStorage) Find

func (c ContactStorage) Find(ctx context.Context, cr storage.Criteria) (items []contact.Contact, nextPage storage.PageToken, err error)

func (ContactStorage) Get

func (ContactStorage) GetUserContacts

func (c ContactStorage) GetUserContacts(ctx context.Context, cr storage.Criteria,
	userID string) ([]contact.Contact, storage.PageToken, error)

func (ContactStorage) Remove

func (c ContactStorage) Remove(ctx context.Context, id string) error

func (ContactStorage) Save

type FinancialAccountStorage

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

func NewFinancialAccountStorage

func NewFinancialAccountStorage(e *ent.Client) FinancialAccountStorage

func (FinancialAccountStorage) Find

func (FinancialAccountStorage) Get

func (FinancialAccountStorage) Remove

func (FinancialAccountStorage) Save

type UserStorage

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

func NewUserStorage

func NewUserStorage(e *ent.Client) UserStorage

func (UserStorage) Find

func (UserStorage) Get

func (u UserStorage) Get(ctx context.Context, id string) (*user.User, error)

func (UserStorage) Remove

func (u UserStorage) Remove(ctx context.Context, id string) error

func (UserStorage) Save

func (u UserStorage) Save(ctx context.Context, v user.User) error

Jump to

Keyboard shortcuts

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