store

package
v1.0.8 Latest Latest
Warning

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

Go to latest
Published: Mar 6, 2025 License: MPL-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Generate

func Generate()

func IsNotFoundErr

func IsNotFoundErr(err error) bool

func NewContext

func NewContext(ctx context.Context, h *Handler) context.Context

func RegistGenerate

func RegistGenerate(cfg gen.Config, f func(g *gen.Generator))

func Transaction

func Transaction(f func(tx *Handler) error) error

Types

type Config

type Config struct {
	Driver string
	DSN    string
}

type Handler

type Handler struct {
	*gorm.DB
}

func Init

func Init(cfg Config) (*Handler, error)

func MustInit

func MustInit(cfg Config) *Handler

func NewFromDB

func NewFromDB(db *gorm.DB) *Handler

func WithContext

func WithContext(ctx context.Context) *Handler

Directories

Path Synopsis
dao

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
JackTT - Gopher 🇻🇳