db

package
v0.16.2 Latest Latest
Warning

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

Go to latest
Published: May 3, 2023 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EnsureTable

func EnsureTable(gormDb *gorm.DB, tableName string, model interface{}) error

EnsureTable creates a table according to the specified model if it does not already exist.

Types

type BasePKeylessModel

type BasePKeylessModel struct {
	CreatedAt time.Time  `json:"-" sql:"index"`
	UpdatedAt time.Time  `json:"-" sql:"index"`
	DeletedAt *time.Time `json:"-" sql:"index"`
}

type ConnectionParams

type ConnectionParams struct {
	Host string
	Port uint16
	Db   string
	User string
	Pass string
}

type RegistryTable added in v0.13.0

type RegistryTable struct {
	BasePKeylessModel
	Name     string         `json:"name" gorm:"index:idx_name"`
	Contents datatypes.JSON `json:"contents"`
}

Jump to

Keyboard shortcuts

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