├── cmd ├── convox │ ├── .gitignore │ ├── .dockerignore │ ├── templates │ │ └── init │ │ │ ├── unknown │ │ │ ├── .dockerignore │ │ │ ├── Dockerfile │ │ │ └── docker-compose.yml │ │ │ ├── ruby │ │ │ ├── .dockerignore │ │ │ ├── docker-compose.yml │ │ │ └── Dockerfile │ │ │ ├── django │ │ │ ├── .dockerignore │ │ │ ├── docker-compose.yml │ │ │ └── Dockerfile │ │ │ ├── sinatra │ │ │ ├── .dockerignore │ │ │ ├── docker-compose.yml │ │ │ └── Dockerfile │ │ │ └── rails │ │ │ ├── .dockerignore │ │ │ ├── docker-compose.yml │ │ │ └── Dockerfile │ ├── README.md │ ├── stdcli │ │ ├── default.go │ │ ├── time.go │ │ ├── info.go │ │ ├── table_test.go │ │ └── stdcli_test.go │ ├── flags.go │ ├── Makefile │ ├── helpers.go │ ├── api_test.go │ ├── deploy_test.go │ └── main_test.go ├── crypt │ ├── .dockerignore │ ├── .gitignore │ ├── eg │ │ └── env │ ├── Makefile │ ├── Dockerfile │ └── README.md ├── changes │ ├── .gitignore │ └── main.go └── Makefile ├── api ├── .gitignore ├── .dockerignore ├── models │ ├── fixtures │ │ ├── .gitignore │ │ ├── command_string_form.yml │ │ ├── command_exec_form.yml │ │ ├── environment_map.yml │ │ ├── web_external_internal.yml │ │ ├── extra_hosts.yml │ │ ├── complex_environment.yml │ │ ├── balancer_labels.yml │ │ ├── custom_health.yml │ │ ├── multi_balancer.yml │ │ ├── cron_labels.yml │ │ ├── web_redis.yml │ │ ├── Makefile │ │ ├── web_postgis_internal.yml │ │ ├── worker.yml │ │ └── web_postgis.yml │ └── models_test.go ├── structs │ ├── object.go │ ├── provider.go │ ├── options.go │ ├── index.go │ ├── system.go │ ├── registry.go │ ├── formation.go │ ├── capacity.go │ ├── event.go │ ├── service.go │ ├── certificate.go │ └── release.go ├── awsutil │ └── Readme.md ├── cmd │ ├── build │ │ ├── Dockerfile │ │ ├── helpers.go │ │ └── source │ │ │ ├── source.go │ │ │ └── index.go │ └── monitor │ │ └── main.go ├── controllers │ ├── controllers_test.go │ ├── auth.go │ ├── switch.go │ ├── racks.go │ └── utility.go ├── bin │ ├── monitor │ ├── web │ └── gen-cert ├── workers │ └── helpers.go ├── main.go ├── Makefile ├── LICENSE └── crypt │ └── credentials.go ├── .gitignore ├── manifest ├── fixtures │ ├── v1.yml │ ├── bad-v1.yml │ ├── badport1.yml │ ├── command-string.yml │ ├── badport2.yml │ ├── badport3.yml │ ├── command-array.yml │ ├── badport4.yml │ ├── idle-timeout-unset.yml │ ├── v2-number.yml │ ├── v2-string.yml │ ├── port-conflicts.yml │ ├── unknown-version.yml │ ├── underscore_service.yml │ ├── bad-v2.yml │ ├── invalid-memory-below-minimum.yml │ ├── idle-timeout-set.yml │ ├── double-dockerfile.yml │ ├── repeat-image.yml │ ├── marshal.yml │ ├── shift.yml │ ├── balancer.yml │ ├── interpolate-env-var.yml │ ├── repeat-simple.yml │ ├── runorder.yml │ ├── balancer-secure.yml │ ├── invalid-cron.yml │ ├── invalid-health-timeout.yml │ ├── balancer-labels.yml │ ├── invalid-link-no-ports.yml │ ├── invalid-link.yml │ ├── full-v1.yml │ ├── networks.yml │ ├── full-v2.yml │ └── specific-service.yml ├── util.go └── push.go ├── vendor ├── golang.org │ └── x │ │ ├── sys │ │ └── unix │ │ │ ├── .gitignore │ │ │ ├── asm.s │ │ │ ├── constants.go │ │ │ ├── syscall_no_getwd.go │ │ │ ├── zsysnum_solaris_amd64.go │ │ │ ├── env_unset.go │ │ │ ├── flock_linux_32bit.go │ │ │ ├── asm_solaris_amd64.s │ │ │ ├── gccgo_linux_amd64.go │ │ │ ├── race0.go │ │ │ ├── env_unix.go │ │ │ ├── asm_linux_arm64.s │ │ │ ├── str.go │ │ │ ├── race.go │ │ │ ├── asm_linux_ppc64x.s │ │ │ ├── asm_linux_arm.s │ │ │ ├── asm_linux_mips64x.s │ │ │ ├── asm_freebsd_arm.s │ │ │ ├── asm_netbsd_arm.s │ │ │ ├── asm_darwin_386.s │ │ │ ├── asm_freebsd_386.s │ │ │ ├── asm_netbsd_386.s │ │ │ ├── asm_openbsd_386.s │ │ │ ├── asm_darwin_amd64.s │ │ │ ├── asm_dragonfly_386.s │ │ │ ├── asm_freebsd_amd64.s │ │ │ ├── asm_linux_amd64.s │ │ │ ├── asm_netbsd_amd64.s │ │ │ ├── asm_openbsd_amd64.s │ │ │ ├── asm_dragonfly_amd64.s │ │ │ ├── asm_darwin_arm.s │ │ │ ├── asm_darwin_arm64.s │ │ │ └── flock.go │ │ ├── crypto │ │ ├── ssh │ │ │ ├── terminal │ │ │ │ ├── util_bsd.go │ │ │ │ └── util_linux.go │ │ │ └── doc.go │ │ ├── curve25519 │ │ │ └── const_amd64.s │ │ ├── poly1305 │ │ │ ├── sum_amd64.go │ │ │ └── sum_arm.go │ │ └── salsa20 │ │ │ └── salsa │ │ │ └── salsa20_amd64.go │ │ └── net │ │ └── context │ │ └── ctxhttp │ │ ├── cancelreq.go │ │ └── cancelreq_go14.go ├── github.com │ ├── Sirupsen │ │ └── logrus │ │ │ ├── .gitignore │ │ │ ├── .travis.yml │ │ │ ├── terminal_bsd.go │ │ │ ├── terminal_solaris.go │ │ │ ├── terminal_linux.go │ │ │ ├── terminal_notwindows.go │ │ │ ├── doc.go │ │ │ ├── writer.go │ │ │ └── terminal_windows.go │ ├── robfig │ │ └── cron │ │ │ ├── .travis.yml │ │ │ ├── README.md │ │ │ └── .gitignore │ ├── stvp │ │ └── rollbar │ │ │ └── .gitignore │ ├── fatih │ │ └── color │ │ │ └── .travis.yml │ ├── jasonmoo │ │ └── lambda_proc │ │ │ └── .gitignore │ ├── dustin │ │ └── go-humanize │ │ │ ├── .gitignore │ │ │ ├── humanize.go │ │ │ ├── ordinals.go │ │ │ ├── ftoa.go │ │ │ └── big.go │ ├── fsouza │ │ └── go-dockerclient │ │ │ ├── .gitignore │ │ │ ├── DOCKER-LICENSE │ │ │ └── Makefile │ ├── jehiah │ │ └── go-strftime │ │ │ ├── README.md │ │ │ └── .gitignore │ ├── jmespath │ │ └── go-jmespath │ │ │ ├── .gitignore │ │ │ ├── .travis.yml │ │ │ ├── README.md │ │ │ ├── LICENSE │ │ │ ├── toktype_string.go │ │ │ └── astnodetype_string.go │ ├── mattn │ │ └── go-isatty │ │ │ ├── doc.go │ │ │ ├── isatty_linux.go │ │ │ ├── isatty_bsd.go │ │ │ ├── isatty_windows.go │ │ │ └── README.md │ ├── fluent │ │ └── fluent-logger-golang │ │ │ └── fluent │ │ │ ├── version.go │ │ │ └── proto.go │ ├── gorilla │ │ ├── context │ │ │ ├── .travis.yml │ │ │ └── README.md │ │ └── mux │ │ │ ├── .travis.yml │ │ │ └── README.md │ ├── cheggaaa │ │ └── pb │ │ │ ├── .travis.yml │ │ │ ├── pb_solaris.go │ │ │ ├── pb_nix.go │ │ │ ├── termios_nix.go │ │ │ ├── termios_bsd.go │ │ │ ├── reader.go │ │ │ ├── pb_appengine.go │ │ │ └── runecount.go │ ├── docker │ │ ├── docker │ │ │ ├── pkg │ │ │ │ ├── archive │ │ │ │ │ ├── README.md │ │ │ │ │ ├── copy_windows.go │ │ │ │ │ ├── copy_unix.go │ │ │ │ │ ├── time_unsupported.go │ │ │ │ │ ├── time_linux.go │ │ │ │ │ └── changes_windows.go │ │ │ │ ├── ioutils │ │ │ │ │ ├── scheduler.go │ │ │ │ │ ├── temp_unix.go │ │ │ │ │ ├── scheduler_gccgo.go │ │ │ │ │ ├── temp_windows.go │ │ │ │ │ └── fmt.go │ │ │ │ ├── fileutils │ │ │ │ │ ├── fileutils_windows.go │ │ │ │ │ └── fileutils_unix.go │ │ │ │ ├── system │ │ │ │ │ ├── utimes_darwin.go │ │ │ │ │ ├── meminfo_unsupported.go │ │ │ │ │ ├── errors.go │ │ │ │ │ ├── path_windows.go │ │ │ │ │ ├── umask_windows.go │ │ │ │ │ ├── syscall_unix.go │ │ │ │ │ ├── umask.go │ │ │ │ │ ├── path_unix.go │ │ │ │ │ ├── utimes_unsupported.go │ │ │ │ │ ├── chtimes_unix.go │ │ │ │ │ ├── mknod_windows.go │ │ │ │ │ ├── stat_solaris.go │ │ │ │ │ ├── stat_unsupported.go │ │ │ │ │ ├── xattrs_unsupported.go │ │ │ │ │ ├── lstat.go │ │ │ │ │ ├── meminfo.go │ │ │ │ │ ├── filesys.go │ │ │ │ │ ├── lstat_windows.go │ │ │ │ │ ├── utimes_freebsd.go │ │ │ │ │ ├── stat_freebsd.go │ │ │ │ │ ├── chtimes_windows.go │ │ │ │ │ ├── utimes_linux.go │ │ │ │ │ ├── mknod.go │ │ │ │ │ └── stat_linux.go │ │ │ │ ├── promise │ │ │ │ │ └── promise.go │ │ │ │ ├── idtools │ │ │ │ │ ├── usergroupadd_unsupported.go │ │ │ │ │ └── idtools_windows.go │ │ │ │ └── longpath │ │ │ │ │ └── longpath.go │ │ │ ├── opts │ │ │ │ ├── hosts_windows.go │ │ │ │ ├── opts_unix.go │ │ │ │ └── hosts_unix.go │ │ │ └── NOTICE │ │ ├── go-units │ │ │ ├── circle.yml │ │ │ ├── README.md │ │ │ └── MAINTAINERS │ │ └── engine-api │ │ │ └── types │ │ │ └── swarm │ │ │ ├── common.go │ │ │ └── container.go │ ├── stretchr │ │ ├── objx │ │ │ ├── README.md │ │ │ ├── security.go │ │ │ ├── .gitignore │ │ │ ├── constants.go │ │ │ └── tests.go │ │ └── testify │ │ │ ├── require │ │ │ ├── require_forward.go.tmpl │ │ │ ├── require.go.tmpl │ │ │ ├── requirements.go │ │ │ └── forward_requirements.go │ │ │ └── assert │ │ │ ├── assertion_forward.go.tmpl │ │ │ ├── errors.go │ │ │ └── forward_assertions.go │ ├── go-ini │ │ └── ini │ │ │ └── .gitignore │ ├── philhofer │ │ └── fwd │ │ │ ├── writer_appengine.go │ │ │ └── writer_unsafe.go │ ├── segmentio │ │ └── analytics-go │ │ │ ├── Makefile │ │ │ ├── circle.yml │ │ │ └── Readme.md │ ├── opencontainers │ │ └── runc │ │ │ ├── libcontainer │ │ │ └── user │ │ │ │ ├── MAINTAINERS │ │ │ │ ├── lookup_unsupported.go │ │ │ │ └── lookup_unix.go │ │ │ └── NOTICE │ ├── aws │ │ └── aws-sdk-go │ │ │ ├── NOTICE.txt │ │ │ ├── service │ │ │ ├── s3 │ │ │ │ ├── platform_handlers.go │ │ │ │ └── platform_handlers_go1.6.go │ │ │ ├── sqs │ │ │ │ └── customizations.go │ │ │ ├── sts │ │ │ │ └── customizations.go │ │ │ ├── kinesis │ │ │ │ └── waiters.go │ │ │ └── cloudwatch │ │ │ │ └── waiters.go │ │ │ ├── aws │ │ │ ├── version.go │ │ │ ├── credentials │ │ │ │ └── example.ini │ │ │ ├── client │ │ │ │ └── metadata │ │ │ │ │ └── client_info.go │ │ │ ├── errors.go │ │ │ ├── corehandlers │ │ │ │ └── param_validator.go │ │ │ └── request │ │ │ │ ├── http_request_1_4.go │ │ │ │ └── http_request.go │ │ │ ├── private │ │ │ ├── model │ │ │ │ └── api │ │ │ │ │ └── exportable_name.go │ │ │ ├── util │ │ │ │ └── sort_keys.go │ │ │ └── protocol │ │ │ │ └── unmarshal.go │ │ │ └── awstesting │ │ │ └── client.go │ ├── equinox-io │ │ └── equinox │ │ │ └── internal │ │ │ ├── go-update │ │ │ ├── hide_noop.go │ │ │ ├── internal │ │ │ │ ├── binarydist │ │ │ │ │ ├── Readme.md │ │ │ │ │ └── doc.go │ │ │ │ └── osext │ │ │ │ │ ├── osext_plan9.go │ │ │ │ │ ├── README.md │ │ │ │ │ └── osext.go │ │ │ ├── hide_windows.go │ │ │ ├── LICENSE │ │ │ └── patcher.go │ │ │ └── osext │ │ │ ├── osext_plan9.go │ │ │ ├── README.md │ │ │ └── osext.go │ ├── convox │ │ ├── logger │ │ │ └── .travis.yml │ │ ├── nlogger │ │ │ └── README.md │ │ └── version │ │ │ └── Readme.md │ ├── ddollar │ │ └── logger │ │ │ └── .travis.yml │ ├── xtgo │ │ └── uuid │ │ │ └── AUTHORS │ ├── briandowns │ │ └── spinner │ │ │ ├── .travis.yml │ │ │ ├── CONTRIBUTING │ │ │ ├── state_string.go │ │ │ └── .gitignore │ ├── tinylib │ │ └── msgp │ │ │ └── msgp │ │ │ ├── appengine.go │ │ │ ├── advise_other.go │ │ │ ├── advise_linux.go │ │ │ └── size.go │ ├── shiena │ │ └── ansicolor │ │ │ ├── .gitignore │ │ │ └── ansicolor_ansi.go │ ├── mitchellh │ │ └── go-homedir │ │ │ └── README.md │ ├── davecgh │ │ └── go-spew │ │ │ └── LICENSE │ └── codegangsta │ │ └── negroni │ │ ├── doc.go │ │ └── logger.go └── gopkg.in │ └── urfave │ └── cli.v1 │ ├── appveyor.yml │ ├── .travis.yml │ └── cli.go ├── provider ├── aws │ ├── lambda │ │ ├── fluentd │ │ │ ├── .gitignore │ │ │ ├── vendor │ │ │ │ └── github.com │ │ │ │ │ ├── fluent │ │ │ │ │ └── fluent-logger-golang │ │ │ │ │ │ └── fluent │ │ │ │ │ │ ├── version.go │ │ │ │ │ │ └── proto.go │ │ │ │ │ ├── philhofer │ │ │ │ │ └── fwd │ │ │ │ │ │ ├── writer_appengine.go │ │ │ │ │ │ └── writer_unsafe.go │ │ │ │ │ └── tinylib │ │ │ │ │ └── msgp │ │ │ │ │ └── msgp │ │ │ │ │ ├── appengine.go │ │ │ │ │ ├── advise_other.go │ │ │ │ │ └── advise_linux.go │ │ │ ├── vendor-log │ │ │ ├── Makefile │ │ │ ├── LICENSE │ │ │ └── README.md │ │ ├── formation │ │ │ ├── .gitignore │ │ │ ├── .dockerignore │ │ │ ├── data │ │ │ │ ├── role-policy.json │ │ │ │ └── role-assume.json │ │ │ ├── Makefile │ │ │ ├── index.js │ │ │ └── main.go │ │ └── lifecycle │ │ │ ├── .gitignore │ │ │ ├── .dockerignore │ │ │ ├── bin │ │ │ ├── upload │ │ │ └── test │ │ │ ├── Makefile │ │ │ └── index.js │ ├── error_test.go │ ├── docker_test.go │ ├── Makefile │ ├── error.go │ └── docker.go ├── Makefile └── error.go ├── .hound.yml ├── REGIONS ├── Godeps └── Readme ├── ci ├── release.sh ├── uninstall.sh ├── install.sh ├── tests │ └── example-apps ├── dependencies-pre.sh └── region.sh ├── .dockerignore ├── test ├── run.go └── error.go ├── changes ├── watch.go └── cmd │ └── changed │ └── main.go ├── client ├── proxy.go ├── token.go ├── notify_event.go ├── parameters.go ├── auth.go ├── progress.go ├── error.go ├── links.go └── racks.go ├── sync └── Makefile ├── bin ├── export-env ├── test └── current-ecs-amis ├── LICENSE ├── Dockerfile └── Makefile /cmd/convox/.gitignore: -------------------------------------------------------------------------------- 1 | /convox 2 | -------------------------------------------------------------------------------- /cmd/crypt/.dockerignore: -------------------------------------------------------------------------------- 1 | .env 2 | -------------------------------------------------------------------------------- /api/.gitignore: -------------------------------------------------------------------------------- 1 | /api 2 | /monitor 3 | -------------------------------------------------------------------------------- /cmd/changes/.gitignore: -------------------------------------------------------------------------------- 1 | /changes 2 | -------------------------------------------------------------------------------- /api/.dockerignore: -------------------------------------------------------------------------------- 1 | /api 2 | /monitor 3 | -------------------------------------------------------------------------------- /api/models/fixtures/.gitignore: -------------------------------------------------------------------------------- 1 | /fixture 2 | -------------------------------------------------------------------------------- /cmd/convox/.dockerignore: -------------------------------------------------------------------------------- 1 | .equinox.yaml 2 | -------------------------------------------------------------------------------- /cmd/crypt/.gitignore: -------------------------------------------------------------------------------- 1 | .env 2 | /crypt 3 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .env 2 | coverage.txt 3 | profile.out 4 | -------------------------------------------------------------------------------- /manifest/fixtures/v1.yml: -------------------------------------------------------------------------------- 1 | web: 2 | image: test 3 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/.gitignore: -------------------------------------------------------------------------------- 1 | _obj/ 2 | -------------------------------------------------------------------------------- /vendor/github.com/Sirupsen/logrus/.gitignore: -------------------------------------------------------------------------------- 1 | logrus 2 | -------------------------------------------------------------------------------- /vendor/github.com/robfig/cron/.travis.yml: -------------------------------------------------------------------------------- 1 | language: go 2 | -------------------------------------------------------------------------------- /vendor/github.com/stvp/rollbar/.gitignore: -------------------------------------------------------------------------------- 1 | rollbar.test 2 | -------------------------------------------------------------------------------- /cmd/convox/templates/init/unknown/.dockerignore: -------------------------------------------------------------------------------- 1 | .env 2 | .git 3 | -------------------------------------------------------------------------------- /manifest/fixtures/bad-v1.yml: -------------------------------------------------------------------------------- 1 | web: 2 | ports: 3 | foo: bar 4 | -------------------------------------------------------------------------------- /manifest/fixtures/badport1.yml: -------------------------------------------------------------------------------- 1 | web: 2 | ports: 3 | - 534a 4 | -------------------------------------------------------------------------------- /manifest/fixtures/command-string.yml: -------------------------------------------------------------------------------- 1 | web: 2 | command: ls -la 3 | -------------------------------------------------------------------------------- /provider/aws/lambda/fluentd/.gitignore: -------------------------------------------------------------------------------- 1 | /lambda.zip 2 | /main 3 | -------------------------------------------------------------------------------- /provider/aws/lambda/formation/.gitignore: -------------------------------------------------------------------------------- 1 | /main 2 | /lambda.zip 3 | -------------------------------------------------------------------------------- /provider/aws/lambda/lifecycle/.gitignore: -------------------------------------------------------------------------------- 1 | /main 2 | /lambda.zip 3 | -------------------------------------------------------------------------------- /.hound.yml: -------------------------------------------------------------------------------- 1 | fail_on_violations: true 2 | 3 | go: 4 | enabled: true 5 | -------------------------------------------------------------------------------- /manifest/fixtures/badport2.yml: -------------------------------------------------------------------------------- 1 | web: 2 | ports: 3 | - 534b:5000 4 | -------------------------------------------------------------------------------- /manifest/fixtures/badport3.yml: -------------------------------------------------------------------------------- 1 | web: 2 | ports: 3 | - 5000:534c 4 | -------------------------------------------------------------------------------- /manifest/fixtures/command-array.yml: -------------------------------------------------------------------------------- 1 | web: 2 | command: ["ls", "-la"] 3 | -------------------------------------------------------------------------------- /manifest/fixtures/badport4.yml: -------------------------------------------------------------------------------- 1 | web: 2 | ports: 3 | - 5000:9000:1000 4 | -------------------------------------------------------------------------------- /provider/aws/lambda/formation/.dockerignore: -------------------------------------------------------------------------------- 1 | formation 2 | formation.zip 3 | -------------------------------------------------------------------------------- /provider/aws/lambda/lifecycle/.dockerignore: -------------------------------------------------------------------------------- 1 | formation 2 | formation.zip 3 | -------------------------------------------------------------------------------- /vendor/github.com/fatih/color/.travis.yml: -------------------------------------------------------------------------------- 1 | language: go 2 | go: 1.3 3 | 4 | -------------------------------------------------------------------------------- /manifest/fixtures/idle-timeout-unset.yml: -------------------------------------------------------------------------------- 1 | main: 2 | ports: 3 | - 80:3000 4 | -------------------------------------------------------------------------------- /cmd/convox/templates/init/ruby/.dockerignore: -------------------------------------------------------------------------------- 1 | .bundle 2 | .convox 3 | .env 4 | .git 5 | -------------------------------------------------------------------------------- /cmd/convox/templates/init/unknown/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM ubuntu:16.04 2 | 3 | COPY . /app 4 | -------------------------------------------------------------------------------- /cmd/crypt/eg/env: -------------------------------------------------------------------------------- 1 | DATABASE_URL=postgres://user:pass@example.org:5432/test 2 | FOO=bar 3 | -------------------------------------------------------------------------------- /api/models/fixtures/command_string_form.yml: -------------------------------------------------------------------------------- 1 | main: 2 | build: . 3 | command: cmd1 cmd2 4 | -------------------------------------------------------------------------------- /cmd/convox/templates/init/django/.dockerignore: -------------------------------------------------------------------------------- 1 | .convox 2 | .env 3 | .git 4 | .gitignore 5 | -------------------------------------------------------------------------------- /cmd/convox/templates/init/sinatra/.dockerignore: -------------------------------------------------------------------------------- 1 | .bundle 2 | .convox 3 | .env 4 | .git 5 | -------------------------------------------------------------------------------- /manifest/fixtures/v2-number.yml: -------------------------------------------------------------------------------- 1 | version: 2 2 | services: 3 | web: 4 | image: test 5 | -------------------------------------------------------------------------------- /manifest/fixtures/v2-string.yml: -------------------------------------------------------------------------------- 1 | version: "2" 2 | services: 3 | web: 4 | image: test 5 | -------------------------------------------------------------------------------- /vendor/github.com/jasonmoo/lambda_proc/.gitignore: -------------------------------------------------------------------------------- 1 | example/lambda.zip 2 | example/main 3 | -------------------------------------------------------------------------------- /api/models/fixtures/command_exec_form.yml: -------------------------------------------------------------------------------- 1 | main: 2 | build: . 3 | command: [cmd1, cmd2] 4 | -------------------------------------------------------------------------------- /manifest/fixtures/port-conflicts.yml: -------------------------------------------------------------------------------- 1 | web: 2 | image: test 3 | ports: 4 | - 30544:5000 5 | -------------------------------------------------------------------------------- /manifest/fixtures/unknown-version.yml: -------------------------------------------------------------------------------- 1 | version: "3" 2 | services: 3 | web: 4 | build: . 5 | -------------------------------------------------------------------------------- /api/structs/object.go: -------------------------------------------------------------------------------- 1 | package structs 2 | 3 | type ObjectOptions struct { 4 | Public bool 5 | } 6 | -------------------------------------------------------------------------------- /manifest/fixtures/underscore_service.yml: -------------------------------------------------------------------------------- 1 | web_api: 2 | image: httpd 3 | ports: 4 | - 80:80 5 | -------------------------------------------------------------------------------- /vendor/github.com/dustin/go-humanize/.gitignore: -------------------------------------------------------------------------------- 1 | #* 2 | *.[568] 3 | *.a 4 | *~ 5 | [568].out 6 | _* 7 | -------------------------------------------------------------------------------- /manifest/fixtures/bad-v2.yml: -------------------------------------------------------------------------------- 1 | version: "2" 2 | services: 3 | web: 4 | ports: 5 | foo: bar 6 | -------------------------------------------------------------------------------- /cmd/Makefile: -------------------------------------------------------------------------------- 1 | .PHONE: all templates 2 | 3 | all: templates 4 | 5 | templates: 6 | make -C convox templates 7 | -------------------------------------------------------------------------------- /cmd/convox/templates/init/unknown/docker-compose.yml: -------------------------------------------------------------------------------- 1 | version: 2 2 | services: 3 | main: 4 | build: . 5 | -------------------------------------------------------------------------------- /vendor/github.com/fsouza/go-dockerclient/.gitignore: -------------------------------------------------------------------------------- 1 | # temporary symlink for testing 2 | testing/data/symlink 3 | -------------------------------------------------------------------------------- /vendor/github.com/jehiah/go-strftime/README.md: -------------------------------------------------------------------------------- 1 | go-strftime 2 | =========== 3 | 4 | go implementation of strftime -------------------------------------------------------------------------------- /vendor/github.com/jmespath/go-jmespath/.gitignore: -------------------------------------------------------------------------------- 1 | jpgo 2 | jmespath-fuzz.zip 3 | cpu.out 4 | go-jmespath.test 5 | -------------------------------------------------------------------------------- /vendor/github.com/mattn/go-isatty/doc.go: -------------------------------------------------------------------------------- 1 | // Package isatty implements interface to isatty 2 | package isatty 3 | -------------------------------------------------------------------------------- /manifest/fixtures/invalid-memory-below-minimum.yml: -------------------------------------------------------------------------------- 1 | version: "2" 2 | services: 3 | web: 4 | mem_limit: 2m 5 | -------------------------------------------------------------------------------- /vendor/github.com/fluent/fluent-logger-golang/fluent/version.go: -------------------------------------------------------------------------------- 1 | package fluent 2 | 3 | const Version = "1.1.0" 4 | -------------------------------------------------------------------------------- /vendor/github.com/gorilla/context/.travis.yml: -------------------------------------------------------------------------------- 1 | language: go 2 | 3 | go: 4 | - 1.0 5 | - 1.1 6 | - 1.2 7 | - tip 8 | -------------------------------------------------------------------------------- /vendor/github.com/gorilla/mux/.travis.yml: -------------------------------------------------------------------------------- 1 | language: go 2 | 3 | go: 4 | - 1.0 5 | - 1.1 6 | - 1.2 7 | - tip 8 | -------------------------------------------------------------------------------- /vendor/github.com/cheggaaa/pb/.travis.yml: -------------------------------------------------------------------------------- 1 | language: go 2 | go: 3 | - 1.4.2 4 | sudo: false 5 | os: 6 | - linux 7 | - osx 8 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/pkg/archive/README.md: -------------------------------------------------------------------------------- 1 | This code provides helper functions for dealing with archive files. 2 | -------------------------------------------------------------------------------- /manifest/fixtures/idle-timeout-set.yml: -------------------------------------------------------------------------------- 1 | main: 2 | ports: 3 | - 80:3000 4 | labels: 5 | - convox.idle.timeout=99 6 | 7 | -------------------------------------------------------------------------------- /REGIONS: -------------------------------------------------------------------------------- 1 | ap-northeast-1 2 | ap-southeast-1 3 | ap-southeast-2 4 | eu-central-1 5 | eu-west-1 6 | us-east-1 7 | us-east-2 8 | us-west-2 9 | -------------------------------------------------------------------------------- /api/structs/provider.go: -------------------------------------------------------------------------------- 1 | package structs 2 | 3 | import "io" 4 | 5 | type ProviderOptions struct { 6 | LogOutput io.Writer 7 | } 8 | -------------------------------------------------------------------------------- /api/models/fixtures/environment_map.yml: -------------------------------------------------------------------------------- 1 | main: 2 | build: . 3 | command: bin/eat 4 | environment: 5 | FOO: bar 6 | BAZ: qux 7 | -------------------------------------------------------------------------------- /manifest/fixtures/double-dockerfile.yml: -------------------------------------------------------------------------------- 1 | web: 2 | build: 3 | context: . 4 | dockerfile: Dockerfile1 5 | dockerfile: Dockerfile2 6 | -------------------------------------------------------------------------------- /provider/aws/lambda/fluentd/vendor/github.com/fluent/fluent-logger-golang/fluent/version.go: -------------------------------------------------------------------------------- 1 | package fluent 2 | 3 | const Version = "1.1.0" 4 | -------------------------------------------------------------------------------- /vendor/github.com/Sirupsen/logrus/.travis.yml: -------------------------------------------------------------------------------- 1 | language: go 2 | go: 3 | - 1.3 4 | - 1.4 5 | - tip 6 | install: 7 | - go get -t ./... 8 | -------------------------------------------------------------------------------- /vendor/github.com/cheggaaa/pb/pb_solaris.go: -------------------------------------------------------------------------------- 1 | // +build solaris 2 | // +build !appengine 3 | 4 | package pb 5 | 6 | const sysIoctl = 54 7 | -------------------------------------------------------------------------------- /vendor/github.com/stretchr/objx/README.md: -------------------------------------------------------------------------------- 1 | # objx 2 | 3 | * Jump into the [API Documentation](http://godoc.org/github.com/stretchr/objx) 4 | -------------------------------------------------------------------------------- /api/models/fixtures/web_external_internal.yml: -------------------------------------------------------------------------------- 1 | web: 2 | build: . 3 | ports: 4 | - 80:3000 5 | - 3001 6 | volumes: 7 | - .:/app 8 | -------------------------------------------------------------------------------- /cmd/convox/templates/init/rails/.dockerignore: -------------------------------------------------------------------------------- 1 | .bundle 2 | .convox 3 | .env 4 | .git 5 | db/*.sqlite3 6 | db/*.sqlite3-journal 7 | log/* 8 | tmp 9 | -------------------------------------------------------------------------------- /vendor/github.com/go-ini/ini/.gitignore: -------------------------------------------------------------------------------- 1 | testdata/conf_out.ini 2 | ini.sublime-project 3 | ini.sublime-workspace 4 | testdata/conf_reflect.ini 5 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/pkg/ioutils/scheduler.go: -------------------------------------------------------------------------------- 1 | // +build !gccgo 2 | 3 | package ioutils 4 | 5 | func callSchedulerIfNecessary() { 6 | } 7 | -------------------------------------------------------------------------------- /api/models/fixtures/extra_hosts.yml: -------------------------------------------------------------------------------- 1 | main: 2 | build: . 3 | command: bin/eat 4 | extra_hosts: 5 | - "foo:20.20.20.20" 6 | - "bar:30.30.30.30" 7 | -------------------------------------------------------------------------------- /vendor/github.com/philhofer/fwd/writer_appengine.go: -------------------------------------------------------------------------------- 1 | // +build appengine 2 | 3 | package fwd 4 | 5 | func unsafestr(s string) []byte { return []byte(s) } 6 | -------------------------------------------------------------------------------- /vendor/github.com/segmentio/analytics-go/Makefile: -------------------------------------------------------------------------------- 1 | build: 2 | @godep go build 3 | 4 | test: 5 | @godep go test -cover ./... 6 | 7 | .PHONY: test deps 8 | -------------------------------------------------------------------------------- /vendor/github.com/opencontainers/runc/libcontainer/user/MAINTAINERS: -------------------------------------------------------------------------------- 1 | Tianon Gravi (@tianon) 2 | Aleksa Sarai (@cyphar) 3 | -------------------------------------------------------------------------------- /api/models/fixtures/complex_environment.yml: -------------------------------------------------------------------------------- 1 | main: 2 | build: . 3 | command: bin/eat 4 | environment: 5 | - FOOD=pb&j 6 | - 'DRINK=top "o" the mornin' 7 | -------------------------------------------------------------------------------- /manifest/fixtures/repeat-image.yml: -------------------------------------------------------------------------------- 1 | web1: 2 | image: convox/rails 3 | ports: 4 | - 80:8080 5 | web2: 6 | image: convox/rails 7 | ports: 8 | - 80:8080 9 | -------------------------------------------------------------------------------- /Godeps/Readme: -------------------------------------------------------------------------------- 1 | This directory tree is generated automatically by godep. 2 | 3 | Please do not edit. 4 | 5 | See https://github.com/tools/godep for more information. 6 | -------------------------------------------------------------------------------- /vendor/github.com/aws/aws-sdk-go/NOTICE.txt: -------------------------------------------------------------------------------- 1 | AWS SDK for Go 2 | Copyright 2015 Amazon.com, Inc. or its affiliates. All Rights Reserved. 3 | Copyright 2014-2015 Stripe, Inc. 4 | -------------------------------------------------------------------------------- /api/structs/options.go: -------------------------------------------------------------------------------- 1 | package structs 2 | 3 | import "time" 4 | 5 | type LogStreamOptions struct { 6 | Filter string 7 | Follow bool 8 | Since time.Time 9 | } 10 | -------------------------------------------------------------------------------- /cmd/convox/README.md: -------------------------------------------------------------------------------- 1 | # convox/cli 2 | 3 | Convox CLI 4 | 5 | ## Development 6 | 7 | $ make test 8 | 9 | ## License 10 | 11 | Apache 2.0 © 2015 Convox, Inc. 12 | -------------------------------------------------------------------------------- /vendor/github.com/equinox-io/equinox/internal/go-update/hide_noop.go: -------------------------------------------------------------------------------- 1 | // +build !windows 2 | 3 | package update 4 | 5 | func hideFile(path string) error { 6 | return nil 7 | } 8 | -------------------------------------------------------------------------------- /vendor/github.com/jmespath/go-jmespath/.travis.yml: -------------------------------------------------------------------------------- 1 | language: go 2 | 3 | sudo: false 4 | 5 | go: 6 | - 1.4 7 | 8 | install: go get -v -t ./... 9 | script: make test 10 | -------------------------------------------------------------------------------- /provider/aws/lambda/fluentd/vendor/github.com/philhofer/fwd/writer_appengine.go: -------------------------------------------------------------------------------- 1 | // +build appengine 2 | 3 | package fwd 4 | 5 | func unsafestr(s string) []byte { return []byte(s) } 6 | -------------------------------------------------------------------------------- /api/awsutil/Readme.md: -------------------------------------------------------------------------------- 1 | awsutil is a utility package from the Empire project for testing AWS 2 | request/response cycles. 3 | 4 | See https://github.com/remind101/empire/blob/master/pkg/awsutil -------------------------------------------------------------------------------- /cmd/convox/stdcli/default.go: -------------------------------------------------------------------------------- 1 | package stdcli 2 | 3 | func Default(value, def string) string { 4 | if value == "" { 5 | return def 6 | } else { 7 | return value 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /ci/release.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -x 3 | 4 | # don't auto-publish until upgrade path is automatically tested 5 | # curl -vik -X POST $RELEASE_URL/publish -d token=$RELEASE_TOKEN -d version=$VERSION -------------------------------------------------------------------------------- /manifest/fixtures/marshal.yml: -------------------------------------------------------------------------------- 1 | version: "2" 2 | services: 3 | Food: 4 | build: 5 | context: "" 6 | dockerfile: "" 7 | args: {} 8 | ports: 9 | - "5000:5000" 10 | -------------------------------------------------------------------------------- /manifest/fixtures/shift.yml: -------------------------------------------------------------------------------- 1 | web: 2 | ports: 3 | - 5000 4 | - 6000:7000 5 | other: 6 | labels: 7 | - convox.start.shift=1000 8 | ports: 9 | - 8000 10 | - 9000:9001 11 | -------------------------------------------------------------------------------- /api/cmd/build/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM golang:1.7-alpine 2 | 3 | RUN apk update && apk add docker openssh 4 | 5 | COPY . $GOPATH/src/github.com/convox/rack 6 | RUN go install github.com/convox/rack/api/cmd/build 7 | -------------------------------------------------------------------------------- /manifest/util.go: -------------------------------------------------------------------------------- 1 | package manifest 2 | 3 | func coalesce(values ...string) string { 4 | for _, s := range values { 5 | if s != "" { 6 | return s 7 | } 8 | } 9 | 10 | return "" 11 | } 12 | -------------------------------------------------------------------------------- /vendor/github.com/segmentio/analytics-go/circle.yml: -------------------------------------------------------------------------------- 1 | dependencies: 2 | override: 3 | - go get -d -t ./... 4 | - go get github.com/tools/godep 5 | 6 | test: 7 | override: 8 | - make test 9 | -------------------------------------------------------------------------------- /vendor/github.com/stretchr/testify/require/require_forward.go.tmpl: -------------------------------------------------------------------------------- 1 | {{.CommentWithoutT "a"}} 2 | func (a *Assertions) {{.DocInfo.Name}}({{.Params}}) { 3 | {{.DocInfo.Name}}(a.t, {{.ForwardedParams}}) 4 | } 5 | -------------------------------------------------------------------------------- /.dockerignore: -------------------------------------------------------------------------------- 1 | .env 2 | .git 3 | docker-compose.yml 4 | api/models/fixtures/fixture 5 | cmd/changes/changes 6 | cmd/convox/convox 7 | provider/aws/lambda/formation/main 8 | provider/aws/lambda/formation/lambda.zip 9 | -------------------------------------------------------------------------------- /api/models/models_test.go: -------------------------------------------------------------------------------- 1 | package models_test 2 | 3 | import ( 4 | "bytes" 5 | 6 | "github.com/convox/logger" 7 | ) 8 | 9 | func init() { 10 | var buf bytes.Buffer 11 | logger.Output = &buf 12 | } 13 | -------------------------------------------------------------------------------- /manifest/fixtures/balancer.yml: -------------------------------------------------------------------------------- 1 | version: "2" 2 | services: 3 | web: 4 | build: . 5 | labels: 6 | - convox.port.443.protocol=https 7 | ports: 8 | - 80:5000 9 | - 443:5001 10 | -------------------------------------------------------------------------------- /vendor/github.com/cheggaaa/pb/pb_nix.go: -------------------------------------------------------------------------------- 1 | // +build linux darwin freebsd netbsd openbsd dragonfly 2 | // +build !appengine 3 | 4 | package pb 5 | 6 | import "syscall" 7 | 8 | const sysIoctl = syscall.SYS_IOCTL 9 | -------------------------------------------------------------------------------- /vendor/github.com/stretchr/testify/assert/assertion_forward.go.tmpl: -------------------------------------------------------------------------------- 1 | {{.CommentWithoutT "a"}} 2 | func (a *Assertions) {{.DocInfo.Name}}({{.Params}}) bool { 3 | return {{.DocInfo.Name}}(a.t, {{.ForwardedParams}}) 4 | } 5 | -------------------------------------------------------------------------------- /api/models/fixtures/balancer_labels.yml: -------------------------------------------------------------------------------- 1 | main: 2 | build: . 3 | labels: 4 | - convox.port.443.protocol=tls 5 | - convox.port.443.proxy=true 6 | - convox.port.443.secure=true 7 | ports: 8 | - 443:5000 9 | -------------------------------------------------------------------------------- /vendor/github.com/aws/aws-sdk-go/service/s3/platform_handlers.go: -------------------------------------------------------------------------------- 1 | // +build !go1.6 2 | 3 | package s3 4 | 5 | import "github.com/aws/aws-sdk-go/aws/request" 6 | 7 | func platformRequestHandlers(r *request.Request) { 8 | } 9 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/opts/hosts_windows.go: -------------------------------------------------------------------------------- 1 | // +build windows 2 | 3 | package opts 4 | 5 | // DefaultHost constant defines the default host string used by docker on Windows 6 | var DefaultHost = DefaultTCPHost 7 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/pkg/archive/copy_windows.go: -------------------------------------------------------------------------------- 1 | package archive 2 | 3 | import ( 4 | "path/filepath" 5 | ) 6 | 7 | func normalizePath(path string) string { 8 | return filepath.FromSlash(path) 9 | } 10 | -------------------------------------------------------------------------------- /vendor/github.com/stretchr/testify/require/require.go.tmpl: -------------------------------------------------------------------------------- 1 | {{.Comment}} 2 | func {{.DocInfo.Name}}(t TestingT, {{.Params}}) { 3 | if !assert.{{.DocInfo.Name}}(t, {{.ForwardedParams}}) { 4 | t.FailNow() 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /api/controllers/controllers_test.go: -------------------------------------------------------------------------------- 1 | package controllers_test 2 | 3 | import ( 4 | "bytes" 5 | 6 | "github.com/convox/logger" 7 | ) 8 | 9 | func init() { 10 | var buf bytes.Buffer 11 | logger.Output = &buf 12 | } 13 | -------------------------------------------------------------------------------- /vendor/github.com/cheggaaa/pb/termios_nix.go: -------------------------------------------------------------------------------- 1 | // +build linux solaris 2 | // +build !appengine 3 | 4 | package pb 5 | 6 | const ioctlReadTermios = 0x5401 // syscall.TCGETS 7 | const ioctlWriteTermios = 0x5402 // syscall.TCSETS 8 | -------------------------------------------------------------------------------- /manifest/fixtures/interpolate-env-var.yml: -------------------------------------------------------------------------------- 1 | version: "2" 2 | services: 3 | web: 4 | image: ${KNOWN_VAR1} 5 | entrypoint: $KNOWN_VAR2/$KNOWN_VAR2/${KNOWN_VAR3} 6 | dockerfile: $$REMAIN 7 | volumes: 8 | - ${broken 9 | -------------------------------------------------------------------------------- /provider/aws/lambda/formation/data/role-policy.json: -------------------------------------------------------------------------------- 1 | { 2 | "Version": "2012-10-17", 3 | "Statement": [ 4 | { 5 | "Effect": "Allow", 6 | "Action": "*", 7 | "Resource": "*" 8 | } 9 | ] 10 | } 11 | -------------------------------------------------------------------------------- /test/run.go: -------------------------------------------------------------------------------- 1 | package test 2 | 3 | import "testing" 4 | 5 | type Run interface { 6 | Test(*testing.T) 7 | } 8 | 9 | func Runs(t *testing.T, runs ...Run) { 10 | for _, run := range runs { 11 | run.Test(t) 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /vendor/github.com/convox/logger/.travis.yml: -------------------------------------------------------------------------------- 1 | sudo: false 2 | 3 | language: go 4 | 5 | go: 6 | - 1.3.1 7 | 8 | before_install: 9 | - go get code.google.com/p/go.tools/cmd/cover 10 | 11 | script: 12 | - go test . -cover 13 | -------------------------------------------------------------------------------- /vendor/github.com/ddollar/logger/.travis.yml: -------------------------------------------------------------------------------- 1 | sudo: false 2 | 3 | language: go 4 | 5 | go: 6 | - 1.3.1 7 | 8 | before_install: 9 | - go get code.google.com/p/go.tools/cmd/cover 10 | 11 | script: 12 | - go test . -cover 13 | -------------------------------------------------------------------------------- /provider/aws/error_test.go: -------------------------------------------------------------------------------- 1 | package aws_test 2 | 3 | type errorNotFound string 4 | 5 | func (e errorNotFound) Error() string { 6 | return string(e) 7 | } 8 | 9 | func (e errorNotFound) NotFound() bool { 10 | return true 11 | } 12 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/pkg/fileutils/fileutils_windows.go: -------------------------------------------------------------------------------- 1 | package fileutils 2 | 3 | // GetTotalUsedFds Returns the number of used File Descriptors. Not supported 4 | // on Windows. 5 | func GetTotalUsedFds() int { 6 | return -1 7 | } 8 | -------------------------------------------------------------------------------- /vendor/github.com/Sirupsen/logrus/terminal_bsd.go: -------------------------------------------------------------------------------- 1 | // +build darwin freebsd openbsd netbsd dragonfly 2 | 3 | package logrus 4 | 5 | import "syscall" 6 | 7 | const ioctlReadTermios = syscall.TIOCGETA 8 | 9 | type Termios syscall.Termios 10 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/pkg/archive/copy_unix.go: -------------------------------------------------------------------------------- 1 | // +build !windows 2 | 3 | package archive 4 | 5 | import ( 6 | "path/filepath" 7 | ) 8 | 9 | func normalizePath(path string) string { 10 | return filepath.ToSlash(path) 11 | } 12 | -------------------------------------------------------------------------------- /vendor/github.com/xtgo/uuid/AUTHORS: -------------------------------------------------------------------------------- 1 | # This source file refers to The gocql Authors for copyright purposes. 2 | 3 | Christoph Hack 4 | Jonathan Rudenberg 5 | Thorsten von Eicken 6 | -------------------------------------------------------------------------------- /api/bin/monitor: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # cd to the api root 4 | cd $(dirname ${0:-})/.. 5 | 6 | if [ "$DEVELOPMENT" == "true" ]; then 7 | $GOPATH/bin/rerun -build github.com/convox/rack/api/cmd/monitor 8 | else 9 | $GOPATH/bin/monitor 10 | fi 11 | -------------------------------------------------------------------------------- /changes/watch.go: -------------------------------------------------------------------------------- 1 | // +build !darwin,!linux darwin,!cgo 2 | 3 | package changes 4 | 5 | import "time" 6 | 7 | func startScanner(dir string) { 8 | } 9 | 10 | func waitForNextScan(dir string) { 11 | time.Sleep(700 * time.Millisecond) 12 | } 13 | -------------------------------------------------------------------------------- /client/proxy.go: -------------------------------------------------------------------------------- 1 | package client 2 | 3 | import ( 4 | "fmt" 5 | "io" 6 | ) 7 | 8 | func (c *Client) Proxy(host string, port int, rw io.ReadWriteCloser) error { 9 | return c.Stream(fmt.Sprintf("/proxy/%s/%d", host, port), nil, rw, rw) 10 | } 11 | -------------------------------------------------------------------------------- /manifest/fixtures/repeat-simple.yml: -------------------------------------------------------------------------------- 1 | version: "2" 2 | services: 3 | web: 4 | build: . 5 | command: bin/web 6 | monitor: 7 | build: . 8 | command: bin/monitor 9 | other: 10 | build: ./other 11 | command: bin/other 12 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/opts/opts_unix.go: -------------------------------------------------------------------------------- 1 | // +build !windows 2 | 3 | package opts 4 | 5 | // DefaultHTTPHost Default HTTP Host used if only port is provided to -H flag e.g. docker daemon -H tcp://:8080 6 | const DefaultHTTPHost = "localhost" 7 | -------------------------------------------------------------------------------- /vendor/github.com/robfig/cron/README.md: -------------------------------------------------------------------------------- 1 | [![GoDoc](http://godoc.org/github.com/robfig/cron?status.png)](http://godoc.org/github.com/robfig/cron) 2 | [![Build Status](https://travis-ci.org/robfig/cron.svg?branch=master)](https://travis-ci.org/robfig/cron) 3 | -------------------------------------------------------------------------------- /vendor/github.com/aws/aws-sdk-go/service/sqs/customizations.go: -------------------------------------------------------------------------------- 1 | package sqs 2 | 3 | import "github.com/aws/aws-sdk-go/aws/request" 4 | 5 | func init() { 6 | initRequest = func(r *request.Request) { 7 | setupChecksumValidation(r) 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /manifest/fixtures/runorder.yml: -------------------------------------------------------------------------------- 1 | aaa: 2 | image: test 3 | links: 4 | - bbb 5 | - ccc 6 | bbb: 7 | image: test 8 | links: 9 | - ddd 10 | ccc: 11 | image: test 12 | links: 13 | - bbb 14 | - ddd 15 | ddd: 16 | image: test 17 | -------------------------------------------------------------------------------- /sync/Makefile: -------------------------------------------------------------------------------- 1 | all: templates 2 | 3 | templates: 4 | go get github.com/karalabe/xgo 5 | xgo -targets linux/amd64 -out changed ../changes/cmd/changed 6 | mv changed-linux-amd64 changed 7 | go-bindata -nometadata -pkg sync -o templates.go changed 8 | rm changed 9 | -------------------------------------------------------------------------------- /api/models/fixtures/custom_health.yml: -------------------------------------------------------------------------------- 1 | main: 2 | ports: 3 | - 80:3000 4 | - 81:3001 5 | labels: 6 | - convox.port.81.secure=true 7 | - convox.health.port=3001 8 | - convox.health.path=/health_check 9 | - convox.health.timeout=60 10 | -------------------------------------------------------------------------------- /api/models/fixtures/multi_balancer.yml: -------------------------------------------------------------------------------- 1 | web: 2 | build: . 3 | command: 'bash -c ''bundle exec puma -C config/puma.rb''' 4 | ports: 5 | - 80:3000 6 | worker: 7 | command: 'bash -c "bundle exec worker"' 8 | build: . 9 | ports: 10 | - 80:3000 11 | -------------------------------------------------------------------------------- /cmd/convox/templates/init/rails/docker-compose.yml: -------------------------------------------------------------------------------- 1 | version: 2 2 | services: 3 | web: 4 | build: . 5 | labels: 6 | - convox.port.443.protocol=tls 7 | - convox.port.443.proxy=true 8 | ports: 9 | - 80:4000 10 | - 443:4001 11 | -------------------------------------------------------------------------------- /cmd/convox/templates/init/sinatra/docker-compose.yml: -------------------------------------------------------------------------------- 1 | version: 2 2 | services: 3 | web: 4 | build: . 5 | labels: 6 | - convox.port.443.protocol=tls 7 | - convox.port.443.proxy=true 8 | ports: 9 | - 80:4000 10 | - 443:4001 11 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/pkg/system/utimes_darwin.go: -------------------------------------------------------------------------------- 1 | package system 2 | 3 | import "syscall" 4 | 5 | // LUtimesNano is not supported by darwin platform. 6 | func LUtimesNano(path string, ts []syscall.Timespec) error { 7 | return ErrNotSupportedPlatform 8 | } 9 | -------------------------------------------------------------------------------- /api/controllers/auth.go: -------------------------------------------------------------------------------- 1 | package controllers 2 | 3 | import ( 4 | "net/http" 5 | 6 | "github.com/convox/rack/api/httperr" 7 | ) 8 | 9 | func Auth(w http.ResponseWriter, r *http.Request) *httperr.Error { 10 | w.Write([]byte("OK\n")) 11 | return nil 12 | } 13 | -------------------------------------------------------------------------------- /vendor/github.com/cheggaaa/pb/termios_bsd.go: -------------------------------------------------------------------------------- 1 | // +build darwin freebsd netbsd openbsd dragonfly 2 | // +build !appengine 3 | 4 | package pb 5 | 6 | import "syscall" 7 | 8 | const ioctlReadTermios = syscall.TIOCGETA 9 | const ioctlWriteTermios = syscall.TIOCSETA 10 | -------------------------------------------------------------------------------- /manifest/fixtures/balancer-secure.yml: -------------------------------------------------------------------------------- 1 | version: "2" 2 | services: 3 | web: 4 | labels: 5 | - convox.health.port=5001 6 | - convox.port.443.protocol=https 7 | - convox.port.443.secure=true 8 | ports: 9 | - 80:5000 10 | - 443:5001 11 | -------------------------------------------------------------------------------- /vendor/github.com/jmespath/go-jmespath/README.md: -------------------------------------------------------------------------------- 1 | # go-jmespath - A JMESPath implementation in Go 2 | 3 | [![Build Status](https://img.shields.io/travis/jmespath/go-jmespath.svg)](https://travis-ci.org/jmespath/go-jmespath) 4 | 5 | 6 | 7 | See http://jmespath.org for more info. 8 | -------------------------------------------------------------------------------- /api/controllers/switch.go: -------------------------------------------------------------------------------- 1 | package controllers 2 | 3 | import ( 4 | "net/http" 5 | 6 | "github.com/convox/rack/api/httperr" 7 | ) 8 | 9 | func Switch(w http.ResponseWriter, r *http.Request) *httperr.Error { 10 | return httperr.Errorf(403, "only available on console") 11 | } 12 | -------------------------------------------------------------------------------- /manifest/fixtures/invalid-cron.yml: -------------------------------------------------------------------------------- 1 | version: "2" 2 | services: 3 | web: 4 | build: . 5 | command: bin/web 6 | dockerfile: Dockerfile.dev 7 | entrypoint: /sbin/init 8 | labels: 9 | - convox.cron.my_job=0 * * * ? bin/myjob 10 | - convox.baz=4 11 | 12 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/opts/hosts_unix.go: -------------------------------------------------------------------------------- 1 | // +build !windows 2 | 3 | package opts 4 | 5 | import "fmt" 6 | 7 | // DefaultHost constant defines the default host string used by docker on other hosts than Windows 8 | var DefaultHost = fmt.Sprintf("unix://%s", DefaultUnixSocket) 9 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/pkg/system/meminfo_unsupported.go: -------------------------------------------------------------------------------- 1 | // +build !linux,!windows 2 | 3 | package system 4 | 5 | // ReadMemInfo is not supported on platforms other than linux and windows. 6 | func ReadMemInfo() (*MemInfo, error) { 7 | return nil, ErrNotSupportedPlatform 8 | } 9 | -------------------------------------------------------------------------------- /api/controllers/racks.go: -------------------------------------------------------------------------------- 1 | package controllers 2 | 3 | import ( 4 | "net/http" 5 | 6 | "github.com/convox/rack/api/httperr" 7 | ) 8 | 9 | func RackList(rw http.ResponseWriter, r *http.Request) *httperr.Error { 10 | return httperr.Errorf(403, "only available on console") 11 | } 12 | -------------------------------------------------------------------------------- /api/models/fixtures/cron_labels.yml: -------------------------------------------------------------------------------- 1 | main: 2 | build: . 3 | labels: 4 | - convox.cron.my-job=0 * * * ? bin/myjob 5 | ports: 6 | - 443:5000 7 | really-long-process-type-name: 8 | build: . 9 | labels: 10 | - convox.cron.really-long-cron-job-name=0 * * * ? bin/myjob 11 | -------------------------------------------------------------------------------- /cmd/crypt/Makefile: -------------------------------------------------------------------------------- 1 | all: build 2 | 3 | build: 4 | docker build -t convox/crypt . 5 | 6 | test: build 7 | cat eg/env | docker run --env-file .env -i convox/crypt encrypt $(KEY) | docker run --env-file .env -i convox/crypt decrypt $(KEY) 8 | 9 | vendor: 10 | godep save -r ./... 11 | -------------------------------------------------------------------------------- /manifest/fixtures/invalid-health-timeout.yml: -------------------------------------------------------------------------------- 1 | version: "2" 2 | services: 3 | web: 4 | build: . 5 | command: bin/web 6 | dockerfile: Dockerfile.dev 7 | entrypoint: /sbin/init 8 | labels: 9 | - convox.health.timeout=61 10 | - convox.baz=4 11 | 12 | 13 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/pkg/system/errors.go: -------------------------------------------------------------------------------- 1 | package system 2 | 3 | import ( 4 | "errors" 5 | ) 6 | 7 | var ( 8 | // ErrNotSupportedPlatform means the platform is not supported. 9 | ErrNotSupportedPlatform = errors.New("platform and architecture is not supported") 10 | ) 11 | -------------------------------------------------------------------------------- /api/controllers/utility.go: -------------------------------------------------------------------------------- 1 | package controllers 2 | 3 | import "net/http" 4 | 5 | func UtilityBoom(rw http.ResponseWriter, r *http.Request) { 6 | panic("Controlled Panic") 7 | } 8 | 9 | func UtilityCheck(rw http.ResponseWriter, r *http.Request) { 10 | rw.Write([]byte("ok")) 11 | } 12 | -------------------------------------------------------------------------------- /api/structs/index.go: -------------------------------------------------------------------------------- 1 | package structs 2 | 3 | import ( 4 | "os" 5 | "time" 6 | ) 7 | 8 | type Index map[string]IndexItem 9 | 10 | type IndexItem struct { 11 | Name string `json:"name"` 12 | Mode os.FileMode `json:"mode"` 13 | ModTime time.Time `json:"mtime"` 14 | } 15 | -------------------------------------------------------------------------------- /api/structs/system.go: -------------------------------------------------------------------------------- 1 | package structs 2 | 3 | type System struct { 4 | Count int `json:"count"` 5 | Name string `json:"name"` 6 | Region string `json:"region"` 7 | Status string `json:"status"` 8 | Type string `json:"type"` 9 | Version string `json:"version"` 10 | } 11 | -------------------------------------------------------------------------------- /api/workers/helpers.go: -------------------------------------------------------------------------------- 1 | package workers 2 | 3 | import "fmt" 4 | 5 | func recoverWith(f func(err error)) { 6 | if r := recover(); r != nil { 7 | // coerce r to error type 8 | err, ok := r.(error) 9 | if !ok { 10 | err = fmt.Errorf("%v", r) 11 | } 12 | 13 | f(err) 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /vendor/github.com/gorilla/mux/README.md: -------------------------------------------------------------------------------- 1 | mux 2 | === 3 | [![Build Status](https://travis-ci.org/gorilla/mux.png?branch=master)](https://travis-ci.org/gorilla/mux) 4 | 5 | gorilla/mux is a powerful URL router and dispatcher. 6 | 7 | Read the full documentation here: http://www.gorillatoolkit.org/pkg/mux 8 | -------------------------------------------------------------------------------- /api/main.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import "fmt" 4 | 5 | func recoverWith(f func(err error)) { 6 | if r := recover(); r != nil { 7 | if err, ok := r.(error); ok { 8 | f(err) 9 | } else { 10 | f(fmt.Errorf("%v", r)) 11 | } 12 | } 13 | } 14 | 15 | func main() { 16 | startWeb() 17 | } 18 | -------------------------------------------------------------------------------- /vendor/github.com/aws/aws-sdk-go/aws/version.go: -------------------------------------------------------------------------------- 1 | // Package aws provides core functionality for making requests to AWS services. 2 | package aws 3 | 4 | // SDKName is the name of this AWS SDK 5 | const SDKName = "aws-sdk-go" 6 | 7 | // SDKVersion is the version of this SDK 8 | const SDKVersion = "1.4.10" 9 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/pkg/ioutils/temp_unix.go: -------------------------------------------------------------------------------- 1 | // +build !windows 2 | 3 | package ioutils 4 | 5 | import "io/ioutil" 6 | 7 | // TempDir on Unix systems is equivalent to ioutil.TempDir. 8 | func TempDir(dir, prefix string) (string, error) { 9 | return ioutil.TempDir(dir, prefix) 10 | } 11 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/pkg/system/path_windows.go: -------------------------------------------------------------------------------- 1 | // +build windows 2 | 3 | package system 4 | 5 | // DefaultPathEnv is deliberately empty on Windows as the default path will be set by 6 | // the container. Docker has no context of what the default path should be. 7 | const DefaultPathEnv = "" 8 | -------------------------------------------------------------------------------- /bin/export-env: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | stack=$1 4 | 5 | [ -z $stack ] && echo "usage: export-env " && exit 1 6 | 7 | aws cloudformation describe-stacks --stack-name $stack | jq -r '.Stacks[0].Outputs[] | [(.OutputKey | gsub("(?
.)(?[A-Z])";"\(.pre)_\(.up)") | ascii_upcase), .OutputValue] | join("=")'
8 | 


--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/asm.s:
--------------------------------------------------------------------------------
 1 | // Copyright 2014 The Go Authors.  All rights reserved.
 2 | // Use of this source code is governed by a BSD-style
 3 | // license that can be found in the LICENSE file.
 4 | 
 5 | // +build !gccgo
 6 | 
 7 | #include "textflag.h"
 8 | 
 9 | TEXT ·use(SB),NOSPLIT,$0
10 | 	RET
11 | 


--------------------------------------------------------------------------------
/vendor/gopkg.in/urfave/cli.v1/appveyor.yml:
--------------------------------------------------------------------------------
 1 | version: "{build}"
 2 | 
 3 | os: Windows Server 2012 R2
 4 | 
 5 | install:
 6 |   - go version
 7 |   - go env
 8 | 
 9 | build_script:
10 |   - cd %APPVEYOR_BUILD_FOLDER%
11 |   - go vet ./...
12 |   - go test -v ./...
13 | 
14 | test: off
15 | 
16 | deploy: off
17 | 


--------------------------------------------------------------------------------
/api/cmd/monitor/main.go:
--------------------------------------------------------------------------------
 1 | package main
 2 | 
 3 | import (
 4 | 	"time"
 5 | 
 6 | 	"github.com/convox/rack/api/workers"
 7 | )
 8 | 
 9 | func main() {
10 | 	go workers.StartAutoscale()
11 | 	go workers.StartCluster()
12 | 	go workers.StartHeartbeat()
13 | 
14 | 	for {
15 | 		time.Sleep(1 * time.Hour)
16 | 	}
17 | }
18 | 


--------------------------------------------------------------------------------
/cmd/convox/flags.go:
--------------------------------------------------------------------------------
 1 | package main
 2 | 
 3 | import "gopkg.in/urfave/cli.v1"
 4 | 
 5 | var appFlag = cli.StringFlag{
 6 | 	Name:  "app, a",
 7 | 	Usage: "app name inferred from current directory if not specified",
 8 | }
 9 | 
10 | var rackFlag = cli.StringFlag{
11 | 	Name:  "rack",
12 | 	Usage: "rack name",
13 | }
14 | 


--------------------------------------------------------------------------------
/vendor/github.com/docker/docker/pkg/system/umask_windows.go:
--------------------------------------------------------------------------------
 1 | // +build windows
 2 | 
 3 | package system
 4 | 
 5 | // Umask is not supported on the windows platform.
 6 | func Umask(newmask int) (oldmask int, err error) {
 7 | 	// should not be called on cli code path
 8 | 	return 0, ErrNotSupportedPlatform
 9 | }
10 | 


--------------------------------------------------------------------------------
/cmd/crypt/Dockerfile:
--------------------------------------------------------------------------------
 1 | FROM convox/alpine:3.1
 2 | 
 3 | RUN apk-install git go
 4 | 
 5 | ENV GOPATH /go
 6 | ENV GOBIN $GOPATH/bin
 7 | ENV PATH $GOBIN:$PATH
 8 | 
 9 | WORKDIR /go/src/github.com/convox/cmd/crypt
10 | COPY . /go/src/github.com/convox/cmd/crypt
11 | RUN go get .
12 | 
13 | ENTRYPOINT ["/go/bin/crypt"]
14 | 


--------------------------------------------------------------------------------
/provider/Makefile:
--------------------------------------------------------------------------------
 1 | .PHONY: all release templates
 2 | 
 3 | all: templates
 4 | 
 5 | mocks:
 6 | 	go get -u github.com/vektra/mockery/.../
 7 | 	rm -f mock_Provider.go
 8 | 	mockery -inpkg -name Provider
 9 | 
10 | release:
11 | 	make -C aws release VERSION=$(VERSION)
12 | 
13 | templates:
14 | 	make -C aws templates
15 | 


--------------------------------------------------------------------------------
/provider/aws/lambda/formation/data/role-assume.json:
--------------------------------------------------------------------------------
 1 | {
 2 |   "Version": "2012-10-17",
 3 |   "Statement": [
 4 |     {
 5 |       "Sid": "",
 6 |       "Effect": "Allow",
 7 |       "Principal": {
 8 |         "Service": "lambda.amazonaws.com"
 9 |       },
10 |       "Action": "sts:AssumeRole"
11 |     }
12 |   ]
13 | }
14 | 


--------------------------------------------------------------------------------
/vendor/github.com/convox/nlogger/README.md:
--------------------------------------------------------------------------------
 1 | # nlogger
 2 | 
 3 | Logging for Negroni
 4 | 
 5 | ## Examples
 6 | 
 7 | ```go
 8 | server := negroni.New(negroni.NewRecovery(), nlogger.New("ns=myapp", nil), negroni.NewStatic(http.Dir("public")))
 9 | ```
10 | 
11 | ## License
12 | 
13 | Apache 2.0 © 2015 David Dollar
14 | 


--------------------------------------------------------------------------------
/vendor/github.com/docker/docker/pkg/system/syscall_unix.go:
--------------------------------------------------------------------------------
 1 | // +build linux freebsd
 2 | 
 3 | package system
 4 | 
 5 | import "syscall"
 6 | 
 7 | // Unmount is a platform-specific helper function to call
 8 | // the unmount syscall.
 9 | func Unmount(dest string) error {
10 | 	return syscall.Unmount(dest, 0)
11 | }
12 | 


--------------------------------------------------------------------------------
/manifest/fixtures/balancer-labels.yml:
--------------------------------------------------------------------------------
 1 | version: "2"
 2 | services:
 3 |   web:
 4 |     build: .
 5 |     labels:
 6 |       - convox.health.port=5001
 7 |       - convox.health.path=/foo
 8 |       - convox.health.timeout=20
 9 |       - convox.port.443.protocol=https
10 |     ports:
11 |       - 80:5000
12 |       - 443:5001
13 | 


--------------------------------------------------------------------------------
/vendor/github.com/convox/version/Readme.md:
--------------------------------------------------------------------------------
1 | # convox/version
2 | 
3 | Release management via a version database of JSON in S3.
4 | 
5 | `convox/release` uses the library to append new versions to the database. 
6 | 
7 | `convox/rack` and `convox/rack/cmd/convox` uses the library and data to determine what new versions are available.
8 | 


--------------------------------------------------------------------------------
/ci/uninstall.sh:
--------------------------------------------------------------------------------
 1 | #!/bin/bash
 2 | set -ex -o pipefail
 3 | 
 4 | export CIRCLE_ARTIFACTS=${CIRCLE_ARTIFACTS:-/tmp}
 5 | export CIRCLE_BUILD_NUM=${CIRCLE_BUILD_NUM:-0}
 6 | export STACK_NAME=convox-${CIRCLE_BUILD_NUM}
 7 | export $($(dirname $0)/region.sh ${CIRCLE_NODE_INDEX})
 8 | 
 9 | convox uninstall $STACK_NAME $AWS_REGION --force
10 | 


--------------------------------------------------------------------------------
/provider/error.go:
--------------------------------------------------------------------------------
 1 | package provider
 2 | 
 3 | type errorNotFound interface {
 4 | 	NotFound() bool
 5 | }
 6 | 
 7 | // ErrorNotFound returns true if the error is a "not found" type
 8 | func ErrorNotFound(err error) bool {
 9 | 	if e, ok := err.(errorNotFound); ok && e.NotFound() {
10 | 		return true
11 | 	}
12 | 	return false
13 | }
14 | 


--------------------------------------------------------------------------------
/vendor/github.com/segmentio/analytics-go/Readme.md:
--------------------------------------------------------------------------------
1 | # analytics-go
2 | 
3 |   Segment analytics client for Go. For additional documentation
4 |   visit [https://segment.com/docs/libraries/go](https://segment.com/docs/libraries/go/) or view the [godocs](http://godoc.org/github.com/segmentio/analytics-go).
5 | 
6 | ## License
7 | 
8 |  MIT
9 | 


--------------------------------------------------------------------------------
/cmd/convox/templates/init/ruby/docker-compose.yml:
--------------------------------------------------------------------------------
 1 | version: 2
 2 | services:
 3 |   web:
 4 |     build: .
 5 |     command: echo "edit docker-compose.yml with your startup command"
 6 |     labels:
 7 |       - convox.port.443.protocol=tls
 8 |       - convox.port.443.proxy=true
 9 |     ports:
10 |       - 80:4000
11 |       - 443:4001
12 | 


--------------------------------------------------------------------------------
/vendor/github.com/docker/go-units/circle.yml:
--------------------------------------------------------------------------------
 1 | dependencies:
 2 |   post:
 3 |     # install golint
 4 |     - go get github.com/golang/lint/golint
 5 | 
 6 | test:
 7 |   pre:
 8 |     # run analysis before tests
 9 |     - go vet ./...
10 |     - test -z "$(golint ./... | tee /dev/stderr)"
11 |     - test -z "$(gofmt -s -l . | tee /dev/stderr)"
12 | 


--------------------------------------------------------------------------------
/vendor/github.com/stretchr/testify/require/requirements.go:
--------------------------------------------------------------------------------
 1 | package require
 2 | 
 3 | // TestingT is an interface wrapper around *testing.T
 4 | type TestingT interface {
 5 | 	Errorf(format string, args ...interface{})
 6 | 	FailNow()
 7 | }
 8 | 
 9 | //go:generate go run ../_codegen/main.go -output-package=require -template=require.go.tmpl
10 | 


--------------------------------------------------------------------------------
/api/bin/web:
--------------------------------------------------------------------------------
 1 | #!/bin/sh
 2 | 
 3 | # cd to the api root
 4 | cd $(dirname ${0:-})/..
 5 | 
 6 | ./bin/gen-cert
 7 | 
 8 | haproxy -f /etc/haproxy/haproxy.cfg &
 9 | 
10 | if [ "$DEVELOPMENT" == "true" ]; then
11 |   $GOPATH/bin/rerun -watch $GOPATH/src/github.com/convox/rack -build github.com/convox/rack/api
12 | else
13 |   $GOPATH/bin/api
14 | fi
15 | 


--------------------------------------------------------------------------------
/vendor/github.com/briandowns/spinner/.travis.yml:
--------------------------------------------------------------------------------
 1 | language: go
 2 | go:
 3 |   - 1.3.3
 4 |   - 1.4.1
 5 |   - 1.4.2
 6 | env:
 7 |   - GOARCH: amd64
 8 |   - GOARCH: 386
 9 | script:
10 |   - go test -v
11 | notifications:
12 |   email:
13 |     recipients:
14 |       - brian.downs@gmail.com
15 |     on_success: change
16 |     on_failure: always
17 | 


--------------------------------------------------------------------------------
/vendor/github.com/cheggaaa/pb/reader.go:
--------------------------------------------------------------------------------
 1 | package pb
 2 | 
 3 | import (
 4 | 	"io"
 5 | )
 6 | 
 7 | // It's proxy reader, implement io.Reader
 8 | type Reader struct {
 9 | 	io.Reader
10 | 	bar *ProgressBar
11 | }
12 | 
13 | func (r *Reader) Read(p []byte) (n int, err error) {
14 | 	n, err = r.Reader.Read(p)
15 | 	r.bar.Add(n)
16 | 	return
17 | }
18 | 


--------------------------------------------------------------------------------
/vendor/github.com/docker/docker/pkg/system/umask.go:
--------------------------------------------------------------------------------
 1 | // +build !windows
 2 | 
 3 | package system
 4 | 
 5 | import (
 6 | 	"syscall"
 7 | )
 8 | 
 9 | // Umask sets current process's file mode creation mask to newmask
10 | // and return oldmask.
11 | func Umask(newmask int) (oldmask int, err error) {
12 | 	return syscall.Umask(newmask), nil
13 | }
14 | 


--------------------------------------------------------------------------------
/vendor/github.com/dustin/go-humanize/humanize.go:
--------------------------------------------------------------------------------
1 | /*
2 | Package humanize converts boring ugly numbers to human-friendly strings and back.
3 | 
4 | Durations can be turned into strings such as "3 days ago", numbers
5 | representing sizes like 82854982 into useful strings like, "83MB" or
6 | "79MiB" (whichever you prefer).
7 | */
8 | package humanize
9 | 


--------------------------------------------------------------------------------
/vendor/github.com/fsouza/go-dockerclient/DOCKER-LICENSE:
--------------------------------------------------------------------------------
1 |                                  Apache License
2 |                            Version 2.0, January 2004
3 |                         http://www.apache.org/licenses/
4 | 
5 | You can find the Docker license at the following link:
6 | https://raw.githubusercontent.com/docker/docker/master/LICENSE
7 | 


--------------------------------------------------------------------------------
/vendor/github.com/gorilla/context/README.md:
--------------------------------------------------------------------------------
1 | context
2 | =======
3 | [![Build Status](https://travis-ci.org/gorilla/context.png?branch=master)](https://travis-ci.org/gorilla/context)
4 | 
5 | gorilla/context is a general purpose registry for global request variables.
6 | 
7 | Read the full documentation here: http://www.gorillatoolkit.org/pkg/context
8 | 


--------------------------------------------------------------------------------
/vendor/github.com/tinylib/msgp/msgp/appengine.go:
--------------------------------------------------------------------------------
 1 | // +build appengine
 2 | 
 3 | package msgp
 4 | 
 5 | // let's just assume appengine
 6 | // uses 64-bit hardware...
 7 | const smallint = false
 8 | 
 9 | func UnsafeString(b []byte) string {
10 | 	return string(b)
11 | }
12 | 
13 | func UnsafeBytes(s string) []byte {
14 | 	return []byte(s)
15 | }
16 | 


--------------------------------------------------------------------------------
/api/models/fixtures/web_redis.yml:
--------------------------------------------------------------------------------
 1 | web:
 2 |   build: .
 3 |   links:
 4 |     - redis
 5 |   ports:
 6 |     - 80:3000
 7 | redis:
 8 |   image: convox/redis
 9 |   environment:
10 |     - LINK_SCHEME=redis
11 |     - LINK_USERNAME=user
12 |     - LINK_PASSWORD=pass-the-word
13 |     - LINK_PATH=/0
14 |     - LINK_PORT=6379
15 |   ports:
16 |     - 6379
17 | 


--------------------------------------------------------------------------------
/vendor/github.com/docker/docker/pkg/system/path_unix.go:
--------------------------------------------------------------------------------
1 | // +build !windows
2 | 
3 | package system
4 | 
5 | // DefaultPathEnv is unix style list of directories to search for
6 | // executables. Each directory is separated from the next by a colon
7 | // ':' character .
8 | const DefaultPathEnv = "/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
9 | 


--------------------------------------------------------------------------------
/vendor/github.com/docker/docker/pkg/system/utimes_unsupported.go:
--------------------------------------------------------------------------------
 1 | // +build !linux,!freebsd,!darwin
 2 | 
 3 | package system
 4 | 
 5 | import "syscall"
 6 | 
 7 | // LUtimesNano is not supported on platforms other than linux, freebsd and darwin.
 8 | func LUtimesNano(path string, ts []syscall.Timespec) error {
 9 | 	return ErrNotSupportedPlatform
10 | }
11 | 


--------------------------------------------------------------------------------
/vendor/github.com/equinox-io/equinox/internal/go-update/internal/binarydist/Readme.md:
--------------------------------------------------------------------------------
1 | # binarydist
2 | 
3 | Package binarydist implements binary diff and patch as described on
4 | . It reads and writes files
5 | compatible with the tools there.
6 | 
7 | Documentation at .
8 | 


--------------------------------------------------------------------------------
/vendor/github.com/tinylib/msgp/msgp/advise_other.go:
--------------------------------------------------------------------------------
 1 | // +build !linux appengine
 2 | 
 3 | package msgp
 4 | 
 5 | import (
 6 | 	"os"
 7 | )
 8 | 
 9 | // TODO: darwin, BSD support
10 | 
11 | func adviseRead(mem []byte) {}
12 | 
13 | func adviseWrite(mem []byte) {}
14 | 
15 | func fallocate(f *os.File, sz int64) error {
16 | 	return f.Truncate(sz)
17 | }
18 | 


--------------------------------------------------------------------------------
/api/models/fixtures/Makefile:
--------------------------------------------------------------------------------
 1 | FIXTURES := $(shell find . -name '*.yml')
 2 | MANIFESTS := $(FIXTURES:%.yml=%.json)
 3 | 
 4 | .PHONY: all fixture
 5 | 
 6 | all: fixture $(MANIFESTS)
 7 | 
 8 | fixture:
 9 | 	go build -o ./fixture fixture.go
10 | 
11 | %.json: %.yml
12 | 	env AWS_REGION=test PROVIDER=test CLUSTER=convox-test RACK=convox-test ./fixture $< > $@
13 | 


--------------------------------------------------------------------------------
/cmd/convox/Makefile:
--------------------------------------------------------------------------------
 1 | .PHONY: all release templates vendor
 2 | 
 3 | all: templates
 4 | 
 5 | release:
 6 | 	equinox release --config=.equinox.yaml --version=$(shell convox/convox --version | cut -d' ' -f3) .
 7 | 
 8 | templates:
 9 | 	go-bindata -pkg=templates -modtime=1475420665 -prefix=templates -o=templates/templates.go -ignore=templates.go templates/...
10 | 


--------------------------------------------------------------------------------
/vendor/github.com/aws/aws-sdk-go/aws/credentials/example.ini:
--------------------------------------------------------------------------------
 1 | [default]
 2 | aws_access_key_id = accessKey
 3 | aws_secret_access_key = secret
 4 | aws_session_token = token
 5 | 
 6 | [no_token]
 7 | aws_access_key_id = accessKey
 8 | aws_secret_access_key = secret
 9 | 
10 | [with_colon]
11 | aws_access_key_id: accessKey
12 | aws_secret_access_key: secret
13 | 


--------------------------------------------------------------------------------
/vendor/github.com/aws/aws-sdk-go/private/model/api/exportable_name.go:
--------------------------------------------------------------------------------
 1 | package api
 2 | 
 3 | import "strings"
 4 | 
 5 | // ExportableName a name which is exportable as a value or name in Go code
 6 | func (a *API) ExportableName(name string) string {
 7 | 	if name == "" {
 8 | 		return name
 9 | 	}
10 | 
11 | 	return strings.ToUpper(name[0:1]) + name[1:]
12 | }
13 | 


--------------------------------------------------------------------------------
/vendor/github.com/cheggaaa/pb/pb_appengine.go:
--------------------------------------------------------------------------------
 1 | // +build appengine
 2 | 
 3 | package pb
 4 | 
 5 | import "errors"
 6 | 
 7 | // terminalWidth returns width of the terminal, which is not supported
 8 | // and should always failed on appengine classic which is a sandboxed PaaS.
 9 | func terminalWidth() (int, error) {
10 | 	return 0, errors.New("Not supported")
11 | }
12 | 


--------------------------------------------------------------------------------
/vendor/github.com/docker/docker/pkg/archive/time_unsupported.go:
--------------------------------------------------------------------------------
 1 | // +build !linux
 2 | 
 3 | package archive
 4 | 
 5 | import (
 6 | 	"syscall"
 7 | 	"time"
 8 | )
 9 | 
10 | func timeToTimespec(time time.Time) (ts syscall.Timespec) {
11 | 	nsec := int64(0)
12 | 	if !time.IsZero() {
13 | 		nsec = time.UnixNano()
14 | 	}
15 | 	return syscall.NsecToTimespec(nsec)
16 | }
17 | 


--------------------------------------------------------------------------------
/vendor/github.com/docker/docker/pkg/ioutils/scheduler_gccgo.go:
--------------------------------------------------------------------------------
 1 | // +build gccgo
 2 | 
 3 | package ioutils
 4 | 
 5 | import (
 6 | 	"runtime"
 7 | )
 8 | 
 9 | func callSchedulerIfNecessary() {
10 | 	//allow or force Go scheduler to switch context, without explicitly
11 | 	//forcing this will make it hang when using gccgo implementation
12 | 	runtime.Gosched()
13 | }
14 | 


--------------------------------------------------------------------------------
/provider/aws/lambda/fluentd/vendor/github.com/tinylib/msgp/msgp/appengine.go:
--------------------------------------------------------------------------------
 1 | // +build appengine
 2 | 
 3 | package msgp
 4 | 
 5 | // let's just assume appengine
 6 | // uses 64-bit hardware...
 7 | const smallint = false
 8 | 
 9 | func UnsafeString(b []byte) string {
10 | 	return string(b)
11 | }
12 | 
13 | func UnsafeBytes(s string) []byte {
14 | 	return []byte(s)
15 | }
16 | 


--------------------------------------------------------------------------------
/test/error.go:
--------------------------------------------------------------------------------
 1 | package test
 2 | 
 3 | // ErrorNotFound means the requested item was not found
 4 | type ErrorNotFound string
 5 | 
 6 | // Error satisfies the error interface
 7 | func (e ErrorNotFound) Error() string {
 8 | 	return string(e)
 9 | }
10 | 
11 | // NotFound defines the behavior of this error
12 | func (e ErrorNotFound) NotFound() bool {
13 | 	return true
14 | }
15 | 


--------------------------------------------------------------------------------
/vendor/github.com/stretchr/objx/security.go:
--------------------------------------------------------------------------------
 1 | package objx
 2 | 
 3 | import (
 4 | 	"crypto/sha1"
 5 | 	"encoding/hex"
 6 | )
 7 | 
 8 | // HashWithKey hashes the specified string using the security
 9 | // key.
10 | func HashWithKey(data, key string) string {
11 | 	hash := sha1.New()
12 | 	hash.Write([]byte(data + ":" + key))
13 | 	return hex.EncodeToString(hash.Sum(nil))
14 | }
15 | 


--------------------------------------------------------------------------------
/cmd/changes/main.go:
--------------------------------------------------------------------------------
 1 | package main
 2 | 
 3 | import (
 4 | 	"fmt"
 5 | 	"os"
 6 | 
 7 | 	"github.com/convox/rack/changes"
 8 | )
 9 | 
10 | func main() {
11 | 	ch := make(chan changes.Change)
12 | 
13 | 	for _, watch := range os.Args[1:] {
14 | 		changes.Watch(watch, ch)
15 | 	}
16 | 
17 | 	for c := range ch {
18 | 		fmt.Printf("%s|%s|%s\n", c.Operation, c.Base, c.Path)
19 | 	}
20 | }
21 | 


--------------------------------------------------------------------------------
/provider/aws/docker_test.go:
--------------------------------------------------------------------------------
 1 | package aws_test
 2 | 
 3 | import (
 4 | 	"net/http/httptest"
 5 | 	"os"
 6 | 
 7 | 	"github.com/convox/rack/api/awsutil"
 8 | )
 9 | 
10 | func stubDocker(cycles ...awsutil.Cycle) *httptest.Server {
11 | 	handler := awsutil.NewHandler(cycles)
12 | 	s := httptest.NewServer(handler)
13 | 
14 | 	os.Setenv("DOCKER_HOST", s.URL[7:])
15 | 
16 | 	return s
17 | }
18 | 


--------------------------------------------------------------------------------
/provider/aws/lambda/fluentd/vendor/github.com/tinylib/msgp/msgp/advise_other.go:
--------------------------------------------------------------------------------
 1 | // +build !linux appengine
 2 | 
 3 | package msgp
 4 | 
 5 | import (
 6 | 	"os"
 7 | )
 8 | 
 9 | // TODO: darwin, BSD support
10 | 
11 | func adviseRead(mem []byte) {}
12 | 
13 | func adviseWrite(mem []byte) {}
14 | 
15 | func fallocate(f *os.File, sz int64) error {
16 | 	return f.Truncate(sz)
17 | }
18 | 


--------------------------------------------------------------------------------
/vendor/github.com/Sirupsen/logrus/terminal_solaris.go:
--------------------------------------------------------------------------------
 1 | // +build solaris
 2 | 
 3 | package logrus
 4 | 
 5 | import (
 6 | 	"os"
 7 | 
 8 | 	"golang.org/x/sys/unix"
 9 | )
10 | 
11 | // IsTerminal returns true if the given file descriptor is a terminal.
12 | func IsTerminal() bool {
13 | 	_, err := unix.IoctlGetTermios(int(os.Stdout.Fd()), unix.TCGETA)
14 | 	return err == nil
15 | }
16 | 


--------------------------------------------------------------------------------
/vendor/github.com/aws/aws-sdk-go/private/util/sort_keys.go:
--------------------------------------------------------------------------------
 1 | package util
 2 | 
 3 | import "sort"
 4 | 
 5 | // SortedKeys returns a sorted slice of keys of a map.
 6 | func SortedKeys(m map[string]interface{}) []string {
 7 | 	i, sorted := 0, make([]string, len(m))
 8 | 	for k := range m {
 9 | 		sorted[i] = k
10 | 		i++
11 | 	}
12 | 	sort.Strings(sorted)
13 | 	return sorted
14 | }
15 | 


--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/constants.go:
--------------------------------------------------------------------------------
 1 | // Copyright 2015 The Go Authors. All rights reserved.
 2 | // Use of this source code is governed by a BSD-style
 3 | // license that can be found in the LICENSE file.
 4 | 
 5 | // +build darwin dragonfly freebsd linux netbsd openbsd solaris
 6 | 
 7 | package unix
 8 | 
 9 | const (
10 | 	R_OK = 0x4
11 | 	W_OK = 0x2
12 | 	X_OK = 0x1
13 | )
14 | 


--------------------------------------------------------------------------------
/bin/test:
--------------------------------------------------------------------------------
 1 | #!/bin/bash
 2 | 
 3 | set -e
 4 | 
 5 | go get -t ./...
 6 | 
 7 | rm -f coverage.txt
 8 | 
 9 | for d in $(find . -not \( -name vendor -prune \) -name '*.go' -exec dirname {} \; | sort -u); do
10 |   go test -coverprofile=profile.out -covermode=atomic $d
11 | 
12 |   if [ -f profile.out ]; then
13 |     cat profile.out >> coverage.txt
14 |     rm profile.out
15 |   fi
16 | done
17 | 


--------------------------------------------------------------------------------
/cmd/convox/templates/init/ruby/Dockerfile:
--------------------------------------------------------------------------------
 1 | FROM convox/ruby
 2 | 
 3 | # copy only the files needed for bundle install
 4 | # uncomment the vendor/cache line if you `bundle package` your gems
 5 | COPY Gemfile      /app/Gemfile
 6 | COPY Gemfile.lock /app/Gemfile.lock
 7 | # COPY vendor/cache /app/vendor/cache
 8 | RUN bundle install
 9 | 
10 | # copy the rest of the app
11 | COPY . /app
12 | 


--------------------------------------------------------------------------------
/vendor/github.com/aws/aws-sdk-go/aws/client/metadata/client_info.go:
--------------------------------------------------------------------------------
 1 | package metadata
 2 | 
 3 | // ClientInfo wraps immutable data from the client.Client structure.
 4 | type ClientInfo struct {
 5 | 	ServiceName   string
 6 | 	APIVersion    string
 7 | 	Endpoint      string
 8 | 	SigningName   string
 9 | 	SigningRegion string
10 | 	JSONVersion   string
11 | 	TargetPrefix  string
12 | }
13 | 


--------------------------------------------------------------------------------
/vendor/github.com/aws/aws-sdk-go/service/sts/customizations.go:
--------------------------------------------------------------------------------
 1 | package sts
 2 | 
 3 | import "github.com/aws/aws-sdk-go/aws/request"
 4 | 
 5 | func init() {
 6 | 	initRequest = func(r *request.Request) {
 7 | 		switch r.Operation.Name {
 8 | 		case opAssumeRoleWithSAML, opAssumeRoleWithWebIdentity:
 9 | 			r.Handlers.Sign.Clear() // these operations are unsigned
10 | 		}
11 | 	}
12 | }
13 | 


--------------------------------------------------------------------------------
/vendor/github.com/briandowns/spinner/CONTRIBUTING:
--------------------------------------------------------------------------------
 1 | CONTRIBUTING
 2 | 
 3 | 1.  Fork
 4 | 2.  Clone
 5 | 3.  Pull Request w/detail
 6 | 
 7 | Please make sure to log an issue if you're contributing a bug fix.
 8 | 
 9 | CONTRIBUTORS
10 | 
11 | https://github.com/briandowns/spinner/graphs/contributors
12 | 
13 | briandowns
14 | millere
15 | alexaandru
16 | ChrisMcKenzie
17 | divan
18 | Naimix
19 | 


--------------------------------------------------------------------------------
/vendor/github.com/docker/docker/pkg/promise/promise.go:
--------------------------------------------------------------------------------
 1 | package promise
 2 | 
 3 | // Go is a basic promise implementation: it wraps calls a function in a goroutine,
 4 | // and returns a channel which will later return the function's return value.
 5 | func Go(f func() error) chan error {
 6 | 	ch := make(chan error, 1)
 7 | 	go func() {
 8 | 		ch <- f()
 9 | 	}()
10 | 	return ch
11 | }
12 | 


--------------------------------------------------------------------------------
/changes/cmd/changed/main.go:
--------------------------------------------------------------------------------
 1 | package main
 2 | 
 3 | import (
 4 | 	"fmt"
 5 | 	"os"
 6 | 
 7 | 	"github.com/convox/rack/changes"
 8 | )
 9 | 
10 | func main() {
11 | 	ch := make(chan changes.Change)
12 | 
13 | 	for _, watch := range os.Args[1:] {
14 | 		go changes.Watch(watch, ch)
15 | 	}
16 | 
17 | 	for c := range ch {
18 | 		fmt.Printf("%s|%s|%s\n", c.Operation, c.Base, c.Path)
19 | 	}
20 | }
21 | 


--------------------------------------------------------------------------------
/client/token.go:
--------------------------------------------------------------------------------
 1 | package client
 2 | 
 3 | func (c *Client) RegenerateToken(email, password string) (string, error) {
 4 | 	params := Params{
 5 | 		"email":    email,
 6 | 		"password": password,
 7 | 	}
 8 | 
 9 | 	result := map[string]string{}
10 | 
11 | 	err := c.Post("/token", params, &result)
12 | 	if err != nil {
13 | 		return "", err
14 | 	}
15 | 
16 | 	return result["token"], nil
17 | }
18 | 


--------------------------------------------------------------------------------
/cmd/convox/templates/init/sinatra/Dockerfile:
--------------------------------------------------------------------------------
 1 | FROM convox/sinatra
 2 | 
 3 | # copy only the files needed for bundle install
 4 | # uncomment the vendor/cache line if you `bundle package` your gems
 5 | COPY Gemfile      /app/Gemfile
 6 | COPY Gemfile.lock /app/Gemfile.lock
 7 | # COPY vendor/cache /app/vendor/cache
 8 | RUN bundle install
 9 | 
10 | # copy the rest of the app
11 | COPY . /app
12 | 


--------------------------------------------------------------------------------
/vendor/github.com/Sirupsen/logrus/terminal_linux.go:
--------------------------------------------------------------------------------
 1 | // Based on ssh/terminal:
 2 | // Copyright 2013 The Go Authors. All rights reserved.
 3 | // Use of this source code is governed by a BSD-style
 4 | // license that can be found in the LICENSE file.
 5 | 
 6 | package logrus
 7 | 
 8 | import "syscall"
 9 | 
10 | const ioctlReadTermios = syscall.TCGETS
11 | 
12 | type Termios syscall.Termios
13 | 


--------------------------------------------------------------------------------
/vendor/github.com/robfig/cron/.gitignore:
--------------------------------------------------------------------------------
 1 | # Compiled Object files, Static and Dynamic libs (Shared Objects)
 2 | *.o
 3 | *.a
 4 | *.so
 5 | 
 6 | # Folders
 7 | _obj
 8 | _test
 9 | 
10 | # Architecture specific extensions/prefixes
11 | *.[568vq]
12 | [568vq].out
13 | 
14 | *.cgo1.go
15 | *.cgo2.c
16 | _cgo_defun.c
17 | _cgo_gotypes.go
18 | _cgo_export.*
19 | 
20 | _testmain.go
21 | 
22 | *.exe
23 | 


--------------------------------------------------------------------------------
/client/notify_event.go:
--------------------------------------------------------------------------------
 1 | package client
 2 | 
 3 | import "time"
 4 | 
 5 | //a NotifyEvent is the payload of any webhook services
 6 | //it is serialized to json
 7 | type NotifyEvent struct {
 8 | 	Action    string            `json:"action"`
 9 | 	Status    string            `json:"status"`
10 | 	Data      map[string]string `json:"data"`
11 | 	Timestamp time.Time         `json:"timestamp"`
12 | }
13 | 


--------------------------------------------------------------------------------
/vendor/github.com/docker/docker/pkg/archive/time_linux.go:
--------------------------------------------------------------------------------
 1 | package archive
 2 | 
 3 | import (
 4 | 	"syscall"
 5 | 	"time"
 6 | )
 7 | 
 8 | func timeToTimespec(time time.Time) (ts syscall.Timespec) {
 9 | 	if time.IsZero() {
10 | 		// Return UTIME_OMIT special value
11 | 		ts.Sec = 0
12 | 		ts.Nsec = ((1 << 30) - 2)
13 | 		return
14 | 	}
15 | 	return syscall.NsecToTimespec(time.UnixNano())
16 | }
17 | 


--------------------------------------------------------------------------------
/vendor/github.com/stretchr/objx/.gitignore:
--------------------------------------------------------------------------------
 1 | # Compiled Object files, Static and Dynamic libs (Shared Objects)
 2 | *.o
 3 | *.a
 4 | *.so
 5 | 
 6 | # Folders
 7 | _obj
 8 | _test
 9 | 
10 | # Architecture specific extensions/prefixes
11 | *.[568vq]
12 | [568vq].out
13 | 
14 | *.cgo1.go
15 | *.cgo2.c
16 | _cgo_defun.c
17 | _cgo_gotypes.go
18 | _cgo_export.*
19 | 
20 | _testmain.go
21 | 
22 | *.exe
23 | 


--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/syscall_no_getwd.go:
--------------------------------------------------------------------------------
 1 | // Copyright 2013 The Go Authors. All rights reserved.
 2 | // Use of this source code is governed by a BSD-style
 3 | // license that can be found in the LICENSE file.
 4 | 
 5 | // +build dragonfly freebsd netbsd openbsd
 6 | 
 7 | package unix
 8 | 
 9 | const ImplementsGetwd = false
10 | 
11 | func Getwd() (string, error) { return "", ENOTSUP }
12 | 


--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/zsysnum_solaris_amd64.go:
--------------------------------------------------------------------------------
 1 | // Copyright 2014 The Go Authors. All rights reserved.
 2 | // Use of this source code is governed by a BSD-style
 3 | // license that can be found in the LICENSE file.
 4 | 
 5 | // +build amd64,solaris
 6 | 
 7 | package unix
 8 | 
 9 | // TODO(aram): remove these before Go 1.3.
10 | const (
11 | 	SYS_EXECVE = 59
12 | 	SYS_FCNTL  = 62
13 | )
14 | 


--------------------------------------------------------------------------------
/vendor/github.com/docker/docker/pkg/system/chtimes_unix.go:
--------------------------------------------------------------------------------
 1 | // +build !windows
 2 | 
 3 | package system
 4 | 
 5 | import (
 6 | 	"time"
 7 | )
 8 | 
 9 | //setCTime will set the create time on a file. On Unix, the create
10 | //time is updated as a side effect of setting the modified time, so
11 | //no action is required.
12 | func setCTime(path string, ctime time.Time) error {
13 | 	return nil
14 | }
15 | 


--------------------------------------------------------------------------------
/vendor/github.com/jehiah/go-strftime/.gitignore:
--------------------------------------------------------------------------------
 1 | # Compiled Object files, Static and Dynamic libs (Shared Objects)
 2 | *.o
 3 | *.a
 4 | *.so
 5 | 
 6 | # Folders
 7 | _obj
 8 | _test
 9 | 
10 | # Architecture specific extensions/prefixes
11 | *.[568vq]
12 | [568vq].out
13 | 
14 | *.cgo1.go
15 | *.cgo2.c
16 | _cgo_defun.c
17 | _cgo_gotypes.go
18 | _cgo_export.*
19 | 
20 | _testmain.go
21 | 
22 | *.exe
23 | 


--------------------------------------------------------------------------------
/api/models/fixtures/web_postgis_internal.yml:
--------------------------------------------------------------------------------
 1 | web:
 2 |   build: .
 3 |   environment:
 4 |    - AWS_ACCESS_KEY
 5 |    - AWS_SECRET_ACCESS_KEY
 6 |   links:
 7 |     - postgres
 8 |   ports:
 9 |     - 3000
10 |   volumes:
11 |     - .:/app
12 | postgres:
13 |   image: mdillon/postgis
14 |   environment:
15 |    - POSTGRES_USERNAME=postgres
16 |    - POSTGRES_PASSWORD=password
17 |   ports:
18 |     - 5432
19 | 


--------------------------------------------------------------------------------
/ci/install.sh:
--------------------------------------------------------------------------------
 1 | #!/bin/bash
 2 | set -ex -o pipefail
 3 | 
 4 | export CIRCLE_ARTIFACTS=${CIRCLE_ARTIFACTS:-/tmp}
 5 | export CIRCLE_BUILD_NUM=${CIRCLE_BUILD_NUM:-0}
 6 | export CONVOX_EMAIL=ci@convox.com
 7 | export STACK_NAME=convox-${CIRCLE_BUILD_NUM}
 8 | export $($(dirname $0)/region.sh ${CIRCLE_NODE_INDEX})
 9 | 
10 | convox install | tee $CIRCLE_ARTIFACTS/convox-installer.log
11 | 
12 | convox instances
13 | 


--------------------------------------------------------------------------------
/cmd/convox/stdcli/time.go:
--------------------------------------------------------------------------------
 1 | package stdcli
 2 | 
 3 | import (
 4 | 	"fmt"
 5 | 	"time"
 6 | )
 7 | 
 8 | func Duration(start, end time.Time) string {
 9 | 	d := end.Sub(start)
10 | 
11 | 	total := int64(d.Seconds())
12 | 	sec := total % 60
13 | 	min := total / 60
14 | 
15 | 	dur := fmt.Sprintf("%ds", sec)
16 | 
17 | 	if min >= 1 {
18 | 		dur = fmt.Sprintf("%dm", min) + dur
19 | 	}
20 | 
21 | 	return dur
22 | }
23 | 


--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/env_unset.go:
--------------------------------------------------------------------------------
 1 | // Copyright 2014 The Go Authors.  All rights reserved.
 2 | // Use of this source code is governed by a BSD-style
 3 | // license that can be found in the LICENSE file.
 4 | 
 5 | // +build go1.4
 6 | 
 7 | package unix
 8 | 
 9 | import "syscall"
10 | 
11 | func Unsetenv(key string) error {
12 | 	// This was added in Go 1.4.
13 | 	return syscall.Unsetenv(key)
14 | }
15 | 


--------------------------------------------------------------------------------
/api/models/fixtures/worker.yml:
--------------------------------------------------------------------------------
 1 | worker:
 2 |   build: .
 3 |   command: bin/work
 4 |   environment:
 5 |    - AWS_ACCESS_KEY
 6 |    - AWS_SECRET_ACCESS_KEY
 7 |   links:
 8 |     - postgres
 9 |   volumes:
10 |     - .:/app
11 |   privileged: true
12 | postgres:
13 |   image: mdillon/postgis
14 |   environment:
15 |    - POSTGRES_USERNAME=postgres
16 |    - POSTGRES_PASSWORD=password
17 |   ports:
18 |     - 5432
19 | 


--------------------------------------------------------------------------------
/vendor/github.com/docker/docker/pkg/system/mknod_windows.go:
--------------------------------------------------------------------------------
 1 | // +build windows
 2 | 
 3 | package system
 4 | 
 5 | // Mknod is not implemented on Windows.
 6 | func Mknod(path string, mode uint32, dev int) error {
 7 | 	return ErrNotSupportedPlatform
 8 | }
 9 | 
10 | // Mkdev is not implemented on Windows.
11 | func Mkdev(major int64, minor int64) uint32 {
12 | 	panic("Mkdev not implemented on Windows.")
13 | }
14 | 


--------------------------------------------------------------------------------
/manifest/fixtures/invalid-link-no-ports.yml:
--------------------------------------------------------------------------------
 1 | version: "2"
 2 | services:
 3 |   web:
 4 |     build: .
 5 |     command: bin/web
 6 |     dockerfile: Dockerfile.dev
 7 |     entrypoint: /sbin/init
 8 |     links:
 9 |       - database
10 |     ports:
11 |       - 80:5000
12 |       - 443:5001
13 |     privileged: true
14 |     volumes:
15 |       - /var/db
16 |   database:
17 |     image: convox/postgres
18 | 
19 | 
20 | 


--------------------------------------------------------------------------------
/vendor/github.com/stretchr/testify/assert/errors.go:
--------------------------------------------------------------------------------
 1 | package assert
 2 | 
 3 | import (
 4 | 	"errors"
 5 | )
 6 | 
 7 | // AnError is an error instance useful for testing.  If the code does not care
 8 | // about error specifics, and only needs to return the error for example, this
 9 | // error should be used to make the test code more readable.
10 | var AnError = errors.New("assert.AnError general error for testing")
11 | 


--------------------------------------------------------------------------------
/api/models/fixtures/web_postgis.yml:
--------------------------------------------------------------------------------
 1 | web:
 2 |   build: .
 3 |   environment:
 4 |    - AWS_ACCESS_KEY
 5 |    - AWS_SECRET_ACCESS_KEY
 6 |   links:
 7 |     - postgres
 8 |   ports:
 9 |     - 80:3000
10 |     - 443:3001
11 |   volumes:
12 |     - .:/app
13 | postgres:
14 |   image: mdillon/postgis
15 |   environment:
16 |    - POSTGRES_USERNAME=postgres
17 |    - POSTGRES_PASSWORD=password
18 |   ports:
19 |     - 5432
20 | 


--------------------------------------------------------------------------------
/vendor/github.com/philhofer/fwd/writer_unsafe.go:
--------------------------------------------------------------------------------
 1 | // +build !appengine
 2 | 
 3 | package fwd
 4 | 
 5 | import (
 6 | 	"reflect"
 7 | 	"unsafe"
 8 | )
 9 | 
10 | // unsafe cast string as []byte
11 | func unsafestr(b string) []byte {
12 | 	l := len(b)
13 | 	return *(*[]byte)(unsafe.Pointer(&reflect.SliceHeader{
14 | 		Len:  l,
15 | 		Cap:  l,
16 | 		Data: (*reflect.StringHeader)(unsafe.Pointer(&b)).Data,
17 | 	}))
18 | }
19 | 


--------------------------------------------------------------------------------
/cmd/convox/templates/init/django/docker-compose.yml:
--------------------------------------------------------------------------------
 1 | version: 2
 2 | services:
 3 |   web:
 4 |     build: .
 5 |     environment:
 6 |       - SECRET_KEY
 7 |     labels:
 8 |       - convox.port.443.protocol=tls
 9 |       - convox.port.443.proxy=true
10 |     links:
11 |       - database
12 |     ports:
13 |       - 80:4000
14 |       - 443:4001
15 |   database:
16 |     image: convox/postgres
17 |     ports:
18 |       - 5432
19 | 


--------------------------------------------------------------------------------
/vendor/github.com/stretchr/objx/constants.go:
--------------------------------------------------------------------------------
 1 | package objx
 2 | 
 3 | const (
 4 | 	// PathSeparator is the character used to separate the elements
 5 | 	// of the keypath.
 6 | 	//
 7 | 	// For example, `location.address.city`
 8 | 	PathSeparator string = "."
 9 | 
10 | 	// SignatureSeparator is the character that is used to
11 | 	// separate the Base64 string from the security signature.
12 | 	SignatureSeparator = "_"
13 | )
14 | 


--------------------------------------------------------------------------------
/provider/aws/lambda/fluentd/vendor-log:
--------------------------------------------------------------------------------
1 | 8ba04e26e7839fc5ccdae3a1d2e0d77515af0f32	github.com/fluent/fluent-logger-golang/fluent
2 | 49abf10b4b3c7cb01992397ec47880e05d65ad85	github.com/jasonmoo/lambda_proc
3 | 9f376300f7b8f2bc858a4fe8a1ee46a455e4c007	github.com/mweagle/Sparta/aws/cloudwatchlogs
4 | 98c11a7a6ec829d672b03833c3d69a7fae1ca972	github.com/philhofer/fwd
5 | bed131cf08ce5d7e7bc47a9bf9ee818a02458ce7	github.com/tinylib/msgp/msgp
6 | 


--------------------------------------------------------------------------------
/vendor/gopkg.in/urfave/cli.v1/.travis.yml:
--------------------------------------------------------------------------------
 1 | language: go
 2 | sudo: false
 3 | 
 4 | go:
 5 | - 1.1.2
 6 | - 1.2.2
 7 | - 1.3.3
 8 | - 1.4
 9 | - 1.5.4
10 | - 1.6.2
11 | - tip
12 | 
13 | matrix:
14 |   allow_failures:
15 |     - go: tip
16 | 
17 | before_script:
18 | - go get github.com/meatballhat/gfmxr/...
19 | 
20 | script:
21 | - go vet ./...
22 | - go test -v ./...
23 | - gfmxr -c $(grep -c 'package main' README.md) -s README.md
24 | 


--------------------------------------------------------------------------------
/ci/tests/example-apps:
--------------------------------------------------------------------------------
 1 | #!/bin/bash
 2 | set -ex -o pipefail
 3 | 
 4 | # Running locally:
 5 | #   CWD shoud be the root Rack directory
 6 | #   install gnu parallel
 7 | #   export CIRCLE_ARTIFACTS=/tmp/
 8 | #   export CIRCLE_BUILD_NUM=0
 9 | #   ./ci/tests/example-apps
10 | 
11 | parallel --joblog $CIRCLE_ARTIFACTS/parallel.log --line-buffer --results $CIRCLE_ARTIFACTS --tag ./ci/tests/example-app {} ::: null rails django node-workers
12 | 


--------------------------------------------------------------------------------
/manifest/fixtures/invalid-link.yml:
--------------------------------------------------------------------------------
 1 | version: "2"
 2 | services:
 3 |   web:
 4 |     build: .
 5 |     command: bin/web
 6 |     dockerfile: Dockerfile.dev
 7 |     entrypoint: /sbin/init
 8 |     links:
 9 |       - database2
10 |     ports:
11 |       - 80:5000
12 |       - 443:5001
13 |     privileged: true
14 |     volumes:
15 |       - /var/db
16 |   database:
17 |     image: convox/postgres
18 |     ports:
19 |       - 5432
20 | 
21 | 


--------------------------------------------------------------------------------
/vendor/golang.org/x/crypto/ssh/terminal/util_bsd.go:
--------------------------------------------------------------------------------
 1 | // Copyright 2013 The Go Authors. All rights reserved.
 2 | // Use of this source code is governed by a BSD-style
 3 | // license that can be found in the LICENSE file.
 4 | 
 5 | // +build darwin dragonfly freebsd netbsd openbsd
 6 | 
 7 | package terminal
 8 | 
 9 | import "syscall"
10 | 
11 | const ioctlReadTermios = syscall.TIOCGETA
12 | const ioctlWriteTermios = syscall.TIOCSETA
13 | 


--------------------------------------------------------------------------------
/cmd/convox/helpers.go:
--------------------------------------------------------------------------------
 1 | package main
 2 | 
 3 | import (
 4 | 	"os"
 5 | 	"time"
 6 | 
 7 | 	"github.com/dustin/go-humanize"
 8 | )
 9 | 
10 | func exists(filename string) bool {
11 | 	if _, err := os.Stat(filename); os.IsNotExist(err) {
12 | 		return false
13 | 	}
14 | 
15 | 	return true
16 | }
17 | 
18 | func humanizeTime(t time.Time) string {
19 | 	if t.IsZero() {
20 | 		return ""
21 | 	} else {
22 | 		return humanize.Time(t)
23 | 	}
24 | }
25 | 


--------------------------------------------------------------------------------
/vendor/github.com/docker/docker/pkg/system/stat_solaris.go:
--------------------------------------------------------------------------------
 1 | // +build solaris
 2 | 
 3 | package system
 4 | 
 5 | import (
 6 | 	"syscall"
 7 | )
 8 | 
 9 | // fromStatT creates a system.StatT type from a syscall.Stat_t type
10 | func fromStatT(s *syscall.Stat_t) (*StatT, error) {
11 | 	return &StatT{size: s.Size,
12 | 		mode: uint32(s.Mode),
13 | 		uid:  s.Uid,
14 | 		gid:  s.Gid,
15 | 		rdev: uint64(s.Rdev),
16 | 		mtim: s.Mtim}, nil
17 | }
18 | 


--------------------------------------------------------------------------------
/provider/aws/lambda/fluentd/vendor/github.com/philhofer/fwd/writer_unsafe.go:
--------------------------------------------------------------------------------
 1 | // +build !appengine
 2 | 
 3 | package fwd
 4 | 
 5 | import (
 6 | 	"reflect"
 7 | 	"unsafe"
 8 | )
 9 | 
10 | // unsafe cast string as []byte
11 | func unsafestr(b string) []byte {
12 | 	l := len(b)
13 | 	return *(*[]byte)(unsafe.Pointer(&reflect.SliceHeader{
14 | 		Len:  l,
15 | 		Cap:  l,
16 | 		Data: (*reflect.StringHeader)(unsafe.Pointer(&b)).Data,
17 | 	}))
18 | }
19 | 


--------------------------------------------------------------------------------
/vendor/github.com/cheggaaa/pb/runecount.go:
--------------------------------------------------------------------------------
 1 | package pb
 2 | 
 3 | import (
 4 | 	"regexp"
 5 | 	"unicode/utf8"
 6 | )
 7 | 
 8 | // Finds the control character sequences (like colors)
 9 | var ctrlFinder = regexp.MustCompile("\x1b\x5b[0-9]+\x6d")
10 | 
11 | func escapeAwareRuneCountInString(s string) int {
12 | 	n := utf8.RuneCountInString(s)
13 | 	for _, sm := range ctrlFinder.FindAllString(s, -1) {
14 | 		n -= len(sm)
15 | 	}
16 | 	return n
17 | }
18 | 


--------------------------------------------------------------------------------
/cmd/convox/api_test.go:
--------------------------------------------------------------------------------
 1 | package main
 2 | 
 3 | import (
 4 | 	"testing"
 5 | 
 6 | 	"github.com/convox/rack/test"
 7 | )
 8 | 
 9 | func TestApiGet(t *testing.T) {
10 | 	ts := testServer(t,
11 | 		test.Http{Method: "GET", Path: "/foo", Code: 200, Response: "bar"},
12 | 	)
13 | 	defer ts.Close()
14 | 
15 | 	test.Runs(t,
16 | 		test.ExecRun{
17 | 			Command: "convox api get /foo",
18 | 			Exit:    0,
19 | 			Stdout:  "\"bar\"\n",
20 | 		},
21 | 	)
22 | }
23 | 


--------------------------------------------------------------------------------
/vendor/github.com/briandowns/spinner/state_string.go:
--------------------------------------------------------------------------------
 1 | // generated by stringer -type=state; DO NOT EDIT
 2 | 
 3 | package spinner
 4 | 
 5 | import "fmt"
 6 | 
 7 | const _state_name = "stoppedrunning"
 8 | 
 9 | var _state_index = [...]uint8{0, 7, 14}
10 | 
11 | func (i state) String() string {
12 | 	if i+1 >= state(len(_state_index)) {
13 | 		return fmt.Sprintf("state(%d)", i)
14 | 	}
15 | 	return _state_name[_state_index[i]:_state_index[i+1]]
16 | }
17 | 


--------------------------------------------------------------------------------
/api/structs/registry.go:
--------------------------------------------------------------------------------
 1 | package structs
 2 | 
 3 | type Registry struct {
 4 | 	Server   string `json:"server"`
 5 | 	Username string `json:"username"`
 6 | 	Password string `json:"password"`
 7 | }
 8 | 
 9 | type Registries []Registry
10 | 
11 | func (r Registries) Len() int           { return len(r) }
12 | func (r Registries) Less(i, j int) bool { return r[i].Server < r[j].Server }
13 | func (r Registries) Swap(i, j int)      { r[i], r[j] = r[j], r[i] }
14 | 


--------------------------------------------------------------------------------
/api/structs/formation.go:
--------------------------------------------------------------------------------
 1 | package structs
 2 | 
 3 | // ProcessFormation represents the formation for a Process
 4 | type ProcessFormation struct {
 5 | 	Balancer string `json:"balancer"`
 6 | 	Name     string `json:"name"`
 7 | 	Count    int    `json:"count"`
 8 | 	Memory   int    `json:"memory"`
 9 | 	CPU      int    `json:"cpu"`
10 | 	Ports    []int  `json:"ports"`
11 | }
12 | 
13 | // Formation represents the formation for an App
14 | type Formation []ProcessFormation
15 | 


--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/flock_linux_32bit.go:
--------------------------------------------------------------------------------
 1 | // +build linux,386 linux,arm
 2 | 
 3 | // Copyright 2014 The Go Authors. All rights reserved.
 4 | // Use of this source code is governed by a BSD-style
 5 | // license that can be found in the LICENSE file.
 6 | 
 7 | package unix
 8 | 
 9 | func init() {
10 | 	// On 32-bit Linux systems, the fcntl syscall that matches Go's
11 | 	// Flock_t type is SYS_FCNTL64, not SYS_FCNTL.
12 | 	fcntl64Syscall = SYS_FCNTL64
13 | }
14 | 


--------------------------------------------------------------------------------
/api/structs/capacity.go:
--------------------------------------------------------------------------------
 1 | package structs
 2 | 
 3 | type Capacity struct {
 4 | 	ClusterCPU     int64 `json:"cluster-cpu"`
 5 | 	ClusterMemory  int64 `json:"cluster-memory"`
 6 | 	InstanceCPU    int64 `json:"instance-cpu"`
 7 | 	InstanceMemory int64 `json:"instance-memory"`
 8 | 	ProcessCount   int64 `json:"process-count"`
 9 | 	ProcessCPU     int64 `json:"process-cpu"`
10 | 	ProcessMemory  int64 `json:"process-memory"`
11 | 	ProcessWidth   int64 `json:"process-width"`
12 | }
13 | 


--------------------------------------------------------------------------------
/api/structs/event.go:
--------------------------------------------------------------------------------
 1 | package structs
 2 | 
 3 | import "time"
 4 | 
 5 | type Event struct {
 6 | 	Action    string            `json:"action"` // app:create, release:create, release:promote, etc.
 7 | 	Status    string            `json:"status"` // success or error
 8 | 	Data      map[string]string `json:"data"`   // {"rack": "example-rack", "app": "example-app", "id": "R123456789", "message": "unable to load release"}
 9 | 	Timestamp time.Time         `json:"timestamp"`
10 | }
11 | 


--------------------------------------------------------------------------------
/vendor/github.com/docker/docker/pkg/system/stat_unsupported.go:
--------------------------------------------------------------------------------
 1 | // +build !linux,!windows,!freebsd,!solaris
 2 | 
 3 | package system
 4 | 
 5 | import (
 6 | 	"syscall"
 7 | )
 8 | 
 9 | // fromStatT creates a system.StatT type from a syscall.Stat_t type
10 | func fromStatT(s *syscall.Stat_t) (*StatT, error) {
11 | 	return &StatT{size: s.Size,
12 | 		mode: uint32(s.Mode),
13 | 		uid:  s.Uid,
14 | 		gid:  s.Gid,
15 | 		rdev: uint64(s.Rdev),
16 | 		mtim: s.Mtimespec}, nil
17 | }
18 | 


--------------------------------------------------------------------------------
/vendor/github.com/stretchr/objx/tests.go:
--------------------------------------------------------------------------------
 1 | package objx
 2 | 
 3 | // Has gets whether there is something at the specified selector
 4 | // or not.
 5 | //
 6 | // If m is nil, Has will always return false.
 7 | func (m Map) Has(selector string) bool {
 8 | 	if m == nil {
 9 | 		return false
10 | 	}
11 | 	return !m.Get(selector).IsNil()
12 | }
13 | 
14 | // IsNil gets whether the data is nil or not.
15 | func (v *Value) IsNil() bool {
16 | 	return v == nil || v.data == nil
17 | }
18 | 


--------------------------------------------------------------------------------
/provider/aws/lambda/lifecycle/bin/upload:
--------------------------------------------------------------------------------
 1 | #!/bin/sh
 2 | 
 3 | set -e
 4 | 
 5 | rack=$1
 6 | 
 7 | if [ "$rack" == "" ]; then
 8 |   echo "usage: upload "
 9 |   exit 1
10 | fi
11 | 
12 | func=$(\
13 |   aws cloudformation describe-stack-resources --stack-name ${rack} |\
14 |   jq -r '.StackResources[]|select(.LogicalResourceId=="InstancesLifecycleHandler").PhysicalResourceId' \
15 | )
16 | 
17 | aws lambda update-function-code --function-name $func --zip fileb://lambda.zip
18 | 


--------------------------------------------------------------------------------
/vendor/github.com/docker/docker/pkg/system/xattrs_unsupported.go:
--------------------------------------------------------------------------------
 1 | // +build !linux
 2 | 
 3 | package system
 4 | 
 5 | // Lgetxattr is not supported on platforms other than linux.
 6 | func Lgetxattr(path string, attr string) ([]byte, error) {
 7 | 	return nil, ErrNotSupportedPlatform
 8 | }
 9 | 
10 | // Lsetxattr is not supported on platforms other than linux.
11 | func Lsetxattr(path string, attr string, data []byte, flags int) error {
12 | 	return ErrNotSupportedPlatform
13 | }
14 | 


--------------------------------------------------------------------------------
/vendor/github.com/shiena/ansicolor/.gitignore:
--------------------------------------------------------------------------------
 1 | # Created by http://www.gitignore.io
 2 | 
 3 | ### Go ###
 4 | # Compiled Object files, Static and Dynamic libs (Shared Objects)
 5 | *.o
 6 | *.a
 7 | *.so
 8 | 
 9 | # Folders
10 | _obj
11 | _test
12 | 
13 | # Architecture specific extensions/prefixes
14 | *.[568vq]
15 | [568vq].out
16 | 
17 | *.cgo1.go
18 | *.cgo2.c
19 | _cgo_defun.c
20 | _cgo_gotypes.go
21 | _cgo_export.*
22 | 
23 | _testmain.go
24 | 
25 | *.exe
26 | *.test
27 | 
28 | 


--------------------------------------------------------------------------------
/vendor/github.com/mattn/go-isatty/isatty_linux.go:
--------------------------------------------------------------------------------
 1 | // +build linux
 2 | 
 3 | package isatty
 4 | 
 5 | import (
 6 | 	"syscall"
 7 | 	"unsafe"
 8 | )
 9 | 
10 | const ioctlReadTermios = syscall.TCGETS
11 | 
12 | // IsTerminal return true if the file descriptor is terminal.
13 | func IsTerminal(fd uintptr) bool {
14 | 	var termios syscall.Termios
15 | 	_, _, err := syscall.Syscall6(syscall.SYS_IOCTL, fd, ioctlReadTermios, uintptr(unsafe.Pointer(&termios)), 0, 0, 0)
16 | 	return err == 0
17 | }
18 | 


--------------------------------------------------------------------------------
/vendor/github.com/shiena/ansicolor/ansicolor_ansi.go:
--------------------------------------------------------------------------------
 1 | // Copyright 2014 shiena Authors. All rights reserved.
 2 | // Use of this source code is governed by a MIT-style
 3 | // license that can be found in the LICENSE file.
 4 | 
 5 | // +build !windows
 6 | 
 7 | package ansicolor
 8 | 
 9 | import "io"
10 | 
11 | type ansiColorWriter struct {
12 | 	w    io.Writer
13 | 	mode outputMode
14 | }
15 | 
16 | func (cw *ansiColorWriter) Write(p []byte) (int, error) {
17 | 	return cw.w.Write(p)
18 | }
19 | 


--------------------------------------------------------------------------------
/api/cmd/build/helpers.go:
--------------------------------------------------------------------------------
 1 | package main
 2 | 
 3 | import (
 4 | 	"crypto/rand"
 5 | 	"math/big"
 6 | )
 7 | 
 8 | var (
 9 | 	idAlphabet = []rune("ABCDEFGHIJKLMNOPQRSTUVWXYZ")
10 | )
11 | 
12 | func id(prefix string, size int) string {
13 | 	b := make([]rune, size)
14 | 	for i := range b {
15 | 		idx, err := rand.Int(rand.Reader, big.NewInt(int64(len(idAlphabet))))
16 | 		if err != nil {
17 | 			panic(err)
18 | 		}
19 | 		b[i] = idAlphabet[idx.Int64()]
20 | 	}
21 | 	return prefix + string(b)
22 | }
23 | 


--------------------------------------------------------------------------------
/vendor/github.com/docker/docker/pkg/system/lstat.go:
--------------------------------------------------------------------------------
 1 | // +build !windows
 2 | 
 3 | package system
 4 | 
 5 | import (
 6 | 	"syscall"
 7 | )
 8 | 
 9 | // Lstat takes a path to a file and returns
10 | // a system.StatT type pertaining to that file.
11 | //
12 | // Throws an error if the file does not exist
13 | func Lstat(path string) (*StatT, error) {
14 | 	s := &syscall.Stat_t{}
15 | 	if err := syscall.Lstat(path, s); err != nil {
16 | 		return nil, err
17 | 	}
18 | 	return fromStatT(s)
19 | }
20 | 


--------------------------------------------------------------------------------
/vendor/github.com/stretchr/testify/assert/forward_assertions.go:
--------------------------------------------------------------------------------
 1 | package assert
 2 | 
 3 | // Assertions provides assertion methods around the
 4 | // TestingT interface.
 5 | type Assertions struct {
 6 | 	t TestingT
 7 | }
 8 | 
 9 | // New makes a new Assertions object for the specified TestingT.
10 | func New(t TestingT) *Assertions {
11 | 	return &Assertions{
12 | 		t: t,
13 | 	}
14 | }
15 | 
16 | //go:generate go run ../_codegen/main.go -output-package=assert -template=assertion_forward.go.tmpl
17 | 


--------------------------------------------------------------------------------
/vendor/github.com/stretchr/testify/require/forward_requirements.go:
--------------------------------------------------------------------------------
 1 | package require
 2 | 
 3 | // Assertions provides assertion methods around the
 4 | // TestingT interface.
 5 | type Assertions struct {
 6 | 	t TestingT
 7 | }
 8 | 
 9 | // New makes a new Assertions object for the specified TestingT.
10 | func New(t TestingT) *Assertions {
11 | 	return &Assertions{
12 | 		t: t,
13 | 	}
14 | }
15 | 
16 | //go:generate go run ../_codegen/main.go -output-package=require -template=require_forward.go.tmpl
17 | 


--------------------------------------------------------------------------------
/provider/aws/lambda/fluentd/Makefile:
--------------------------------------------------------------------------------
 1 | .PHONY: all build clean release
 2 | 
 3 | all: lambda.zip
 4 | 
 5 | clean:
 6 | 	rm -f lambda.zip main
 7 | 
 8 | lambda.zip: index.js main
 9 | 	zip -r lambda.zip main index.js
10 | 
11 | main: *.go
12 | 	GOOS=linux GOARCH=amd64 go build -o main
13 | 
14 | release: lambda.zip
15 | 	for region in $(shell cat ../../../../REGIONS); do \
16 | 		aws s3 cp lambda.zip s3://convox-$$region/release/$(VERSION)/lambda/fluentd.zip --acl public-read --region $$region; \
17 | 	done
18 | 


--------------------------------------------------------------------------------
/vendor/github.com/equinox-io/equinox/internal/go-update/hide_windows.go:
--------------------------------------------------------------------------------
 1 | package update
 2 | 
 3 | import (
 4 | 	"syscall"
 5 | 	"unsafe"
 6 | )
 7 | 
 8 | func hideFile(path string) error {
 9 | 	kernel32 := syscall.NewLazyDLL("kernel32.dll")
10 | 	setFileAttributes := kernel32.NewProc("SetFileAttributesW")
11 | 
12 | 	r1, _, err := setFileAttributes.Call(uintptr(unsafe.Pointer(syscall.StringToUTF16Ptr(path))), 2)
13 | 
14 | 	if r1 == 0 {
15 | 		return err
16 | 	} else {
17 | 		return nil
18 | 	}
19 | }
20 | 


--------------------------------------------------------------------------------
/provider/aws/lambda/formation/Makefile:
--------------------------------------------------------------------------------
 1 | .PHONY: all build clean release
 2 | 
 3 | all: lambda.zip
 4 | 
 5 | clean:
 6 | 	rm -f lambda.zip main
 7 | 
 8 | lambda.zip: index.js main
 9 | 	zip -r lambda.zip main index.js
10 | 
11 | main: *.go
12 | 	GOOS=linux GOARCH=amd64 go build -o main
13 | 
14 | release: lambda.zip
15 | 	for region in $(shell cat ../../../../REGIONS); do \
16 | 		aws s3 cp lambda.zip s3://convox-$$region/release/$(VERSION)/lambda/formation.zip --acl public-read --region $$region; \
17 | 	done
18 | 


--------------------------------------------------------------------------------
/vendor/github.com/docker/docker/pkg/system/meminfo.go:
--------------------------------------------------------------------------------
 1 | package system
 2 | 
 3 | // MemInfo contains memory statistics of the host system.
 4 | type MemInfo struct {
 5 | 	// Total usable RAM (i.e. physical RAM minus a few reserved bits and the
 6 | 	// kernel binary code).
 7 | 	MemTotal int64
 8 | 
 9 | 	// Amount of free memory.
10 | 	MemFree int64
11 | 
12 | 	// Total amount of swap space available.
13 | 	SwapTotal int64
14 | 
15 | 	// Amount of swap space that is currently unused.
16 | 	SwapFree int64
17 | }
18 | 


--------------------------------------------------------------------------------
/vendor/github.com/mattn/go-isatty/isatty_bsd.go:
--------------------------------------------------------------------------------
 1 | // +build darwin freebsd openbsd netbsd
 2 | 
 3 | package isatty
 4 | 
 5 | import (
 6 | 	"syscall"
 7 | 	"unsafe"
 8 | )
 9 | 
10 | const ioctlReadTermios = syscall.TIOCGETA
11 | 
12 | // IsTerminal return true if the file descriptor is terminal.
13 | func IsTerminal(fd uintptr) bool {
14 | 	var termios syscall.Termios
15 | 	_, _, err := syscall.Syscall6(syscall.SYS_IOCTL, fd, ioctlReadTermios, uintptr(unsafe.Pointer(&termios)), 0, 0, 0)
16 | 	return err == 0
17 | }
18 | 


--------------------------------------------------------------------------------
/vendor/github.com/docker/docker/pkg/ioutils/temp_windows.go:
--------------------------------------------------------------------------------
 1 | // +build windows
 2 | 
 3 | package ioutils
 4 | 
 5 | import (
 6 | 	"io/ioutil"
 7 | 
 8 | 	"github.com/docker/docker/pkg/longpath"
 9 | )
10 | 
11 | // TempDir is the equivalent of ioutil.TempDir, except that the result is in Windows longpath format.
12 | func TempDir(dir, prefix string) (string, error) {
13 | 	tempDir, err := ioutil.TempDir(dir, prefix)
14 | 	if err != nil {
15 | 		return "", err
16 | 	}
17 | 	return longpath.AddPrefix(tempDir), nil
18 | }
19 | 


--------------------------------------------------------------------------------
/vendor/github.com/briandowns/spinner/.gitignore:
--------------------------------------------------------------------------------
 1 | # Created by .gitignore support plugin (hsz.mobi)
 2 | ### Go template
 3 | # Compiled Object files, Static and Dynamic libs (Shared Objects)
 4 | *.o
 5 | *.a
 6 | *.so
 7 | 
 8 | # Folders
 9 | _obj
10 | _test
11 | 
12 | # Architecture specific extensions/prefixes
13 | *.[568vq]
14 | [568vq].out
15 | 
16 | *.cgo1.go
17 | *.cgo2.c
18 | _cgo_defun.c
19 | _cgo_gotypes.go
20 | _cgo_export.*
21 | 
22 | _testmain.go
23 | 
24 | *.exe
25 | *.test
26 | *.prof
27 | 
28 | .idea
29 | *.iml
30 | 


--------------------------------------------------------------------------------
/vendor/github.com/docker/docker/pkg/idtools/usergroupadd_unsupported.go:
--------------------------------------------------------------------------------
 1 | // +build !linux
 2 | 
 3 | package idtools
 4 | 
 5 | import "fmt"
 6 | 
 7 | // AddNamespaceRangesUser takes a name and finds an unused uid, gid pair
 8 | // and calls the appropriate helper function to add the group and then
 9 | // the user to the group in /etc/group and /etc/passwd respectively.
10 | func AddNamespaceRangesUser(name string) (int, int, error) {
11 | 	return -1, -1, fmt.Errorf("No support for adding users or groups on this OS")
12 | }
13 | 


--------------------------------------------------------------------------------
/vendor/github.com/dustin/go-humanize/ordinals.go:
--------------------------------------------------------------------------------
 1 | package humanize
 2 | 
 3 | import "strconv"
 4 | 
 5 | // Ordinal gives you the input number in a rank/ordinal format.
 6 | //
 7 | // Ordinal(3) -> 3rd
 8 | func Ordinal(x int) string {
 9 | 	suffix := "th"
10 | 	switch x % 10 {
11 | 	case 1:
12 | 		if x%100 != 11 {
13 | 			suffix = "st"
14 | 		}
15 | 	case 2:
16 | 		if x%100 != 12 {
17 | 			suffix = "nd"
18 | 		}
19 | 	case 3:
20 | 		if x%100 != 13 {
21 | 			suffix = "rd"
22 | 		}
23 | 	}
24 | 	return strconv.Itoa(x) + suffix
25 | }
26 | 


--------------------------------------------------------------------------------
/vendor/github.com/mattn/go-isatty/isatty_windows.go:
--------------------------------------------------------------------------------
 1 | // +build windows
 2 | 
 3 | package isatty
 4 | 
 5 | import (
 6 | 	"syscall"
 7 | 	"unsafe"
 8 | )
 9 | 
10 | var kernel32 = syscall.NewLazyDLL("kernel32.dll")
11 | var procGetConsoleMode = kernel32.NewProc("GetConsoleMode")
12 | 
13 | // IsTerminal return true if the file descriptor is terminal.
14 | func IsTerminal(fd uintptr) bool {
15 | 	var st uint32
16 | 	r, _, e := syscall.Syscall(procGetConsoleMode.Addr(), 2, fd, uintptr(unsafe.Pointer(&st)), 0)
17 | 	return r != 0 && e == 0
18 | }
19 | 


--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/asm_solaris_amd64.s:
--------------------------------------------------------------------------------
 1 | // Copyright 2014 The Go Authors. All rights reserved.
 2 | // Use of this source code is governed by a BSD-style
 3 | // license that can be found in the LICENSE file.
 4 | 
 5 | // +build !gccgo
 6 | 
 7 | #include "textflag.h"
 8 | 
 9 | //
10 | // System calls for amd64, Solaris are implemented in runtime/syscall_solaris.go
11 | //
12 | 
13 | TEXT ·sysvicall6(SB),NOSPLIT,$0-64
14 | 	JMP	syscall·sysvicall6(SB)
15 | 
16 | TEXT ·rawSysvicall6(SB),NOSPLIT,$0-64
17 | 	JMP	syscall·rawSysvicall6(SB)
18 | 


--------------------------------------------------------------------------------
/vendor/github.com/dustin/go-humanize/ftoa.go:
--------------------------------------------------------------------------------
 1 | package humanize
 2 | 
 3 | import "strconv"
 4 | 
 5 | func stripTrailingZeros(s string) string {
 6 | 	offset := len(s) - 1
 7 | 	for offset > 0 {
 8 | 		if s[offset] == '.' {
 9 | 			offset--
10 | 			break
11 | 		}
12 | 		if s[offset] != '0' {
13 | 			break
14 | 		}
15 | 		offset--
16 | 	}
17 | 	return s[:offset+1]
18 | }
19 | 
20 | // Ftoa converts a float to a string with no trailing zeros.
21 | func Ftoa(num float64) string {
22 | 	return stripTrailingZeros(strconv.FormatFloat(num, 'f', 6, 64))
23 | }
24 | 


--------------------------------------------------------------------------------
/vendor/github.com/opencontainers/runc/libcontainer/user/lookup_unsupported.go:
--------------------------------------------------------------------------------
 1 | // +build !darwin,!dragonfly,!freebsd,!linux,!netbsd,!openbsd,!solaris
 2 | 
 3 | package user
 4 | 
 5 | import "io"
 6 | 
 7 | func GetPasswdPath() (string, error) {
 8 | 	return "", ErrUnsupported
 9 | }
10 | 
11 | func GetPasswd() (io.ReadCloser, error) {
12 | 	return nil, ErrUnsupported
13 | }
14 | 
15 | func GetGroupPath() (string, error) {
16 | 	return "", ErrUnsupported
17 | }
18 | 
19 | func GetGroup() (io.ReadCloser, error) {
20 | 	return nil, ErrUnsupported
21 | }
22 | 


--------------------------------------------------------------------------------
/vendor/golang.org/x/net/context/ctxhttp/cancelreq.go:
--------------------------------------------------------------------------------
 1 | // Copyright 2015 The Go Authors. All rights reserved.
 2 | // Use of this source code is governed by a BSD-style
 3 | // license that can be found in the LICENSE file.
 4 | 
 5 | // +build go1.5
 6 | 
 7 | package ctxhttp
 8 | 
 9 | import "net/http"
10 | 
11 | func canceler(client *http.Client, req *http.Request) func() {
12 | 	// TODO(djd): Respect any existing value of req.Cancel.
13 | 	ch := make(chan struct{})
14 | 	req.Cancel = ch
15 | 
16 | 	return func() {
17 | 		close(ch)
18 | 	}
19 | }
20 | 


--------------------------------------------------------------------------------
/vendor/golang.org/x/crypto/ssh/terminal/util_linux.go:
--------------------------------------------------------------------------------
 1 | // Copyright 2013 The Go Authors. All rights reserved.
 2 | // Use of this source code is governed by a BSD-style
 3 | // license that can be found in the LICENSE file.
 4 | 
 5 | package terminal
 6 | 
 7 | // These constants are declared here, rather than importing
 8 | // them from the syscall package as some syscall packages, even
 9 | // on linux, for example gccgo, do not declare them.
10 | const ioctlReadTermios = 0x5401  // syscall.TCGETS
11 | const ioctlWriteTermios = 0x5402 // syscall.TCSETS
12 | 


--------------------------------------------------------------------------------
/api/structs/service.go:
--------------------------------------------------------------------------------
 1 | package structs
 2 | 
 3 | type Service struct {
 4 | 	Name         string `json:"name"`
 5 | 	Stack        string `json:"-"`
 6 | 	Status       string `json:"status"`
 7 | 	StatusReason string `json:"status-reason"`
 8 | 	Type         string `json:"type"`
 9 | 
10 | 	Apps    Apps              `json:"apps"`
11 | 	Exports map[string]string `json:"exports"`
12 | 
13 | 	Outputs    map[string]string `json:"-"`
14 | 	Parameters map[string]string `json:"-"`
15 | 	Tags       map[string]string `json:"-"`
16 | }
17 | 
18 | type Services []Service
19 | 


--------------------------------------------------------------------------------
/vendor/github.com/docker/docker/pkg/idtools/idtools_windows.go:
--------------------------------------------------------------------------------
 1 | // +build windows
 2 | 
 3 | package idtools
 4 | 
 5 | import (
 6 | 	"os"
 7 | 
 8 | 	"github.com/docker/docker/pkg/system"
 9 | )
10 | 
11 | // Platforms such as Windows do not support the UID/GID concept. So make this
12 | // just a wrapper around system.MkdirAll.
13 | func mkdirAs(path string, mode os.FileMode, ownerUID, ownerGID int, mkAll, chownExisting bool) error {
14 | 	if err := system.MkdirAll(path, mode); err != nil && !os.IsExist(err) {
15 | 		return err
16 | 	}
17 | 	return nil
18 | }
19 | 


--------------------------------------------------------------------------------
/api/structs/certificate.go:
--------------------------------------------------------------------------------
 1 | package structs
 2 | 
 3 | import (
 4 | 	"strings"
 5 | 	"time"
 6 | )
 7 | 
 8 | type Certificate struct {
 9 | 	Id         string    `json:"id"`
10 | 	Domain     string    `json:"domain"`
11 | 	Expiration time.Time `json:"expiration"`
12 | }
13 | 
14 | type Certificates []Certificate
15 | 
16 | func (c Certificates) Len() int           { return len(c) }
17 | func (c Certificates) Less(i, j int) bool { return strings.ToUpper(c[i].Id) < strings.ToUpper(c[j].Id) }
18 | func (c Certificates) Swap(i, j int)      { c[i], c[j] = c[j], c[i] }
19 | 


--------------------------------------------------------------------------------
/vendor/github.com/docker/docker/pkg/system/filesys.go:
--------------------------------------------------------------------------------
 1 | // +build !windows
 2 | 
 3 | package system
 4 | 
 5 | import (
 6 | 	"os"
 7 | 	"path/filepath"
 8 | )
 9 | 
10 | // MkdirAll creates a directory named path along with any necessary parents,
11 | // with permission specified by attribute perm for all dir created.
12 | func MkdirAll(path string, perm os.FileMode) error {
13 | 	return os.MkdirAll(path, perm)
14 | }
15 | 
16 | // IsAbs is a platform-specific wrapper for filepath.IsAbs.
17 | func IsAbs(path string) bool {
18 | 	return filepath.IsAbs(path)
19 | }
20 | 


--------------------------------------------------------------------------------
/vendor/github.com/equinox-io/equinox/internal/osext/osext_plan9.go:
--------------------------------------------------------------------------------
 1 | // Copyright 2012 The Go Authors. All rights reserved.
 2 | // Use of this source code is governed by a BSD-style
 3 | // license that can be found in the LICENSE file.
 4 | 
 5 | package osext
 6 | 
 7 | import (
 8 | 	"os"
 9 | 	"strconv"
10 | 	"syscall"
11 | )
12 | 
13 | func executable() (string, error) {
14 | 	f, err := os.Open("/proc/" + strconv.Itoa(os.Getpid()) + "/text")
15 | 	if err != nil {
16 | 		return "", err
17 | 	}
18 | 	defer f.Close()
19 | 	return syscall.Fd2path(int(f.Fd()))
20 | }
21 | 


--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/gccgo_linux_amd64.go:
--------------------------------------------------------------------------------
 1 | // Copyright 2015 The Go Authors.  All rights reserved.
 2 | // Use of this source code is governed by a BSD-style
 3 | // license that can be found in the LICENSE file.
 4 | 
 5 | // +build gccgo,linux,amd64
 6 | 
 7 | package unix
 8 | 
 9 | import "syscall"
10 | 
11 | //extern gettimeofday
12 | func realGettimeofday(*Timeval, *byte) int32
13 | 
14 | func gettimeofday(tv *Timeval) (err syscall.Errno) {
15 | 	r := realGettimeofday(tv, nil)
16 | 	if r < 0 {
17 | 		return syscall.GetErrno()
18 | 	}
19 | 	return 0
20 | }
21 | 


--------------------------------------------------------------------------------
/vendor/github.com/tinylib/msgp/msgp/advise_linux.go:
--------------------------------------------------------------------------------
 1 | // +build linux,!appengine
 2 | 
 3 | package msgp
 4 | 
 5 | import (
 6 | 	"os"
 7 | 	"syscall"
 8 | )
 9 | 
10 | func adviseRead(mem []byte) {
11 | 	syscall.Madvise(mem, syscall.MADV_SEQUENTIAL|syscall.MADV_WILLNEED)
12 | }
13 | 
14 | func adviseWrite(mem []byte) {
15 | 	syscall.Madvise(mem, syscall.MADV_SEQUENTIAL)
16 | }
17 | 
18 | func fallocate(f *os.File, sz int64) error {
19 | 	err := syscall.Fallocate(int(f.Fd()), 0, 0, sz)
20 | 	if err == syscall.ENOTSUP {
21 | 		return f.Truncate(sz)
22 | 	}
23 | 	return err
24 | }
25 | 


--------------------------------------------------------------------------------
/vendor/github.com/equinox-io/equinox/internal/go-update/internal/osext/osext_plan9.go:
--------------------------------------------------------------------------------
 1 | // Copyright 2012 The Go Authors. All rights reserved.
 2 | // Use of this source code is governed by a BSD-style
 3 | // license that can be found in the LICENSE file.
 4 | 
 5 | package osext
 6 | 
 7 | import (
 8 | 	"os"
 9 | 	"strconv"
10 | 	"syscall"
11 | )
12 | 
13 | func executable() (string, error) {
14 | 	f, err := os.Open("/proc/" + strconv.Itoa(os.Getpid()) + "/text")
15 | 	if err != nil {
16 | 		return "", err
17 | 	}
18 | 	defer f.Close()
19 | 	return syscall.Fd2path(int(f.Fd()))
20 | }
21 | 


--------------------------------------------------------------------------------
/bin/current-ecs-amis:
--------------------------------------------------------------------------------
 1 | #!/bin/sh
 2 | 
 3 | die() {
 4 |   echo $*
 5 |   exit 1
 6 | }
 7 | 
 8 | [ -x "$(which curl)" ] || die "needs curl"
 9 | [ -x "$(which jq)" ] || die "needs jq"
10 | [ -x "$(which pup)" ] || die "needs pup"
11 | 
12 | curl -s http://docs.aws.amazon.com/AmazonECS/latest/developerguide/launch_container_instance.html | pup 'table json{}' | jq -r '.[]|select(.children[1].children[0].children[1].text=="AMI ID").children[2].children[]|"      \"\(.children[0].children[0].text)\": { \"Ami\": \"\(.children[1].children[0].text)\" },"' | perl -0pe 's/,\n\z//'
13 | 
14 | echo
15 | 


--------------------------------------------------------------------------------
/client/parameters.go:
--------------------------------------------------------------------------------
 1 | package client
 2 | 
 3 | import "fmt"
 4 | 
 5 | type Parameters map[string]string
 6 | 
 7 | func (c *Client) ListParameters(app string) (Parameters, error) {
 8 | 	var formation Parameters
 9 | 
10 | 	err := c.Get(fmt.Sprintf("/apps/%s/parameters", app), &formation)
11 | 
12 | 	if err != nil {
13 | 		return nil, err
14 | 	}
15 | 
16 | 	return formation, nil
17 | }
18 | 
19 | func (c *Client) SetParameters(app string, params map[string]string) error {
20 | 	var success interface{}
21 | 	return c.Post(fmt.Sprintf("/apps/%s/parameters", app), params, &success)
22 | }
23 | 


--------------------------------------------------------------------------------
/vendor/github.com/mattn/go-isatty/README.md:
--------------------------------------------------------------------------------
 1 | # go-isatty
 2 | 
 3 | isatty for golang
 4 | 
 5 | ## Usage
 6 | 
 7 | ```go
 8 | package main
 9 | 
10 | import (
11 | 	"fmt"
12 | 	"github.com/mattn/go-isatty"
13 | 	"os"
14 | )
15 | 
16 | func main() {
17 | 	if isatty.IsTerminal(os.Stdout.Fd()) {
18 | 		fmt.Println("Is Terminal")
19 | 	} else {
20 | 		fmt.Println("Is Not Terminal")
21 | 	}
22 | }
23 | ```
24 | 
25 | ## Installation
26 | 
27 | ```
28 | $ go get github.com/mattn/go-isatty
29 | ```
30 | 
31 | # License
32 | 
33 | MIT
34 | 
35 | # Author
36 | 
37 | Yasuhiro Matsumoto (a.k.a mattn)
38 | 


--------------------------------------------------------------------------------
/vendor/github.com/docker/docker/pkg/ioutils/fmt.go:
--------------------------------------------------------------------------------
 1 | package ioutils
 2 | 
 3 | import (
 4 | 	"fmt"
 5 | 	"io"
 6 | )
 7 | 
 8 | // FprintfIfNotEmpty prints the string value if it's not empty
 9 | func FprintfIfNotEmpty(w io.Writer, format, value string) (int, error) {
10 | 	if value != "" {
11 | 		return fmt.Fprintf(w, format, value)
12 | 	}
13 | 	return 0, nil
14 | }
15 | 
16 | // FprintfIfTrue prints the boolean value if it's true
17 | func FprintfIfTrue(w io.Writer, format string, ok bool) (int, error) {
18 | 	if ok {
19 | 		return fmt.Fprintf(w, format, ok)
20 | 	}
21 | 	return 0, nil
22 | }
23 | 


--------------------------------------------------------------------------------
/provider/aws/lambda/fluentd/vendor/github.com/tinylib/msgp/msgp/advise_linux.go:
--------------------------------------------------------------------------------
 1 | // +build linux,!appengine
 2 | 
 3 | package msgp
 4 | 
 5 | import (
 6 | 	"os"
 7 | 	"syscall"
 8 | )
 9 | 
10 | func adviseRead(mem []byte) {
11 | 	syscall.Madvise(mem, syscall.MADV_SEQUENTIAL|syscall.MADV_WILLNEED)
12 | }
13 | 
14 | func adviseWrite(mem []byte) {
15 | 	syscall.Madvise(mem, syscall.MADV_SEQUENTIAL)
16 | }
17 | 
18 | func fallocate(f *os.File, sz int64) error {
19 | 	err := syscall.Fallocate(int(f.Fd()), 0, 0, sz)
20 | 	if err == syscall.ENOTSUP {
21 | 		return f.Truncate(sz)
22 | 	}
23 | 	return err
24 | }
25 | 


--------------------------------------------------------------------------------
/vendor/github.com/docker/docker/pkg/fileutils/fileutils_unix.go:
--------------------------------------------------------------------------------
 1 | // +build linux freebsd
 2 | 
 3 | package fileutils
 4 | 
 5 | import (
 6 | 	"fmt"
 7 | 	"io/ioutil"
 8 | 	"os"
 9 | 
10 | 	"github.com/Sirupsen/logrus"
11 | )
12 | 
13 | // GetTotalUsedFds Returns the number of used File Descriptors by
14 | // reading it via /proc filesystem.
15 | func GetTotalUsedFds() int {
16 | 	if fds, err := ioutil.ReadDir(fmt.Sprintf("/proc/%d/fd", os.Getpid())); err != nil {
17 | 		logrus.Errorf("Error opening /proc/%d/fd: %s", os.Getpid(), err)
18 | 	} else {
19 | 		return len(fds)
20 | 	}
21 | 	return -1
22 | }
23 | 


--------------------------------------------------------------------------------
/provider/aws/Makefile:
--------------------------------------------------------------------------------
 1 | .PHONY: all release templates
 2 | 
 3 | all: templates
 4 | 
 5 | release:
 6 | 	make -C lambda/fluentd release VERSION=$(VERSION)
 7 | 	make -C lambda/formation release VERSION=$(VERSION)
 8 | 	make -C lambda/lifecycle release VERSION=$(VERSION)
 9 | 	mkdir -p /tmp/release/$(VERSION)
10 | 	cd /tmp/release/$(VERSION)
11 | 	jq '.Parameters.Version.Default |= "$(VERSION)"' dist/rack.json > formation.json
12 | 	aws s3 cp formation.json s3://convox/release/$(VERSION)/formation.json --acl public-read
13 | 
14 | templates:
15 | 	go-bindata -nometadata -pkg=aws -o templates.go ./templates/...
16 | 


--------------------------------------------------------------------------------
/provider/aws/error.go:
--------------------------------------------------------------------------------
 1 | package aws
 2 | 
 3 | // errorNotFound means the requested item was not found
 4 | type errorNotFound string
 5 | 
 6 | // Error satisfies the error interface
 7 | func (e errorNotFound) Error() string {
 8 | 	return string(e)
 9 | }
10 | 
11 | // NotFound defines the behavior of this error
12 | func (e errorNotFound) NotFound() bool {
13 | 	return true
14 | }
15 | 
16 | // ErrorNotFound returns true if the error is a "not found" type
17 | func ErrorNotFound(err error) bool {
18 | 	if e, ok := err.(errorNotFound); ok && e.NotFound() {
19 | 		return true
20 | 	}
21 | 	return false
22 | }
23 | 


--------------------------------------------------------------------------------
/vendor/github.com/equinox-io/equinox/internal/osext/README.md:
--------------------------------------------------------------------------------
 1 | ### Extensions to the "os" package.
 2 | 
 3 | ## Find the current Executable and ExecutableFolder.
 4 | 
 5 | There is sometimes utility in finding the current executable file
 6 | that is running. This can be used for upgrading the current executable
 7 | or finding resources located relative to the executable file. Both
 8 | working directory and the os.Args[0] value are arbitrary and cannot
 9 | be relied on; os.Args[0] can be "faked".
10 | 
11 | Multi-platform and supports:
12 |  * Linux
13 |  * OS X
14 |  * Windows
15 |  * Plan 9
16 |  * BSDs.
17 | 


--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
 1 | Copyright 2015 Convox, Inc.
 2 | 
 3 | Licensed under the Apache License, Version 2.0 (the "License");
 4 | you may not use this file except in compliance with the License.
 5 | You may obtain a copy of the License at
 6 | 
 7 |     http://www.apache.org/licenses/LICENSE-2.0
 8 | 
 9 | Unless required by applicable law or agreed to in writing, software
10 | distributed under the License is distributed on an "AS IS" BASIS,
11 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | See the License for the specific language governing permissions and
13 | limitations under the License.
14 | 


--------------------------------------------------------------------------------
/api/Makefile:
--------------------------------------------------------------------------------
 1 | .PHONY: all build dev release vendor
 2 | 
 3 | VERSION=edge
 4 | 
 5 | all: build
 6 | 
 7 | build:
 8 | 	docker build -t convox/api .
 9 | 
10 | templates:
11 | 	go-bindata -nometadata -pkg=models -prefix=models -o=models/templates.go models/templates/...
12 | 
13 | test:
14 | 	go get -t ./...
15 | 	env PROVIDER=test go test -v -cover ./...
16 | 
17 | test-coverage:
18 | 	gocov test -v ./... | gocov-html > /tmp/coverage.html
19 | 	open /tmp/coverage.html
20 | 
21 | test-deps:
22 | 	go get github.com/axw/gocov/gocov
23 | 	go get gopkg.in/matm/v1/gocov-html
24 | 
25 | vendor:
26 | 	godep save -r ./...
27 | 


--------------------------------------------------------------------------------
/api/LICENSE:
--------------------------------------------------------------------------------
 1 | Copyright 2015 Convox, Inc.
 2 | 
 3 | Licensed under the Apache License, Version 2.0 (the "License");
 4 | you may not use this file except in compliance with the License.
 5 | You may obtain a copy of the License at
 6 | 
 7 |     http://www.apache.org/licenses/LICENSE-2.0
 8 | 
 9 | Unless required by applicable law or agreed to in writing, software
10 | distributed under the License is distributed on an "AS IS" BASIS,
11 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | See the License for the specific language governing permissions and
13 | limitations under the License.
14 | 


--------------------------------------------------------------------------------
/provider/aws/lambda/lifecycle/Makefile:
--------------------------------------------------------------------------------
 1 | .PHONY: all build clean release
 2 | 
 3 | all: lambda.zip
 4 | 
 5 | clean:
 6 | 	rm -f lambda.zip main
 7 | 
 8 | lambda.zip: index.js main
 9 | 	zip -r lambda.zip main index.js
10 | 
11 | main: *.go
12 | 	GOOS=linux GOARCH=amd64 go build -o main
13 | 
14 | release: lambda.zip
15 | 	for region in $(shell cat ../../../../REGIONS); do \
16 | 		aws s3 cp lambda.zip s3://convox-$$region/release/$(VERSION)/lambda/lifecycle.zip --acl public-read --region $$region; \
17 | 	done
18 | 
19 | test:
20 | 	bin/test $(RACK) $(INSTANCE)
21 | 
22 | upload: lambda.zip
23 | 	bin/upload $(RACK)
24 | 


--------------------------------------------------------------------------------
/client/auth.go:
--------------------------------------------------------------------------------
 1 | package client
 2 | 
 3 | import (
 4 | 	"fmt"
 5 | 	"net/http"
 6 | )
 7 | 
 8 | func (c *Client) Auth() error {
 9 | 	req, err := http.NewRequest("GET", fmt.Sprintf("https://%s/auth", c.Host), nil)
10 | 
11 | 	if err != nil {
12 | 		return err
13 | 	}
14 | 
15 | 	req.SetBasicAuth("convox", string(c.Password))
16 | 
17 | 	resp, err := c.client().Do(req)
18 | 
19 | 	if err != nil {
20 | 		return err
21 | 	}
22 | 
23 | 	if resp.StatusCode != 200 {
24 | 		return fmt.Errorf("invalid login\nHave you created an account at https://convox.com/signup?")
25 | 	}
26 | 
27 | 	resp.Body.Close()
28 | 	return nil
29 | }
30 | 


--------------------------------------------------------------------------------
/cmd/convox/deploy_test.go:
--------------------------------------------------------------------------------
 1 | package main
 2 | 
 3 | import (
 4 | 	"testing"
 5 | 
 6 | 	"github.com/convox/rack/client"
 7 | 	"github.com/convox/rack/test"
 8 | )
 9 | 
10 | func TestDeployPreventAgainstCreating(t *testing.T) {
11 | 	ts := testServer(t,
12 | 		test.Http{Method: "GET", Path: "/apps/foo", Code: 200, Response: client.App{Name: "foo", Status: "creating"}},
13 | 	)
14 | 
15 | 	defer ts.Close()
16 | 
17 | 	test.Runs(t,
18 | 		test.ExecRun{
19 | 			Command: "convox deploy --app foo",
20 | 			Exit:    1,
21 | 			Stdout:  "Deploying foo\n",
22 | 			Stderr:  "ERROR: app is still creating: foo\n",
23 | 		},
24 | 	)
25 | }
26 | 


--------------------------------------------------------------------------------
/cmd/convox/templates/init/rails/Dockerfile:
--------------------------------------------------------------------------------
 1 | FROM convox/rails
 2 | 
 3 | # copy only the files needed for bundle install
 4 | # uncomment the vendor/cache line if you `bundle package` your gems
 5 | COPY Gemfile      /app/Gemfile
 6 | COPY Gemfile.lock /app/Gemfile.lock
 7 | # COPY vendor/cache /app/vendor/cache
 8 | RUN bundle install
 9 | 
10 | # copy just the files needed for assets:precompile
11 | COPY Rakefile   /app/Rakefile
12 | COPY config     /app/config
13 | COPY public     /app/public
14 | COPY app/assets /app/app/assets
15 | RUN bundle exec rake assets:precompile
16 | 
17 | # copy the rest of the app
18 | COPY . /app
19 | 


--------------------------------------------------------------------------------
/vendor/github.com/aws/aws-sdk-go/aws/errors.go:
--------------------------------------------------------------------------------
 1 | package aws
 2 | 
 3 | import "github.com/aws/aws-sdk-go/aws/awserr"
 4 | 
 5 | var (
 6 | 	// ErrMissingRegion is an error that is returned if region configuration is
 7 | 	// not found.
 8 | 	//
 9 | 	// @readonly
10 | 	ErrMissingRegion = awserr.New("MissingRegion", "could not find region configuration", nil)
11 | 
12 | 	// ErrMissingEndpoint is an error that is returned if an endpoint cannot be
13 | 	// resolved for a service.
14 | 	//
15 | 	// @readonly
16 | 	ErrMissingEndpoint = awserr.New("MissingEndpoint", "'Endpoint' configuration is required for this service", nil)
17 | )
18 | 


--------------------------------------------------------------------------------
/vendor/github.com/equinox-io/equinox/internal/go-update/internal/osext/README.md:
--------------------------------------------------------------------------------
 1 | ### Extensions to the "os" package.
 2 | 
 3 | ## Find the current Executable and ExecutableFolder.
 4 | 
 5 | There is sometimes utility in finding the current executable file
 6 | that is running. This can be used for upgrading the current executable
 7 | or finding resources located relative to the executable file. Both
 8 | working directory and the os.Args[0] value are arbitrary and cannot
 9 | be relied on; os.Args[0] can be "faked".
10 | 
11 | Multi-platform and supports:
12 |  * Linux
13 |  * OS X
14 |  * Windows
15 |  * Plan 9
16 |  * BSDs.
17 | 


--------------------------------------------------------------------------------
/vendor/golang.org/x/net/context/ctxhttp/cancelreq_go14.go:
--------------------------------------------------------------------------------
 1 | // Copyright 2015 The Go Authors. All rights reserved.
 2 | // Use of this source code is governed by a BSD-style
 3 | // license that can be found in the LICENSE file.
 4 | 
 5 | // +build !go1.5
 6 | 
 7 | package ctxhttp
 8 | 
 9 | import "net/http"
10 | 
11 | type requestCanceler interface {
12 | 	CancelRequest(*http.Request)
13 | }
14 | 
15 | func canceler(client *http.Client, req *http.Request) func() {
16 | 	rc, ok := client.Transport.(requestCanceler)
17 | 	if !ok {
18 | 		return func() {}
19 | 	}
20 | 	return func() {
21 | 		rc.CancelRequest(req)
22 | 	}
23 | }
24 | 


--------------------------------------------------------------------------------
/vendor/github.com/opencontainers/runc/NOTICE:
--------------------------------------------------------------------------------
 1 | runc
 2 | 
 3 | Copyright 2012-2015 Docker, Inc.
 4 | 
 5 | This product includes software developed at Docker, Inc. (http://www.docker.com).
 6 | 
 7 | The following is courtesy of our legal counsel:
 8 | 
 9 | 
10 | Use and transfer of Docker may be subject to certain restrictions by the
11 | United States and other governments.  
12 | It is your responsibility to ensure that your use and/or transfer does not
13 | violate applicable laws. 
14 | 
15 | For more information, please see http://www.bis.doc.gov
16 | 
17 | See also http://www.apache.org/dev/crypto.html and/or seek legal counsel.
18 | 


--------------------------------------------------------------------------------
/client/progress.go:
--------------------------------------------------------------------------------
 1 | package client
 2 | 
 3 | import "io"
 4 | 
 5 | type Progress interface {
 6 | 	Start(total int64)
 7 | 	Progress(current int64)
 8 | 	Finish()
 9 | }
10 | 
11 | type ProgressReader struct {
12 | 	io.Reader
13 | 	progress int64
14 | 	tick     func(int64)
15 | }
16 | 
17 | func NewProgressReader(r io.Reader, tick func(int64)) *ProgressReader {
18 | 	return &ProgressReader{
19 | 		Reader: r,
20 | 		tick:   tick,
21 | 	}
22 | }
23 | 
24 | func (pr *ProgressReader) Read(p []byte) (int, error) {
25 | 	n, err := pr.Reader.Read(p)
26 | 
27 | 	pr.progress += int64(n)
28 | 	pr.tick(pr.progress)
29 | 
30 | 	return n, err
31 | }
32 | 


--------------------------------------------------------------------------------
/cmd/convox/main_test.go:
--------------------------------------------------------------------------------
 1 | package main
 2 | 
 3 | import (
 4 | 	"net/http/httptest"
 5 | 	"net/url"
 6 | 	"os"
 7 | 	"testing"
 8 | 
 9 | 	"github.com/convox/rack/client"
10 | 	"github.com/convox/rack/test"
11 | )
12 | 
13 | func testServer(t *testing.T, stubs ...test.Http) *httptest.Server {
14 | 	stubs = append(stubs, test.Http{Method: "GET", Path: "/system", Code: 200, Response: client.System{
15 | 		Version: "latest",
16 | 	}})
17 | 
18 | 	server := test.Server(t, stubs...)
19 | 
20 | 	u, _ := url.Parse(server.URL)
21 | 
22 | 	os.Setenv("CONVOX_HOST", u.Host)
23 | 	os.Setenv("CONVOX_PASSWORD", "test")
24 | 
25 | 	return server
26 | }
27 | 


--------------------------------------------------------------------------------
/provider/aws/lambda/fluentd/LICENSE:
--------------------------------------------------------------------------------
 1 | Copyright 2016 Reverb.com, LLC.
 2 | 
 3 | Licensed under the Apache License, Version 2.0 (the "License");
 4 | you may not use this file except in compliance with the License.
 5 | You may obtain a copy of the License at
 6 | 
 7 |     http://www.apache.org/licenses/LICENSE-2.0
 8 | 
 9 | Unless required by applicable law or agreed to in writing, software
10 | distributed under the License is distributed on an "AS IS" BASIS,
11 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | See the License for the specific language governing permissions and
13 | limitations under the License.
14 | 


--------------------------------------------------------------------------------
/vendor/github.com/fluent/fluent-logger-golang/fluent/proto.go:
--------------------------------------------------------------------------------
 1 | //go:generate msgp
 2 | 
 3 | package fluent
 4 | 
 5 | //msgp:tuple Entry
 6 | type Entry struct {
 7 | 	Time   int64       `msg:"time"`
 8 | 	Record interface{} `msg:"record"`
 9 | }
10 | 
11 | //msgp:tuple Forward
12 | type Forward struct {
13 | 	Tag     string      `msg:"tag"`
14 | 	Entries []Entry     `msg:"entries"`
15 | 	Option  interface{} `msg:"option"`
16 | }
17 | 
18 | //msgp:tuple Message
19 | type Message struct {
20 | 	Tag    string      `msg:"tag"`
21 | 	Time   int64       `msg:"time"`
22 | 	Record interface{} `msg:"record"`
23 | 	Option interface{} `msg:"option"`
24 | }
25 | 


--------------------------------------------------------------------------------
/vendor/github.com/aws/aws-sdk-go/aws/corehandlers/param_validator.go:
--------------------------------------------------------------------------------
 1 | package corehandlers
 2 | 
 3 | import "github.com/aws/aws-sdk-go/aws/request"
 4 | 
 5 | // ValidateParametersHandler is a request handler to validate the input parameters.
 6 | // Validating parameters only has meaning if done prior to the request being sent.
 7 | var ValidateParametersHandler = request.NamedHandler{Name: "core.ValidateParametersHandler", Fn: func(r *request.Request) {
 8 | 	if !r.ParamsFilled() {
 9 | 		return
10 | 	}
11 | 
12 | 	if v, ok := r.Params.(request.Validator); ok {
13 | 		if err := v.Validate(); err != nil {
14 | 			r.Error = err
15 | 		}
16 | 	}
17 | }}
18 | 


--------------------------------------------------------------------------------
/vendor/github.com/aws/aws-sdk-go/awstesting/client.go:
--------------------------------------------------------------------------------
 1 | package awstesting
 2 | 
 3 | import (
 4 | 	"github.com/aws/aws-sdk-go/aws"
 5 | 	"github.com/aws/aws-sdk-go/aws/client"
 6 | 	"github.com/aws/aws-sdk-go/aws/client/metadata"
 7 | 	"github.com/aws/aws-sdk-go/aws/defaults"
 8 | )
 9 | 
10 | // NewClient creates and initializes a generic service client for testing.
11 | func NewClient(cfgs ...*aws.Config) *client.Client {
12 | 	info := metadata.ClientInfo{
13 | 		Endpoint:    "http://endpoint",
14 | 		SigningName: "",
15 | 	}
16 | 	def := defaults.Get()
17 | 	def.Config.MergeIn(cfgs...)
18 | 
19 | 	return client.New(*def.Config, info, def.Handlers)
20 | }
21 | 


--------------------------------------------------------------------------------
/vendor/github.com/jmespath/go-jmespath/LICENSE:
--------------------------------------------------------------------------------
 1 | Copyright 2015 James Saryerwinnie
 2 | 
 3 | Licensed under the Apache License, Version 2.0 (the "License");
 4 | you may not use this file except in compliance with the License.
 5 | You may obtain a copy of the License at
 6 | 
 7 |     http://www.apache.org/licenses/LICENSE-2.0
 8 | 
 9 | Unless required by applicable law or agreed to in writing, software
10 | distributed under the License is distributed on an "AS IS" BASIS,
11 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | See the License for the specific language governing permissions and
13 | limitations under the License.
14 | 


--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/race0.go:
--------------------------------------------------------------------------------
 1 | // Copyright 2012 The Go Authors.  All rights reserved.
 2 | // Use of this source code is governed by a BSD-style
 3 | // license that can be found in the LICENSE file.
 4 | 
 5 | // +build darwin,!race linux,!race freebsd,!race netbsd openbsd solaris dragonfly
 6 | 
 7 | package unix
 8 | 
 9 | import (
10 | 	"unsafe"
11 | )
12 | 
13 | const raceenabled = false
14 | 
15 | func raceAcquire(addr unsafe.Pointer) {
16 | }
17 | 
18 | func raceReleaseMerge(addr unsafe.Pointer) {
19 | }
20 | 
21 | func raceReadRange(addr unsafe.Pointer, len int) {
22 | }
23 | 
24 | func raceWriteRange(addr unsafe.Pointer, len int) {
25 | }
26 | 


--------------------------------------------------------------------------------
/manifest/fixtures/full-v1.yml:
--------------------------------------------------------------------------------
 1 | web:
 2 |   build: .
 3 |   command: bin/web
 4 |   dockerfile: Dockerfile.dev
 5 |   entrypoint: /sbin/init
 6 |   environment:
 7 |     - FOO=bar
 8 |     - BAZ
 9 |   extra_hosts:
10 |     - foo:10.10.10.10
11 |     - bar:20.20.20.20
12 |   labels:
13 |     - convox.foo=bar
14 |     - convox.baz=4
15 |   links:
16 |     - database
17 |   ports:
18 |     - 80:5000
19 |     - 443:5001
20 |   privileged: true
21 |   volumes:
22 |     - /var/db
23 | database:
24 |   environment:
25 |     FOO: bar
26 |     BAZ: qux
27 |   image: convox/postgres
28 |   labels:
29 |     convox.aaa: 4
30 |     convox.ccc: ddd
31 |   ports:
32 |     - 5432
33 | 


--------------------------------------------------------------------------------
/Dockerfile:
--------------------------------------------------------------------------------
 1 | FROM golang:1.7-alpine
 2 | 
 3 | RUN apk update && apk add build-base docker git haproxy openssh openssl python tar
 4 | 
 5 | # need a real pid 1 for signal handling, zombie reaping, etc
 6 | ADD http://convox-binaries.s3.amazonaws.com/tini-static /tini
 7 | RUN chmod +x /tini
 8 | ENTRYPOINT ["/tini", "--"]
 9 | 
10 | RUN go get github.com/convox/rerun
11 | 
12 | COPY dist/haproxy.cfg /etc/haproxy/haproxy.cfg
13 | 
14 | ENV PORT 3000
15 | WORKDIR /go/src/github.com/convox/rack
16 | COPY . /go/src/github.com/convox/rack
17 | 
18 | RUN go install ./api
19 | RUN go install ./api/cmd/build
20 | RUN go install ./api/cmd/monitor
21 | 
22 | CMD ["api/bin/web"]
23 | 


--------------------------------------------------------------------------------
/provider/aws/lambda/formation/index.js:
--------------------------------------------------------------------------------
 1 | exports.external = function(event, context) {
 2 |   process.env['PROVIDER'] = 'aws';
 3 | 
 4 |   console.log('event', event);
 5 |   console.log('context', context);
 6 | 
 7 |   process.on('uncaughtException', function(err) {
 8 |     return context.done(err);
 9 |   });
10 | 
11 |   var child = require('child_process').spawn('./main', [JSON.stringify(event)], { stdio:'inherit' });
12 | 
13 |   child.on('close', function(code) {
14 |     if (code !== 0 ) {
15 |       return context.done(new Error("Process exited with non-zero status code: " + code));
16 |     } else {
17 |       context.done(null);
18 |     }
19 |   });
20 | }
21 | 


--------------------------------------------------------------------------------
/vendor/github.com/docker/engine-api/types/swarm/common.go:
--------------------------------------------------------------------------------
 1 | package swarm
 2 | 
 3 | import "time"
 4 | 
 5 | // Version represent the internal object version.
 6 | type Version struct {
 7 | 	Index uint64 `json:",omitempty"`
 8 | }
 9 | 
10 | // Meta is  base object inherited by most of the other once.
11 | type Meta struct {
12 | 	Version   Version   `json:",omitempty"`
13 | 	CreatedAt time.Time `json:",omitempty"`
14 | 	UpdatedAt time.Time `json:",omitempty"`
15 | }
16 | 
17 | // Annotations represents how to describe an object.
18 | type Annotations struct {
19 | 	Name   string            `json:",omitempty"`
20 | 	Labels map[string]string `json:",omitempty"`
21 | }
22 | 


--------------------------------------------------------------------------------
/vendor/github.com/equinox-io/equinox/internal/go-update/LICENSE:
--------------------------------------------------------------------------------
 1 | Copyright 2015 Alan Shreve
 2 | 
 3 | Licensed under the Apache License, Version 2.0 (the "License");
 4 | you may not use this file except in compliance with the License.
 5 | You may obtain a copy of the License at
 6 | 
 7 |    http://www.apache.org/licenses/LICENSE-2.0
 8 | 
 9 | Unless required by applicable law or agreed to in writing, software
10 | distributed under the License is distributed on an "AS IS" BASIS,
11 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | See the License for the specific language governing permissions and
13 | limitations under the License.
14 | 


--------------------------------------------------------------------------------
/client/error.go:
--------------------------------------------------------------------------------
 1 | package client
 2 | 
 3 | import (
 4 | 	"encoding/json"
 5 | 	"fmt"
 6 | 	"io/ioutil"
 7 | 	"net/http"
 8 | )
 9 | 
10 | type Error struct {
11 | 	Error string `json:"error"`
12 | }
13 | 
14 | func responseError(res *http.Response) error {
15 | 	if res.StatusCode < 400 {
16 | 		return nil
17 | 	}
18 | 
19 | 	data, err := ioutil.ReadAll(res.Body)
20 | 
21 | 	if err != nil {
22 | 		return fmt.Errorf("error reading response body: %s", err)
23 | 	}
24 | 
25 | 	var e Error
26 | 
27 | 	err = json.Unmarshal(data, &e)
28 | 
29 | 	if err != nil {
30 | 		return fmt.Errorf("response status: %d", res.StatusCode)
31 | 	}
32 | 
33 | 	return fmt.Errorf(e.Error)
34 | }
35 | 


--------------------------------------------------------------------------------
/provider/aws/lambda/fluentd/vendor/github.com/fluent/fluent-logger-golang/fluent/proto.go:
--------------------------------------------------------------------------------
 1 | //go:generate msgp
 2 | 
 3 | package fluent
 4 | 
 5 | //msgp:tuple Entry
 6 | type Entry struct {
 7 | 	Time   int64       `msg:"time"`
 8 | 	Record interface{} `msg:"record"`
 9 | }
10 | 
11 | //msgp:tuple Forward
12 | type Forward struct {
13 | 	Tag     string      `msg:"tag"`
14 | 	Entries []Entry     `msg:"entries"`
15 | 	Option  interface{} `msg:"option"`
16 | }
17 | 
18 | //msgp:tuple Message
19 | type Message struct {
20 | 	Tag    string      `msg:"tag"`
21 | 	Time   int64       `msg:"time"`
22 | 	Record interface{} `msg:"record"`
23 | 	Option interface{} `msg:"option"`
24 | }
25 | 


--------------------------------------------------------------------------------
/client/links.go:
--------------------------------------------------------------------------------
 1 | package client
 2 | 
 3 | import "fmt"
 4 | 
 5 | func (c *Client) CreateLink(app, name string) (*Service, error) {
 6 | 	params := Params{
 7 | 		"app": app,
 8 | 	}
 9 | 
10 | 	var service Service
11 | 
12 | 	err := c.Post(fmt.Sprintf("/services/%s/links", name), params, &service)
13 | 
14 | 	if err != nil {
15 | 		return nil, err
16 | 	}
17 | 
18 | 	return &service, nil
19 | }
20 | 
21 | func (c *Client) DeleteLink(app, name string) (*Service, error) {
22 | 	var service Service
23 | 
24 | 	err := c.Delete(fmt.Sprintf("/services/%s/links/%s", name, app), &service)
25 | 
26 | 	if err != nil {
27 | 		return nil, err
28 | 	}
29 | 
30 | 	return &service, nil
31 | }
32 | 


--------------------------------------------------------------------------------
/Makefile:
--------------------------------------------------------------------------------
 1 | .PHONY: all templates test test-deps vendor
 2 | 
 3 | all: templates
 4 | 
 5 | builder:
 6 | 	docker build -t convox/build:$(USER) -f api/cmd/build/Dockerfile .
 7 | 	docker push convox/build:$(USER)
 8 | 
 9 | fixtures:
10 | 	make -C api/models/fixtures
11 | 
12 | release:
13 | 	make -C provider release VERSION=$(VERSION)
14 | 	docker build -t convox/api:$(VERSION) .
15 | 	docker push convox/api:$(VERSION)
16 | 
17 | templates:
18 | 	go get -u github.com/jteeuwen/go-bindata/...
19 | 	make -C api templates
20 | 	make -C cmd templates
21 | 	make -C provider templates
22 | 	make -C sync templates
23 | 
24 | test:
25 | 	env PROVIDER=test bin/test
26 | 
27 | vendor:
28 | 	godep save ./...
29 | 


--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/env_unix.go:
--------------------------------------------------------------------------------
 1 | // Copyright 2010 The Go Authors.  All rights reserved.
 2 | // Use of this source code is governed by a BSD-style
 3 | // license that can be found in the LICENSE file.
 4 | 
 5 | // +build darwin dragonfly freebsd linux netbsd openbsd solaris
 6 | 
 7 | // Unix environment variables.
 8 | 
 9 | package unix
10 | 
11 | import "syscall"
12 | 
13 | func Getenv(key string) (value string, found bool) {
14 | 	return syscall.Getenv(key)
15 | }
16 | 
17 | func Setenv(key, value string) error {
18 | 	return syscall.Setenv(key, value)
19 | }
20 | 
21 | func Clearenv() {
22 | 	syscall.Clearenv()
23 | }
24 | 
25 | func Environ() []string {
26 | 	return syscall.Environ()
27 | }
28 | 


--------------------------------------------------------------------------------
/cmd/crypt/README.md:
--------------------------------------------------------------------------------
 1 | # convox/crypt
 2 | 
 3 | Encrypt/decrypt sensitive information
 4 | 
 5 | ## Usage
 6 | 
 7 | ```shell
 8 | # create a key in KMS
 9 | KEY=arn:aws:kms:us-east-1:000000000000:key/00000000-0000-0000-0000-000000000000
10 | 
11 | # set up IAM credentials with access to Decrypt and GenerateDataKey on that key
12 | $ cat <.env
13 | AWS_REGION=...
14 | AWS_ACCESS=...
15 | AWS_SECRET=...
16 | EOF
17 | 
18 | # encrypt
19 | $ cat .env | docker run --env-file .env -i convox/crypt encrypt $KEY > env.encrypted
20 | 
21 | # decrypt
22 | $ cat env.encrypted | docker run --env-file .env -i convox/crypt decrypt $KEY > .env
23 | ```
24 | 
25 | ## License
26 | 
27 | Apache 2.0 © 2015 Convox, Inc.
28 | 


--------------------------------------------------------------------------------
/provider/aws/lambda/fluentd/README.md:
--------------------------------------------------------------------------------
 1 | # Convox FluentD Driver
 2 | 
 3 | This service gets installed as an AWS lambda and triggers off cloudwatch log group stream creation. This is a lambda function that will parse the container output of an application running on a convox cluster and forward them to a given FluentD endpoint.
 4 | 
 5 | ## Modifying
 6 | 
 7 | Get yer golang set up locally then modify `main.go`.
 8 | 
 9 | ## Viewing errors/logs
10 | 
11 | Go to AWS > CloudWatch > Logs > Streams for /aws/lambda/${rack-name}-fluentd.
12 | 
13 | Here you will be able to see the stderr and stdout of the function as it runs.
14 | 
15 | ## License
16 | 
17 | See LICENSE.
18 | 
19 | Created by Adam Enger @ reverb.com
20 | 


--------------------------------------------------------------------------------
/ci/dependencies-pre.sh:
--------------------------------------------------------------------------------
 1 | #!/bin/bash
 2 | set -ex -o pipefail
 3 | 
 4 | VERSION=${VERSION:-ci}
 5 | 
 6 | # install utilities
 7 | curl -O http://stedolan.github.io/jq/download/linux64/jq && chmod +x jq && sudo mv jq /usr/local/bin
 8 | sudo pip install awscli --upgrade
 9 | 
10 | # build and install with VERSION
11 | go get -d github.com/convox/rack/cmd/convox
12 | (
13 | 	cd ${GOPATH%%:*}/src/github.com/convox/rack/cmd/convox
14 | 	[ -n "$CIRCLE_BRANCH" ] && git fetch && git reset --hard origin/$CIRCLE_BRANCH
15 | 	go install -ldflags "-X main.Version $VERSION"
16 | )
17 | 
18 | # configure client id if on CircleCI
19 | if [ ! -d "~/.convox/" ]; then
20 | 	mkdir -p ~/.convox/
21 | 	echo ci@convox.com > ~/.convox/id
22 | fi


--------------------------------------------------------------------------------
/vendor/github.com/Sirupsen/logrus/terminal_notwindows.go:
--------------------------------------------------------------------------------
 1 | // Based on ssh/terminal:
 2 | // Copyright 2011 The Go Authors. All rights reserved.
 3 | // Use of this source code is governed by a BSD-style
 4 | // license that can be found in the LICENSE file.
 5 | 
 6 | // +build linux darwin freebsd openbsd netbsd dragonfly
 7 | 
 8 | package logrus
 9 | 
10 | import (
11 | 	"syscall"
12 | 	"unsafe"
13 | )
14 | 
15 | // IsTerminal returns true if stderr's file descriptor is a terminal.
16 | func IsTerminal() bool {
17 | 	fd := syscall.Stderr
18 | 	var termios Termios
19 | 	_, _, err := syscall.Syscall6(syscall.SYS_IOCTL, uintptr(fd), ioctlReadTermios, uintptr(unsafe.Pointer(&termios)), 0, 0, 0)
20 | 	return err == 0
21 | }
22 | 


--------------------------------------------------------------------------------
/vendor/github.com/aws/aws-sdk-go/aws/request/http_request_1_4.go:
--------------------------------------------------------------------------------
 1 | // +build !go1.5
 2 | 
 3 | package request
 4 | 
 5 | import (
 6 | 	"io"
 7 | 	"net/http"
 8 | 	"net/url"
 9 | )
10 | 
11 | func copyHTTPRequest(r *http.Request, body io.ReadCloser) *http.Request {
12 | 	req := &http.Request{
13 | 		URL:           &url.URL{},
14 | 		Header:        http.Header{},
15 | 		Close:         r.Close,
16 | 		Body:          body,
17 | 		Host:          r.Host,
18 | 		Method:        r.Method,
19 | 		Proto:         r.Proto,
20 | 		ContentLength: r.ContentLength,
21 | 	}
22 | 
23 | 	*req.URL = *r.URL
24 | 	for k, v := range r.Header {
25 | 		for _, vv := range v {
26 | 			req.Header.Add(k, vv)
27 | 		}
28 | 	}
29 | 
30 | 	return req
31 | }
32 | 


--------------------------------------------------------------------------------
/vendor/github.com/docker/docker/pkg/system/lstat_windows.go:
--------------------------------------------------------------------------------
 1 | // +build windows
 2 | 
 3 | package system
 4 | 
 5 | import (
 6 | 	"os"
 7 | )
 8 | 
 9 | // Lstat calls os.Lstat to get a fileinfo interface back.
10 | // This is then copied into our own locally defined structure.
11 | // Note the Linux version uses fromStatT to do the copy back,
12 | // but that not strictly necessary when already in an OS specific module.
13 | func Lstat(path string) (*StatT, error) {
14 | 	fi, err := os.Lstat(path)
15 | 	if err != nil {
16 | 		return nil, err
17 | 	}
18 | 
19 | 	return &StatT{
20 | 		name:    fi.Name(),
21 | 		size:    fi.Size(),
22 | 		mode:    fi.Mode(),
23 | 		modTime: fi.ModTime(),
24 | 		isDir:   fi.IsDir()}, nil
25 | }
26 | 


--------------------------------------------------------------------------------
/vendor/gopkg.in/urfave/cli.v1/cli.go:
--------------------------------------------------------------------------------
 1 | // Package cli provides a minimal framework for creating and organizing command line
 2 | // Go applications. cli is designed to be easy to understand and write, the most simple
 3 | // cli application can be written as follows:
 4 | //   func main() {
 5 | //     cli.NewApp().Run(os.Args)
 6 | //   }
 7 | //
 8 | // Of course this application does not do much, so let's make this an actual application:
 9 | //   func main() {
10 | //     app := cli.NewApp()
11 | //     app.Name = "greet"
12 | //     app.Usage = "say a greeting"
13 | //     app.Action = func(c *cli.Context) error {
14 | //       println("Greetings")
15 | //     }
16 | //
17 | //     app.Run(os.Args)
18 | //   }
19 | package cli
20 | 


--------------------------------------------------------------------------------
/cmd/convox/stdcli/info.go:
--------------------------------------------------------------------------------
 1 | package stdcli
 2 | 
 3 | import "fmt"
 4 | 
 5 | type Info struct {
 6 | 	Rows []InfoRow
 7 | }
 8 | 
 9 | type InfoRow struct {
10 | 	Name  string
11 | 	Value string
12 | }
13 | 
14 | func NewInfo() *Info {
15 | 	return &Info{Rows: []InfoRow{}}
16 | }
17 | 
18 | func (i *Info) Add(name, value string) {
19 | 	i.Rows = append(i.Rows, InfoRow{
20 | 		Name:  name,
21 | 		Value: value,
22 | 	})
23 | }
24 | 
25 | func (i *Info) Print() {
26 | 	longest := 0
27 | 
28 | 	for _, r := range i.Rows {
29 | 		if len(r.Name) > longest {
30 | 			longest = len(r.Name)
31 | 		}
32 | 	}
33 | 
34 | 	for _, r := range i.Rows {
35 | 		Writef(fmt.Sprintf("
%%-%ds
%%s\n", longest), r.Name, r.Value) 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/pkg/system/utimes_freebsd.go: -------------------------------------------------------------------------------- 1 | package system 2 | 3 | import ( 4 | "syscall" 5 | "unsafe" 6 | ) 7 | 8 | // LUtimesNano is used to change access and modification time of the specified path. 9 | // It's used for symbol link file because syscall.UtimesNano doesn't support a NOFOLLOW flag atm. 10 | func LUtimesNano(path string, ts []syscall.Timespec) error { 11 | var _path *byte 12 | _path, err := syscall.BytePtrFromString(path) 13 | if err != nil { 14 | return err 15 | } 16 | 17 | if _, _, err := syscall.Syscall(syscall.SYS_LUTIMES, uintptr(unsafe.Pointer(_path)), uintptr(unsafe.Pointer(&ts[0])), 0); err != 0 && err != syscall.ENOSYS { 18 | return err 19 | } 20 | 21 | return nil 22 | } 23 | -------------------------------------------------------------------------------- /vendor/github.com/opencontainers/runc/libcontainer/user/lookup_unix.go: -------------------------------------------------------------------------------- 1 | // +build darwin dragonfly freebsd linux netbsd openbsd solaris 2 | 3 | package user 4 | 5 | import ( 6 | "io" 7 | "os" 8 | ) 9 | 10 | // Unix-specific path to the passwd and group formatted files. 11 | const ( 12 | unixPasswdPath = "/etc/passwd" 13 | unixGroupPath = "/etc/group" 14 | ) 15 | 16 | func GetPasswdPath() (string, error) { 17 | return unixPasswdPath, nil 18 | } 19 | 20 | func GetPasswd() (io.ReadCloser, error) { 21 | return os.Open(unixPasswdPath) 22 | } 23 | 24 | func GetGroupPath() (string, error) { 25 | return unixGroupPath, nil 26 | } 27 | 28 | func GetGroup() (io.ReadCloser, error) { 29 | return os.Open(unixGroupPath) 30 | } 31 | -------------------------------------------------------------------------------- /vendor/golang.org/x/crypto/curve25519/const_amd64.s: -------------------------------------------------------------------------------- 1 | // Copyright 2012 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // This code was translated into a form compatible with 6a from the public 6 | // domain sources in SUPERCOP: http://bench.cr.yp.to/supercop.html 7 | 8 | // +build amd64,!gccgo,!appengine 9 | 10 | DATA ·REDMASK51(SB)/8, $0x0007FFFFFFFFFFFF 11 | GLOBL ·REDMASK51(SB), 8, $8 12 | 13 | DATA ·_121666_213(SB)/8, $996687872 14 | GLOBL ·_121666_213(SB), 8, $8 15 | 16 | DATA ·_2P0(SB)/8, $0xFFFFFFFFFFFDA 17 | GLOBL ·_2P0(SB), 8, $8 18 | 19 | DATA ·_2P1234(SB)/8, $0xFFFFFFFFFFFFE 20 | GLOBL ·_2P1234(SB), 8, $8 21 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/asm_linux_arm64.s: -------------------------------------------------------------------------------- 1 | // Copyright 2015 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build linux 6 | // +build arm64 7 | // +build !gccgo 8 | 9 | #include "textflag.h" 10 | 11 | // Just jump to package syscall's implementation for all these functions. 12 | // The runtime may know about them. 13 | 14 | TEXT ·Syscall(SB),NOSPLIT,$0-56 15 | B syscall·Syscall(SB) 16 | 17 | TEXT ·Syscall6(SB),NOSPLIT,$0-80 18 | B syscall·Syscall6(SB) 19 | 20 | TEXT ·RawSyscall(SB),NOSPLIT,$0-56 21 | B syscall·RawSyscall(SB) 22 | 23 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-80 24 | B syscall·RawSyscall6(SB) 25 | -------------------------------------------------------------------------------- /vendor/github.com/Sirupsen/logrus/doc.go: -------------------------------------------------------------------------------- 1 | /* 2 | Package logrus is a structured logger for Go, completely API compatible with the standard library logger. 3 | 4 | 5 | The simplest way to use Logrus is simply the package-level exported logger: 6 | 7 | package main 8 | 9 | import ( 10 | log "github.com/Sirupsen/logrus" 11 | ) 12 | 13 | func main() { 14 | log.WithFields(log.Fields{ 15 | "animal": "walrus", 16 | "number": 1, 17 | "size": 10, 18 | }).Info("A walrus appears") 19 | } 20 | 21 | Output: 22 | time="2015-09-07T08:48:33Z" level=info msg="A walrus appears" animal=walrus number=1 size=10 23 | 24 | For a full guide visit https://github.com/Sirupsen/logrus 25 | */ 26 | package logrus 27 | -------------------------------------------------------------------------------- /manifest/fixtures/networks.yml: -------------------------------------------------------------------------------- 1 | version: "2" 2 | services: 3 | web: 4 | build: . 5 | command: bin/web 6 | dockerfile: Dockerfile.dev 7 | entrypoint: /sbin/init 8 | environment: 9 | - FOO=bar 10 | - BAZ 11 | labels: 12 | - convox.foo=bar 13 | - convox.baz=4 14 | links: 15 | - database 16 | ports: 17 | - 80:5000 18 | - 443:5001 19 | privileged: true 20 | volumes: 21 | - /var/db 22 | database: 23 | environment: 24 | FOO: bar 25 | BAZ: qux 26 | image: convox/postgres 27 | labels: 28 | convox.aaa: 4 29 | convox.ccc: ddd 30 | ports: 31 | - 5432 32 | networks: 33 | foo: 34 | external: 35 | name: "foo" 36 | -------------------------------------------------------------------------------- /vendor/github.com/aws/aws-sdk-go/private/protocol/unmarshal.go: -------------------------------------------------------------------------------- 1 | package protocol 2 | 3 | import ( 4 | "io" 5 | "io/ioutil" 6 | 7 | "github.com/aws/aws-sdk-go/aws/request" 8 | ) 9 | 10 | // UnmarshalDiscardBodyHandler is a named request handler to empty and close a response's body 11 | var UnmarshalDiscardBodyHandler = request.NamedHandler{Name: "awssdk.shared.UnmarshalDiscardBody", Fn: UnmarshalDiscardBody} 12 | 13 | // UnmarshalDiscardBody is a request handler to empty a response's body and closing it. 14 | func UnmarshalDiscardBody(r *request.Request) { 15 | if r.HTTPResponse == nil || r.HTTPResponse.Body == nil { 16 | return 17 | } 18 | 19 | io.Copy(ioutil.Discard, r.HTTPResponse.Body) 20 | r.HTTPResponse.Body.Close() 21 | } 22 | -------------------------------------------------------------------------------- /vendor/github.com/Sirupsen/logrus/writer.go: -------------------------------------------------------------------------------- 1 | package logrus 2 | 3 | import ( 4 | "bufio" 5 | "io" 6 | "runtime" 7 | ) 8 | 9 | func (logger *Logger) Writer() *io.PipeWriter { 10 | reader, writer := io.Pipe() 11 | 12 | go logger.writerScanner(reader) 13 | runtime.SetFinalizer(writer, writerFinalizer) 14 | 15 | return writer 16 | } 17 | 18 | func (logger *Logger) writerScanner(reader *io.PipeReader) { 19 | scanner := bufio.NewScanner(reader) 20 | for scanner.Scan() { 21 | logger.Print(scanner.Text()) 22 | } 23 | if err := scanner.Err(); err != nil { 24 | logger.Errorf("Error while reading from Writer: %s", err) 25 | } 26 | reader.Close() 27 | } 28 | 29 | func writerFinalizer(writer *io.PipeWriter) { 30 | writer.Close() 31 | } 32 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/NOTICE: -------------------------------------------------------------------------------- 1 | Docker 2 | Copyright 2012-2016 Docker, Inc. 3 | 4 | This product includes software developed at Docker, Inc. (https://www.docker.com). 5 | 6 | This product contains software (https://github.com/kr/pty) developed 7 | by Keith Rarick, licensed under the MIT License. 8 | 9 | The following is courtesy of our legal counsel: 10 | 11 | 12 | Use and transfer of Docker may be subject to certain restrictions by the 13 | United States and other governments. 14 | It is your responsibility to ensure that your use and/or transfer does not 15 | violate applicable laws. 16 | 17 | For more information, please see https://www.bis.doc.gov 18 | 19 | See also https://www.apache.org/dev/crypto.html and/or seek legal counsel. 20 | -------------------------------------------------------------------------------- /manifest/fixtures/full-v2.yml: -------------------------------------------------------------------------------- 1 | version: "2" 2 | services: 3 | web: 4 | build: . 5 | command: bin/web 6 | dockerfile: Dockerfile.dev 7 | entrypoint: /sbin/init 8 | environment: 9 | - FOO=bar 10 | - BAZ 11 | extra_hosts: 12 | - foo:10.10.10.10 13 | - bar:20.20.20.20 14 | labels: 15 | - convox.foo=bar 16 | - convox.baz=4 17 | links: 18 | - database 19 | ports: 20 | - 80:5000 21 | - 443:5001 22 | privileged: true 23 | volumes: 24 | - /var/db 25 | database: 26 | environment: 27 | FOO: bar 28 | BAZ: qux 29 | image: convox/postgres 30 | labels: 31 | convox.aaa: 4 32 | convox.ccc: ddd 33 | ports: 34 | - 5432 35 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/str.go: -------------------------------------------------------------------------------- 1 | // Copyright 2009 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build darwin dragonfly freebsd linux netbsd openbsd solaris 6 | 7 | package unix 8 | 9 | func itoa(val int) string { // do it here rather than with fmt to avoid dependency 10 | if val < 0 { 11 | return "-" + uitoa(uint(-val)) 12 | } 13 | return uitoa(uint(val)) 14 | } 15 | 16 | func uitoa(val uint) string { 17 | var buf [32]byte // big enough for int64 18 | i := len(buf) - 1 19 | for val >= 10 { 20 | buf[i] = byte(val%10 + '0') 21 | i-- 22 | val /= 10 23 | } 24 | buf[i] = byte(val + '0') 25 | return string(buf[i:]) 26 | } 27 | -------------------------------------------------------------------------------- /vendor/github.com/aws/aws-sdk-go/service/kinesis/waiters.go: -------------------------------------------------------------------------------- 1 | // THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT. 2 | 3 | package kinesis 4 | 5 | import ( 6 | "github.com/aws/aws-sdk-go/private/waiter" 7 | ) 8 | 9 | func (c *Kinesis) WaitUntilStreamExists(input *DescribeStreamInput) error { 10 | waiterCfg := waiter.Config{ 11 | Operation: "DescribeStream", 12 | Delay: 10, 13 | MaxAttempts: 18, 14 | Acceptors: []waiter.WaitAcceptor{ 15 | { 16 | State: "success", 17 | Matcher: "path", 18 | Argument: "StreamDescription.StreamStatus", 19 | Expected: "ACTIVE", 20 | }, 21 | }, 22 | } 23 | 24 | w := waiter.Waiter{ 25 | Client: c, 26 | Input: input, 27 | Config: waiterCfg, 28 | } 29 | return w.Wait() 30 | } 31 | -------------------------------------------------------------------------------- /api/cmd/build/source/source.go: -------------------------------------------------------------------------------- 1 | package source 2 | 3 | import ( 4 | "io" 5 | "net/http" 6 | "net/url" 7 | "os" 8 | 9 | "github.com/convox/rack/provider" 10 | ) 11 | 12 | type Source interface { 13 | Fetch(out io.Writer) (string, error) 14 | } 15 | 16 | func urlReader(url_ string) (io.ReadCloser, error) { 17 | u, err := url.Parse(url_) 18 | if err != nil { 19 | return nil, err 20 | } 21 | 22 | switch u.Scheme { 23 | case "file": 24 | fd, err := os.Open(u.Path) 25 | if err != nil { 26 | return nil, err 27 | } 28 | return fd, nil 29 | case "object": 30 | return provider.FromEnv().ObjectFetch(u.Path) 31 | } 32 | 33 | req, err := http.Get(url_) 34 | if err != nil { 35 | return nil, err 36 | } 37 | 38 | return req.Body, nil 39 | } 40 | -------------------------------------------------------------------------------- /provider/aws/docker.go: -------------------------------------------------------------------------------- 1 | package aws 2 | 3 | import ( 4 | "fmt" 5 | "os" 6 | 7 | "github.com/fsouza/go-dockerclient" 8 | ) 9 | 10 | func (p *AWSProvider) docker(host string) (*docker.Client, error) { 11 | return docker.NewClient(host) 12 | } 13 | 14 | func (p *AWSProvider) dockerInstance(id string) (*docker.Client, error) { 15 | i, err := p.describeInstance(id) 16 | if err != nil { 17 | return nil, err 18 | } 19 | 20 | host := "" 21 | 22 | switch { 23 | case p.IsTest(): 24 | host = fmt.Sprintf("http://%s", os.Getenv("DOCKER_HOST")) 25 | case p.Development: 26 | host = fmt.Sprintf("http://%s:2376", *i.PublicIpAddress) 27 | default: 28 | host = fmt.Sprintf("http://%s:2376", *i.PrivateIpAddress) 29 | } 30 | 31 | return p.docker(host) 32 | } 33 | -------------------------------------------------------------------------------- /provider/aws/lambda/formation/main.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "encoding/json" 5 | "fmt" 6 | "os" 7 | 8 | "github.com/convox/rack/provider/aws/lambda/formation/handler" 9 | ) 10 | 11 | func die(err error) { 12 | fmt.Printf("die error: %s\n", err) 13 | os.Exit(1) 14 | } 15 | 16 | func main() { 17 | if len(os.Args) < 2 { 18 | die(fmt.Errorf("must specify event as argument")) 19 | } 20 | 21 | data := []byte(os.Args[1]) 22 | 23 | var req handler.Request 24 | 25 | err := json.Unmarshal(data, &req) 26 | 27 | if err != nil { 28 | die(err) 29 | } 30 | 31 | fmt.Printf("main req = %+v\n", req) 32 | 33 | err = handler.HandleRequest(req) 34 | 35 | if err != nil { 36 | fmt.Printf("main error: %s\n", err) 37 | return 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /vendor/github.com/aws/aws-sdk-go/service/cloudwatch/waiters.go: -------------------------------------------------------------------------------- 1 | // THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT. 2 | 3 | package cloudwatch 4 | 5 | import ( 6 | "github.com/aws/aws-sdk-go/private/waiter" 7 | ) 8 | 9 | func (c *CloudWatch) WaitUntilAlarmExists(input *DescribeAlarmsInput) error { 10 | waiterCfg := waiter.Config{ 11 | Operation: "DescribeAlarms", 12 | Delay: 5, 13 | MaxAttempts: 40, 14 | Acceptors: []waiter.WaitAcceptor{ 15 | { 16 | State: "success", 17 | Matcher: "path", 18 | Argument: "length(MetricAlarms[]) > `0`", 19 | Expected: true, 20 | }, 21 | }, 22 | } 23 | 24 | w := waiter.Waiter{ 25 | Client: c, 26 | Input: input, 27 | Config: waiterCfg, 28 | } 29 | return w.Wait() 30 | } 31 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/pkg/system/stat_freebsd.go: -------------------------------------------------------------------------------- 1 | package system 2 | 3 | import ( 4 | "syscall" 5 | ) 6 | 7 | // fromStatT converts a syscall.Stat_t type to a system.Stat_t type 8 | func fromStatT(s *syscall.Stat_t) (*StatT, error) { 9 | return &StatT{size: s.Size, 10 | mode: uint32(s.Mode), 11 | uid: s.Uid, 12 | gid: s.Gid, 13 | rdev: uint64(s.Rdev), 14 | mtim: s.Mtimespec}, nil 15 | } 16 | 17 | // Stat takes a path to a file and returns 18 | // a system.Stat_t type pertaining to that file. 19 | // 20 | // Throws an error if the file does not exist 21 | func Stat(path string) (*StatT, error) { 22 | s := &syscall.Stat_t{} 23 | if err := syscall.Stat(path, s); err != nil { 24 | return nil, err 25 | } 26 | return fromStatT(s) 27 | } 28 | -------------------------------------------------------------------------------- /manifest/push.go: -------------------------------------------------------------------------------- 1 | package manifest 2 | 3 | import ( 4 | "fmt" 5 | "strings" 6 | ) 7 | 8 | func (m *Manifest) Push(template, app, build string, stream Stream) error { 9 | services, err := m.runOrder("") 10 | if err != nil { 11 | return err 12 | } 13 | 14 | for _, s := range services { 15 | local := fmt.Sprintf("%s/%s", app, s.Name) 16 | 17 | remote := template 18 | remote = strings.Replace(remote, "{service}", s.Name, -1) 19 | remote = strings.Replace(remote, "{build}", build, -1) 20 | 21 | if err := DefaultRunner.Run(stream, Docker("tag", local, remote)); err != nil { 22 | return err 23 | } 24 | 25 | if err := DefaultRunner.Run(stream, Docker("push", remote)); err != nil { 26 | return err 27 | } 28 | } 29 | 30 | return nil 31 | } 32 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/race.go: -------------------------------------------------------------------------------- 1 | // Copyright 2012 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build darwin,race linux,race freebsd,race 6 | 7 | package unix 8 | 9 | import ( 10 | "runtime" 11 | "unsafe" 12 | ) 13 | 14 | const raceenabled = true 15 | 16 | func raceAcquire(addr unsafe.Pointer) { 17 | runtime.RaceAcquire(addr) 18 | } 19 | 20 | func raceReleaseMerge(addr unsafe.Pointer) { 21 | runtime.RaceReleaseMerge(addr) 22 | } 23 | 24 | func raceReadRange(addr unsafe.Pointer, len int) { 25 | runtime.RaceReadRange(addr, len) 26 | } 27 | 28 | func raceWriteRange(addr unsafe.Pointer, len int) { 29 | runtime.RaceWriteRange(addr, len) 30 | } 31 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/pkg/archive/changes_windows.go: -------------------------------------------------------------------------------- 1 | package archive 2 | 3 | import ( 4 | "os" 5 | 6 | "github.com/docker/docker/pkg/system" 7 | ) 8 | 9 | func statDifferent(oldStat *system.StatT, newStat *system.StatT) bool { 10 | 11 | // Don't look at size for dirs, its not a good measure of change 12 | if oldStat.ModTime() != newStat.ModTime() || 13 | oldStat.Mode() != newStat.Mode() || 14 | oldStat.Size() != newStat.Size() && !oldStat.IsDir() { 15 | return true 16 | } 17 | return false 18 | } 19 | 20 | func (info *FileInfo) isDir() bool { 21 | return info.parent == nil || info.stat.IsDir() 22 | } 23 | 24 | func getIno(fi os.FileInfo) (inode uint64) { 25 | return 26 | } 27 | 28 | func hasHardlinks(fi os.FileInfo) bool { 29 | return false 30 | } 31 | -------------------------------------------------------------------------------- /vendor/github.com/mitchellh/go-homedir/README.md: -------------------------------------------------------------------------------- 1 | # go-homedir 2 | 3 | This is a Go library for detecting the user's home directory without 4 | the use of cgo, so the library can be used in cross-compilation environments. 5 | 6 | Usage is incredibly simple, just call `homedir.Dir()` to get the home directory 7 | for a user, and `homedir.Expand()` to expand the `~` in a path to the home 8 | directory. 9 | 10 | **Why not just use `os/user`?** The built-in `os/user` package requires 11 | cgo on Darwin systems. This means that any Go code that uses that package 12 | cannot cross compile. But 99% of the time the use for `os/user` is just to 13 | retrieve the home directory, which we can do for the current user without 14 | cgo. This library does that, enabling cross-compilation. 15 | -------------------------------------------------------------------------------- /vendor/github.com/dustin/go-humanize/big.go: -------------------------------------------------------------------------------- 1 | package humanize 2 | 3 | import ( 4 | "math/big" 5 | ) 6 | 7 | // order of magnitude (to a max order) 8 | func oomm(n, b *big.Int, maxmag int) (float64, int) { 9 | mag := 0 10 | m := &big.Int{} 11 | for n.Cmp(b) >= 0 { 12 | n.DivMod(n, b, m) 13 | mag++ 14 | if mag == maxmag && maxmag >= 0 { 15 | break 16 | } 17 | } 18 | return float64(n.Int64()) + (float64(m.Int64()) / float64(b.Int64())), mag 19 | } 20 | 21 | // total order of magnitude 22 | // (same as above, but with no upper limit) 23 | func oom(n, b *big.Int) (float64, int) { 24 | mag := 0 25 | m := &big.Int{} 26 | for n.Cmp(b) >= 0 { 27 | n.DivMod(n, b, m) 28 | mag++ 29 | } 30 | return float64(n.Int64()) + (float64(m.Int64()) / float64(b.Int64())), mag 31 | } 32 | -------------------------------------------------------------------------------- /manifest/fixtures/specific-service.yml: -------------------------------------------------------------------------------- 1 | version: "2" 2 | services: 3 | web: 4 | build: . 5 | command: bin/web 6 | dockerfile: Dockerfile.dev 7 | entrypoint: /sbin/init 8 | environment: 9 | - FOO=bar 10 | - BAZ 11 | extra_hosts: 12 | - foo:10.10.10.10 13 | - bar:20.20.20.20 14 | labels: 15 | - convox.foo=bar 16 | - convox.baz=4 17 | links: 18 | - database 19 | ports: 20 | - 80:5000 21 | - 443:5001 22 | privileged: true 23 | volumes: 24 | - /var/db 25 | database: 26 | environment: 27 | FOO: bar 28 | BAZ: qux 29 | image: convox/postgres 30 | labels: 31 | convox.aaa: 4 32 | convox.ccc: ddd 33 | ports: 34 | - 5432 35 | extra: 36 | build: ./extra 37 | -------------------------------------------------------------------------------- /vendor/github.com/Sirupsen/logrus/terminal_windows.go: -------------------------------------------------------------------------------- 1 | // Based on ssh/terminal: 2 | // Copyright 2011 The Go Authors. All rights reserved. 3 | // Use of this source code is governed by a BSD-style 4 | // license that can be found in the LICENSE file. 5 | 6 | // +build windows 7 | 8 | package logrus 9 | 10 | import ( 11 | "syscall" 12 | "unsafe" 13 | ) 14 | 15 | var kernel32 = syscall.NewLazyDLL("kernel32.dll") 16 | 17 | var ( 18 | procGetConsoleMode = kernel32.NewProc("GetConsoleMode") 19 | ) 20 | 21 | // IsTerminal returns true if stderr's file descriptor is a terminal. 22 | func IsTerminal() bool { 23 | fd := syscall.Stderr 24 | var st uint32 25 | r, _, e := syscall.Syscall(procGetConsoleMode.Addr(), 2, uintptr(fd), uintptr(unsafe.Pointer(&st)), 0) 26 | return r != 0 && e == 0 27 | } 28 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/asm_linux_ppc64x.s: -------------------------------------------------------------------------------- 1 | // Copyright 2014 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build linux 6 | // +build ppc64 ppc64le 7 | // +build !gccgo 8 | 9 | #include "textflag.h" 10 | 11 | // 12 | // System calls for ppc64, Linux 13 | // 14 | 15 | // Just jump to package syscall's implementation for all these functions. 16 | // The runtime may know about them. 17 | 18 | TEXT ·Syscall(SB),NOSPLIT,$0-56 19 | BR syscall·Syscall(SB) 20 | 21 | TEXT ·Syscall6(SB),NOSPLIT,$0-80 22 | BR syscall·Syscall6(SB) 23 | 24 | TEXT ·RawSyscall(SB),NOSPLIT,$0-56 25 | BR syscall·RawSyscall(SB) 26 | 27 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-80 28 | BR syscall·RawSyscall6(SB) 29 | -------------------------------------------------------------------------------- /vendor/github.com/jmespath/go-jmespath/toktype_string.go: -------------------------------------------------------------------------------- 1 | // generated by stringer -type=tokType; DO NOT EDIT 2 | 3 | package jmespath 4 | 5 | import "fmt" 6 | 7 | const _tokType_name = "tUnknowntStartDottFiltertFlattentLparentRparentLbrackettRbrackettLbracetRbracetOrtPipetNumbertUnquotedIdentifiertQuotedIdentifiertCommatColontLTtLTEtGTtGTEtEQtNEtJSONLiteraltStringLiteraltCurrenttExpreftAndtNottEOF" 8 | 9 | var _tokType_index = [...]uint8{0, 8, 13, 17, 24, 32, 39, 46, 55, 64, 71, 78, 81, 86, 93, 112, 129, 135, 141, 144, 148, 151, 155, 158, 161, 173, 187, 195, 202, 206, 210, 214} 10 | 11 | func (i tokType) String() string { 12 | if i < 0 || i >= tokType(len(_tokType_index)-1) { 13 | return fmt.Sprintf("tokType(%d)", i) 14 | } 15 | return _tokType_name[_tokType_index[i]:_tokType_index[i+1]] 16 | } 17 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/asm_linux_arm.s: -------------------------------------------------------------------------------- 1 | // Copyright 2009 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build !gccgo 6 | 7 | #include "textflag.h" 8 | 9 | // 10 | // System calls for arm, Linux 11 | // 12 | 13 | // Just jump to package syscall's implementation for all these functions. 14 | // The runtime may know about them. 15 | 16 | TEXT ·Syscall(SB),NOSPLIT,$0-28 17 | B syscall·Syscall(SB) 18 | 19 | TEXT ·Syscall6(SB),NOSPLIT,$0-40 20 | B syscall·Syscall6(SB) 21 | 22 | TEXT ·RawSyscall(SB),NOSPLIT,$0-28 23 | B syscall·RawSyscall(SB) 24 | 25 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-40 26 | B syscall·RawSyscall6(SB) 27 | 28 | TEXT ·seek(SB),NOSPLIT,$0-32 29 | B syscall·seek(SB) 30 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/asm_linux_mips64x.s: -------------------------------------------------------------------------------- 1 | // Copyright 2015 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build linux 6 | // +build mips64 mips64le 7 | // +build !gccgo 8 | 9 | #include "textflag.h" 10 | 11 | // 12 | // System calls for mips64, Linux 13 | // 14 | 15 | // Just jump to package syscall's implementation for all these functions. 16 | // The runtime may know about them. 17 | 18 | TEXT ·Syscall(SB),NOSPLIT,$0-56 19 | JMP syscall·Syscall(SB) 20 | 21 | TEXT ·Syscall6(SB),NOSPLIT,$0-80 22 | JMP syscall·Syscall6(SB) 23 | 24 | TEXT ·RawSyscall(SB),NOSPLIT,$0-56 25 | JMP syscall·RawSyscall(SB) 26 | 27 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-80 28 | JMP syscall·RawSyscall6(SB) 29 | -------------------------------------------------------------------------------- /provider/aws/lambda/lifecycle/index.js: -------------------------------------------------------------------------------- 1 | exports.external = function(event, context) { 2 | console.log('event', JSON.stringify(event)); 3 | console.log('context', JSON.stringify(context)); 4 | 5 | process.on('uncaughtException', function(err) { 6 | return context.done(err); 7 | }); 8 | 9 | var child = require('child_process').spawn('./main', [JSON.stringify(event)]); 10 | 11 | child.stdout.on('data', function(data) { 12 | console.log(data.toString()); 13 | }); 14 | 15 | child.stderr.on('data', function(data) { 16 | console.log(data.toString()); 17 | }); 18 | 19 | child.on('close', function(code) { 20 | if (code !== 0) { 21 | return context.done(new Error("Process exited with non-zero status code: " + code)); 22 | } 23 | context.done(null); 24 | }); 25 | } 26 | -------------------------------------------------------------------------------- /vendor/github.com/aws/aws-sdk-go/aws/request/http_request.go: -------------------------------------------------------------------------------- 1 | // +build go1.5 2 | 3 | package request 4 | 5 | import ( 6 | "io" 7 | "net/http" 8 | "net/url" 9 | ) 10 | 11 | func copyHTTPRequest(r *http.Request, body io.ReadCloser) *http.Request { 12 | req := &http.Request{ 13 | URL: &url.URL{}, 14 | Header: http.Header{}, 15 | Close: r.Close, 16 | Body: body, 17 | Host: r.Host, 18 | Method: r.Method, 19 | Proto: r.Proto, 20 | ContentLength: r.ContentLength, 21 | // Cancel will be deprecated in 1.7 and will be replaced with Context 22 | Cancel: r.Cancel, 23 | } 24 | 25 | *req.URL = *r.URL 26 | for k, v := range r.Header { 27 | for _, vv := range v { 28 | req.Header.Add(k, vv) 29 | } 30 | } 31 | 32 | return req 33 | } 34 | -------------------------------------------------------------------------------- /vendor/github.com/aws/aws-sdk-go/service/s3/platform_handlers_go1.6.go: -------------------------------------------------------------------------------- 1 | // +build go1.6 2 | 3 | package s3 4 | 5 | import ( 6 | "github.com/aws/aws-sdk-go/aws" 7 | "github.com/aws/aws-sdk-go/aws/request" 8 | ) 9 | 10 | func platformRequestHandlers(r *request.Request) { 11 | if r.Operation.HTTPMethod == "PUT" { 12 | // 100-Continue should only be used on put requests. 13 | r.Handlers.Sign.PushBack(add100Continue) 14 | } 15 | } 16 | 17 | func add100Continue(r *request.Request) { 18 | if aws.BoolValue(r.Config.S3Disable100Continue) { 19 | return 20 | } 21 | if r.HTTPRequest.ContentLength < 1024*1024*2 { 22 | // Ignore requests smaller than 2MB. This helps prevent delaying 23 | // requests unnecessarily. 24 | return 25 | } 26 | 27 | r.HTTPRequest.Header.Set("Expect", "100-Continue") 28 | } 29 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/asm_freebsd_arm.s: -------------------------------------------------------------------------------- 1 | // Copyright 2012 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build !gccgo 6 | 7 | #include "textflag.h" 8 | 9 | // 10 | // System call support for ARM, FreeBSD 11 | // 12 | 13 | // Just jump to package syscall's implementation for all these functions. 14 | // The runtime may know about them. 15 | 16 | TEXT ·Syscall(SB),NOSPLIT,$0-28 17 | B syscall·Syscall(SB) 18 | 19 | TEXT ·Syscall6(SB),NOSPLIT,$0-40 20 | B syscall·Syscall6(SB) 21 | 22 | TEXT ·Syscall9(SB),NOSPLIT,$0-52 23 | B syscall·Syscall9(SB) 24 | 25 | TEXT ·RawSyscall(SB),NOSPLIT,$0-28 26 | B syscall·RawSyscall(SB) 27 | 28 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-40 29 | B syscall·RawSyscall6(SB) 30 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/asm_netbsd_arm.s: -------------------------------------------------------------------------------- 1 | // Copyright 2013 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build !gccgo 6 | 7 | #include "textflag.h" 8 | 9 | // 10 | // System call support for ARM, NetBSD 11 | // 12 | 13 | // Just jump to package syscall's implementation for all these functions. 14 | // The runtime may know about them. 15 | 16 | TEXT ·Syscall(SB),NOSPLIT,$0-28 17 | B syscall·Syscall(SB) 18 | 19 | TEXT ·Syscall6(SB),NOSPLIT,$0-40 20 | B syscall·Syscall6(SB) 21 | 22 | TEXT ·Syscall9(SB),NOSPLIT,$0-52 23 | B syscall·Syscall9(SB) 24 | 25 | TEXT ·RawSyscall(SB),NOSPLIT,$0-28 26 | B syscall·RawSyscall(SB) 27 | 28 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-40 29 | B syscall·RawSyscall6(SB) 30 | -------------------------------------------------------------------------------- /cmd/convox/templates/init/django/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM convox/django 2 | 3 | # replace exampleapp and exampleproject to tailor the image to your project 4 | # PROJECT is also used by gunicorn in the convox/django Dockerfile 5 | ENV APP exampleapp 6 | ENV PROJECT exampleproject 7 | 8 | # an empty SECRET_KEY during manage.py commands will result in an error 9 | ENV SECRET_KEY foo 10 | 11 | # copy only the files needed for pip install 12 | COPY requirements.txt /app/requirements.txt 13 | RUN pip3 install --upgrade pip 14 | RUN pip3 install -r requirements.txt 15 | 16 | # copy only the files needed for collectstatic 17 | COPY ${APP}/static /app/${APP}/static 18 | COPY ${PROJECT} /app/${PROJECT} 19 | COPY manage.py /app/manage.py 20 | RUN python3 manage.py collectstatic --noinput 21 | 22 | # copy the rest of the app 23 | COPY . /app 24 | -------------------------------------------------------------------------------- /vendor/github.com/davecgh/go-spew/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2012-2013 Dave Collins 2 | 3 | Permission to use, copy, modify, and distribute this software for any 4 | purpose with or without fee is hereby granted, provided that the above 5 | copyright notice and this permission notice appear in all copies. 6 | 7 | THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 8 | WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 9 | MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 10 | ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 11 | WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 12 | ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF 13 | OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 14 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/asm_darwin_386.s: -------------------------------------------------------------------------------- 1 | // Copyright 2009 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build !gccgo 6 | 7 | #include "textflag.h" 8 | 9 | // 10 | // System call support for 386, Darwin 11 | // 12 | 13 | // Just jump to package syscall's implementation for all these functions. 14 | // The runtime may know about them. 15 | 16 | TEXT ·Syscall(SB),NOSPLIT,$0-28 17 | JMP syscall·Syscall(SB) 18 | 19 | TEXT ·Syscall6(SB),NOSPLIT,$0-40 20 | JMP syscall·Syscall6(SB) 21 | 22 | TEXT ·Syscall9(SB),NOSPLIT,$0-52 23 | JMP syscall·Syscall9(SB) 24 | 25 | TEXT ·RawSyscall(SB),NOSPLIT,$0-28 26 | JMP syscall·RawSyscall(SB) 27 | 28 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-40 29 | JMP syscall·RawSyscall6(SB) 30 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/asm_freebsd_386.s: -------------------------------------------------------------------------------- 1 | // Copyright 2009 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build !gccgo 6 | 7 | #include "textflag.h" 8 | 9 | // 10 | // System call support for 386, FreeBSD 11 | // 12 | 13 | // Just jump to package syscall's implementation for all these functions. 14 | // The runtime may know about them. 15 | 16 | TEXT ·Syscall(SB),NOSPLIT,$0-28 17 | JMP syscall·Syscall(SB) 18 | 19 | TEXT ·Syscall6(SB),NOSPLIT,$0-40 20 | JMP syscall·Syscall6(SB) 21 | 22 | TEXT ·Syscall9(SB),NOSPLIT,$0-52 23 | JMP syscall·Syscall9(SB) 24 | 25 | TEXT ·RawSyscall(SB),NOSPLIT,$0-28 26 | JMP syscall·RawSyscall(SB) 27 | 28 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-40 29 | JMP syscall·RawSyscall6(SB) 30 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/asm_netbsd_386.s: -------------------------------------------------------------------------------- 1 | // Copyright 2009 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build !gccgo 6 | 7 | #include "textflag.h" 8 | 9 | // 10 | // System call support for 386, NetBSD 11 | // 12 | 13 | // Just jump to package syscall's implementation for all these functions. 14 | // The runtime may know about them. 15 | 16 | TEXT ·Syscall(SB),NOSPLIT,$0-28 17 | JMP syscall·Syscall(SB) 18 | 19 | TEXT ·Syscall6(SB),NOSPLIT,$0-40 20 | JMP syscall·Syscall6(SB) 21 | 22 | TEXT ·Syscall9(SB),NOSPLIT,$0-52 23 | JMP syscall·Syscall9(SB) 24 | 25 | TEXT ·RawSyscall(SB),NOSPLIT,$0-28 26 | JMP syscall·RawSyscall(SB) 27 | 28 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-40 29 | JMP syscall·RawSyscall6(SB) 30 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/asm_openbsd_386.s: -------------------------------------------------------------------------------- 1 | // Copyright 2009 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build !gccgo 6 | 7 | #include "textflag.h" 8 | 9 | // 10 | // System call support for 386, OpenBSD 11 | // 12 | 13 | // Just jump to package syscall's implementation for all these functions. 14 | // The runtime may know about them. 15 | 16 | TEXT ·Syscall(SB),NOSPLIT,$0-28 17 | JMP syscall·Syscall(SB) 18 | 19 | TEXT ·Syscall6(SB),NOSPLIT,$0-40 20 | JMP syscall·Syscall6(SB) 21 | 22 | TEXT ·Syscall9(SB),NOSPLIT,$0-52 23 | JMP syscall·Syscall9(SB) 24 | 25 | TEXT ·RawSyscall(SB),NOSPLIT,$0-28 26 | JMP syscall·RawSyscall(SB) 27 | 28 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-40 29 | JMP syscall·RawSyscall6(SB) 30 | -------------------------------------------------------------------------------- /vendor/github.com/equinox-io/equinox/internal/go-update/patcher.go: -------------------------------------------------------------------------------- 1 | package update 2 | 3 | import ( 4 | "io" 5 | 6 | "github.com/equinox-io/equinox/internal/go-update/internal/binarydist" 7 | ) 8 | 9 | // Patcher defines an interface for applying binary patches to an old item to get an updated item. 10 | type Patcher interface { 11 | Patch(old io.Reader, new io.Writer, patch io.Reader) error 12 | } 13 | 14 | type patchFn func(io.Reader, io.Writer, io.Reader) error 15 | 16 | func (fn patchFn) Patch(old io.Reader, new io.Writer, patch io.Reader) error { 17 | return fn(old, new, patch) 18 | } 19 | 20 | // NewBSDifferPatcher returns a new Patcher that applies binary patches using 21 | // the bsdiff algorithm. See http://www.daemonology.net/bsdiff/ 22 | func NewBSDiffPatcher() Patcher { 23 | return patchFn(binarydist.Patch) 24 | } 25 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/asm_darwin_amd64.s: -------------------------------------------------------------------------------- 1 | // Copyright 2009 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build !gccgo 6 | 7 | #include "textflag.h" 8 | 9 | // 10 | // System call support for AMD64, Darwin 11 | // 12 | 13 | // Just jump to package syscall's implementation for all these functions. 14 | // The runtime may know about them. 15 | 16 | TEXT ·Syscall(SB),NOSPLIT,$0-56 17 | JMP syscall·Syscall(SB) 18 | 19 | TEXT ·Syscall6(SB),NOSPLIT,$0-80 20 | JMP syscall·Syscall6(SB) 21 | 22 | TEXT ·Syscall9(SB),NOSPLIT,$0-104 23 | JMP syscall·Syscall9(SB) 24 | 25 | TEXT ·RawSyscall(SB),NOSPLIT,$0-56 26 | JMP syscall·RawSyscall(SB) 27 | 28 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-80 29 | JMP syscall·RawSyscall6(SB) 30 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/asm_dragonfly_386.s: -------------------------------------------------------------------------------- 1 | // Copyright 2009 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build !gccgo 6 | 7 | #include "textflag.h" 8 | 9 | // 10 | // System call support for 386, FreeBSD 11 | // 12 | 13 | // Just jump to package syscall's implementation for all these functions. 14 | // The runtime may know about them. 15 | 16 | TEXT ·Syscall(SB),NOSPLIT,$0-32 17 | JMP syscall·Syscall(SB) 18 | 19 | TEXT ·Syscall6(SB),NOSPLIT,$0-44 20 | JMP syscall·Syscall6(SB) 21 | 22 | TEXT ·Syscall9(SB),NOSPLIT,$0-56 23 | JMP syscall·Syscall9(SB) 24 | 25 | TEXT ·RawSyscall(SB),NOSPLIT,$0-32 26 | JMP syscall·RawSyscall(SB) 27 | 28 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-44 29 | JMP syscall·RawSyscall6(SB) 30 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/asm_freebsd_amd64.s: -------------------------------------------------------------------------------- 1 | // Copyright 2009 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build !gccgo 6 | 7 | #include "textflag.h" 8 | 9 | // 10 | // System call support for AMD64, FreeBSD 11 | // 12 | 13 | // Just jump to package syscall's implementation for all these functions. 14 | // The runtime may know about them. 15 | 16 | TEXT ·Syscall(SB),NOSPLIT,$0-56 17 | JMP syscall·Syscall(SB) 18 | 19 | TEXT ·Syscall6(SB),NOSPLIT,$0-80 20 | JMP syscall·Syscall6(SB) 21 | 22 | TEXT ·Syscall9(SB),NOSPLIT,$0-104 23 | JMP syscall·Syscall9(SB) 24 | 25 | TEXT ·RawSyscall(SB),NOSPLIT,$0-56 26 | JMP syscall·RawSyscall(SB) 27 | 28 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-80 29 | JMP syscall·RawSyscall6(SB) 30 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/asm_linux_amd64.s: -------------------------------------------------------------------------------- 1 | // Copyright 2009 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build !gccgo 6 | 7 | #include "textflag.h" 8 | 9 | // 10 | // System calls for AMD64, Linux 11 | // 12 | 13 | // Just jump to package syscall's implementation for all these functions. 14 | // The runtime may know about them. 15 | 16 | TEXT ·Syscall(SB),NOSPLIT,$0-56 17 | JMP syscall·Syscall(SB) 18 | 19 | TEXT ·Syscall6(SB),NOSPLIT,$0-80 20 | JMP syscall·Syscall6(SB) 21 | 22 | TEXT ·RawSyscall(SB),NOSPLIT,$0-56 23 | JMP syscall·RawSyscall(SB) 24 | 25 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-80 26 | JMP syscall·RawSyscall6(SB) 27 | 28 | TEXT ·gettimeofday(SB),NOSPLIT,$0-16 29 | JMP syscall·gettimeofday(SB) 30 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/asm_netbsd_amd64.s: -------------------------------------------------------------------------------- 1 | // Copyright 2009 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build !gccgo 6 | 7 | #include "textflag.h" 8 | 9 | // 10 | // System call support for AMD64, NetBSD 11 | // 12 | 13 | // Just jump to package syscall's implementation for all these functions. 14 | // The runtime may know about them. 15 | 16 | TEXT ·Syscall(SB),NOSPLIT,$0-56 17 | JMP syscall·Syscall(SB) 18 | 19 | TEXT ·Syscall6(SB),NOSPLIT,$0-80 20 | JMP syscall·Syscall6(SB) 21 | 22 | TEXT ·Syscall9(SB),NOSPLIT,$0-104 23 | JMP syscall·Syscall9(SB) 24 | 25 | TEXT ·RawSyscall(SB),NOSPLIT,$0-56 26 | JMP syscall·RawSyscall(SB) 27 | 28 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-80 29 | JMP syscall·RawSyscall6(SB) 30 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/asm_openbsd_amd64.s: -------------------------------------------------------------------------------- 1 | // Copyright 2009 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build !gccgo 6 | 7 | #include "textflag.h" 8 | 9 | // 10 | // System call support for AMD64, OpenBSD 11 | // 12 | 13 | // Just jump to package syscall's implementation for all these functions. 14 | // The runtime may know about them. 15 | 16 | TEXT ·Syscall(SB),NOSPLIT,$0-56 17 | JMP syscall·Syscall(SB) 18 | 19 | TEXT ·Syscall6(SB),NOSPLIT,$0-80 20 | JMP syscall·Syscall6(SB) 21 | 22 | TEXT ·Syscall9(SB),NOSPLIT,$0-104 23 | JMP syscall·Syscall9(SB) 24 | 25 | TEXT ·RawSyscall(SB),NOSPLIT,$0-56 26 | JMP syscall·RawSyscall(SB) 27 | 28 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-80 29 | JMP syscall·RawSyscall6(SB) 30 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/asm_dragonfly_amd64.s: -------------------------------------------------------------------------------- 1 | // Copyright 2009 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build !gccgo 6 | 7 | #include "textflag.h" 8 | 9 | // 10 | // System call support for AMD64, DragonFly 11 | // 12 | 13 | // Just jump to package syscall's implementation for all these functions. 14 | // The runtime may know about them. 15 | 16 | TEXT ·Syscall(SB),NOSPLIT,$0-64 17 | JMP syscall·Syscall(SB) 18 | 19 | TEXT ·Syscall6(SB),NOSPLIT,$0-88 20 | JMP syscall·Syscall6(SB) 21 | 22 | TEXT ·Syscall9(SB),NOSPLIT,$0-112 23 | JMP syscall·Syscall9(SB) 24 | 25 | TEXT ·RawSyscall(SB),NOSPLIT,$0-64 26 | JMP syscall·RawSyscall(SB) 27 | 28 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-88 29 | JMP syscall·RawSyscall6(SB) 30 | -------------------------------------------------------------------------------- /vendor/golang.org/x/crypto/poly1305/sum_amd64.go: -------------------------------------------------------------------------------- 1 | // Copyright 2012 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build amd64,!gccgo,!appengine 6 | 7 | package poly1305 8 | 9 | // This function is implemented in poly1305_amd64.s 10 | 11 | //go:noescape 12 | 13 | func poly1305(out *[16]byte, m *byte, mlen uint64, key *[32]byte) 14 | 15 | // Sum generates an authenticator for m using a one-time key and puts the 16 | // 16-byte result into out. Authenticating two different messages with the same 17 | // key allows an attacker to forge messages at will. 18 | func Sum(out *[16]byte, m []byte, key *[32]byte) { 19 | var mPtr *byte 20 | if len(m) > 0 { 21 | mPtr = &m[0] 22 | } 23 | poly1305(out, mPtr, uint64(len(m)), key) 24 | } 25 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/asm_darwin_arm.s: -------------------------------------------------------------------------------- 1 | // Copyright 2015 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build !gccgo 6 | // +build arm,darwin 7 | 8 | #include "textflag.h" 9 | 10 | // 11 | // System call support for ARM, Darwin 12 | // 13 | 14 | // Just jump to package syscall's implementation for all these functions. 15 | // The runtime may know about them. 16 | 17 | TEXT ·Syscall(SB),NOSPLIT,$0-28 18 | B syscall·Syscall(SB) 19 | 20 | TEXT ·Syscall6(SB),NOSPLIT,$0-40 21 | B syscall·Syscall6(SB) 22 | 23 | TEXT ·Syscall9(SB),NOSPLIT,$0-52 24 | B syscall·Syscall9(SB) 25 | 26 | TEXT ·RawSyscall(SB),NOSPLIT,$0-28 27 | B syscall·RawSyscall(SB) 28 | 29 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-40 30 | B syscall·RawSyscall6(SB) 31 | -------------------------------------------------------------------------------- /vendor/golang.org/x/crypto/ssh/doc.go: -------------------------------------------------------------------------------- 1 | // Copyright 2011 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | /* 6 | Package ssh implements an SSH client and server. 7 | 8 | SSH is a transport security protocol, an authentication protocol and a 9 | family of application protocols. The most typical application level 10 | protocol is a remote shell and this is specifically implemented. However, 11 | the multiplexed nature of SSH is exposed to users that wish to support 12 | others. 13 | 14 | References: 15 | [PROTOCOL.certkeys]: http://cvsweb.openbsd.org/cgi-bin/cvsweb/src/usr.bin/ssh/PROTOCOL.certkeys?rev=HEAD 16 | [SSH-PARAMETERS]: http://www.iana.org/assignments/ssh-parameters/ssh-parameters.xml#ssh-parameters-1 17 | */ 18 | package ssh 19 | -------------------------------------------------------------------------------- /vendor/github.com/codegangsta/negroni/doc.go: -------------------------------------------------------------------------------- 1 | // Package negroni is an idiomatic approach to web middleware in Go. It is tiny, non-intrusive, and encourages use of net/http Handlers. 2 | // 3 | // If you like the idea of Martini, but you think it contains too much magic, then Negroni is a great fit. 4 | // 5 | // For a full guide visit http://github.com/codegangsta/negroni 6 | // 7 | // package main 8 | // 9 | // import ( 10 | // "github.com/codegangsta/negroni" 11 | // "net/http" 12 | // "fmt" 13 | // ) 14 | // 15 | // func main() { 16 | // mux := http.NewServeMux() 17 | // mux.HandleFunc("/", func(w http.ResponseWriter, req *http.Request) { 18 | // fmt.Fprintf(w, "Welcome to the home page!") 19 | // }) 20 | // 21 | // n := negroni.Classic() 22 | // n.UseHandler(mux) 23 | // n.Run(":3000") 24 | // } 25 | package negroni 26 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/asm_darwin_arm64.s: -------------------------------------------------------------------------------- 1 | // Copyright 2015 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build !gccgo 6 | // +build arm64,darwin 7 | 8 | #include "textflag.h" 9 | 10 | // 11 | // System call support for AMD64, Darwin 12 | // 13 | 14 | // Just jump to package syscall's implementation for all these functions. 15 | // The runtime may know about them. 16 | 17 | TEXT ·Syscall(SB),NOSPLIT,$0-56 18 | B syscall·Syscall(SB) 19 | 20 | TEXT ·Syscall6(SB),NOSPLIT,$0-80 21 | B syscall·Syscall6(SB) 22 | 23 | TEXT ·Syscall9(SB),NOSPLIT,$0-104 24 | B syscall·Syscall9(SB) 25 | 26 | TEXT ·RawSyscall(SB),NOSPLIT,$0-56 27 | B syscall·RawSyscall(SB) 28 | 29 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-80 30 | B syscall·RawSyscall6(SB) 31 | -------------------------------------------------------------------------------- /client/racks.go: -------------------------------------------------------------------------------- 1 | package client 2 | 3 | import ( 4 | "fmt" 5 | "io" 6 | "time" 7 | ) 8 | 9 | type Organization struct { 10 | Id string `json:"id"` 11 | Name string `json:"name"` 12 | } 13 | 14 | type Rack struct { 15 | Name string `json:"name"` 16 | Status string `json:"status"` 17 | Organization *Organization `json:"organization"` 18 | } 19 | 20 | func (c *Client) Racks() (racks []Rack, err error) { 21 | err = c.Get("/racks", &racks) 22 | return racks, err 23 | } 24 | 25 | // StreamRackLogs streams the logs for a Rack 26 | func (c *Client) StreamRackLogs(filter string, follow bool, since time.Duration, output io.WriteCloser) error { 27 | return c.Stream("/system/logs", map[string]string{ 28 | "Filter": filter, 29 | "Follow": fmt.Sprintf("%t", follow), 30 | "Since": since.String(), 31 | }, nil, output) 32 | } 33 | -------------------------------------------------------------------------------- /vendor/golang.org/x/crypto/poly1305/sum_arm.go: -------------------------------------------------------------------------------- 1 | // Copyright 2015 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build arm,!gccgo,!appengine 6 | 7 | package poly1305 8 | 9 | // This function is implemented in poly1305_arm.s 10 | 11 | //go:noescape 12 | 13 | func poly1305_auth_armv6(out *[16]byte, m *byte, mlen uint32, key *[32]byte) 14 | 15 | // Sum generates an authenticator for m using a one-time key and puts the 16 | // 16-byte result into out. Authenticating two different messages with the same 17 | // key allows an attacker to forge messages at will. 18 | func Sum(out *[16]byte, m []byte, key *[32]byte) { 19 | var mPtr *byte 20 | if len(m) > 0 { 21 | mPtr = &m[0] 22 | } 23 | poly1305_auth_armv6(out, mPtr, uint32(len(m)), key) 24 | } 25 | -------------------------------------------------------------------------------- /api/crypt/credentials.go: -------------------------------------------------------------------------------- 1 | package crypt 2 | 3 | import ( 4 | "github.com/aws/aws-sdk-go/aws" 5 | "github.com/aws/aws-sdk-go/aws/credentials" 6 | "github.com/aws/aws-sdk-go/aws/session" 7 | "github.com/aws/aws-sdk-go/service/kms" 8 | ) 9 | 10 | type Credentials struct { 11 | Crypt *Crypt 12 | } 13 | 14 | func (cc *Credentials) IsExpired() bool { 15 | return false 16 | } 17 | 18 | func (cc *Credentials) Retrieve() (credentials.Value, error) { 19 | creds := credentials.Value{ 20 | AccessKeyID: cc.Crypt.AwsAccess, 21 | SecretAccessKey: cc.Crypt.AwsSecret, 22 | SessionToken: cc.Crypt.AwsToken, 23 | } 24 | 25 | return creds, nil 26 | } 27 | 28 | func KMS(c *Crypt) *kms.KMS { 29 | return kms.New(session.New(), &aws.Config{ 30 | Credentials: credentials.NewCredentials(&Credentials{Crypt: c}), 31 | Region: aws.String(c.AwsRegion), 32 | }) 33 | } 34 | -------------------------------------------------------------------------------- /ci/region.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | case "$1" in 4 | 0) 5 | echo AWS_DEFAULT_REGION=us-east-1 6 | echo AWS_REGION=us-east-1 7 | ;; 8 | 1) 9 | echo AWS_DEFAULT_REGION=us-west-2 10 | echo AWS_REGION=us-west-2 11 | ;; 12 | 2) 13 | echo AWS_DEFAULT_REGION=eu-west-1 14 | echo AWS_REGION=eu-west-1 15 | ;; 16 | 3) 17 | echo AWS_DEFAULT_REGION=ap-southeast-2 18 | echo AWS_REGION=ap-southeast-2 19 | ;; 20 | 4) 21 | echo AWS_DEFAULT_REGION=eu-central-1 22 | echo AWS_REGION=eu-central-1 23 | ;; 24 | 5) 25 | echo AWS_DEFAULT_REGION=ap-northeast-1 26 | echo AWS_REGION=ap-northeast-1 27 | ;; 28 | 6) 29 | echo AWS_DEFAULT_REGION=ap-southeast-1 30 | echo AWS_REGION=ap-southeast-1 31 | ;; 32 | *) 33 | echo AWS_DEFAULT_REGION=unknown 34 | echo AWS_REGION=unknown 35 | ;; 36 | esac 37 | 38 | -------------------------------------------------------------------------------- /cmd/convox/stdcli/table_test.go: -------------------------------------------------------------------------------- 1 | package stdcli_test 2 | 3 | import ( 4 | "bytes" 5 | "strings" 6 | "testing" 7 | 8 | "github.com/convox/rack/cmd/convox/stdcli" 9 | "github.com/stretchr/testify/assert" 10 | ) 11 | 12 | func TestTableOutput(t *testing.T) { 13 | buf := &bytes.Buffer{} 14 | old := stdcli.DefaultWriter 15 | stdcli.DefaultWriter.Stdout = buf 16 | defer func() { 17 | stdcli.DefaultWriter = old 18 | }() 19 | 20 | tb := stdcli.NewTable("FOO", "BAR") 21 | 22 | tb.AddRow("foo bar", "foo bar baz qux") 23 | tb.AddRow("bar foo baz", "foo") 24 | tb.Print() 25 | 26 | lines := strings.Split(buf.String(), "\n") 27 | 28 | assert.Equal(t, 4, len(lines)) 29 | assert.Equal(t, "FOO BAR", lines[0]) 30 | assert.Equal(t, "foo bar foo bar baz qux", lines[1]) 31 | assert.Equal(t, "bar foo baz foo", lines[2]) 32 | assert.Equal(t, "", lines[3]) 33 | } 34 | -------------------------------------------------------------------------------- /vendor/github.com/codegangsta/negroni/logger.go: -------------------------------------------------------------------------------- 1 | package negroni 2 | 3 | import ( 4 | "log" 5 | "net/http" 6 | "os" 7 | "time" 8 | ) 9 | 10 | // Logger is a middleware handler that logs the request as it goes in and the response as it goes out. 11 | type Logger struct { 12 | // Logger inherits from log.Logger used to log messages with the Logger middleware 13 | *log.Logger 14 | } 15 | 16 | // NewLogger returns a new Logger instance 17 | func NewLogger() *Logger { 18 | return &Logger{log.New(os.Stdout, "[negroni] ", 0)} 19 | } 20 | 21 | func (l *Logger) ServeHTTP(rw http.ResponseWriter, r *http.Request, next http.HandlerFunc) { 22 | start := time.Now() 23 | l.Printf("Started %s %s", r.Method, r.URL.Path) 24 | 25 | next(rw, r) 26 | 27 | res := rw.(ResponseWriter) 28 | l.Printf("Completed %v %s in %v", res.Status(), http.StatusText(res.Status()), time.Since(start)) 29 | } 30 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/pkg/system/chtimes_windows.go: -------------------------------------------------------------------------------- 1 | // +build windows 2 | 3 | package system 4 | 5 | import ( 6 | "syscall" 7 | "time" 8 | ) 9 | 10 | //setCTime will set the create time on a file. On Windows, this requires 11 | //calling SetFileTime and explicitly including the create time. 12 | func setCTime(path string, ctime time.Time) error { 13 | ctimespec := syscall.NsecToTimespec(ctime.UnixNano()) 14 | pathp, e := syscall.UTF16PtrFromString(path) 15 | if e != nil { 16 | return e 17 | } 18 | h, e := syscall.CreateFile(pathp, 19 | syscall.FILE_WRITE_ATTRIBUTES, syscall.FILE_SHARE_WRITE, nil, 20 | syscall.OPEN_EXISTING, syscall.FILE_FLAG_BACKUP_SEMANTICS, 0) 21 | if e != nil { 22 | return e 23 | } 24 | defer syscall.Close(h) 25 | c := syscall.NsecToFiletime(syscall.TimespecToNsec(ctimespec)) 26 | return syscall.SetFileTime(h, &c, nil, nil) 27 | } 28 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/flock.go: -------------------------------------------------------------------------------- 1 | // +build linux darwin freebsd openbsd netbsd dragonfly 2 | 3 | // Copyright 2014 The Go Authors. All rights reserved. 4 | // Use of this source code is governed by a BSD-style 5 | // license that can be found in the LICENSE file. 6 | 7 | // +build darwin dragonfly freebsd linux netbsd openbsd 8 | 9 | package unix 10 | 11 | import "unsafe" 12 | 13 | // fcntl64Syscall is usually SYS_FCNTL, but is overridden on 32-bit Linux 14 | // systems by flock_linux_32bit.go to be SYS_FCNTL64. 15 | var fcntl64Syscall uintptr = SYS_FCNTL 16 | 17 | // FcntlFlock performs a fcntl syscall for the F_GETLK, F_SETLK or F_SETLKW command. 18 | func FcntlFlock(fd uintptr, cmd int, lk *Flock_t) error { 19 | _, _, errno := Syscall(fcntl64Syscall, fd, uintptr(cmd), uintptr(unsafe.Pointer(lk))) 20 | if errno == 0 { 21 | return nil 22 | } 23 | return errno 24 | } 25 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/pkg/system/utimes_linux.go: -------------------------------------------------------------------------------- 1 | package system 2 | 3 | import ( 4 | "syscall" 5 | "unsafe" 6 | ) 7 | 8 | // LUtimesNano is used to change access and modification time of the specified path. 9 | // It's used for symbol link file because syscall.UtimesNano doesn't support a NOFOLLOW flag atm. 10 | func LUtimesNano(path string, ts []syscall.Timespec) error { 11 | // These are not currently available in syscall 12 | atFdCwd := -100 13 | atSymLinkNoFollow := 0x100 14 | 15 | var _path *byte 16 | _path, err := syscall.BytePtrFromString(path) 17 | if err != nil { 18 | return err 19 | } 20 | 21 | if _, _, err := syscall.Syscall6(syscall.SYS_UTIMENSAT, uintptr(atFdCwd), uintptr(unsafe.Pointer(_path)), uintptr(unsafe.Pointer(&ts[0])), uintptr(atSymLinkNoFollow), 0, 0); err != 0 && err != syscall.ENOSYS { 22 | return err 23 | } 24 | 25 | return nil 26 | } 27 | -------------------------------------------------------------------------------- /vendor/github.com/fsouza/go-dockerclient/Makefile: -------------------------------------------------------------------------------- 1 | .PHONY: \ 2 | all \ 3 | lint \ 4 | vet \ 5 | fmt \ 6 | fmtcheck \ 7 | pretest \ 8 | test \ 9 | integration \ 10 | clean 11 | 12 | all: test 13 | 14 | lint: 15 | @ go get -v github.com/golang/lint/golint 16 | @ export output="$$(golint . | grep -v 'type name will be used as docker.DockerInfo')"; \ 17 | [ -n "$${output}" ] && echo "$${output}" && export status=1; \ 18 | exit $${status:-0} 19 | 20 | vet: 21 | go vet ./... 22 | 23 | fmt: 24 | gofmt -s -w . 25 | 26 | fmtcheck: 27 | [ -z "$$(gofmt -s -d . | tee /dev/stderr)" ] 28 | 29 | testdeps: 30 | go get -d -t ./... 31 | 32 | pretest: testdeps lint vet fmtcheck 33 | 34 | gotest: 35 | go test $(GO_TEST_FLAGS) ./... 36 | 37 | test: pretest gotest 38 | 39 | integration: 40 | go test -tags docker_integration -run TestIntegration -v 41 | 42 | clean: 43 | go clean ./... 44 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/pkg/longpath/longpath.go: -------------------------------------------------------------------------------- 1 | // longpath introduces some constants and helper functions for handling long paths 2 | // in Windows, which are expected to be prepended with `\\?\` and followed by either 3 | // a drive letter, a UNC server\share, or a volume identifier. 4 | 5 | package longpath 6 | 7 | import ( 8 | "strings" 9 | ) 10 | 11 | // Prefix is the longpath prefix for Windows file paths. 12 | const Prefix = `\\?\` 13 | 14 | // AddPrefix will add the Windows long path prefix to the path provided if 15 | // it does not already have it. 16 | func AddPrefix(path string) string { 17 | if !strings.HasPrefix(path, Prefix) { 18 | if strings.HasPrefix(path, `\\`) { 19 | // This is a UNC path, so we need to add 'UNC' to the path as well. 20 | path = Prefix + `UNC` + path[1:] 21 | } else { 22 | path = Prefix + path 23 | } 24 | } 25 | return path 26 | } 27 | -------------------------------------------------------------------------------- /api/cmd/build/source/index.go: -------------------------------------------------------------------------------- 1 | package source 2 | 3 | import ( 4 | "encoding/json" 5 | "io" 6 | "io/ioutil" 7 | 8 | "github.com/convox/rack/api/structs" 9 | "github.com/convox/rack/provider" 10 | ) 11 | 12 | type SourceIndex struct { 13 | URL string 14 | } 15 | 16 | func (s *SourceIndex) Fetch(out io.Writer) (string, error) { 17 | tmp, err := ioutil.TempDir("", "") 18 | if err != nil { 19 | return "", err 20 | } 21 | 22 | r, err := urlReader(s.URL) 23 | if err != nil { 24 | return "", err 25 | } 26 | 27 | defer r.Close() 28 | 29 | data, err := ioutil.ReadAll(r) 30 | if err != nil { 31 | return "", err 32 | } 33 | 34 | var index structs.Index 35 | 36 | if err := json.Unmarshal(data, &index); err != nil { 37 | return "", err 38 | } 39 | 40 | if err := provider.FromEnv().IndexDownload(&index, tmp); err != nil { 41 | return "", err 42 | } 43 | 44 | return tmp, nil 45 | } 46 | -------------------------------------------------------------------------------- /cmd/convox/stdcli/stdcli_test.go: -------------------------------------------------------------------------------- 1 | package stdcli_test 2 | 3 | import ( 4 | "testing" 5 | 6 | "github.com/convox/rack/cmd/convox/stdcli" 7 | "github.com/stretchr/testify/assert" 8 | ) 9 | 10 | func TestParseOptions(t *testing.T) { 11 | var opts map[string]string 12 | opts = stdcli.ParseOpts([]string{"--foo", "bar", "--key", "value"}) 13 | assert.Equal(t, "bar", opts["foo"]) 14 | assert.Equal(t, "value", opts["key"]) 15 | 16 | opts = stdcli.ParseOpts([]string{"--foo=bar", "--key", "value"}) 17 | assert.Equal(t, "bar", opts["foo"]) 18 | assert.Equal(t, "value", opts["key"]) 19 | 20 | opts = stdcli.ParseOpts([]string{"--foo=this", "is", "a bad idea"}) 21 | assert.Equal(t, "this is a bad idea", opts["foo"]) 22 | 23 | opts = stdcli.ParseOpts([]string{"--this", "--is=even", "worse"}) 24 | assert.Equal(t, "even worse", opts["is"]) 25 | _, ok := opts["this"] 26 | assert.Equal(t, true, ok) 27 | } 28 | -------------------------------------------------------------------------------- /vendor/github.com/docker/go-units/README.md: -------------------------------------------------------------------------------- 1 | [![GoDoc](https://godoc.org/github.com/docker/go-units?status.svg)](https://godoc.org/github.com/docker/go-units) 2 | 3 | # Introduction 4 | 5 | go-units is a library to transform human friendly measurements into machine friendly values. 6 | 7 | ## Usage 8 | 9 | See the [docs in godoc](https://godoc.org/github.com/docker/go-units) for examples and documentation. 10 | 11 | ## Copyright and license 12 | 13 | Copyright © 2015 Docker, Inc. All rights reserved, except as follows. Code 14 | is released under the Apache 2.0 license. The README.md file, and files in the 15 | "docs" folder are licensed under the Creative Commons Attribution 4.0 16 | International License under the terms and conditions set forth in the file 17 | "LICENSE.docs". You may obtain a duplicate copy of the same license, titled 18 | CC-BY-SA-4.0, at http://creativecommons.org/licenses/by/4.0/. 19 | -------------------------------------------------------------------------------- /vendor/github.com/jmespath/go-jmespath/astnodetype_string.go: -------------------------------------------------------------------------------- 1 | // generated by stringer -type astNodeType; DO NOT EDIT 2 | 3 | package jmespath 4 | 5 | import "fmt" 6 | 7 | const _astNodeType_name = "ASTEmptyASTComparatorASTCurrentNodeASTExpRefASTFunctionExpressionASTFieldASTFilterProjectionASTFlattenASTIdentityASTIndexASTIndexExpressionASTKeyValPairASTLiteralASTMultiSelectHashASTMultiSelectListASTOrExpressionASTAndExpressionASTNotExpressionASTPipeASTProjectionASTSubexpressionASTSliceASTValueProjection" 8 | 9 | var _astNodeType_index = [...]uint16{0, 8, 21, 35, 44, 65, 73, 92, 102, 113, 121, 139, 152, 162, 180, 198, 213, 229, 245, 252, 265, 281, 289, 307} 10 | 11 | func (i astNodeType) String() string { 12 | if i < 0 || i >= astNodeType(len(_astNodeType_index)-1) { 13 | return fmt.Sprintf("astNodeType(%d)", i) 14 | } 15 | return _astNodeType_name[_astNodeType_index[i]:_astNodeType_index[i+1]] 16 | } 17 | -------------------------------------------------------------------------------- /vendor/golang.org/x/crypto/salsa20/salsa/salsa20_amd64.go: -------------------------------------------------------------------------------- 1 | // Copyright 2012 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build amd64,!appengine,!gccgo 6 | 7 | package salsa 8 | 9 | // This function is implemented in salsa2020_amd64.s. 10 | 11 | //go:noescape 12 | 13 | func salsa2020XORKeyStream(out, in *byte, n uint64, nonce, key *byte) 14 | 15 | // XORKeyStream crypts bytes from in to out using the given key and counters. 16 | // In and out may be the same slice but otherwise should not overlap. Counter 17 | // contains the raw salsa20 counter bytes (both nonce and block counter). 18 | func XORKeyStream(out, in []byte, counter *[16]byte, key *[32]byte) { 19 | if len(in) == 0 { 20 | return 21 | } 22 | salsa2020XORKeyStream(&out[0], &in[0], uint64(len(in)), &counter[0], &key[0]) 23 | } 24 | -------------------------------------------------------------------------------- /api/structs/release.go: -------------------------------------------------------------------------------- 1 | package structs 2 | 3 | import "time" 4 | 5 | type Release struct { 6 | Id string `json:"id"` 7 | App string `json:"app"` 8 | Build string `json:"build"` 9 | Env string `json:"env"` 10 | Manifest string `json:"manifest"` 11 | Created time.Time `json:"created"` 12 | } 13 | 14 | type Releases []Release 15 | 16 | // NewRelease creates a new release 17 | func NewRelease(app string) *Release { 18 | return &Release{ 19 | App: app, 20 | Created: time.Now(), 21 | Id: generateId("R", 10), 22 | } 23 | } 24 | 25 | // Latest returns the latest release determined by the date created. 26 | func (rs Releases) Latest() *Release { 27 | if len(rs) == 0 { 28 | return nil 29 | } 30 | 31 | latest := rs[0] 32 | for _, r := range rs { 33 | if latest.Created.Before(r.Created) { 34 | latest = r 35 | } 36 | } 37 | 38 | return &latest 39 | } 40 | -------------------------------------------------------------------------------- /vendor/github.com/docker/engine-api/types/swarm/container.go: -------------------------------------------------------------------------------- 1 | package swarm 2 | 3 | import ( 4 | "time" 5 | 6 | "github.com/docker/engine-api/types/mount" 7 | ) 8 | 9 | // ContainerSpec represents the spec of a container. 10 | type ContainerSpec struct { 11 | Image string `json:",omitempty"` 12 | Labels map[string]string `json:",omitempty"` 13 | Command []string `json:",omitempty"` 14 | Args []string `json:",omitempty"` 15 | Env []string `json:",omitempty"` 16 | Dir string `json:",omitempty"` 17 | User string `json:",omitempty"` 18 | Groups []string `json:",omitempty"` 19 | TTY bool `json:",omitempty"` 20 | Mounts []mount.Mount `json:",omitempty"` 21 | StopGracePeriod *time.Duration `json:",omitempty"` 22 | } 23 | -------------------------------------------------------------------------------- /vendor/github.com/equinox-io/equinox/internal/osext/osext.go: -------------------------------------------------------------------------------- 1 | // Copyright 2012 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // Extensions to the standard "os" package. 6 | package osext 7 | 8 | import "path/filepath" 9 | 10 | // Executable returns an absolute path that can be used to 11 | // re-invoke the current program. 12 | // It may not be valid after the current program exits. 13 | func Executable() (string, error) { 14 | p, err := executable() 15 | return filepath.Clean(p), err 16 | } 17 | 18 | // Returns same path as Executable, returns just the folder 19 | // path. Excludes the executable name and any trailing slash. 20 | func ExecutableFolder() (string, error) { 21 | p, err := Executable() 22 | if err != nil { 23 | return "", err 24 | } 25 | 26 | return filepath.Dir(p), nil 27 | } 28 | -------------------------------------------------------------------------------- /provider/aws/lambda/lifecycle/bin/test: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | set -e 4 | 5 | rack=$1 6 | instance=$2 7 | 8 | if [ "$rack" == "" ] || [ "$instance" == "" ]; then 9 | echo "usage: test " 10 | exit 1 11 | fi 12 | 13 | func=$(\ 14 | aws cloudformation describe-stack-resources --stack-name ${rack} |\ 15 | jq -r '.StackResources[]|select(.LogicalResourceId=="InstancesLifecycleHandler").PhysicalResourceId' \ 16 | ) 17 | 18 | payload=$(cat < /etc/ssl/convox/server.pem 20 | -------------------------------------------------------------------------------- /vendor/github.com/docker/go-units/MAINTAINERS: -------------------------------------------------------------------------------- 1 | # go-connections maintainers file 2 | # 3 | # This file describes who runs the docker/go-connections project and how. 4 | # This is a living document - if you see something out of date or missing, speak up! 5 | # 6 | # It is structured to be consumable by both humans and programs. 7 | # To extract its contents programmatically, use any TOML-compliant parser. 8 | # 9 | # This file is compiled into the MAINTAINERS file in docker/opensource. 10 | # 11 | [Org] 12 | [Org."Core maintainers"] 13 | people = [ 14 | "calavera", 15 | ] 16 | 17 | [people] 18 | 19 | # A reference list of all people associated with the project. 20 | # All other sections should refer to people by their canonical key 21 | # in the people section. 22 | 23 | # ADD YOURSELF HERE IN ALPHABETICAL ORDER 24 | [people.calavera] 25 | Name = "David Calavera" 26 | Email = "david.calavera@gmail.com" 27 | GitHub = "calavera" 28 | -------------------------------------------------------------------------------- /vendor/github.com/equinox-io/equinox/internal/go-update/internal/binarydist/doc.go: -------------------------------------------------------------------------------- 1 | // Package binarydist implements binary diff and patch as described on 2 | // http://www.daemonology.net/bsdiff/. It reads and writes files 3 | // compatible with the tools there. 4 | package binarydist 5 | 6 | var magic = [8]byte{'B', 'S', 'D', 'I', 'F', 'F', '4', '0'} 7 | 8 | // File format: 9 | // 0 8 "BSDIFF40" 10 | // 8 8 X 11 | // 16 8 Y 12 | // 24 8 sizeof(newfile) 13 | // 32 X bzip2(control block) 14 | // 32+X Y bzip2(diff block) 15 | // 32+X+Y ??? bzip2(extra block) 16 | // with control block a set of triples (x,y,z) meaning "add x bytes 17 | // from oldfile to x bytes from the diff block; copy y bytes from the 18 | // extra block; seek forwards in oldfile by z bytes". 19 | type header struct { 20 | Magic [8]byte 21 | CtrlLen int64 22 | DiffLen int64 23 | NewSize int64 24 | } 25 | -------------------------------------------------------------------------------- /vendor/github.com/tinylib/msgp/msgp/size.go: -------------------------------------------------------------------------------- 1 | package msgp 2 | 3 | // The sizes provided 4 | // are the worst-case 5 | // encoded sizes for 6 | // each type. For variable- 7 | // length types ([]byte, string), 8 | // the total encoded size is 9 | // the prefix size plus the 10 | // length of the object. 11 | const ( 12 | Int64Size = 9 13 | IntSize = Int64Size 14 | UintSize = Int64Size 15 | Int8Size = 2 16 | Int16Size = 3 17 | Int32Size = 5 18 | Uint8Size = 2 19 | ByteSize = Uint8Size 20 | Uint16Size = 3 21 | Uint32Size = 5 22 | Uint64Size = Int64Size 23 | Float64Size = 9 24 | Float32Size = 5 25 | Complex64Size = 10 26 | Complex128Size = 18 27 | 28 | TimeSize = 15 29 | BoolSize = 1 30 | NilSize = 1 31 | 32 | MapHeaderSize = 5 33 | ArrayHeaderSize = 5 34 | 35 | BytesPrefixSize = 5 36 | StringPrefixSize = 5 37 | ExtensionPrefixSize = 6 38 | ) 39 | --------------------------------------------------------------------------------