package message_pusher

var DefaultClientOp = NewDefaultClient()

var CmiiUpdatePushOptions = []PublishOption{
	WithTitle("更新应用"),
	WithPriority("3"),
}

func PushCmiiUpdateMessage(cmiiEnv, appName, newTag string, updateStatus bool) {

	deployPush := DeployPush{
		Namespace:    cmiiEnv,
		AppName:      appName,
		DeployStatus: updateStatus,
		ToTag:        newTag,
	}

	deployPush.ParseCmiiDeployTemplate()

	_, err := DefaultClientOp.PublishDefault(deployPush.ParseCmiiDeployTemplate(), CmiiUpdatePushOptions)
	if err != nil {
		log.ErrorF("[PushCmiiUpdateMessage] - message push error ！ %s", err.Error())
		return
	}

}
