logics

package
v3.0.7-beta+incompatible Latest Latest
Warning

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

Go to latest
Published: Apr 24, 2018 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddDownExcelHttpHeader

func AddDownExcelHttpHeader(c *gin.Context, name string)

func BuildExcelTemplate

func BuildExcelTemplate(url, objID, filename string, header http.Header) error

BuildExcelTemplate return httpcode, error

func GetExcelData

func GetExcelData(sheet *xlsx.Sheet, fields, defFields common.KvMap, isCheckHeader bool, firstRow int) (map[int]map[string]interface{}, error)

GetExcelData excel数据,一个kv结构,key行数(excel中的行数),value内容

func GetHostData

func GetHostData(appIDStr, hostIDStr, apiAddr string, header http.Header, kvMap map[string]string) ([]interface{}, error)

GetHostData get host data from excel

func GetImportHosts

func GetImportHosts(f *xlsx.File, url string, header http.Header) (map[int]map[string]interface{}, error)

GetImportHosts get import hosts

func GetImportInsts

func GetImportInsts(f *xlsx.File, url string, header http.Header, headerRow int) (map[int]map[string]interface{}, error)

GetImportInsts get insts from excel file

func GetInstData

func GetInstData(ownerID, objID, instIDStr, apiAddr string, header http.Header, kvMap map[string]string) ([]interface{}, error)

GetInstData get inst data

func GetObjectData

func GetObjectData(ownerID, objID, apiAddr string, header http.Header) ([]interface{}, error)

GetObjectData get object data

func GetUserAppPri

func GetUserAppPri(apiAddr string, userName string, ownerID, lang string) (userPriveApp map[int64][]string, rolePrivi map[string][]string, modelConfigPrivi map[string][]string, sysPrivi []string)

GetUserAppPri get user privilege

func ProductExcelHealer

func ProductExcelHealer(fields []interface{}, filter []string, sheet *xlsx.Sheet)

ProductExcelHealer Excel文件头部,

func SetProxyHeader

func SetProxyHeader(c *gin.Context)

Types

This section is empty.

Jump to

Keyboard shortcuts

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