converter

package
v3.1.0-rc.1+incompatible Latest Latest
Warning

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

Go to latest
Published: Sep 18, 2018 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConverterV2FieldsToV3

func ConverterV2FieldsToV3(fields, objType string) string

ConverterV2FieldsToV3 converter v2 field to v3

func ConverterV3Fields

func ConverterV3Fields(fields, objType string) string

ConverterV3Fields converter v3 fields

func DecorateUserName

func DecorateUserName(originUserName string) string

DecorateUserName add suffixes to usernames to filter in roles

func GeneralV2Data

func GeneralV2Data(data interface{}) interface{}

GeneralV2Data general convertor v2 funcation

func ResToV2ForAppList

func ResToV2ForAppList(resDataV3 metadata.InstResult) (interface{}, error)

ResToV2ForAppList convert cc v3 json data to cc v2 for application list

func ResToV2ForAppTree

func ResToV2ForAppTree(result bool, message string, data interface{}) (interface{}, error)

ResToV2ForAppTree: convert cc v3 json data to cc v2 for topo tree

func ResToV2ForCpyHost

func ResToV2ForCpyHost(result bool, message string, data interface{}) (interface{}, error)

ResToV2ForCpyHost: convert cc v3 json data to cc v2 for getCompanyIDByIps

func ResToV2ForCustomerGroup

func ResToV2ForCustomerGroup(result bool, message string, data interface{}, appID string) ([]common.KvMap, error)

ResToV2ForCustomerGroup

func ResToV2ForCustomerGroupResult

func ResToV2ForCustomerGroupResult(result bool, message string, dataInfo interface{}) ([]common.KvMap, int, error)

ResToV2ForCustomerGroupResult return list, total, error

func ResToV2ForEnterIP

func ResToV2ForEnterIP(result bool, message string, data interface{}) error

ResToV2ForEnterIP get enterip result for v2

func ResToV2ForHostDataList

func ResToV2ForHostDataList(result bool, message string, data interface{}) (common.KvMap, error)

func ResToV2ForHostGroup

func ResToV2ForHostGroup(result bool, message string, data interface{}) (interface{}, error)

ResToV2ForHostGroup: convert cc v3 json data to cc v2 for host group

func ResToV2ForHostList

func ResToV2ForHostList(result bool, message string, data interface{}) (interface{}, error)

ResToV2ForHostList: convert cc v3 json data to cc v2 for host

func ResToV2ForModuleList

func ResToV2ForModuleList(result bool, message string, data interface{}) (interface{}, error)

ResToV2ForModuleList: convert cc v3 json data to cc v2 for module

func ResToV2ForModuleMapList

func ResToV2ForModuleMapList(result bool, message string, data interface{}) (interface{}, error)

ResToV2ForModuleList: convert cc v3 json data to cc v2 for module map list

func ResToV2ForPlatList

func ResToV2ForPlatList(result bool, message string, data interface{}) (interface{}, error)

ResToV2ForPlatList: convert cc v3 json data to cc v2 for plat

func ResToV2ForPropertyList

func ResToV2ForPropertyList(result bool, message string, data interface{}, idName, idDisplayName string) (interface{}, error)

func ResToV2ForRoleApp

func ResToV2ForRoleApp(resDataV3 metadata.InstResult, uin string, roleArr []string) (interface{}, error)

ResToV2ForAppList: convert cc v3 json data to cc v2 for application list

func ResToV2ForSetList

func ResToV2ForSetList(result bool, message string, data metadata.InstResult) (interface{}, error)

ResToV2ForSetList: convert cc v3 json data to cc v2 for set

func ResV2ToForProcList

func ResV2ToForProcList(resDataV3 interface{}, defLang language.DefaultCCLanguageIf) interface{}

ResV2ToForProcList get process info for v2

func RespCommonResV2

func RespCommonResV2(result bool, code int, message string, resp *restful.Response)

RespCommonResV2 turn the result without data into version V2

func RespFailV2

func RespFailV2(code int, msg string, resp *restful.Response)

RespSuccessV2 convert the result of the failed data to V2

func RespSuccessV2

func RespSuccessV2(data interface{}, resp *restful.Response)

RespSuccessV2 turn the result of successful data into V2 version

Types

This section is empty.

Jump to

Keyboard shortcuts

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