store

package
v0.0.0-...-5d3e565 Latest Latest
Warning

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

Go to latest
Published: Apr 8, 2023 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SeedDataWhenCreateTable

func SeedDataWhenCreateTable(dbdialect string, tableName string, dataSeeder DataSeeder) schema.ApplyHook

Types

type Client

type Client interface {
	GetUserWithAchievement(ctx context.Context, userName string) (*ent.User, error)

	GetMealByInterval(ctx context.Context, userID int, from int64, to int64) ([]*ent.Meal, error)
	GetBFPDataPointByInterval(ctx context.Context, userID int, from int64, to int64) ([]*ent.BFPDataPoint, error)

	GetRecentArticle(ctx context.Context, limit int) ([]*ent.Article, error)
	GetRecommendationArticle(ctx context.Context, limit int) ([]*ent.Article, error)

	Closed()
}

func NewStoreClient

func NewStoreClient() Client

type DataSeeder

type DataSeeder = func(ctx context.Context, client *ent.Client) error

Jump to

Keyboard shortcuts

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