model

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Apr 7, 2023 License: BSD-3-Clause Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SYNC_DEVICE_SUFFIX     = ""
	SYNC_TAG_VALUE_SUFFIX  = "_tgv"
	SYNC_WIRE_VALUE_SUFFIX = "_wev"
)
View Source
const (
	SYNC_USER = "user"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Cable

type Cable struct {
	bun.BaseModel `bun:"cable"`
	ID            string    `bun:"type:TEXT,pk" json:"id"`
	DeviceID      string    `bun:"device_id,type:TEXT" json:"device_id"`
	Name          string    `bun:"name,type:TEXT" json:"name"`
	Desc          string    `bun:"desc,type:TEXT" json:"desc"`
	Tags          string    `bun:"tags,type:TEXT" json:"tags"`
	Type          string    `bun:"type,type:TEXT" json:"type"`
	Config        string    `bun:"config,type:TEXT" json:"config"`
	Status        int32     `bun:"status" json:"status"`
	Save          int32     `bun:"save" json:"save"`
	Deleted       time.Time `bun:"deleted,soft_delete" json:"-"`
	Created       time.Time `bun:"created" json:"created"`
	Updated       time.Time `bun:"updated" json:"updated"`
}

type Device

type Device struct {
	bun.BaseModel `bun:"device"`
	ID            string    `bun:"type:TEXT,pk" json:"id"`
	Name          string    `bun:"name,type:TEXT" json:"name"`
	Desc          string    `bun:"desc,type:TEXT" json:"desc"`
	Tags          string    `bun:"tags,type:TEXT" json:"tags"`
	Type          string    `bun:"type,type:TEXT" json:"type"`
	Secret        string    `bun:"secret,type:TEXT" json:"secret"`
	Location      string    `bun:"location,type:TEXT" json:"location"`
	Config        string    `bun:"config,type:TEXT" json:"config"`
	Status        int32     `bun:"status" json:"status"`
	Deleted       time.Time `bun:"deleted,soft_delete" json:"-"`
	Created       time.Time `bun:"created" json:"created"`
	Updated       time.Time `bun:"updated" json:"updated"`
}

type Jumper

type Jumper struct {
	bun.BaseModel `bun:"jumper"`
	ID            string    `bun:"type:TEXT,pk" json:"id"`
	Name          string    `bun:"name,type:TEXT" json:"name"`
	Desc          string    `bun:"desc,type:TEXT" json:"desc"`
	Tags          string    `bun:"tags,type:TEXT" json:"tags"`
	Type          string    `bun:"type,type:TEXT" json:"type"`
	SRC           string    `bun:"src,type:TEXT" json:"src"`
	DST           string    `bun:"dst,type:TEXT" json:"dst"`
	Config        string    `bun:"config,type:TEXT" json:"config"`
	Status        int32     `bun:"status" json:"status"`
	Deleted       time.Time `bun:"deleted,soft_delete" json:"-"`
	Created       time.Time `bun:"created" json:"created"`
	Updated       time.Time `bun:"updated" json:"updated"`
}

type Option

type Option struct {
	bun.BaseModel `bun:"option"`
	ID            string    `bun:"type:TEXT,pk" json:"id"`
	DeviceID      string    `bun:"device_id,type:TEXT" json:"device_id"`
	Name          string    `bun:"name,type:TEXT" json:"name"`
	Desc          string    `bun:"desc,type:TEXT" json:"desc"`
	Tags          string    `bun:"tags,type:TEXT" json:"tags"`
	Type          string    `bun:"type,type:TEXT" json:"type"`
	Value         string    `bun:"value,type:TEXT" json:"value"`
	Status        int32     `bun:"status" json:"status"`
	Deleted       time.Time `bun:"deleted,soft_delete" json:"-"`
	Created       time.Time `bun:"created" json:"created"`
	Updated       time.Time `bun:"updated" json:"updated"`
}

type Port

type Port struct {
	bun.BaseModel `bun:"port"`
	ID            string    `bun:"type:TEXT,pk" json:"id"`
	DeviceID      string    `bun:"device_id,type:TEXT" json:"device_id"`
	Name          string    `bun:"name,type:TEXT" json:"name"`
	Desc          string    `bun:"desc,type:TEXT" json:"desc"`
	Tags          string    `bun:"tags,type:TEXT" json:"tags"`
	Type          string    `bun:"type,type:TEXT" json:"type"`
	Network       string    `bun:"network,type:TEXT" json:"network"`
	Address       string    `bun:"address,type:TEXT" json:"address"`
	Config        string    `bun:"config,type:TEXT" json:"config"`
	Status        int32     `bun:"status" json:"status"`
	Deleted       time.Time `bun:"deleted,soft_delete" json:"-"`
	Created       time.Time `bun:"created" json:"created"`
	Updated       time.Time `bun:"updated" json:"updated"`
}

type Proxy

type Proxy struct {
	bun.BaseModel `bun:"proxy"`
	ID            string    `bun:"type:TEXT,pk" json:"id"`
	DeviceID      string    `bun:"device_id,type:TEXT" json:"device_id"`
	Name          string    `bun:"name,type:TEXT" json:"name"`
	Desc          string    `bun:"desc,type:TEXT" json:"desc"`
	Tags          string    `bun:"tags,type:TEXT" json:"tags"`
	Type          string    `bun:"type,type:TEXT" json:"type"`
	Network       string    `bun:"network,type:TEXT" json:"network"`
	Address       string    `bun:"address,type:TEXT" json:"address"`
	Target        string    `bun:"target,type:TEXT" json:"target"`
	Config        string    `bun:"config,type:TEXT" json:"config"`
	Status        int32     `bun:"status" json:"status"`
	Deleted       time.Time `bun:"deleted,soft_delete" json:"-"`
	Created       time.Time `bun:"created" json:"created"`
	Updated       time.Time `bun:"updated" json:"updated"`
}

type Slot

type Slot struct {
	bun.BaseModel `bun:"slot"`
	ID            string    `bun:"type:TEXT,pk" json:"id"`
	DeviceID      string    `bun:"device_id,type:TEXT" json:"device_id"`
	Name          string    `bun:"name,type:TEXT" json:"name"`
	Desc          string    `bun:"desc,type:TEXT" json:"desc"`
	Tags          string    `bun:"tags,type:TEXT" json:"tags"`
	Type          string    `bun:"type,type:TEXT" json:"type"`
	Secret        string    `bun:"secret,type:TEXT" json:"secret"`
	Location      string    `bun:"location,type:TEXT" json:"location"`
	Config        string    `bun:"config,type:TEXT" json:"config"`
	Status        int32     `bun:"status" json:"status"`
	Deleted       time.Time `bun:"deleted,soft_delete" json:"-"`
	Created       time.Time `bun:"created" json:"created"`
	Updated       time.Time `bun:"updated" json:"updated"`
}

type Source

type Source struct {
	bun.BaseModel `bun:"source"`
	ID            string    `bun:"type:TEXT,pk" json:"id"`
	DeviceID      string    `bun:"device_id,type:TEXT" json:"device_id"`
	Name          string    `bun:"name,type:TEXT" json:"name"`
	Desc          string    `bun:"desc,type:TEXT" json:"desc"`
	Tags          string    `bun:"tags,type:TEXT" json:"tags"`
	Type          string    `bun:"type,type:TEXT" json:"type"`
	Source        string    `bun:"source,type:TEXT" json:"source"`
	Params        string    `bun:"params,type:TEXT" json:"params"`
	Config        string    `bun:"config,type:TEXT" json:"config"`
	Status        int32     `bun:"status" json:"status"`
	Save          int32     `bun:"save" json:"save"`
	Upload        int32     `bun:"upload" json:"upload"`
	Deleted       time.Time `bun:"deleted,soft_delete" json:"-"`
	Created       time.Time `bun:"created" json:"created"`
	Updated       time.Time `bun:"updated" json:"updated"`
}

type Sync

type Sync struct {
	bun.BaseModel `bun:"sync"`
	ID            string    `bun:"type:TEXT,pk" json:"id"`
	Updated       time.Time `bun:"updated" json:"updated"`
}

type SyncGlobal

type SyncGlobal struct {
	bun.BaseModel `bun:"sync_global"`
	Key           string    `bun:"type:TEXT,pk" json:"key"`
	Updated       time.Time `bun:"updated" json:"updated"`
}

type Tag

type Tag struct {
	bun.BaseModel `bun:"tag"`
	ID            string    `bun:"type:TEXT,pk" json:"id"`
	DeviceID      string    `bun:"device_id,type:TEXT" json:"device_id"`
	SourceID      string    `bun:"source_id,type:TEXT" json:"source_id"`
	Name          string    `bun:"name,type:TEXT" json:"name"`
	Desc          string    `bun:"desc,type:TEXT" json:"desc"`
	Type          string    `bun:"type,type:TEXT" json:"type"`
	Tags          string    `bun:"tags,type:TEXT" json:"tags"`
	DataType      string    `bun:"data_type,type:TEXT" json:"data_type"`
	Address       string    `bun:"address,type:TEXT" json:"address"`
	HValue        string    `bun:"h_value,type:TEXT" json:"h_value"`
	LValue        string    `bun:"l_value,type:TEXT" json:"l_value"`
	Config        string    `bun:"config,type:TEXT" json:"config"`
	Status        int32     `bun:"status" json:"status"`
	Access        int32     `bun:"access" json:"access"`
	Save          int32     `bun:"save" json:"save"`
	Upload        int32     `bun:"upload" json:"upload"`
	Deleted       time.Time `bun:"deleted,soft_delete" json:"-"`
	Created       time.Time `bun:"created" json:"created"`
	Updated       time.Time `bun:"updated" json:"updated"`
}

func (*Tag) DefaultValue

func (t *Tag) DefaultValue() nson.Value

func (*Tag) ValueTag

func (t *Tag) ValueTag() uint8

type TagValue

type TagValue struct {
	bun.BaseModel `bun:"tag_value"`
	ID            string    `bun:"type:TEXT,pk" json:"id"`
	DeviceID      string    `bun:"device_id,type:TEXT" json:"device_id"`
	SourceID      string    `bun:"source_id,type:TEXT" json:"source_id"`
	Value         string    `bun:"value,type:TEXT" json:"value"`
	Deleted       time.Time `bun:"deleted,soft_delete" json:"-"`
	Updated       time.Time `bun:"updated" json:"updated"`
}

type Var

type Var struct {
	bun.BaseModel `bun:"var"`
	ID            string    `bun:"type:TEXT,pk" json:"id"`
	DeviceID      string    `bun:"device_id,type:TEXT" json:"device_id"`
	Name          string    `bun:"name,type:TEXT" json:"name"`
	Desc          string    `bun:"desc,type:TEXT" json:"desc"`
	Tags          string    `bun:"tags,type:TEXT" json:"tags"`
	Type          string    `bun:"type,type:TEXT" json:"type"`
	DataType      string    `bun:"data_type,type:TEXT" json:"data_type"`
	Value         string    `bun:"value,type:TEXT" json:"value"`
	HValue        string    `bun:"h_value,type:TEXT" json:"h_value"`
	LValue        string    `bun:"l_value,type:TEXT" json:"l_value"`
	Config        string    `bun:"config,type:TEXT" json:"config"`
	Status        int32     `bun:"status" json:"status"`
	Access        int32     `bun:"access" json:"access"`
	Save          int32     `bun:"save" json:"save"`
	Deleted       time.Time `bun:"deleted,soft_delete" json:"-"`
	Created       time.Time `bun:"created" json:"created"`
	Updated       time.Time `bun:"updated" json:"updated"`
}

func (*Var) DefaultValue

func (t *Var) DefaultValue() nson.Value

func (*Var) ValueTag

func (t *Var) ValueTag() uint8

type Wire

type Wire struct {
	bun.BaseModel `bun:"wire"`
	ID            string    `bun:"type:TEXT,pk" json:"id"`
	DeviceID      string    `bun:"device_id,type:TEXT" json:"device_id"`
	CableID       string    `bun:"cable_id,type:TEXT" json:"cable_id"`
	Name          string    `bun:"name,type:TEXT" json:"name"`
	Desc          string    `bun:"desc,type:TEXT" json:"desc"`
	Type          string    `bun:"type,type:TEXT" json:"type"`
	Tags          string    `bun:"tags,type:TEXT" json:"tags"`
	DataType      string    `bun:"data_type,type:TEXT" json:"data_type"`
	HValue        string    `bun:"h_value,type:TEXT" json:"h_value"`
	LValue        string    `bun:"l_value,type:TEXT" json:"l_value"`
	TagID         string    `bun:"tag_id,type:TEXT" json:"tag_id"`
	Config        string    `bun:"config,type:TEXT" json:"config"`
	Status        int32     `bun:"status" json:"status"`
	Access        int32     `bun:"access" json:"access"`
	Save          int32     `bun:"save" json:"save"`
	Deleted       time.Time `bun:"deleted,soft_delete" json:"-"`
	Created       time.Time `bun:"created" json:"created"`
	Updated       time.Time `bun:"updated" json:"updated"`
}

func (*Wire) DefaultValue

func (t *Wire) DefaultValue() nson.Value

func (*Wire) ValueTag

func (t *Wire) ValueTag() uint8

type WireValue

type WireValue struct {
	bun.BaseModel `bun:"wire_value"`
	ID            string    `bun:"type:TEXT,pk" json:"id"`
	DeviceID      string    `bun:"device_id,type:TEXT" json:"device_id"`
	CableID       string    `bun:"cable_id,type:TEXT" json:"cable_id"`
	Value         string    `bun:"value,type:TEXT" json:"value"`
	Deleted       time.Time `bun:"deleted,soft_delete" json:"-"`
	Updated       time.Time `bun:"updated" json:"updated"`
}

Jump to

Keyboard shortcuts

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