db

package
v1.0.8 Latest Latest
Warning

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

Go to latest
Published: Jan 2, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// ConfigKeyDBVersion is the key for db version in config table
	ConfigKeyDBVersion = "db_version"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Name        string `json:"name" gorm:"primary_key;type:varchar(32)"`
	Value       string `json:"value" gorm:"type:varchar(128)"`
	Type        string `json:"type" gorm:"type:varchar(100)"`
	Description string `json:"description" gorm:"type:text"`
}

Config -

func (*Config) Add

func (c *Config) Add(ctx context.Context, db *gorm.DB) (int64, error)

Add -

func (*Config) GetByName

func (c *Config) GetByName(ctx context.Context, db *gorm.DB) error

GetByName -

func (*Config) Update

func (c *Config) Update(ctx context.Context, db *gorm.DB) (int64, error)

Update -

func (*Config) Validate

func (c *Config) Validate() error

Validate -

Jump to

Keyboard shortcuts

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