├── .drone.yml ├── .gitignore ├── .package ├── .wrap-docker-args ├── Dockerfile.dapper ├── LICENSE ├── Makefile ├── README.md ├── api ├── const.go ├── request.go └── response.go ├── apply.sh ├── client ├── client.go ├── daemon.go ├── flags │ └── flags.go ├── objectstore.go ├── snapshot.go └── volume.go ├── convoydriver └── convoydriver.go ├── daemon ├── common.go ├── daemon.go ├── docker.go ├── import_devmapper.go ├── import_digitalocean.go ├── import_ebs.go ├── import_glusterfs.go ├── import_objectstore.go ├── objectstore.go ├── snapshot.go └── volume.go ├── devmapper ├── backup.go ├── devmapper.go └── devmapper_test.go ├── digitalocean ├── digitalocean.go ├── digitalocean_client.go └── digitalocean_client_test.go ├── docs ├── cli_reference.md ├── development-without-golang.md ├── development.md ├── devicemapper.md ├── docker.md ├── ebs.md ├── glusterfs.md └── vfs.md ├── ebs ├── ebs.go ├── ebs_service.go └── ebs_service_test.go ├── glusterfs └── glusterfs.go ├── logging └── logging.go ├── main.go ├── metadata ├── devmapper.go ├── devmapper_test.go └── metadata.go ├── objectstore ├── config.go ├── deltablock.go ├── driver.go ├── objectstore.go └── singlefile.go ├── package ├── Dockerfile ├── convoy-start └── docker-compose.yml ├── s3 ├── s3.go ├── s3_service.go ├── s3_service_test.go └── s3_test.go ├── scripts ├── build ├── ci ├── entry ├── package ├── test └── version ├── tests └── integration │ ├── conftest.py │ ├── convoy.py │ ├── s3.py │ └── test_main.py ├── tools └── dm_dev_partition.sh ├── trash.yml ├── util ├── config.go ├── config_test.go ├── index.go ├── util.go ├── util_test.go ├── volume.go └── volume_test.go ├── vendor ├── github.com │ ├── Sirupsen │ │ └── logrus │ │ │ ├── .gitignore │ │ │ ├── .travis.yml │ │ │ ├── CHANGELOG.md │ │ │ ├── LICENSE │ │ │ ├── README.md │ │ │ ├── entry.go │ │ │ ├── entry_test.go │ │ │ ├── exported.go │ │ │ ├── formatter.go │ │ │ ├── formatter_bench_test.go │ │ │ ├── hook_test.go │ │ │ ├── hooks.go │ │ │ ├── json_formatter.go │ │ │ ├── json_formatter_test.go │ │ │ ├── logger.go │ │ │ ├── logrus.go │ │ │ ├── logrus_test.go │ │ │ ├── terminal_darwin.go │ │ │ ├── terminal_freebsd.go │ │ │ ├── terminal_linux.go │ │ │ ├── terminal_notwindows.go │ │ │ ├── terminal_openbsd.go │ │ │ ├── terminal_windows.go │ │ │ ├── text_formatter.go │ │ │ ├── text_formatter_test.go │ │ │ └── writer.go │ ├── aws │ │ └── aws-sdk-go │ │ │ ├── aws │ │ │ ├── awserr │ │ │ │ ├── error.go │ │ │ │ └── types.go │ │ │ ├── awsutil │ │ │ │ ├── copy.go │ │ │ │ ├── copy_test.go │ │ │ │ ├── equal.go │ │ │ │ ├── equal_test.go │ │ │ │ ├── path_value.go │ │ │ │ ├── path_value_test.go │ │ │ │ ├── prettify.go │ │ │ │ └── string_value.go │ │ │ ├── client │ │ │ │ ├── client.go │ │ │ │ ├── default_retryer.go │ │ │ │ └── metadata │ │ │ │ │ └── client_info.go │ │ │ ├── config.go │ │ │ ├── config_test.go │ │ │ ├── convert_types.go │ │ │ ├── convert_types_test.go │ │ │ ├── corehandlers │ │ │ │ ├── handlers.go │ │ │ │ ├── handlers_test.go │ │ │ │ ├── param_validator.go │ │ │ │ └── param_validator_test.go │ │ │ ├── credentials │ │ │ │ ├── chain_provider.go │ │ │ │ ├── chain_provider_test.go │ │ │ │ ├── credentials.go │ │ │ │ ├── credentials_test.go │ │ │ │ ├── ec2rolecreds │ │ │ │ │ ├── ec2_role_provider.go │ │ │ │ │ └── ec2_role_provider_test.go │ │ │ │ ├── env_provider.go │ │ │ │ ├── env_provider_test.go │ │ │ │ ├── example.ini │ │ │ │ ├── shared_credentials_provider.go │ │ │ │ ├── shared_credentials_provider_test.go │ │ │ │ ├── static_provider.go │ │ │ │ └── static_provider_test.go │ │ │ ├── defaults │ │ │ │ └── defaults.go │ │ │ ├── ec2metadata │ │ │ │ ├── api.go │ │ │ │ ├── api_test.go │ │ │ │ └── service.go │ │ │ ├── errors.go │ │ │ ├── logger.go │ │ │ ├── request │ │ │ │ ├── handlers.go │ │ │ │ ├── handlers_test.go │ │ │ │ ├── request.go │ │ │ │ ├── request_pagination.go │ │ │ │ ├── request_pagination_test.go │ │ │ │ ├── request_test.go │ │ │ │ └── retryer.go │ │ │ ├── session │ │ │ │ ├── session.go │ │ │ │ └── session_test.go │ │ │ ├── types.go │ │ │ ├── types_test.go │ │ │ └── version.go │ │ │ ├── private │ │ │ ├── endpoints │ │ │ │ ├── endpoints.go │ │ │ │ ├── endpoints.json │ │ │ │ ├── endpoints_map.go │ │ │ │ └── endpoints_test.go │ │ │ ├── protocol │ │ │ │ ├── ec2query │ │ │ │ │ ├── build.go │ │ │ │ │ ├── build_bench_test.go │ │ │ │ │ ├── build_test.go │ │ │ │ │ ├── unmarshal.go │ │ │ │ │ └── unmarshal_test.go │ │ │ │ ├── query │ │ │ │ │ ├── build.go │ │ │ │ │ ├── build_test.go │ │ │ │ │ ├── queryutil │ │ │ │ │ │ └── queryutil.go │ │ │ │ │ ├── unmarshal.go │ │ │ │ │ ├── unmarshal_error.go │ │ │ │ │ └── unmarshal_test.go │ │ │ │ ├── rest │ │ │ │ │ ├── build.go │ │ │ │ │ ├── payload.go │ │ │ │ │ └── unmarshal.go │ │ │ │ ├── restxml │ │ │ │ │ ├── build_bench_test.go │ │ │ │ │ ├── build_test.go │ │ │ │ │ ├── restxml.go │ │ │ │ │ └── unmarshal_test.go │ │ │ │ └── xml │ │ │ │ │ └── xmlutil │ │ │ │ │ ├── build.go │ │ │ │ │ ├── unmarshal.go │ │ │ │ │ └── xml_to_struct.go │ │ │ ├── signer │ │ │ │ └── v4 │ │ │ │ │ ├── functional_test.go │ │ │ │ │ ├── v4.go │ │ │ │ │ └── v4_test.go │ │ │ └── waiter │ │ │ │ ├── waiter.go │ │ │ │ └── waiter_test.go │ │ │ └── service │ │ │ ├── ec2 │ │ │ ├── api.go │ │ │ ├── customizations.go │ │ │ ├── customizations_test.go │ │ │ ├── examples_test.go │ │ │ ├── service.go │ │ │ └── waiters.go │ │ │ └── s3 │ │ │ ├── api.go │ │ │ ├── bucket_location.go │ │ │ ├── bucket_location_test.go │ │ │ ├── content_md5.go │ │ │ ├── customizations.go │ │ │ ├── customizations_test.go │ │ │ ├── examples_test.go │ │ │ ├── host_style_bucket.go │ │ │ ├── host_style_bucket_test.go │ │ │ ├── service.go │ │ │ ├── sse.go │ │ │ ├── sse_test.go │ │ │ ├── statusok_error.go │ │ │ ├── statusok_error_test.go │ │ │ ├── unmarshal_error.go │ │ │ ├── unmarshal_error_test.go │ │ │ └── waiters.go │ ├── codegangsta │ │ └── cli │ │ │ ├── .travis.yml │ │ │ ├── LICENSE │ │ │ ├── README.md │ │ │ ├── app.go │ │ │ ├── app_test.go │ │ │ ├── cli.go │ │ │ ├── command.go │ │ │ ├── command_test.go │ │ │ ├── context.go │ │ │ ├── context_test.go │ │ │ ├── flag.go │ │ │ ├── flag_test.go │ │ │ ├── help.go │ │ │ ├── help_test.go │ │ │ └── helpers_test.go │ ├── digitalocean │ │ ├── go-metadata │ │ │ ├── .gitignore │ │ │ ├── LICENSE │ │ │ ├── README.md │ │ │ ├── all_json.go │ │ │ ├── client.go │ │ │ ├── client_test.go │ │ │ ├── example_test.go │ │ │ └── example_utils_test.go │ │ └── godo │ │ │ ├── .travis.yml │ │ │ ├── CONTRIBUTING.md │ │ │ ├── LICENSE.txt │ │ │ ├── README.md │ │ │ ├── account.go │ │ │ ├── action.go │ │ │ ├── doc.go │ │ │ ├── domains.go │ │ │ ├── droplet_actions.go │ │ │ ├── droplets.go │ │ │ ├── errors.go │ │ │ ├── floating_ips.go │ │ │ ├── floating_ips_actions.go │ │ │ ├── godo.go │ │ │ ├── image_actions.go │ │ │ ├── images.go │ │ │ ├── keys.go │ │ │ ├── links.go │ │ │ ├── regions.go │ │ │ ├── sizes.go │ │ │ ├── storage.go │ │ │ ├── storage_actions.go │ │ │ ├── strings.go │ │ │ ├── tags.go │ │ │ └── timestamp.go │ ├── docker │ │ └── docker │ │ │ └── pkg │ │ │ └── devicemapper │ │ │ ├── attach_loopback.go │ │ │ ├── devmapper.go │ │ │ ├── devmapper_log.go │ │ │ ├── devmapper_wrapper.go │ │ │ ├── devmapper_wrapper_deferred_remove.go │ │ │ ├── devmapper_wrapper_no_deferred_remove.go │ │ │ ├── ioctl.go │ │ │ └── log.go │ ├── go-ini │ │ └── ini │ │ │ ├── .gitignore │ │ │ ├── LICENSE │ │ │ ├── README.md │ │ │ ├── README_ZH.md │ │ │ ├── ini.go │ │ │ ├── ini_test.go │ │ │ ├── parser.go │ │ │ ├── struct.go │ │ │ └── struct_test.go │ ├── google │ │ └── go-querystring │ │ │ ├── .gitignore │ │ │ ├── CONTRIBUTING.md │ │ │ ├── LICENSE │ │ │ ├── README.md │ │ │ └── query │ │ │ ├── encode.go │ │ │ └── encode_test.go │ ├── gorilla │ │ ├── context │ │ │ ├── .travis.yml │ │ │ ├── LICENSE │ │ │ ├── README.md │ │ │ ├── context.go │ │ │ ├── context_test.go │ │ │ └── doc.go │ │ └── mux │ │ │ ├── .travis.yml │ │ │ ├── LICENSE │ │ │ ├── README.md │ │ │ ├── bench_test.go │ │ │ ├── doc.go │ │ │ ├── mux.go │ │ │ ├── mux_test.go │ │ │ ├── old_test.go │ │ │ ├── regexp.go │ │ │ └── route.go │ ├── http-link-go │ │ ├── .gitignore │ │ ├── .travis.yml │ │ ├── LICENSE │ │ ├── README.md │ │ ├── link.go │ │ └── link_test.go │ ├── jmespath │ │ └── go-jmespath │ │ │ ├── .gitignore │ │ │ ├── .travis.yml │ │ │ ├── LICENSE │ │ │ ├── Makefile │ │ │ ├── README.md │ │ │ ├── api.go │ │ │ ├── api_test.go │ │ │ ├── astnodetype_string.go │ │ │ ├── compliance_test.go │ │ │ ├── functions.go │ │ │ ├── interpreter.go │ │ │ ├── interpreter_test.go │ │ │ ├── lexer.go │ │ │ ├── lexer_test.go │ │ │ ├── parser.go │ │ │ ├── parser_test.go │ │ │ ├── toktype_string.go │ │ │ ├── util.go │ │ │ └── util_test.go │ ├── mcuadros │ │ └── go-version │ │ │ ├── .gitignore │ │ │ ├── .travis.yml │ │ │ ├── LICENSE │ │ │ ├── README.md │ │ │ ├── compare.go │ │ │ ├── compare_test.go │ │ │ ├── constraint.go │ │ │ ├── constraint_test.go │ │ │ ├── doc.go │ │ │ ├── group.go │ │ │ ├── group_test.go │ │ │ ├── normalize.go │ │ │ ├── normalize_test.go │ │ │ ├── sort.go │ │ │ ├── sort_test.go │ │ │ ├── stability.go │ │ │ └── stability_test.go │ ├── satori │ │ └── go.uuid │ │ │ ├── .travis.yml │ │ │ ├── LICENSE │ │ │ ├── README.md │ │ │ ├── benchmarks_test.go │ │ │ ├── uuid.go │ │ │ └── uuid_test.go │ └── tent │ │ └── http-link-go │ │ ├── .gitignore │ │ ├── .travis.yml │ │ ├── LICENSE │ │ ├── README.md │ │ ├── link.go │ │ └── link_test.go ├── golang.org │ └── x │ │ ├── net │ │ ├── .gitattributes │ │ ├── .gitignore │ │ ├── AUTHORS │ │ ├── CONTRIBUTING.md │ │ ├── CONTRIBUTORS │ │ ├── LICENSE │ │ ├── PATENTS │ │ ├── README │ │ ├── bpf │ │ │ ├── asm.go │ │ │ ├── constants.go │ │ │ ├── doc.go │ │ │ ├── instructions.go │ │ │ ├── instructions_test.go │ │ │ ├── testdata │ │ │ │ ├── all_instructions.bpf │ │ │ │ └── all_instructions.txt │ │ │ ├── vm.go │ │ │ ├── vm_aluop_test.go │ │ │ ├── vm_bpf_test.go │ │ │ ├── vm_extension_test.go │ │ │ ├── vm_instructions.go │ │ │ ├── vm_jump_test.go │ │ │ ├── vm_load_test.go │ │ │ ├── vm_ret_test.go │ │ │ ├── vm_scratch_test.go │ │ │ └── vm_test.go │ │ ├── codereview.cfg │ │ ├── context │ │ │ ├── context.go │ │ │ ├── context_test.go │ │ │ ├── ctxhttp │ │ │ │ ├── ctxhttp.go │ │ │ │ ├── ctxhttp_17_test.go │ │ │ │ ├── ctxhttp_pre17.go │ │ │ │ ├── ctxhttp_pre17_test.go │ │ │ │ └── ctxhttp_test.go │ │ │ ├── go17.go │ │ │ ├── pre_go17.go │ │ │ └── withtimeout_test.go │ │ ├── dict │ │ │ └── dict.go │ │ ├── html │ │ │ ├── atom │ │ │ │ ├── atom.go │ │ │ │ ├── atom_test.go │ │ │ │ ├── gen.go │ │ │ │ ├── table.go │ │ │ │ └── table_test.go │ │ │ ├── charset │ │ │ │ ├── charset.go │ │ │ │ ├── charset_test.go │ │ │ │ └── testdata │ │ │ │ │ ├── HTTP-charset.html │ │ │ │ │ ├── HTTP-vs-UTF-8-BOM.html │ │ │ │ │ ├── HTTP-vs-meta-charset.html │ │ │ │ │ ├── HTTP-vs-meta-content.html │ │ │ │ │ ├── No-encoding-declaration.html │ │ │ │ │ ├── README │ │ │ │ │ ├── UTF-16BE-BOM.html │ │ │ │ │ ├── UTF-16LE-BOM.html │ │ │ │ │ ├── UTF-8-BOM-vs-meta-charset.html │ │ │ │ │ ├── UTF-8-BOM-vs-meta-content.html │ │ │ │ │ ├── meta-charset-attribute.html │ │ │ │ │ └── meta-content-attribute.html │ │ │ ├── const.go │ │ │ ├── doc.go │ │ │ ├── doctype.go │ │ │ ├── entity.go │ │ │ ├── entity_test.go │ │ │ ├── escape.go │ │ │ ├── escape_test.go │ │ │ ├── example_test.go │ │ │ ├── foreign.go │ │ │ ├── node.go │ │ │ ├── node_test.go │ │ │ ├── parse.go │ │ │ ├── parse_test.go │ │ │ ├── render.go │ │ │ ├── render_test.go │ │ │ ├── testdata │ │ │ │ ├── go1.html │ │ │ │ └── webkit │ │ │ │ │ ├── README │ │ │ │ │ ├── adoption01.dat │ │ │ │ │ ├── adoption02.dat │ │ │ │ │ ├── comments01.dat │ │ │ │ │ ├── doctype01.dat │ │ │ │ │ ├── entities01.dat │ │ │ │ │ ├── entities02.dat │ │ │ │ │ ├── html5test-com.dat │ │ │ │ │ ├── inbody01.dat │ │ │ │ │ ├── isindex.dat │ │ │ │ │ ├── pending-spec-changes-plain-text-unsafe.dat │ │ │ │ │ ├── pending-spec-changes.dat │ │ │ │ │ ├── plain-text-unsafe.dat │ │ │ │ │ ├── scriptdata01.dat │ │ │ │ │ ├── scripted │ │ │ │ │ ├── adoption01.dat │ │ │ │ │ └── webkit01.dat │ │ │ │ │ ├── tables01.dat │ │ │ │ │ ├── tests1.dat │ │ │ │ │ ├── tests10.dat │ │ │ │ │ ├── tests11.dat │ │ │ │ │ ├── tests12.dat │ │ │ │ │ ├── tests14.dat │ │ │ │ │ ├── tests15.dat │ │ │ │ │ ├── tests16.dat │ │ │ │ │ ├── tests17.dat │ │ │ │ │ ├── tests18.dat │ │ │ │ │ ├── tests19.dat │ │ │ │ │ ├── tests2.dat │ │ │ │ │ ├── tests20.dat │ │ │ │ │ ├── tests21.dat │ │ │ │ │ ├── tests22.dat │ │ │ │ │ ├── tests23.dat │ │ │ │ │ ├── tests24.dat │ │ │ │ │ ├── tests25.dat │ │ │ │ │ ├── tests26.dat │ │ │ │ │ ├── tests3.dat │ │ │ │ │ ├── tests4.dat │ │ │ │ │ ├── tests5.dat │ │ │ │ │ ├── tests6.dat │ │ │ │ │ ├── tests7.dat │ │ │ │ │ ├── tests8.dat │ │ │ │ │ ├── tests9.dat │ │ │ │ │ ├── tests_innerHTML_1.dat │ │ │ │ │ ├── tricky01.dat │ │ │ │ │ ├── webkit01.dat │ │ │ │ │ └── webkit02.dat │ │ │ ├── token.go │ │ │ └── token_test.go │ │ ├── http2 │ │ │ ├── .gitignore │ │ │ ├── Dockerfile │ │ │ ├── Makefile │ │ │ ├── README │ │ │ ├── client_conn_pool.go │ │ │ ├── configure_transport.go │ │ │ ├── errors.go │ │ │ ├── errors_test.go │ │ │ ├── fixed_buffer.go │ │ │ ├── fixed_buffer_test.go │ │ │ ├── flow.go │ │ │ ├── flow_test.go │ │ │ ├── frame.go │ │ │ ├── frame_test.go │ │ │ ├── go16.go │ │ │ ├── go17.go │ │ │ ├── go17_not18.go │ │ │ ├── go18.go │ │ │ ├── gotrack.go │ │ │ ├── gotrack_test.go │ │ │ ├── h2demo │ │ │ │ ├── .gitignore │ │ │ │ ├── Makefile │ │ │ │ ├── README │ │ │ │ ├── h2demo.go │ │ │ │ ├── launch.go │ │ │ │ ├── rootCA.key │ │ │ │ ├── rootCA.pem │ │ │ │ ├── rootCA.srl │ │ │ │ ├── server.crt │ │ │ │ └── server.key │ │ │ ├── h2i │ │ │ │ ├── README.md │ │ │ │ └── h2i.go │ │ │ ├── headermap.go │ │ │ ├── hpack │ │ │ │ ├── encode.go │ │ │ │ ├── encode_test.go │ │ │ │ ├── hpack.go │ │ │ │ ├── hpack_test.go │ │ │ │ ├── huffman.go │ │ │ │ └── tables.go │ │ │ ├── http2.go │ │ │ ├── http2_test.go │ │ │ ├── not_go16.go │ │ │ ├── not_go17.go │ │ │ ├── pipe.go │ │ │ ├── pipe_test.go │ │ │ ├── priority_test.go │ │ │ ├── server.go │ │ │ ├── server_test.go │ │ │ ├── testdata │ │ │ │ └── draft-ietf-httpbis-http2.xml │ │ │ ├── transport.go │ │ │ ├── transport_test.go │ │ │ ├── write.go │ │ │ ├── writesched.go │ │ │ └── z_spec_test.go │ │ ├── icmp │ │ │ ├── dstunreach.go │ │ │ ├── echo.go │ │ │ ├── endpoint.go │ │ │ ├── example_test.go │ │ │ ├── extension.go │ │ │ ├── extension_test.go │ │ │ ├── helper.go │ │ │ ├── helper_posix.go │ │ │ ├── interface.go │ │ │ ├── ipv4.go │ │ │ ├── ipv4_test.go │ │ │ ├── ipv6.go │ │ │ ├── listen_posix.go │ │ │ ├── listen_stub.go │ │ │ ├── message.go │ │ │ ├── message_test.go │ │ │ ├── messagebody.go │ │ │ ├── mpls.go │ │ │ ├── multipart.go │ │ │ ├── multipart_test.go │ │ │ ├── packettoobig.go │ │ │ ├── paramprob.go │ │ │ ├── ping_test.go │ │ │ ├── sys_freebsd.go │ │ │ └── timeexceeded.go │ │ ├── idna │ │ │ ├── idna.go │ │ │ ├── idna_test.go │ │ │ ├── punycode.go │ │ │ └── punycode_test.go │ │ ├── internal │ │ │ ├── iana │ │ │ │ ├── const.go │ │ │ │ └── gen.go │ │ │ ├── netreflect │ │ │ │ ├── socket.go │ │ │ │ ├── socket_posix.go │ │ │ │ ├── socket_stub.go │ │ │ │ └── socket_test.go │ │ │ ├── nettest │ │ │ │ ├── helper_bsd.go │ │ │ │ ├── helper_nobsd.go │ │ │ │ ├── helper_posix.go │ │ │ │ ├── helper_stub.go │ │ │ │ ├── helper_unix.go │ │ │ │ ├── helper_windows.go │ │ │ │ ├── interface.go │ │ │ │ ├── rlimit.go │ │ │ │ └── stack.go │ │ │ └── timeseries │ │ │ │ ├── timeseries.go │ │ │ │ └── timeseries_test.go │ │ ├── ipv4 │ │ │ ├── bpf_test.go │ │ │ ├── bpfopt_linux.go │ │ │ ├── bpfopt_stub.go │ │ │ ├── control.go │ │ │ ├── control_bsd.go │ │ │ ├── control_pktinfo.go │ │ │ ├── control_stub.go │ │ │ ├── control_unix.go │ │ │ ├── control_windows.go │ │ │ ├── defs_darwin.go │ │ │ ├── defs_dragonfly.go │ │ │ ├── defs_freebsd.go │ │ │ ├── defs_linux.go │ │ │ ├── defs_netbsd.go │ │ │ ├── defs_openbsd.go │ │ │ ├── defs_solaris.go │ │ │ ├── dgramopt_posix.go │ │ │ ├── dgramopt_stub.go │ │ │ ├── doc.go │ │ │ ├── endpoint.go │ │ │ ├── example_test.go │ │ │ ├── gen.go │ │ │ ├── genericopt_posix.go │ │ │ ├── genericopt_stub.go │ │ │ ├── header.go │ │ │ ├── header_test.go │ │ │ ├── helper.go │ │ │ ├── iana.go │ │ │ ├── icmp.go │ │ │ ├── icmp_linux.go │ │ │ ├── icmp_stub.go │ │ │ ├── icmp_test.go │ │ │ ├── mocktransponder_test.go │ │ │ ├── multicast_test.go │ │ │ ├── multicastlistener_test.go │ │ │ ├── multicastsockopt_test.go │ │ │ ├── packet.go │ │ │ ├── payload.go │ │ │ ├── payload_cmsg.go │ │ │ ├── payload_nocmsg.go │ │ │ ├── readwrite_test.go │ │ │ ├── sockopt.go │ │ │ ├── sockopt_asmreq.go │ │ │ ├── sockopt_asmreq_posix.go │ │ │ ├── sockopt_asmreq_stub.go │ │ │ ├── sockopt_asmreqn_stub.go │ │ │ ├── sockopt_asmreqn_unix.go │ │ │ ├── sockopt_posix.go │ │ │ ├── sockopt_ssmreq_stub.go │ │ │ ├── sockopt_ssmreq_unix.go │ │ │ ├── sockopt_stub.go │ │ │ ├── sys_bsd.go │ │ │ ├── sys_darwin.go │ │ │ ├── sys_freebsd.go │ │ │ ├── sys_linux.go │ │ │ ├── sys_openbsd.go │ │ │ ├── sys_stub.go │ │ │ ├── sys_windows.go │ │ │ ├── syscall_linux_386.go │ │ │ ├── syscall_unix.go │ │ │ ├── syscall_windows.go │ │ │ ├── thunk_linux_386.s │ │ │ ├── unicast_test.go │ │ │ ├── unicastsockopt_test.go │ │ │ ├── zsys_darwin.go │ │ │ ├── zsys_dragonfly.go │ │ │ ├── zsys_freebsd_386.go │ │ │ ├── zsys_freebsd_amd64.go │ │ │ ├── zsys_freebsd_arm.go │ │ │ ├── zsys_linux_386.go │ │ │ ├── zsys_linux_amd64.go │ │ │ ├── zsys_linux_arm.go │ │ │ ├── zsys_linux_arm64.go │ │ │ ├── zsys_linux_mips64.go │ │ │ ├── zsys_linux_mips64le.go │ │ │ ├── zsys_linux_ppc.go │ │ │ ├── zsys_linux_ppc64.go │ │ │ ├── zsys_linux_ppc64le.go │ │ │ ├── zsys_linux_s390x.go │ │ │ ├── zsys_netbsd.go │ │ │ ├── zsys_openbsd.go │ │ │ └── zsys_solaris.go │ │ ├── ipv6 │ │ │ ├── bpf_test.go │ │ │ ├── bpfopt_linux.go │ │ │ ├── bpfopt_stub.go │ │ │ ├── control.go │ │ │ ├── control_rfc2292_unix.go │ │ │ ├── control_rfc3542_unix.go │ │ │ ├── control_stub.go │ │ │ ├── control_unix.go │ │ │ ├── control_windows.go │ │ │ ├── defs_darwin.go │ │ │ ├── defs_dragonfly.go │ │ │ ├── defs_freebsd.go │ │ │ ├── defs_linux.go │ │ │ ├── defs_netbsd.go │ │ │ ├── defs_openbsd.go │ │ │ ├── defs_solaris.go │ │ │ ├── dgramopt_posix.go │ │ │ ├── dgramopt_stub.go │ │ │ ├── doc.go │ │ │ ├── endpoint.go │ │ │ ├── example_test.go │ │ │ ├── gen.go │ │ │ ├── genericopt_posix.go │ │ │ ├── genericopt_stub.go │ │ │ ├── header.go │ │ │ ├── header_test.go │ │ │ ├── helper.go │ │ │ ├── iana.go │ │ │ ├── icmp.go │ │ │ ├── icmp_bsd.go │ │ │ ├── icmp_linux.go │ │ │ ├── icmp_solaris.go │ │ │ ├── icmp_stub.go │ │ │ ├── icmp_test.go │ │ │ ├── icmp_windows.go │ │ │ ├── main_test.go │ │ │ ├── mocktransponder_test.go │ │ │ ├── multicast_test.go │ │ │ ├── multicastlistener_test.go │ │ │ ├── multicastsockopt_test.go │ │ │ ├── payload.go │ │ │ ├── payload_cmsg.go │ │ │ ├── payload_nocmsg.go │ │ │ ├── readwrite_test.go │ │ │ ├── sockopt.go │ │ │ ├── sockopt_asmreq_posix.go │ │ │ ├── sockopt_posix.go │ │ │ ├── sockopt_ssmreq_stub.go │ │ │ ├── sockopt_ssmreq_unix.go │ │ │ ├── sockopt_stub.go │ │ │ ├── sockopt_test.go │ │ │ ├── sys_bsd.go │ │ │ ├── sys_darwin.go │ │ │ ├── sys_freebsd.go │ │ │ ├── sys_linux.go │ │ │ ├── sys_stub.go │ │ │ ├── sys_windows.go │ │ │ ├── syscall_linux_386.go │ │ │ ├── syscall_unix.go │ │ │ ├── syscall_windows.go │ │ │ ├── thunk_linux_386.s │ │ │ ├── unicast_test.go │ │ │ ├── unicastsockopt_test.go │ │ │ ├── zsys_darwin.go │ │ │ ├── zsys_dragonfly.go │ │ │ ├── zsys_freebsd_386.go │ │ │ ├── zsys_freebsd_amd64.go │ │ │ ├── zsys_freebsd_arm.go │ │ │ ├── zsys_linux_386.go │ │ │ ├── zsys_linux_amd64.go │ │ │ ├── zsys_linux_arm.go │ │ │ ├── zsys_linux_arm64.go │ │ │ ├── zsys_linux_mips64.go │ │ │ ├── zsys_linux_mips64le.go │ │ │ ├── zsys_linux_ppc.go │ │ │ ├── zsys_linux_ppc64.go │ │ │ ├── zsys_linux_ppc64le.go │ │ │ ├── zsys_linux_s390x.go │ │ │ ├── zsys_netbsd.go │ │ │ ├── zsys_openbsd.go │ │ │ └── zsys_solaris.go │ │ ├── lex │ │ │ └── httplex │ │ │ │ ├── httplex.go │ │ │ │ └── httplex_test.go │ │ ├── netutil │ │ │ ├── listen.go │ │ │ └── listen_test.go │ │ ├── proxy │ │ │ ├── direct.go │ │ │ ├── per_host.go │ │ │ ├── per_host_test.go │ │ │ ├── proxy.go │ │ │ ├── proxy_test.go │ │ │ └── socks5.go │ │ ├── publicsuffix │ │ │ ├── gen.go │ │ │ ├── list.go │ │ │ ├── list_test.go │ │ │ ├── table.go │ │ │ └── table_test.go │ │ ├── route │ │ │ ├── address.go │ │ │ ├── address_darwin_test.go │ │ │ ├── address_test.go │ │ │ ├── binary.go │ │ │ ├── defs_darwin.go │ │ │ ├── defs_dragonfly.go │ │ │ ├── defs_freebsd.go │ │ │ ├── defs_netbsd.go │ │ │ ├── defs_openbsd.go │ │ │ ├── interface.go │ │ │ ├── interface_announce.go │ │ │ ├── interface_classic.go │ │ │ ├── interface_freebsd.go │ │ │ ├── interface_multicast.go │ │ │ ├── interface_openbsd.go │ │ │ ├── message.go │ │ │ ├── message_darwin_test.go │ │ │ ├── message_freebsd_test.go │ │ │ ├── message_test.go │ │ │ ├── route.go │ │ │ ├── route_classic.go │ │ │ ├── route_openbsd.go │ │ │ ├── route_test.go │ │ │ ├── sys.go │ │ │ ├── sys_darwin.go │ │ │ ├── sys_dragonfly.go │ │ │ ├── sys_freebsd.go │ │ │ ├── sys_netbsd.go │ │ │ ├── sys_openbsd.go │ │ │ ├── syscall.go │ │ │ ├── syscall.s │ │ │ ├── zsys_darwin.go │ │ │ ├── zsys_dragonfly.go │ │ │ ├── zsys_freebsd_386.go │ │ │ ├── zsys_freebsd_amd64.go │ │ │ ├── zsys_freebsd_arm.go │ │ │ ├── zsys_netbsd.go │ │ │ └── zsys_openbsd.go │ │ ├── trace │ │ │ ├── events.go │ │ │ ├── histogram.go │ │ │ ├── histogram_test.go │ │ │ ├── trace.go │ │ │ └── trace_test.go │ │ ├── webdav │ │ │ ├── file.go │ │ │ ├── file_test.go │ │ │ ├── if.go │ │ │ ├── if_test.go │ │ │ ├── internal │ │ │ │ └── xml │ │ │ │ │ ├── README │ │ │ │ │ ├── atom_test.go │ │ │ │ │ ├── example_test.go │ │ │ │ │ ├── marshal.go │ │ │ │ │ ├── marshal_test.go │ │ │ │ │ ├── read.go │ │ │ │ │ ├── read_test.go │ │ │ │ │ ├── typeinfo.go │ │ │ │ │ ├── xml.go │ │ │ │ │ └── xml_test.go │ │ │ ├── litmus_test_server.go │ │ │ ├── lock.go │ │ │ ├── lock_test.go │ │ │ ├── prop.go │ │ │ ├── prop_test.go │ │ │ ├── webdav.go │ │ │ ├── webdav_test.go │ │ │ ├── xml.go │ │ │ └── xml_test.go │ │ ├── websocket │ │ │ ├── client.go │ │ │ ├── exampledial_test.go │ │ │ ├── examplehandler_test.go │ │ │ ├── hybi.go │ │ │ ├── hybi_test.go │ │ │ ├── server.go │ │ │ ├── websocket.go │ │ │ └── websocket_test.go │ │ └── xsrftoken │ │ │ ├── xsrf.go │ │ │ └── xsrf_test.go │ │ ├── oauth2 │ │ ├── .travis.yml │ │ ├── AUTHORS │ │ ├── CONTRIBUTING.md │ │ ├── CONTRIBUTORS │ │ ├── LICENSE │ │ ├── README.md │ │ ├── bitbucket │ │ │ └── bitbucket.go │ │ ├── client_appengine.go │ │ ├── clientcredentials │ │ │ ├── clientcredentials.go │ │ │ └── clientcredentials_test.go │ │ ├── example_test.go │ │ ├── facebook │ │ │ └── facebook.go │ │ ├── fitbit │ │ │ └── fitbit.go │ │ ├── github │ │ │ └── github.go │ │ ├── google │ │ │ ├── appengine.go │ │ │ ├── appengine_hook.go │ │ │ ├── appenginevm_hook.go │ │ │ ├── default.go │ │ │ ├── example_test.go │ │ │ ├── google.go │ │ │ ├── google_test.go │ │ │ ├── jwt.go │ │ │ ├── jwt_test.go │ │ │ ├── sdk.go │ │ │ ├── sdk_test.go │ │ │ └── testdata │ │ │ │ └── gcloud │ │ │ │ ├── credentials │ │ │ │ └── properties │ │ ├── heroku │ │ │ └── heroku.go │ │ ├── hipchat │ │ │ └── hipchat.go │ │ ├── internal │ │ │ ├── oauth2.go │ │ │ ├── oauth2_test.go │ │ │ ├── token.go │ │ │ ├── token_test.go │ │ │ ├── transport.go │ │ │ └── transport_test.go │ │ ├── jws │ │ │ ├── jws.go │ │ │ └── jws_test.go │ │ ├── jwt │ │ │ ├── example_test.go │ │ │ ├── jwt.go │ │ │ └── jwt_test.go │ │ ├── linkedin │ │ │ └── linkedin.go │ │ ├── mediamath │ │ │ └── mediamath.go │ │ ├── microsoft │ │ │ └── microsoft.go │ │ ├── oauth2.go │ │ ├── oauth2_test.go │ │ ├── odnoklassniki │ │ │ └── odnoklassniki.go │ │ ├── paypal │ │ │ └── paypal.go │ │ ├── slack │ │ │ └── slack.go │ │ ├── token.go │ │ ├── token_test.go │ │ ├── transport.go │ │ ├── transport_test.go │ │ ├── uber │ │ │ └── uber.go │ │ └── vk │ │ │ └── vk.go │ │ └── sys │ │ └── unix │ │ ├── .gitignore │ │ ├── asm.s │ │ ├── asm_darwin_386.s │ │ ├── asm_darwin_amd64.s │ │ ├── asm_darwin_arm.s │ │ ├── asm_darwin_arm64.s │ │ ├── asm_dragonfly_386.s │ │ ├── asm_dragonfly_amd64.s │ │ ├── asm_freebsd_386.s │ │ ├── asm_freebsd_amd64.s │ │ ├── asm_freebsd_arm.s │ │ ├── asm_linux_386.s │ │ ├── asm_linux_amd64.s │ │ ├── asm_linux_arm.s │ │ ├── asm_linux_arm64.s │ │ ├── asm_linux_ppc64x.s │ │ ├── asm_netbsd_386.s │ │ ├── asm_netbsd_amd64.s │ │ ├── asm_netbsd_arm.s │ │ ├── asm_openbsd_386.s │ │ ├── asm_openbsd_amd64.s │ │ ├── asm_solaris_amd64.s │ │ ├── constants.go │ │ ├── creds_test.go │ │ ├── env_unix.go │ │ ├── env_unset.go │ │ ├── export_test.go │ │ ├── flock.go │ │ ├── flock_linux_32bit.go │ │ ├── gccgo.go │ │ ├── gccgo_c.c │ │ ├── gccgo_linux_amd64.go │ │ ├── mkall.sh │ │ ├── mkerrors.sh │ │ ├── mksyscall.pl │ │ ├── mksyscall_solaris.pl │ │ ├── mksysctl_openbsd.pl │ │ ├── mksysnum_darwin.pl │ │ ├── mksysnum_dragonfly.pl │ │ ├── mksysnum_freebsd.pl │ │ ├── mksysnum_linux.pl │ │ ├── mksysnum_netbsd.pl │ │ ├── mksysnum_openbsd.pl │ │ ├── mmap_unix_test.go │ │ ├── race.go │ │ ├── race0.go │ │ ├── sockcmsg_linux.go │ │ ├── sockcmsg_unix.go │ │ ├── str.go │ │ ├── syscall.go │ │ ├── syscall_bsd.go │ │ ├── syscall_bsd_test.go │ │ ├── syscall_darwin.go │ │ ├── syscall_darwin_386.go │ │ ├── syscall_darwin_amd64.go │ │ ├── syscall_darwin_arm.go │ │ ├── syscall_darwin_arm64.go │ │ ├── syscall_dragonfly.go │ │ ├── syscall_dragonfly_386.go │ │ ├── syscall_dragonfly_amd64.go │ │ ├── syscall_freebsd.go │ │ ├── syscall_freebsd_386.go │ │ ├── syscall_freebsd_amd64.go │ │ ├── syscall_freebsd_arm.go │ │ ├── syscall_freebsd_test.go │ │ ├── syscall_linux.go │ │ ├── syscall_linux_386.go │ │ ├── syscall_linux_amd64.go │ │ ├── syscall_linux_arm.go │ │ ├── syscall_linux_arm64.go │ │ ├── syscall_linux_ppc64x.go │ │ ├── syscall_netbsd.go │ │ ├── syscall_netbsd_386.go │ │ ├── syscall_netbsd_amd64.go │ │ ├── syscall_netbsd_arm.go │ │ ├── syscall_no_getwd.go │ │ ├── syscall_openbsd.go │ │ ├── syscall_openbsd_386.go │ │ ├── syscall_openbsd_amd64.go │ │ ├── syscall_solaris.go │ │ ├── syscall_solaris_amd64.go │ │ ├── syscall_test.go │ │ ├── syscall_unix.go │ │ ├── syscall_unix_test.go │ │ ├── types_darwin.go │ │ ├── types_dragonfly.go │ │ ├── types_freebsd.go │ │ ├── types_linux.go │ │ ├── types_netbsd.go │ │ ├── types_openbsd.go │ │ ├── types_solaris.go │ │ ├── zerrors_darwin_386.go │ │ ├── zerrors_darwin_amd64.go │ │ ├── zerrors_darwin_arm.go │ │ ├── zerrors_darwin_arm64.go │ │ ├── zerrors_dragonfly_386.go │ │ ├── zerrors_dragonfly_amd64.go │ │ ├── zerrors_freebsd_386.go │ │ ├── zerrors_freebsd_amd64.go │ │ ├── zerrors_freebsd_arm.go │ │ ├── zerrors_linux_386.go │ │ ├── zerrors_linux_amd64.go │ │ ├── zerrors_linux_arm.go │ │ ├── zerrors_linux_arm64.go │ │ ├── zerrors_linux_ppc64.go │ │ ├── zerrors_linux_ppc64le.go │ │ ├── zerrors_netbsd_386.go │ │ ├── zerrors_netbsd_amd64.go │ │ ├── zerrors_netbsd_arm.go │ │ ├── zerrors_openbsd_386.go │ │ ├── zerrors_openbsd_amd64.go │ │ ├── zerrors_solaris_amd64.go │ │ ├── zsyscall_darwin_386.go │ │ ├── zsyscall_darwin_amd64.go │ │ ├── zsyscall_darwin_arm.go │ │ ├── zsyscall_darwin_arm64.go │ │ ├── zsyscall_dragonfly_386.go │ │ ├── zsyscall_dragonfly_amd64.go │ │ ├── zsyscall_freebsd_386.go │ │ ├── zsyscall_freebsd_amd64.go │ │ ├── zsyscall_freebsd_arm.go │ │ ├── zsyscall_linux_386.go │ │ ├── zsyscall_linux_amd64.go │ │ ├── zsyscall_linux_arm.go │ │ ├── zsyscall_linux_arm64.go │ │ ├── zsyscall_linux_ppc64.go │ │ ├── zsyscall_linux_ppc64le.go │ │ ├── zsyscall_netbsd_386.go │ │ ├── zsyscall_netbsd_amd64.go │ │ ├── zsyscall_netbsd_arm.go │ │ ├── zsyscall_openbsd_386.go │ │ ├── zsyscall_openbsd_amd64.go │ │ ├── zsyscall_solaris_amd64.go │ │ ├── zsysctl_openbsd.go │ │ ├── zsysnum_darwin_386.go │ │ ├── zsysnum_darwin_amd64.go │ │ ├── zsysnum_darwin_arm.go │ │ ├── zsysnum_darwin_arm64.go │ │ ├── zsysnum_dragonfly_386.go │ │ ├── zsysnum_dragonfly_amd64.go │ │ ├── zsysnum_freebsd_386.go │ │ ├── zsysnum_freebsd_amd64.go │ │ ├── zsysnum_freebsd_arm.go │ │ ├── zsysnum_linux_386.go │ │ ├── zsysnum_linux_amd64.go │ │ ├── zsysnum_linux_arm.go │ │ ├── zsysnum_linux_arm64.go │ │ ├── zsysnum_linux_ppc64.go │ │ ├── zsysnum_linux_ppc64le.go │ │ ├── zsysnum_netbsd_386.go │ │ ├── zsysnum_netbsd_amd64.go │ │ ├── zsysnum_netbsd_arm.go │ │ ├── zsysnum_openbsd_386.go │ │ ├── zsysnum_openbsd_amd64.go │ │ ├── zsysnum_solaris_amd64.go │ │ ├── ztypes_darwin_386.go │ │ ├── ztypes_darwin_amd64.go │ │ ├── ztypes_darwin_arm.go │ │ ├── ztypes_darwin_arm64.go │ │ ├── ztypes_dragonfly_386.go │ │ ├── ztypes_dragonfly_amd64.go │ │ ├── ztypes_freebsd_386.go │ │ ├── ztypes_freebsd_amd64.go │ │ ├── ztypes_freebsd_arm.go │ │ ├── ztypes_linux_386.go │ │ ├── ztypes_linux_amd64.go │ │ ├── ztypes_linux_arm.go │ │ ├── ztypes_linux_arm64.go │ │ ├── ztypes_linux_ppc64.go │ │ ├── ztypes_linux_ppc64le.go │ │ ├── ztypes_netbsd_386.go │ │ ├── ztypes_netbsd_amd64.go │ │ ├── ztypes_netbsd_arm.go │ │ ├── ztypes_openbsd_386.go │ │ ├── ztypes_openbsd_amd64.go │ │ └── ztypes_solaris_amd64.go └── gopkg.in │ └── check.v1 │ ├── .gitignore │ ├── LICENSE │ ├── README.md │ ├── TODO │ ├── benchmark.go │ ├── benchmark_test.go │ ├── bootstrap_test.go │ ├── check.go │ ├── check_test.go │ ├── checkers.go │ ├── checkers_test.go │ ├── export_test.go │ ├── fixture_test.go │ ├── foundation_test.go │ ├── helpers.go │ ├── helpers_test.go │ ├── printer.go │ ├── printer_test.go │ ├── reporter.go │ ├── reporter_test.go │ ├── run.go │ └── run_test.go └── vfs ├── vfs_objectstore.go └── vfs_storage.go /.drone.yml: -------------------------------------------------------------------------------- 1 | --- 2 | pipeline: 3 | build: 4 | privileged: true 5 | image: rancher/dind:v1.10.0-rancher1 6 | commands: 7 | - wrapdocker 8 | - make ci 9 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .dapper 2 | .trash-cache 3 | *.pyc 4 | __pycache__/ 5 | 6 | # Compiled Object files, Static and Dynamic libs (Shared Objects) 7 | *.o 8 | *.a 9 | *.so 10 | 11 | # Folders 12 | _obj 13 | _test 14 | bin 15 | build 16 | dist 17 | 18 | # Architecture specific extensions/prefixes 19 | *.[568vq] 20 | [568vq].out 21 | 22 | *.cgo1.go 23 | *.cgo2.c 24 | _cgo_defun.c 25 | _cgo_gotypes.go 26 | _cgo_export.* 27 | 28 | _testmain.go 29 | 30 | *.exe 31 | *.test 32 | *.prof 33 | 34 | longhorn/template.go 35 | -------------------------------------------------------------------------------- /.package: -------------------------------------------------------------------------------- 1 | github.com/rancher/convoy 2 | -------------------------------------------------------------------------------- /.wrap-docker-args: -------------------------------------------------------------------------------- 1 | --privileged \ 2 | -e AWS_ACCESS_KEY_ID=${AWS_ACCESS_KEY_ID} \ 3 | -e AWS_SECRET_ACCESS_KEY=${AWS_SECRET_ACCESS_KEY} \ 4 | -e CONVOY_TEST_AWS_REGION=${CONVOY_TEST_AWS_REGION} \ 5 | -e CONVOY_TEST_AWS_BUCKET=${CONVOY_TEST_AWS_BUCKET} 6 | -------------------------------------------------------------------------------- /Makefile: -------------------------------------------------------------------------------- 1 | TARGETS := $(shell ls scripts) 2 | 3 | .dapper: 4 | @echo Downloading dapper 5 | @curl -sL https://releases.rancher.com/dapper/latest/dapper-`uname -s`-`uname -m` > .dapper.tmp 6 | @@chmod +x .dapper.tmp 7 | @./.dapper.tmp -v 8 | @mv .dapper.tmp .dapper 9 | 10 | $(TARGETS): .dapper 11 | ./.dapper $@ 12 | 13 | trash: .dapper 14 | ./.dapper -m bind trash 15 | 16 | trash-keep: .dapper 17 | ./.dapper -m bind trash -k 18 | 19 | deps: trash 20 | 21 | .DEFAULT_GOAL := ci 22 | 23 | .PHONY: $(TARGETS) 24 | -------------------------------------------------------------------------------- /api/const.go: -------------------------------------------------------------------------------- 1 | package api 2 | 3 | const ( 4 | // API_VERSION is the API version of Convoy daemon 5 | API_VERSION = "1" 6 | 7 | KEY_NAME = "name" 8 | KEY_BACKUP_URL = "backup" 9 | KEY_DEST_URL = "dest" 10 | ) 11 | -------------------------------------------------------------------------------- /apply.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | source ${CATTLE_HOME:-/var/lib/cattle}/common/scripts.sh 4 | 5 | trap "touch $CATTLE_HOME/.pyagent-stamp" exit 6 | 7 | cd $(dirname $0) 8 | 9 | mkdir -p ${CATTLE_HOME}/bin 10 | 11 | cp bin/convoy bin/convoy-pdata_tools ${CATTLE_HOME}/bin 12 | 13 | chmod +x ${CATTLE_HOME}/bin/convoy 14 | chmod +x ${CATTLE_HOME}/bin/convoy-pdata_tools 15 | -------------------------------------------------------------------------------- /client/daemon.go: -------------------------------------------------------------------------------- 1 | package client 2 | 3 | import ( 4 | "fmt" 5 | "io/ioutil" 6 | 7 | "github.com/codegangsta/cli" 8 | "github.com/rancher/convoy/client/flags" 9 | "github.com/rancher/convoy/daemon" 10 | ) 11 | 12 | var ( 13 | daemonCmd = cli.Command{ 14 | Name: "daemon", 15 | Usage: "start convoy daemon", 16 | Flags: flags.DaemonFlags, 17 | Action: cmdStartDaemon, 18 | } 19 | 20 | infoCmd = cli.Command{ 21 | Name: "info", 22 | Usage: "information about convoy", 23 | Action: cmdInfo, 24 | } 25 | ) 26 | 27 | func cmdInfo(c *cli.Context) { 28 | if err := doInfo(c); err != nil { 29 | panic(err) 30 | } 31 | } 32 | 33 | func doInfo(c *cli.Context) error { 34 | rc, _, err := client.call("GET", "/info", nil, nil) 35 | if err != nil { 36 | return err 37 | } 38 | defer rc.Close() 39 | 40 | b, err := ioutil.ReadAll(rc) 41 | if err != nil { 42 | return err 43 | } 44 | fmt.Println(string(b)) 45 | return nil 46 | } 47 | 48 | func cmdStartDaemon(c *cli.Context) { 49 | if err := startDaemon(c); err != nil { 50 | panic(err) 51 | } 52 | } 53 | 54 | func startDaemon(c *cli.Context) error { 55 | return daemon.Start(client.addr, c) 56 | } 57 | -------------------------------------------------------------------------------- /daemon/import_devmapper.go: -------------------------------------------------------------------------------- 1 | // +build linux 2 | 3 | package daemon 4 | 5 | import ( 6 | // Involve device mapper driver for registeration 7 | _ "github.com/rancher/convoy/devmapper" 8 | ) 9 | -------------------------------------------------------------------------------- /daemon/import_digitalocean.go: -------------------------------------------------------------------------------- 1 | package daemon 2 | 3 | import ( 4 | // import DigitalOcean driver for registration 5 | _ "github.com/rancher/convoy/digitalocean" 6 | ) 7 | -------------------------------------------------------------------------------- /daemon/import_ebs.go: -------------------------------------------------------------------------------- 1 | package daemon 2 | 3 | import ( 4 | // Involve AWS EBS driver for registeration 5 | _ "github.com/rancher/convoy/ebs" 6 | ) 7 | -------------------------------------------------------------------------------- /daemon/import_glusterfs.go: -------------------------------------------------------------------------------- 1 | // +build linux 2 | 3 | package daemon 4 | 5 | import ( 6 | // Involve glusterfs driver for registeration 7 | _ "github.com/rancher/convoy/glusterfs" 8 | ) 9 | -------------------------------------------------------------------------------- /daemon/import_objectstore.go: -------------------------------------------------------------------------------- 1 | package daemon 2 | 3 | import ( 4 | // Involve S3 objecstore drivers for registeration 5 | _ "github.com/rancher/convoy/s3" 6 | // Involve VFS convoy driver/objectstore driver for registeration 7 | _ "github.com/rancher/convoy/vfs" 8 | ) 9 | -------------------------------------------------------------------------------- /docs/development-without-golang.md: -------------------------------------------------------------------------------- 1 | # Development Without Go 2 | 3 | You can build, test and package Convoy without needing a Linux machine with dependencies. On a Mac for example, 4 | create a docker-machine that you can mount your host file system into. Then 5 | 6 | ```bash 7 | docker build -t convoy -f Dockerfile.dapper . 8 | ``` 9 | 10 | ## Build 11 | 12 | ```bash 13 | docker run --rm -v $(pwd):/go/src/github.com/rancher/convoy -it convoy 14 | ``` 15 | 16 | ## Test 17 | 18 | ```bash 19 | docker run --rm -v $(pwd):/go/src/github.com/rancher/convoy -it convoy test 20 | ``` 21 | 22 | ## Package 23 | 24 | ```bash 25 | docker run --rm -v $(pwd):/go/src/github.com/rancher/convoy -it convoy package 26 | ``` 27 | 28 | After running `package`, you will have "dist/artifacts/convoy.tar.gz" which you can install 29 | by following the directions in the main README.md. 30 | 31 | -------------------------------------------------------------------------------- /main.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "fmt" 5 | "os" 6 | 7 | "github.com/rancher/convoy/api" 8 | "github.com/rancher/convoy/client" 9 | ) 10 | 11 | var ( 12 | // version of Convoy 13 | VERSION = "v0.5.2" 14 | ) 15 | 16 | func cleanup() { 17 | if r := recover(); r != nil { 18 | api.ResponseLogAndError(r) 19 | os.Exit(1) 20 | } 21 | } 22 | 23 | func main() { 24 | defer cleanup() 25 | 26 | cli := client.NewCli(VERSION) 27 | err := cli.Run(os.Args) 28 | if err != nil { 29 | panic(fmt.Errorf("Error when executing command: %v", err)) 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /metadata/devmapper.go: -------------------------------------------------------------------------------- 1 | package metadata 2 | 3 | import ( 4 | "encoding/xml" 5 | ) 6 | 7 | func DeviceMapperThinDeltaParser(data []byte, blockSize int64, includeSame bool) (*Mappings, error) { 8 | type Entry struct { 9 | XMLName xml.Name 10 | Begin int64 `xml:"begin,attr"` 11 | Length int64 `xml:"length,attr"` 12 | } 13 | 14 | type Diff struct { 15 | Entries []Entry `xml:",any"` 16 | } 17 | 18 | type Superblock struct { 19 | Diff Diff `xml:"diff"` 20 | } 21 | 22 | superblock := &Superblock{} 23 | if err := xml.Unmarshal(data, superblock); err != nil { 24 | return nil, err 25 | } 26 | 27 | mapping := &Mappings{} 28 | for _, d := range superblock.Diff.Entries { 29 | if !includeSame && d.XMLName.Local == "same" { 30 | continue 31 | } 32 | var m Mapping 33 | m.Offset = d.Begin * blockSize 34 | m.Size = d.Length * blockSize 35 | mapping.Mappings = append(mapping.Mappings, m) 36 | } 37 | mapping.BlockSize = blockSize 38 | 39 | return mapping, nil 40 | } 41 | -------------------------------------------------------------------------------- /metadata/metadata.go: -------------------------------------------------------------------------------- 1 | package metadata 2 | 3 | type Mapping struct { 4 | Offset int64 5 | Size int64 6 | } 7 | 8 | type Mappings struct { 9 | Mappings []Mapping 10 | BlockSize int64 11 | } 12 | -------------------------------------------------------------------------------- /package/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM ubuntu:16.04 2 | MAINTAINER Sheng Yang 3 | 4 | RUN apt-get install -y \ 5 | libaio1 6 | 7 | ENV CONVOY_VERSION v0.5.2 8 | ADD https://github.com/rancher/convoy/releases/download/${CONVOY_VERSION}/convoy.tar.gz /tmp/ 9 | RUN tar xvf /tmp/convoy.tar.gz -C /tmp/ \ 10 | && cp /tmp/convoy/convoy* /usr/local/bin/ \ 11 | && rm /tmp/convoy.tar.gz 12 | 13 | ADD convoy-start /usr/local/bin/ 14 | RUN chmod a+x /usr/local/bin/convoy-start 15 | -------------------------------------------------------------------------------- /package/convoy-start: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | mount --rbind /host/dev /dev && \ 4 | convoy daemon $@ 5 | -------------------------------------------------------------------------------- /package/docker-compose.yml: -------------------------------------------------------------------------------- 1 | convoy-instance: 2 | restart: always 3 | labels: 4 | io.rancher.container.pull_image: always 5 | entrypoint: 6 | - /bin/bash 7 | - -c 8 | command: 9 | - /usr/local/bin/convoy-start --mnt-ns /host/proc/1/ns/mnt \ 10 | --drivers=devicemapper \ 11 | --driver-opts dm.datadev=/dev/loop0 \ 12 | --driver-opts dm.metadatadev=/dev/loop1 \ 13 | --driver-opts dm.thinpoolname=convoy_test_pool 14 | privileged: true 15 | working_dir: /storage 16 | volumes: 17 | - /etc/ssl/certs:/etc/ssl/certs 18 | - /root/.aws:/root/.aws 19 | - /dev:/host/dev 20 | - /proc:/host/proc 21 | - /var/lib/convoy:/var/lib/convoy 22 | - /var/run/convoy:/var/run/convoy 23 | - /storage 24 | image: yasker/convoy 25 | -------------------------------------------------------------------------------- /scripts/build: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -e 3 | 4 | source $(dirname $0)/version 5 | 6 | cd $(dirname $0)/.. 7 | 8 | echo Current building version is $VERSION 9 | 10 | mkdir -p bin 11 | go build -a -tags "netgo libdm_no_deferred_remove" \ 12 | -ldflags "-X main.VERSION=$VERSION -linkmode external -extldflags -static" \ 13 | --installsuffix netgo -o bin/convoy 14 | -------------------------------------------------------------------------------- /scripts/ci: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -e 3 | 4 | cd $(dirname $0) 5 | 6 | ./build 7 | ./test 8 | ./package 9 | -------------------------------------------------------------------------------- /scripts/entry: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -e 3 | 4 | trap "chown -R $DAPPER_UID:$DAPPER_GID ." exit 5 | 6 | mkdir -p bin 7 | if [ -e ./scripts/$1 ]; then 8 | ./scripts/"$@" 9 | else 10 | "$@" 11 | fi 12 | -------------------------------------------------------------------------------- /scripts/package: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -e 3 | 4 | CONVOY_CONTENT="convoy" 5 | 6 | cd $(dirname $0)/.. 7 | 8 | if [ ! -x bin/convoy ]; then 9 | scripts/build 10 | fi 11 | 12 | rm -rf dist/artifacts 13 | 14 | mkdir -p build/${CONVOY_CONTENT} 15 | mkdir -p dist/artifacts 16 | 17 | cp /usr/local/bin/convoy-pdata_tools bin/ 18 | cp -f bin/* build/${CONVOY_CONTENT} 19 | 20 | cd build 21 | 22 | sha1sum -b $(find ${CONVOY_CONTENT} -type f) > ${CONVOY_CONTENT}/SHA1SUMS 23 | 24 | tar czf ../dist/artifacts/convoy.tar.gz ${CONVOY_CONTENT} 25 | echo Created dist/artifacts/convoy.tar.gz 26 | -------------------------------------------------------------------------------- /scripts/test: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -e 3 | 4 | cd $(dirname $0)/.. 5 | 6 | echo Running tests 7 | 8 | if [ ! -x ./bin/convoy ]; then 9 | ./scripts/build 10 | fi 11 | 12 | PACKAGES=". $(find -name '*.go' | xargs -I{} dirname {} | cut -f2 -d/ | sort -u | grep -Ev '(^\.$|.git|.trash-cache|vendor|bin)' | sed -e 's!^!./!' -e 's!$!/...!')" 13 | 14 | go test -race -cover -tags "libdm_no_deferred_remove s3test" ${PACKAGES} 15 | -------------------------------------------------------------------------------- /scripts/version: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | if [ -n "$(git status --porcelain --untracked-files=no)" ]; then 4 | DIRTY="-dirty" 5 | fi 6 | 7 | COMMIT=$(git rev-parse --short HEAD) 8 | GIT_TAG=$(git tag -l --contains HEAD | head -n 1) 9 | 10 | if [[ -z "$DIRTY" && -n "$GIT_TAG" ]]; then 11 | VERSION=$GIT_TAG 12 | else 13 | VERSION="${COMMIT}${DIRTY}" 14 | fi 15 | -------------------------------------------------------------------------------- /tests/integration/conftest.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/python 2 | 3 | import pytest 4 | def pytest_addoption(parser): 5 | parser.addoption("--ebs", action="store_true", 6 | help="enable EBS test. Must be on EC2 instance. You would be billed for this") 7 | parser.addoption("--container", action="store_true", 8 | help="test against container instead of local binary") 9 | -------------------------------------------------------------------------------- /tests/integration/s3.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | 3 | import subprocess 4 | 5 | 6 | MINIO_VERSION = "RELEASE.2018-11-30T03-56-59Z" 7 | 8 | 9 | class S3Server: 10 | def __init__(self, access_key, secret_key, name="convoy_minio", port=9000): 11 | self.access_key = access_key 12 | self.secret_key = secret_key 13 | self.name = name 14 | self.port = port 15 | 16 | def start(self): 17 | cmd = [ 18 | "docker", "run", "--detach", 19 | "--name", self.name, 20 | "--publish", "%d:9000" % self.port, 21 | "--env", "MINIO_ACCESS_KEY=" + self.access_key, 22 | "--env", "MINIO_SECRET_KEY=" + self.secret_key, 23 | "minio/minio:" + MINIO_VERSION, "server", "/data", 24 | ] 25 | return subprocess.check_call(cmd) 26 | 27 | def make_bucket(self, bucket): 28 | return subprocess.check_call(["docker", "exec", self.name, 29 | "sh", "-c", "mkdir -p /data/" + bucket]) 30 | 31 | def stop(self): 32 | return subprocess.check_call(["docker", "rm", "--force", 33 | "--volumes", self.name]) 34 | 35 | def connection_str(self): 36 | return "http://localhost:%d/" % self.port 37 | -------------------------------------------------------------------------------- /util/index.go: -------------------------------------------------------------------------------- 1 | package util 2 | 3 | import ( 4 | "fmt" 5 | "sync" 6 | ) 7 | 8 | type Index struct { 9 | data map[string]string 10 | lock *sync.RWMutex 11 | } 12 | 13 | func NewIndex() *Index { 14 | return &Index{data: make(map[string]string), lock: &sync.RWMutex{}} 15 | } 16 | 17 | func (idx *Index) Add(key, value string) error { 18 | if key == "" { 19 | return fmt.Errorf("BUG: Invalid empty index key") 20 | } 21 | if value == "" { 22 | return fmt.Errorf("BUG: Invalid empty index value") 23 | } 24 | 25 | idx.lock.Lock() 26 | defer idx.lock.Unlock() 27 | 28 | if oldValue, exists := idx.data[key]; exists { 29 | if oldValue != value { 30 | return fmt.Errorf("BUG: Conflict when updating index, %v was mapped to %v, but %v want to be mapped too", key, oldValue, value) 31 | } 32 | return nil 33 | } 34 | idx.data[key] = value 35 | return nil 36 | } 37 | 38 | func (idx *Index) Delete(key string) error { 39 | if key == "" { 40 | return fmt.Errorf("BUG: Invalid empty index key") 41 | } 42 | 43 | idx.lock.Lock() 44 | defer idx.lock.Unlock() 45 | 46 | delete(idx.data, key) 47 | return nil 48 | } 49 | 50 | func (idx *Index) Get(key string) string { 51 | idx.lock.RLock() 52 | defer idx.lock.RUnlock() 53 | 54 | return idx.data[key] 55 | } 56 | -------------------------------------------------------------------------------- /vendor/github.com/Sirupsen/logrus/.gitignore: -------------------------------------------------------------------------------- 1 | logrus 2 | -------------------------------------------------------------------------------- /vendor/github.com/Sirupsen/logrus/.travis.yml: -------------------------------------------------------------------------------- 1 | language: go 2 | go: 3 | - 1.2 4 | - 1.3 5 | - 1.4 6 | - tip 7 | install: 8 | - go get -t ./... 9 | -------------------------------------------------------------------------------- /vendor/github.com/Sirupsen/logrus/CHANGELOG.md: -------------------------------------------------------------------------------- 1 | # 0.8.2 2 | 3 | logrus: fix more Fatal family functions 4 | 5 | # 0.8.1 6 | 7 | logrus: fix not exiting on `Fatalf` and `Fatalln` 8 | 9 | # 0.8.0 10 | 11 | logrus: defaults to stderr instead of stdout 12 | hooks/sentry: add special field for `*http.Request` 13 | formatter/text: ignore Windows for colors 14 | 15 | # 0.7.3 16 | 17 | formatter/\*: allow configuration of timestamp layout 18 | 19 | # 0.7.2 20 | 21 | formatter/text: Add configuration option for time format (#158) 22 | -------------------------------------------------------------------------------- /vendor/github.com/Sirupsen/logrus/LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2014 Simon Eskildsen 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in 13 | all copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | THE SOFTWARE. 22 | -------------------------------------------------------------------------------- /vendor/github.com/Sirupsen/logrus/hooks.go: -------------------------------------------------------------------------------- 1 | package logrus 2 | 3 | // A hook to be fired when logging on the logging levels returned from 4 | // `Levels()` on your implementation of the interface. Note that this is not 5 | // fired in a goroutine or a channel with workers, you should handle such 6 | // functionality yourself if your call is non-blocking and you don't wish for 7 | // the logging calls for levels returned from `Levels()` to block. 8 | type Hook interface { 9 | Levels() []Level 10 | Fire(*Entry) error 11 | } 12 | 13 | // Internal type for storing the hooks on a logger instance. 14 | type levelHooks map[Level][]Hook 15 | 16 | // Add a hook to an instance of logger. This is called with 17 | // `log.Hooks.Add(new(MyHook))` where `MyHook` implements the `Hook` interface. 18 | func (hooks levelHooks) Add(hook Hook) { 19 | for _, level := range hook.Levels() { 20 | hooks[level] = append(hooks[level], hook) 21 | } 22 | } 23 | 24 | // Fire all the hooks for the passed level. Used by `entry.log` to fire 25 | // appropriate hooks for a log entry. 26 | func (hooks levelHooks) Fire(level Level, entry *Entry) error { 27 | for _, hook := range hooks[level] { 28 | if err := hook.Fire(entry); err != nil { 29 | return err 30 | } 31 | } 32 | 33 | return nil 34 | } 35 | -------------------------------------------------------------------------------- /vendor/github.com/Sirupsen/logrus/json_formatter.go: -------------------------------------------------------------------------------- 1 | package logrus 2 | 3 | import ( 4 | "encoding/json" 5 | "fmt" 6 | ) 7 | 8 | type JSONFormatter struct { 9 | // TimestampFormat sets the format used for marshaling timestamps. 10 | TimestampFormat string 11 | } 12 | 13 | func (f *JSONFormatter) Format(entry *Entry) ([]byte, error) { 14 | data := make(Fields, len(entry.Data)+3) 15 | for k, v := range entry.Data { 16 | switch v := v.(type) { 17 | case error: 18 | // Otherwise errors are ignored by `encoding/json` 19 | // https://github.com/Sirupsen/logrus/issues/137 20 | data[k] = v.Error() 21 | default: 22 | data[k] = v 23 | } 24 | } 25 | prefixFieldClashes(data) 26 | 27 | timestampFormat := f.TimestampFormat 28 | if timestampFormat == "" { 29 | timestampFormat = DefaultTimestampFormat 30 | } 31 | 32 | data["time"] = entry.Time.Format(timestampFormat) 33 | data["msg"] = entry.Message 34 | data["level"] = entry.Level.String() 35 | 36 | serialized, err := json.Marshal(data) 37 | if err != nil { 38 | return nil, fmt.Errorf("Failed to marshal fields to JSON, %v", err) 39 | } 40 | return append(serialized, '\n'), nil 41 | } 42 | -------------------------------------------------------------------------------- /vendor/github.com/Sirupsen/logrus/terminal_darwin.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.TIOCGETA 11 | 12 | type Termios syscall.Termios 13 | -------------------------------------------------------------------------------- /vendor/github.com/Sirupsen/logrus/terminal_freebsd.go: -------------------------------------------------------------------------------- 1 | /* 2 | Go 1.2 doesn't include Termios for FreeBSD. This should be added in 1.3 and this could be merged with terminal_darwin. 3 | */ 4 | package logrus 5 | 6 | import ( 7 | "syscall" 8 | ) 9 | 10 | const ioctlReadTermios = syscall.TIOCGETA 11 | 12 | type Termios struct { 13 | Iflag uint32 14 | Oflag uint32 15 | Cflag uint32 16 | Lflag uint32 17 | Cc [20]uint8 18 | Ispeed uint32 19 | Ospeed uint32 20 | } 21 | -------------------------------------------------------------------------------- /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/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 7 | 8 | package logrus 9 | 10 | import ( 11 | "syscall" 12 | "unsafe" 13 | ) 14 | 15 | // IsTerminal returns true if the given file descriptor is a terminal. 16 | func IsTerminal() bool { 17 | fd := syscall.Stdout 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/Sirupsen/logrus/terminal_openbsd.go: -------------------------------------------------------------------------------- 1 | package logrus 2 | 3 | import "syscall" 4 | 5 | const ioctlReadTermios = syscall.TIOCGETA 6 | 7 | type Termios syscall.Termios 8 | -------------------------------------------------------------------------------- /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 the given file descriptor is a terminal. 22 | func IsTerminal() bool { 23 | fd := syscall.Stdout 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/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/aws/aws-sdk-go/aws/awsutil/equal.go: -------------------------------------------------------------------------------- 1 | package awsutil 2 | 3 | import ( 4 | "reflect" 5 | ) 6 | 7 | // DeepEqual returns if the two values are deeply equal like reflect.DeepEqual. 8 | // In addition to this, this method will also dereference the input values if 9 | // possible so the DeepEqual performed will not fail if one parameter is a 10 | // pointer and the other is not. 11 | // 12 | // DeepEqual will not perform indirection of nested values of the input parameters. 13 | func DeepEqual(a, b interface{}) bool { 14 | ra := reflect.Indirect(reflect.ValueOf(a)) 15 | rb := reflect.Indirect(reflect.ValueOf(b)) 16 | 17 | if raValid, rbValid := ra.IsValid(), rb.IsValid(); !raValid && !rbValid { 18 | // If the elements are both nil, and of the same type the are equal 19 | // If they are of different types they are not equal 20 | return reflect.TypeOf(a) == reflect.TypeOf(b) 21 | } else if raValid != rbValid { 22 | // Both values must be valid to be equal 23 | return false 24 | } 25 | 26 | return reflect.DeepEqual(ra.Interface(), rb.Interface()) 27 | } 28 | -------------------------------------------------------------------------------- /vendor/github.com/aws/aws-sdk-go/aws/awsutil/equal_test.go: -------------------------------------------------------------------------------- 1 | package awsutil_test 2 | 3 | import ( 4 | "testing" 5 | 6 | "github.com/aws/aws-sdk-go/aws" 7 | "github.com/aws/aws-sdk-go/aws/awsutil" 8 | "github.com/stretchr/testify/assert" 9 | ) 10 | 11 | func TestDeepEqual(t *testing.T) { 12 | cases := []struct { 13 | a, b interface{} 14 | equal bool 15 | }{ 16 | {"a", "a", true}, 17 | {"a", "b", false}, 18 | {"a", aws.String(""), false}, 19 | {"a", nil, false}, 20 | {"a", aws.String("a"), true}, 21 | {(*bool)(nil), (*bool)(nil), true}, 22 | {(*bool)(nil), (*string)(nil), false}, 23 | {nil, nil, true}, 24 | } 25 | 26 | for i, c := range cases { 27 | assert.Equal(t, c.equal, awsutil.DeepEqual(c.a, c.b), "%d, a:%v b:%v, %t", i, c.a, c.b, c.equal) 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /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/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/aws/credentials/static_provider_test.go: -------------------------------------------------------------------------------- 1 | package credentials 2 | 3 | import ( 4 | "github.com/stretchr/testify/assert" 5 | "testing" 6 | ) 7 | 8 | func TestStaticProviderGet(t *testing.T) { 9 | s := StaticProvider{ 10 | Value: Value{ 11 | AccessKeyID: "AKID", 12 | SecretAccessKey: "SECRET", 13 | SessionToken: "", 14 | }, 15 | } 16 | 17 | creds, err := s.Retrieve() 18 | assert.Nil(t, err, "Expect no error") 19 | assert.Equal(t, "AKID", creds.AccessKeyID, "Expect access key ID to match") 20 | assert.Equal(t, "SECRET", creds.SecretAccessKey, "Expect secret access key to match") 21 | assert.Empty(t, creds.SessionToken, "Expect no session token") 22 | } 23 | 24 | func TestStaticProviderIsExpired(t *testing.T) { 25 | s := StaticProvider{ 26 | Value: Value{ 27 | AccessKeyID: "AKID", 28 | SecretAccessKey: "SECRET", 29 | SessionToken: "", 30 | }, 31 | } 32 | 33 | assert.False(t, s.IsExpired(), "Expect static credentials to never expire") 34 | } 35 | -------------------------------------------------------------------------------- /vendor/github.com/aws/aws-sdk-go/aws/ec2metadata/api.go: -------------------------------------------------------------------------------- 1 | package ec2metadata 2 | 3 | import ( 4 | "path" 5 | 6 | "github.com/aws/aws-sdk-go/aws/request" 7 | ) 8 | 9 | // GetMetadata uses the path provided to request 10 | func (c *EC2Metadata) GetMetadata(p string) (string, error) { 11 | op := &request.Operation{ 12 | Name: "GetMetadata", 13 | HTTPMethod: "GET", 14 | HTTPPath: path.Join("/", "meta-data", p), 15 | } 16 | 17 | output := &metadataOutput{} 18 | req := c.NewRequest(op, nil, output) 19 | 20 | return output.Content, req.Send() 21 | } 22 | 23 | // Region returns the region the instance is running in. 24 | func (c *EC2Metadata) Region() (string, error) { 25 | resp, err := c.GetMetadata("placement/availability-zone") 26 | if err != nil { 27 | return "", err 28 | } 29 | 30 | // returns region without the suffix. Eg: us-west-2a becomes us-west-2 31 | return resp[:len(resp)-1], nil 32 | } 33 | 34 | // Available returns if the application has access to the EC2 Metadata service. 35 | // Can be used to determine if application is running within an EC2 Instance and 36 | // the metadata service is available. 37 | func (c *EC2Metadata) Available() bool { 38 | if _, err := c.GetMetadata("instance-id"); err != nil { 39 | return false 40 | } 41 | 42 | return true 43 | } 44 | -------------------------------------------------------------------------------- /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/aws/aws-sdk-go/aws/session/session_test.go: -------------------------------------------------------------------------------- 1 | package session_test 2 | 3 | import ( 4 | "net/http" 5 | "testing" 6 | 7 | "github.com/stretchr/testify/assert" 8 | 9 | "github.com/aws/aws-sdk-go/aws" 10 | "github.com/aws/aws-sdk-go/aws/session" 11 | ) 12 | 13 | func TestNewDefaultSession(t *testing.T) { 14 | s := session.New(&aws.Config{Region: aws.String("region")}) 15 | 16 | assert.Equal(t, "region", *s.Config.Region) 17 | assert.Equal(t, http.DefaultClient, s.Config.HTTPClient) 18 | assert.NotNil(t, s.Config.Logger) 19 | assert.Equal(t, aws.LogOff, *s.Config.LogLevel) 20 | } 21 | -------------------------------------------------------------------------------- /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.0.8" 9 | -------------------------------------------------------------------------------- /vendor/github.com/aws/aws-sdk-go/private/protocol/ec2query/build.go: -------------------------------------------------------------------------------- 1 | // Package ec2query provides serialisation of AWS EC2 requests and responses. 2 | package ec2query 3 | 4 | //go:generate go run ../../../models/protocol_tests/generate.go ../../../models/protocol_tests/input/ec2.json build_test.go 5 | 6 | import ( 7 | "net/url" 8 | 9 | "github.com/aws/aws-sdk-go/aws/awserr" 10 | "github.com/aws/aws-sdk-go/aws/request" 11 | "github.com/aws/aws-sdk-go/private/protocol/query/queryutil" 12 | ) 13 | 14 | // Build builds a request for the EC2 protocol. 15 | func Build(r *request.Request) { 16 | body := url.Values{ 17 | "Action": {r.Operation.Name}, 18 | "Version": {r.ClientInfo.APIVersion}, 19 | } 20 | if err := queryutil.Parse(body, r.Params, true); err != nil { 21 | r.Error = awserr.New("SerializationError", "failed encoding EC2 Query request", err) 22 | } 23 | 24 | if r.ExpireTime == 0 { 25 | r.HTTPRequest.Method = "POST" 26 | r.HTTPRequest.Header.Set("Content-Type", "application/x-www-form-urlencoded; charset=utf-8") 27 | r.SetBufferBody([]byte(body.Encode())) 28 | } else { // This is a pre-signed request 29 | r.HTTPRequest.Method = "GET" 30 | r.HTTPRequest.URL.RawQuery = body.Encode() 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /vendor/github.com/aws/aws-sdk-go/private/protocol/query/build.go: -------------------------------------------------------------------------------- 1 | // Package query provides serialisation of AWS query requests, and responses. 2 | package query 3 | 4 | //go:generate go run ../../../models/protocol_tests/generate.go ../../../models/protocol_tests/input/query.json build_test.go 5 | 6 | import ( 7 | "net/url" 8 | 9 | "github.com/aws/aws-sdk-go/aws/awserr" 10 | "github.com/aws/aws-sdk-go/aws/request" 11 | "github.com/aws/aws-sdk-go/private/protocol/query/queryutil" 12 | ) 13 | 14 | // Build builds a request for an AWS Query service. 15 | func Build(r *request.Request) { 16 | body := url.Values{ 17 | "Action": {r.Operation.Name}, 18 | "Version": {r.ClientInfo.APIVersion}, 19 | } 20 | if err := queryutil.Parse(body, r.Params, false); err != nil { 21 | r.Error = awserr.New("SerializationError", "failed encoding Query request", err) 22 | return 23 | } 24 | 25 | if r.ExpireTime == 0 { 26 | r.HTTPRequest.Method = "POST" 27 | r.HTTPRequest.Header.Set("Content-Type", "application/x-www-form-urlencoded; charset=utf-8") 28 | r.SetBufferBody([]byte(body.Encode())) 29 | } else { // This is a pre-signed request 30 | r.HTTPRequest.Method = "GET" 31 | r.HTTPRequest.URL.RawQuery = body.Encode() 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /vendor/github.com/aws/aws-sdk-go/private/protocol/query/unmarshal.go: -------------------------------------------------------------------------------- 1 | package query 2 | 3 | //go:generate go run ../../../models/protocol_tests/generate.go ../../../models/protocol_tests/output/query.json unmarshal_test.go 4 | 5 | import ( 6 | "encoding/xml" 7 | 8 | "github.com/aws/aws-sdk-go/aws/awserr" 9 | "github.com/aws/aws-sdk-go/aws/request" 10 | "github.com/aws/aws-sdk-go/private/protocol/xml/xmlutil" 11 | ) 12 | 13 | // Unmarshal unmarshals a response for an AWS Query service. 14 | func Unmarshal(r *request.Request) { 15 | defer r.HTTPResponse.Body.Close() 16 | if r.DataFilled() { 17 | decoder := xml.NewDecoder(r.HTTPResponse.Body) 18 | err := xmlutil.UnmarshalXML(r.Data, decoder, r.Operation.Name+"Result") 19 | if err != nil { 20 | r.Error = awserr.New("SerializationError", "failed decoding Query response", err) 21 | return 22 | } 23 | } 24 | } 25 | 26 | // UnmarshalMeta unmarshals header response values for an AWS Query service. 27 | func UnmarshalMeta(r *request.Request) { 28 | r.RequestID = r.HTTPResponse.Header.Get("X-Amzn-Requestid") 29 | } 30 | -------------------------------------------------------------------------------- /vendor/github.com/aws/aws-sdk-go/private/protocol/query/unmarshal_error.go: -------------------------------------------------------------------------------- 1 | package query 2 | 3 | import ( 4 | "encoding/xml" 5 | "io" 6 | 7 | "github.com/aws/aws-sdk-go/aws/awserr" 8 | "github.com/aws/aws-sdk-go/aws/request" 9 | ) 10 | 11 | type xmlErrorResponse struct { 12 | XMLName xml.Name `xml:"ErrorResponse"` 13 | Code string `xml:"Error>Code"` 14 | Message string `xml:"Error>Message"` 15 | RequestID string `xml:"RequestId"` 16 | } 17 | 18 | // UnmarshalError unmarshals an error response for an AWS Query service. 19 | func UnmarshalError(r *request.Request) { 20 | defer r.HTTPResponse.Body.Close() 21 | 22 | resp := &xmlErrorResponse{} 23 | err := xml.NewDecoder(r.HTTPResponse.Body).Decode(resp) 24 | if err != nil && err != io.EOF { 25 | r.Error = awserr.New("SerializationError", "failed to decode query XML error response", err) 26 | } else { 27 | r.Error = awserr.NewRequestFailure( 28 | awserr.New(resp.Code, resp.Message, nil), 29 | r.HTTPResponse.StatusCode, 30 | resp.RequestID, 31 | ) 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /vendor/github.com/aws/aws-sdk-go/service/ec2/customizations_test.go: -------------------------------------------------------------------------------- 1 | package ec2_test 2 | 3 | import ( 4 | "io/ioutil" 5 | "net/url" 6 | "testing" 7 | 8 | "github.com/aws/aws-sdk-go/aws" 9 | "github.com/aws/aws-sdk-go/awstesting/unit" 10 | "github.com/aws/aws-sdk-go/service/ec2" 11 | "github.com/stretchr/testify/assert" 12 | ) 13 | 14 | func TestCopySnapshotPresignedURL(t *testing.T) { 15 | svc := ec2.New(unit.Session, &aws.Config{Region: aws.String("us-west-2")}) 16 | 17 | assert.NotPanics(t, func() { 18 | // Doesn't panic on nil input 19 | req, _ := svc.CopySnapshotRequest(nil) 20 | req.Sign() 21 | }) 22 | 23 | req, _ := svc.CopySnapshotRequest(&ec2.CopySnapshotInput{ 24 | SourceRegion: aws.String("us-west-1"), 25 | SourceSnapshotId: aws.String("snap-id"), 26 | }) 27 | req.Sign() 28 | 29 | b, _ := ioutil.ReadAll(req.HTTPRequest.Body) 30 | q, _ := url.ParseQuery(string(b)) 31 | u, _ := url.QueryUnescape(q.Get("PresignedUrl")) 32 | assert.Equal(t, "us-west-2", q.Get("DestinationRegion")) 33 | assert.Equal(t, "us-west-1", q.Get("SourceRegion")) 34 | assert.Regexp(t, `^https://ec2\.us-west-1\.amazonaws\.com/.+&DestinationRegion=us-west-2`, u) 35 | } 36 | -------------------------------------------------------------------------------- /vendor/github.com/aws/aws-sdk-go/service/s3/content_md5.go: -------------------------------------------------------------------------------- 1 | package s3 2 | 3 | import ( 4 | "crypto/md5" 5 | "encoding/base64" 6 | "io" 7 | 8 | "github.com/aws/aws-sdk-go/aws/awserr" 9 | "github.com/aws/aws-sdk-go/aws/request" 10 | ) 11 | 12 | // contentMD5 computes and sets the HTTP Content-MD5 header for requests that 13 | // require it. 14 | func contentMD5(r *request.Request) { 15 | h := md5.New() 16 | 17 | // hash the body. seek back to the first position after reading to reset 18 | // the body for transmission. copy errors may be assumed to be from the 19 | // body. 20 | _, err := io.Copy(h, r.Body) 21 | if err != nil { 22 | r.Error = awserr.New("ContentMD5", "failed to read body", err) 23 | return 24 | } 25 | _, err = r.Body.Seek(0, 0) 26 | if err != nil { 27 | r.Error = awserr.New("ContentMD5", "failed to seek body", err) 28 | return 29 | } 30 | 31 | // encode the md5 checksum in base64 and set the request header. 32 | sum := h.Sum(nil) 33 | sum64 := make([]byte, base64.StdEncoding.EncodedLen(len(sum))) 34 | base64.StdEncoding.Encode(sum64, sum) 35 | r.HTTPRequest.Header.Set("Content-MD5", string(sum64)) 36 | } 37 | -------------------------------------------------------------------------------- /vendor/github.com/aws/aws-sdk-go/service/s3/statusok_error.go: -------------------------------------------------------------------------------- 1 | package s3 2 | 3 | import ( 4 | "bytes" 5 | "io/ioutil" 6 | "net/http" 7 | 8 | "github.com/aws/aws-sdk-go/aws" 9 | "github.com/aws/aws-sdk-go/aws/awserr" 10 | "github.com/aws/aws-sdk-go/aws/request" 11 | ) 12 | 13 | func copyMultipartStatusOKUnmarhsalError(r *request.Request) { 14 | b, err := ioutil.ReadAll(r.HTTPResponse.Body) 15 | if err != nil { 16 | r.Error = awserr.New("SerializationError", "unable to read response body", err) 17 | return 18 | } 19 | body := bytes.NewReader(b) 20 | r.HTTPResponse.Body = aws.ReadSeekCloser(body) 21 | defer r.HTTPResponse.Body.(aws.ReaderSeekerCloser).Seek(0, 0) 22 | 23 | if body.Len() == 0 { 24 | // If there is no body don't attempt to parse the body. 25 | return 26 | } 27 | 28 | unmarshalError(r) 29 | if err, ok := r.Error.(awserr.Error); ok && err != nil { 30 | if err.Code() == "SerializationError" { 31 | r.Error = nil 32 | return 33 | } 34 | r.HTTPResponse.StatusCode = http.StatusServiceUnavailable 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /vendor/github.com/codegangsta/cli/.travis.yml: -------------------------------------------------------------------------------- 1 | language: go 2 | sudo: false 3 | 4 | go: 5 | - 1.0.3 6 | - 1.1.2 7 | - 1.2.2 8 | - 1.3.3 9 | - 1.4.2 10 | - 1.5.1 11 | - tip 12 | 13 | matrix: 14 | allow_failures: 15 | - go: tip 16 | 17 | script: 18 | - go vet ./... 19 | - go test -v ./... 20 | -------------------------------------------------------------------------------- /vendor/github.com/codegangsta/cli/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (C) 2013 Jeremy Saenz 2 | All Rights Reserved. 3 | 4 | MIT LICENSE 5 | 6 | Permission is hereby granted, free of charge, to any person obtaining a copy of 7 | this software and associated documentation files (the "Software"), to deal in 8 | the Software without restriction, including without limitation the rights to 9 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 10 | the Software, and to permit persons to whom the Software is furnished to do so, 11 | subject to the following conditions: 12 | 13 | The above copyright notice and this permission notice shall be included in all 14 | copies or substantial portions of the Software. 15 | 16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 18 | FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 19 | COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 20 | IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 21 | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 22 | -------------------------------------------------------------------------------- /vendor/github.com/codegangsta/cli/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) { 14 | // println("Greetings") 15 | // } 16 | // 17 | // app.Run(os.Args) 18 | // } 19 | package cli 20 | 21 | import ( 22 | "strings" 23 | ) 24 | 25 | type MultiError struct { 26 | Errors []error 27 | } 28 | 29 | func NewMultiError(err ...error) MultiError { 30 | return MultiError{Errors: err} 31 | } 32 | 33 | func (m MultiError) Error() string { 34 | errs := make([]string, len(m.Errors)) 35 | for i, err := range m.Errors { 36 | errs[i] = err.Error() 37 | } 38 | 39 | return strings.Join(errs, "\n") 40 | } 41 | -------------------------------------------------------------------------------- /vendor/github.com/codegangsta/cli/helpers_test.go: -------------------------------------------------------------------------------- 1 | package cli 2 | 3 | import ( 4 | "reflect" 5 | "testing" 6 | ) 7 | 8 | /* Test Helpers */ 9 | func expect(t *testing.T, a interface{}, b interface{}) { 10 | if !reflect.DeepEqual(a, b) { 11 | t.Errorf("Expected %v (type %v) - Got %v (type %v)", b, reflect.TypeOf(b), a, reflect.TypeOf(a)) 12 | } 13 | } 14 | 15 | func refute(t *testing.T, a interface{}, b interface{}) { 16 | if reflect.DeepEqual(a, b) { 17 | t.Errorf("Did not expect %v (type %v) - Got %v (type %v)", b, reflect.TypeOf(b), a, reflect.TypeOf(a)) 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /vendor/github.com/digitalocean/go-metadata/.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 | *.test 24 | *.prof 25 | -------------------------------------------------------------------------------- /vendor/github.com/digitalocean/go-metadata/LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2015 DigitalOcean 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | 23 | -------------------------------------------------------------------------------- /vendor/github.com/digitalocean/go-metadata/README.md: -------------------------------------------------------------------------------- 1 | # metadata 2 | 3 | A Go client to interact with the DigitalOcean Metadata API. 4 | 5 | # Usage 6 | 7 | ```go 8 | // Create a client 9 | client := metadata.NewClient(opts) 10 | 11 | // Request all the metadata about the current droplet 12 | all, err := client.Metadata() 13 | if err != nil { 14 | log.Fatal(err) 15 | } 16 | 17 | // Lookup what our IPv4 address is on our first public 18 | // network interface. 19 | publicIPv4Addr := all.Interfaces["public"][0].IPv4.IPAddress 20 | 21 | fmt.Println(publicIPv4Addr) 22 | ``` 23 | 24 | # License 25 | 26 | MIT license 27 | -------------------------------------------------------------------------------- /vendor/github.com/digitalocean/go-metadata/example_test.go: -------------------------------------------------------------------------------- 1 | package metadata_test 2 | 3 | import ( 4 | "fmt" 5 | "log" 6 | 7 | "github.com/digitalocean/go-metadata" 8 | ) 9 | 10 | // Create a client and query it for all available metadata. 11 | func Example() { 12 | // Create a client 13 | client := metadata.NewClient(opts) 14 | 15 | // Request all the metadata about the current droplet 16 | all, err := client.Metadata() 17 | if err != nil { 18 | log.Fatal(err) 19 | } 20 | 21 | // Lookup what our IPv4 address is on our first public 22 | // network interface. 23 | publicIPv4Addr := all.Interfaces["public"][0].IPv4.IPAddress 24 | 25 | fmt.Println(publicIPv4Addr) 26 | // Output: 27 | // 192.168.0.100 28 | } 29 | -------------------------------------------------------------------------------- /vendor/github.com/digitalocean/go-metadata/example_utils_test.go: -------------------------------------------------------------------------------- 1 | package metadata_test 2 | 3 | import ( 4 | "net/http" 5 | "net/http/httptest" 6 | "net/url" 7 | 8 | "github.com/digitalocean/go-metadata" 9 | ) 10 | 11 | var opts = stubMetadata() 12 | 13 | func stubMetadata() metadata.ClientOption { 14 | srv := httptest.NewServer(http.HandlerFunc(func(rw http.ResponseWriter, req *http.Request) { 15 | rw.Write([]byte(`{"interfaces":{"public":[{"ipv4":{"ip_address":"192.168.0.100"}}]}}`)) 16 | })) 17 | u, err := url.Parse(srv.URL) 18 | if err != nil { 19 | panic(err) 20 | } 21 | // the server is not closed since the Example process is about to die anyways. 22 | // makes for a cleaner Example in the docs. 23 | return metadata.WithBaseURL(u) 24 | } 25 | -------------------------------------------------------------------------------- /vendor/github.com/digitalocean/godo/.travis.yml: -------------------------------------------------------------------------------- 1 | language: go 2 | 3 | go: 4 | - 1.3 5 | - 1.4 6 | - tip 7 | -------------------------------------------------------------------------------- /vendor/github.com/digitalocean/godo/CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # Contributing 2 | 3 | If you submit a pull request, please keep the following guidelines in mind: 4 | 5 | 1. Code should be `go fmt` compliant. 6 | 2. Types, structs and funcs should be documented. 7 | 3. Tests pass. 8 | 9 | ## Getting set up 10 | 11 | Assuming your `$GOPATH` is set up according to your desires, run: 12 | 13 | ```sh 14 | go get github.com/digitalocean/godo 15 | ``` 16 | 17 | ## Running tests 18 | 19 | When working on code in this repository, tests can be run via: 20 | 21 | ```sh 22 | go test . 23 | ``` 24 | -------------------------------------------------------------------------------- /vendor/github.com/digitalocean/godo/doc.go: -------------------------------------------------------------------------------- 1 | // Package godo is the DigtalOcean API v2 client for Go 2 | package godo 3 | -------------------------------------------------------------------------------- /vendor/github.com/digitalocean/godo/errors.go: -------------------------------------------------------------------------------- 1 | package godo 2 | 3 | import "fmt" 4 | 5 | // ArgError is an error that represents an error with an input to godo. It 6 | // identifies the argument and the cause (if possible). 7 | type ArgError struct { 8 | arg string 9 | reason string 10 | } 11 | 12 | var _ error = &ArgError{} 13 | 14 | // NewArgError creates an InputError. 15 | func NewArgError(arg, reason string) *ArgError { 16 | return &ArgError{ 17 | arg: arg, 18 | reason: reason, 19 | } 20 | } 21 | 22 | func (e *ArgError) Error() string { 23 | return fmt.Sprintf("%s is invalid because %s", e.arg, e.reason) 24 | } 25 | -------------------------------------------------------------------------------- /vendor/github.com/digitalocean/godo/timestamp.go: -------------------------------------------------------------------------------- 1 | package godo 2 | 3 | import ( 4 | "strconv" 5 | "time" 6 | ) 7 | 8 | // Timestamp represents a time that can be unmarshalled from a JSON string 9 | // formatted as either an RFC3339 or Unix timestamp. All 10 | // exported methods of time.Time can be called on Timestamp. 11 | type Timestamp struct { 12 | time.Time 13 | } 14 | 15 | func (t Timestamp) String() string { 16 | return t.Time.String() 17 | } 18 | 19 | // UnmarshalJSON implements the json.Unmarshaler interface. 20 | // Time is expected in RFC3339 or Unix format. 21 | func (t *Timestamp) UnmarshalJSON(data []byte) error { 22 | str := string(data) 23 | i, err := strconv.ParseInt(str, 10, 64) 24 | if err == nil { 25 | t.Time = time.Unix(i, 0) 26 | } else { 27 | t.Time, err = time.Parse(`"`+time.RFC3339+`"`, str) 28 | } 29 | return err 30 | } 31 | 32 | // Equal reports whether t and u are equal based on time.Equal 33 | func (t Timestamp) Equal(u Timestamp) bool { 34 | return t.Time.Equal(u.Time) 35 | } 36 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/pkg/devicemapper/devmapper_log.go: -------------------------------------------------------------------------------- 1 | // +build linux 2 | 3 | package devicemapper 4 | 5 | import "C" 6 | 7 | import ( 8 | "strings" 9 | ) 10 | 11 | // Due to the way cgo works this has to be in a separate file, as devmapper.go has 12 | // definitions in the cgo block, which is incompatible with using "//export" 13 | 14 | //export DevmapperLogCallback 15 | func DevmapperLogCallback(level C.int, file *C.char, line C.int, dm_errno_or_class C.int, message *C.char) { 16 | msg := C.GoString(message) 17 | if level < 7 { 18 | if strings.Contains(msg, "busy") { 19 | dmSawBusy = true 20 | } 21 | 22 | if strings.Contains(msg, "File exists") { 23 | dmSawExist = true 24 | } 25 | 26 | if strings.Contains(msg, "No such device or address") { 27 | dmSawEnxio = true 28 | } 29 | } 30 | 31 | if dmLogger != nil { 32 | dmLogger.DMLog(int(level), C.GoString(file), int(line), int(dm_errno_or_class), msg) 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/pkg/devicemapper/devmapper_wrapper_deferred_remove.go: -------------------------------------------------------------------------------- 1 | // +build linux,!libdm_no_deferred_remove 2 | 3 | package devicemapper 4 | 5 | /* 6 | #cgo LDFLAGS: -L. -ldevmapper 7 | #include 8 | */ 9 | import "C" 10 | 11 | const LibraryDeferredRemovalSupport = true 12 | 13 | func dmTaskDeferredRemoveFct(task *CDmTask) int { 14 | return int(C.dm_task_deferred_remove((*C.struct_dm_task)(task))) 15 | } 16 | 17 | func dmTaskGetInfoWithDeferredFct(task *CDmTask, info *Info) int { 18 | Cinfo := C.struct_dm_info{} 19 | defer func() { 20 | info.Exists = int(Cinfo.exists) 21 | info.Suspended = int(Cinfo.suspended) 22 | info.LiveTable = int(Cinfo.live_table) 23 | info.InactiveTable = int(Cinfo.inactive_table) 24 | info.OpenCount = int32(Cinfo.open_count) 25 | info.EventNr = uint32(Cinfo.event_nr) 26 | info.Major = uint32(Cinfo.major) 27 | info.Minor = uint32(Cinfo.minor) 28 | info.ReadOnly = int(Cinfo.read_only) 29 | info.TargetCount = int32(Cinfo.target_count) 30 | info.DeferredRemove = int(Cinfo.deferred_remove) 31 | }() 32 | return int(C.dm_task_get_info((*C.struct_dm_task)(task), &Cinfo)) 33 | } 34 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/pkg/devicemapper/devmapper_wrapper_no_deferred_remove.go: -------------------------------------------------------------------------------- 1 | // +build linux,libdm_no_deferred_remove 2 | 3 | package devicemapper 4 | 5 | const LibraryDeferredRemovalSupport = false 6 | 7 | func dmTaskDeferredRemoveFct(task *CDmTask) int { 8 | // Error. Nobody should be calling it. 9 | return -1 10 | } 11 | 12 | func dmTaskGetInfoWithDeferredFct(task *CDmTask, info *Info) int { 13 | return -1 14 | } 15 | -------------------------------------------------------------------------------- /vendor/github.com/docker/docker/pkg/devicemapper/log.go: -------------------------------------------------------------------------------- 1 | package devicemapper 2 | 3 | // definitions from lvm2 lib/log/log.h 4 | const ( 5 | LogLevelFatal = 2 + iota // _LOG_FATAL 6 | LogLevelErr // _LOG_ERR 7 | LogLevelWarn // _LOG_WARN 8 | LogLevelNotice // _LOG_NOTICE 9 | LogLevelInfo // _LOG_INFO 10 | LogLevelDebug // _LOG_DEBUG 11 | ) 12 | -------------------------------------------------------------------------------- /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/google/go-querystring/.gitignore: -------------------------------------------------------------------------------- 1 | *.test 2 | -------------------------------------------------------------------------------- /vendor/github.com/gorilla/context/.travis.yml: -------------------------------------------------------------------------------- 1 | language: go 2 | 3 | go: 4 | - 1.0 5 | - 1.1 6 | - 1.2 7 | - 1.3 8 | - 1.4 9 | - tip 10 | -------------------------------------------------------------------------------- /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/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/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 | -------------------------------------------------------------------------------- /vendor/github.com/gorilla/mux/bench_test.go: -------------------------------------------------------------------------------- 1 | // Copyright 2012 The Gorilla 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 mux 6 | 7 | import ( 8 | "net/http" 9 | "testing" 10 | ) 11 | 12 | func BenchmarkMux(b *testing.B) { 13 | router := new(Router) 14 | handler := func(w http.ResponseWriter, r *http.Request) {} 15 | router.HandleFunc("/v1/{v1}", handler) 16 | 17 | request, _ := http.NewRequest("GET", "/v1/anything", nil) 18 | for i := 0; i < b.N; i++ { 19 | router.ServeHTTP(nil, request) 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /vendor/github.com/http-link-go/.gitignore: -------------------------------------------------------------------------------- 1 | *.test 2 | -------------------------------------------------------------------------------- /vendor/github.com/http-link-go/.travis.yml: -------------------------------------------------------------------------------- 1 | language: go 2 | go: 3 | - 1.1 4 | - tip 5 | before_install: 6 | - go get launchpad.net/gocheck 7 | -------------------------------------------------------------------------------- /vendor/github.com/http-link-go/README.md: -------------------------------------------------------------------------------- 1 | # http-link-go [![Build Status](https://travis-ci.org/tent/http-link-go.png?branch=master)](https://travis-ci.org/tent/http-link-go) 2 | 3 | http-link-go implements parsing and serialization of Link header values as 4 | defined in [RFC 5988](https://tools.ietf.org/html/rfc5988). 5 | 6 | [**Documentation**](http://godoc.org/github.com/tent/http-link-go) 7 | 8 | ## Installation 9 | 10 | ```text 11 | go get github.com/tent/http-link-go 12 | ``` 13 | -------------------------------------------------------------------------------- /vendor/github.com/jmespath/go-jmespath/.gitignore: -------------------------------------------------------------------------------- 1 | jpgo 2 | jmespath-fuzz.zip 3 | cpu.out 4 | go-jmespath.test 5 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /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/github.com/jmespath/go-jmespath/Makefile: -------------------------------------------------------------------------------- 1 | 2 | CMD = jpgo 3 | 4 | help: 5 | @echo "Please use \`make ' where is one of" 6 | @echo " test to run all the tests" 7 | @echo " build to build the library and jp executable" 8 | @echo " generate to run codegen" 9 | 10 | 11 | generate: 12 | go generate ./... 13 | 14 | build: 15 | rm -f $(CMD) 16 | go build ./... 17 | rm -f cmd/$(CMD)/$(CMD) && cd cmd/$(CMD)/ && go build ./... 18 | mv cmd/$(CMD)/$(CMD) . 19 | 20 | test: 21 | go test -v ./... 22 | 23 | check: 24 | go vet ./... 25 | @echo "golint ./..." 26 | @lint=`golint ./...`; \ 27 | lint=`echo "$$lint" | grep -v "astnodetype_string.go" | grep -v "toktype_string.go"`; \ 28 | echo "$$lint"; \ 29 | if [ "$$lint" != "" ]; then exit 1; fi 30 | 31 | htmlc: 32 | go test -coverprofile="/tmp/jpcov" && go tool cover -html="/tmp/jpcov" && unlink /tmp/jpcov 33 | 34 | buildfuzz: 35 | go-fuzz-build github.com/jmespath/go-jmespath/fuzz 36 | 37 | fuzz: buildfuzz 38 | go-fuzz -bin=./jmespath-fuzz.zip -workdir=fuzz/corpus 39 | 40 | bench: 41 | go test -bench . -cpuprofile cpu.out 42 | 43 | pprof-cpu: 44 | go tool pprof ./go-jmespath.test ./cpu.out 45 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /vendor/github.com/jmespath/go-jmespath/api_test.go: -------------------------------------------------------------------------------- 1 | package jmespath 2 | 3 | import ( 4 | "testing" 5 | 6 | "github.com/stretchr/testify/assert" 7 | ) 8 | 9 | func TestValidPrecompiledExpressionSearches(t *testing.T) { 10 | assert := assert.New(t) 11 | data := make(map[string]interface{}) 12 | data["foo"] = "bar" 13 | precompiled, err := Compile("foo") 14 | assert.Nil(err) 15 | result, err := precompiled.Search(data) 16 | assert.Nil(err) 17 | assert.Equal("bar", result) 18 | } 19 | 20 | func TestInvalidPrecompileErrors(t *testing.T) { 21 | assert := assert.New(t) 22 | _, err := Compile("not a valid expression") 23 | assert.NotNil(err) 24 | } 25 | 26 | func TestInvalidMustCompilePanics(t *testing.T) { 27 | defer func() { 28 | r := recover() 29 | assert.NotNil(t, r) 30 | }() 31 | MustCompile("not a valid expression") 32 | } 33 | -------------------------------------------------------------------------------- /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/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/github.com/mcuadros/go-version/.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/github.com/mcuadros/go-version/.travis.yml: -------------------------------------------------------------------------------- 1 | language: go 2 | -------------------------------------------------------------------------------- /vendor/github.com/mcuadros/go-version/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2013 Máximo Cuadros 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy 4 | of this software and associated documentation files (the "Software"), to deal 5 | in the Software without restriction, including without limitation the rights 6 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | copies of the Software, and to permit persons to whom the Software is furnished 8 | to do so, subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in all 11 | copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 19 | THE SOFTWARE. 20 | -------------------------------------------------------------------------------- /vendor/github.com/mcuadros/go-version/doc.go: -------------------------------------------------------------------------------- 1 | /* 2 | Version normalizer and comparison library for go, heavy based on PHP 3 | version_compare function and Version comparsion libs from Composer 4 | (https://github.com/composer/composer) PHP project 5 | */ 6 | package version -------------------------------------------------------------------------------- /vendor/github.com/mcuadros/go-version/sort.go: -------------------------------------------------------------------------------- 1 | package version 2 | 3 | import ( 4 | "sort" 5 | ) 6 | 7 | // Sorts a string slice of version number strings using version.CompareSimple() 8 | // 9 | // Example: 10 | // version.Sort([]string{"1.10-dev", "1.0rc1", "1.0", "1.0-dev"}) 11 | // Returns []string{"1.0-dev", "1.0rc1", "1.0", "1.10-dev"} 12 | // 13 | func Sort(versionStrings []string) { 14 | versions := versionSlice(versionStrings) 15 | sort.Sort(versions) 16 | } 17 | 18 | type versionSlice []string 19 | 20 | func (s versionSlice) Len() int { 21 | return len(s) 22 | } 23 | 24 | func (s versionSlice) Less(i, j int) bool { 25 | cmp := CompareSimple(Normalize(s[i]), Normalize(s[j])) 26 | if cmp == 0 { 27 | return s[i] < s[j] 28 | } 29 | return cmp < 0 30 | } 31 | 32 | func (s versionSlice) Swap(i, j int) { 33 | tmp := s[j] 34 | s[j] = s[i] 35 | s[i] = tmp 36 | } 37 | -------------------------------------------------------------------------------- /vendor/github.com/mcuadros/go-version/stability_test.go: -------------------------------------------------------------------------------- 1 | package version 2 | 3 | import ( 4 | "testing" 5 | ) 6 | 7 | var stabilityValues = map[string]int{ 8 | "1.0": Stable, 9 | "1.0-dev": Development, 10 | "1.0-alpha": Alpha, 11 | "1.0b1": Beta, 12 | "1.0rc1": RC, 13 | } 14 | 15 | func TestGetStability(t *testing.T) { 16 | for in, out := range stabilityValues { 17 | if x := GetStability(in); x != out { 18 | t.Errorf("FAIL: GetStability(%v) = %v: want %v", in, x, out) 19 | } 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /vendor/github.com/satori/go.uuid/.travis.yml: -------------------------------------------------------------------------------- 1 | language: go 2 | go: 3 | - 1.0 4 | - 1.1 5 | - 1.2 6 | - 1.3 7 | - 1.4 8 | - 1.5 9 | sudo: false 10 | notifications: 11 | email: false 12 | -------------------------------------------------------------------------------- /vendor/github.com/satori/go.uuid/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (C) 2013-2015 by Maxim Bublis 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining 4 | a copy of this software and associated documentation files (the 5 | "Software"), to deal in the Software without restriction, including 6 | without limitation the rights to use, copy, modify, merge, publish, 7 | distribute, sublicense, and/or sell copies of the Software, and to 8 | permit persons to whom the Software is furnished to do so, subject to 9 | the following conditions: 10 | 11 | The above copyright notice and this permission notice shall be 12 | included in all copies or substantial portions of the Software. 13 | 14 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 15 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 16 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 17 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 18 | LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 19 | OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 20 | WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 21 | -------------------------------------------------------------------------------- /vendor/github.com/tent/http-link-go/.gitignore: -------------------------------------------------------------------------------- 1 | *.test 2 | -------------------------------------------------------------------------------- /vendor/github.com/tent/http-link-go/.travis.yml: -------------------------------------------------------------------------------- 1 | language: go 2 | go: 3 | - 1.1 4 | - tip 5 | before_install: 6 | - go get launchpad.net/gocheck 7 | -------------------------------------------------------------------------------- /vendor/github.com/tent/http-link-go/README.md: -------------------------------------------------------------------------------- 1 | # http-link-go [![Build Status](https://travis-ci.org/tent/http-link-go.png?branch=master)](https://travis-ci.org/tent/http-link-go) 2 | 3 | http-link-go implements parsing and serialization of Link header values as 4 | defined in [RFC 5988](https://tools.ietf.org/html/rfc5988). 5 | 6 | [**Documentation**](http://godoc.org/github.com/tent/http-link-go) 7 | 8 | ## Installation 9 | 10 | ```text 11 | go get github.com/tent/http-link-go 12 | ``` 13 | -------------------------------------------------------------------------------- /vendor/golang.org/x/net/.gitattributes: -------------------------------------------------------------------------------- 1 | # Treat all files in this repo as binary, with no git magic updating 2 | # line endings. Windows users contributing to Go will need to use a 3 | # modern version of git and editors capable of LF line endings. 4 | # 5 | # We'll prevent accidental CRLF line endings from entering the repo 6 | # via the git-review gofmt checks. 7 | # 8 | # See golang.org/issue/9281 9 | 10 | * -text 11 | -------------------------------------------------------------------------------- /vendor/golang.org/x/net/.gitignore: -------------------------------------------------------------------------------- 1 | # Add no patterns to .hgignore except for files generated by the build. 2 | last-change 3 | -------------------------------------------------------------------------------- /vendor/golang.org/x/net/AUTHORS: -------------------------------------------------------------------------------- 1 | # This source code refers to The Go Authors for copyright purposes. 2 | # The master list of authors is in the main Go distribution, 3 | # visible at http://tip.golang.org/AUTHORS. 4 | -------------------------------------------------------------------------------- /vendor/golang.org/x/net/CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # Contributing to Go 2 | 3 | Go is an open source project. 4 | 5 | It is the work of hundreds of contributors. We appreciate your help! 6 | 7 | 8 | ## Filing issues 9 | 10 | When [filing an issue](https://golang.org/issue/new), make sure to answer these five questions: 11 | 12 | 1. What version of Go are you using (`go version`)? 13 | 2. What operating system and processor architecture are you using? 14 | 3. What did you do? 15 | 4. What did you expect to see? 16 | 5. What did you see instead? 17 | 18 | General questions should go to the [golang-nuts mailing list](https://groups.google.com/group/golang-nuts) instead of the issue tracker. 19 | The gophers there will answer or ask you to file an issue if you've tripped over a bug. 20 | 21 | ## Contributing code 22 | 23 | Please read the [Contribution Guidelines](https://golang.org/doc/contribute.html) 24 | before sending patches. 25 | 26 | **We do not accept GitHub pull requests** 27 | (we use [Gerrit](https://code.google.com/p/gerrit/) instead for code review). 28 | 29 | Unless otherwise noted, the Go source files are distributed under 30 | the BSD-style license found in the LICENSE file. 31 | 32 | -------------------------------------------------------------------------------- /vendor/golang.org/x/net/CONTRIBUTORS: -------------------------------------------------------------------------------- 1 | # This source code was written by the Go contributors. 2 | # The master list of contributors is in the main Go distribution, 3 | # visible at http://tip.golang.org/CONTRIBUTORS. 4 | -------------------------------------------------------------------------------- /vendor/golang.org/x/net/README: -------------------------------------------------------------------------------- 1 | This repository holds supplementary Go networking libraries. 2 | 3 | To submit changes to this repository, see http://golang.org/doc/contribute.html. 4 | -------------------------------------------------------------------------------- /vendor/golang.org/x/net/bpf/testdata/all_instructions.bpf: -------------------------------------------------------------------------------- 1 | 50,0 0 0 42,1 0 0 42,96 0 0 3,97 0 0 3,48 0 0 42,40 0 0 42,32 0 0 42,80 0 0 42,72 0 0 42,64 0 0 42,177 0 0 42,128 0 0 0,32 0 0 4294963200,32 0 0 4294963204,32 0 0 4294963256,2 0 0 3,3 0 0 3,4 0 0 42,20 0 0 42,36 0 0 42,52 0 0 42,68 0 0 42,84 0 0 42,100 0 0 42,116 0 0 42,148 0 0 42,164 0 0 42,12 0 0 0,28 0 0 0,44 0 0 0,60 0 0 0,76 0 0 0,92 0 0 0,108 0 0 0,124 0 0 0,156 0 0 0,172 0 0 0,132 0 0 0,5 0 0 10,21 8 9 42,21 0 8 42,53 0 7 42,37 0 6 42,37 4 5 42,53 3 4 42,69 2 3 42,7 0 0 0,135 0 0 0,22 0 0 0,6 0 0 0, 2 | -------------------------------------------------------------------------------- /vendor/golang.org/x/net/bpf/testdata/all_instructions.txt: -------------------------------------------------------------------------------- 1 | # This filter is compiled to all_instructions.bpf by the `bpf_asm` 2 | # tool, which can be found in the linux kernel source tree under 3 | # tools/net. 4 | 5 | # Load immediate 6 | ld #42 7 | ldx #42 8 | 9 | # Load scratch 10 | ld M[3] 11 | ldx M[3] 12 | 13 | # Load absolute 14 | ldb [42] 15 | ldh [42] 16 | ld [42] 17 | 18 | # Load indirect 19 | ldb [x + 42] 20 | ldh [x + 42] 21 | ld [x + 42] 22 | 23 | # Load IPv4 header length 24 | ldx 4*([42]&0xf) 25 | 26 | # Run extension function 27 | ld #len 28 | ld #proto 29 | ld #type 30 | ld #rand 31 | 32 | # Store scratch 33 | st M[3] 34 | stx M[3] 35 | 36 | # A constant 37 | add #42 38 | sub #42 39 | mul #42 40 | div #42 41 | or #42 42 | and #42 43 | lsh #42 44 | rsh #42 45 | mod #42 46 | xor #42 47 | 48 | # A X 49 | add x 50 | sub x 51 | mul x 52 | div x 53 | or x 54 | and x 55 | lsh x 56 | rsh x 57 | mod x 58 | xor x 59 | 60 | # !A 61 | neg 62 | 63 | # Jumps 64 | ja end 65 | jeq #42,prev,end 66 | jne #42,end 67 | jlt #42,end 68 | jle #42,end 69 | jgt #42,prev,end 70 | jge #42,prev,end 71 | jset #42,prev,end 72 | 73 | # Register transfers 74 | tax 75 | txa 76 | 77 | # Returns 78 | prev: ret a 79 | end: ret #42 80 | -------------------------------------------------------------------------------- /vendor/golang.org/x/net/bpf/vm_extension_test.go: -------------------------------------------------------------------------------- 1 | // Copyright 2016 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 bpf_test 6 | 7 | import ( 8 | "testing" 9 | 10 | "golang.org/x/net/bpf" 11 | ) 12 | 13 | func TestVMLoadExtensionNotImplemented(t *testing.T) { 14 | _, _, err := testVM(t, []bpf.Instruction{ 15 | bpf.LoadExtension{ 16 | Num: 100, 17 | }, 18 | bpf.RetA{}, 19 | }) 20 | if errStr(err) != "extension 100 not implemented" { 21 | t.Fatalf("unexpected error: %v", err) 22 | } 23 | } 24 | 25 | func TestVMLoadExtensionExtLen(t *testing.T) { 26 | vm, done, err := testVM(t, []bpf.Instruction{ 27 | bpf.LoadExtension{ 28 | Num: bpf.ExtLen, 29 | }, 30 | bpf.RetA{}, 31 | }) 32 | if err != nil { 33 | t.Fatalf("failed to load BPF program: %v", err) 34 | } 35 | defer done() 36 | 37 | out, err := vm.Run([]byte{ 38 | 0xff, 0xff, 0xff, 0xff, 39 | 0xff, 0xff, 0xff, 0xff, 40 | 0, 1, 2, 3, 41 | }) 42 | if err != nil { 43 | t.Fatalf("unexpected error while running program: %v", err) 44 | } 45 | if want, got := 4, out; want != got { 46 | t.Fatalf("unexpected number of output bytes:\n- want: %d\n- got: %d", 47 | want, got) 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /vendor/golang.org/x/net/codereview.cfg: -------------------------------------------------------------------------------- 1 | issuerepo: golang/go 2 | -------------------------------------------------------------------------------- /vendor/golang.org/x/net/context/ctxhttp/ctxhttp_17_test.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 !plan9,go1.7 6 | 7 | package ctxhttp 8 | 9 | import ( 10 | "io" 11 | "net/http" 12 | "net/http/httptest" 13 | "testing" 14 | 15 | "context" 16 | ) 17 | 18 | func TestGo17Context(t *testing.T) { 19 | ts := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { 20 | io.WriteString(w, "ok") 21 | })) 22 | ctx := context.Background() 23 | resp, err := Get(ctx, http.DefaultClient, ts.URL) 24 | if resp == nil || err != nil { 25 | t.Fatalf("error received from client: %v %v", err, resp) 26 | } 27 | resp.Body.Close() 28 | } 29 | -------------------------------------------------------------------------------- /vendor/golang.org/x/net/context/withtimeout_test.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 | package context_test 6 | 7 | import ( 8 | "fmt" 9 | "time" 10 | 11 | "golang.org/x/net/context" 12 | ) 13 | 14 | func ExampleWithTimeout() { 15 | // Pass a context with a timeout to tell a blocking function that it 16 | // should abandon its work after the timeout elapses. 17 | ctx, _ := context.WithTimeout(context.Background(), 100*time.Millisecond) 18 | select { 19 | case <-time.After(200 * time.Millisecond): 20 | fmt.Println("overslept") 21 | case <-ctx.Done(): 22 | fmt.Println(ctx.Err()) // prints "context deadline exceeded" 23 | } 24 | // Output: 25 | // context deadline exceeded 26 | } 27 | -------------------------------------------------------------------------------- /vendor/golang.org/x/net/html/charset/testdata/README: -------------------------------------------------------------------------------- 1 | These test cases come from 2 | http://www.w3.org/International/tests/repository/html5/the-input-byte-stream/results-basics 3 | 4 | Distributed under both the W3C Test Suite License 5 | (http://www.w3.org/Consortium/Legal/2008/04-testsuite-license) 6 | and the W3C 3-clause BSD License 7 | (http://www.w3.org/Consortium/Legal/2008/03-bsd-license). 8 | To contribute to a W3C Test Suite, see the policies and contribution 9 | forms (http://www.w3.org/2004/10/27-testcases). 10 | -------------------------------------------------------------------------------- /vendor/golang.org/x/net/html/charset/testdata/UTF-16BE-BOM.html: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rancher/convoy/23ae8d0da8fde882c9caa228efc39a38bc99f910/vendor/golang.org/x/net/html/charset/testdata/UTF-16BE-BOM.html -------------------------------------------------------------------------------- /vendor/golang.org/x/net/html/charset/testdata/UTF-16LE-BOM.html: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rancher/convoy/23ae8d0da8fde882c9caa228efc39a38bc99f910/vendor/golang.org/x/net/html/charset/testdata/UTF-16LE-BOM.html -------------------------------------------------------------------------------- /vendor/golang.org/x/net/html/entity_test.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 | package html 6 | 7 | import ( 8 | "testing" 9 | "unicode/utf8" 10 | ) 11 | 12 | func TestEntityLength(t *testing.T) { 13 | // We verify that the length of UTF-8 encoding of each value is <= 1 + len(key). 14 | // The +1 comes from the leading "&". This property implies that the length of 15 | // unescaped text is <= the length of escaped text. 16 | for k, v := range entity { 17 | if 1+len(k) < utf8.RuneLen(v) { 18 | t.Error("escaped entity &" + k + " is shorter than its UTF-8 encoding " + string(v)) 19 | } 20 | if len(k) > longestEntityWithoutSemicolon && k[len(k)-1] != ';' { 21 | t.Errorf("entity name %s is %d characters, but longestEntityWithoutSemicolon=%d", k, len(k), longestEntityWithoutSemicolon) 22 | } 23 | } 24 | for k, v := range entity2 { 25 | if 1+len(k) < utf8.RuneLen(v[0])+utf8.RuneLen(v[1]) { 26 | t.Error("escaped entity &" + k + " is shorter than its UTF-8 encoding " + string(v[0]) + string(v[1])) 27 | } 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /vendor/golang.org/x/net/html/example_test.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 | // This example demonstrates parsing HTML data and walking the resulting tree. 6 | package html_test 7 | 8 | import ( 9 | "fmt" 10 | "log" 11 | "strings" 12 | 13 | "golang.org/x/net/html" 14 | ) 15 | 16 | func ExampleParse() { 17 | s := `

Links:

` 18 | doc, err := html.Parse(strings.NewReader(s)) 19 | if err != nil { 20 | log.Fatal(err) 21 | } 22 | var f func(*html.Node) 23 | f = func(n *html.Node) { 24 | if n.Type == html.ElementNode && n.Data == "a" { 25 | for _, a := range n.Attr { 26 | if a.Key == "href" { 27 | fmt.Println(a.Val) 28 | break 29 | } 30 | } 31 | } 32 | for c := n.FirstChild; c != nil; c = c.NextSibling { 33 | f(c) 34 | } 35 | } 36 | f(doc) 37 | // Output: 38 | // foo 39 | // /bar/baz 40 | } 41 | -------------------------------------------------------------------------------- /vendor/golang.org/x/net/html/testdata/webkit/adoption02.dat: -------------------------------------------------------------------------------- 1 | #data 2 | 12

34 3 | #errors 4 | #document 5 | | 6 | | 7 | | 8 | | 9 | | "1" 10 | | 11 | | "2" 12 | | 13 | |

14 | | 15 | | "3" 16 | | "4" 17 | 18 | #data 19 |

20 | #errors 21 | #document 22 | | 23 | | 24 | | 25 | | 26 | |
27 | | 28 | |