client

package
v0.0.0-...-2985fdd Latest Latest
Warning

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

Go to latest
Published: Nov 13, 2024 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	USER     = "root"          // MySQL username
	PASSWORD = "password"      // MySQL password
	HOST     = "localhost"     // MySQL server host
	DATABASE = "your_database" // Database name
)

MySQL connection parameters

Variables

View Source
var LIB_OPTIONS = []Option{
	{Key: "01", Value: "libmariadb.dll"},
	{Key: "02", Value: "libmysql-6.1.dll"},
	{Key: "03", Value: "libmysql.dll"},
}
View Source
var NET_TYPE_OPTIONS = []Option{
	{Key: "01", Value: "MariaDB or MySQL (TCP/IP)"},
	{Key: "02", Value: "MariaDB or MySQL (named pipe)"},
	{Key: "03", Value: "MariaDB or MySQL (SSH tunnel)"},
	{Key: "04", Value: "ProxySQL Admin (Experimental)"},
	{Key: "05", Value: "MySQL on RDS"},
	{Key: "06", Value: "Microsoft SQL Server (named pipe) "},
	{Key: "07", Value: "Microsoft SQL Server (TCP/P)"},
	{Key: "08", Value: "Microsoft SQL Server (SPX/IPX)"},
	{Key: "09", Value: "Microsoft SQL Server (Banyan VINES)"},
	{Key: "10", Value: "Microsoft SQL Server (Windows RPC)"},
	{Key: "11", Value: "PostgreSQL (TCP/IP)"},
	{Key: "12", Value: "PostgreSQL (SSH tunnel)"},
}

Functions

func ColumnSortable2

func ColumnSortable2() walk.KeyEventHandler

func InitWin

func InitWin()

InitWin 初始化界面

func OpenDB

func OpenDB() (db *sql.DB, err error)

func Ping

func Ping() bool

ping

Types

type CanAddPage

type CanAddPage struct {
	*walk.Composite
	// contains filtered or unexported fields
}

VehicleTypeAddPage 页面对象

func ImportCanFromBigdataPanel

func ImportCanFromBigdataPanel(parent walk.Container, mainWin *TabMainWindow) (*CanAddPage, error)

ImportCanFromBigdataPanel 从大数据XML导入CAN

type CustomWindow

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

CustomWindow 结构体定义了新窗口

func NewCustomWindow

func NewCustomWindow(owner walk.Form) *CustomWindow

NewCustomWindow 创建并返回一个 CustomWindow 的实例

func (*CustomWindow) Run

func (cw *CustomWindow) Run()

Run 显示并运行新窗口

type DBToolBar

type DBToolBar struct {
	walk.ToolBar
}

type DataModel

type DataModel struct {
	walk.TableModelBase
	// contains filtered or unexported fields
}

DataModel to be used in TableView

func (*DataModel) ColumnCount

func (m *DataModel) ColumnCount() int

func (*DataModel) ResetData

func (m *DataModel) ResetData(newItems []map[string]interface{}, newColumns []string)

func (*DataModel) RowCount

func (m *DataModel) RowCount() int

func (*DataModel) Value

func (m *DataModel) Value(row, col int) interface{}

type EnvItem

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

type EnvModel

type EnvModel struct {
	walk.ListModelBase
	// contains filtered or unexported fields
}

func NewEnvModel

func NewEnvModel() *EnvModel

func (*EnvModel) ItemCount

func (m *EnvModel) ItemCount() int

func (*EnvModel) Value

func (m *EnvModel) Value(index int) interface{}

type LineNumberTextEdit

type LineNumberTextEdit struct {
	*walk.Composite
	// contains filtered or unexported fields
}

func NewLineNumberTextEdit

func NewLineNumberTextEdit(parent walk.Container) (*LineNumberTextEdit, error)

func (*LineNumberTextEdit) Create

func (ln *LineNumberTextEdit) Create(builder *Builder) error

type MyTreeView

type MyTreeView struct {
	walk.TreeView
}

type Option

type Option struct {
	Key   string // 实际取值
	Value string // 显示值
}

定义一个结构体来表示显示和实际取值

func GetOptionsModel

func GetOptionsModel(options []Option) []*Option

从数据选项数组构建下拉框model

type Organization

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

func NewOrganization

func NewOrganization(id string, orgName string, parent *Organization) *Organization

func (*Organization) ChildAt

func (org *Organization) ChildAt(index int) walk.TreeItem

func (*Organization) ChildCount

func (org *Organization) ChildCount() int

func (*Organization) Parent

func (org *Organization) Parent() walk.TreeItem

func (*Organization) ResetChildren

func (org *Organization) ResetChildren() error

func (*Organization) Text

func (org *Organization) Text() string

type OrganizationEntity

type OrganizationEntity struct {
	Id      string
	OrgName string
	OrgType int

	SearchKey string
}

func (*OrganizationEntity) ListSubOrg

func (org *OrganizationEntity) ListSubOrg() ([]*OrganizationEntity, error)

type OrganizationTreeModel

type OrganizationTreeModel struct {
	walk.TreeModelBase
	// contains filtered or unexported fields
}

func NewOrganizationTreeModel

func NewOrganizationTreeModel() (*OrganizationTreeModel, error)

func NewOrganizationTreeModel2

func NewOrganizationTreeModel2() *OrganizationTreeModel

func (*OrganizationTreeModel) LazyPopulation

func (*OrganizationTreeModel) LazyPopulation() bool

func (*OrganizationTreeModel) RootAt

func (m *OrganizationTreeModel) RootAt(index int) walk.TreeItem

func (*OrganizationTreeModel) RootCount

func (m *OrganizationTreeModel) RootCount() int

type SearchCanTable

type SearchCanTable struct {
	walk.TableModelBase
	walk.SorterBase
	// contains filtered or unexported fields
}

过滤can

func (*SearchCanTable) ResetRows

func (m *SearchCanTable) ResetRows()

ResetRows 排序

type Session

type Session struct {
	SessionName     string // 会话名称
	Host            string // 主机
	LastConnectTime string // 上次连接
	Remark          string // 注释
}

定义数据模型结构体

type SessionModel

type SessionModel struct {
	walk.TableModelBase
	walk.SorterBase
	// contains filtered or unexported fields
}

定义 Session 模型

func NewSessionModel

func NewSessionModel(data []Session) *SessionModel

NewSessionModel 创建一个新的 SessionModel

func (*SessionModel) ColumnSortable

func (m *SessionModel) ColumnSortable(col int) bool

ColumnSortable 返回指定列是否可排序

func (*SessionModel) RowCount

func (m *SessionModel) RowCount() int

RowCount 返回数据行数

func (*SessionModel) Sort

func (m *SessionModel) Sort(col int, order walk.SortOrder) error

Sort 按指定列和排序顺序对数据排序

func (*SessionModel) Value

func (m *SessionModel) Value(row, col int) interface{}

Value 返回指定行和列的值

type Settings

type Settings struct {
	NetType       string // 网络类型
	DependenceLib string // 依赖库
	Hosts         string // 主机/IP
	User          string //用户
	Port          string // 端口

}

type TabMainWindow

type TabMainWindow struct {
	*walk.MainWindow
	TabWidget *walk.TabWidget
	// contains filtered or unexported fields
}

func (*TabMainWindow) AddVehicleType

func (mw *TabMainWindow) AddVehicleType()

type TargetCanTable

type TargetCanTable struct {
	walk.TableModelBase
	walk.SorterBase
	// contains filtered or unexported fields
}

TargetCanTable 目标can

func LoadTargetCan

func LoadTargetCan() *TargetCanTable

LoadTargetCan 目标Table

func NewTargetCanModel

func NewTargetCanModel() *TargetCanTable

NewTargetCanModel

func (*TargetCanTable) ResetRows

func (m *TargetCanTable) ResetRows()

ResetRows

type TreeNode

type TreeNode struct {
	Title    string
	Children []*TreeNode
}

TreeNode 表示树的节点

type TreeViewModel

type TreeViewModel struct {
	walk.TreeModel
	// contains filtered or unexported fields
}

TreeViewModel 用于将 TreeNode 数据绑定到 TreeView

func NewTreeViewModel

func NewTreeViewModel(rootNodes []*TreeNode) *TreeViewModel

func (*TreeViewModel) ChildCount

func (tvm *TreeViewModel) ChildCount(index int) int

func (*TreeViewModel) Count

func (tvm *TreeViewModel) Count() int

func (*TreeViewModel) Data

func (tvm *TreeViewModel) Data() interface{}

func (*TreeViewModel) Index

func (tvm *TreeViewModel) Index(parent int, childIndex int, childCount int) int

func (*TreeViewModel) Parent

func (tvm *TreeViewModel) Parent(index int) int

func (*TreeViewModel) Value

func (tvm *TreeViewModel) Value(index int) interface{}

type VehicleTypeAddForm

type VehicleTypeAddForm struct {
	*walk.Composite
	// contains filtered or unexported fields
}

func NewVehicleTypeAddPage

func NewVehicleTypeAddPage(parent walk.Container, mw *TabMainWindow) (*VehicleTypeAddForm, error)

Jump to

Keyboard shortcuts

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