Documentation ¶
Index ¶
- func RegisterConnector(name string, callback func(*ExchangeMessage, URI, ...interface{}) error)
- type Choice
- type ExchangeMessage
- func (e *ExchangeMessage) BindJSON(v interface{}) error
- func (e *ExchangeMessage) BindXML(v interface{}) error
- func (e *ExchangeMessage) ClearHeader()
- func (e *ExchangeMessage) DelHeader(k string)
- func (e *ExchangeMessage) GetBody() interface{}
- func (e *ExchangeMessage) GetHeader(k string) string
- func (e *ExchangeMessage) GetHeaderMap() HeaderMap
- func (e *ExchangeMessage) SetBody(b interface{})
- func (e *ExchangeMessage) SetHeader(k, v string)
- func (e *ExchangeMessage) WriteJSON(v interface{}) error
- func (e *ExchangeMessage) WriteXML(v interface{}) error
- type Flow
- func (p *Flow) Choice() *Choice
- func (p *Flow) From(url string, params ...interface{}) *Flow
- func (p *Flow) GetBody() interface{}
- func (p *Flow) GetHeader() HeaderMap
- func (p *Flow) SetBody(b interface{}) *Flow
- func (p *Flow) SetHeader(k, v string) *Flow
- func (p *Flow) To(url string, params ...interface{}) *Flow
- type HeaderFnc
- type HeaderMap
- type Message
- type PipeProcessor
- type Stack
- type Transform
- type URI
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RegisterConnector ¶
func RegisterConnector(name string, callback func(*ExchangeMessage, URI, ...interface{}) error)
RegisterConnector register a new Connector to use as From("my-connector://...")
Types ¶
type Choice ¶
type Choice struct {
// contains filtered or unexported fields
}
Choice is the type for conditional structure of a Pipe
type ExchangeMessage ¶
type ExchangeMessage struct {
// contains filtered or unexported fields
}
ExchangeMessage is the message exchange inner Pipe
func NewExchangeMessage ¶
func NewExchangeMessage() *ExchangeMessage
NewExchangeMessage creates new empty ExchangeMessage
func (*ExchangeMessage) BindJSON ¶
func (e *ExchangeMessage) BindJSON(v interface{}) error
BindJSON binds json body to interface
func (*ExchangeMessage) BindXML ¶
func (e *ExchangeMessage) BindXML(v interface{}) error
BindXML binds xml body to interface
func (*ExchangeMessage) ClearHeader ¶
func (e *ExchangeMessage) ClearHeader()
ClearHeader removes all entries from header
func (*ExchangeMessage) DelHeader ¶
func (e *ExchangeMessage) DelHeader(k string)
DelHeader delete header from message
func (*ExchangeMessage) GetBody ¶
func (e *ExchangeMessage) GetBody() interface{}
GetBody return body from message
func (*ExchangeMessage) GetHeader ¶
func (e *ExchangeMessage) GetHeader(k string) string
GetHeader returns a header value based on key
func (*ExchangeMessage) GetHeaderMap ¶
func (e *ExchangeMessage) GetHeaderMap() HeaderMap
GetHeaderMap return the map from header
func (*ExchangeMessage) SetBody ¶
func (e *ExchangeMessage) SetBody(b interface{})
SetBody writes the body to message
func (*ExchangeMessage) SetHeader ¶
func (e *ExchangeMessage) SetHeader(k, v string)
SetHeader add a key-value header to a message
func (*ExchangeMessage) WriteJSON ¶
func (e *ExchangeMessage) WriteJSON(v interface{}) error
WriteJSON marshall interface to JSON and set body
func (*ExchangeMessage) WriteXML ¶
func (e *ExchangeMessage) WriteXML(v interface{}) error
WriteXML marshall interface to XML and set body
type Flow ¶ added in v0.3.0
type Flow struct {
// contains filtered or unexported fields
}
Flow is the main data structure of Flow Pipe controls all the execution flow
func (*Flow) From ¶ added in v0.3.0
From is the entrypoint of a flow, all flows need to be started with From
type HeaderFnc ¶
HeaderFnc is a type to execute logical conditions from head values
type PipeProcessor ¶
type PipeProcessor func(*ExchangeMessage, Message, func())
PipeProcessor is a function type to execute pipe workflow
type Transform ¶
type Transform string
Transform date from template to other