Example #1
0
func (za *ZkApp) GetDependerEnvDataForDependerApp(app, env string, decrypt bool) *types.DependerEnvData {
	dad := za.GetDependerAppData(app, false)
	if dad == nil {
		return nil
	}
	ded := dad.DependerEnvData[env]
	if ded == nil {
		return nil
	}
	if decrypt {
		crypto.DecryptDependerEnvData(ded)
	}
	return ded
}
Example #2
0
func (za *ZkApp) GetDependerEnvData(env string, decrypt bool) *types.DependerEnvData {
	if za.DependerEnvData == nil {
		za.DependerEnvData = map[string]*types.DependerEnvData{}
		za.Save()
	}
	ded := za.DependerEnvData[env]
	if ded == nil {
		return nil
	}
	if decrypt {
		crypto.DecryptDependerEnvData(ded)
	}
	return ded
}
Example #3
0
func (za *ZkApp) GetDependerAppData(app string, decrypt bool) *types.DependerAppData {
	if za.DependerAppData == nil {
		za.DependerAppData = map[string]*types.DependerAppData{}
		za.Save()
	}
	dad := za.DependerAppData[app]
	if dad == nil {
		return nil
	}
	if decrypt {
		for _, ded := range dad.DependerEnvData {
			crypto.DecryptDependerEnvData(ded)
		}
	}
	return dad
}