handlers

package
v1.0.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 24, 2017 License: MIT Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Handle

func Handle(w http.ResponseWriter, req *http.Request)

Handle CSV filter handler. Get the requested file from AWS S3, filter it to a temporary file, upload the temporary file to the filter bucket, send a message to request the file is transformed..

func SetProducer

func SetProducer(p sarama.SyncProducer)

func WriteResponse

func WriteResponse(w http.ResponseWriter, value interface{}, status int)

Types

type FilterFunc

type FilterFunc func(event.FilterRequest) FilterResponse

FilterFunc defines a function (implemented by HandleRequest) that performs the filtering requested in a FilterRequest

type FilterResponse

type FilterResponse struct {
	Message string `json:"message,omitempty"`
}

FilterResponse struct defines the response for the /filter API.

func HandleRequest

func HandleRequest(filterRequest event.FilterRequest) (resp FilterResponse)

Performs the filtering as specified in the FilterRequest, returning a FilterResponse

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL