database

package
v0.0.0-...-e4caca2 Latest Latest
Warning

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

Go to latest
Published: Apr 4, 2023 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Driver = &Database{}

Functions

func SetDBO

func SetDBO(v *gorm.DB)

Types

type Database

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

func (*Database) All

func (config *Database) All() map[string]generic.Value

func (*Database) Get

func (config *Database) Get(key string) generic.Value

func (*Database) Has

func (config *Database) Has(key string) (bool, generic.Value)

func (*Database) Init

func (config *Database) Init(params ...string) error

func (*Database) Name

func (config *Database) Name() string

func (*Database) Register

func (config *Database) Register(settings ...interface{}) error

func (*Database) Set

func (config *Database) Set(key string, value interface{}) error

func (*Database) SetMulti

func (config *Database) SetMulti(data map[string]interface{}) error

type Setting

type Setting struct {
	Domain      string `gorm:"column:domain;primaryKey" json:"domain"`
	Name        string `gorm:"column:name;primaryKey" json:"name"`
	Title       string `gorm:"column:title" json:"title"`
	Description string `gorm:"column:description" json:"description"`
	Value       string `gorm:"column:value" json:"value"`
	Type        string `gorm:"column:type" json:"type"`
	Params      string `gorm:"column:params" json:"params"`
	ReadOnly    bool   `gorm:"column:read_only" json:"read_only"`
	Visible     bool   `gorm:"column:visible" json:"visible"`
}

func (Setting) TableName

func (Setting) TableName() string

type SettingDomain

type SettingDomain struct {
	DomainID    int       `gorm:"column:domain_id" json:"domain_id"`
	Title       string    `gorm:"column:title" json:"title"`
	Description string    `gorm:"column:description" json:"description"`
	Domain      string    `gorm:"column:domain;primaryKey" json:"domain"`
	Type        string    `gorm:"column:type" json:"type"`
	ReadOnly    bool      `gorm:"column:read_only" json:"read_only"`
	Visible     bool      `gorm:"column:visible" json:"visible"`
	Items       []Setting `gorm:"-"`
}

func (SettingDomain) TableName

func (SettingDomain) TableName() string

Jump to

Keyboard shortcuts

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