db

package
v0.0.0-...-614cbfb Latest Latest
Warning

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

Go to latest
Published: Oct 23, 2023 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ChServer

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

type MysqlServer

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

func (*MysqlServer) AddFullNode

func (m *MysqlServer) AddFullNode(fullNode *common.FullNode) error

func (*MysqlServer) AddSysUser

func (m *MysqlServer) AddSysUser(u *common.SysUser) error

func (*MysqlServer) GetSysUser

func (m *MysqlServer) GetSysUser(account string) (*common.SysUser, error)

func (*MysqlServer) QueryAllSysUser

func (m *MysqlServer) QueryAllSysUser() ([]*common.SysUser, error)

func (*MysqlServer) QueryFullNode

func (m *MysqlServer) QueryFullNode(chain string) ([]*common.FullNode, error)

func (*MysqlServer) ResetPwd

func (m *MysqlServer) ResetPwd(account string, pwd string) error

func (*MysqlServer) UpdateFullNode

func (m *MysqlServer) UpdateFullNode(chain string, fullNode *common.FullNode) error

type SqlInterface

type SqlInterface interface {
	//user
	QueryAllSysUser() ([]*common.SysUser, error)
	GetSysUser(account string) (*common.SysUser, error)
	AddSysUser(u *common.SysUser) error
	ResetPwd(account string, pwd string) error

	//fullnode
	AddFullNode(fullNode *common.FullNode) error
	QueryFullNode(chain string) ([]*common.FullNode, error)
	UpdateFullNode(chain string, fullNode *common.FullNode) error
}

func NewChServer

func NewChServer(x *xlog.XLog, db config.BaseDb) SqlInterface

func NewMysql

func NewMysql(x *xlog.XLog, db *config.BaseDb) SqlInterface

Jump to

Keyboard shortcuts

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