aperdeen

command module
v0.0.0-...-8d6a06f Latest Latest
Warning

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

Go to latest
Published: Jan 24, 2018 License: MIT Imports: 1 Imported by: 0

README

Aperdeen

Build Status codecov

Amazon API Gateway client and local proxy

Commands

aperdeen endpoints APINAME

List API endpoints

$ aperdeen endpoints dtan4
PATH                              ENDPOINT
/dtan4/*  https://terraforming.dtan4.net/*
/foobar/* arn:aws:apigateway:ap-northeast-1:lambda:path/2015-03-31/functions/arn:aws:lambda:ap-northeast-1:012345678912:function:api-backend/invocations
aperdeen export APINAME

Export API endpoints to YAML

$ aperdeen export dtan4
name: dtan4
endpoints:
  /dtan4/*:
    url: http://terraforming.dtan4.net/*
  /foobar/*:
    url: arn:aws:apigateway:ap-northeast-1:lambda:path/2015-03-31/functions/arn:aws:lambda:ap-northeast-1:012345678912:function:api-backend/invocations
aperdeen local -f YAML

Start local API Gateway

$ aperdeen local -f api.yaml
server started at :8080 ...

# on another session
$ curl -sL localhost:8080/dtan4/ | head
<!DOCTYPE html>
<html>
  <head>
    <meta http-equiv="Content-type" content="text/html; charset=utf-8">
    <meta http-equiv="Content-Security-Policy" content="default-src 'none'; style-src 'unsafe-inline'; img-src data:; connect-src 'self'">
    <title>Site not found &middot; GitHub Pages</title>
    <style type="text/css" media="screen">
      body {
        background-color: #f1f1f1;
        margin: 0;

Aperdeen YAML

name: dtan4
endpoints:
  /dtan4/*:
    url: http://terraforming.dtan4.net/*
  /foobar/*:
    url: arn:aws:apigateway:ap-northeast-1:lambda:path/2015-03-31/functions/arn:aws:lambda:ap-northeast-1:012345678912:function:api-backend/invocations

Author

Daisuke Fujita (@dtan4)

License

MIT License

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
service
aws
aws/apigateway
Package apigateway is a generated GoMock package.
Package apigateway is a generated GoMock package.
aws/apimock
Package apimock is a generated GoMock package.
Package apimock is a generated GoMock package.

Jump to

Keyboard shortcuts

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