├── .gitignore ├── .travis.yml ├── Gopkg.lock ├── Gopkg.toml ├── LICENSE ├── Makefile ├── README.md ├── api ├── controller │ ├── apiservice.go │ ├── bucket.go │ ├── config.go │ └── object.go ├── middleware │ ├── logging.go │ └── recovery.go ├── rpcserver │ ├── http.go │ └── tcp.go └── service │ ├── bucket.go │ ├── config.go │ └── object.go ├── client ├── client.go └── client.py ├── cmd ├── root.go ├── server.go ├── server_http.go └── version.go ├── conf └── s3.toml ├── main.go ├── pkg ├── s3 │ ├── bucket.go │ ├── object.go │ ├── object_test.go │ ├── parameters.go │ └── session.go ├── swagger │ └── datafile.go └── util │ ├── config.go │ └── file.go ├── proto ├── google │ └── api │ │ ├── annotations.pb.go │ │ ├── annotations.proto │ │ ├── http.pb.go │ │ └── http.proto ├── rpc.pb.go ├── rpc.pb.gw.go ├── rpc.proto ├── rpc.swagger.json ├── rpc_pb2.py └── rpc_pb2_grpc.py ├── swagger-ui ├── favicon-16x16.png ├── favicon-32x32.png ├── index.html ├── oauth2-redirect.html ├── swagger-ui-bundle.js ├── swagger-ui-bundle.js.map ├── swagger-ui-standalone-preset.js ├── swagger-ui-standalone-preset.js.map ├── swagger-ui.css ├── swagger-ui.css.map ├── swagger-ui.js └── swagger-ui.js.map └── vendor ├── github.com ├── elazarl │ └── go-bindata-assetfs │ │ ├── LICENSE │ │ ├── README.md │ │ ├── assetfs.go │ │ └── doc.go ├── golang │ └── protobuf │ │ ├── .github │ │ └── ISSUE_TEMPLATE │ │ │ ├── bug_report.md │ │ │ ├── feature_request.md │ │ │ └── question.md │ │ ├── .gitignore │ │ ├── .travis.yml │ │ ├── AUTHORS │ │ ├── CONTRIBUTORS │ │ ├── LICENSE │ │ ├── Makefile │ │ ├── README.md │ │ ├── conformance │ │ ├── Makefile │ │ ├── conformance.go │ │ ├── conformance.sh │ │ ├── failure_list_go.txt │ │ ├── internal │ │ │ └── conformance_proto │ │ │ │ ├── conformance.pb.go │ │ │ │ └── conformance.proto │ │ └── test.sh │ │ ├── descriptor │ │ ├── descriptor.go │ │ └── descriptor_test.go │ │ ├── jsonpb │ │ ├── jsonpb.go │ │ ├── jsonpb_test.go │ │ └── jsonpb_test_proto │ │ │ ├── more_test_objects.pb.go │ │ │ ├── more_test_objects.proto │ │ │ ├── test_objects.pb.go │ │ │ └── test_objects.proto │ │ ├── proto │ │ ├── all_test.go │ │ ├── any_test.go │ │ ├── clone.go │ │ ├── clone_test.go │ │ ├── decode.go │ │ ├── decode_test.go │ │ ├── discard.go │ │ ├── discard_test.go │ │ ├── encode.go │ │ ├── encode_test.go │ │ ├── equal.go │ │ ├── equal_test.go │ │ ├── extensions.go │ │ ├── extensions_test.go │ │ ├── lib.go │ │ ├── map_test.go │ │ ├── message_set.go │ │ ├── message_set_test.go │ │ ├── pointer_reflect.go │ │ ├── pointer_unsafe.go │ │ ├── properties.go │ │ ├── proto3_proto │ │ │ ├── proto3.pb.go │ │ │ └── proto3.proto │ │ ├── proto3_test.go │ │ ├── size2_test.go │ │ ├── size_test.go │ │ ├── table_marshal.go │ │ ├── table_merge.go │ │ ├── table_unmarshal.go │ │ ├── test_proto │ │ │ ├── test.pb.go │ │ │ └── test.proto │ │ ├── text.go │ │ ├── text_parser.go │ │ ├── text_parser_test.go │ │ └── text_test.go │ │ ├── protoc-gen-go │ │ ├── descriptor │ │ │ ├── descriptor.pb.go │ │ │ └── descriptor.proto │ │ ├── doc.go │ │ ├── generator │ │ │ ├── generator.go │ │ │ ├── internal │ │ │ │ └── remap │ │ │ │ │ ├── remap.go │ │ │ │ │ └── remap_test.go │ │ │ └── name_test.go │ │ ├── golden_test.go │ │ ├── grpc │ │ │ └── grpc.go │ │ ├── link_grpc.go │ │ ├── main.go │ │ ├── plugin │ │ │ ├── plugin.pb.go │ │ │ ├── plugin.pb.golden │ │ │ └── plugin.proto │ │ └── testdata │ │ │ ├── deprecated │ │ │ ├── deprecated.pb.go │ │ │ └── deprecated.proto │ │ │ ├── extension_base │ │ │ ├── extension_base.pb.go │ │ │ └── extension_base.proto │ │ │ ├── extension_extra │ │ │ ├── extension_extra.pb.go │ │ │ └── extension_extra.proto │ │ │ ├── extension_test.go │ │ │ ├── extension_user │ │ │ ├── extension_user.pb.go │ │ │ └── extension_user.proto │ │ │ ├── grpc │ │ │ ├── grpc.pb.go │ │ │ └── grpc.proto │ │ │ ├── import_public │ │ │ ├── a.pb.go │ │ │ ├── a.proto │ │ │ ├── b.pb.go │ │ │ ├── b.proto │ │ │ └── sub │ │ │ │ ├── a.pb.go │ │ │ │ ├── a.proto │ │ │ │ ├── b.pb.go │ │ │ │ └── b.proto │ │ │ ├── import_public_test.go │ │ │ ├── imports │ │ │ ├── fmt │ │ │ │ ├── m.pb.go │ │ │ │ └── m.proto │ │ │ ├── test_a_1 │ │ │ │ ├── m1.pb.go │ │ │ │ ├── m1.proto │ │ │ │ ├── m2.pb.go │ │ │ │ └── m2.proto │ │ │ ├── test_a_2 │ │ │ │ ├── m3.pb.go │ │ │ │ ├── m3.proto │ │ │ │ ├── m4.pb.go │ │ │ │ └── m4.proto │ │ │ ├── test_b_1 │ │ │ │ ├── m1.pb.go │ │ │ │ ├── m1.proto │ │ │ │ ├── m2.pb.go │ │ │ │ └── m2.proto │ │ │ ├── test_import_a1m1.pb.go │ │ │ ├── test_import_a1m1.proto │ │ │ ├── test_import_a1m2.pb.go │ │ │ ├── test_import_a1m2.proto │ │ │ ├── test_import_all.pb.go │ │ │ └── test_import_all.proto │ │ │ ├── main_test.go │ │ │ ├── multi │ │ │ ├── multi1.pb.go │ │ │ ├── multi1.proto │ │ │ ├── multi2.pb.go │ │ │ ├── multi2.proto │ │ │ ├── multi3.pb.go │ │ │ └── multi3.proto │ │ │ ├── my_test │ │ │ ├── test.pb.go │ │ │ └── test.proto │ │ │ └── proto3 │ │ │ ├── proto3.pb.go │ │ │ └── proto3.proto │ │ ├── ptypes │ │ ├── any.go │ │ ├── any │ │ │ ├── any.pb.go │ │ │ └── any.proto │ │ ├── any_test.go │ │ ├── doc.go │ │ ├── duration.go │ │ ├── duration │ │ │ ├── duration.pb.go │ │ │ └── duration.proto │ │ ├── duration_test.go │ │ ├── empty │ │ │ ├── empty.pb.go │ │ │ └── empty.proto │ │ ├── struct │ │ │ ├── struct.pb.go │ │ │ └── struct.proto │ │ ├── timestamp.go │ │ ├── timestamp │ │ │ ├── timestamp.pb.go │ │ │ └── timestamp.proto │ │ ├── timestamp_test.go │ │ └── wrappers │ │ │ ├── wrappers.pb.go │ │ │ └── wrappers.proto │ │ └── regenerate.sh ├── grpc-ecosystem │ └── grpc-gateway │ │ ├── LICENSE.txt │ │ ├── runtime │ │ ├── context.go │ │ ├── convert.go │ │ ├── doc.go │ │ ├── errors.go │ │ ├── handler.go │ │ ├── internal │ │ │ ├── stream_chunk.pb.go │ │ │ └── stream_chunk.proto │ │ ├── marshal_json.go │ │ ├── marshal_jsonpb.go │ │ ├── marshal_proto.go │ │ ├── marshaler.go │ │ ├── marshaler_registry.go │ │ ├── mux.go │ │ ├── pattern.go │ │ ├── proto2_convert.go │ │ ├── proto_errors.go │ │ └── query.go │ │ └── utilities │ │ ├── doc.go │ │ ├── pattern.go │ │ └── trie.go ├── ks3sdklib │ └── aws-sdk-go │ │ ├── .gitignore │ │ ├── .travis.yml │ │ ├── LICENSE.txt │ │ ├── Makefile │ │ ├── NOTICE.txt │ │ ├── README.md │ │ ├── aws │ │ ├── awserr │ │ │ └── error.go │ │ ├── awsutil │ │ │ ├── copy.go │ │ │ ├── copy_test.go │ │ │ ├── path_value.go │ │ │ ├── path_value_test.go │ │ │ └── string_value.go │ │ ├── config.go │ │ ├── config_test.go │ │ ├── credentials │ │ │ ├── chain_provider.go │ │ │ ├── chain_provider_test.go │ │ │ ├── credentials.go │ │ │ ├── credentials_test.go │ │ │ ├── ec2_role_provider.go │ │ │ ├── ec2_role_provider_test.go │ │ │ ├── env_provider.go │ │ │ ├── env_provider_test.go │ │ │ ├── example.ini │ │ │ ├── ini.go │ │ │ ├── shared_credentials_provider.go │ │ │ ├── shared_credentials_provider_test.go │ │ │ ├── static_provider.go │ │ │ └── static_provider_test.go │ │ ├── handler_functions.go │ │ ├── handler_functions_test.go │ │ ├── handlers.go │ │ ├── handlers_test.go │ │ ├── param_validator.go │ │ ├── param_validator_test.go │ │ ├── request.go │ │ ├── request_pagination_test.go │ │ ├── request_test.go │ │ ├── service.go │ │ ├── types.go │ │ └── version.go │ │ ├── internal │ │ ├── apierr │ │ │ └── error.go │ │ ├── endpoints │ │ │ ├── endpoints.go │ │ │ ├── endpoints.json │ │ │ ├── endpoints_map.go │ │ │ └── endpoints_test.go │ │ ├── features │ │ │ ├── autoscaling │ │ │ │ ├── client.feature │ │ │ │ └── client.go │ │ │ ├── cloudformation │ │ │ │ ├── client.feature │ │ │ │ └── client.go │ │ │ ├── cloudfront │ │ │ │ ├── client.feature │ │ │ │ └── client.go │ │ │ ├── cloudhsm │ │ │ │ ├── client.feature │ │ │ │ └── client.go │ │ │ ├── cloudsearch │ │ │ │ ├── client.feature │ │ │ │ └── client.go │ │ │ ├── cloudtrail │ │ │ │ ├── client.feature │ │ │ │ └── client.go │ │ │ ├── cloudwatch │ │ │ │ ├── client.feature │ │ │ │ └── client.go │ │ │ ├── cloudwatchlogs │ │ │ │ ├── client.feature │ │ │ │ └── client.go │ │ │ ├── codedeploy │ │ │ │ ├── client.feature │ │ │ │ └── client.go │ │ │ ├── cognitoidentity │ │ │ │ ├── client.feature │ │ │ │ └── client.go │ │ │ ├── cognitosync │ │ │ │ ├── client.feature │ │ │ │ └── client.go │ │ │ ├── configservice │ │ │ │ ├── client.feature │ │ │ │ └── client.go │ │ │ ├── datapipeline │ │ │ │ ├── client.feature │ │ │ │ └── client.go │ │ │ ├── directconnect │ │ │ │ ├── client.feature │ │ │ │ └── client.go │ │ │ ├── directoryservice │ │ │ │ ├── client.feature │ │ │ │ └── client.go │ │ │ ├── dynamodb │ │ │ │ ├── client.feature │ │ │ │ └── client.go │ │ │ ├── ec2 │ │ │ │ ├── client.feature │ │ │ │ └── client.go │ │ │ ├── efs │ │ │ │ ├── client.feature │ │ │ │ └── client.go │ │ │ ├── elasticache │ │ │ │ ├── client.feature │ │ │ │ └── client.go │ │ │ ├── elasticbeanstalk │ │ │ │ ├── client.feature │ │ │ │ └── client.go │ │ │ ├── elastictranscoder │ │ │ │ ├── client.feature │ │ │ │ └── client.go │ │ │ ├── elb │ │ │ │ ├── client.feature │ │ │ │ └── client.go │ │ │ ├── emr │ │ │ │ ├── client.feature │ │ │ │ └── client.go │ │ │ ├── glacier │ │ │ │ ├── client.feature │ │ │ │ └── client.go │ │ │ ├── iam │ │ │ │ ├── client.feature │ │ │ │ └── client.go │ │ │ ├── kinesis │ │ │ │ ├── client.feature │ │ │ │ └── client.go │ │ │ ├── kms │ │ │ │ ├── client.feature │ │ │ │ └── client.go │ │ │ ├── lambda │ │ │ │ ├── client.feature │ │ │ │ └── client.go │ │ │ ├── machinelearning │ │ │ │ ├── client.feature │ │ │ │ └── client.go │ │ │ ├── opsworks │ │ │ │ ├── client.feature │ │ │ │ └── client.go │ │ │ ├── rds │ │ │ │ ├── client.feature │ │ │ │ └── client.go │ │ │ ├── redshift │ │ │ │ ├── client.feature │ │ │ │ └── client.go │ │ │ ├── route53 │ │ │ │ ├── client.feature │ │ │ │ └── client.go │ │ │ ├── route53domains │ │ │ │ ├── client.feature │ │ │ │ └── client.go │ │ │ ├── ses │ │ │ │ ├── client.feature │ │ │ │ └── client.go │ │ │ ├── shared │ │ │ │ └── shared.go │ │ │ ├── sns │ │ │ │ ├── client.feature │ │ │ │ └── client.go │ │ │ ├── sqs │ │ │ │ ├── client.feature │ │ │ │ └── client.go │ │ │ ├── ssm │ │ │ │ ├── client.feature │ │ │ │ └── client.go │ │ │ ├── storagegateway │ │ │ │ ├── client.feature │ │ │ │ └── client.go │ │ │ ├── sts │ │ │ │ ├── client.feature │ │ │ │ └── client.go │ │ │ ├── swf │ │ │ │ ├── client.feature │ │ │ │ └── client.go │ │ │ └── workspaces │ │ │ │ ├── client.feature │ │ │ │ └── client.go │ │ ├── fixtures │ │ │ ├── helpers │ │ │ │ └── param_filler.go │ │ │ └── protocol │ │ │ │ ├── generate.go │ │ │ │ ├── input │ │ │ │ ├── ec2.json │ │ │ │ ├── json.json │ │ │ │ ├── query.json │ │ │ │ ├── rest-json.json │ │ │ │ └── rest-xml.json │ │ │ │ └── output │ │ │ │ ├── ec2.json │ │ │ │ ├── json.json │ │ │ │ ├── query.json │ │ │ │ ├── rest-json.json │ │ │ │ └── rest-xml.json │ │ ├── model │ │ │ ├── api │ │ │ │ ├── api.go │ │ │ │ ├── api_test.go │ │ │ │ ├── customization_passes.go │ │ │ │ ├── docstring.go │ │ │ │ ├── exportable_name.go │ │ │ │ ├── inflections.csv │ │ │ │ ├── load.go │ │ │ │ ├── load_test.go │ │ │ │ ├── operation.go │ │ │ │ ├── pagination.go │ │ │ │ ├── passes.go │ │ │ │ └── shape.go │ │ │ ├── cli │ │ │ │ ├── api-info │ │ │ │ │ └── api-info.go │ │ │ │ ├── gen-api │ │ │ │ │ └── main.go │ │ │ │ └── gen-endpoints │ │ │ │ │ └── main.go │ │ │ └── endpoints.go │ │ ├── protocol │ │ │ ├── ec2query │ │ │ │ ├── build.go │ │ │ │ ├── build_test.go │ │ │ │ ├── unmarshal.go │ │ │ │ └── unmarshal_test.go │ │ │ ├── json │ │ │ │ └── jsonutil │ │ │ │ │ ├── build.go │ │ │ │ │ ├── build_test.go │ │ │ │ │ └── unmarshal.go │ │ │ ├── jsonrpc │ │ │ │ ├── build_test.go │ │ │ │ ├── jsonrpc.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 │ │ │ ├── restjson │ │ │ │ ├── build_test.go │ │ │ │ ├── restjson.go │ │ │ │ └── unmarshal_test.go │ │ │ ├── restxml │ │ │ │ ├── build_test.go │ │ │ │ ├── restxml.go │ │ │ │ └── unmarshal_test.go │ │ │ └── xml │ │ │ │ └── xmlutil │ │ │ │ ├── build.go │ │ │ │ ├── unmarshal.go │ │ │ │ └── xml_to_struct.go │ │ ├── signer │ │ │ ├── v2 │ │ │ │ └── v2.go │ │ │ └── v4 │ │ │ │ ├── functional_test.go │ │ │ │ ├── v4.go │ │ │ │ └── v4_test.go │ │ ├── test │ │ │ ├── integration │ │ │ │ ├── integration.go │ │ │ │ └── s3 │ │ │ │ │ ├── integration_test.go │ │ │ │ │ ├── s3manager │ │ │ │ │ ├── integration_test.go │ │ │ │ │ └── stub.go │ │ │ │ │ └── stub.go │ │ │ └── unit │ │ │ │ └── unit.go │ │ └── util │ │ │ ├── util.go │ │ │ ├── utilassert │ │ │ └── utilassert.go │ │ │ └── utilsort │ │ │ └── utilsort.go │ │ ├── sdk.go │ │ ├── service │ │ ├── generate.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 │ │ │ ├── s3iface │ │ │ ├── interface.go │ │ │ └── interface_test.go │ │ │ ├── s3manager │ │ │ ├── download.go │ │ │ ├── download_test.go │ │ │ ├── upload.go │ │ │ └── upload_test.go │ │ │ ├── service.go │ │ │ ├── sse.go │ │ │ ├── sse_test.go │ │ │ ├── unmarshal_error.go │ │ │ └── unmarshal_error_test.go │ │ └── test │ │ ├── ks3_test.go │ │ └── test.go ├── lxlxw │ └── toml │ │ ├── .gitignore │ │ ├── .travis.yml │ │ ├── COMPATIBLE │ │ ├── COPYING │ │ ├── Makefile │ │ ├── README.md │ │ ├── _examples │ │ ├── example.go │ │ ├── example.toml │ │ ├── hard.toml │ │ ├── implicit.toml │ │ ├── invalid-apples.toml │ │ ├── invalid.toml │ │ ├── readme1.toml │ │ └── readme2.toml │ │ ├── cmd │ │ ├── toml-test-decoder │ │ │ ├── COPYING │ │ │ ├── README.md │ │ │ └── main.go │ │ ├── toml-test-encoder │ │ │ ├── COPYING │ │ │ ├── README.md │ │ │ └── main.go │ │ └── tomlv │ │ │ ├── COPYING │ │ │ ├── README.md │ │ │ └── main.go │ │ ├── decode.go │ │ ├── decode_meta.go │ │ ├── decode_test.go │ │ ├── doc.go │ │ ├── encode.go │ │ ├── encode_test.go │ │ ├── encoding_types.go │ │ ├── encoding_types_1.1.go │ │ ├── lex.go │ │ ├── parse.go │ │ ├── session.vim │ │ ├── type_check.go │ │ └── type_fields.go ├── spf13 │ ├── cobra │ │ ├── LICENSE.txt │ │ ├── README.md │ │ ├── args.go │ │ ├── bash_completions.go │ │ ├── bash_completions.md │ │ ├── cobra.go │ │ ├── command.go │ │ ├── command_notwin.go │ │ ├── command_win.go │ │ └── zsh_completions.go │ └── pflag │ │ ├── LICENSE │ │ ├── README.md │ │ ├── bool.go │ │ ├── bool_slice.go │ │ ├── count.go │ │ ├── duration.go │ │ ├── duration_slice.go │ │ ├── flag.go │ │ ├── float32.go │ │ ├── float64.go │ │ ├── golangflag.go │ │ ├── int.go │ │ ├── int16.go │ │ ├── int32.go │ │ ├── int64.go │ │ ├── int8.go │ │ ├── int_slice.go │ │ ├── ip.go │ │ ├── ip_slice.go │ │ ├── ipmask.go │ │ ├── ipnet.go │ │ ├── string.go │ │ ├── string_array.go │ │ ├── string_slice.go │ │ ├── uint.go │ │ ├── uint16.go │ │ ├── uint32.go │ │ ├── uint64.go │ │ ├── uint8.go │ │ └── uint_slice.go └── wothing │ └── log │ ├── .gitignore │ ├── README.md │ ├── ctxlog.go │ ├── logext.go │ ├── logext_test.go │ ├── tlog.go │ ├── tracelog.go │ ├── util.go │ └── util_test.go ├── golang.org └── x │ ├── net │ ├── LICENSE │ ├── PATENTS │ ├── context │ │ ├── context.go │ │ ├── go17.go │ │ ├── go19.go │ │ ├── pre_go17.go │ │ └── pre_go19.go │ ├── http2 │ │ ├── Dockerfile │ │ ├── Makefile │ │ ├── README │ │ ├── ciphers.go │ │ ├── client_conn_pool.go │ │ ├── configure_transport.go │ │ ├── databuffer.go │ │ ├── errors.go │ │ ├── flow.go │ │ ├── frame.go │ │ ├── go16.go │ │ ├── go17.go │ │ ├── go17_not18.go │ │ ├── go18.go │ │ ├── go19.go │ │ ├── gotrack.go │ │ ├── headermap.go │ │ ├── hpack │ │ │ ├── encode.go │ │ │ ├── hpack.go │ │ │ ├── huffman.go │ │ │ └── tables.go │ │ ├── http2.go │ │ ├── not_go16.go │ │ ├── not_go17.go │ │ ├── not_go18.go │ │ ├── not_go19.go │ │ ├── pipe.go │ │ ├── server.go │ │ ├── transport.go │ │ ├── write.go │ │ ├── writesched.go │ │ ├── writesched_priority.go │ │ └── writesched_random.go │ ├── idna │ │ ├── idna.go │ │ ├── punycode.go │ │ ├── tables.go │ │ ├── trie.go │ │ └── trieval.go │ ├── internal │ │ └── timeseries │ │ │ └── timeseries.go │ ├── lex │ │ └── httplex │ │ │ └── httplex.go │ └── trace │ │ ├── events.go │ │ ├── histogram.go │ │ ├── trace.go │ │ ├── trace_go16.go │ │ └── trace_go17.go │ └── text │ ├── LICENSE │ ├── PATENTS │ ├── secure │ └── bidirule │ │ ├── bidirule.go │ │ ├── bidirule10.0.0.go │ │ └── bidirule9.0.0.go │ ├── transform │ └── transform.go │ └── unicode │ ├── bidi │ ├── bidi.go │ ├── bracket.go │ ├── core.go │ ├── gen.go │ ├── gen_ranges.go │ ├── gen_trieval.go │ ├── prop.go │ ├── tables10.0.0.go │ ├── tables9.0.0.go │ └── trieval.go │ └── norm │ ├── composition.go │ ├── forminfo.go │ ├── input.go │ ├── iter.go │ ├── maketables.go │ ├── normalize.go │ ├── readwriter.go │ ├── tables10.0.0.go │ ├── tables9.0.0.go │ ├── transform.go │ ├── trie.go │ └── triegen.go └── google.golang.org ├── genproto ├── LICENSE └── googleapis │ └── rpc │ └── status │ └── status.pb.go └── grpc ├── .github └── ISSUE_TEMPLATE ├── .please-update ├── .travis.yml ├── AUTHORS ├── CONTRIBUTING.md ├── Documentation ├── gomock-example.md ├── grpc-auth-support.md ├── grpc-metadata.md ├── server-reflection-tutorial.md └── versioning.md ├── LICENSE ├── Makefile ├── README.md ├── backoff.go ├── backoff_test.go ├── balancer.go ├── balancer ├── balancer.go └── roundrobin │ ├── roundrobin.go │ └── roundrobin_test.go ├── balancer_conn_wrappers.go ├── balancer_switching_test.go ├── balancer_test.go ├── balancer_v1_wrapper.go ├── benchmark ├── benchmain │ └── main.go ├── benchmark.go ├── benchmark16_test.go ├── benchmark17_test.go ├── benchresult │ └── main.go ├── client │ └── main.go ├── grpc_testing │ ├── control.pb.go │ ├── control.proto │ ├── messages.pb.go │ ├── messages.proto │ ├── payloads.pb.go │ ├── payloads.proto │ ├── services.pb.go │ ├── services.proto │ ├── stats.pb.go │ └── stats.proto ├── latency │ ├── latency.go │ └── latency_test.go ├── primitives │ └── primitives_test.go ├── server │ └── main.go ├── stats │ ├── histogram.go │ ├── stats.go │ └── util.go └── worker │ ├── benchmark_client.go │ ├── benchmark_server.go │ ├── main.go │ └── util.go ├── call.go ├── call_test.go ├── clientconn.go ├── clientconn_test.go ├── codec.go ├── codec_benchmark_test.go ├── codec_test.go ├── codegen.sh ├── codes ├── code_string.go └── codes.go ├── connectivity └── connectivity.go ├── credentials ├── credentials.go ├── credentials_test.go ├── credentials_util_go17.go ├── credentials_util_go18.go ├── credentials_util_pre_go17.go └── oauth │ └── oauth.go ├── doc.go ├── examples ├── README.md ├── gotutorial.md ├── helloworld │ ├── greeter_client │ │ └── main.go │ ├── greeter_server │ │ └── main.go │ ├── helloworld │ │ ├── helloworld.pb.go │ │ └── helloworld.proto │ └── mock_helloworld │ │ ├── hw_mock.go │ │ └── hw_mock_test.go └── route_guide │ ├── README.md │ ├── client │ └── client.go │ ├── mock_routeguide │ ├── rg_mock.go │ └── rg_mock_test.go │ ├── routeguide │ ├── route_guide.pb.go │ └── route_guide.proto │ ├── server │ └── server.go │ └── testdata │ └── route_guide_db.json ├── go16.go ├── go17.go ├── grpclb.go ├── grpclb ├── grpc_lb_v1 │ ├── messages │ │ ├── messages.pb.go │ │ └── messages.proto │ └── service │ │ ├── service.pb.go │ │ └── service.proto └── grpclb_test.go ├── grpclog ├── glogger │ └── glogger.go ├── grpclog.go ├── logger.go ├── loggerv2.go └── loggerv2_test.go ├── health ├── grpc_health_v1 │ ├── health.pb.go │ └── health.proto └── health.go ├── interceptor.go ├── internal └── internal.go ├── interop ├── client │ └── client.go ├── grpc_testing │ ├── test.pb.go │ └── test.proto ├── http2 │ └── negative_http2_client.go ├── server │ └── server.go └── test_utils.go ├── keepalive └── keepalive.go ├── metadata ├── metadata.go └── metadata_test.go ├── naming ├── dns_resolver.go ├── dns_resolver_test.go ├── go17.go ├── go17_test.go ├── go18.go ├── go18_test.go └── naming.go ├── peer └── peer.go ├── picker_wrapper.go ├── picker_wrapper_test.go ├── pickfirst.go ├── pickfirst_test.go ├── proxy.go ├── proxy_test.go ├── reflection ├── README.md ├── grpc_reflection_v1alpha │ ├── reflection.pb.go │ └── reflection.proto ├── grpc_testing │ ├── proto2.pb.go │ ├── proto2.proto │ ├── proto2_ext.pb.go │ ├── proto2_ext.proto │ ├── proto2_ext2.pb.go │ ├── proto2_ext2.proto │ ├── test.pb.go │ └── test.proto ├── grpc_testingv3 │ ├── testv3.pb.go │ └── testv3.proto ├── serverreflection.go └── serverreflection_test.go ├── resolver ├── dns │ ├── dns_resolver.go │ ├── dns_resolver_test.go │ ├── go17.go │ ├── go17_test.go │ ├── go18.go │ └── go18_test.go ├── manual │ └── manual.go ├── passthrough │ └── passthrough.go └── resolver.go ├── resolver_conn_wrapper.go ├── resolver_conn_wrapper_test.go ├── rpc_util.go ├── rpc_util_test.go ├── server.go ├── server_test.go ├── service_config.go ├── service_config_test.go ├── stats ├── grpc_testing │ ├── test.pb.go │ └── test.proto ├── handlers.go ├── stats.go └── stats_test.go ├── status ├── status.go └── status_test.go ├── stream.go ├── stress ├── client │ └── main.go ├── grpc_testing │ ├── metrics.pb.go │ └── metrics.proto └── metrics_client │ └── main.go ├── tap └── tap.go ├── test ├── bufconn │ ├── bufconn.go │ └── bufconn_test.go ├── codec_perf │ ├── perf.pb.go │ └── perf.proto ├── end2end_test.go ├── grpc_testing │ ├── test.pb.go │ └── test.proto ├── leakcheck │ ├── leakcheck.go │ └── leakcheck_test.go ├── race.go └── servertester.go ├── testdata ├── ca.pem ├── server1.key ├── server1.pem └── testdata.go ├── trace.go ├── transport ├── bdp_estimator.go ├── control.go ├── go16.go ├── go17.go ├── handler_server.go ├── handler_server_test.go ├── http2_client.go ├── http2_server.go ├── http_util.go ├── http_util_test.go ├── log.go ├── transport.go └── transport_test.go └── vet.sh /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | 3 | *.exe 4 | *.zip 5 | *.bak 6 | 7 | # ====> Sublime Text 8 | # Sublime Text Project and Workspace Files 9 | *.sublime-workspace 10 | *.sublime-project 11 | 12 | # ====> VS Code 13 | # VS Code Config Files 14 | .vscode/ 15 | 16 | # log files for monitoring or debugging 17 | *.log -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | sudo: false 2 | language: go 3 | 4 | go: 5 | - 1.10.x 6 | 7 | install: 8 | - make 9 | 10 | # script: 11 | # - make test -------------------------------------------------------------------------------- /Gopkg.toml: -------------------------------------------------------------------------------- 1 | # Gopkg.toml example 2 | # 3 | # Refer to https://golang.github.io/dep/docs/Gopkg.toml.html 4 | # for detailed Gopkg.toml documentation. 5 | # 6 | # required = ["github.com/user/thing/cmd/thing"] 7 | # ignored = ["github.com/user/project/pkgX", "bitbucket.org/user/project/pkgA/pkgY"] 8 | # 9 | # [[constraint]] 10 | # name = "github.com/user/project" 11 | # version = "1.0.0" 12 | # 13 | # [[constraint]] 14 | # name = "github.com/user/project2" 15 | # branch = "dev" 16 | # source = "github.com/myfork/project2" 17 | # 18 | # [[override]] 19 | # name = "github.com/x/y" 20 | # version = "2.4.0" 21 | # 22 | # [prune] 23 | # non-go = false 24 | # go-tests = true 25 | # unused-packages = true 26 | 27 | 28 | [[constraint]] 29 | branch = "master" 30 | name = "github.com/ks3sdklib/aws-sdk-go" 31 | 32 | [[constraint]] 33 | name = "github.com/elazarl/go-bindata-assetfs" 34 | version = "1.0.0" 35 | 36 | [[constraint]] 37 | name = "github.com/golang/protobuf" 38 | version = "1.2.0" 39 | 40 | [[constraint]] 41 | name = "github.com/grpc-ecosystem/grpc-gateway" 42 | version = "1.5.1" 43 | 44 | [[constraint]] 45 | name = "github.com/lxlxw/toml" 46 | version = "0.3.1" 47 | 48 | [[constraint]] 49 | name = "github.com/spf13/cobra" 50 | version = "0.0.3" 51 | 52 | [[constraint]] 53 | branch = "master" 54 | name = "github.com/wothing/log" 55 | 56 | [[constraint]] 57 | branch = "master" 58 | name = "golang.org/x/net" 59 | 60 | [[constraint]] 61 | name = "google.golang.org/grpc" 62 | version = "1.17.0" 63 | 64 | [prune] 65 | go-tests = true 66 | unused-packages = true 67 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) The grpc-hello-world Authors 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 | -------------------------------------------------------------------------------- /api/controller/apiservice.go: -------------------------------------------------------------------------------- 1 | package controller 2 | 3 | // Creates a Controller Service. 4 | type ApiService struct { 5 | } 6 | -------------------------------------------------------------------------------- /api/controller/bucket.go: -------------------------------------------------------------------------------- 1 | package controller 2 | 3 | import ( 4 | "golang.org/x/net/context" 5 | 6 | "github.com/lxlxw/s3-micro/api/service" 7 | 8 | pb "github.com/lxlxw/s3-micro/proto" 9 | ) 10 | 11 | // Creates a new S3 bucket. 12 | func (h ApiService) CreateBucket(ctx context.Context, r *pb.CreateBucketRequest) (*pb.CreateBucketResponse, error) { 13 | res := service.CreateBucket(r) 14 | return &res, nil 15 | } 16 | 17 | func (h ApiService) DeleteBucket(ctx context.Context, r *pb.DeleteBucketRequest) (*pb.DeleteBucketResponse, error) { 18 | res := service.DeleteBucket(r) 19 | return &res, nil 20 | } 21 | 22 | func (h ApiService) ListBucket(ctx context.Context, r *pb.ListBucketRequest) (*pb.ListBucketResponse, error) { 23 | res := service.ListBucket(r) 24 | return &res, nil 25 | } 26 | -------------------------------------------------------------------------------- /api/controller/config.go: -------------------------------------------------------------------------------- 1 | package controller 2 | 3 | import ( 4 | "golang.org/x/net/context" 5 | 6 | "github.com/lxlxw/s3-micro/api/service" 7 | 8 | pb "github.com/lxlxw/s3-micro/proto" 9 | ) 10 | 11 | // Updates S3 config info. 12 | func (h ApiService) UpdateConfigStoreInfo(ctx context.Context, r *pb.UpdateConfigStoreInfoRequest) (*pb.UpdateConfigStoreInfoResponse, error) { 13 | res := service.UpdateConfigStoreInfo(r) 14 | return &res, nil 15 | } 16 | 17 | // Gets S3 config info. 18 | func (h ApiService) GetConfigStoreInfo(ctx context.Context, r *pb.GetConfigStoreInfoRequest) (*pb.GetConfigStoreInfoResponse, error) { 19 | res := service.GetConfigStoreInfo(r) 20 | return &res, nil 21 | } 22 | -------------------------------------------------------------------------------- /api/controller/object.go: -------------------------------------------------------------------------------- 1 | package controller 2 | 3 | import ( 4 | "golang.org/x/net/context" 5 | 6 | "github.com/lxlxw/s3-micro/api/service" 7 | 8 | pb "github.com/lxlxw/s3-micro/proto" 9 | ) 10 | 11 | // Puts S3 object. 12 | func (h ApiService) PutObject(ctx context.Context, r *pb.PutObjectRequest) (*pb.PutObjectResponse, error) { 13 | res := service.PutObject(r) 14 | return &res, nil 15 | } 16 | 17 | // Gets S3 object. 18 | func (h ApiService) GetObject(ctx context.Context, r *pb.GetObjectRequest) (*pb.GetObjectResponse, error) { 19 | res := service.GetObject(r) 20 | return &res, nil 21 | } 22 | 23 | // Gets S3 object presigned url. 24 | func (h ApiService) GetObjectPresignedUrl(ctx context.Context, r *pb.GetObjectPresignedUrlRequest) (*pb.GetObjectPresignedUrlResponse, error) { 25 | res := service.GetObjectPresignedUrl(r) 26 | return &res, nil 27 | } 28 | 29 | // Puts S3 object presigned url. 30 | func (h ApiService) PutObjectPresignedUrl(ctx context.Context, r *pb.PutObjectPresignedUrlRequest) (*pb.PutObjectPresignedUrlResponse, error) { 31 | res := service.PutObjectPresignedUrl(r) 32 | return &res, nil 33 | } 34 | -------------------------------------------------------------------------------- /api/middleware/logging.go: -------------------------------------------------------------------------------- 1 | package middleware 2 | 3 | import ( 4 | "bytes" 5 | "fmt" 6 | "reflect" 7 | "time" 8 | 9 | "github.com/golang/protobuf/jsonpb" 10 | "github.com/golang/protobuf/proto" 11 | "github.com/wothing/log" 12 | "golang.org/x/net/context" 13 | "google.golang.org/grpc" 14 | ) 15 | 16 | var ( 17 | js = &jsonpb.Marshaler{EnumsAsInts: true, EmitDefaults: true, OrigName: true} 18 | ) 19 | 20 | // Logging interceptor. 21 | func Logging(ctx context.Context, req interface{}, info *grpc.UnaryServerInfo, handler grpc.UnaryHandler) (resp interface{}, err error) { 22 | start := time.Now() 23 | 24 | log.CtxInfof(ctx, "calling %s, req=%s", info.FullMethod, marshal(req)) 25 | resp, err = handler(ctx, req) 26 | log.CtxInfof(ctx, "finished %s, took=%v, resp=%v, err=%v", info.FullMethod, time.Since(start), resp, err) 27 | 28 | return resp, err 29 | } 30 | 31 | func marshal(x interface{}) string { 32 | if x == nil || reflect.ValueOf(x).IsNil() { 33 | return fmt.Sprintf("") 34 | } 35 | 36 | pb, ok := x.(proto.Message) 37 | if !ok { 38 | return fmt.Sprintf("Marshal to json error: not a proto message") 39 | } 40 | 41 | var buf bytes.Buffer 42 | if err := js.Marshal(&buf, pb); err != nil { 43 | return fmt.Sprintf("Marshal to json error: %s", err.Error()) 44 | } 45 | return buf.String() 46 | } 47 | -------------------------------------------------------------------------------- /api/middleware/recovery.go: -------------------------------------------------------------------------------- 1 | package middleware 2 | 3 | import ( 4 | "runtime" 5 | 6 | "github.com/wothing/log" 7 | "golang.org/x/net/context" 8 | "google.golang.org/grpc" 9 | "google.golang.org/grpc/codes" 10 | ) 11 | 12 | const ( 13 | MAXSTACKSIZE = 4096 14 | ) 15 | 16 | // Recovery interceptor to handle grpc panic. 17 | func Recovery(ctx context.Context, req interface{}, info *grpc.UnaryServerInfo, handler grpc.UnaryHandler) (resp interface{}, err error) { 18 | // recovery func 19 | defer func() { 20 | if r := recover(); r != nil { 21 | // log stack 22 | stack := make([]byte, MAXSTACKSIZE) 23 | stack = stack[:runtime.Stack(stack, false)] 24 | log.CtxErrorf(ctx, "panic grpc invoke: %s, err=%v, stack:\n%s", info.FullMethod, r, string(stack)) 25 | 26 | err = grpc.Errorf(codes.Internal, "panic error: %v", r) 27 | } 28 | }() 29 | 30 | return handler(ctx, req) 31 | } 32 | -------------------------------------------------------------------------------- /api/service/bucket.go: -------------------------------------------------------------------------------- 1 | package service 2 | 3 | import ( 4 | "github.com/lxlxw/s3-micro/pkg/s3" 5 | 6 | pb "github.com/lxlxw/s3-micro/proto" 7 | ) 8 | 9 | // Creates s3 bucket 10 | func CreateBucket(r *pb.CreateBucketRequest) pb.CreateBucketResponse { 11 | 12 | client, _ := s3.New() 13 | 14 | err := client.CreateBucket(r.Bucketname, r.Publicread) 15 | if err != nil { 16 | return pb.CreateBucketResponse{Msg: err.Error(), Code: 403} 17 | } 18 | return pb.CreateBucketResponse{Msg: "success", Code: 200, Data: ""} 19 | } 20 | 21 | // Delete s3 bucket 22 | func DeleteBucket(r *pb.DeleteBucketRequest) pb.DeleteBucketResponse { 23 | 24 | client, _ := s3.New() 25 | 26 | err := client.DeleteBucket(r.Bucketname) 27 | if err != nil { 28 | return pb.DeleteBucketResponse{Msg: err.Error(), Code: 403} 29 | } 30 | return pb.DeleteBucketResponse{Msg: "success", Code: 200, Data: ""} 31 | } 32 | 33 | // List s3 bucket 34 | func ListBucket(r *pb.ListBucketRequest) pb.ListBucketResponse { 35 | 36 | client, _ := s3.New() 37 | 38 | res, err := client.ListBucket() 39 | if err != nil { 40 | return pb.ListBucketResponse{Msg: err.Error(), Code: 403} 41 | } 42 | 43 | bucketList := res.Buckets 44 | ListBucket := &pb.ListBucket{} 45 | for i := 0; i < len(bucketList); i++ { 46 | Bucket := *bucketList[i].Name 47 | ListBucket.Bucket = append(ListBucket.Bucket, Bucket) 48 | } 49 | return pb.ListBucketResponse{Msg: "success", Code: 200, Data: ListBucket} 50 | } 51 | -------------------------------------------------------------------------------- /api/service/config.go: -------------------------------------------------------------------------------- 1 | package service 2 | 3 | import ( 4 | "github.com/lxlxw/s3-micro/pkg/s3" 5 | "github.com/lxlxw/s3-micro/pkg/util" 6 | pb "github.com/lxlxw/s3-micro/proto" 7 | ) 8 | 9 | // Updates s3 config info 10 | func UpdateConfigStoreInfo(r *pb.UpdateConfigStoreInfoRequest) pb.UpdateConfigStoreInfoResponse { 11 | 12 | s3Conf := util.Config{ 13 | S3: util.S3Config{ 14 | AccessKey: r.Accesskey, 15 | Secretkey: r.Secretkey, 16 | Region: r.Region, 17 | Endpoint: r.Domain, 18 | }, 19 | } 20 | 21 | fileString, err := util.EncodeConfig(&s3Conf) 22 | if err != nil { 23 | return pb.UpdateConfigStoreInfoResponse{Msg: err.Error(), Code: 403} 24 | } 25 | fileErr := util.UpdateConfigFile(fileString, s3.S3_CONF_FILENNAME) 26 | if fileErr != nil { 27 | return pb.UpdateConfigStoreInfoResponse{Msg: err.Error(), Code: 403} 28 | } 29 | return pb.UpdateConfigStoreInfoResponse{Msg: "success", Code: 200, Data: ""} 30 | } 31 | 32 | // Gets s3 config info 33 | func GetConfigStoreInfo(r *pb.GetConfigStoreInfoRequest) pb.GetConfigStoreInfoResponse { 34 | conf := s3.GetS3Conf() 35 | 36 | confInfo := &pb.ConfigInfo{ 37 | Accesskey: conf.AccessKey, 38 | Secretkey: conf.Secretkey, 39 | Region: conf.Region, 40 | Endpoint: conf.Endpoint, 41 | } 42 | return pb.GetConfigStoreInfoResponse{Msg: "success", Code: 200, Data: confInfo} 43 | } 44 | -------------------------------------------------------------------------------- /client/client.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "log" 5 | 6 | "golang.org/x/net/context" 7 | "google.golang.org/grpc" 8 | 9 | pb "github.com/lxlxw/s3-micro/proto" 10 | ) 11 | 12 | func main() { 13 | 14 | // conn 15 | conn, err := grpc.Dial(":50052", grpc.WithInsecure()) 16 | if err != nil { 17 | log.Println(err) 18 | } 19 | defer conn.Close() 20 | 21 | // new client 22 | c := pb.NewStoreApiServiceClient(conn) 23 | 24 | // call method 25 | req := &pb.GetConfigStoreInfoRequest{Store: "ks3"} 26 | res, err := c.GetConfigStoreInfo(context.Background(), req) 27 | 28 | if err != nil { 29 | log.Println(err) 30 | } 31 | 32 | log.Println(res.Data) 33 | 34 | } 35 | -------------------------------------------------------------------------------- /client/client.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/python 2 | 3 | from __future__ import print_function 4 | 5 | import grpc 6 | 7 | import rpc_pb2 8 | import rpc_pb2_grpc 9 | 10 | 11 | def conn(): 12 | conn = grpc.insecure_channel('127.0.0.1:50052') 13 | return rpc_pb2_grpc.StoreApiServiceStub(channel=conn) 14 | 15 | def get_config(client): 16 | response = client.GetConfigStoreInfo(rpc_pb2.GetConfigStoreInfoRequest(store='ks3')) 17 | return response 18 | 19 | if __name__ == '__main__': 20 | client = conn() 21 | 22 | # get config 23 | resConf = get_config(client) 24 | print(resConf) 25 | 26 | -------------------------------------------------------------------------------- /cmd/root.go: -------------------------------------------------------------------------------- 1 | package cmd 2 | 3 | import ( 4 | "fmt" 5 | "os" 6 | 7 | "github.com/spf13/cobra" 8 | ) 9 | 10 | var rootCmd = &cobra.Command{ 11 | Use: "grpc", 12 | Short: "Run the server for S3 microservice", 13 | } 14 | 15 | // Root cmd 16 | func Execute() { 17 | if err := rootCmd.Execute(); err != nil { 18 | fmt.Println(err) 19 | os.Exit(-1) 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /cmd/server.go: -------------------------------------------------------------------------------- 1 | package cmd 2 | 3 | import ( 4 | "log" 5 | 6 | "github.com/spf13/cobra" 7 | 8 | "github.com/lxlxw/s3-micro/api/rpcserver" 9 | ) 10 | 11 | var serverCmd = &cobra.Command{ 12 | Use: "server", 13 | Short: "Run the gRPC for S3 microservice", 14 | Run: func(cmd *cobra.Command, args []string) { 15 | defer func() { 16 | if err := recover(); err != nil { 17 | log.Println("Recover error : %v", err) 18 | } 19 | }() 20 | 21 | rpcserver.RunServer() 22 | }, 23 | } 24 | 25 | func init() { 26 | serverCmd.Flags().StringVarP(&rpcserver.ServerPort, "port", "p", "50052", "server port") 27 | rootCmd.AddCommand(serverCmd) 28 | } 29 | -------------------------------------------------------------------------------- /cmd/server_http.go: -------------------------------------------------------------------------------- 1 | package cmd 2 | 3 | import ( 4 | "log" 5 | 6 | "github.com/lxlxw/s3-micro/api/rpcserver" 7 | 8 | "github.com/spf13/cobra" 9 | ) 10 | 11 | var serverHttpCmd = &cobra.Command{ 12 | Use: "http", 13 | Short: "Run the httpserver for S3 microservice", 14 | Run: func(cmd *cobra.Command, args []string) { 15 | defer func() { 16 | if err := recover(); err != nil { 17 | log.Println("Recover error : %v", err) 18 | } 19 | }() 20 | 21 | rpcserver.RunHttpServer() 22 | }, 23 | } 24 | 25 | func init() { 26 | serverHttpCmd.Flags().StringVarP(&rpcserver.ServerPort, "server-port", "p", "50052", "server port") 27 | serverHttpCmd.Flags().StringVarP(&rpcserver.ServerHttpPort, "http-port", "u", "8088", "http server port") 28 | 29 | rootCmd.AddCommand(serverHttpCmd) 30 | } 31 | -------------------------------------------------------------------------------- /cmd/version.go: -------------------------------------------------------------------------------- 1 | package cmd 2 | 3 | import ( 4 | "fmt" 5 | 6 | "github.com/spf13/cobra" 7 | ) 8 | 9 | var Version = "v1.0.1" 10 | 11 | func ShowVersion() { 12 | fmt.Printf("s3 microservice version: %s\n", Version) 13 | } 14 | 15 | var versionCmd = &cobra.Command{ 16 | Use: "version", 17 | Short: "Print the version of s3 microservice", 18 | Run: func(cmd *cobra.Command, args []string) { 19 | ShowVersion() 20 | }, 21 | } 22 | 23 | func init() { 24 | rootCmd.AddCommand(versionCmd) 25 | } 26 | -------------------------------------------------------------------------------- /conf/s3.toml: -------------------------------------------------------------------------------- 1 | [S3] 2 | accesskey = "AKIAJCWZ4372EFTEW6ZA" 3 | secretkey = "xxxx" 4 | region = "us-east-1" 5 | endpoint = "s3.amazonaws.com" -------------------------------------------------------------------------------- /main.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "runtime" 5 | 6 | "github.com/lxlxw/s3-micro/cmd" 7 | ) 8 | 9 | func main() { 10 | runtime.GOMAXPROCS(runtime.NumCPU()) 11 | 12 | cmd.Execute() 13 | } 14 | -------------------------------------------------------------------------------- /pkg/s3/bucket.go: -------------------------------------------------------------------------------- 1 | package s3 2 | 3 | import ( 4 | "github.com/ks3sdklib/aws-sdk-go/aws" 5 | "github.com/ks3sdklib/aws-sdk-go/service/s3" 6 | ) 7 | 8 | // Creates a new bucket. 9 | func (svc *S3) CreateBucket(bucketName, acl string) error { 10 | input := &s3.CreateBucketInput{ 11 | Bucket: aws.String(bucketName), 12 | ACL: aws.String(acl), 13 | } 14 | if _, err := svc.S3.CreateBucket(input); err != nil { 15 | return err 16 | } 17 | return nil 18 | } 19 | 20 | func (svc *S3) DeleteBucket(bucketName string) error { 21 | input := &s3.DeleteBucketInput{ 22 | Bucket: aws.String(bucketName), 23 | } 24 | if _, err := svc.S3.DeleteBucket(input); err != nil { 25 | return err 26 | } 27 | return nil 28 | } 29 | 30 | func (svc *S3) ListBucket() (*s3.ListBucketsOutput, error) { 31 | input := &s3.ListBucketsInput{} 32 | res, err := svc.S3.ListBuckets(input) 33 | if err != nil { 34 | return res, err 35 | } 36 | return res, nil 37 | } 38 | -------------------------------------------------------------------------------- /pkg/s3/object_test.go: -------------------------------------------------------------------------------- 1 | package s3 2 | -------------------------------------------------------------------------------- /pkg/s3/parameters.go: -------------------------------------------------------------------------------- 1 | package s3 2 | 3 | const ( 4 | // S3 config info filename 5 | S3_CONF_FILENNAME = "s3.toml" 6 | ) 7 | -------------------------------------------------------------------------------- /pkg/s3/session.go: -------------------------------------------------------------------------------- 1 | package s3 2 | 3 | import ( 4 | "github.com/ks3sdklib/aws-sdk-go/aws" 5 | "github.com/ks3sdklib/aws-sdk-go/aws/credentials" 6 | "github.com/ks3sdklib/aws-sdk-go/service/s3" 7 | 8 | "github.com/lxlxw/s3-micro/pkg/util" 9 | ) 10 | 11 | // S3 is a client for Amazon S3. 12 | type S3 struct { 13 | *s3.S3 14 | } 15 | 16 | // S3 config info 17 | type S3Conf struct { 18 | // S3 access key 19 | AccessKey string 20 | 21 | // S3 secret key 22 | Secretkey string 23 | 24 | // S3 region 25 | Region string 26 | 27 | // S3 endpoint 28 | Endpoint string 29 | } 30 | 31 | // New returns a new S3 client. 32 | func New() (*S3, error) { 33 | conf := GetS3Conf() 34 | 35 | credentials := credentials.NewStaticCredentials(conf.AccessKey, conf.Secretkey, "") 36 | client := s3.New(&aws.Config{ 37 | Region: conf.Region, 38 | Credentials: credentials, 39 | Endpoint: conf.Endpoint, 40 | DisableSSL: true, 41 | LogLevel: 1, 42 | S3ForcePathStyle: false, 43 | LogHTTPBody: true, 44 | }) 45 | return &S3{S3: client}, nil 46 | } 47 | 48 | // Get S3 config info. 49 | func GetS3Conf() S3Conf { 50 | util.SetConfig(S3_CONF_FILENNAME) 51 | s3 := util.GetConfig().S3 52 | 53 | s3Conf := S3Conf{ 54 | AccessKey: s3.AccessKey, 55 | Secretkey: s3.Secretkey, 56 | Region: s3.Region, 57 | Endpoint: s3.Endpoint, 58 | } 59 | return s3Conf 60 | } 61 | -------------------------------------------------------------------------------- /pkg/util/config.go: -------------------------------------------------------------------------------- 1 | package util 2 | 3 | import ( 4 | "bytes" 5 | "io/ioutil" 6 | "os" 7 | "runtime" 8 | 9 | "github.com/lxlxw/toml" 10 | ) 11 | 12 | type ( 13 | Config struct { 14 | S3 S3Config 15 | } 16 | 17 | S3Config struct { 18 | AccessKey string `toml:"accesskey"` 19 | Secretkey string `toml:"secretkey"` 20 | Region string `toml:"region"` 21 | Endpoint string `toml:"endpoint"` 22 | } 23 | ) 24 | 25 | var configInfo Config 26 | var confName string 27 | var ostype = runtime.GOOS 28 | 29 | // Encode config 30 | func EncodeConfig(conf *Config) (string, error) { 31 | buf := new(bytes.Buffer) 32 | if err := toml.NewEncoder(buf).Encode(conf); err != nil { 33 | return "", err 34 | } 35 | return buf.String(), nil 36 | } 37 | 38 | // Parse config file 39 | func ParseConfigFile(filePath string) { 40 | fi, err := os.Open(filePath) 41 | if err != nil { 42 | panic(err) 43 | } 44 | defer fi.Close() 45 | fd, err := ioutil.ReadAll(fi) 46 | if _, err := toml.Decode(string(fd), &configInfo); err != nil { 47 | panic(err) 48 | } 49 | } 50 | 51 | // Gets config info 52 | func GetConfig() Config { 53 | return configInfo 54 | } 55 | 56 | // Sets config info 57 | func SetConfig(confName string) { 58 | configFile := GetConfigPath(confName) 59 | ParseConfigFile(configFile) 60 | } 61 | -------------------------------------------------------------------------------- /pkg/util/file.go: -------------------------------------------------------------------------------- 1 | package util 2 | 3 | import "os" 4 | 5 | // Files path exists 6 | func PathExists(path string) (bool, error) { 7 | _, err := os.Stat(path) 8 | if err == nil { 9 | return true, nil 10 | } 11 | if os.IsNotExist(err) { 12 | return false, nil 13 | } 14 | return false, err 15 | } 16 | 17 | // Gets project path 18 | func GetProjectPath() string { 19 | var projectPath string 20 | projectPath, _ = os.Getwd() 21 | return projectPath 22 | } 23 | 24 | // Gets config path 25 | func GetConfigPath(confName string) string { 26 | path := GetProjectPath() 27 | if ostype == "windows" { 28 | path = path + "\\" + "conf\\" + confName 29 | } else if ostype == "linux" { 30 | path = path + "/" + "conf/" + confName 31 | } 32 | return path 33 | } 34 | 35 | // Updates config file 36 | func UpdateConfigFile(fileContent, fileName string) error { 37 | 38 | pathFile := GetConfigPath(fileName) 39 | 40 | exist, err := PathExists(pathFile) 41 | if err != nil { 42 | return err 43 | } 44 | if exist { 45 | err := os.Remove(pathFile) 46 | if err != nil { 47 | return err 48 | } 49 | } 50 | file, err := os.OpenFile(pathFile, os.O_CREATE|os.O_APPEND, 0666) 51 | if err != nil { 52 | return err 53 | } 54 | defer file.Close() 55 | file.WriteString(fileContent) 56 | return nil 57 | } 58 | -------------------------------------------------------------------------------- /proto/google/api/annotations.proto: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2015, Google Inc. 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | 15 | syntax = "proto3"; 16 | 17 | package google.api; 18 | 19 | import "google/api/http.proto"; 20 | import "google/protobuf/descriptor.proto"; 21 | 22 | option java_multiple_files = true; 23 | option java_outer_classname = "AnnotationsProto"; 24 | option java_package = "com.google.api"; 25 | 26 | extend google.protobuf.MethodOptions { 27 | // See `HttpRule`. 28 | HttpRule http = 72295728; 29 | } 30 | -------------------------------------------------------------------------------- /swagger-ui/favicon-16x16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lxlxw/s3-micro/c6839acc41127592536475613dccfa1bb78ccda5/swagger-ui/favicon-16x16.png -------------------------------------------------------------------------------- /swagger-ui/favicon-32x32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lxlxw/s3-micro/c6839acc41127592536475613dccfa1bb78ccda5/swagger-ui/favicon-32x32.png -------------------------------------------------------------------------------- /swagger-ui/swagger-ui.css.map: -------------------------------------------------------------------------------- 1 | {"version":3,"sources":[],"names":[],"mappings":"","file":"swagger-ui.css","sourceRoot":""} -------------------------------------------------------------------------------- /vendor/github.com/elazarl/go-bindata-assetfs/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2014, Elazar Leibovich 2 | All rights reserved. 3 | 4 | Redistribution and use in source and binary forms, with or without 5 | modification, are permitted provided that the following conditions are met: 6 | 7 | * Redistributions of source code must retain the above copyright notice, this 8 | list of conditions and the following disclaimer. 9 | 10 | * Redistributions in binary form must reproduce the above copyright notice, 11 | this list of conditions and the following disclaimer in the documentation 12 | and/or other materials provided with the distribution. 13 | 14 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 15 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 16 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 17 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 18 | FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 19 | DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 20 | SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 21 | CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 22 | OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 23 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 24 | -------------------------------------------------------------------------------- /vendor/github.com/elazarl/go-bindata-assetfs/README.md: -------------------------------------------------------------------------------- 1 | # go-bindata-assetfs 2 | 3 | Serve embedded files from [jteeuwen/go-bindata](https://github.com/jteeuwen/go-bindata) with `net/http`. 4 | 5 | [GoDoc](http://godoc.org/github.com/elazarl/go-bindata-assetfs) 6 | 7 | ### Installation 8 | 9 | Install with 10 | 11 | $ go get github.com/jteeuwen/go-bindata/... 12 | $ go get github.com/elazarl/go-bindata-assetfs/... 13 | 14 | ### Creating embedded data 15 | 16 | Usage is identical to [jteeuwen/go-bindata](https://github.com/jteeuwen/go-bindata) usage, 17 | instead of running `go-bindata` run `go-bindata-assetfs`. 18 | 19 | The tool will create a `bindata_assetfs.go` file, which contains the embedded data. 20 | 21 | A typical use case is 22 | 23 | $ go-bindata-assetfs data/... 24 | 25 | ### Using assetFS in your code 26 | 27 | The generated file provides an `assetFS()` function that returns a `http.Filesystem` 28 | wrapping the embedded files. What you usually want to do is: 29 | 30 | http.Handle("/", http.FileServer(assetFS())) 31 | 32 | This would run an HTTP server serving the embedded files. 33 | 34 | ## Without running binary tool 35 | 36 | You can always just run the `go-bindata` tool, and then 37 | 38 | use 39 | 40 | import "github.com/elazarl/go-bindata-assetfs" 41 | ... 42 | http.Handle("/", 43 | http.FileServer( 44 | &assetfs.AssetFS{Asset: Asset, AssetDir: AssetDir, AssetInfo: AssetInfo, Prefix: "data"})) 45 | 46 | to serve files embedded from the `data` directory. 47 | -------------------------------------------------------------------------------- /vendor/github.com/elazarl/go-bindata-assetfs/doc.go: -------------------------------------------------------------------------------- 1 | // assetfs allows packages to serve static content embedded 2 | // with the go-bindata tool with the standard net/http package. 3 | // 4 | // See https://github.com/jteeuwen/go-bindata for more information 5 | // about embedding binary data with go-bindata. 6 | // 7 | // Usage example, after running 8 | // $ go-bindata data/... 9 | // use: 10 | // http.Handle("/", 11 | // http.FileServer( 12 | // &assetfs.AssetFS{Asset: Asset, AssetDir: AssetDir, Prefix: "data"})) 13 | package assetfs 14 | -------------------------------------------------------------------------------- /vendor/github.com/golang/protobuf/.github/ISSUE_TEMPLATE/bug_report.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Bug report 3 | about: Create a report to help us improve 4 | 5 | --- 6 | 7 | **What version of protobuf and what language are you using?** 8 | Version: (e.g., `v1.1.0`, `89a0c16f`, etc) 9 | 10 | **What did you do?** 11 | If possible, provide a recipe for reproducing the error. 12 | A complete runnable program is good with `.proto` and `.go` source code. 13 | 14 | **What did you expect to see?** 15 | 16 | **What did you see instead?** 17 | 18 | Make sure you include information that can help us debug (full error message, exception listing, stack trace, logs). 19 | 20 | **Anything else we should know about your project / environment?** 21 | -------------------------------------------------------------------------------- /vendor/github.com/golang/protobuf/.github/ISSUE_TEMPLATE/feature_request.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Feature request 3 | about: Suggest an idea for this project 4 | 5 | --- 6 | 7 | **Is your feature request related to a problem? Please describe.** 8 | A clear and concise description of what the problem is. 9 | 10 | **Describe the solution you'd like** 11 | A clear and concise description of what you want to happen. 12 | 13 | **Describe alternatives you've considered** 14 | A clear and concise description of any alternative solutions or features you've considered. 15 | 16 | **Additional context** 17 | Add any other context or screenshots about the feature request here. 18 | -------------------------------------------------------------------------------- /vendor/github.com/golang/protobuf/.github/ISSUE_TEMPLATE/question.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Question 3 | about: Questions and troubleshooting 4 | 5 | --- 6 | 7 | 8 | -------------------------------------------------------------------------------- /vendor/github.com/golang/protobuf/.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | *.[568ao] 3 | *.ao 4 | *.so 5 | *.pyc 6 | ._* 7 | .nfs.* 8 | [568a].out 9 | *~ 10 | *.orig 11 | core 12 | _obj 13 | _test 14 | _testmain.go 15 | 16 | # Conformance test output and transient files. 17 | conformance/failing_tests.txt 18 | -------------------------------------------------------------------------------- /vendor/github.com/golang/protobuf/.travis.yml: -------------------------------------------------------------------------------- 1 | sudo: false 2 | language: go 3 | go: 4 | - 1.6.x 5 | - 1.10.x 6 | - 1.x 7 | 8 | install: 9 | - go get -v -d google.golang.org/grpc 10 | - go get -v -d -t github.com/golang/protobuf/... 11 | - curl -L https://github.com/google/protobuf/releases/download/v3.5.1/protoc-3.5.1-linux-x86_64.zip -o /tmp/protoc.zip 12 | - unzip /tmp/protoc.zip -d "$HOME"/protoc 13 | - mkdir -p "$HOME"/src && ln -s "$HOME"/protoc "$HOME"/src/protobuf 14 | 15 | env: 16 | - PATH=$HOME/protoc/bin:$PATH 17 | 18 | script: 19 | - make all 20 | - make regenerate 21 | # TODO(tamird): When https://github.com/travis-ci/gimme/pull/130 is 22 | # released, make this look for "1.x". 23 | - if [[ "$TRAVIS_GO_VERSION" == 1.10* ]]; then 24 | if [[ "$(git status --porcelain 2>&1)" != "" ]]; then 25 | git status >&2; 26 | git diff -a >&2; 27 | exit 1; 28 | fi; 29 | echo "git status is clean."; 30 | fi; 31 | - make test 32 | -------------------------------------------------------------------------------- /vendor/github.com/golang/protobuf/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/github.com/golang/protobuf/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/github.com/golang/protobuf/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright 2010 The Go Authors. All rights reserved. 2 | 3 | Redistribution and use in source and binary forms, with or without 4 | modification, are permitted provided that the following conditions are 5 | met: 6 | 7 | * Redistributions of source code must retain the above copyright 8 | notice, this list of conditions and the following disclaimer. 9 | * Redistributions in binary form must reproduce the above 10 | copyright notice, this list of conditions and the following disclaimer 11 | in the documentation and/or other materials provided with the 12 | distribution. 13 | * Neither the name of Google Inc. nor the names of its 14 | contributors may be used to endorse or promote products derived from 15 | this software without specific prior written permission. 16 | 17 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 18 | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 19 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 20 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 21 | OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 22 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 23 | LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 24 | DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 25 | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 26 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 27 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 | 29 | -------------------------------------------------------------------------------- /vendor/github.com/golang/protobuf/conformance/conformance.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | cd $(dirname $0) 4 | exec go run conformance.go $* 5 | -------------------------------------------------------------------------------- /vendor/github.com/golang/protobuf/conformance/test.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | PROTOBUF_ROOT=$1 4 | CONFORMANCE_ROOT=$1/conformance 5 | CONFORMANCE_TEST_RUNNER=$CONFORMANCE_ROOT/conformance-test-runner 6 | 7 | cd $(dirname $0) 8 | 9 | if [[ $PROTOBUF_ROOT == "" ]]; then 10 | echo "usage: test.sh " >/dev/stderr 11 | exit 1 12 | fi 13 | 14 | if [[ ! -x $CONFORMANCE_TEST_RUNNER ]]; then 15 | echo "SKIP: conformance test runner not installed" >/dev/stderr 16 | exit 0 17 | fi 18 | 19 | a=$CONFORMANCE_ROOT/conformance.proto 20 | b=internal/conformance_proto/conformance.proto 21 | if [[ $(diff $a $b) != "" ]]; then 22 | cp $a $b 23 | echo "WARNING: conformance.proto is out of date" >/dev/stderr 24 | fi 25 | 26 | $CONFORMANCE_TEST_RUNNER --failure_list failure_list_go.txt ./conformance.sh 27 | -------------------------------------------------------------------------------- /vendor/github.com/golang/protobuf/descriptor/descriptor_test.go: -------------------------------------------------------------------------------- 1 | package descriptor_test 2 | 3 | import ( 4 | "fmt" 5 | "testing" 6 | 7 | "github.com/golang/protobuf/descriptor" 8 | tpb "github.com/golang/protobuf/proto/test_proto" 9 | protobuf "github.com/golang/protobuf/protoc-gen-go/descriptor" 10 | ) 11 | 12 | func TestMessage(t *testing.T) { 13 | var msg *protobuf.DescriptorProto 14 | fd, md := descriptor.ForMessage(msg) 15 | if pkg, want := fd.GetPackage(), "google.protobuf"; pkg != want { 16 | t.Errorf("descriptor.ForMessage(%T).GetPackage() = %q; want %q", msg, pkg, want) 17 | } 18 | if name, want := md.GetName(), "DescriptorProto"; name != want { 19 | t.Fatalf("descriptor.ForMessage(%T).GetName() = %q; want %q", msg, name, want) 20 | } 21 | } 22 | 23 | func Example_options() { 24 | var msg *tpb.MyMessageSet 25 | _, md := descriptor.ForMessage(msg) 26 | if md.GetOptions().GetMessageSetWireFormat() { 27 | fmt.Printf("%v uses option message_set_wire_format.\n", md.GetName()) 28 | } 29 | 30 | // Output: 31 | // MyMessageSet uses option message_set_wire_format. 32 | } 33 | -------------------------------------------------------------------------------- /vendor/github.com/grpc-ecosystem/grpc-gateway/runtime/doc.go: -------------------------------------------------------------------------------- 1 | /* 2 | Package runtime contains runtime helper functions used by 3 | servers which protoc-gen-grpc-gateway generates. 4 | */ 5 | package runtime 6 | -------------------------------------------------------------------------------- /vendor/github.com/grpc-ecosystem/grpc-gateway/runtime/internal/stream_chunk.proto: -------------------------------------------------------------------------------- 1 | syntax = "proto3"; 2 | package grpc.gateway.runtime; 3 | option go_package = "internal"; 4 | 5 | // StreamError is a response type which is returned when 6 | // streaming rpc returns an error. 7 | message StreamError { 8 | int32 grpc_code = 1; 9 | int32 http_code = 2; 10 | string message = 3; 11 | string http_status = 4; 12 | } 13 | -------------------------------------------------------------------------------- /vendor/github.com/grpc-ecosystem/grpc-gateway/runtime/marshal_json.go: -------------------------------------------------------------------------------- 1 | package runtime 2 | 3 | import ( 4 | "encoding/json" 5 | "io" 6 | ) 7 | 8 | // JSONBuiltin is a Marshaler which marshals/unmarshals into/from JSON 9 | // with the standard "encoding/json" package of Golang. 10 | // Although it is generally faster for simple proto messages than JSONPb, 11 | // it does not support advanced features of protobuf, e.g. map, oneof, .... 12 | type JSONBuiltin struct{} 13 | 14 | // ContentType always Returns "application/json". 15 | func (*JSONBuiltin) ContentType() string { 16 | return "application/json" 17 | } 18 | 19 | // Marshal marshals "v" into JSON 20 | func (j *JSONBuiltin) Marshal(v interface{}) ([]byte, error) { 21 | return json.Marshal(v) 22 | } 23 | 24 | // Unmarshal unmarshals JSON data into "v". 25 | func (j *JSONBuiltin) Unmarshal(data []byte, v interface{}) error { 26 | return json.Unmarshal(data, v) 27 | } 28 | 29 | // NewDecoder returns a Decoder which reads JSON stream from "r". 30 | func (j *JSONBuiltin) NewDecoder(r io.Reader) Decoder { 31 | return json.NewDecoder(r) 32 | } 33 | 34 | // NewEncoder returns an Encoder which writes JSON stream into "w". 35 | func (j *JSONBuiltin) NewEncoder(w io.Writer) Encoder { 36 | return json.NewEncoder(w) 37 | } 38 | 39 | // Delimiter for newline encoded JSON streams. 40 | func (j *JSONBuiltin) Delimiter() []byte { 41 | return []byte("\n") 42 | } 43 | -------------------------------------------------------------------------------- /vendor/github.com/grpc-ecosystem/grpc-gateway/utilities/doc.go: -------------------------------------------------------------------------------- 1 | // Package utilities provides members for internal use in grpc-gateway. 2 | package utilities 3 | -------------------------------------------------------------------------------- /vendor/github.com/grpc-ecosystem/grpc-gateway/utilities/pattern.go: -------------------------------------------------------------------------------- 1 | package utilities 2 | 3 | // An OpCode is a opcode of compiled path patterns. 4 | type OpCode int 5 | 6 | // These constants are the valid values of OpCode. 7 | const ( 8 | // OpNop does nothing 9 | OpNop = OpCode(iota) 10 | // OpPush pushes a component to stack 11 | OpPush 12 | // OpLitPush pushes a component to stack if it matches to the literal 13 | OpLitPush 14 | // OpPushM concatenates the remaining components and pushes it to stack 15 | OpPushM 16 | // OpConcatN pops N items from stack, concatenates them and pushes it back to stack 17 | OpConcatN 18 | // OpCapture pops an item and binds it to the variable 19 | OpCapture 20 | // OpEnd is the least postive invalid opcode. 21 | OpEnd 22 | ) 23 | -------------------------------------------------------------------------------- /vendor/github.com/ks3sdklib/aws-sdk-go/.gitignore: -------------------------------------------------------------------------------- 1 | vendor 2 | doc 3 | -------------------------------------------------------------------------------- /vendor/github.com/ks3sdklib/aws-sdk-go/.travis.yml: -------------------------------------------------------------------------------- 1 | language: go 2 | 3 | sudo: false 4 | 5 | go: 6 | - 1.4 7 | 8 | install: "go get -v -t ./... && make deps" 9 | script: make unit 10 | -------------------------------------------------------------------------------- /vendor/github.com/ks3sdklib/aws-sdk-go/NOTICE.txt: -------------------------------------------------------------------------------- 1 | AWS SDK for Go 2 | Copyright 2015 Amazon.com, Inc. or its affiliates. All Rights Reserved. 3 | Copyright 2014-2015 Stripe, Inc. 4 | -------------------------------------------------------------------------------- /vendor/github.com/ks3sdklib/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 | -------------------------------------------------------------------------------- /vendor/github.com/ks3sdklib/aws-sdk-go/aws/credentials/static_provider.go: -------------------------------------------------------------------------------- 1 | package credentials 2 | 3 | import ( 4 | "github.com/ks3sdklib/aws-sdk-go/internal/apierr" 5 | ) 6 | 7 | var ( 8 | // ErrStaticCredentialsEmpty is emitted when static credentials are empty. 9 | ErrStaticCredentialsEmpty = apierr.New("EmptyStaticCreds", "static credentials are empty", nil) 10 | ) 11 | 12 | // A StaticProvider is a set of credentials which are set pragmatically, 13 | // and will never expire. 14 | type StaticProvider struct { 15 | Value 16 | } 17 | 18 | // NewStaticCredentials returns a pointer to a new Credentials object 19 | // wrapping a static credentials value provider. 20 | func NewStaticCredentials(id, secret, token string) *Credentials { 21 | return NewCredentials(&StaticProvider{Value: Value{ 22 | AccessKeyID: id, 23 | SecretAccessKey: secret, 24 | SessionToken: token, 25 | }}) 26 | } 27 | 28 | // Retrieve returns the credentials or error if the credentials are invalid. 29 | func (s *StaticProvider) Retrieve() (Value, error) { 30 | if s.AccessKeyID == "" || s.SecretAccessKey == "" { 31 | return Value{}, ErrStaticCredentialsEmpty 32 | } 33 | 34 | return s.Value, nil 35 | } 36 | 37 | // IsExpired returns if the credentials are expired. 38 | // 39 | // For StaticProvider, the credentials never expired. 40 | func (s *StaticProvider) IsExpired() bool { 41 | return false 42 | } 43 | -------------------------------------------------------------------------------- /vendor/github.com/ks3sdklib/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/ks3sdklib/aws-sdk-go/aws/handlers_test.go: -------------------------------------------------------------------------------- 1 | package aws 2 | 3 | import ( 4 | "testing" 5 | 6 | "github.com/stretchr/testify/assert" 7 | ) 8 | 9 | func TestHandlerList(t *testing.T) { 10 | s := "" 11 | r := &Request{} 12 | l := HandlerList{} 13 | l.PushBack(func(r *Request) { 14 | s += "a" 15 | r.Data = s 16 | }) 17 | l.Run(r) 18 | assert.Equal(t, "a", s) 19 | assert.Equal(t, "a", r.Data) 20 | } 21 | 22 | func TestMultipleHandlers(t *testing.T) { 23 | r := &Request{} 24 | l := HandlerList{} 25 | l.PushBack(func(r *Request) { r.Data = nil }) 26 | l.PushFront(func(r *Request) { r.Data = Boolean(true) }) 27 | l.Run(r) 28 | if r.Data != nil { 29 | t.Error("Expected handler to execute") 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /vendor/github.com/ks3sdklib/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 = "0.6.4" 9 | -------------------------------------------------------------------------------- /vendor/github.com/ks3sdklib/aws-sdk-go/internal/endpoints/endpoints.go: -------------------------------------------------------------------------------- 1 | // Package endpoints validates regional endpoints for services. 2 | package endpoints 3 | 4 | //go:generate go run ../model/cli/gen-endpoints/main.go endpoints.json endpoints_map.go 5 | //go:generate gofmt -s -w endpoints_map.go 6 | 7 | import "strings" 8 | 9 | // EndpointForRegion returns an endpoint and its signing region for a service and region. 10 | // if the service and region pair are not found endpoint and signingRegion will be empty. 11 | func EndpointForRegion(svcName, region string) (endpoint, signingRegion string) { 12 | derivedKeys := []string{ 13 | region + "/" + svcName, 14 | region + "/*", 15 | "*/" + svcName, 16 | "*/*", 17 | } 18 | 19 | for _, key := range derivedKeys { 20 | if val, ok := endpointsMap.Endpoints[key]; ok { 21 | ep := val.Endpoint 22 | ep = strings.Replace(ep, "{region}", region, -1) 23 | ep = strings.Replace(ep, "{service}", svcName, -1) 24 | 25 | endpoint = ep 26 | signingRegion = val.SigningRegion 27 | return 28 | } 29 | } 30 | return 31 | } 32 | -------------------------------------------------------------------------------- /vendor/github.com/ks3sdklib/aws-sdk-go/internal/endpoints/endpoints_test.go: -------------------------------------------------------------------------------- 1 | package endpoints 2 | 3 | import ( 4 | "testing" 5 | 6 | "github.com/stretchr/testify/assert" 7 | ) 8 | 9 | func TestGlobalEndpoints(t *testing.T) { 10 | region := "mock-region-1" 11 | svcs := []string{"cloudfront", "iam", "importexport", "route53", "sts"} 12 | 13 | for _, name := range svcs { 14 | ep, sr := EndpointForRegion(name, region) 15 | assert.Equal(t, name+".amazonaws.com", ep) 16 | assert.Equal(t, "us-east-1", sr) 17 | } 18 | } 19 | 20 | func TestServicesInCN(t *testing.T) { 21 | region := "cn-north-1" 22 | svcs := []string{"cloudfront", "iam", "importexport", "route53", "sts", "s3"} 23 | 24 | for _, name := range svcs { 25 | ep, _ := EndpointForRegion(name, region) 26 | assert.Equal(t, name+"."+region+".amazonaws.com.cn", ep) 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /vendor/github.com/ks3sdklib/aws-sdk-go/internal/features/autoscaling/client.feature: -------------------------------------------------------------------------------- 1 | # language: en 2 | @autoscaling @client 3 | Feature: Auto Scaling 4 | 5 | Scenario: Making a basic request 6 | When I call the "DescribeScalingProcessTypes" API 7 | Then the value at "Processes" should be a list 8 | 9 | Scenario: Error handling 10 | When I attempt to call the "CreateLaunchConfiguration" API with: 11 | | LaunchConfigurationName | | 12 | | ImageId | ami-12345678 | 13 | | InstanceType | m1.small | 14 | Then I expect the response error code to be "ValidationError" 15 | And I expect the response error message to include: 16 | """ 17 | Member must have length greater than or equal to 1 18 | """ 19 | -------------------------------------------------------------------------------- /vendor/github.com/ks3sdklib/aws-sdk-go/internal/features/autoscaling/client.go: -------------------------------------------------------------------------------- 1 | //Package autoscaling provides gucumber integration tests suppport. 2 | package autoscaling 3 | 4 | import ( 5 | "github.com/ks3sdklib/aws-sdk-go/internal/features/shared" 6 | "github.com/ks3sdklib/aws-sdk-go/service/autoscaling" 7 | . "github.com/lsegal/gucumber" 8 | ) 9 | 10 | var _ = shared.Imported 11 | 12 | func init() { 13 | Before("@autoscaling", func() { 14 | World["client"] = autoscaling.New(nil) 15 | }) 16 | } 17 | -------------------------------------------------------------------------------- /vendor/github.com/ks3sdklib/aws-sdk-go/internal/features/cloudformation/client.feature: -------------------------------------------------------------------------------- 1 | # language: en 2 | @cloudformation @client 3 | Feature: AWS CloudFormation 4 | 5 | Scenario: Making a basic request 6 | When I call the "ListStacks" API 7 | Then the value at "StackSummaries" should be a list 8 | 9 | Scenario: Error handling 10 | When I attempt to call the "CreateStack" API with: 11 | | StackName | fakestack | 12 | | TemplateURL | http://s3.amazonaws.com/foo/bar | 13 | Then I expect the response error code to be "ValidationError" 14 | And I expect the response error message to include: 15 | """ 16 | TemplateURL must reference a valid S3 object to which you have access. 17 | """ 18 | -------------------------------------------------------------------------------- /vendor/github.com/ks3sdklib/aws-sdk-go/internal/features/cloudformation/client.go: -------------------------------------------------------------------------------- 1 | //Package cloudformation provides gucumber integration tests suppport. 2 | package cloudformation 3 | 4 | import ( 5 | "github.com/ks3sdklib/aws-sdk-go/internal/features/shared" 6 | "github.com/ks3sdklib/aws-sdk-go/service/cloudformation" 7 | . "github.com/lsegal/gucumber" 8 | ) 9 | 10 | var _ = shared.Imported 11 | 12 | func init() { 13 | Before("@cloudformation", func() { 14 | World["client"] = cloudformation.New(nil) 15 | }) 16 | } 17 | -------------------------------------------------------------------------------- /vendor/github.com/ks3sdklib/aws-sdk-go/internal/features/cloudfront/client.feature: -------------------------------------------------------------------------------- 1 | # language: en 2 | @cloudfront @client 3 | Feature: Amazon CloudFront 4 | 5 | Scenario: Making a basic request 6 | When I call the "ListDistributions" API with: 7 | | MaxItems | 1 | 8 | Then the value at "DistributionList.Items" should be a list 9 | 10 | Scenario: Error handling 11 | When I attempt to call the "GetDistribution" API with: 12 | | Id | fake-id | 13 | Then I expect the response error code to be "NoSuchDistribution" 14 | And I expect the response error message to include: 15 | """ 16 | The specified distribution does not exist. 17 | """ 18 | -------------------------------------------------------------------------------- /vendor/github.com/ks3sdklib/aws-sdk-go/internal/features/cloudfront/client.go: -------------------------------------------------------------------------------- 1 | //Package cloudfront provides gucumber integration tests suppport. 2 | package cloudfront 3 | 4 | import ( 5 | "github.com/ks3sdklib/aws-sdk-go/internal/features/shared" 6 | "github.com/ks3sdklib/aws-sdk-go/service/cloudfront" 7 | . "github.com/lsegal/gucumber" 8 | ) 9 | 10 | var _ = shared.Imported 11 | 12 | func init() { 13 | Before("@cloudfront", func() { 14 | World["client"] = cloudfront.New(nil) 15 | }) 16 | } 17 | -------------------------------------------------------------------------------- /vendor/github.com/ks3sdklib/aws-sdk-go/internal/features/cloudhsm/client.feature: -------------------------------------------------------------------------------- 1 | # language: en 2 | @cloudhsm @client 3 | Feature: Amazon CloudHSM 4 | 5 | Scenario: Making a basic request 6 | When I call the "ListHapgs" API 7 | Then the value at "HapgList" should be a list 8 | 9 | Scenario: Error handling 10 | When I attempt to call the "DescribeHapg" API with: 11 | | HapgArn | bogus-arn | 12 | Then I expect the response error code to be "ValidationException" 13 | And I expect the response error message to include: 14 | """ 15 | Value 'bogus-arn' at 'hapgArn' failed to satisfy constraint 16 | """ 17 | -------------------------------------------------------------------------------- /vendor/github.com/ks3sdklib/aws-sdk-go/internal/features/cloudhsm/client.go: -------------------------------------------------------------------------------- 1 | //Package cloudhsm provides gucumber integration tests suppport. 2 | package cloudhsm 3 | 4 | import ( 5 | "github.com/ks3sdklib/aws-sdk-go/internal/features/shared" 6 | "github.com/ks3sdklib/aws-sdk-go/service/cloudhsm" 7 | . "github.com/lsegal/gucumber" 8 | ) 9 | 10 | var _ = shared.Imported 11 | 12 | func init() { 13 | Before("@cloudhsm", func() { 14 | World["client"] = cloudhsm.New(nil) 15 | }) 16 | } 17 | -------------------------------------------------------------------------------- /vendor/github.com/ks3sdklib/aws-sdk-go/internal/features/cloudsearch/client.feature: -------------------------------------------------------------------------------- 1 | # language: en 2 | @cloudsearch @client 3 | Feature: Amazon CloudSearch 4 | 5 | Scenario: Making a basic request 6 | When I call the "DescribeDomains" API 7 | Then the response should contain a "DomainStatusList" 8 | 9 | Scenario: Error handling 10 | When I attempt to call the "DescribeIndexFields" API with: 11 | | DomainName | fakedomain | 12 | Then I expect the response error code to be "ResourceNotFound" 13 | And I expect the response error message to include: 14 | """ 15 | Domain not found: fakedomain 16 | """ 17 | -------------------------------------------------------------------------------- /vendor/github.com/ks3sdklib/aws-sdk-go/internal/features/cloudsearch/client.go: -------------------------------------------------------------------------------- 1 | //Package cloudsearch provides gucumber integration tests suppport. 2 | package cloudsearch 3 | 4 | import ( 5 | "github.com/ks3sdklib/aws-sdk-go/internal/features/shared" 6 | "github.com/ks3sdklib/aws-sdk-go/service/cloudsearch" 7 | . "github.com/lsegal/gucumber" 8 | ) 9 | 10 | var _ = shared.Imported 11 | 12 | func init() { 13 | Before("@cloudsearch", func() { 14 | World["client"] = cloudsearch.New(nil) 15 | }) 16 | } 17 | -------------------------------------------------------------------------------- /vendor/github.com/ks3sdklib/aws-sdk-go/internal/features/cloudtrail/client.feature: -------------------------------------------------------------------------------- 1 | # language: en 2 | @cloudtrail @client 3 | Feature: AWS CloudTrail 4 | 5 | Scenario: Making a basic request 6 | When I call the "DescribeTrails" API 7 | Then the response should contain a "trailList" 8 | 9 | Scenario: Error handling 10 | When I attempt to call the "DeleteTrail" API with: 11 | | Name | faketrail | 12 | Then I expect the response error code to be "TrailNotFoundException" 13 | And I expect the response error message to include: 14 | """ 15 | Unknown trail 16 | """ 17 | -------------------------------------------------------------------------------- /vendor/github.com/ks3sdklib/aws-sdk-go/internal/features/cloudtrail/client.go: -------------------------------------------------------------------------------- 1 | //Package cloudtrail provides gucumber integration tests suppport. 2 | package cloudtrail 3 | 4 | import ( 5 | "github.com/ks3sdklib/aws-sdk-go/internal/features/shared" 6 | "github.com/ks3sdklib/aws-sdk-go/service/cloudtrail" 7 | . "github.com/lsegal/gucumber" 8 | ) 9 | 10 | var _ = shared.Imported 11 | 12 | func init() { 13 | Before("@cloudtrail", func() { 14 | World["client"] = cloudtrail.New(nil) 15 | }) 16 | } 17 | -------------------------------------------------------------------------------- /vendor/github.com/ks3sdklib/aws-sdk-go/internal/features/cloudwatch/client.feature: -------------------------------------------------------------------------------- 1 | # language: en 2 | @cloudwatch @client 3 | Feature: Amazon CloudWatch 4 | 5 | Scenario: Making a basic request 6 | When I call the "ListMetrics" API with: 7 | | Namespace | AWS/EC2 | 8 | Then the value at "Metrics" should be a list 9 | 10 | Scenario: Error handling 11 | When I attempt to call the "SetAlarmState" API with: 12 | | AlarmName | abc | 13 | | StateValue | mno | 14 | | StateReason | xyz | 15 | Then I expect the response error code to be "ValidationError" 16 | And I expect the response error message to include: 17 | """ 18 | failed to satisfy constraint 19 | """ 20 | -------------------------------------------------------------------------------- /vendor/github.com/ks3sdklib/aws-sdk-go/internal/features/cloudwatch/client.go: -------------------------------------------------------------------------------- 1 | //Package cloudwatch provides gucumber integration tests suppport. 2 | package cloudwatch 3 | 4 | import ( 5 | "github.com/ks3sdklib/aws-sdk-go/internal/features/shared" 6 | "github.com/ks3sdklib/aws-sdk-go/service/cloudwatch" 7 | . "github.com/lsegal/gucumber" 8 | ) 9 | 10 | var _ = shared.Imported 11 | 12 | func init() { 13 | Before("@cloudwatch", func() { 14 | World["client"] = cloudwatch.New(nil) 15 | }) 16 | } 17 | -------------------------------------------------------------------------------- /vendor/github.com/ks3sdklib/aws-sdk-go/internal/features/cloudwatchlogs/client.feature: -------------------------------------------------------------------------------- 1 | # language: en 2 | @cloudwatchlogs @client 3 | Feature: Amazon CloudWatch Logs 4 | 5 | Scenario: Making a basic request 6 | When I call the "DescribeLogGroups" API 7 | Then the value at "LogGroups" should be a list 8 | 9 | Scenario: Error handling 10 | When I attempt to call the "GetLogEvents" API with: 11 | | LogGroupName | fakegroup | 12 | | LogStreamName | fakestream | 13 | Then I expect the response error code to be "ResourceNotFoundException" 14 | And I expect the response error message to include: 15 | """ 16 | The specified log group does not exist. 17 | """ 18 | -------------------------------------------------------------------------------- /vendor/github.com/ks3sdklib/aws-sdk-go/internal/features/cloudwatchlogs/client.go: -------------------------------------------------------------------------------- 1 | //Package cloudwatchlogs provides gucumber integration tests suppport. 2 | package cloudwatchlogs 3 | 4 | import ( 5 | "github.com/ks3sdklib/aws-sdk-go/internal/features/shared" 6 | "github.com/ks3sdklib/aws-sdk-go/service/cloudwatchlogs" 7 | . "github.com/lsegal/gucumber" 8 | ) 9 | 10 | var _ = shared.Imported 11 | 12 | func init() { 13 | Before("@cloudwatchlogs", func() { 14 | World["client"] = cloudwatchlogs.New(nil) 15 | }) 16 | } 17 | -------------------------------------------------------------------------------- /vendor/github.com/ks3sdklib/aws-sdk-go/internal/features/codedeploy/client.feature: -------------------------------------------------------------------------------- 1 | # language: en 2 | @codedeploy @client 3 | Feature: Amazon CodeDeploy 4 | 5 | Scenario: Making a basic request 6 | When I call the "ListApplications" API 7 | Then the value at "applications" should be a list 8 | 9 | Scenario: Error handling 10 | When I attempt to call the "GetApplication" API with: 11 | | applicationName | bogus-app | 12 | Then I expect the response error code to be "ApplicationDoesNotExistException" 13 | And I expect the response error message to include one of: 14 | | Applications not found for | 15 | | No application found for name | 16 | -------------------------------------------------------------------------------- /vendor/github.com/ks3sdklib/aws-sdk-go/internal/features/codedeploy/client.go: -------------------------------------------------------------------------------- 1 | //Package codedeploy provides gucumber integration tests suppport. 2 | package codedeploy 3 | 4 | import ( 5 | "github.com/ks3sdklib/aws-sdk-go/internal/features/shared" 6 | "github.com/ks3sdklib/aws-sdk-go/service/codedeploy" 7 | . "github.com/lsegal/gucumber" 8 | ) 9 | 10 | var _ = shared.Imported 11 | 12 | func init() { 13 | Before("@codedeploy", func() { 14 | World["client"] = codedeploy.New(nil) 15 | }) 16 | } 17 | -------------------------------------------------------------------------------- /vendor/github.com/ks3sdklib/aws-sdk-go/internal/features/cognitoidentity/client.feature: -------------------------------------------------------------------------------- 1 | # language: en 2 | @cognitoidentity @client 3 | Feature: Amazon Cognito Idenity 4 | 5 | Scenario: Making a basic request 6 | When I call the "ListIdentityPools" API with: 7 | | MaxResults | 10 | 8 | Then the value at "IdentityPools" should be a list 9 | 10 | Scenario: Error handling 11 | When I attempt to call the "DescribeIdentityPool" API with: 12 | | IdentityPoolId | us-east-1:aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee | 13 | Then I expect the response error code to be "ResourceNotFoundException" 14 | And I expect the response error message to include: 15 | """ 16 | IdentityPool 'us-east-1:aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee' not found 17 | """ 18 | -------------------------------------------------------------------------------- /vendor/github.com/ks3sdklib/aws-sdk-go/internal/features/cognitoidentity/client.go: -------------------------------------------------------------------------------- 1 | //Package cognitoidentity provides gucumber integration tests suppport. 2 | package cognitoidentity 3 | 4 | import ( 5 | "github.com/ks3sdklib/aws-sdk-go/internal/features/shared" 6 | "github.com/ks3sdklib/aws-sdk-go/service/cognitoidentity" 7 | . "github.com/lsegal/gucumber" 8 | ) 9 | 10 | var _ = shared.Imported 11 | 12 | func init() { 13 | Before("@cognitoidentity", func() { 14 | World["client"] = cognitoidentity.New(nil) 15 | }) 16 | } 17 | -------------------------------------------------------------------------------- /vendor/github.com/ks3sdklib/aws-sdk-go/internal/features/cognitosync/client.feature: -------------------------------------------------------------------------------- 1 | # language: en 2 | @cognitosync @client 3 | Feature: Amazon Cognito Sync 4 | 5 | Scenario: Making a basic request 6 | When I call the "ListIdentityPoolUsage" API 7 | Then the value at "IdentityPoolUsages" should be a list 8 | 9 | Scenario: Error handling 10 | When I attempt to call the "DescribeIdentityPoolUsage" API with: 11 | | IdentityPoolId | us-east-1:aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee | 12 | Then I expect the response error code to be "ResourceNotFoundException" 13 | And I expect the response error message to include: 14 | """ 15 | IdentityPool 'us-east-1:aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee' not found 16 | """ 17 | -------------------------------------------------------------------------------- /vendor/github.com/ks3sdklib/aws-sdk-go/internal/features/cognitosync/client.go: -------------------------------------------------------------------------------- 1 | //Package cognitosync provides gucumber integration tests suppport. 2 | package cognitosync 3 | 4 | import ( 5 | "github.com/ks3sdklib/aws-sdk-go/internal/features/shared" 6 | "github.com/ks3sdklib/aws-sdk-go/service/cognitosync" 7 | . "github.com/lsegal/gucumber" 8 | ) 9 | 10 | var _ = shared.Imported 11 | 12 | func init() { 13 | Before("@cognitosync", func() { 14 | World["client"] = cognitosync.New(nil) 15 | }) 16 | } 17 | -------------------------------------------------------------------------------- /vendor/github.com/ks3sdklib/aws-sdk-go/internal/features/configservice/client.feature: -------------------------------------------------------------------------------- 1 | # language: en 2 | @configservice @client 3 | Feature: AWS Config 4 | 5 | Scenario: Making a basic request 6 | When I call the "DescribeConfigurationRecorders" API 7 | Then the value at "ConfigurationRecorders" should be a list 8 | 9 | Scenario: Error handling 10 | When I attempt to call the "GetResourceConfigHistory" API with: 11 | | resourceType | fake-type | 12 | | resourceId | fake-id | 13 | Then I expect the response error code to be "ValidationException" 14 | And I expect the response error message to include: 15 | """ 16 | failed to satisfy constraint 17 | """ 18 | -------------------------------------------------------------------------------- /vendor/github.com/ks3sdklib/aws-sdk-go/internal/features/configservice/client.go: -------------------------------------------------------------------------------- 1 | //Package configservice provides gucumber integration tests suppport. 2 | package configservice 3 | 4 | import ( 5 | "github.com/ks3sdklib/aws-sdk-go/internal/features/shared" 6 | "github.com/ks3sdklib/aws-sdk-go/service/configservice" 7 | . "github.com/lsegal/gucumber" 8 | ) 9 | 10 | var _ = shared.Imported 11 | 12 | func init() { 13 | Before("@configservice", func() { 14 | World["client"] = configservice.New(nil) 15 | }) 16 | } 17 | -------------------------------------------------------------------------------- /vendor/github.com/ks3sdklib/aws-sdk-go/internal/features/datapipeline/client.feature: -------------------------------------------------------------------------------- 1 | # language: en 2 | @datapipeline @client 3 | Feature: AWS Data Pipeline 4 | 5 | Scenario: Making a basic request 6 | When I call the "ListPipelines" API 7 | Then the response should contain a "PipelineIdList" 8 | 9 | Scenario: Error handling 10 | When I attempt to call the "GetPipelineDefinition" API with: 11 | | PipelineId | fake-id | 12 | Then I expect the response error code to be "PipelineNotFoundException" 13 | And I expect the response error message to include: 14 | """ 15 | does not exist 16 | """ 17 | -------------------------------------------------------------------------------- /vendor/github.com/ks3sdklib/aws-sdk-go/internal/features/datapipeline/client.go: -------------------------------------------------------------------------------- 1 | //Package datapipeline provides gucumber integration tests suppport. 2 | package datapipeline 3 | 4 | import ( 5 | "github.com/ks3sdklib/aws-sdk-go/internal/features/shared" 6 | "github.com/ks3sdklib/aws-sdk-go/service/datapipeline" 7 | . "github.com/lsegal/gucumber" 8 | ) 9 | 10 | var _ = shared.Imported 11 | 12 | func init() { 13 | Before("@datapipeline", func() { 14 | World["client"] = datapipeline.New(nil) 15 | }) 16 | } 17 | -------------------------------------------------------------------------------- /vendor/github.com/ks3sdklib/aws-sdk-go/internal/features/directconnect/client.feature: -------------------------------------------------------------------------------- 1 | # language: en 2 | @directconnect @client 3 | Feature: AWS Direct Connect 4 | 5 | Scenario: Making a basic request 6 | When I call the "DescribeConnections" API 7 | Then the value at "Connections" should be a list 8 | 9 | Scenario: Error handling 10 | When I attempt to call the "DescribeConnections" API with: 11 | | connectionId | fake-connection | 12 | Then I expect the response error code to be "DirectConnectClientException" 13 | And I expect the response error message to include: 14 | """ 15 | Connection ID fake-connection has an invalid format 16 | """ 17 | -------------------------------------------------------------------------------- /vendor/github.com/ks3sdklib/aws-sdk-go/internal/features/directconnect/client.go: -------------------------------------------------------------------------------- 1 | //Package directconnect provides gucumber integration tests suppport. 2 | package directconnect 3 | 4 | import ( 5 | "github.com/ks3sdklib/aws-sdk-go/internal/features/shared" 6 | "github.com/ks3sdklib/aws-sdk-go/service/directconnect" 7 | . "github.com/lsegal/gucumber" 8 | ) 9 | 10 | var _ = shared.Imported 11 | 12 | func init() { 13 | Before("@directconnect", func() { 14 | World["client"] = directconnect.New(nil) 15 | }) 16 | } 17 | -------------------------------------------------------------------------------- /vendor/github.com/ks3sdklib/aws-sdk-go/internal/features/directoryservice/client.feature: -------------------------------------------------------------------------------- 1 | # language: en 2 | @directoryservice @client 3 | Feature: AWS Directory Service 4 | 5 | I want to use AWS Directory Service 6 | 7 | Scenario: Listing directories 8 | When I call the "DescribeDirectories" API 9 | Then the value at "DirectoryDescriptions" should be a list 10 | 11 | Scenario: Error handling 12 | When I attempt to call the "CreateDirectory" API with: 13 | | Name | | 14 | | Password | | 15 | | Size | | 16 | Then I expect the response error code to be "ValidationException" 17 | -------------------------------------------------------------------------------- /vendor/github.com/ks3sdklib/aws-sdk-go/internal/features/directoryservice/client.go: -------------------------------------------------------------------------------- 1 | //Package directoryservice provides gucumber integration tests suppport. 2 | package directoryservice 3 | 4 | import ( 5 | "github.com/ks3sdklib/aws-sdk-go/internal/features/shared" 6 | "github.com/ks3sdklib/aws-sdk-go/service/directoryservice" 7 | . "github.com/lsegal/gucumber" 8 | ) 9 | 10 | var _ = shared.Imported 11 | 12 | func init() { 13 | Before("@directoryservice", func() { 14 | // FIXME remove custom region 15 | World["client"] = directoryservice.New(nil) 16 | }) 17 | } 18 | -------------------------------------------------------------------------------- /vendor/github.com/ks3sdklib/aws-sdk-go/internal/features/dynamodb/client.feature: -------------------------------------------------------------------------------- 1 | # language: en 2 | @dynamodb @client 3 | Feature: Amazon DynamoDB 4 | 5 | Scenario: Making a basic request 6 | When I call the "ListTables" API with: 7 | | Limit | 1 | 8 | Then the value at "TableNames" should be a list 9 | 10 | Scenario: Error handling 11 | When I attempt to call the "DescribeTable" API with: 12 | | TableName | fake-table | 13 | Then I expect the response error code to be "ResourceNotFoundException" 14 | And I expect the response error message to include: 15 | """ 16 | Requested resource not found: Table: fake-table not found 17 | """ 18 | -------------------------------------------------------------------------------- /vendor/github.com/ks3sdklib/aws-sdk-go/internal/features/dynamodb/client.go: -------------------------------------------------------------------------------- 1 | //Package dynamodb provides gucumber integration tests suppport. 2 | package dynamodb 3 | 4 | import ( 5 | "github.com/ks3sdklib/aws-sdk-go/internal/features/shared" 6 | "github.com/ks3sdklib/aws-sdk-go/service/dynamodb" 7 | . "github.com/lsegal/gucumber" 8 | ) 9 | 10 | var _ = shared.Imported 11 | 12 | func init() { 13 | Before("@dynamodb", func() { 14 | World["client"] = dynamodb.New(nil) 15 | }) 16 | } 17 | -------------------------------------------------------------------------------- /vendor/github.com/ks3sdklib/aws-sdk-go/internal/features/ec2/client.feature: -------------------------------------------------------------------------------- 1 | # language: en 2 | @ec2 @client 3 | Feature: Amazon Elastic Compute Cloud 4 | 5 | Scenario: Making a basic request 6 | When I call the "DescribeRegions" API 7 | Then the value at "Regions" should be a list 8 | 9 | Scenario: Error handling 10 | When I attempt to call the "DescribeInstances" API with: 11 | | InstanceIds | ['i-12345678'] | 12 | Then I expect the response error code to be "InvalidInstanceID.NotFound" 13 | And I expect the response error message to include: 14 | """ 15 | The instance ID 'i-12345678' does not exist 16 | """ 17 | -------------------------------------------------------------------------------- /vendor/github.com/ks3sdklib/aws-sdk-go/internal/features/ec2/client.go: -------------------------------------------------------------------------------- 1 | //Package ec2 provides gucumber integration tests suppport. 2 | package ec2 3 | 4 | import ( 5 | "github.com/ks3sdklib/aws-sdk-go/internal/features/shared" 6 | "github.com/ks3sdklib/aws-sdk-go/service/ec2" 7 | . "github.com/lsegal/gucumber" 8 | ) 9 | 10 | var _ = shared.Imported 11 | 12 | func init() { 13 | Before("@ec2", func() { 14 | World["client"] = ec2.New(nil) 15 | }) 16 | } 17 | -------------------------------------------------------------------------------- /vendor/github.com/ks3sdklib/aws-sdk-go/internal/features/efs/client.feature: -------------------------------------------------------------------------------- 1 | # language: en 2 | @efs @client 3 | Feature: Amazon Elastic File System 4 | 5 | I want to use Amazon Elastic File System 6 | 7 | Scenario: Listing file systems 8 | When I call the "DescribeFileSystems" API 9 | Then the value at "FileSystems" should be a list 10 | 11 | Scenario: Error handling 12 | Given I attempt to call the "DeleteFileSystem" API with: 13 | | FileSystemId | fake-id | 14 | Then I expect the response error code to be "ValidationException" 15 | -------------------------------------------------------------------------------- /vendor/github.com/ks3sdklib/aws-sdk-go/internal/features/efs/client.go: -------------------------------------------------------------------------------- 1 | //Package efs provides gucumber integration tests suppport. 2 | package efs 3 | 4 | import ( 5 | "github.com/ks3sdklib/aws-sdk-go/aws" 6 | "github.com/ks3sdklib/aws-sdk-go/internal/features/shared" 7 | "github.com/ks3sdklib/aws-sdk-go/service/efs" 8 | . "github.com/lsegal/gucumber" 9 | ) 10 | 11 | var _ = shared.Imported 12 | 13 | func init() { 14 | Before("@efs", func() { 15 | // FIXME remove custom region 16 | World["client"] = efs.New(&aws.Config{Region: "us-west-2"}) 17 | }) 18 | } 19 | -------------------------------------------------------------------------------- /vendor/github.com/ks3sdklib/aws-sdk-go/internal/features/elasticache/client.feature: -------------------------------------------------------------------------------- 1 | # language: en 2 | @elasticache @client 3 | Feature: ElastiCache 4 | 5 | Scenario: Making a basic request 6 | When I call the "DescribeEvents" API 7 | Then the value at "Events" should be a list 8 | 9 | Scenario: Error handling 10 | When I attempt to call the "DescribeCacheClusters" API with: 11 | | CacheClusterId | fake_cluster | 12 | Then I expect the response error code to be "InvalidParameterValue" 13 | And I expect the response error message to include: 14 | """ 15 | The parameter CacheClusterIdentifier is not a valid identifier. 16 | """ 17 | -------------------------------------------------------------------------------- /vendor/github.com/ks3sdklib/aws-sdk-go/internal/features/elasticache/client.go: -------------------------------------------------------------------------------- 1 | //Package elasticache provides gucumber integration tests suppport. 2 | package elasticache 3 | 4 | import ( 5 | "github.com/ks3sdklib/aws-sdk-go/internal/features/shared" 6 | "github.com/ks3sdklib/aws-sdk-go/service/elasticache" 7 | . "github.com/lsegal/gucumber" 8 | ) 9 | 10 | var _ = shared.Imported 11 | 12 | func init() { 13 | Before("@elasticache", func() { 14 | World["client"] = elasticache.New(nil) 15 | }) 16 | } 17 | -------------------------------------------------------------------------------- /vendor/github.com/ks3sdklib/aws-sdk-go/internal/features/elasticbeanstalk/client.feature: -------------------------------------------------------------------------------- 1 | # language: en 2 | @elasticbeanstalk @client 3 | Feature: AWS Elastic Beanstalk 4 | 5 | Scenario: Making a basic request 6 | When I call the "ListAvailableSolutionStacks" API 7 | Then the value at "SolutionStacks" should be a list 8 | 9 | Scenario: Error handling 10 | When I attempt to call the "DescribeEnvironmentResources" API with: 11 | | EnvironmentId | fake_environment | 12 | Then I expect the response error code to be "InvalidParameterValue" 13 | And I expect the response error message to include: 14 | """ 15 | No Environment found for EnvironmentId = 'fake_environment'. 16 | """ 17 | -------------------------------------------------------------------------------- /vendor/github.com/ks3sdklib/aws-sdk-go/internal/features/elasticbeanstalk/client.go: -------------------------------------------------------------------------------- 1 | //Package elasticbeanstalk provides gucumber integration tests suppport. 2 | package elasticbeanstalk 3 | 4 | import ( 5 | "github.com/ks3sdklib/aws-sdk-go/internal/features/shared" 6 | "github.com/ks3sdklib/aws-sdk-go/service/elasticbeanstalk" 7 | . "github.com/lsegal/gucumber" 8 | ) 9 | 10 | var _ = shared.Imported 11 | 12 | func init() { 13 | Before("@elasticbeanstalk", func() { 14 | World["client"] = elasticbeanstalk.New(nil) 15 | }) 16 | } 17 | -------------------------------------------------------------------------------- /vendor/github.com/ks3sdklib/aws-sdk-go/internal/features/elastictranscoder/client.feature: -------------------------------------------------------------------------------- 1 | # language: en 2 | @elastictranscoder @client 3 | Feature: Amazon Elastic Transcoder 4 | 5 | Scenario: Making a basic request 6 | When I call the "ListPresets" API 7 | Then the value at "Presets" should be a list 8 | 9 | Scenario: Error handling 10 | When I attempt to call the "ReadJob" API with: 11 | | Id | fake_job | 12 | Then I expect the response error code to be "ValidationException" 13 | And I expect the response error message to include: 14 | """ 15 | Value 'fake_job' at 'id' failed to satisfy constraint 16 | """ 17 | -------------------------------------------------------------------------------- /vendor/github.com/ks3sdklib/aws-sdk-go/internal/features/elastictranscoder/client.go: -------------------------------------------------------------------------------- 1 | //Package elastictranscoder provides gucumber integration tests suppport. 2 | package elastictranscoder 3 | 4 | import ( 5 | "github.com/ks3sdklib/aws-sdk-go/internal/features/shared" 6 | "github.com/ks3sdklib/aws-sdk-go/service/elastictranscoder" 7 | . "github.com/lsegal/gucumber" 8 | ) 9 | 10 | var _ = shared.Imported 11 | 12 | func init() { 13 | Before("@elastictranscoder", func() { 14 | World["client"] = elastictranscoder.New(nil) 15 | }) 16 | } 17 | -------------------------------------------------------------------------------- /vendor/github.com/ks3sdklib/aws-sdk-go/internal/features/elb/client.feature: -------------------------------------------------------------------------------- 1 | # language: en 2 | @elb @client 3 | Feature: Elastic Load Balancing 4 | 5 | Scenario: Making a basic request 6 | When I call the "DescribeLoadBalancers" API 7 | Then the value at "LoadBalancerDescriptions" should be a list 8 | 9 | Scenario: Error handling 10 | When I attempt to call the "DescribeLoadBalancers" API with: 11 | | LoadBalancerNames | ['fake_load_balancer'] | 12 | Then I expect the response error code to be "ValidationError" 13 | And I expect the response error message to include: 14 | """ 15 | LoadBalancer name cannot contain characters that are not letters, or digits or the dash. 16 | """ 17 | -------------------------------------------------------------------------------- /vendor/github.com/ks3sdklib/aws-sdk-go/internal/features/elb/client.go: -------------------------------------------------------------------------------- 1 | //Package elb provides gucumber integration tests suppport. 2 | package elb 3 | 4 | import ( 5 | "github.com/ks3sdklib/aws-sdk-go/internal/features/shared" 6 | "github.com/ks3sdklib/aws-sdk-go/service/elb" 7 | . "github.com/lsegal/gucumber" 8 | ) 9 | 10 | var _ = shared.Imported 11 | 12 | func init() { 13 | Before("@elb", func() { 14 | World["client"] = elb.New(nil) 15 | }) 16 | } 17 | -------------------------------------------------------------------------------- /vendor/github.com/ks3sdklib/aws-sdk-go/internal/features/emr/client.feature: -------------------------------------------------------------------------------- 1 | # language: en 2 | @emr @client 3 | Feature: Amazon EMR 4 | 5 | Scenario: Making a basic request 6 | When I call the "DescribeJobFlows" API 7 | Then the value at "JobFlows" should be a list 8 | 9 | Scenario: Error handling 10 | When I attempt to call the "DescribeJobFlows" API with: 11 | | JobFlowIds | ['fake_job_flow'] | 12 | Then I expect the response error code to be "ValidationException" 13 | And I expect the response error message to include: 14 | """ 15 | Specified job flow ID not valid 16 | """ 17 | -------------------------------------------------------------------------------- /vendor/github.com/ks3sdklib/aws-sdk-go/internal/features/emr/client.go: -------------------------------------------------------------------------------- 1 | //Package emr provides gucumber integration tests suppport. 2 | package emr 3 | 4 | import ( 5 | "github.com/ks3sdklib/aws-sdk-go/internal/features/shared" 6 | "github.com/ks3sdklib/aws-sdk-go/service/emr" 7 | . "github.com/lsegal/gucumber" 8 | ) 9 | 10 | var _ = shared.Imported 11 | 12 | func init() { 13 | Before("@emr", func() { 14 | World["client"] = emr.New(nil) 15 | }) 16 | } 17 | -------------------------------------------------------------------------------- /vendor/github.com/ks3sdklib/aws-sdk-go/internal/features/glacier/client.feature: -------------------------------------------------------------------------------- 1 | # language: en 2 | @glacier @client 3 | Feature: Amazon Glacier 4 | 5 | Scenario: Making a basic request 6 | When I call the "ListVaults" API with: 7 | | AccountId | - | 8 | Then the response should contain a "VaultList" 9 | 10 | Scenario: Error handling 11 | When I attempt to call the "ListVaults" API with: 12 | | AccountId | abcmnoxyz | 13 | Then I expect the response error code to be "UnrecognizedClientException" 14 | And I expect the response error message to include: 15 | """ 16 | No account found for the given parameters 17 | """ 18 | -------------------------------------------------------------------------------- /vendor/github.com/ks3sdklib/aws-sdk-go/internal/features/glacier/client.go: -------------------------------------------------------------------------------- 1 | //Package glacier provides gucumber integration tests suppport. 2 | package glacier 3 | 4 | import ( 5 | "github.com/ks3sdklib/aws-sdk-go/internal/features/shared" 6 | "github.com/ks3sdklib/aws-sdk-go/service/glacier" 7 | . "github.com/lsegal/gucumber" 8 | ) 9 | 10 | var _ = shared.Imported 11 | 12 | func init() { 13 | Before("@glacier", func() { 14 | World["client"] = glacier.New(nil) 15 | }) 16 | } 17 | -------------------------------------------------------------------------------- /vendor/github.com/ks3sdklib/aws-sdk-go/internal/features/iam/client.feature: -------------------------------------------------------------------------------- 1 | # language: en 2 | @iam @client 3 | Feature: AWS Identity and Access Management 4 | 5 | Scenario: Making a basic request 6 | When I call the "ListUsers" API 7 | Then the value at "Users" should be a list 8 | 9 | Scenario: Error handling 10 | When I attempt to call the "GetUser" API with: 11 | | UserName | fake_user | 12 | Then I expect the response error code to be "NoSuchEntity" 13 | And I expect the response error message to include: 14 | """ 15 | The user with name fake_user cannot be found. 16 | """ 17 | -------------------------------------------------------------------------------- /vendor/github.com/ks3sdklib/aws-sdk-go/internal/features/iam/client.go: -------------------------------------------------------------------------------- 1 | //Package iam provides gucumber integration tests suppport. 2 | package iam 3 | 4 | import ( 5 | "github.com/ks3sdklib/aws-sdk-go/internal/features/shared" 6 | "github.com/ks3sdklib/aws-sdk-go/service/iam" 7 | . "github.com/lsegal/gucumber" 8 | ) 9 | 10 | var _ = shared.Imported 11 | 12 | func init() { 13 | Before("@iam", func() { 14 | World["client"] = iam.New(nil) 15 | }) 16 | } 17 | -------------------------------------------------------------------------------- /vendor/github.com/ks3sdklib/aws-sdk-go/internal/features/kinesis/client.feature: -------------------------------------------------------------------------------- 1 | # language: en 2 | @kinesis @client 3 | Feature: AWS Kinesis 4 | 5 | Scenario: Making a basic request 6 | When I call the "ListStreams" API 7 | Then the value at "StreamNames" should be a list 8 | 9 | Scenario: Error handling 10 | When I attempt to call the "DescribeStream" API with: 11 | | StreamName | bogus-stream-name | 12 | Then I expect the response error code to be "ResourceNotFoundException" 13 | And I expect the response error message to include: 14 | """ 15 | Stream bogus-stream-name under account 16 | """ 17 | -------------------------------------------------------------------------------- /vendor/github.com/ks3sdklib/aws-sdk-go/internal/features/kinesis/client.go: -------------------------------------------------------------------------------- 1 | //Package kinesis provides gucumber integration tests suppport. 2 | package kinesis 3 | 4 | import ( 5 | "github.com/ks3sdklib/aws-sdk-go/internal/features/shared" 6 | "github.com/ks3sdklib/aws-sdk-go/service/kinesis" 7 | . "github.com/lsegal/gucumber" 8 | ) 9 | 10 | var _ = shared.Imported 11 | 12 | func init() { 13 | Before("@kinesis", func() { 14 | World["client"] = kinesis.New(nil) 15 | }) 16 | } 17 | -------------------------------------------------------------------------------- /vendor/github.com/ks3sdklib/aws-sdk-go/internal/features/kms/client.feature: -------------------------------------------------------------------------------- 1 | # language: en 2 | @kms @client 3 | Feature: Amazon Key Management Service 4 | 5 | Scenario: Making a basic request 6 | When I call the "ListAliases" API 7 | Then the value at "Aliases" should be a list 8 | 9 | Scenario: Error handling 10 | When I attempt to call the "GetKeyPolicy" API with: 11 | | KeyId | fake-key | 12 | | PolicyName | fake-policy | 13 | Then I expect the response error code to be "NotFoundException" 14 | And I expect the response error message to include: 15 | """ 16 | does not exist 17 | """ 18 | -------------------------------------------------------------------------------- /vendor/github.com/ks3sdklib/aws-sdk-go/internal/features/kms/client.go: -------------------------------------------------------------------------------- 1 | //Package kms provides gucumber integration tests suppport. 2 | package kms 3 | 4 | import ( 5 | "github.com/ks3sdklib/aws-sdk-go/internal/features/shared" 6 | "github.com/ks3sdklib/aws-sdk-go/service/kms" 7 | . "github.com/lsegal/gucumber" 8 | ) 9 | 10 | var _ = shared.Imported 11 | 12 | func init() { 13 | Before("@kms", func() { 14 | World["client"] = kms.New(nil) 15 | }) 16 | } 17 | -------------------------------------------------------------------------------- /vendor/github.com/ks3sdklib/aws-sdk-go/internal/features/lambda/client.feature: -------------------------------------------------------------------------------- 1 | # language: en 2 | @lambda @client 3 | Feature: Amazon Lambda 4 | 5 | Scenario: Making a basic request 6 | When I call the "ListEventSourceMappings" API 7 | Then the value at "EventSourceMappings" should be a list 8 | 9 | Scenario: Error handling 10 | When I attempt to call the "GetEventSourceMapping" API with: 11 | | UUID | fake-uuid | 12 | Then I expect the response error code to be "ResourceNotFoundException" 13 | And I expect the response error message to include: 14 | """ 15 | does not exist 16 | """ 17 | -------------------------------------------------------------------------------- /vendor/github.com/ks3sdklib/aws-sdk-go/internal/features/lambda/client.go: -------------------------------------------------------------------------------- 1 | //Package lambda provides gucumber integration tests suppport. 2 | package lambda 3 | 4 | import ( 5 | "github.com/ks3sdklib/aws-sdk-go/internal/features/shared" 6 | "github.com/ks3sdklib/aws-sdk-go/service/lambda" 7 | . "github.com/lsegal/gucumber" 8 | ) 9 | 10 | var _ = shared.Imported 11 | 12 | func init() { 13 | Before("@lambda", func() { 14 | World["client"] = lambda.New(nil) 15 | }) 16 | } 17 | -------------------------------------------------------------------------------- /vendor/github.com/ks3sdklib/aws-sdk-go/internal/features/machinelearning/client.feature: -------------------------------------------------------------------------------- 1 | # language: en 2 | @machinelearning @client 3 | Feature: Amazon Machine Learning 4 | 5 | I want to use Amazon Machine Learning 6 | 7 | Scenario: Describing MLModels 8 | When I call the "DescribeMLModels" API 9 | Then the value at "Results" should be a list 10 | 11 | Scenario: Error handling 12 | When I attempt to call the "GetBatchPrediction" API with: 13 | | BatchPredictionId | non-exist | 14 | Then I expect the response error code to be "ResourceNotFoundException" 15 | -------------------------------------------------------------------------------- /vendor/github.com/ks3sdklib/aws-sdk-go/internal/features/machinelearning/client.go: -------------------------------------------------------------------------------- 1 | //Package machinelearning provides gucumber integration tests suppport. 2 | package machinelearning 3 | 4 | import ( 5 | "github.com/ks3sdklib/aws-sdk-go/internal/features/shared" 6 | "github.com/ks3sdklib/aws-sdk-go/service/machinelearning" 7 | . "github.com/lsegal/gucumber" 8 | ) 9 | 10 | var _ = shared.Imported 11 | 12 | func init() { 13 | Before("@machinelearning", func() { 14 | World["client"] = machinelearning.New(nil) 15 | }) 16 | } 17 | -------------------------------------------------------------------------------- /vendor/github.com/ks3sdklib/aws-sdk-go/internal/features/opsworks/client.feature: -------------------------------------------------------------------------------- 1 | # language: en 2 | @opsworks @client 3 | Feature: AWS OpsWorks 4 | 5 | Scenario: Making a basic request 6 | When I call the "DescribeStacks" API 7 | Then the value at "Stacks" should be a list 8 | 9 | Scenario: Error handling 10 | When I attempt to call the "DescribeLayers" API with: 11 | | StackId | fake_stack | 12 | Then I expect the response error code to be "ResourceNotFoundException" 13 | And I expect the response error message to include: 14 | """ 15 | Unable to find stack with ID fake_stack 16 | """ 17 | -------------------------------------------------------------------------------- /vendor/github.com/ks3sdklib/aws-sdk-go/internal/features/opsworks/client.go: -------------------------------------------------------------------------------- 1 | //Package opsworks provides gucumber integration tests suppport. 2 | package opsworks 3 | 4 | import ( 5 | "github.com/ks3sdklib/aws-sdk-go/internal/features/shared" 6 | "github.com/ks3sdklib/aws-sdk-go/service/opsworks" 7 | . "github.com/lsegal/gucumber" 8 | ) 9 | 10 | var _ = shared.Imported 11 | 12 | func init() { 13 | Before("@opsworks", func() { 14 | World["client"] = opsworks.New(nil) 15 | }) 16 | } 17 | -------------------------------------------------------------------------------- /vendor/github.com/ks3sdklib/aws-sdk-go/internal/features/rds/client.feature: -------------------------------------------------------------------------------- 1 | # language: en 2 | @rds @client 3 | Feature: Amazon RDS 4 | 5 | Scenario: Making a basic request 6 | When I call the "DescribeDbEngineVersions" API 7 | Then the value at "DbEngineVersions" should be a list 8 | 9 | Scenario: Error handling 10 | When I attempt to call the "DescribeDbInstances" API with: 11 | | DbInstanceIdentifier | fake-id | 12 | Then I expect the response error code to be "DBInstanceNotFound" 13 | And I expect the response error message to include: 14 | """ 15 | DBInstance fake-id not found. 16 | """ 17 | -------------------------------------------------------------------------------- /vendor/github.com/ks3sdklib/aws-sdk-go/internal/features/rds/client.go: -------------------------------------------------------------------------------- 1 | //Package rds provides gucumber integration tests suppport. 2 | package rds 3 | 4 | import ( 5 | "github.com/ks3sdklib/aws-sdk-go/internal/features/shared" 6 | "github.com/ks3sdklib/aws-sdk-go/service/rds" 7 | . "github.com/lsegal/gucumber" 8 | ) 9 | 10 | var _ = shared.Imported 11 | 12 | func init() { 13 | Before("@rds", func() { 14 | World["client"] = rds.New(nil) 15 | }) 16 | } 17 | -------------------------------------------------------------------------------- /vendor/github.com/ks3sdklib/aws-sdk-go/internal/features/redshift/client.feature: -------------------------------------------------------------------------------- 1 | # language: en 2 | @redshift @client 3 | Feature: Amazon Redshift 4 | 5 | Scenario: Making a basic request 6 | When I call the "DescribeClusterVersions" API 7 | Then the value at "ClusterVersions" should be a list 8 | 9 | Scenario: Error handling 10 | When I attempt to call the "DescribeClusters" API with: 11 | | ClusterIdentifier | fake-cluster | 12 | Then I expect the response error code to be "ClusterNotFound" 13 | And I expect the response error message to include: 14 | """ 15 | Cluster fake-cluster not found. 16 | """ 17 | -------------------------------------------------------------------------------- /vendor/github.com/ks3sdklib/aws-sdk-go/internal/features/redshift/client.go: -------------------------------------------------------------------------------- 1 | //Package redshift provides gucumber integration tests suppport. 2 | package redshift 3 | 4 | import ( 5 | "github.com/ks3sdklib/aws-sdk-go/internal/features/shared" 6 | "github.com/ks3sdklib/aws-sdk-go/service/redshift" 7 | . "github.com/lsegal/gucumber" 8 | ) 9 | 10 | var _ = shared.Imported 11 | 12 | func init() { 13 | Before("@redshift", func() { 14 | World["client"] = redshift.New(nil) 15 | }) 16 | } 17 | -------------------------------------------------------------------------------- /vendor/github.com/ks3sdklib/aws-sdk-go/internal/features/route53/client.feature: -------------------------------------------------------------------------------- 1 | # language: en 2 | @route53 @client 3 | Feature: Amazon Route 53 4 | 5 | Scenario: Making a basic request 6 | When I call the "ListHostedZones" API 7 | Then the value at "HostedZones" should be a list 8 | 9 | Scenario: Error handling 10 | When I attempt to call the "GetHostedZone" API with: 11 | | Id | fake-zone | 12 | Then I expect the response error code to be "NoSuchHostedZone" 13 | And I expect the response error message to include: 14 | """ 15 | No hosted zone found with ID: fake-zone 16 | """ 17 | -------------------------------------------------------------------------------- /vendor/github.com/ks3sdklib/aws-sdk-go/internal/features/route53/client.go: -------------------------------------------------------------------------------- 1 | //Package route53 provides gucumber integration tests suppport. 2 | package route53 3 | 4 | import ( 5 | "github.com/ks3sdklib/aws-sdk-go/internal/features/shared" 6 | "github.com/ks3sdklib/aws-sdk-go/service/route53" 7 | . "github.com/lsegal/gucumber" 8 | ) 9 | 10 | var _ = shared.Imported 11 | 12 | func init() { 13 | Before("@route53", func() { 14 | World["client"] = route53.New(nil) 15 | }) 16 | } 17 | -------------------------------------------------------------------------------- /vendor/github.com/ks3sdklib/aws-sdk-go/internal/features/route53domains/client.feature: -------------------------------------------------------------------------------- 1 | # language: en 2 | @route53domains @client 3 | Feature: Amazon Route53 Domains 4 | 5 | Scenario: Making a basic request 6 | When I call the "ListDomains" API 7 | Then the value at "Domains" should be a list 8 | 9 | Scenario: Error handling 10 | When I attempt to call the "GetDomainDetail" API with: 11 | | DomainName | fake-domain-name | 12 | Then I expect the response error code to be "InvalidInput" 13 | And I expect the response error message to include: 14 | """ 15 | domain name must contain more than 1 label 16 | """ 17 | -------------------------------------------------------------------------------- /vendor/github.com/ks3sdklib/aws-sdk-go/internal/features/route53domains/client.go: -------------------------------------------------------------------------------- 1 | //Package route53domains provides gucumber integration tests suppport. 2 | package route53domains 3 | 4 | import ( 5 | "github.com/ks3sdklib/aws-sdk-go/internal/features/shared" 6 | "github.com/ks3sdklib/aws-sdk-go/service/route53domains" 7 | . "github.com/lsegal/gucumber" 8 | ) 9 | 10 | var _ = shared.Imported 11 | 12 | func init() { 13 | Before("@route53domains", func() { 14 | World["client"] = route53domains.New(nil) 15 | }) 16 | } 17 | -------------------------------------------------------------------------------- /vendor/github.com/ks3sdklib/aws-sdk-go/internal/features/ses/client.feature: -------------------------------------------------------------------------------- 1 | # language: en 2 | @ses @client 3 | Feature: Amazon Simple Email Service 4 | 5 | Scenario: Making a basic request 6 | When I call the "ListIdentities" API 7 | Then the value at "Identities" should be a list 8 | 9 | Scenario: Error handling 10 | When I attempt to call the "VerifyEmailIdentity" API with: 11 | | EmailAddress | fake_email | 12 | Then I expect the response error code to be "InvalidParameterValue" 13 | And I expect the response error message to include: 14 | """ 15 | Invalid email address. 16 | """ 17 | -------------------------------------------------------------------------------- /vendor/github.com/ks3sdklib/aws-sdk-go/internal/features/ses/client.go: -------------------------------------------------------------------------------- 1 | //Package ses provides gucumber integration tests suppport. 2 | package ses 3 | 4 | import ( 5 | "github.com/ks3sdklib/aws-sdk-go/internal/features/shared" 6 | "github.com/ks3sdklib/aws-sdk-go/service/ses" 7 | . "github.com/lsegal/gucumber" 8 | ) 9 | 10 | var _ = shared.Imported 11 | 12 | func init() { 13 | Before("@ses", func() { 14 | World["client"] = ses.New(nil) 15 | }) 16 | } 17 | -------------------------------------------------------------------------------- /vendor/github.com/ks3sdklib/aws-sdk-go/internal/features/sns/client.feature: -------------------------------------------------------------------------------- 1 | # language: en 2 | @sns @client 3 | Feature: Amazon Simple Notification Service 4 | 5 | Scenario: Making a basic request 6 | When I call the "ListTopics" API 7 | Then the value at "Topics" should be a list 8 | 9 | Scenario: Error handling 10 | When I attempt to call the "Publish" API with: 11 | | Message | hello | 12 | | TopicArn | fake_topic | 13 | Then I expect the response error code to be "InvalidParameter" 14 | And I expect the response error message to include: 15 | """ 16 | Invalid parameter: TopicArn Reason: fake_topic does not start with arn 17 | """ 18 | -------------------------------------------------------------------------------- /vendor/github.com/ks3sdklib/aws-sdk-go/internal/features/sns/client.go: -------------------------------------------------------------------------------- 1 | //Package sns provides gucumber integration tests suppport. 2 | package sns 3 | 4 | import ( 5 | "github.com/ks3sdklib/aws-sdk-go/internal/features/shared" 6 | "github.com/ks3sdklib/aws-sdk-go/service/sns" 7 | . "github.com/lsegal/gucumber" 8 | ) 9 | 10 | var _ = shared.Imported 11 | 12 | func init() { 13 | Before("@sns", func() { 14 | World["client"] = sns.New(nil) 15 | }) 16 | } 17 | -------------------------------------------------------------------------------- /vendor/github.com/ks3sdklib/aws-sdk-go/internal/features/sqs/client.feature: -------------------------------------------------------------------------------- 1 | # language: en 2 | @sqs @client 3 | Feature: Amazon Simple Queue Service 4 | 5 | Scenario: Making a basic request 6 | When I call the "ListQueues" API 7 | Then the value at "QueueUrls" should be a list 8 | 9 | Scenario: Error handling 10 | When I attempt to call the "GetQueueUrl" API with: 11 | | QueueName | fake_queue | 12 | Then I expect the response error code to be "AWS.SimpleQueueService.NonExistentQueue" 13 | And I expect the response error message to include: 14 | """ 15 | The specified queue does not exist for this wsdl version. 16 | """ 17 | -------------------------------------------------------------------------------- /vendor/github.com/ks3sdklib/aws-sdk-go/internal/features/sqs/client.go: -------------------------------------------------------------------------------- 1 | //Package sqs provides gucumber integration tests suppport. 2 | package sqs 3 | 4 | import ( 5 | "github.com/ks3sdklib/aws-sdk-go/internal/features/shared" 6 | "github.com/ks3sdklib/aws-sdk-go/service/sqs" 7 | . "github.com/lsegal/gucumber" 8 | ) 9 | 10 | var _ = shared.Imported 11 | 12 | func init() { 13 | Before("@sqs", func() { 14 | World["client"] = sqs.New(nil) 15 | }) 16 | } 17 | -------------------------------------------------------------------------------- /vendor/github.com/ks3sdklib/aws-sdk-go/internal/features/ssm/client.feature: -------------------------------------------------------------------------------- 1 | # language: en 2 | @ssm @client 3 | Feature: Amazon SSM 4 | 5 | Scenario: Making a basic request 6 | When I call the "ListDocuments" API 7 | Then the value at "DocumentIdentifiers" should be a list 8 | 9 | Scenario: Error handling 10 | When I attempt to call the "GetDocument" API with: 11 | | name | 'fake-name' | 12 | Then I expect the response error code to be "ValidationException" 13 | And I expect the response error message to include: 14 | """ 15 | validation error detected 16 | """ 17 | -------------------------------------------------------------------------------- /vendor/github.com/ks3sdklib/aws-sdk-go/internal/features/ssm/client.go: -------------------------------------------------------------------------------- 1 | //Package ssm provides gucumber integration tests suppport. 2 | package ssm 3 | 4 | import ( 5 | "github.com/ks3sdklib/aws-sdk-go/internal/features/shared" 6 | "github.com/ks3sdklib/aws-sdk-go/service/ssm" 7 | . "github.com/lsegal/gucumber" 8 | ) 9 | 10 | var _ = shared.Imported 11 | 12 | func init() { 13 | Before("@ssm", func() { 14 | World["client"] = ssm.New(nil) 15 | }) 16 | } 17 | -------------------------------------------------------------------------------- /vendor/github.com/ks3sdklib/aws-sdk-go/internal/features/storagegateway/client.feature: -------------------------------------------------------------------------------- 1 | # language: en 2 | @storagegateway @client 3 | Feature: AWS Storage Gateway 4 | 5 | Scenario: Making a basic request 6 | When I call the "ListGateways" API 7 | Then the value at "Gateways" should be a list 8 | 9 | Scenario: Error handling 10 | When I attempt to call the "ListVolumes" API with: 11 | | GatewayARN | fake_gateway | 12 | Then I expect the response error code to be "ValidationException" 13 | And I expect the response error message to include: 14 | """ 15 | Value 'fake_gateway' at 'gatewayARN' failed to satisfy constraint 16 | """ 17 | -------------------------------------------------------------------------------- /vendor/github.com/ks3sdklib/aws-sdk-go/internal/features/storagegateway/client.go: -------------------------------------------------------------------------------- 1 | //Package storagegateway provides gucumber integration tests suppport. 2 | package storagegateway 3 | 4 | import ( 5 | "github.com/ks3sdklib/aws-sdk-go/internal/features/shared" 6 | "github.com/ks3sdklib/aws-sdk-go/service/storagegateway" 7 | . "github.com/lsegal/gucumber" 8 | ) 9 | 10 | var _ = shared.Imported 11 | 12 | func init() { 13 | Before("@storagegateway", func() { 14 | World["client"] = storagegateway.New(nil) 15 | }) 16 | } 17 | -------------------------------------------------------------------------------- /vendor/github.com/ks3sdklib/aws-sdk-go/internal/features/sts/client.feature: -------------------------------------------------------------------------------- 1 | # language: en 2 | @sts @client 3 | Feature: AWS STS 4 | 5 | Scenario: Making a basic request 6 | When I call the "GetSessionToken" API 7 | Then the response should contain a "Credentials" 8 | 9 | Scenario: Error handling 10 | When I attempt to call the "GetFederationToken" API with: 11 | | Name | temp | 12 | | Policy | | 13 | Then I expect the response error code to be "ValidationError" 14 | And I expect the response error message to include: 15 | """ 16 | Value '' at 'policy' failed to satisfy constraint 17 | """ 18 | -------------------------------------------------------------------------------- /vendor/github.com/ks3sdklib/aws-sdk-go/internal/features/sts/client.go: -------------------------------------------------------------------------------- 1 | //Package sts provides gucumber integration tests suppport. 2 | package sts 3 | 4 | import ( 5 | "github.com/ks3sdklib/aws-sdk-go/internal/features/shared" 6 | "github.com/ks3sdklib/aws-sdk-go/service/sts" 7 | . "github.com/lsegal/gucumber" 8 | ) 9 | 10 | var _ = shared.Imported 11 | 12 | func init() { 13 | Before("@sts", func() { 14 | World["client"] = sts.New(nil) 15 | }) 16 | } 17 | -------------------------------------------------------------------------------- /vendor/github.com/ks3sdklib/aws-sdk-go/internal/features/swf/client.feature: -------------------------------------------------------------------------------- 1 | # language: en 2 | @swf @client 3 | Feature: Amazon Simple Workflow Service 4 | 5 | Scenario: Making a basic request 6 | When I call the "ListDomains" API with: 7 | | RegistrationStatus | REGISTERED | 8 | Then the value at "DomainInfos" should be a list 9 | 10 | Scenario: Error handling 11 | When I attempt to call the "DescribeDomain" API with: 12 | | Name | fake_domain | 13 | Then I expect the response error code to be "UnknownResourceFault" 14 | And I expect the response error message to include: 15 | """ 16 | Unknown domain: fake_domain 17 | """ 18 | -------------------------------------------------------------------------------- /vendor/github.com/ks3sdklib/aws-sdk-go/internal/features/swf/client.go: -------------------------------------------------------------------------------- 1 | //Package swf provides gucumber integration tests suppport. 2 | package swf 3 | 4 | import ( 5 | "github.com/ks3sdklib/aws-sdk-go/internal/features/shared" 6 | "github.com/ks3sdklib/aws-sdk-go/service/swf" 7 | . "github.com/lsegal/gucumber" 8 | ) 9 | 10 | var _ = shared.Imported 11 | 12 | func init() { 13 | Before("@swf", func() { 14 | World["client"] = swf.New(nil) 15 | }) 16 | } 17 | -------------------------------------------------------------------------------- /vendor/github.com/ks3sdklib/aws-sdk-go/internal/features/workspaces/client.feature: -------------------------------------------------------------------------------- 1 | # language: en 2 | @workspaces @client 3 | Feature: Amazon WorkSpaces 4 | 5 | I want to use Amazon WorkSpaces 6 | 7 | Scenario: Describing workspaces 8 | When I call the "DescribeWorkspaces" API 9 | Then the value at "Workspaces" should be a list 10 | 11 | Scenario: Error handling 12 | Given I attempt to call the "DescribeWorkspaces" API with: 13 | | WorkspaceIds | [''] | 14 | Then I expect the response error code to be "ValidationException" 15 | -------------------------------------------------------------------------------- /vendor/github.com/ks3sdklib/aws-sdk-go/internal/features/workspaces/client.go: -------------------------------------------------------------------------------- 1 | //Package workspaces provides gucumber integration tests suppport. 2 | package workspaces 3 | 4 | import ( 5 | "github.com/ks3sdklib/aws-sdk-go/internal/features/shared" 6 | "github.com/ks3sdklib/aws-sdk-go/service/workspaces" 7 | . "github.com/lsegal/gucumber" 8 | ) 9 | 10 | var _ = shared.Imported 11 | 12 | func init() { 13 | Before("@workspaces", func() { 14 | World["client"] = workspaces.New(nil) 15 | }) 16 | } 17 | -------------------------------------------------------------------------------- /vendor/github.com/ks3sdklib/aws-sdk-go/internal/model/api/api_test.go: -------------------------------------------------------------------------------- 1 | package api 2 | 3 | import ( 4 | "testing" 5 | 6 | "github.com/stretchr/testify/assert" 7 | ) 8 | 9 | func TestStructNameWithFullName(t *testing.T) { 10 | a := API{ 11 | Metadata: Metadata{ 12 | ServiceFullName: "Amazon Service Name-100", 13 | }, 14 | } 15 | assert.Equal(t, a.StructName(), "ServiceName100") 16 | } 17 | 18 | func TestStructNameWithAbbreviation(t *testing.T) { 19 | a := API{ 20 | Metadata: Metadata{ 21 | ServiceFullName: "AWS Service Name-100", 22 | ServiceAbbreviation: "AWS SN100", 23 | }, 24 | } 25 | assert.Equal(t, a.StructName(), "SN100") 26 | } 27 | 28 | func TestStructNameForExceptions(t *testing.T) { 29 | a := API{ 30 | Metadata: Metadata{ 31 | ServiceFullName: "Elastic Load Balancing", 32 | }, 33 | } 34 | assert.Equal(t, a.StructName(), "ELB") 35 | 36 | a = API{ 37 | Metadata: Metadata{ 38 | ServiceFullName: "AWS Config", 39 | }, 40 | } 41 | assert.Equal(t, a.StructName(), "ConfigService") 42 | } 43 | -------------------------------------------------------------------------------- /vendor/github.com/ks3sdklib/aws-sdk-go/internal/model/api/customization_passes.go: -------------------------------------------------------------------------------- 1 | package api 2 | 3 | var svcCustomizations = map[string]func(*API){ 4 | "s3": s3Customizations, 5 | "cloudfront": cloudfrontCustomizations, 6 | } 7 | 8 | // customizationPasses Executes customization logic for the API by package name. 9 | func (a *API) customizationPasses() { 10 | if fn := svcCustomizations[a.PackageName()]; fn != nil { 11 | fn(a) 12 | } 13 | } 14 | 15 | // s3Customizations customizes the API generation to replace values specific to S3. 16 | func s3Customizations(a *API) { 17 | // Remove ContentMD5 members 18 | for _, s := range a.Shapes { 19 | if _, ok := s.MemberRefs["ContentMD5"]; ok { 20 | delete(s.MemberRefs, "ContentMD5") 21 | } 22 | } 23 | 24 | // Rename "Rule" to "LifecycleRule" 25 | if s, ok := a.Shapes["Rule"]; ok { 26 | s.Rename("LifecycleRule") 27 | } 28 | } 29 | 30 | // cloudfrontCustomizations customized the API generation to replace values 31 | // specific to CloudFront. 32 | func cloudfrontCustomizations(a *API) { 33 | // MaxItems members should always be integers 34 | for _, s := range a.Shapes { 35 | if ref, ok := s.MemberRefs["MaxItems"]; ok { 36 | ref.ShapeName = "Integer" 37 | ref.Shape = a.Shapes["Integer"] 38 | } 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /vendor/github.com/ks3sdklib/aws-sdk-go/internal/model/cli/api-info/api-info.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "fmt" 5 | "os" 6 | "path/filepath" 7 | "sort" 8 | 9 | "github.com/ks3sdklib/aws-sdk-go/internal/model/api" 10 | ) 11 | 12 | func main() { 13 | dir, _ := os.Open("apis") 14 | names, _ := dir.Readdirnames(0) 15 | for _, name := range names { 16 | m, _ := filepath.Glob(filepath.Join("apis", name, "*.normal.json")) 17 | if len(m) == 0 { 18 | continue 19 | } 20 | 21 | sort.Strings(m) 22 | f := m[len(m)-1] 23 | a := api.API{} 24 | a.Attach(f) 25 | fmt.Printf("%s\t%s\n", a.Metadata.ServiceFullName, a.Metadata.APIVersion) 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /vendor/github.com/ks3sdklib/aws-sdk-go/internal/model/cli/gen-endpoints/main.go: -------------------------------------------------------------------------------- 1 | // Command aws-gen-goendpoints parses a JSON description of the AWS endpoint 2 | // discovery logic and generates a Go file which returns an endpoint. 3 | // 4 | // aws-gen-goendpoints apis/_endpoints.json aws/endpoints_map.go 5 | package main 6 | 7 | import ( 8 | "encoding/json" 9 | "os" 10 | 11 | "github.com/ks3sdklib/aws-sdk-go/internal/model" 12 | ) 13 | 14 | // Generates the endpoints from json description 15 | // 16 | // CLI Args: 17 | // [0] This file's execution path 18 | // [1] The definition file to use 19 | // [2] The output file to generate 20 | func main() { 21 | in, err := os.Open(os.Args[1]) 22 | if err != nil { 23 | panic(err) 24 | } 25 | defer in.Close() 26 | 27 | var endpoints struct { 28 | Version int 29 | Endpoints map[string]struct { 30 | Endpoint string 31 | SigningRegion string 32 | } 33 | } 34 | if err := json.NewDecoder(in).Decode(&endpoints); err != nil { 35 | panic(err) 36 | } 37 | 38 | out, err := os.Create(os.Args[2]) 39 | if err != nil { 40 | panic(err) 41 | } 42 | defer out.Close() 43 | 44 | if err := model.GenerateEndpoints(endpoints, out); err != nil { 45 | panic(err) 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /vendor/github.com/ks3sdklib/aws-sdk-go/internal/model/endpoints.go: -------------------------------------------------------------------------------- 1 | package model 2 | 3 | import ( 4 | "bytes" 5 | "go/format" 6 | "io" 7 | "text/template" 8 | ) 9 | 10 | // GenerateEndpoints writes a Go file to the given writer. 11 | func GenerateEndpoints(endpoints interface{}, w io.Writer) error { 12 | tmpl, err := template.New("endpoints").Parse(t) 13 | if err != nil { 14 | return err 15 | } 16 | 17 | out := bytes.NewBuffer(nil) 18 | if err := tmpl.Execute(out, endpoints); err != nil { 19 | return err 20 | } 21 | 22 | b, err := format.Source(bytes.TrimSpace(out.Bytes())) 23 | if err != nil { 24 | return err 25 | } 26 | 27 | _, err = io.Copy(w, bytes.NewReader(b)) 28 | return err 29 | } 30 | 31 | const t = ` 32 | package endpoints 33 | 34 | // THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT. 35 | 36 | type endpointStruct struct { 37 | Version int 38 | Endpoints map[string]endpointEntry 39 | } 40 | 41 | type endpointEntry struct { 42 | Endpoint string 43 | SigningRegion string 44 | } 45 | 46 | var endpointsMap = endpointStruct{ 47 | Version: {{ .Version }}, 48 | Endpoints: map[string]endpointEntry{ 49 | {{ range $key, $entry := .Endpoints }}"{{ $key }}": endpointEntry{ 50 | Endpoint: "{{ $entry.Endpoint }}", 51 | {{ if ne $entry.SigningRegion "" }}SigningRegion: "{{ $entry.SigningRegion }}", 52 | {{ end }} 53 | }, 54 | {{ end }} 55 | }, 56 | } 57 | ` 58 | -------------------------------------------------------------------------------- /vendor/github.com/ks3sdklib/aws-sdk-go/internal/protocol/ec2query/build.go: -------------------------------------------------------------------------------- 1 | // Package ec2query provides serialisation of AWS EC2 requests and responses. 2 | package ec2query 3 | 4 | //go:generate go run ../../fixtures/protocol/generate.go ../../fixtures/protocol/input/ec2.json build_test.go 5 | 6 | import ( 7 | "net/url" 8 | 9 | "github.com/ks3sdklib/aws-sdk-go/aws" 10 | "github.com/ks3sdklib/aws-sdk-go/internal/apierr" 11 | "github.com/ks3sdklib/aws-sdk-go/internal/protocol/query/queryutil" 12 | ) 13 | 14 | // Build builds a request for the EC2 protocol. 15 | func Build(r *aws.Request) { 16 | body := url.Values{ 17 | "Action": {r.Operation.Name}, 18 | "Version": {r.Service.APIVersion}, 19 | } 20 | if err := queryutil.Parse(body, r.Params, true); err != nil { 21 | r.Error = apierr.New("Marshal", "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/ks3sdklib/aws-sdk-go/internal/protocol/query/build.go: -------------------------------------------------------------------------------- 1 | // Package query provides serialisation of AWS query requests, and responses. 2 | package query 3 | 4 | //go:generate go run ../../fixtures/protocol/generate.go ../../fixtures/protocol/input/query.json build_test.go 5 | 6 | import ( 7 | "net/url" 8 | 9 | "github.com/ks3sdklib/aws-sdk-go/aws" 10 | "github.com/ks3sdklib/aws-sdk-go/internal/apierr" 11 | "github.com/ks3sdklib/aws-sdk-go/internal/protocol/query/queryutil" 12 | ) 13 | 14 | // Build builds a request for an AWS Query service. 15 | func Build(r *aws.Request) { 16 | body := url.Values{ 17 | "Action": {r.Operation.Name}, 18 | "Version": {r.Service.APIVersion}, 19 | } 20 | if err := queryutil.Parse(body, r.Params, false); err != nil { 21 | r.Error = apierr.New("Marshal", "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/ks3sdklib/aws-sdk-go/internal/protocol/query/unmarshal.go: -------------------------------------------------------------------------------- 1 | package query 2 | 3 | //go:generate go run ../../fixtures/protocol/generate.go ../../fixtures/protocol/output/query.json unmarshal_test.go 4 | 5 | import ( 6 | "encoding/xml" 7 | 8 | "github.com/ks3sdklib/aws-sdk-go/aws" 9 | "github.com/ks3sdklib/aws-sdk-go/internal/apierr" 10 | "github.com/ks3sdklib/aws-sdk-go/internal/protocol/xml/xmlutil" 11 | ) 12 | 13 | // Unmarshal unmarshals a response for an AWS Query service. 14 | func Unmarshal(r *aws.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 = apierr.New("Unmarshal", "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 *aws.Request) { 28 | // TODO implement unmarshaling of request IDs 29 | } 30 | -------------------------------------------------------------------------------- /vendor/github.com/ks3sdklib/aws-sdk-go/internal/protocol/query/unmarshal_error.go: -------------------------------------------------------------------------------- 1 | package query 2 | 3 | import ( 4 | "encoding/xml" 5 | "io" 6 | 7 | "github.com/ks3sdklib/aws-sdk-go/aws" 8 | "github.com/ks3sdklib/aws-sdk-go/internal/apierr" 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 *aws.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 = apierr.New("Unmarshal", "failed to decode query XML error response", err) 26 | } else { 27 | r.Error = apierr.NewRequestError( 28 | apierr.New(resp.Code, resp.Message, nil), 29 | r.HTTPResponse.StatusCode, 30 | resp.RequestID, 31 | ) 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /vendor/github.com/ks3sdklib/aws-sdk-go/internal/protocol/rest/payload.go: -------------------------------------------------------------------------------- 1 | package rest 2 | 3 | import "reflect" 4 | 5 | // PayloadMember returns the payload field member of i if there is one, or nil. 6 | func PayloadMember(i interface{}) interface{} { 7 | if i == nil { 8 | return nil 9 | } 10 | 11 | v := reflect.ValueOf(i).Elem() 12 | if !v.IsValid() { 13 | return nil 14 | } 15 | if field, ok := v.Type().FieldByName("SDKShapeTraits"); ok { 16 | if payloadName := field.Tag.Get("payload"); payloadName != "" { 17 | field, _ := v.Type().FieldByName(payloadName) 18 | if field.Tag.Get("type") != "structure" { 19 | return nil 20 | } 21 | 22 | payload := v.FieldByName(payloadName) 23 | if payload.IsValid() || (payload.Kind() == reflect.Ptr && !payload.IsNil()) { 24 | return payload.Interface() 25 | } 26 | } 27 | } 28 | return nil 29 | } 30 | 31 | // PayloadType returns the type of a payload field member of i if there is one, or "". 32 | func PayloadType(i interface{}) string { 33 | v := reflect.Indirect(reflect.ValueOf(i)) 34 | if !v.IsValid() { 35 | return "" 36 | } 37 | if field, ok := v.Type().FieldByName("SDKShapeTraits"); ok { 38 | if payloadName := field.Tag.Get("payload"); payloadName != "" { 39 | if member, ok := v.Type().FieldByName(payloadName); ok { 40 | return member.Tag.Get("type") 41 | } 42 | } 43 | } 44 | return "" 45 | } 46 | -------------------------------------------------------------------------------- /vendor/github.com/ks3sdklib/aws-sdk-go/internal/signer/v4/functional_test.go: -------------------------------------------------------------------------------- 1 | package v4_test 2 | 3 | import ( 4 | "net/url" 5 | "testing" 6 | "time" 7 | 8 | "github.com/ks3sdklib/aws-sdk-go/aws" 9 | "github.com/ks3sdklib/aws-sdk-go/internal/test/unit" 10 | "github.com/ks3sdklib/aws-sdk-go/service/s3" 11 | "github.com/stretchr/testify/assert" 12 | ) 13 | 14 | var _ = unit.Imported 15 | 16 | func TestPresignHandler(t *testing.T) { 17 | svc := s3.New(nil) 18 | req, _ := svc.PutObjectRequest(&s3.PutObjectInput{ 19 | Bucket: aws.String("bucket"), 20 | Key: aws.String("key"), 21 | ContentDisposition: aws.String("a+b c$d"), 22 | ACL: aws.String("public-read"), 23 | }) 24 | req.Time = time.Unix(0, 0) 25 | urlstr, err := req.Presign(5 * time.Minute) 26 | 27 | assert.NoError(t, err) 28 | 29 | expectedDate := "19700101T000000Z" 30 | expectedHeaders := "host;x-amz-acl" 31 | expectedSig := "7edcb4e3a1bf12f4989018d75acbe3a7f03df24bd6f3112602d59fc551f0e4e2" 32 | expectedCred := "AKID/19700101/mock-region/s3/aws4_request" 33 | 34 | u, _ := url.Parse(urlstr) 35 | urlQ := u.Query() 36 | assert.Equal(t, expectedSig, urlQ.Get("X-Amz-Signature")) 37 | assert.Equal(t, expectedCred, urlQ.Get("X-Amz-Credential")) 38 | assert.Equal(t, expectedHeaders, urlQ.Get("X-Amz-SignedHeaders")) 39 | assert.Equal(t, expectedDate, urlQ.Get("X-Amz-Date")) 40 | assert.Equal(t, "300", urlQ.Get("X-Amz-Expires")) 41 | 42 | assert.NotContains(t, urlstr, "+") // + encoded as %20 43 | } 44 | -------------------------------------------------------------------------------- /vendor/github.com/ks3sdklib/aws-sdk-go/internal/test/integration/integration.go: -------------------------------------------------------------------------------- 1 | // Package integration performs initialization and validation for integration 2 | // tests. 3 | package integration 4 | 5 | import ( 6 | "crypto/rand" 7 | "fmt" 8 | "io" 9 | "os" 10 | 11 | "github.com/ks3sdklib/aws-sdk-go/aws" 12 | ) 13 | 14 | // Imported is a marker to ensure that this package's init() function gets 15 | // executed. 16 | // 17 | // To use this package, import it and add: 18 | // 19 | // var _ = integration.Imported 20 | const Imported = true 21 | 22 | func init() { 23 | if os.Getenv("DEBUG") != "" { 24 | aws.DefaultConfig.LogLevel = 1 25 | } 26 | if os.Getenv("DEBUG_BODY") != "" { 27 | aws.DefaultConfig.LogLevel = 1 28 | aws.DefaultConfig.LogHTTPBody = true 29 | } 30 | 31 | if aws.DefaultConfig.Region == "" { 32 | panic("AWS_REGION must be configured to run integration tests") 33 | } 34 | } 35 | 36 | // UniqueID returns a unique UUID-like identifier for use in generating 37 | // resources for integration tests. 38 | func UniqueID() string { 39 | uuid := make([]byte, 16) 40 | io.ReadFull(rand.Reader, uuid) 41 | return fmt.Sprintf("%x", uuid) 42 | } 43 | -------------------------------------------------------------------------------- /vendor/github.com/ks3sdklib/aws-sdk-go/internal/test/integration/s3/s3manager/stub.go: -------------------------------------------------------------------------------- 1 | package s3manager 2 | -------------------------------------------------------------------------------- /vendor/github.com/ks3sdklib/aws-sdk-go/internal/test/integration/s3/stub.go: -------------------------------------------------------------------------------- 1 | package s3 2 | -------------------------------------------------------------------------------- /vendor/github.com/ks3sdklib/aws-sdk-go/internal/test/unit/unit.go: -------------------------------------------------------------------------------- 1 | // Package unit performs initialization and validation for unit tests 2 | package unit 3 | 4 | import ( 5 | "github.com/ks3sdklib/aws-sdk-go/aws" 6 | "github.com/ks3sdklib/aws-sdk-go/aws/credentials" 7 | ) 8 | 9 | // Imported is a marker to ensure that this package's init() function gets 10 | // executed. 11 | // 12 | // To use this package, import it and add: 13 | // 14 | // var _ = unit.Imported 15 | const Imported = true 16 | 17 | func init() { 18 | // mock region and credentials 19 | aws.DefaultConfig.Credentials = 20 | credentials.NewStaticCredentials("AKID", "SECRET", "SESSION") 21 | aws.DefaultConfig.Region = "mock-region" 22 | } 23 | -------------------------------------------------------------------------------- /vendor/github.com/ks3sdklib/aws-sdk-go/internal/util/utilsort/utilsort.go: -------------------------------------------------------------------------------- 1 | // Package utilsort provides sorting utility methods. 2 | package utilsort 3 | 4 | import "sort" 5 | 6 | // SortedKeys returns a sorted slice of keys of a map. 7 | func SortedKeys(m map[string]interface{}) []string { 8 | i, sorted := 0, make([]string, len(m)) 9 | for k := range m { 10 | sorted[i] = k 11 | i++ 12 | } 13 | sort.Strings(sorted) 14 | return sorted 15 | } 16 | -------------------------------------------------------------------------------- /vendor/github.com/ks3sdklib/aws-sdk-go/sdk.go: -------------------------------------------------------------------------------- 1 | // Package sdk is the official AWS SDK for the Go programming language. 2 | // 3 | // See our Developer Guide for information for on getting started and using 4 | // the SDK. 5 | // 6 | // https://github.com/ks3sdklib/aws-sdk-go/wiki 7 | package sdk 8 | -------------------------------------------------------------------------------- /vendor/github.com/ks3sdklib/aws-sdk-go/service/generate.go: -------------------------------------------------------------------------------- 1 | // Package service contains automatically generated AWS clients. 2 | package service 3 | 4 | //go:generate go run ../internal/model/cli/gen-api/main.go -path=../service ../apis/*/*.normal.json 5 | //go:generate gofmt -s -w ../service 6 | -------------------------------------------------------------------------------- /vendor/github.com/ks3sdklib/aws-sdk-go/service/s3/bucket_location.go: -------------------------------------------------------------------------------- 1 | package s3 2 | 3 | import ( 4 | "io/ioutil" 5 | "regexp" 6 | 7 | "github.com/ks3sdklib/aws-sdk-go/aws" 8 | "github.com/ks3sdklib/aws-sdk-go/aws/awsutil" 9 | "github.com/ks3sdklib/aws-sdk-go/internal/apierr" 10 | ) 11 | 12 | var reBucketLocation = regexp.MustCompile(`>([^<>]+)<\/Location`) 13 | 14 | func buildGetBucketLocation(r *aws.Request) { 15 | if r.DataFilled() { 16 | out := r.Data.(*GetBucketLocationOutput) 17 | b, err := ioutil.ReadAll(r.HTTPResponse.Body) 18 | if err != nil { 19 | r.Error = apierr.New("Unmarshal", "failed reading response body", err) 20 | return 21 | } 22 | 23 | match := reBucketLocation.FindSubmatch(b) 24 | if len(match) > 1 { 25 | loc := string(match[1]) 26 | out.LocationConstraint = &loc 27 | } 28 | } 29 | } 30 | 31 | func populateLocationConstraint(r *aws.Request) { 32 | if r.ParamsFilled() && r.Config.Region != "us-east-1" { 33 | in := r.Params.(*CreateBucketInput) 34 | if in.CreateBucketConfiguration == nil { 35 | r.Params = awsutil.CopyOf(r.Params) 36 | in = r.Params.(*CreateBucketInput) 37 | in.CreateBucketConfiguration = &CreateBucketConfiguration{ 38 | LocationConstraint: &r.Config.Region, 39 | } 40 | } 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /vendor/github.com/ks3sdklib/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/ks3sdklib/aws-sdk-go/aws" 9 | "github.com/ks3sdklib/aws-sdk-go/internal/apierr" 10 | ) 11 | 12 | // contentMD5 computes and sets the HTTP Content-MD5 header for requests that 13 | // require it. 14 | func contentMD5(r *aws.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 = apierr.New("ContentMD5", "failed to read body", err) 23 | return 24 | } 25 | _, err = r.Body.Seek(0, 0) 26 | if err != nil { 27 | r.Error = apierr.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/ks3sdklib/aws-sdk-go/service/s3/customizations.go: -------------------------------------------------------------------------------- 1 | package s3 2 | 3 | import "github.com/ks3sdklib/aws-sdk-go/aws" 4 | 5 | func init() { 6 | initService = func(s *aws.Service) { 7 | // Support building custom host-style bucket endpoints 8 | s.Handlers.Build.PushFront(updateHostWithBucket) 9 | 10 | // Require SSL when using SSE keys 11 | s.Handlers.Validate.PushBack(validateSSERequiresSSL) 12 | s.Handlers.Build.PushBack(computeSSEKeys) 13 | 14 | // S3 uses custom error unmarshaling logic 15 | s.Handlers.UnmarshalError.Clear() 16 | s.Handlers.UnmarshalError.PushBack(unmarshalError) 17 | } 18 | 19 | initRequest = func(r *aws.Request) { 20 | switch r.Operation { 21 | case opPutBucketCORS, opPutBucketLifecycle, opPutBucketPolicy, opPutBucketTagging, opDeleteObjects: 22 | // These S3 operations require Content-MD5 to be set 23 | r.Handlers.Build.PushBack(contentMD5) 24 | case opGetBucketLocation: 25 | // GetBucketLocation has custom parsing logic 26 | r.Handlers.Unmarshal.PushFront(buildGetBucketLocation) 27 | case opCreateBucket: 28 | // Auto-populate LocationConstraint with current region 29 | r.Handlers.Validate.PushFront(populateLocationConstraint) 30 | } 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /vendor/github.com/ks3sdklib/aws-sdk-go/service/s3/s3iface/interface_test.go: -------------------------------------------------------------------------------- 1 | // THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT. 2 | 3 | package s3iface_test 4 | 5 | import ( 6 | "testing" 7 | 8 | "github.com/ks3sdklib/aws-sdk-go/service/s3" 9 | "github.com/ks3sdklib/aws-sdk-go/service/s3/s3iface" 10 | "github.com/stretchr/testify/assert" 11 | ) 12 | 13 | func TestInterface(t *testing.T) { 14 | assert.Implements(t, (*s3iface.S3API)(nil), s3.New(nil)) 15 | } 16 | -------------------------------------------------------------------------------- /vendor/github.com/ks3sdklib/aws-sdk-go/service/s3/sse.go: -------------------------------------------------------------------------------- 1 | package s3 2 | 3 | import ( 4 | "crypto/md5" 5 | "encoding/base64" 6 | 7 | "github.com/ks3sdklib/aws-sdk-go/aws" 8 | "github.com/ks3sdklib/aws-sdk-go/aws/awsutil" 9 | "github.com/ks3sdklib/aws-sdk-go/internal/apierr" 10 | ) 11 | 12 | var errSSERequiresSSL = apierr.New("ConfigError", "cannot send SSE keys over HTTP.", nil) 13 | 14 | func validateSSERequiresSSL(r *aws.Request) { 15 | if /*r.HTTPRequest.URL.Scheme != "https"*/false { 16 | p := awsutil.ValuesAtPath(r.Params, "SSECustomerKey||CopySourceSSECustomerKey") 17 | if len(p) > 0 { 18 | r.Error = errSSERequiresSSL 19 | } 20 | } 21 | } 22 | 23 | func computeSSEKeys(r *aws.Request) { 24 | headers := []string{ 25 | "x-amz-server-side-encryption-customer-key", 26 | "x-amz-copy-source-server-side-encryption-customer-key", 27 | } 28 | 29 | for _, h := range headers { 30 | md5h := h + "-md5" 31 | if key := r.HTTPRequest.Header.Get(h); key != "" { 32 | // Base64-encode the value 33 | b64v := base64.StdEncoding.EncodeToString([]byte(key)) 34 | r.HTTPRequest.Header.Set(h, b64v) 35 | 36 | // Add MD5 if it wasn't computed 37 | if r.HTTPRequest.Header.Get(md5h) == "" { 38 | sum := md5.Sum([]byte(key)) 39 | b64sum := base64.StdEncoding.EncodeToString(sum[:]) 40 | r.HTTPRequest.Header.Set(md5h, b64sum) 41 | } 42 | } 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /vendor/github.com/ks3sdklib/aws-sdk-go/service/s3/unmarshal_error.go: -------------------------------------------------------------------------------- 1 | package s3 2 | 3 | import ( 4 | "encoding/xml" 5 | "io" 6 | "strings" 7 | 8 | "github.com/ks3sdklib/aws-sdk-go/aws" 9 | "github.com/ks3sdklib/aws-sdk-go/internal/apierr" 10 | ) 11 | 12 | type xmlErrorResponse struct { 13 | XMLName xml.Name `xml:"Error"` 14 | Code string `xml:"Code"` 15 | Message string `xml:"Message"` 16 | } 17 | 18 | func unmarshalError(r *aws.Request) { 19 | defer r.HTTPResponse.Body.Close() 20 | 21 | if r.HTTPResponse.ContentLength == int64(0) { 22 | // No body, use status code to generate an awserr.Error 23 | r.Error = apierr.NewRequestError( 24 | apierr.New(strings.Replace(r.HTTPResponse.Status, " ", "", -1), r.HTTPResponse.Status, nil), 25 | r.HTTPResponse.StatusCode, 26 | "", 27 | ) 28 | return 29 | } 30 | 31 | resp := &xmlErrorResponse{} 32 | err := xml.NewDecoder(r.HTTPResponse.Body).Decode(resp) 33 | if err != nil && err != io.EOF { 34 | r.Error = apierr.New("Unmarshal", "failed to decode S3 XML error response", nil) 35 | } else { 36 | r.Error = apierr.NewRequestError( 37 | apierr.New(resp.Code, resp.Message, nil), 38 | r.HTTPResponse.StatusCode, 39 | "", 40 | ) 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /vendor/github.com/lxlxw/toml/.gitignore: -------------------------------------------------------------------------------- 1 | TAGS 2 | tags 3 | .*.swp 4 | tomlcheck/tomlcheck 5 | toml.test 6 | -------------------------------------------------------------------------------- /vendor/github.com/lxlxw/toml/.travis.yml: -------------------------------------------------------------------------------- 1 | language: go 2 | go: 3 | - 1.1 4 | - 1.2 5 | - 1.3 6 | - 1.4 7 | - 1.5 8 | - 1.6 9 | - tip 10 | install: 11 | - go install ./... 12 | - go get github.com/BurntSushi/toml-test 13 | script: 14 | - export PATH="$PATH:$HOME/gopath/bin" 15 | - make test 16 | -------------------------------------------------------------------------------- /vendor/github.com/lxlxw/toml/COMPATIBLE: -------------------------------------------------------------------------------- 1 | Compatible with TOML version 2 | [v0.4.0](https://github.com/toml-lang/toml/blob/v0.4.0/versions/en/toml-v0.4.0.md) 3 | 4 | -------------------------------------------------------------------------------- /vendor/github.com/lxlxw/toml/COPYING: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2013 TOML authors 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/lxlxw/toml/Makefile: -------------------------------------------------------------------------------- 1 | install: 2 | go install ./... 3 | 4 | test: install 5 | go test -v 6 | toml-test toml-test-decoder 7 | toml-test -encoder toml-test-encoder 8 | 9 | fmt: 10 | gofmt -w *.go */*.go 11 | colcheck *.go */*.go 12 | 13 | tags: 14 | find ./ -name '*.go' -print0 | xargs -0 gotags > TAGS 15 | 16 | push: 17 | git push origin master 18 | git push github master 19 | 20 | -------------------------------------------------------------------------------- /vendor/github.com/lxlxw/toml/_examples/example.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "fmt" 5 | "time" 6 | 7 | "github.com/BurntSushi/toml" 8 | ) 9 | 10 | type tomlConfig struct { 11 | Title string 12 | Owner ownerInfo 13 | DB database `toml:"database"` 14 | Servers map[string]server 15 | Clients clients 16 | } 17 | 18 | type ownerInfo struct { 19 | Name string 20 | Org string `toml:"organization"` 21 | Bio string 22 | DOB time.Time 23 | } 24 | 25 | type database struct { 26 | Server string 27 | Ports []int 28 | ConnMax int `toml:"connection_max"` 29 | Enabled bool 30 | } 31 | 32 | type server struct { 33 | IP string 34 | DC string 35 | } 36 | 37 | type clients struct { 38 | Data [][]interface{} 39 | Hosts []string 40 | } 41 | 42 | func main() { 43 | var config tomlConfig 44 | if _, err := toml.DecodeFile("example.toml", &config); err != nil { 45 | fmt.Println(err) 46 | return 47 | } 48 | 49 | fmt.Printf("Title: %s\n", config.Title) 50 | fmt.Printf("Owner: %s (%s, %s), Born: %s\n", 51 | config.Owner.Name, config.Owner.Org, config.Owner.Bio, 52 | config.Owner.DOB) 53 | fmt.Printf("Database: %s %v (Max conn. %d), Enabled? %v\n", 54 | config.DB.Server, config.DB.Ports, config.DB.ConnMax, 55 | config.DB.Enabled) 56 | for serverName, server := range config.Servers { 57 | fmt.Printf("Server: %s (%s, %s)\n", serverName, server.IP, server.DC) 58 | } 59 | fmt.Printf("Client data: %v\n", config.Clients.Data) 60 | fmt.Printf("Client hosts: %v\n", config.Clients.Hosts) 61 | } 62 | -------------------------------------------------------------------------------- /vendor/github.com/lxlxw/toml/_examples/example.toml: -------------------------------------------------------------------------------- 1 | # This is a TOML document. Boom. 2 | 3 | title = "TOML Example" 4 | 5 | [owner] 6 | name = "Tom Preston-Werner" 7 | organization = "GitHub" 8 | bio = "GitHub Cofounder & CEO\nLikes tater tots and beer." 9 | dob = 1979-05-27T07:32:00Z # First class dates? Why not? 10 | 11 | [database] 12 | server = "192.168.1.1" 13 | ports = [ 8001, 8001, 8002 ] 14 | connection_max = 5000 15 | enabled = true 16 | 17 | [servers] 18 | 19 | # You can indent as you please. Tabs or spaces. TOML don't care. 20 | [servers.alpha] 21 | ip = "10.0.0.1" 22 | dc = "eqdc10" 23 | 24 | [servers.beta] 25 | ip = "10.0.0.2" 26 | dc = "eqdc10" 27 | 28 | [clients] 29 | data = [ ["gamma", "delta"], [1, 2] ] # just an update to make sure parsers support it 30 | 31 | # Line breaks are OK when inside arrays 32 | hosts = [ 33 | "alpha", 34 | "omega" 35 | ] 36 | -------------------------------------------------------------------------------- /vendor/github.com/lxlxw/toml/_examples/hard.toml: -------------------------------------------------------------------------------- 1 | # Test file for TOML 2 | # Only this one tries to emulate a TOML file written by a user of the kind of parser writers probably hate 3 | # This part you'll really hate 4 | 5 | [the] 6 | test_string = "You'll hate me after this - #" # " Annoying, isn't it? 7 | 8 | [the.hard] 9 | test_array = [ "] ", " # "] # ] There you go, parse this! 10 | test_array2 = [ "Test #11 ]proved that", "Experiment #9 was a success" ] 11 | # You didn't think it'd as easy as chucking out the last #, did you? 12 | another_test_string = " Same thing, but with a string #" 13 | harder_test_string = " And when \"'s are in the string, along with # \"" # "and comments are there too" 14 | # Things will get harder 15 | 16 | [the.hard.bit#] 17 | what? = "You don't think some user won't do that?" 18 | multi_line_array = [ 19 | "]", 20 | # ] Oh yes I did 21 | ] 22 | 23 | -------------------------------------------------------------------------------- /vendor/github.com/lxlxw/toml/_examples/implicit.toml: -------------------------------------------------------------------------------- 1 | # [x] you 2 | # [x.y] don't 3 | # [x.y.z] need these 4 | [x.y.z.w] # for this to work 5 | -------------------------------------------------------------------------------- /vendor/github.com/lxlxw/toml/_examples/invalid-apples.toml: -------------------------------------------------------------------------------- 1 | # DO NOT WANT 2 | [fruit] 3 | type = "apple" 4 | 5 | [fruit.type] 6 | apple = "yes" 7 | -------------------------------------------------------------------------------- /vendor/github.com/lxlxw/toml/_examples/invalid.toml: -------------------------------------------------------------------------------- 1 | # This is an INVALID TOML document. Boom. 2 | # Can you spot the error without help? 3 | 4 | title = "TOML Example" 5 | 6 | [owner] 7 | name = "Tom Preston-Werner" 8 | organization = "GitHub" 9 | bio = "GitHub Cofounder & CEO\nLikes tater tots and beer." 10 | dob = 1979-05-27T7:32:00Z # First class dates? Why not? 11 | 12 | [database] 13 | server = "192.168.1.1" 14 | ports = [ 8001, 8001, 8002 ] 15 | connection_max = 5000 16 | enabled = true 17 | 18 | [servers] 19 | # You can indent as you please. Tabs or spaces. TOML don't care. 20 | [servers.alpha] 21 | ip = "10.0.0.1" 22 | dc = "eqdc10" 23 | 24 | [servers.beta] 25 | ip = "10.0.0.2" 26 | dc = "eqdc10" 27 | 28 | [clients] 29 | data = [ ["gamma", "delta"], [1, 2] ] # just an update to make sure parsers support it 30 | 31 | # Line breaks are OK when inside arrays 32 | hosts = [ 33 | "alpha", 34 | "omega" 35 | ] 36 | -------------------------------------------------------------------------------- /vendor/github.com/lxlxw/toml/_examples/readme1.toml: -------------------------------------------------------------------------------- 1 | Age = 25 2 | Cats = [ "Cauchy", "Plato" ] 3 | Pi = 3.14 4 | Perfection = [ 6, 28, 496, 8128 ] 5 | DOB = 1987-07-05T05:45:00Z 6 | -------------------------------------------------------------------------------- /vendor/github.com/lxlxw/toml/_examples/readme2.toml: -------------------------------------------------------------------------------- 1 | some_key_NAME = "wat" 2 | -------------------------------------------------------------------------------- /vendor/github.com/lxlxw/toml/cmd/toml-test-decoder/COPYING: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2013 TOML authors 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/lxlxw/toml/cmd/toml-test-decoder/README.md: -------------------------------------------------------------------------------- 1 | # Implements the TOML test suite interface 2 | 3 | This is an implementation of the interface expected by 4 | [toml-test](https://github.com/BurntSushi/toml-test) for my 5 | [toml parser written in Go](https://github.com/BurntSushi/toml). 6 | In particular, it maps TOML data on `stdin` to a JSON format on `stdout`. 7 | 8 | 9 | Compatible with TOML version 10 | [v0.4.0](https://github.com/toml-lang/toml/blob/master/versions/en/toml-v0.4.0.md) 11 | 12 | Compatible with `toml-test` version 13 | [v0.2.0](https://github.com/BurntSushi/toml-test/tree/v0.2.0) 14 | -------------------------------------------------------------------------------- /vendor/github.com/lxlxw/toml/cmd/toml-test-encoder/COPYING: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2013 TOML authors 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/lxlxw/toml/cmd/toml-test-encoder/README.md: -------------------------------------------------------------------------------- 1 | # Implements the TOML test suite interface for TOML encoders 2 | 3 | This is an implementation of the interface expected by 4 | [toml-test](https://github.com/BurntSushi/toml-test) for the 5 | [TOML encoder](https://github.com/BurntSushi/toml). 6 | In particular, it maps JSON data on `stdin` to a TOML format on `stdout`. 7 | 8 | 9 | Compatible with TOML version 10 | [v0.4.0](https://github.com/toml-lang/toml/blob/master/versions/en/toml-v0.4.0.md) 11 | 12 | Compatible with `toml-test` version 13 | [v0.2.0](https://github.com/BurntSushi/toml-test/tree/v0.2.0) 14 | -------------------------------------------------------------------------------- /vendor/github.com/lxlxw/toml/cmd/tomlv/COPYING: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2013 TOML authors 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/lxlxw/toml/cmd/tomlv/README.md: -------------------------------------------------------------------------------- 1 | # TOML Validator 2 | 3 | If Go is installed, it's simple to try it out: 4 | 5 | ```bash 6 | go get github.com/BurntSushi/toml/cmd/tomlv 7 | tomlv some-toml-file.toml 8 | ``` 9 | 10 | You can see the types of every key in a TOML file with: 11 | 12 | ```bash 13 | tomlv -types some-toml-file.toml 14 | ``` 15 | 16 | At the moment, only one error message is reported at a time. Error messages 17 | include line numbers. No output means that the files given are valid TOML, or 18 | there is a bug in `tomlv`. 19 | 20 | Compatible with TOML version 21 | [v0.4.0](https://github.com/toml-lang/toml/blob/master/versions/en/toml-v0.4.0.md) 22 | -------------------------------------------------------------------------------- /vendor/github.com/lxlxw/toml/cmd/tomlv/main.go: -------------------------------------------------------------------------------- 1 | // Command tomlv validates TOML documents and prints each key's type. 2 | package main 3 | 4 | import ( 5 | "flag" 6 | "fmt" 7 | "log" 8 | "os" 9 | "path" 10 | "strings" 11 | "text/tabwriter" 12 | 13 | "github.com/BurntSushi/toml" 14 | ) 15 | 16 | var ( 17 | flagTypes = false 18 | ) 19 | 20 | func init() { 21 | log.SetFlags(0) 22 | 23 | flag.BoolVar(&flagTypes, "types", flagTypes, 24 | "When set, the types of every defined key will be shown.") 25 | 26 | flag.Usage = usage 27 | flag.Parse() 28 | } 29 | 30 | func usage() { 31 | log.Printf("Usage: %s toml-file [ toml-file ... ]\n", 32 | path.Base(os.Args[0])) 33 | flag.PrintDefaults() 34 | 35 | os.Exit(1) 36 | } 37 | 38 | func main() { 39 | if flag.NArg() < 1 { 40 | flag.Usage() 41 | } 42 | for _, f := range flag.Args() { 43 | var tmp interface{} 44 | md, err := toml.DecodeFile(f, &tmp) 45 | if err != nil { 46 | log.Fatalf("Error in '%s': %s", f, err) 47 | } 48 | if flagTypes { 49 | printTypes(md) 50 | } 51 | } 52 | } 53 | 54 | func printTypes(md toml.MetaData) { 55 | tabw := tabwriter.NewWriter(os.Stdout, 0, 0, 2, ' ', 0) 56 | for _, key := range md.Keys() { 57 | fmt.Fprintf(tabw, "%s%s\t%s\n", 58 | strings.Repeat(" ", len(key)-1), key, md.Type(key...)) 59 | } 60 | tabw.Flush() 61 | } 62 | -------------------------------------------------------------------------------- /vendor/github.com/lxlxw/toml/doc.go: -------------------------------------------------------------------------------- 1 | /* 2 | Package toml provides facilities for decoding and encoding TOML configuration 3 | files via reflection. There is also support for delaying decoding with 4 | the Primitive type, and querying the set of keys in a TOML document with the 5 | MetaData type. 6 | 7 | The specification implemented: https://github.com/toml-lang/toml 8 | 9 | The sub-command github.com/BurntSushi/toml/cmd/tomlv can be used to verify 10 | whether a file is a valid TOML document. It can also be used to print the 11 | type of each key in a TOML document. 12 | 13 | Testing 14 | 15 | There are two important types of tests used for this package. The first is 16 | contained inside '*_test.go' files and uses the standard Go unit testing 17 | framework. These tests are primarily devoted to holistically testing the 18 | decoder and encoder. 19 | 20 | The second type of testing is used to verify the implementation's adherence 21 | to the TOML specification. These tests have been factored into their own 22 | project: https://github.com/BurntSushi/toml-test 23 | 24 | The reason the tests are in a separate project is so that they can be used by 25 | any implementation of TOML. Namely, it is language agnostic. 26 | */ 27 | package toml 28 | -------------------------------------------------------------------------------- /vendor/github.com/lxlxw/toml/encoding_types.go: -------------------------------------------------------------------------------- 1 | // +build go1.2 2 | 3 | package toml 4 | 5 | // In order to support Go 1.1, we define our own TextMarshaler and 6 | // TextUnmarshaler types. For Go 1.2+, we just alias them with the 7 | // standard library interfaces. 8 | 9 | import ( 10 | "encoding" 11 | ) 12 | 13 | // TextMarshaler is a synonym for encoding.TextMarshaler. It is defined here 14 | // so that Go 1.1 can be supported. 15 | type TextMarshaler encoding.TextMarshaler 16 | 17 | // TextUnmarshaler is a synonym for encoding.TextUnmarshaler. It is defined 18 | // here so that Go 1.1 can be supported. 19 | type TextUnmarshaler encoding.TextUnmarshaler 20 | -------------------------------------------------------------------------------- /vendor/github.com/lxlxw/toml/encoding_types_1.1.go: -------------------------------------------------------------------------------- 1 | // +build !go1.2 2 | 3 | package toml 4 | 5 | // These interfaces were introduced in Go 1.2, so we add them manually when 6 | // compiling for Go 1.1. 7 | 8 | // TextMarshaler is a synonym for encoding.TextMarshaler. It is defined here 9 | // so that Go 1.1 can be supported. 10 | type TextMarshaler interface { 11 | MarshalText() (text []byte, err error) 12 | } 13 | 14 | // TextUnmarshaler is a synonym for encoding.TextUnmarshaler. It is defined 15 | // here so that Go 1.1 can be supported. 16 | type TextUnmarshaler interface { 17 | UnmarshalText(text []byte) error 18 | } 19 | -------------------------------------------------------------------------------- /vendor/github.com/lxlxw/toml/session.vim: -------------------------------------------------------------------------------- 1 | au BufWritePost *.go silent!make tags > /dev/null 2>&1 2 | -------------------------------------------------------------------------------- /vendor/github.com/spf13/cobra/command_notwin.go: -------------------------------------------------------------------------------- 1 | // +build !windows 2 | 3 | package cobra 4 | 5 | var preExecHookFn func(*Command) 6 | -------------------------------------------------------------------------------- /vendor/github.com/spf13/cobra/command_win.go: -------------------------------------------------------------------------------- 1 | // +build windows 2 | 3 | package cobra 4 | 5 | import ( 6 | "os" 7 | "time" 8 | 9 | "github.com/inconshreveable/mousetrap" 10 | ) 11 | 12 | var preExecHookFn = preExecHook 13 | 14 | func preExecHook(c *Command) { 15 | if MousetrapHelpText != "" && mousetrap.StartedByExplorer() { 16 | c.Print(MousetrapHelpText) 17 | time.Sleep(5 * time.Second) 18 | os.Exit(1) 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /vendor/github.com/wothing/log/.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/wothing/log/README.md: -------------------------------------------------------------------------------- 1 | log 2 | === 3 | 4 | Extension module of golang logging -------------------------------------------------------------------------------- /vendor/github.com/wothing/log/logext_test.go: -------------------------------------------------------------------------------- 1 | package log 2 | 3 | import ( 4 | "testing" 5 | ) 6 | 7 | func TestLog(t *testing.T) { 8 | 9 | SetOutputLevel(Ldebug) 10 | 11 | Debugf("Debug: foo\n") 12 | Debug("Debug: foo") 13 | 14 | Infof("Info: foo\n") 15 | Info("Info: foo") 16 | 17 | Warnf("Warn: foo\n") 18 | Warn("Warn: foo") 19 | 20 | Errorf("Error: foo\n") 21 | Error("Error: foo") 22 | 23 | SetOutputLevel(Linfo) 24 | 25 | Debugf("Debug: foo\n") 26 | Debug("Debug: foo") 27 | 28 | Infof("Info: foo\n") 29 | Info("Info: foo") 30 | 31 | Warnf("Warn: foo\n") 32 | Warn("Warn: foo") 33 | 34 | Errorf("Error: foo\n") 35 | Error("Error: foo") 36 | } 37 | -------------------------------------------------------------------------------- /vendor/github.com/wothing/log/tracelog.go: -------------------------------------------------------------------------------- 1 | package log 2 | 3 | import ( 4 | "fmt" 5 | "time" 6 | 7 | "golang.org/x/net/context" 8 | ) 9 | 10 | // TraceIn and TraceOut use in function in and out,reduce code line 11 | // Example: 12 | // func test() { 13 | // user := User{Name: "zhangsan", Age: 21, School: "xayddx"} 14 | // service := "verification.GetVerifiCode" 15 | // defer log.TraceOut(log.TraceIn("12345", service, "user:%v", user)) 16 | // .... 17 | // } 18 | 19 | func TraceIn(traceID string, service string, format string, v ...interface{}) (string, string, time.Time) { 20 | startTime := time.Now() 21 | Std.Output(traceID, Linfo, 2, fmt.Sprintf("calling "+service+", "+format, v...)) 22 | return traceID, service, startTime 23 | } 24 | 25 | func TraceOut(traceID string, service string, startTime time.Time) { 26 | Std.Output(traceID, Linfo, 2, fmt.Sprintf("finished "+service+", took=%v", time.Since(startTime))) 27 | } 28 | 29 | func TraceCtx(ctx context.Context, service string, format string, v ...interface{}) (string, string, time.Time) { 30 | startTime := time.Now() 31 | traceID := getTracerIDFromCtx(ctx) 32 | Std.Output(traceID, Linfo, 2, fmt.Sprintf("calling "+service+", "+format, v...)) 33 | return traceID, service, startTime 34 | } 35 | -------------------------------------------------------------------------------- /vendor/github.com/wothing/log/util_test.go: -------------------------------------------------------------------------------- 1 | package log 2 | 3 | import ( 4 | "fmt" 5 | "testing" 6 | ) 7 | 8 | type B struct { 9 | Name string 10 | Age int 11 | } 12 | 13 | type A struct { 14 | BV B 15 | BPtr *B 16 | I interface{} 17 | Iptr interface{} 18 | } 19 | 20 | func TestPrintStruct(t *testing.T) { 21 | b := B{Name: "elvizlai", Age: 26} 22 | fmt.Println(PrintStruct(b)) 23 | a := A{BV: b} 24 | fmt.Println(PrintStruct(a)) 25 | a.BPtr = &b 26 | fmt.Println(PrintStruct(a)) 27 | a.I = b 28 | a.Iptr = &b 29 | fmt.Println(PrintStruct(&a)) 30 | } 31 | -------------------------------------------------------------------------------- /vendor/golang.org/x/net/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2009 The Go Authors. All rights reserved. 2 | 3 | Redistribution and use in source and binary forms, with or without 4 | modification, are permitted provided that the following conditions are 5 | met: 6 | 7 | * Redistributions of source code must retain the above copyright 8 | notice, this list of conditions and the following disclaimer. 9 | * Redistributions in binary form must reproduce the above 10 | copyright notice, this list of conditions and the following disclaimer 11 | in the documentation and/or other materials provided with the 12 | distribution. 13 | * Neither the name of Google Inc. nor the names of its 14 | contributors may be used to endorse or promote products derived from 15 | this software without specific prior written permission. 16 | 17 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 18 | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 19 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 20 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 21 | OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 22 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 23 | LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 24 | DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 25 | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 26 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 27 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 | -------------------------------------------------------------------------------- /vendor/golang.org/x/net/PATENTS: -------------------------------------------------------------------------------- 1 | Additional IP Rights Grant (Patents) 2 | 3 | "This implementation" means the copyrightable works distributed by 4 | Google as part of the Go project. 5 | 6 | Google hereby grants to You a perpetual, worldwide, non-exclusive, 7 | no-charge, royalty-free, irrevocable (except as stated in this section) 8 | patent license to make, have made, use, offer to sell, sell, import, 9 | transfer and otherwise run, modify and propagate the contents of this 10 | implementation of Go, where such license applies only to those patent 11 | claims, both currently owned or controlled by Google and acquired in 12 | the future, licensable by Google that are necessarily infringed by this 13 | implementation of Go. This grant does not include claims that would be 14 | infringed only as a consequence of further modification of this 15 | implementation. If you or your agent or exclusive licensee institute or 16 | order or agree to the institution of patent litigation against any 17 | entity (including a cross-claim or counterclaim in a lawsuit) alleging 18 | that this implementation of Go or any code incorporated within this 19 | implementation of Go constitutes direct or contributory patent 20 | infringement, or inducement of patent infringement, then any patent 21 | rights granted to you under this License for this implementation of Go 22 | shall terminate as of the date such litigation is filed. 23 | -------------------------------------------------------------------------------- /vendor/golang.org/x/net/context/go19.go: -------------------------------------------------------------------------------- 1 | // Copyright 2017 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build go1.9 6 | 7 | package context 8 | 9 | import "context" // standard library's context, as of Go 1.7 10 | 11 | // A Context carries a deadline, a cancelation signal, and other values across 12 | // API boundaries. 13 | // 14 | // Context's methods may be called by multiple goroutines simultaneously. 15 | type Context = context.Context 16 | 17 | // A CancelFunc tells an operation to abandon its work. 18 | // A CancelFunc does not wait for the work to stop. 19 | // After the first call, subsequent calls to a CancelFunc do nothing. 20 | type CancelFunc = context.CancelFunc 21 | -------------------------------------------------------------------------------- /vendor/golang.org/x/net/http2/Makefile: -------------------------------------------------------------------------------- 1 | curlimage: 2 | docker build -t gohttp2/curl . 3 | 4 | -------------------------------------------------------------------------------- /vendor/golang.org/x/net/http2/README: -------------------------------------------------------------------------------- 1 | This is a work-in-progress HTTP/2 implementation for Go. 2 | 3 | It will eventually live in the Go standard library and won't require 4 | any changes to your code to use. It will just be automatic. 5 | 6 | Status: 7 | 8 | * The server support is pretty good. A few things are missing 9 | but are being worked on. 10 | * The client work has just started but shares a lot of code 11 | is coming along much quicker. 12 | 13 | Docs are at https://godoc.org/golang.org/x/net/http2 14 | 15 | Demo test server at https://http2.golang.org/ 16 | 17 | Help & bug reports welcome! 18 | 19 | Contributing: https://golang.org/doc/contribute.html 20 | Bugs: https://golang.org/issue/new?title=x/net/http2:+ 21 | -------------------------------------------------------------------------------- /vendor/golang.org/x/net/http2/flow.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 | // Flow control 6 | 7 | package http2 8 | 9 | // flow is the flow control window's size. 10 | type flow struct { 11 | // n is the number of DATA bytes we're allowed to send. 12 | // A flow is kept both on a conn and a per-stream. 13 | n int32 14 | 15 | // conn points to the shared connection-level flow that is 16 | // shared by all streams on that conn. It is nil for the flow 17 | // that's on the conn directly. 18 | conn *flow 19 | } 20 | 21 | func (f *flow) setConnFlow(cf *flow) { f.conn = cf } 22 | 23 | func (f *flow) available() int32 { 24 | n := f.n 25 | if f.conn != nil && f.conn.n < n { 26 | n = f.conn.n 27 | } 28 | return n 29 | } 30 | 31 | func (f *flow) take(n int32) { 32 | if n > f.available() { 33 | panic("internal error: took too much") 34 | } 35 | f.n -= n 36 | if f.conn != nil { 37 | f.conn.n -= n 38 | } 39 | } 40 | 41 | // add adds n bytes (positive or negative) to the flow control window. 42 | // It returns false if the sum would exceed 2^31-1. 43 | func (f *flow) add(n int32) bool { 44 | remain := (1<<31 - 1) - f.n 45 | if n > remain { 46 | return false 47 | } 48 | f.n += n 49 | return true 50 | } 51 | -------------------------------------------------------------------------------- /vendor/golang.org/x/net/http2/go16.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 | // +build go1.6 6 | 7 | package http2 8 | 9 | import ( 10 | "net/http" 11 | "time" 12 | ) 13 | 14 | func transportExpectContinueTimeout(t1 *http.Transport) time.Duration { 15 | return t1.ExpectContinueTimeout 16 | } 17 | -------------------------------------------------------------------------------- /vendor/golang.org/x/net/http2/go17_not18.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 | // +build go1.7,!go1.8 6 | 7 | package http2 8 | 9 | import "crypto/tls" 10 | 11 | // temporary copy of Go 1.7's private tls.Config.clone: 12 | func cloneTLSConfig(c *tls.Config) *tls.Config { 13 | return &tls.Config{ 14 | Rand: c.Rand, 15 | Time: c.Time, 16 | Certificates: c.Certificates, 17 | NameToCertificate: c.NameToCertificate, 18 | GetCertificate: c.GetCertificate, 19 | RootCAs: c.RootCAs, 20 | NextProtos: c.NextProtos, 21 | ServerName: c.ServerName, 22 | ClientAuth: c.ClientAuth, 23 | ClientCAs: c.ClientCAs, 24 | InsecureSkipVerify: c.InsecureSkipVerify, 25 | CipherSuites: c.CipherSuites, 26 | PreferServerCipherSuites: c.PreferServerCipherSuites, 27 | SessionTicketsDisabled: c.SessionTicketsDisabled, 28 | SessionTicketKey: c.SessionTicketKey, 29 | ClientSessionCache: c.ClientSessionCache, 30 | MinVersion: c.MinVersion, 31 | MaxVersion: c.MaxVersion, 32 | CurvePreferences: c.CurvePreferences, 33 | DynamicRecordSizingDisabled: c.DynamicRecordSizingDisabled, 34 | Renegotiation: c.Renegotiation, 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /vendor/golang.org/x/net/http2/go18.go: -------------------------------------------------------------------------------- 1 | // Copyright 2015 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build go1.8 6 | 7 | package http2 8 | 9 | import ( 10 | "crypto/tls" 11 | "io" 12 | "net/http" 13 | ) 14 | 15 | func cloneTLSConfig(c *tls.Config) *tls.Config { 16 | c2 := c.Clone() 17 | c2.GetClientCertificate = c.GetClientCertificate // golang.org/issue/19264 18 | return c2 19 | } 20 | 21 | var _ http.Pusher = (*responseWriter)(nil) 22 | 23 | // Push implements http.Pusher. 24 | func (w *responseWriter) Push(target string, opts *http.PushOptions) error { 25 | internalOpts := pushOptions{} 26 | if opts != nil { 27 | internalOpts.Method = opts.Method 28 | internalOpts.Header = opts.Header 29 | } 30 | return w.push(target, internalOpts) 31 | } 32 | 33 | func configureServer18(h1 *http.Server, h2 *Server) error { 34 | if h2.IdleTimeout == 0 { 35 | if h1.IdleTimeout != 0 { 36 | h2.IdleTimeout = h1.IdleTimeout 37 | } else { 38 | h2.IdleTimeout = h1.ReadTimeout 39 | } 40 | } 41 | return nil 42 | } 43 | 44 | func shouldLogPanic(panicValue interface{}) bool { 45 | return panicValue != nil && panicValue != http.ErrAbortHandler 46 | } 47 | 48 | func reqGetBody(req *http.Request) func() (io.ReadCloser, error) { 49 | return req.GetBody 50 | } 51 | 52 | func reqBodyIsNoBody(body io.ReadCloser) bool { 53 | return body == http.NoBody 54 | } 55 | 56 | func go18httpNoBody() io.ReadCloser { return http.NoBody } // for tests only 57 | -------------------------------------------------------------------------------- /vendor/golang.org/x/net/http2/go19.go: -------------------------------------------------------------------------------- 1 | // Copyright 2015 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build go1.9 6 | 7 | package http2 8 | 9 | import ( 10 | "net/http" 11 | ) 12 | 13 | func configureServer19(s *http.Server, conf *Server) error { 14 | s.RegisterOnShutdown(conf.state.startGracefulShutdown) 15 | return nil 16 | } 17 | -------------------------------------------------------------------------------- /vendor/golang.org/x/net/http2/not_go16.go: -------------------------------------------------------------------------------- 1 | // Copyright 2015 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build !go1.6 6 | 7 | package http2 8 | 9 | import ( 10 | "net/http" 11 | "time" 12 | ) 13 | 14 | func configureTransport(t1 *http.Transport) (*Transport, error) { 15 | return nil, errTransportVersion 16 | } 17 | 18 | func transportExpectContinueTimeout(t1 *http.Transport) time.Duration { 19 | return 0 20 | 21 | } 22 | -------------------------------------------------------------------------------- /vendor/golang.org/x/net/http2/not_go18.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 | // +build !go1.8 6 | 7 | package http2 8 | 9 | import ( 10 | "io" 11 | "net/http" 12 | ) 13 | 14 | func configureServer18(h1 *http.Server, h2 *Server) error { 15 | // No IdleTimeout to sync prior to Go 1.8. 16 | return nil 17 | } 18 | 19 | func shouldLogPanic(panicValue interface{}) bool { 20 | return panicValue != nil 21 | } 22 | 23 | func reqGetBody(req *http.Request) func() (io.ReadCloser, error) { 24 | return nil 25 | } 26 | 27 | func reqBodyIsNoBody(io.ReadCloser) bool { return false } 28 | 29 | func go18httpNoBody() io.ReadCloser { return nil } // for tests only 30 | -------------------------------------------------------------------------------- /vendor/golang.org/x/net/http2/not_go19.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 | // +build !go1.9 6 | 7 | package http2 8 | 9 | import ( 10 | "net/http" 11 | ) 12 | 13 | func configureServer19(s *http.Server, conf *Server) error { 14 | // not supported prior to go1.9 15 | return nil 16 | } 17 | -------------------------------------------------------------------------------- /vendor/golang.org/x/net/trace/trace_go16.go: -------------------------------------------------------------------------------- 1 | // Copyright 2017 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build !go1.7 6 | 7 | package trace 8 | 9 | import "golang.org/x/net/context" 10 | 11 | // NewContext returns a copy of the parent context 12 | // and associates it with a Trace. 13 | func NewContext(ctx context.Context, tr Trace) context.Context { 14 | return context.WithValue(ctx, contextKey, tr) 15 | } 16 | 17 | // FromContext returns the Trace bound to the context, if any. 18 | func FromContext(ctx context.Context) (tr Trace, ok bool) { 19 | tr, ok = ctx.Value(contextKey).(Trace) 20 | return 21 | } 22 | -------------------------------------------------------------------------------- /vendor/golang.org/x/net/trace/trace_go17.go: -------------------------------------------------------------------------------- 1 | // Copyright 2017 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build go1.7 6 | 7 | package trace 8 | 9 | import "context" 10 | 11 | // NewContext returns a copy of the parent context 12 | // and associates it with a Trace. 13 | func NewContext(ctx context.Context, tr Trace) context.Context { 14 | return context.WithValue(ctx, contextKey, tr) 15 | } 16 | 17 | // FromContext returns the Trace bound to the context, if any. 18 | func FromContext(ctx context.Context) (tr Trace, ok bool) { 19 | tr, ok = ctx.Value(contextKey).(Trace) 20 | return 21 | } 22 | -------------------------------------------------------------------------------- /vendor/golang.org/x/text/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2009 The Go Authors. All rights reserved. 2 | 3 | Redistribution and use in source and binary forms, with or without 4 | modification, are permitted provided that the following conditions are 5 | met: 6 | 7 | * Redistributions of source code must retain the above copyright 8 | notice, this list of conditions and the following disclaimer. 9 | * Redistributions in binary form must reproduce the above 10 | copyright notice, this list of conditions and the following disclaimer 11 | in the documentation and/or other materials provided with the 12 | distribution. 13 | * Neither the name of Google Inc. nor the names of its 14 | contributors may be used to endorse or promote products derived from 15 | this software without specific prior written permission. 16 | 17 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 18 | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 19 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 20 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 21 | OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 22 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 23 | LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 24 | DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 25 | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 26 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 27 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 | -------------------------------------------------------------------------------- /vendor/golang.org/x/text/PATENTS: -------------------------------------------------------------------------------- 1 | Additional IP Rights Grant (Patents) 2 | 3 | "This implementation" means the copyrightable works distributed by 4 | Google as part of the Go project. 5 | 6 | Google hereby grants to You a perpetual, worldwide, non-exclusive, 7 | no-charge, royalty-free, irrevocable (except as stated in this section) 8 | patent license to make, have made, use, offer to sell, sell, import, 9 | transfer and otherwise run, modify and propagate the contents of this 10 | implementation of Go, where such license applies only to those patent 11 | claims, both currently owned or controlled by Google and acquired in 12 | the future, licensable by Google that are necessarily infringed by this 13 | implementation of Go. This grant does not include claims that would be 14 | infringed only as a consequence of further modification of this 15 | implementation. If you or your agent or exclusive licensee institute or 16 | order or agree to the institution of patent litigation against any 17 | entity (including a cross-claim or counterclaim in a lawsuit) alleging 18 | that this implementation of Go or any code incorporated within this 19 | implementation of Go constitutes direct or contributory patent 20 | infringement, or inducement of patent infringement, then any patent 21 | rights granted to you under this License for this implementation of Go 22 | shall terminate as of the date such litigation is filed. 23 | -------------------------------------------------------------------------------- /vendor/golang.org/x/text/secure/bidirule/bidirule10.0.0.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 | // +build go1.10 6 | 7 | package bidirule 8 | 9 | func (t *Transformer) isFinal() bool { 10 | return t.state == ruleLTRFinal || t.state == ruleRTLFinal || t.state == ruleInitial 11 | } 12 | -------------------------------------------------------------------------------- /vendor/golang.org/x/text/secure/bidirule/bidirule9.0.0.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 | // +build !go1.10 6 | 7 | package bidirule 8 | 9 | func (t *Transformer) isFinal() bool { 10 | if !t.isRTL() { 11 | return true 12 | } 13 | return t.state == ruleLTRFinal || t.state == ruleRTLFinal || t.state == ruleInitial 14 | } 15 | -------------------------------------------------------------------------------- /vendor/golang.org/x/text/unicode/norm/trie.go: -------------------------------------------------------------------------------- 1 | // Copyright 2011 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package norm 6 | 7 | type valueRange struct { 8 | value uint16 // header: value:stride 9 | lo, hi byte // header: lo:n 10 | } 11 | 12 | type sparseBlocks struct { 13 | values []valueRange 14 | offset []uint16 15 | } 16 | 17 | var nfcSparse = sparseBlocks{ 18 | values: nfcSparseValues[:], 19 | offset: nfcSparseOffset[:], 20 | } 21 | 22 | var nfkcSparse = sparseBlocks{ 23 | values: nfkcSparseValues[:], 24 | offset: nfkcSparseOffset[:], 25 | } 26 | 27 | var ( 28 | nfcData = newNfcTrie(0) 29 | nfkcData = newNfkcTrie(0) 30 | ) 31 | 32 | // lookupValue determines the type of block n and looks up the value for b. 33 | // For n < t.cutoff, the block is a simple lookup table. Otherwise, the block 34 | // is a list of ranges with an accompanying value. Given a matching range r, 35 | // the value for b is by r.value + (b - r.lo) * stride. 36 | func (t *sparseBlocks) lookup(n uint32, b byte) uint16 { 37 | offset := t.offset[n] 38 | header := t.values[offset] 39 | lo := offset + 1 40 | hi := lo + uint16(header.lo) 41 | for lo < hi { 42 | m := lo + (hi-lo)/2 43 | r := t.values[m] 44 | if r.lo <= b && b <= r.hi { 45 | return r.value + uint16(b-r.lo)*header.value 46 | } 47 | if b < r.lo { 48 | hi = m 49 | } else { 50 | lo = m + 1 51 | } 52 | } 53 | return 0 54 | } 55 | -------------------------------------------------------------------------------- /vendor/google.golang.org/grpc/.github/ISSUE_TEMPLATE: -------------------------------------------------------------------------------- 1 | Please answer these questions before submitting your issue. 2 | 3 | ### What version of gRPC are you using? 4 | 5 | ### What version of Go are you using (`go version`)? 6 | 7 | ### What operating system (Linux, Windows, …) and version? 8 | 9 | ### What did you do? 10 | If possible, provide a recipe for reproducing the error. 11 | 12 | ### What did you expect to see? 13 | 14 | ### What did you see instead? 15 | -------------------------------------------------------------------------------- /vendor/google.golang.org/grpc/.please-update: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lxlxw/s3-micro/c6839acc41127592536475613dccfa1bb78ccda5/vendor/google.golang.org/grpc/.please-update -------------------------------------------------------------------------------- /vendor/google.golang.org/grpc/.travis.yml: -------------------------------------------------------------------------------- 1 | language: go 2 | 3 | go: 4 | - 1.6.x 5 | - 1.7.x 6 | - 1.8.x 7 | - 1.9.x 8 | 9 | matrix: 10 | include: 11 | - go: 1.9.x 12 | env: GOARCH=386 13 | 14 | go_import_path: google.golang.org/grpc 15 | 16 | before_install: 17 | - if [[ "$TRAVIS_GO_VERSION" = 1.9* && "$GOARCH" != "386" ]]; then ./vet.sh -install || exit 1; fi 18 | 19 | script: 20 | - if [[ "$TRAVIS_GO_VERSION" = 1.9* && "$GOARCH" != "386" ]]; then ./vet.sh || exit 1; fi 21 | - make test testrace 22 | -------------------------------------------------------------------------------- /vendor/google.golang.org/grpc/AUTHORS: -------------------------------------------------------------------------------- 1 | Google Inc. 2 | -------------------------------------------------------------------------------- /vendor/google.golang.org/grpc/Documentation/grpc-auth-support.md: -------------------------------------------------------------------------------- 1 | # Authentication 2 | 3 | As outlined in the [gRPC authentication guide](https://grpc.io/docs/guides/auth.html) there are a number of different mechanisms for asserting identity between an client and server. We'll present some code-samples here demonstrating how to provide TLS support encryption and identity assertions as well as passing OAuth2 tokens to services that support it. 4 | 5 | # Enabling TLS on a gRPC client 6 | 7 | ```Go 8 | conn, err := grpc.Dial(serverAddr, grpc.WithTransportCredentials(credentials.NewClientTLSFromCert(nil, ""))) 9 | ``` 10 | 11 | # Enabling TLS on a gRPC server 12 | 13 | ```Go 14 | creds, err := credentials.NewServerTLSFromFile(certFile, keyFile) 15 | if err != nil { 16 | log.Fatalf("Failed to generate credentials %v", err) 17 | } 18 | lis, err := net.Listen("tcp", ":0") 19 | server := grpc.NewServer(grpc.Creds(creds)) 20 | ... 21 | server.Serve(lis) 22 | ``` 23 | 24 | # Authenticating with Google 25 | 26 | ## Google Compute Engine (GCE) 27 | 28 | ```Go 29 | conn, err := grpc.Dial(serverAddr, grpc.WithTransportCredentials(credentials.NewClientTLSFromCert(nil, "")), grpc.WithPerRPCCredentials(oauth.NewComputeEngine())) 30 | ``` 31 | 32 | ## JWT 33 | 34 | ```Go 35 | jwtCreds, err := oauth.NewServiceAccountFromFile(*serviceAccountKeyFile, *oauthScope) 36 | if err != nil { 37 | log.Fatalf("Failed to create JWT credentials: %v", err) 38 | } 39 | conn, err := grpc.Dial(serverAddr, grpc.WithTransportCredentials(credentials.NewClientTLSFromCert(nil, "")), grpc.WithPerRPCCredentials(jwtCreds)) 40 | ``` 41 | 42 | -------------------------------------------------------------------------------- /vendor/google.golang.org/grpc/Documentation/versioning.md: -------------------------------------------------------------------------------- 1 | # Versioning and Releases 2 | 3 | Note: This document references terminology defined at http://semver.org. 4 | 5 | ## Release Frequency 6 | 7 | Regular MINOR releases of gRPC-Go are performed every six weeks. Patch releases 8 | to the previous two MINOR releases may be performed on demand or if serious 9 | security problems are discovered. 10 | 11 | ## Versioning Policy 12 | 13 | The gRPC-Go versioning policy follows the Semantic Versioning 2.0.0 14 | specification, with the following exceptions: 15 | 16 | - A MINOR version will not _necessarily_ add new functionality. 17 | 18 | - MINOR releases will not break backward compatibility, except in the following 19 | circumstances: 20 | 21 | - An API was marked as EXPERIMENTAL upon its introduction. 22 | - An API was marked as DEPRECATED in the initial MAJOR release. 23 | - An API is inherently flawed and cannot provide correct or secure behavior. 24 | 25 | In these cases, APIs MAY be changed or removed without a MAJOR release. 26 | Otherwise, backward compatibility will be preserved by MINOR releases. 27 | 28 | For an API marked as DEPRECATED, an alternative will be available (if 29 | appropriate) for at least three months prior to its removal. 30 | 31 | ## Release History 32 | 33 | Please see our release history on GitHub: 34 | https://github.com/grpc/grpc-go/releases 35 | -------------------------------------------------------------------------------- /vendor/google.golang.org/grpc/Makefile: -------------------------------------------------------------------------------- 1 | all: test testrace 2 | 3 | deps: 4 | go get -d -v google.golang.org/grpc/... 5 | 6 | updatedeps: 7 | go get -d -v -u -f google.golang.org/grpc/... 8 | 9 | testdeps: 10 | go get -d -v -t google.golang.org/grpc/... 11 | 12 | updatetestdeps: 13 | go get -d -v -t -u -f google.golang.org/grpc/... 14 | 15 | build: deps 16 | go build google.golang.org/grpc/... 17 | 18 | proto: 19 | @ if ! which protoc > /dev/null; then \ 20 | echo "error: protoc not installed" >&2; \ 21 | exit 1; \ 22 | fi 23 | go generate google.golang.org/grpc/... 24 | 25 | test: testdeps 26 | go test -cpu 1,4 google.golang.org/grpc/... 27 | 28 | testrace: testdeps 29 | go test -race -cpu 1,4 google.golang.org/grpc/... 30 | 31 | clean: 32 | go clean -i google.golang.org/grpc/... 33 | 34 | .PHONY: \ 35 | all \ 36 | deps \ 37 | updatedeps \ 38 | testdeps \ 39 | updatetestdeps \ 40 | build \ 41 | proto \ 42 | test \ 43 | testrace \ 44 | clean \ 45 | coverage 46 | -------------------------------------------------------------------------------- /vendor/google.golang.org/grpc/backoff_test.go: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Copyright 2017 gRPC authors. 4 | * 5 | * Licensed under the Apache License, Version 2.0 (the "License"); 6 | * you may not use this file except in compliance with the License. 7 | * You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | * 17 | */ 18 | 19 | package grpc 20 | 21 | import "testing" 22 | 23 | func TestBackoffConfigDefaults(t *testing.T) { 24 | b := BackoffConfig{} 25 | setDefaults(&b) 26 | if b != DefaultBackoffConfig { 27 | t.Fatalf("expected BackoffConfig to pickup default parameters: %v != %v", b, DefaultBackoffConfig) 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /vendor/google.golang.org/grpc/benchmark/grpc_testing/payloads.proto: -------------------------------------------------------------------------------- 1 | // Copyright 2016 gRPC authors. 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 | 15 | syntax = "proto3"; 16 | 17 | package grpc.testing; 18 | 19 | message ByteBufferParams { 20 | int32 req_size = 1; 21 | int32 resp_size = 2; 22 | } 23 | 24 | message SimpleProtoParams { 25 | int32 req_size = 1; 26 | int32 resp_size = 2; 27 | } 28 | 29 | message ComplexProtoParams { 30 | // TODO (vpai): Fill this in once the details of complex, representative 31 | // protos are decided 32 | } 33 | 34 | message PayloadConfig { 35 | oneof payload { 36 | ByteBufferParams bytebuf_params = 1; 37 | SimpleProtoParams simple_params = 2; 38 | ComplexProtoParams complex_params = 3; 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /vendor/google.golang.org/grpc/benchmark/worker/util.go: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Copyright 2016 gRPC authors. 4 | * 5 | * Licensed under the Apache License, Version 2.0 (the "License"); 6 | * you may not use this file except in compliance with the License. 7 | * You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | * 17 | */ 18 | 19 | package main 20 | 21 | import "syscall" 22 | 23 | func cpuTimeDiff(first *syscall.Rusage, latest *syscall.Rusage) (float64, float64) { 24 | var ( 25 | utimeDiffs = latest.Utime.Sec - first.Utime.Sec 26 | utimeDiffus = latest.Utime.Usec - first.Utime.Usec 27 | stimeDiffs = latest.Stime.Sec - first.Stime.Sec 28 | stimeDiffus = latest.Stime.Usec - first.Stime.Usec 29 | ) 30 | 31 | uTimeElapsed := float64(utimeDiffs) + float64(utimeDiffus)*1.0e-6 32 | sTimeElapsed := float64(stimeDiffs) + float64(stimeDiffus)*1.0e-6 33 | 34 | return uTimeElapsed, sTimeElapsed 35 | } 36 | -------------------------------------------------------------------------------- /vendor/google.golang.org/grpc/codegen.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | # This script serves as an example to demonstrate how to generate the gRPC-Go 4 | # interface and the related messages from .proto file. 5 | # 6 | # It assumes the installation of i) Google proto buffer compiler at 7 | # https://github.com/google/protobuf (after v2.6.1) and ii) the Go codegen 8 | # plugin at https://github.com/golang/protobuf (after 2015-02-20). If you have 9 | # not, please install them first. 10 | # 11 | # We recommend running this script at $GOPATH/src. 12 | # 13 | # If this is not what you need, feel free to make your own scripts. Again, this 14 | # script is for demonstration purpose. 15 | # 16 | proto=$1 17 | protoc --go_out=plugins=grpc:. $proto 18 | -------------------------------------------------------------------------------- /vendor/google.golang.org/grpc/codes/code_string.go: -------------------------------------------------------------------------------- 1 | // Code generated by "stringer -type=Code"; DO NOT EDIT. 2 | 3 | package codes 4 | 5 | import "fmt" 6 | 7 | const _Code_name = "OKCanceledUnknownInvalidArgumentDeadlineExceededNotFoundAlreadyExistsPermissionDeniedResourceExhaustedFailedPreconditionAbortedOutOfRangeUnimplementedInternalUnavailableDataLossUnauthenticated" 8 | 9 | var _Code_index = [...]uint8{0, 2, 10, 17, 32, 48, 56, 69, 85, 102, 120, 127, 137, 150, 158, 169, 177, 192} 10 | 11 | func (i Code) String() string { 12 | if i >= Code(len(_Code_index)-1) { 13 | return fmt.Sprintf("Code(%d)", i) 14 | } 15 | return _Code_name[_Code_index[i]:_Code_index[i+1]] 16 | } 17 | -------------------------------------------------------------------------------- /vendor/google.golang.org/grpc/credentials/credentials_util_go18.go: -------------------------------------------------------------------------------- 1 | // +build go1.8 2 | 3 | /* 4 | * 5 | * Copyright 2017 gRPC authors. 6 | * 7 | * Licensed under the Apache License, Version 2.0 (the "License"); 8 | * you may not use this file except in compliance with the License. 9 | * You may obtain a copy of the License at 10 | * 11 | * http://www.apache.org/licenses/LICENSE-2.0 12 | * 13 | * Unless required by applicable law or agreed to in writing, software 14 | * distributed under the License is distributed on an "AS IS" BASIS, 15 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | * See the License for the specific language governing permissions and 17 | * limitations under the License. 18 | * 19 | */ 20 | 21 | package credentials 22 | 23 | import ( 24 | "crypto/tls" 25 | ) 26 | 27 | // cloneTLSConfig returns a shallow clone of the exported 28 | // fields of cfg, ignoring the unexported sync.Once, which 29 | // contains a mutex and must not be copied. 30 | // 31 | // If cfg is nil, a new zero tls.Config is returned. 32 | func cloneTLSConfig(cfg *tls.Config) *tls.Config { 33 | if cfg == nil { 34 | return &tls.Config{} 35 | } 36 | 37 | return cfg.Clone() 38 | } 39 | -------------------------------------------------------------------------------- /vendor/google.golang.org/grpc/doc.go: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Copyright 2015 gRPC authors. 4 | * 5 | * Licensed under the Apache License, Version 2.0 (the "License"); 6 | * you may not use this file except in compliance with the License. 7 | * You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | * 17 | */ 18 | 19 | /* 20 | Package grpc implements an RPC system called gRPC. 21 | 22 | See grpc.io for more information about gRPC. 23 | */ 24 | package grpc // import "google.golang.org/grpc" 25 | -------------------------------------------------------------------------------- /vendor/google.golang.org/grpc/examples/README.md: -------------------------------------------------------------------------------- 1 | gRPC in 3 minutes (Go) 2 | ====================== 3 | 4 | BACKGROUND 5 | ------------- 6 | For this sample, we've already generated the server and client stubs from [helloworld.proto](helloworld/helloworld/helloworld.proto). 7 | 8 | PREREQUISITES 9 | ------------- 10 | 11 | - This requires Go 1.6 or later 12 | - Requires that [GOPATH is set](https://golang.org/doc/code.html#GOPATH) 13 | 14 | ``` 15 | $ go help gopath 16 | $ # ensure the PATH contains $GOPATH/bin 17 | $ export PATH=$PATH:$GOPATH/bin 18 | ``` 19 | 20 | INSTALL 21 | ------- 22 | 23 | ``` 24 | $ go get -u google.golang.org/grpc/examples/helloworld/greeter_client 25 | $ go get -u google.golang.org/grpc/examples/helloworld/greeter_server 26 | ``` 27 | 28 | TRY IT! 29 | ------- 30 | 31 | - Run the server 32 | 33 | ``` 34 | $ greeter_server & 35 | ``` 36 | 37 | - Run the client 38 | 39 | ``` 40 | $ greeter_client 41 | ``` 42 | 43 | OPTIONAL - Rebuilding the generated code 44 | ---------------------------------------- 45 | 46 | 1 First [install protoc](https://github.com/google/protobuf/blob/master/README.md) 47 | - For now, this needs to be installed from source 48 | - This is will change once proto3 is officially released 49 | 50 | 2 Install the protoc Go plugin. 51 | 52 | ``` 53 | $ go get -a github.com/golang/protobuf/protoc-gen-go 54 | ``` 55 | 56 | 3 Rebuild the generated Go code. 57 | 58 | ``` 59 | $ go generate google.golang.org/grpc/examples/helloworld/... 60 | ``` 61 | -------------------------------------------------------------------------------- /vendor/google.golang.org/grpc/examples/helloworld/greeter_client/main.go: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Copyright 2015 gRPC authors. 4 | * 5 | * Licensed under the Apache License, Version 2.0 (the "License"); 6 | * you may not use this file except in compliance with the License. 7 | * You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | * 17 | */ 18 | 19 | package main 20 | 21 | import ( 22 | "log" 23 | "os" 24 | 25 | "golang.org/x/net/context" 26 | "google.golang.org/grpc" 27 | pb "google.golang.org/grpc/examples/helloworld/helloworld" 28 | ) 29 | 30 | const ( 31 | address = "localhost:50051" 32 | defaultName = "world" 33 | ) 34 | 35 | func main() { 36 | // Set up a connection to the server. 37 | conn, err := grpc.Dial(address, grpc.WithInsecure()) 38 | if err != nil { 39 | log.Fatalf("did not connect: %v", err) 40 | } 41 | defer conn.Close() 42 | c := pb.NewGreeterClient(conn) 43 | 44 | // Contact the server and print out its response. 45 | name := defaultName 46 | if len(os.Args) > 1 { 47 | name = os.Args[1] 48 | } 49 | r, err := c.SayHello(context.Background(), &pb.HelloRequest{Name: name}) 50 | if err != nil { 51 | log.Fatalf("could not greet: %v", err) 52 | } 53 | log.Printf("Greeting: %s", r.Message) 54 | } 55 | -------------------------------------------------------------------------------- /vendor/google.golang.org/grpc/examples/helloworld/helloworld/helloworld.proto: -------------------------------------------------------------------------------- 1 | // Copyright 2015 gRPC authors. 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 | 15 | syntax = "proto3"; 16 | 17 | option java_multiple_files = true; 18 | option java_package = "io.grpc.examples.helloworld"; 19 | option java_outer_classname = "HelloWorldProto"; 20 | 21 | package helloworld; 22 | 23 | // The greeting service definition. 24 | service Greeter { 25 | // Sends a greeting 26 | rpc SayHello (HelloRequest) returns (HelloReply) {} 27 | } 28 | 29 | // The request message containing the user's name. 30 | message HelloRequest { 31 | string name = 1; 32 | } 33 | 34 | // The response message containing the greetings 35 | message HelloReply { 36 | string message = 1; 37 | } 38 | -------------------------------------------------------------------------------- /vendor/google.golang.org/grpc/examples/route_guide/README.md: -------------------------------------------------------------------------------- 1 | # Description 2 | The route guide server and client demonstrate how to use grpc go libraries to 3 | perform unary, client streaming, server streaming and full duplex RPCs. 4 | 5 | Please refer to [gRPC Basics: Go] (https://grpc.io/docs/tutorials/basic/go.html) for more information. 6 | 7 | See the definition of the route guide service in routeguide/route_guide.proto. 8 | 9 | # Run the sample code 10 | To compile and run the server, assuming you are in the root of the route_guide 11 | folder, i.e., .../examples/route_guide/, simply: 12 | 13 | ```sh 14 | $ go run server/server.go 15 | ``` 16 | 17 | Likewise, to run the client: 18 | 19 | ```sh 20 | $ go run client/client.go 21 | ``` 22 | 23 | # Optional command line flags 24 | The server and client both take optional command line flags. For example, the 25 | client and server run without TLS by default. To enable TLS: 26 | 27 | ```sh 28 | $ go run server/server.go -tls=true 29 | ``` 30 | 31 | and 32 | 33 | ```sh 34 | $ go run client/client.go -tls=true 35 | ``` 36 | -------------------------------------------------------------------------------- /vendor/google.golang.org/grpc/grpclb/grpc_lb_v1/service/service.proto: -------------------------------------------------------------------------------- 1 | // Copyright 2016 gRPC authors. 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 | 15 | syntax = "proto3"; 16 | 17 | package grpc.lb.v1; 18 | option go_package = "google.golang.org/grpc/grpclb/grpc_lb_v1/service"; 19 | 20 | import "grpc_lb_v1/messages/messages.proto"; 21 | 22 | service LoadBalancer { 23 | // Bidirectional rpc to get a list of servers. 24 | rpc BalanceLoad(stream LoadBalanceRequest) 25 | returns (stream LoadBalanceResponse); 26 | } 27 | -------------------------------------------------------------------------------- /vendor/google.golang.org/grpc/health/grpc_health_v1/health.proto: -------------------------------------------------------------------------------- 1 | // Copyright 2017 gRPC authors. 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 | 15 | syntax = "proto3"; 16 | 17 | package grpc.health.v1; 18 | 19 | message HealthCheckRequest { 20 | string service = 1; 21 | } 22 | 23 | message HealthCheckResponse { 24 | enum ServingStatus { 25 | UNKNOWN = 0; 26 | SERVING = 1; 27 | NOT_SERVING = 2; 28 | } 29 | ServingStatus status = 1; 30 | } 31 | 32 | service Health{ 33 | rpc Check(HealthCheckRequest) returns (HealthCheckResponse); 34 | } 35 | -------------------------------------------------------------------------------- /vendor/google.golang.org/grpc/internal/internal.go: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2016 gRPC authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | * 16 | */ 17 | 18 | // Package internal contains gRPC-internal code for testing, to avoid polluting 19 | // the godoc of the top-level grpc package. 20 | package internal 21 | 22 | // TestingCloseConns closes all existing transports but keeps 23 | // grpcServer.lis accepting new connections. 24 | // 25 | // The provided grpcServer must be of type *grpc.Server. It is untyped 26 | // for circular dependency reasons. 27 | var TestingCloseConns func(grpcServer interface{}) 28 | 29 | // TestingUseHandlerImpl enables the http.Handler-based server implementation. 30 | // It must be called before Serve and requires TLS credentials. 31 | // 32 | // The provided grpcServer must be of type *grpc.Server. It is untyped 33 | // for circular dependency reasons. 34 | var TestingUseHandlerImpl func(grpcServer interface{}) 35 | -------------------------------------------------------------------------------- /vendor/google.golang.org/grpc/naming/go17.go: -------------------------------------------------------------------------------- 1 | // +build go1.6, !go1.8 2 | 3 | /* 4 | * 5 | * Copyright 2017 gRPC authors. 6 | * 7 | * Licensed under the Apache License, Version 2.0 (the "License"); 8 | * you may not use this file except in compliance with the License. 9 | * You may obtain a copy of the License at 10 | * 11 | * http://www.apache.org/licenses/LICENSE-2.0 12 | * 13 | * Unless required by applicable law or agreed to in writing, software 14 | * distributed under the License is distributed on an "AS IS" BASIS, 15 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | * See the License for the specific language governing permissions and 17 | * limitations under the License. 18 | * 19 | */ 20 | 21 | package naming 22 | 23 | import ( 24 | "net" 25 | 26 | "golang.org/x/net/context" 27 | ) 28 | 29 | var ( 30 | lookupHost = func(ctx context.Context, host string) ([]string, error) { return net.LookupHost(host) } 31 | lookupSRV = func(ctx context.Context, service, proto, name string) (string, []*net.SRV, error) { 32 | return net.LookupSRV(service, proto, name) 33 | } 34 | ) 35 | -------------------------------------------------------------------------------- /vendor/google.golang.org/grpc/naming/go17_test.go: -------------------------------------------------------------------------------- 1 | // +build go1.6, !go1.8 2 | 3 | /* 4 | * 5 | * Copyright 2017 gRPC authors. 6 | * 7 | * Licensed under the Apache License, Version 2.0 (the "License"); 8 | * you may not use this file except in compliance with the License. 9 | * You may obtain a copy of the License at 10 | * 11 | * http://www.apache.org/licenses/LICENSE-2.0 12 | * 13 | * Unless required by applicable law or agreed to in writing, software 14 | * distributed under the License is distributed on an "AS IS" BASIS, 15 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | * See the License for the specific language governing permissions and 17 | * limitations under the License. 18 | * 19 | */ 20 | 21 | package naming 22 | 23 | import ( 24 | "net" 25 | 26 | "golang.org/x/net/context" 27 | ) 28 | 29 | func replaceNetFunc() func() { 30 | oldLookupHost := lookupHost 31 | oldLookupSRV := lookupSRV 32 | lookupHost = func(ctx context.Context, host string) ([]string, error) { 33 | return hostLookup(host) 34 | } 35 | lookupSRV = func(ctx context.Context, service, proto, name string) (string, []*net.SRV, error) { 36 | return srvLookup(service, proto, name) 37 | } 38 | return func() { 39 | lookupHost = oldLookupHost 40 | lookupSRV = oldLookupSRV 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /vendor/google.golang.org/grpc/naming/go18.go: -------------------------------------------------------------------------------- 1 | // +build go1.8 2 | 3 | /* 4 | * 5 | * Copyright 2017 gRPC authors. 6 | * 7 | * Licensed under the Apache License, Version 2.0 (the "License"); 8 | * you may not use this file except in compliance with the License. 9 | * You may obtain a copy of the License at 10 | * 11 | * http://www.apache.org/licenses/LICENSE-2.0 12 | * 13 | * Unless required by applicable law or agreed to in writing, software 14 | * distributed under the License is distributed on an "AS IS" BASIS, 15 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | * See the License for the specific language governing permissions and 17 | * limitations under the License. 18 | * 19 | */ 20 | 21 | package naming 22 | 23 | import "net" 24 | 25 | var ( 26 | lookupHost = net.DefaultResolver.LookupHost 27 | lookupSRV = net.DefaultResolver.LookupSRV 28 | ) 29 | -------------------------------------------------------------------------------- /vendor/google.golang.org/grpc/naming/go18_test.go: -------------------------------------------------------------------------------- 1 | // +build go1.8 2 | 3 | /* 4 | * 5 | * Copyright 2017 gRPC authors. 6 | * 7 | * Licensed under the Apache License, Version 2.0 (the "License"); 8 | * you may not use this file except in compliance with the License. 9 | * You may obtain a copy of the License at 10 | * 11 | * http://www.apache.org/licenses/LICENSE-2.0 12 | * 13 | * Unless required by applicable law or agreed to in writing, software 14 | * distributed under the License is distributed on an "AS IS" BASIS, 15 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | * See the License for the specific language governing permissions and 17 | * limitations under the License. 18 | * 19 | */ 20 | 21 | package naming 22 | 23 | import ( 24 | "context" 25 | "net" 26 | ) 27 | 28 | func replaceNetFunc() func() { 29 | oldLookupHost := lookupHost 30 | oldLookupSRV := lookupSRV 31 | lookupHost = func(ctx context.Context, host string) ([]string, error) { 32 | return hostLookup(host) 33 | } 34 | lookupSRV = func(ctx context.Context, service, proto, name string) (string, []*net.SRV, error) { 35 | return srvLookup(service, proto, name) 36 | } 37 | return func() { 38 | lookupHost = oldLookupHost 39 | lookupSRV = oldLookupSRV 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /vendor/google.golang.org/grpc/reflection/README.md: -------------------------------------------------------------------------------- 1 | # Reflection 2 | 3 | Package reflection implements server reflection service. 4 | 5 | The service implemented is defined in: https://github.com/grpc/grpc/blob/master/src/proto/grpc/reflection/v1alpha/reflection.proto. 6 | 7 | To register server reflection on a gRPC server: 8 | ```go 9 | import "google.golang.org/grpc/reflection" 10 | 11 | s := grpc.NewServer() 12 | pb.RegisterYourOwnServer(s, &server{}) 13 | 14 | // Register reflection service on gRPC server. 15 | reflection.Register(s) 16 | 17 | s.Serve(lis) 18 | ``` 19 | -------------------------------------------------------------------------------- /vendor/google.golang.org/grpc/reflection/grpc_testing/proto2.proto: -------------------------------------------------------------------------------- 1 | // Copyright 2017 gRPC authors. 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 | 15 | syntax = "proto2"; 16 | 17 | package grpc.testing; 18 | 19 | message ToBeExtended { 20 | required int32 foo = 1; 21 | extensions 10 to 30; 22 | } 23 | -------------------------------------------------------------------------------- /vendor/google.golang.org/grpc/reflection/grpc_testing/proto2_ext.proto: -------------------------------------------------------------------------------- 1 | // Copyright 2017 gRPC authors. 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 | 15 | syntax = "proto2"; 16 | 17 | package grpc.testing; 18 | 19 | import "proto2.proto"; 20 | import "test.proto"; 21 | 22 | extend ToBeExtended { 23 | optional int32 foo = 13; 24 | optional Extension bar = 17; 25 | optional SearchRequest baz = 19; 26 | } 27 | 28 | message Extension { 29 | optional int32 whatzit = 1; 30 | } 31 | -------------------------------------------------------------------------------- /vendor/google.golang.org/grpc/reflection/grpc_testing/proto2_ext2.proto: -------------------------------------------------------------------------------- 1 | // Copyright 2017 gRPC authors. 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 | 15 | syntax = "proto2"; 16 | 17 | package grpc.testing; 18 | 19 | import "proto2.proto"; 20 | 21 | extend ToBeExtended { 22 | optional string frob = 23; 23 | optional AnotherExtension nitz = 29; 24 | } 25 | 26 | message AnotherExtension { 27 | optional int32 whatchamacallit = 1; 28 | } 29 | -------------------------------------------------------------------------------- /vendor/google.golang.org/grpc/reflection/grpc_testing/test.proto: -------------------------------------------------------------------------------- 1 | // Copyright 2017 gRPC authors. 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 | 15 | syntax = "proto3"; 16 | 17 | package grpc.testing; 18 | 19 | message SearchResponse { 20 | message Result { 21 | string url = 1; 22 | string title = 2; 23 | repeated string snippets = 3; 24 | } 25 | repeated Result results = 1; 26 | } 27 | 28 | message SearchRequest { 29 | string query = 1; 30 | } 31 | 32 | service SearchService { 33 | rpc Search(SearchRequest) returns (SearchResponse); 34 | rpc StreamingSearch(stream SearchRequest) returns (stream SearchResponse); 35 | } 36 | -------------------------------------------------------------------------------- /vendor/google.golang.org/grpc/reflection/grpc_testingv3/testv3.proto: -------------------------------------------------------------------------------- 1 | syntax = "proto3"; 2 | 3 | package grpc.testingv3; 4 | 5 | message SearchResponseV3 { 6 | message Result { 7 | string url = 1; 8 | string title = 2; 9 | repeated string snippets = 3; 10 | } 11 | repeated Result results = 1; 12 | } 13 | 14 | message SearchRequestV3 { 15 | string query = 1; 16 | } 17 | 18 | service SearchServiceV3 { 19 | rpc Search(SearchRequestV3) returns (SearchResponseV3); 20 | rpc StreamingSearch(stream SearchRequestV3) returns (stream SearchResponseV3); 21 | } 22 | -------------------------------------------------------------------------------- /vendor/google.golang.org/grpc/resolver/dns/go17.go: -------------------------------------------------------------------------------- 1 | // +build go1.6, !go1.8 2 | 3 | /* 4 | * 5 | * Copyright 2017 gRPC authors. 6 | * 7 | * Licensed under the Apache License, Version 2.0 (the "License"); 8 | * you may not use this file except in compliance with the License. 9 | * You may obtain a copy of the License at 10 | * 11 | * http://www.apache.org/licenses/LICENSE-2.0 12 | * 13 | * Unless required by applicable law or agreed to in writing, software 14 | * distributed under the License is distributed on an "AS IS" BASIS, 15 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | * See the License for the specific language governing permissions and 17 | * limitations under the License. 18 | * 19 | */ 20 | 21 | package dns 22 | 23 | import ( 24 | "net" 25 | 26 | "golang.org/x/net/context" 27 | ) 28 | 29 | var ( 30 | lookupHost = func(ctx context.Context, host string) ([]string, error) { return net.LookupHost(host) } 31 | lookupSRV = func(ctx context.Context, service, proto, name string) (string, []*net.SRV, error) { 32 | return net.LookupSRV(service, proto, name) 33 | } 34 | lookupTXT = func(ctx context.Context, name string) ([]string, error) { return net.LookupTXT(name) } 35 | ) 36 | -------------------------------------------------------------------------------- /vendor/google.golang.org/grpc/resolver/dns/go18.go: -------------------------------------------------------------------------------- 1 | // +build go1.8 2 | 3 | /* 4 | * 5 | * Copyright 2017 gRPC authors. 6 | * 7 | * Licensed under the Apache License, Version 2.0 (the "License"); 8 | * you may not use this file except in compliance with the License. 9 | * You may obtain a copy of the License at 10 | * 11 | * http://www.apache.org/licenses/LICENSE-2.0 12 | * 13 | * Unless required by applicable law or agreed to in writing, software 14 | * distributed under the License is distributed on an "AS IS" BASIS, 15 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | * See the License for the specific language governing permissions and 17 | * limitations under the License. 18 | * 19 | */ 20 | 21 | package dns 22 | 23 | import "net" 24 | 25 | var ( 26 | lookupHost = net.DefaultResolver.LookupHost 27 | lookupSRV = net.DefaultResolver.LookupSRV 28 | lookupTXT = net.DefaultResolver.LookupTXT 29 | ) 30 | -------------------------------------------------------------------------------- /vendor/google.golang.org/grpc/resolver/dns/go18_test.go: -------------------------------------------------------------------------------- 1 | // +build go1.8 2 | 3 | /* 4 | * 5 | * Copyright 2017 gRPC authors. 6 | * 7 | * Licensed under the Apache License, Version 2.0 (the "License"); 8 | * you may not use this file except in compliance with the License. 9 | * You may obtain a copy of the License at 10 | * 11 | * http://www.apache.org/licenses/LICENSE-2.0 12 | * 13 | * Unless required by applicable law or agreed to in writing, software 14 | * distributed under the License is distributed on an "AS IS" BASIS, 15 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | * See the License for the specific language governing permissions and 17 | * limitations under the License. 18 | * 19 | */ 20 | 21 | package dns 22 | 23 | import ( 24 | "context" 25 | "fmt" 26 | "net" 27 | ) 28 | 29 | var errForInvalidTarget = fmt.Errorf("invalid target address [2001:db8:a0b:12f0::1, error info: address [2001:db8:a0b:12f0::1:443: missing ']' in address") 30 | 31 | func replaceNetFunc() func() { 32 | oldLookupHost := lookupHost 33 | oldLookupSRV := lookupSRV 34 | oldLookupTXT := lookupTXT 35 | lookupHost = func(ctx context.Context, host string) ([]string, error) { 36 | return hostLookup(host) 37 | } 38 | lookupSRV = func(ctx context.Context, service, proto, name string) (string, []*net.SRV, error) { 39 | return srvLookup(service, proto, name) 40 | } 41 | lookupTXT = func(ctx context.Context, host string) ([]string, error) { 42 | return txtLookup(host) 43 | } 44 | return func() { 45 | lookupHost = oldLookupHost 46 | lookupSRV = oldLookupSRV 47 | lookupTXT = oldLookupTXT 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /vendor/google.golang.org/grpc/stats/grpc_testing/test.proto: -------------------------------------------------------------------------------- 1 | // Copyright 2017 gRPC authors. 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 | 15 | syntax = "proto3"; 16 | 17 | package grpc.testing; 18 | 19 | message SimpleRequest { 20 | int32 id = 2; 21 | } 22 | 23 | message SimpleResponse { 24 | int32 id = 3; 25 | } 26 | 27 | // A simple test service. 28 | service TestService { 29 | // One request followed by one response. 30 | // The server returns the client id as-is. 31 | rpc UnaryCall(SimpleRequest) returns (SimpleResponse); 32 | 33 | // A sequence of requests with each request served by the server immediately. 34 | // As one request could lead to multiple responses, this interface 35 | // demonstrates the idea of full duplexing. 36 | rpc FullDuplexCall(stream SimpleRequest) returns (stream SimpleResponse); 37 | 38 | // Client stream 39 | rpc ClientStreamCall(stream SimpleRequest) returns (SimpleResponse); 40 | 41 | // Server stream 42 | rpc ServerStreamCall(SimpleRequest) returns (stream SimpleResponse); 43 | } 44 | -------------------------------------------------------------------------------- /vendor/google.golang.org/grpc/test/codec_perf/perf.proto: -------------------------------------------------------------------------------- 1 | // Copyright 2017 gRPC authors. 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 | 15 | // Messages used for performance tests that may not reference grpc directly for 16 | // reasons of import cycles. 17 | syntax = "proto3"; 18 | 19 | package codec.perf; 20 | 21 | // Buffer is a message that contains a body of bytes that is used to exercise 22 | // encoding and decoding overheads. 23 | message Buffer { 24 | bytes body = 1; 25 | } 26 | -------------------------------------------------------------------------------- /vendor/google.golang.org/grpc/test/race.go: -------------------------------------------------------------------------------- 1 | // +build race 2 | 3 | /* 4 | * Copyright 2016 gRPC authors. 5 | * 6 | * Licensed under the Apache License, Version 2.0 (the "License"); 7 | * you may not use this file except in compliance with the License. 8 | * You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | * 18 | */ 19 | 20 | package test 21 | 22 | func init() { 23 | raceMode = true 24 | } 25 | -------------------------------------------------------------------------------- /vendor/google.golang.org/grpc/testdata/ca.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIICSjCCAbOgAwIBAgIJAJHGGR4dGioHMA0GCSqGSIb3DQEBCwUAMFYxCzAJBgNV 3 | BAYTAkFVMRMwEQYDVQQIEwpTb21lLVN0YXRlMSEwHwYDVQQKExhJbnRlcm5ldCBX 4 | aWRnaXRzIFB0eSBMdGQxDzANBgNVBAMTBnRlc3RjYTAeFw0xNDExMTEyMjMxMjla 5 | Fw0yNDExMDgyMjMxMjlaMFYxCzAJBgNVBAYTAkFVMRMwEQYDVQQIEwpTb21lLVN0 6 | YXRlMSEwHwYDVQQKExhJbnRlcm5ldCBXaWRnaXRzIFB0eSBMdGQxDzANBgNVBAMT 7 | BnRlc3RjYTCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEAwEDfBV5MYdlHVHJ7 8 | +L4nxrZy7mBfAVXpOc5vMYztssUI7mL2/iYujiIXM+weZYNTEpLdjyJdu7R5gGUu 9 | g1jSVK/EPHfc74O7AyZU34PNIP4Sh33N+/A5YexrNgJlPY+E3GdVYi4ldWJjgkAd 10 | Qah2PH5ACLrIIC6tRka9hcaBlIECAwEAAaMgMB4wDAYDVR0TBAUwAwEB/zAOBgNV 11 | HQ8BAf8EBAMCAgQwDQYJKoZIhvcNAQELBQADgYEAHzC7jdYlzAVmddi/gdAeKPau 12 | sPBG/C2HCWqHzpCUHcKuvMzDVkY/MP2o6JIW2DBbY64bO/FceExhjcykgaYtCH/m 13 | oIU63+CFOTtR7otyQAWHqXa7q4SbCDlG7DyRFxqG0txPtGvy12lgldA2+RgcigQG 14 | Dfcog5wrJytaQ6UA0wE= 15 | -----END CERTIFICATE----- 16 | -------------------------------------------------------------------------------- /vendor/google.golang.org/grpc/testdata/server1.key: -------------------------------------------------------------------------------- 1 | -----BEGIN PRIVATE KEY----- 2 | MIICdQIBADANBgkqhkiG9w0BAQEFAASCAl8wggJbAgEAAoGBAOHDFScoLCVJpYDD 3 | M4HYtIdV6Ake/sMNaaKdODjDMsux/4tDydlumN+fm+AjPEK5GHhGn1BgzkWF+slf 4 | 3BxhrA/8dNsnunstVA7ZBgA/5qQxMfGAq4wHNVX77fBZOgp9VlSMVfyd9N8YwbBY 5 | AckOeUQadTi2X1S6OgJXgQ0m3MWhAgMBAAECgYAn7qGnM2vbjJNBm0VZCkOkTIWm 6 | V10okw7EPJrdL2mkre9NasghNXbE1y5zDshx5Nt3KsazKOxTT8d0Jwh/3KbaN+YY 7 | tTCbKGW0pXDRBhwUHRcuRzScjli8Rih5UOCiZkhefUTcRb6xIhZJuQy71tjaSy0p 8 | dHZRmYyBYO2YEQ8xoQJBAPrJPhMBkzmEYFtyIEqAxQ/o/A6E+E4w8i+KM7nQCK7q 9 | K4JXzyXVAjLfyBZWHGM2uro/fjqPggGD6QH1qXCkI4MCQQDmdKeb2TrKRh5BY1LR 10 | 81aJGKcJ2XbcDu6wMZK4oqWbTX2KiYn9GB0woM6nSr/Y6iy1u145YzYxEV/iMwff 11 | DJULAkB8B2MnyzOg0pNFJqBJuH29bKCcHa8gHJzqXhNO5lAlEbMK95p/P2Wi+4Hd 12 | aiEIAF1BF326QJcvYKmwSmrORp85AkAlSNxRJ50OWrfMZnBgzVjDx3xG6KsFQVk2 13 | ol6VhqL6dFgKUORFUWBvnKSyhjJxurlPEahV6oo6+A+mPhFY8eUvAkAZQyTdupP3 14 | XEFQKctGz+9+gKkemDp7LBBMEMBXrGTLPhpEfcjv/7KPdnFHYmhYeBTBnuVmTVWe 15 | F98XJ7tIFfJq 16 | -----END PRIVATE KEY----- 17 | -------------------------------------------------------------------------------- /vendor/google.golang.org/grpc/testdata/server1.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIICnDCCAgWgAwIBAgIBBzANBgkqhkiG9w0BAQsFADBWMQswCQYDVQQGEwJBVTET 3 | MBEGA1UECBMKU29tZS1TdGF0ZTEhMB8GA1UEChMYSW50ZXJuZXQgV2lkZ2l0cyBQ 4 | dHkgTHRkMQ8wDQYDVQQDEwZ0ZXN0Y2EwHhcNMTUxMTA0MDIyMDI0WhcNMjUxMTAx 5 | MDIyMDI0WjBlMQswCQYDVQQGEwJVUzERMA8GA1UECBMISWxsaW5vaXMxEDAOBgNV 6 | BAcTB0NoaWNhZ28xFTATBgNVBAoTDEV4YW1wbGUsIENvLjEaMBgGA1UEAxQRKi50 7 | ZXN0Lmdvb2dsZS5jb20wgZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBAOHDFSco 8 | LCVJpYDDM4HYtIdV6Ake/sMNaaKdODjDMsux/4tDydlumN+fm+AjPEK5GHhGn1Bg 9 | zkWF+slf3BxhrA/8dNsnunstVA7ZBgA/5qQxMfGAq4wHNVX77fBZOgp9VlSMVfyd 10 | 9N8YwbBYAckOeUQadTi2X1S6OgJXgQ0m3MWhAgMBAAGjazBpMAkGA1UdEwQCMAAw 11 | CwYDVR0PBAQDAgXgME8GA1UdEQRIMEaCECoudGVzdC5nb29nbGUuZnKCGHdhdGVy 12 | em9vaS50ZXN0Lmdvb2dsZS5iZYISKi50ZXN0LnlvdXR1YmUuY29thwTAqAEDMA0G 13 | CSqGSIb3DQEBCwUAA4GBAJFXVifQNub1LUP4JlnX5lXNlo8FxZ2a12AFQs+bzoJ6 14 | hM044EDjqyxUqSbVePK0ni3w1fHQB5rY9yYC5f8G7aqqTY1QOhoUk8ZTSTRpnkTh 15 | y4jjdvTZeLDVBlueZUTDRmy2feY5aZIU18vFDK08dTG0A87pppuv1LNIR3loveU8 16 | -----END CERTIFICATE----- 17 | -------------------------------------------------------------------------------- /vendor/google.golang.org/grpc/transport/go16.go: -------------------------------------------------------------------------------- 1 | // +build go1.6,!go1.7 2 | 3 | /* 4 | * 5 | * Copyright 2016 gRPC authors. 6 | * 7 | * Licensed under the Apache License, Version 2.0 (the "License"); 8 | * you may not use this file except in compliance with the License. 9 | * You may obtain a copy of the License at 10 | * 11 | * http://www.apache.org/licenses/LICENSE-2.0 12 | * 13 | * Unless required by applicable law or agreed to in writing, software 14 | * distributed under the License is distributed on an "AS IS" BASIS, 15 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | * See the License for the specific language governing permissions and 17 | * limitations under the License. 18 | * 19 | */ 20 | 21 | package transport 22 | 23 | import ( 24 | "net" 25 | 26 | "google.golang.org/grpc/codes" 27 | 28 | "golang.org/x/net/context" 29 | ) 30 | 31 | // dialContext connects to the address on the named network. 32 | func dialContext(ctx context.Context, network, address string) (net.Conn, error) { 33 | return (&net.Dialer{Cancel: ctx.Done()}).Dial(network, address) 34 | } 35 | 36 | // ContextErr converts the error from context package into a StreamError. 37 | func ContextErr(err error) StreamError { 38 | switch err { 39 | case context.DeadlineExceeded: 40 | return streamErrorf(codes.DeadlineExceeded, "%v", err) 41 | case context.Canceled: 42 | return streamErrorf(codes.Canceled, "%v", err) 43 | } 44 | return streamErrorf(codes.Internal, "Unexpected error from context packet: %v", err) 45 | } 46 | -------------------------------------------------------------------------------- /vendor/google.golang.org/grpc/transport/go17.go: -------------------------------------------------------------------------------- 1 | // +build go1.7 2 | 3 | /* 4 | * 5 | * Copyright 2016 gRPC authors. 6 | * 7 | * Licensed under the Apache License, Version 2.0 (the "License"); 8 | * you may not use this file except in compliance with the License. 9 | * You may obtain a copy of the License at 10 | * 11 | * http://www.apache.org/licenses/LICENSE-2.0 12 | * 13 | * Unless required by applicable law or agreed to in writing, software 14 | * distributed under the License is distributed on an "AS IS" BASIS, 15 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | * See the License for the specific language governing permissions and 17 | * limitations under the License. 18 | * 19 | */ 20 | 21 | package transport 22 | 23 | import ( 24 | "context" 25 | "net" 26 | 27 | "google.golang.org/grpc/codes" 28 | 29 | netctx "golang.org/x/net/context" 30 | ) 31 | 32 | // dialContext connects to the address on the named network. 33 | func dialContext(ctx context.Context, network, address string) (net.Conn, error) { 34 | return (&net.Dialer{}).DialContext(ctx, network, address) 35 | } 36 | 37 | // ContextErr converts the error from context package into a StreamError. 38 | func ContextErr(err error) StreamError { 39 | switch err { 40 | case context.DeadlineExceeded, netctx.DeadlineExceeded: 41 | return streamErrorf(codes.DeadlineExceeded, "%v", err) 42 | case context.Canceled, netctx.Canceled: 43 | return streamErrorf(codes.Canceled, "%v", err) 44 | } 45 | return streamErrorf(codes.Internal, "Unexpected error from context packet: %v", err) 46 | } 47 | -------------------------------------------------------------------------------- /vendor/google.golang.org/grpc/transport/log.go: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Copyright 2017 gRPC authors. 4 | * 5 | * Licensed under the Apache License, Version 2.0 (the "License"); 6 | * you may not use this file except in compliance with the License. 7 | * You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | * 17 | */ 18 | 19 | // This file contains wrappers for grpclog functions. 20 | // The transport package only logs to verbose level 2 by default. 21 | 22 | package transport 23 | 24 | import "google.golang.org/grpc/grpclog" 25 | 26 | const logLevel = 2 27 | 28 | func infof(format string, args ...interface{}) { 29 | if grpclog.V(logLevel) { 30 | grpclog.Infof(format, args...) 31 | } 32 | } 33 | 34 | func warningf(format string, args ...interface{}) { 35 | if grpclog.V(logLevel) { 36 | grpclog.Warningf(format, args...) 37 | } 38 | } 39 | 40 | func errorf(format string, args ...interface{}) { 41 | if grpclog.V(logLevel) { 42 | grpclog.Errorf(format, args...) 43 | } 44 | } 45 | 46 | func fatalf(format string, args ...interface{}) { 47 | if grpclog.V(logLevel) { 48 | grpclog.Fatalf(format, args...) 49 | } 50 | } 51 | --------------------------------------------------------------------------------