Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Dependence ¶
type Dependence string
const ( Blocking Dependence = "blocking" // plugin will not run if dependency doesn't exist Important Dependence = "important" // plugin will run with warnings Optional Dependence = "optional" // plugin will run with info messages )
type Plugin ¶
type Plugin struct { Id bson.ObjectId `json:"id,omitempty" bson:"_id,omitempty"` Name string `json:"name" description:"unique plugin id, ex: barbudo/wpscan"` // TODO: do we need aliases or tags? Version string `json:"version"` Type PluginType `json:"type" description:"one of: util|script"` Weight PluginWeight `json:"weight" description:"one of: light|middle|heavy"` Desc *Desc `json:"desc" description:"human readable description"` Container *Container `json:"container,omitempty" description:"information about container"` Created time.Time `json:"created,omitempty" description:"when plugin is created"` Updated time.Time `json:"updated,omitempty" description:"when plugin is updated"` FormSchema string `json:"formSchema" bson:"formSchema" description:"json schema form description"` TargetType target.TargetType `json:"targetType" bson:"targetType" description:"available only for target with this type"` // Requirements []*Required `json:"requirements,omitempty" description:"other plugins required for running"` Enabled bool `json:"enabled" description:"is plugin enabled for running"` }
type PluginList ¶
type PluginList struct { pagination.Meta `json:",inline"` Results []*Plugin `json:"results"` }
type PluginType ¶
type PluginType string
const ( Util PluginType = "util" Script PluginType = "script" )
func (PluginType) Convert ¶
func (t PluginType) Convert(text string) (interface{}, error)
func (PluginType) Enum ¶
func (t PluginType) Enum() []interface{}
func (PluginType) MarshalJSON ¶
func (t PluginType) MarshalJSON() ([]byte, error)
It's a hack to show custom type as string in swagger
func (PluginType) String ¶
func (t PluginType) String() string
type PluginWeight ¶
type PluginWeight string
const ( Light PluginWeight = "light" Middle PluginWeight = "middle" Heavy PluginWeight = "heavy" )
func (PluginWeight) Convert ¶
func (t PluginWeight) Convert(text string) (interface{}, error)
func (PluginWeight) Enum ¶
func (t PluginWeight) Enum() []interface{}
func (PluginWeight) MarshalJSON ¶
func (t PluginWeight) MarshalJSON() ([]byte, error)
It's a hack to show custom type as string in swagger
type Required ¶
type Required struct { Plugin string `json:"plugin"` // plugin id, ex: "barbudo/wpscan" Versions []string `json:"versions"` // compatible versions Dependence Dependence `json:"dependence" description:"one of blocking|important|optional"` // with blocking dependency plugin will not run }
Click to show internal directories.
Click to hide internal directories.