Documentation ¶
Overview ¶
Package contextargs implements a generic entity for shared context within workflows
All templates within a workflow shares the same cookiejar and a key-value store with shared items
Index ¶
- func GenerateVariables(ctx *Context) map[string]interface{}
- type Context
- func (ctx *Context) Add(key string, v interface{})
- func (ctx *Context) Clone() *Context
- func (ctx *Context) ForEach(f func(string, interface{}))
- func (ctx *Context) Get(key string) (interface{}, bool)
- func (ctx *Context) GetAll() map[string]interface{}
- func (ctx *Context) Has(key string) bool
- func (ctx *Context) HasArgs() bool
- func (ctx *Context) Merge(args map[string]interface{})
- func (ctx *Context) Port() string
- func (ctx *Context) Set(key string, value interface{})
- func (ctx *Context) UseNetworkPort(port string, excludePorts string) error
- type MetaInput
- func (metaInput *MetaInput) Clone() *MetaInput
- func (metaInput *MetaInput) GetScanHash(templateId string) string
- func (metaInput *MetaInput) ID() string
- func (metaInput *MetaInput) MarshalBytes() ([]byte, error)
- func (metaInput *MetaInput) MarshalString() (string, error)
- func (metaInput *MetaInput) MustMarshalBytes() []byte
- func (metaInput *MetaInput) MustMarshalString() string
- func (metaInput *MetaInput) PrettyPrint() string
- func (metaInput *MetaInput) Unmarshal(data string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GenerateVariables ¶
GenerateVariables from context args
Types ¶
type Context ¶
type Context struct { // Meta is the target for the executor MetaInput *MetaInput // CookieJar shared within workflow's http templates CookieJar *cookiejar.Jar // contains filtered or unexported fields }
Context implements a shared context struct to share information across multiple templates within a workflow
func NewWithInput ¶
Create a new contextargs instance with input string
type MetaInput ¶
type MetaInput struct { // Input represent the target Input string `json:"input,omitempty"` // CustomIP to use for connection CustomIP string `json:"customIP,omitempty"` // contains filtered or unexported fields }
MetaInput represents a target with metadata (TODO: replace with https://github.com/projectdiscovery/metainput)
func (*MetaInput) GetScanHash ¶
GetScanHash returns a unique hash that represents a scan by hashing (metainput + templateId)
func (*MetaInput) MarshalBytes ¶
func (*MetaInput) MarshalString ¶
func (*MetaInput) MustMarshalBytes ¶
func (*MetaInput) MustMarshalString ¶
func (*MetaInput) PrettyPrint ¶
Click to show internal directories.
Click to hide internal directories.