Documentation ¶
Index ¶
- func AddDownExcelHttpHeader(c *gin.Context, name string)
- func BuildExcelFromData(objID string, fields map[string]Property, filter []string, data []interface{}, ...) error
- func BuildExcelTemplate(url, objID, filename string, header http.Header, ...) error
- func BuildHostExcelFromData(objID string, fields map[string]Property, filter []string, data []interface{}, ...) error
- func ConvAttrOption(attrItems map[int]map[string]interface{})
- func GetExcelData(sheet *xlsx.Sheet, fields map[string]Property, defFields common.KvMap, ...) (map[int]map[string]interface{}, error)
- func GetFilterFields(objID string) []string
- func GetHostData(appIDStr, hostIDStr, apiAddr string, header http.Header) ([]interface{}, error)
- func GetImportHosts(f *xlsx.File, url string, header http.Header, defLang lang.DefaultCCLanguageIf) (map[int]map[string]interface{}, error)
- func GetImportInsts(f *xlsx.File, objID, url string, header http.Header, headerRow int, ...) (map[int]map[string]interface{}, error)
- func GetInstData(ownerID, objID, instIDStr, apiAddr string, header http.Header, ...) ([]interface{}, error)
- func GetLanugaeByHTTPRequest(c *gin.Context) string
- func GetObjFieldIDs(objID, url string, filterFields []string, header http.Header) (map[string]Property, error)
- func GetObjectData(ownerID, objID, apiAddr string, header http.Header) ([]interface{}, error)
- func GetPropertyFieldDesc(lang language.DefaultCCLanguageIf) map[string]string
- func GetPropertyFieldType(lang language.DefaultCCLanguageIf) map[string]string
- func GetUserAppPri(apiAddr string, userName string, ownerID, lang string) (userPriveApp map[int64][]string, rolePrivi map[string][]string, ...)
- func SetProxyHeader(c *gin.Context)
- type Property
- type PropertyGroup
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddDownExcelHttpHeader ¶
func BuildExcelFromData ¶
func BuildExcelFromData(objID string, fields map[string]Property, filter []string, data []interface{}, sheet *xlsx.Sheet, defLang lang.DefaultCCLanguageIf) error
BuildExcelFromData product excel from data
func BuildExcelTemplate ¶
func BuildExcelTemplate(url, objID, filename string, header http.Header, defLang lang.DefaultCCLanguageIf) error
BuildExcelTemplate return httpcode, error
func BuildHostExcelFromData ¶
func BuildHostExcelFromData(objID string, fields map[string]Property, filter []string, data []interface{}, sheet *xlsx.Sheet, defLang lang.DefaultCCLanguageIf) error
BuildHostExcelFromData product excel from data
func ConvAttrOption ¶
func GetExcelData ¶
func GetExcelData(sheet *xlsx.Sheet, fields map[string]Property, defFields common.KvMap, isCheckHeader bool, firstRow int, defLang lang.DefaultCCLanguageIf) (map[int]map[string]interface{}, error)
GetExcelData excel数据,一个kv结构,key行数(excel中的行数),value内容
func GetHostData ¶
GetHostData get host data from excel
func GetImportHosts ¶
func GetImportHosts(f *xlsx.File, url string, header http.Header, defLang lang.DefaultCCLanguageIf) (map[int]map[string]interface{}, error)
GetImportHosts get import hosts
func GetImportInsts ¶
func GetImportInsts(f *xlsx.File, objID, url string, header http.Header, headerRow int, defLang lang.DefaultCCLanguageIf) (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 GetLanugaeByHTTPRequest ¶
func GetObjFieldIDs ¶
func GetObjFieldIDs(objID, url string, filterFields []string, header http.Header) (map[string]Property, error)
GetObjFieldIDs get object fields
func GetObjectData ¶
GetObjectData get object data
func GetPropertyFieldDesc ¶
func GetPropertyFieldDesc(lang language.DefaultCCLanguageIf) map[string]string
func GetPropertyFieldType ¶
func GetPropertyFieldType(lang language.DefaultCCLanguageIf) map[string]string
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 SetProxyHeader ¶
Types ¶
type Property ¶
type Property struct { ID string Name string PropertyType string Option interface{} IsPre bool IsRequire bool Group string Index int ExcelColIndex int NotObjPropery bool //Not an attribute of the object, indicating that the field to be exported is needed for export, AsstObjPrimaryProperty []Property IsOnly bool AsstObjID string }
Property object fields
type PropertyGroup ¶
PropertyGroup property group
Click to show internal directories.
Click to hide internal directories.