template

package
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: Nov 27, 2018 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateActionToTmplate

func CreateActionToTmplate(c *gin.Context)

func CreateTemplate

func CreateTemplate(c *gin.Context)

func DeleteTemplate

func DeleteTemplate(c *gin.Context)

func GetATemplate

func GetATemplate(c *gin.Context)

func GetATemplateHostgroup added in v0.2.1

func GetATemplateHostgroup(c *gin.Context)

func GetActionByID

func GetActionByID(c *gin.Context)

func GetTemplates

func GetTemplates(c *gin.Context)

func GetTemplatesSimple

func GetTemplatesSimple(c *gin.Context)

func Routes

func Routes(r *gin.Engine)

func UpdateActionToTmplate

func UpdateActionToTmplate(c *gin.Context)

func UpdateTemplate

func UpdateTemplate(c *gin.Context)

Types

type APICreateActionToTmplateInput

type APICreateActionToTmplateInput struct {
	UIC                string `json:"uic" binding:"exists"`
	URL                string `json:"url" binding:"exists"`
	Callback           int    `json:"callback" binding:"exists"`
	BeforeCallbackSMS  int    `json:"before_callback_sms" binding:"exists"`
	AfterCallbackSMS   int    `json:"after_callback_sms" binding:"exists"`
	BeforeCallbackMail int    `json:"before_callback_mail" binding:"exists"`
	AfterCallbackMail  int    `json:"after_callback_mail" binding:"exists"`
	TplId              int64  `json:"tpl_id" binding:"required"`
}

type APICreateTemplateInput

type APICreateTemplateInput struct {
	Name     string `json:"name" binding:"required"`
	ParentID int64  `json:"parent_id" binding:"exists"`
	ActionID int64  `json:"action_id"`
}

type APIGetTemplatesOutput

type APIGetTemplatesOutput struct {
	Templates []CTemplate `json:"templates"`
}

type APIUpdateActionToTmplateInput

type APIUpdateActionToTmplateInput struct {
	ID                 int64  `json:"id" binding:"required"`
	UIC                string `json:"uic" binding:"exists"`
	URL                string `json:"url" binding:"exists"`
	Callback           int    `json:"callback" binding:"exists"`
	BeforeCallbackSMS  int    `json:"before_callback_sms" binding:"exists"`
	AfterCallbackSMS   int    `json:"after_callback_sms" binding:"exists"`
	BeforeCallbackMail int    `json:"before_callback_mail" binding:"exists"`
	AfterCallbackMail  int    `json:"after_callback_mail" binding:"exists"`
}

type APIUpdateTemplateInput

type APIUpdateTemplateInput struct {
	Name     string `json:"name" binding:"required"`
	ParentID int64  `json:"parent_id" binding:"exists"`
	TplID    int64  `json:"tpl_id" binding:"required"`
}

type CTemplate

type CTemplate struct {
	Template   f.Template `json:"template"`
	ParentName string     `json:"parent_name"`
}

Jump to

Keyboard shortcuts

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