strategy

package
Version: v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Jun 18, 2017 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateStrategy

func CreateStrategy(c *gin.Context)

func DeleteStrategy

func DeleteStrategy(c *gin.Context)

func GetStrategy

func GetStrategy(c *gin.Context)

func GetStrategys

func GetStrategys(c *gin.Context)

func MetricQuery

func MetricQuery(c *gin.Context)

func Routes

func Routes(r *gin.Engine)

func UpdateStrategy

func UpdateStrategy(c *gin.Context)

Types

type APICreateStrategyInput

type APICreateStrategyInput struct {
	Metric     string `json:"metric" binding:"required"`
	Tags       string `json:"tags"`
	MaxStep    int    `json:"max_step" binding:"required"`
	Priority   int    `json:"priority" binding:"exists"`
	Func       string `json:"func" binding:"required"`
	Op         string `json:"op" binding:"required"`
	RightValue string `json:"right_value" binding:"required"`
	Note       string `json:"note"`
	RunBegin   string `json:"run_begin"`
	RunEnd     string `json:"run_end"`
	TplId      int64  `json:"tpl_id" binding:"required"`
}

func (APICreateStrategyInput) CheckFormat

func (this APICreateStrategyInput) CheckFormat() (err error)

type APIUpdateStrategyInput

type APIUpdateStrategyInput struct {
	ID         int64  `json:"id" binding:"required"`
	Metric     string `json:"metric" binding:"required"`
	Tags       string `json:"tags"`
	MaxStep    int    `json:"max_step" binding:"required"`
	Priority   int    `json:"priority" binding:"exists"`
	Func       string `json:"func" binding:"required"`
	Op         string `json:"op" binding:"required"`
	RightValue string `json:"right_value" binding:"required"`
	Note       string `json:"note"`
	RunBegin   string `json:"run_begin"`
	RunEnd     string `json:"run_end"`
}

func (APIUpdateStrategyInput) CheckFormat

func (this APIUpdateStrategyInput) CheckFormat() (err error)

Jump to

Keyboard shortcuts

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