Exemplo n.º 1
0
func (command *commandUpdateMetadata) PreCSV(resource *handler.Resource) {
	resource.Result = map[string]interface{}{
		"Metadata": resource.Result,
	}
	resource.Keys = []string{"Metadata"}
	resource.FlattenMap("Metadata")
}
Exemplo n.º 2
0
func (command *commandSetMetadata) PreCSV(resource *handler.Resource) error {
	resource.Result = map[string]interface{}{
		"Metadata": resource.Result,
	}
	resource.Keys = []string{"Metadata"}
	resource.FlattenMap("Metadata")
	return nil
}
Exemplo n.º 3
0
func (command *commandAbandon) PreJSON(resource *handler.Resource) error {
	var resInterface map[string]interface{}
	res, err := json.Marshal(resource.Result)
	if err != nil {
		return err
	}
	err = json.Unmarshal(res, &resInterface)
	if err != nil {
		return err
	}
	resource.Result = resInterface
	resource.Keys = []string{"status", "name", "template", "action", "id", "resources", "files", "stack_user_project_id", "project_id", "environment"}
	return nil
}