plcconfig

package
v0.0.0-...-3444db6 Latest Latest
Warning

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

Go to latest
Published: Jul 23, 2020 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const TableName = "plc"

Variables

This section is empty.

Functions

func GetPLCList

func GetPLCList(path string) ([]string, error)

func LoadConfig

func LoadConfig(dbconn *sqlite3.SQLite) error

Types

type PLCConfig

type PLCConfig struct {
	UUID         string
	Name         string
	Address      string
	Rack         int
	Slot         int
	MaxBackupCnt int
	DB           []dbconfig.DBConfig
	Created      time.Time
	Saved        time.Time
}

func NewPLC

func NewPLC() (PLCConfig, error)

func (*PLCConfig) AddDB

func (pc *PLCConfig) AddDB(dc dbconfig.DBConfig) error

func (*PLCConfig) Delete

func (pc *PLCConfig) Delete(path string) error

func (*PLCConfig) DeleteDB

func (pc *PLCConfig) DeleteDB(uid string) error

func (*PLCConfig) GetBackups

func (pc *PLCConfig) GetBackups(path string, dbno int) ([]dbconfig.DBConfig, error)

func (*PLCConfig) GetDB

func (pc *PLCConfig) GetDB(uid string) (dbconfig.DBConfig, error)

func (*PLCConfig) Load

func (pc *PLCConfig) Load(path, uid string) (bool, error)

func (*PLCConfig) LoadDB

func (pc *PLCConfig) LoadDB(path string, id int) (dbconfig.DBConfig, error)

func (*PLCConfig) Save

func (pc *PLCConfig) Save(path string) error

func (*PLCConfig) SaveDB

func (pc *PLCConfig) SaveDB(path, uid, comment string, b []byte) error

Jump to

Keyboard shortcuts

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