sql

package
v3.10.0 Latest Latest
Warning

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

Go to latest
Published: Jun 3, 2026 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(m map[string]any) (labels.Manager, error)

New returns an instance of the cbox sql labels manager.

Types

type Config

type Config struct {
	config.Database `mapstructure:",squash"`
}

func (*Config) ApplyDefaults

func (c *Config) ApplyDefaults()

type Label

type Label struct {
	// We don't use gorm.Model since we want to add an index on DeletedAt
	//gorm.Model
	ID        uint `gorm:"primarykey"`
	CreatedAt time.Time
	UpdatedAt time.Time
	DeletedAt gorm.DeletedAt `gorm:"uniqueIndex:u_label;index"`

	Inode    string `gorm:"size:32;uniqueIndex:u_label;index"`
	Instance string `gorm:"size:32;uniqueIndex:u_label;index"`
	UserId   string `gorm:"size:64;uniqueIndex:u_label;index"`
	Label    string `gorm:"size:64;uniqueIndex:u_label;index"`
}

Jump to

Keyboard shortcuts

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