Documentation ¶
Index ¶
- Constants
- func FetchRules(p papi.PAPI, name string, version int) (treeResponse *papi.GetRuleTreeResponse, err error)
- func MergeCopyRule(c *CopyRule, torules *papi.Rules) (err error)
- func Run(param RuleCopyParam) (err error)
- func StoreRules(p papi.PAPI, name string, dryrun bool, g *papi.GetRuleTreeResponse) (res *papi.UpdateRulesResponse, err error)
- func VersionConv(s string) (i int, err error)
- type CopyRule
- type RuleCopyParam
- type RuleCopyProperty
Constants ¶
View Source
const LATEST int = 0
View Source
const PRODUCTION int = -1
View Source
const STAGING int = -2
Variables ¶
This section is empty.
Functions ¶
func FetchRules ¶
func Run ¶
func Run(param RuleCopyParam) (err error)
func StoreRules ¶
func StoreRules(p papi.PAPI, name string, dryrun bool, g *papi.GetRuleTreeResponse) (res *papi.UpdateRulesResponse, err error)
func VersionConv ¶
Types ¶
type CopyRule ¶
type CopyRule struct { Name string `json:"name"` Comments string `json:"comments"` Rules []papi.Rules `json:"rules,omitempty"` Variables []papi.RuleVariable `json:"variables,omitempty"` }
Rules contains Rule object
type RuleCopyParam ¶
type RuleCopyParam struct { From RuleCopyProperty To RuleCopyProperty Rule string Var string Def string Comments string Dryrun bool }
func (RuleCopyParam) SameEdgerc ¶
func (p RuleCopyParam) SameEdgerc() bool
func (*RuleCopyParam) Validate ¶
func (p *RuleCopyParam) Validate() (err error)
Click to show internal directories.
Click to hide internal directories.