db

package
v0.0.0-...-52fa7fc Latest Latest
Warning

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

Go to latest
Published: Feb 17, 2025 License: GPL-3.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Sqlite *ConfigSqlite `json:"sqlite" validate:"required"`
}

holds database configuration

func (Config) Init

func (c Config) Init(ctx context.Context) (*ent.Client, error)

Init initialize ent client with underly DB engine

type ConfigSqlite

type ConfigSqlite struct {
	Path string `json:"path" validate:"required"`
}

sqlite3 config

func (*ConfigSqlite) Init

func (c *ConfigSqlite) Init(ctx context.Context) (*ent.Client, error)

Init initialize sqlite3 connection

Jump to

Keyboard shortcuts

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