storage

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Jun 14, 2018 License: Apache-2.0 Imports: 10 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CmdbDatabase

func CmdbDatabase() *gorm.DB

func InitCmdbDatabase added in v1.0.1

func InitCmdbDatabase()

func InitMySql

func InitMySql(setting *viper.Viper) *gorm.DB

func Initialize

func Initialize()

func Insert

func Insert(db *gorm.DB, model interface{})

func InsertHostTestData added in v1.0.1

func InsertHostTestData() *model.Hosts

func InsertUserTestData added in v1.0.1

func InsertUserTestData() *model.Users

func QueryHost

func QueryHost(id int64) *model.Hosts

获取单个主机信息

func QueryHostsAll added in v1.0.1

func QueryHostsAll() interface{}

获取所有主机信息

func QueryHostsCount added in v1.0.1

func QueryHostsCount() int

获取表数据行数

func QueryUsers added in v1.0.1

func QueryUsers(id int64) *model.Users

查询单个用户信息

func QueryUsersAll added in v1.0.1

func QueryUsersAll() interface{}

获取所有用户信息

func QueryUsersCount added in v1.0.1

func QueryUsersCount() int

获取表数据行数

func Save

func Save(db *gorm.DB, model interface{})

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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