Documentation ¶
Index ¶
- type HttpKnock
- type Knock
- type KnockBase
- func (k *KnockBase) ApplyVariables(vars map[string]string) error
- func (k *KnockBase) GetType() string
- func (k *KnockBase) PatchOptions(handOptions interface{}) error
- func (k *KnockBase) Run() (*Result, error)
- func (k *KnockBase) RunScript(externalScripts map[string]string, vars map[string]string, scriptType string) error
- func (k *KnockBase) Validate() error
- type Result
- type ResultEntity
- type ResultStatus
- type StatusFlag
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type HttpKnock ¶
type HttpKnock struct { KnockBase Hand *hand.HttpHand `json:"-" yaml:"-"` Options *hand.HttpOptions `json:"options"` }
func NewHttpKnock ¶
func NewHttpKnock(h *hand.HttpHand, options *hand.HttpOptions) *HttpKnock
func (*HttpKnock) GetExports ¶
func (*HttpKnock) GetHandExports ¶
type Knock ¶
type Knock interface { Validate() error Run() (*Result, error) RunScript(externalScripts map[string]string, vars map[string]string, scriptType string) error PatchOptions(handOptions interface{}) error ApplyVariables(vars map[string]string) error GetType() string GetExports() map[string]interface{} GetHandExports() map[string]interface{} }
type KnockBase ¶
type KnockBase struct { Description string `json:"description"` Type string `json:"type"` Scripts map[string]string `json:"scripts,omitempty" yaml:"scripts,omitempty"` // contains filtered or unexported fields }
func (*KnockBase) PatchOptions ¶
type Result ¶
type Result struct { Entities []ResultEntity `json:"entities"` Statuses []ResultStatus `json:"statuses"` }
type ResultEntity ¶
type ResultEntity struct { Title string `json:"title"` Entity interface{} `json:"result"` }
type ResultStatus ¶
type ResultStatus struct { Title string `json:"title"` Value string `json:"value"` Flags []StatusFlag `json:"flags,omitempty"` }
type StatusFlag ¶
type StatusFlag string
const ( StatusFlagGood StatusFlag = "good" StatusFlagWarning StatusFlag = "warning" StatusFlagBad StatusFlag = "bad" )
Click to show internal directories.
Click to hide internal directories.