Documentation ¶
Index ¶
- type PayloadMap
- type PipelineItem
- func (i *PipelineItem) AddPayload(payloadId string, payload interface{}) error
- func (i *PipelineItem) AddUrl(itemUrl *url.URL) int
- func (i *PipelineItem) AddUrlString(itemUrlString string) (int, error)
- func (i *PipelineItem) GetDate() time.Time
- func (i *PipelineItem) GetDescription() string
- func (i *PipelineItem) GetInputGenericId() string
- func (i *PipelineItem) GetName() string
- func (i *PipelineItem) GetPayload(payloadId string) (interface{}, error)
- func (i *PipelineItem) GetUrl(index int) (*url.URL, error)
- func (i *PipelineItem) SetDate(itemDate time.Time)
- func (i *PipelineItem) SetDescription(itemDescription string)
- func (i *PipelineItem) SetName(itemName string)
- func (i *PipelineItem) String() string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type PayloadMap ¶
type PayloadMap map[string]interface{}
PayloadMap is a container for module-specific data that can be added to a PipelineItem while it traverses the pipeline.
type PipelineItem ¶
type PipelineItem struct {
// contains filtered or unexported fields
}
PipelineItem represents an item that is traversing the pipeline.
func NewPipelineItem ¶
func NewPipelineItem(inputGenericId string) *PipelineItem
NewPipelineItem creates a new item with the given inputGenericId (i.e. the generic id of the plugin that inserted it in the pipeline). The returned PipelineItem has all fields initialized with default values.
func (*PipelineItem) AddPayload ¶
func (i *PipelineItem) AddPayload(payloadId string, payload interface{}) error
AddPayload adds the given payload and associates it with the given payloadId. It returns a nil error in case of success or a non-nil error otherwise.
func (*PipelineItem) AddUrl ¶
func (i *PipelineItem) AddUrl(itemUrl *url.URL) int
AddUrl adds the given URL pointer to the list of URLs associated with this item, returning the index of the item just added.
func (*PipelineItem) AddUrlString ¶
func (i *PipelineItem) AddUrlString(itemUrlString string) (int, error)
AddUrlString parses the given string as a URL and returns the index for the item just added and a nil error in case of success or a non-nil error in case of failure.
func (*PipelineItem) GetDate ¶
func (i *PipelineItem) GetDate() time.Time
GetDate returns the date for this item.
func (*PipelineItem) GetDescription ¶
func (i *PipelineItem) GetDescription() string
GetDescription returns the description for this item.
func (*PipelineItem) GetInputGenericId ¶
func (i *PipelineItem) GetInputGenericId() string
GetInputGenericId returns the generic id for the input that created this item.
func (*PipelineItem) GetName ¶
func (i *PipelineItem) GetName() string
GetName returns the name for this item.
func (*PipelineItem) GetPayload ¶
func (i *PipelineItem) GetPayload(payloadId string) (interface{}, error)
GetPayload returns the payload associated with the given payloadId on success or a non-nil error in the case of failure.
func (*PipelineItem) GetUrl ¶
func (i *PipelineItem) GetUrl(index int) (*url.URL, error)
GetUrl returns the URL at given index, or an error in case the index is not valid.
func (*PipelineItem) SetDate ¶
func (i *PipelineItem) SetDate(itemDate time.Time)
SetDate sets the date for the item.
func (*PipelineItem) SetDescription ¶
func (i *PipelineItem) SetDescription(itemDescription string)
SetDescription sets the description for the item.
func (*PipelineItem) SetName ¶
func (i *PipelineItem) SetName(itemName string)
SetName sets the name for the item.
func (*PipelineItem) String ¶
func (i *PipelineItem) String() string
String returns a string representation of the item. This satisfies the fmt.Stringer interface.