func main() { apex.HandleFunc(func(event json.RawMessage, ctx *apex.Context) (interface{}, error) { log.Println(string(event)) var params proxy.Params if err := json.Unmarshal(event, ¶ms); err != nil { return nil, err } if err := proxy.Process(event, params.Body); err != nil { return nil, err } if err := s3.Upload(event, params.Account); err != nil { return nil, err } return nil, errors.New("Upload to S3 - OK. Proxy Request - OK") }) }
func Example() { apex.HandleFunc(func(event json.RawMessage, ctx *apex.Context) (interface{}, error) { return &Message{"world"}, nil }) }
func main() { apex.HandleFunc(func(event json.RawMessage, ctx *apex.Context) (interface{}, error) { return &Message{"bar"}, nil }) }