github.com/jalateras/up@v0.1.5/CONTRIBUTING.md (about)

     1  
     2  # Contributing
     3  
     4  Before contributing to Up you'll need a few things:
     5  
     6  - Install [Golang 1.9](https://golang.org/dl/) for that Go thing if you don't have it
     7  - Install [GIT LFS](https://git-lfs.github.com/) for large file management
     8  - Install [golang/dep](https://github.com/golang/dep) for dependency management
     9  
    10  The following are optional:
    11  
    12  - Install [pointlander/peg](https://github.com/pointlander/peg) if you're working on the log grammar
    13  - Install [jteeuwen/go-bindata](https://github.com/jteeuwen/go-bindata) if you need to bake `up-proxy` into `up`
    14  
    15  ## Setup
    16  
    17  Grab Up:
    18  
    19  ```
    20  $ go get github.com/apex/up
    21  ```
    22  
    23  Change into the project:
    24  
    25  ```
    26  $ cd $GOPATH/src/github.com/apex/up
    27  ```
    28  
    29  Grab the dependencies:
    30  
    31  ```
    32  $ dep ensure
    33  ```
    34  
    35  ## Testing
    36  
    37  ```
    38  $ make test
    39  ```
    40  
    41  ## Layout
    42  
    43  Although Up is not provided as a library it is structured as if it was, for organizational purposes. The project layout is loosely:
    44  
    45  - *.go – Primary API
    46  - [reporter](reporter) – Event based CLI reporting
    47  - [platform](platform) – Platform specifics (AWS Lambda, Azure, Google, etc)
    48  - [internal](internal) – Internal utilities and lower level tooling
    49  - [http](http) – HTTP middleware for up-proxy
    50  - [handler](handler) – HTTP middleware aggregate, effectively the entire proxy
    51  - [docs](docs) – Documentation used to generate the static site
    52  - [config](config) – Configuration structures and validation for `up.json`
    53  - [cmd](cmd) – Commands, where `up` is the CLI and `up-proxy` is serving requests in production
    54  
    55  Note that this is just a first past, and the code / layout will be refactored. View [Godoc](http://godoc.org/github.com/apex/up) for more details of the internals.
    56  
    57  ## Proxy
    58  
    59  One oddity is that the `up-proxy` is baked into `up`. Yes there's a binary within the binary :) – this is so `up` can inject the proxy before deploying your function to Lambda.
    60  
    61  The proxy accepts AWS Lambda events from API Gateway, translates them to HTTP, and sends a request to your application, then translates it back to an event that API Gateway understands.
    62  
    63  Reverse proxy features such as URL rewriting, gzip compression, script injection, error pages and others are also provided in `up-proxy`.