Documentation ¶
Index ¶
- Constants
- func AsProtobufMessage(source interface{}, state data.Map, target proto.Message) (interface{}, error)
- func DateOfBirth(source interface{}, state data.Map) (interface{}, error)
- func FromProtobufMessage(source interface{}, state data.Map, sourceMessage proto.Message) (interface{}, error)
- func GZipContentCorrupter(source interface{}, state data.Map) (interface{}, error)
- func GZipper(source interface{}, state data.Map) (interface{}, error)
- func Hostname(source interface{}, state data.Map) (interface{}, error)
- func LoadData(source interface{}, state data.Map) (interface{}, error)
- func New() endly.Service
- func NewAvroReader(source interface{}, state data.Map) (interface{}, error)
- func NewAvroWriter(args ...interface{}) (func(source interface{}, state data.Map) (interface{}, error), error)
- func NewCsvReader(args ...interface{}) (func(source interface{}, state data.Map) (interface{}, error), error)
- func NewProtoReader(args ...interface{}) (func(source interface{}, state data.Map) (interface{}, error), error)
- func NewProtoWriter(args ...interface{}) (func(source interface{}, state data.Map) (interface{}, error), error)
- func RegisterProviders(providers []*endly.UdfProvider) error
- func TransformWithUDF(context *endly.Context, udfName, source string, payload interface{}) (interface{}, error)
- func URLJoin(source interface{}, state data.Map) (interface{}, error)
- func URLPath(source interface{}, state data.Map) (interface{}, error)
- type ProtoCodec
- type RegisterRequest
- type RegisterResponse
Constants ¶
const (
//ServiceID represents UDF service id.
ServiceID = "udf"
)
Variables ¶
This section is empty.
Functions ¶
func AsProtobufMessage ¶
func AsProtobufMessage(source interface{}, state data.Map, target proto.Message) (interface{}, error)
AsProtobufMessage generic method for converting a map, or json string into a proto message
func DateOfBirth ¶
DateOfBirth returns formatted date of birth, it take desired age, [month], [day], [timeformat]
func FromProtobufMessage ¶
func FromProtobufMessage(source interface{}, state data.Map, sourceMessage proto.Message) (interface{}, error)
FromProtobufMessage generic method for converting a proto message into a map
func GZipContentCorrupter ¶
GZipContentCorrupter corrupt zip content modifier
func NewAvroReader ¶
NewAvroReader creates a new avro reader UDFs
func NewAvroWriter ¶
func NewAvroWriter(args ...interface{}) (func(source interface{}, state data.Map) (interface{}, error), error)
NewAvroWriter creates a new avro writer provider
func NewCsvReader ¶
func NewProtoReader ¶
func NewProtoReader(args ...interface{}) (func(source interface{}, state data.Map) (interface{}, error), error)
NewProtoWriter creates a new proto writer provider
func NewProtoWriter ¶
func NewProtoWriter(args ...interface{}) (func(source interface{}, state data.Map) (interface{}, error), error)
NewProtoWriter creates a new proto writer provider
func RegisterProviders ¶
func RegisterProviders(providers []*endly.UdfProvider) error
RegisterProviders register the supplied providers
func TransformWithUDF ¶
func TransformWithUDF(context *endly.Context, udfName, source string, payload interface{}) (interface{}, error)
TransformWithUDF transform payload with provided UDFs name.
Types ¶
type ProtoCodec ¶
type ProtoCodec struct {
// contains filtered or unexported fields
}
ProtoCodec represent a proto codec
func NewProtoCodec ¶
func NewProtoCodec(schemaFile, importPath string, msgType string, lowercaseKey bool) (*ProtoCodec, error)
NewProtoCodec creates a new protobuf codec
type RegisterRequest ¶
type RegisterRequest struct {
UDFs []*endly.UdfProvider `description:"collection of predefined udf provider name with custom parameters and new registration id"`
}
RegisterRequest represents a register udf request
func NewRegisterRequestFromURL ¶
func NewRegisterRequestFromURL(URL string) (*RegisterRequest, error)
type RegisterResponse ¶
type RegisterResponse struct{}
RegisterRequest represents a register response