converter

package
v3.0.8+incompatible Latest Latest
Warning

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

Go to latest
Published: Jun 7, 2018 License: MIT Imports: 15 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(respV3 string) (interface{}, error)

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

func ResToV2ForAppTree

func ResToV2ForAppTree(respV3 string) (interface{}, error)

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

func ResToV2ForCpyHost

func ResToV2ForCpyHost(respV3 string) (interface{}, error)

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

func ResToV2ForCustomerGroup

func ResToV2ForCustomerGroup(respV3 string, appID string) ([]common.KvMap, error)

ResToV2ForCustomerGroup 将用户userApi转换成2.0的动态分组

func ResToV2ForCustomerGroupResult

func ResToV2ForCustomerGroupResult(respV3 string) ([]common.KvMap, int, error)

ResToV2ForCustomerGroupResult return list, total, error

func ResToV2ForEnterIP

func ResToV2ForEnterIP(respV3 string) error

ResToV2ForEnterIP get enterip result for v2

func ResToV2ForHostDataList

func ResToV2ForHostDataList(respV3 string) (common.KvMap, error)

func ResToV2ForHostGroup

func ResToV2ForHostGroup(respV3 string) (interface{}, error)

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

func ResToV2ForHostList

func ResToV2ForHostList(respV3 string) (interface{}, error)

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

func ResToV2ForModuleList

func ResToV2ForModuleList(respV3 string) (interface{}, error)

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

func ResToV2ForModuleMapList

func ResToV2ForModuleMapList(respV3 string) (interface{}, error)

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

func ResToV2ForPlatList

func ResToV2ForPlatList(respV3 string) (interface{}, error)

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

func ResToV2ForPropertyList

func ResToV2ForPropertyList(respV3, idName, idDisplayName string) (interface{}, error)

func ResToV2ForRoleApp

func ResToV2ForRoleApp(respV3, uin string, roleArr []string) (interface{}, error)

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

func ResToV2ForSetList

func ResToV2ForSetList(respV3 string) (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(resV3 []byte, 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