Copy disabled (too large)
Download .txt
Showing preview only (10,661K chars total). Download the full file to get everything.
Repository: titpetric/books
Branch: master
Commit: fa6bbae28d8a
Files: 1261
Total size: 9.9 MB
Directory structure:
gitextract_czb9adhq/
├── 12fa-docker-golang/
│ ├── README.md
│ ├── chapter1/
│ │ ├── apiservice/
│ │ │ └── apiservice.go
│ │ ├── main.go
│ │ ├── run
│ │ ├── subpackage1.go
│ │ └── vendor/
│ │ ├── github.com/
│ │ │ └── namsral/
│ │ │ └── flag/
│ │ │ ├── LICENSE
│ │ │ ├── examples/
│ │ │ │ └── gopher.go
│ │ │ └── flag.go
│ │ └── manifest
│ ├── chapter11/
│ │ ├── main.go
│ │ ├── run
│ │ └── vendor/
│ │ ├── github.com/
│ │ │ ├── apex/
│ │ │ │ └── log/
│ │ │ │ ├── LICENSE
│ │ │ │ ├── default.go
│ │ │ │ ├── doc.go
│ │ │ │ ├── entry.go
│ │ │ │ ├── handlers/
│ │ │ │ │ ├── cli/
│ │ │ │ │ │ └── cli.go
│ │ │ │ │ ├── discard/
│ │ │ │ │ │ └── discard.go
│ │ │ │ │ ├── es/
│ │ │ │ │ │ └── es.go
│ │ │ │ │ ├── graylog/
│ │ │ │ │ │ └── graylog.go
│ │ │ │ │ ├── json/
│ │ │ │ │ │ └── json.go
│ │ │ │ │ ├── kinesis/
│ │ │ │ │ │ └── kinesis.go
│ │ │ │ │ ├── level/
│ │ │ │ │ │ └── level.go
│ │ │ │ │ ├── logfmt/
│ │ │ │ │ │ └── logfmt.go
│ │ │ │ │ ├── memory/
│ │ │ │ │ │ └── memory.go
│ │ │ │ │ ├── multi/
│ │ │ │ │ │ └── multi.go
│ │ │ │ │ ├── papertrail/
│ │ │ │ │ │ └── papertrail.go
│ │ │ │ │ └── text/
│ │ │ │ │ └── text.go
│ │ │ │ ├── interface.go
│ │ │ │ ├── levels.go
│ │ │ │ ├── logger.go
│ │ │ │ ├── pkg.go
│ │ │ │ └── stack.go
│ │ │ ├── aphistic/
│ │ │ │ └── golf/
│ │ │ │ ├── LICENSE
│ │ │ │ ├── chunker.go
│ │ │ │ ├── client.go
│ │ │ │ ├── json.go
│ │ │ │ ├── log.go
│ │ │ │ ├── log_default.go
│ │ │ │ ├── logger.go
│ │ │ │ ├── main.go
│ │ │ │ └── message.go
│ │ │ ├── aws/
│ │ │ │ └── aws-sdk-go/
│ │ │ │ ├── aws/
│ │ │ │ │ ├── LICENSE.txt
│ │ │ │ │ ├── awserr/
│ │ │ │ │ │ ├── error.go
│ │ │ │ │ │ └── types.go
│ │ │ │ │ ├── awsutil/
│ │ │ │ │ │ ├── copy.go
│ │ │ │ │ │ ├── equal.go
│ │ │ │ │ │ ├── path_value.go
│ │ │ │ │ │ ├── prettify.go
│ │ │ │ │ │ └── string_value.go
│ │ │ │ │ ├── client/
│ │ │ │ │ │ ├── client.go
│ │ │ │ │ │ ├── default_retryer.go
│ │ │ │ │ │ └── metadata/
│ │ │ │ │ │ └── client_info.go
│ │ │ │ │ ├── config.go
│ │ │ │ │ ├── context.go
│ │ │ │ │ ├── context_1_6.go
│ │ │ │ │ ├── context_1_7.go
│ │ │ │ │ ├── convert_types.go
│ │ │ │ │ ├── corehandlers/
│ │ │ │ │ │ ├── handlers.go
│ │ │ │ │ │ └── param_validator.go
│ │ │ │ │ ├── credentials/
│ │ │ │ │ │ ├── chain_provider.go
│ │ │ │ │ │ ├── credentials.go
│ │ │ │ │ │ ├── ec2rolecreds/
│ │ │ │ │ │ │ └── ec2_role_provider.go
│ │ │ │ │ │ ├── endpointcreds/
│ │ │ │ │ │ │ └── provider.go
│ │ │ │ │ │ ├── env_provider.go
│ │ │ │ │ │ ├── shared_credentials_provider.go
│ │ │ │ │ │ ├── static_provider.go
│ │ │ │ │ │ └── stscreds/
│ │ │ │ │ │ └── assume_role_provider.go
│ │ │ │ │ ├── defaults/
│ │ │ │ │ │ └── defaults.go
│ │ │ │ │ ├── ec2metadata/
│ │ │ │ │ │ ├── api.go
│ │ │ │ │ │ └── service.go
│ │ │ │ │ ├── endpoints/
│ │ │ │ │ │ ├── decode.go
│ │ │ │ │ │ ├── defaults.go
│ │ │ │ │ │ ├── doc.go
│ │ │ │ │ │ ├── endpoints.go
│ │ │ │ │ │ ├── v3model.go
│ │ │ │ │ │ └── v3model_codegen.go
│ │ │ │ │ ├── errors.go
│ │ │ │ │ ├── jsonvalue.go
│ │ │ │ │ ├── logger.go
│ │ │ │ │ ├── request/
│ │ │ │ │ │ ├── handlers.go
│ │ │ │ │ │ ├── http_request.go
│ │ │ │ │ │ ├── offset_reader.go
│ │ │ │ │ │ ├── request.go
│ │ │ │ │ │ ├── request_1_7.go
│ │ │ │ │ │ ├── request_1_8.go
│ │ │ │ │ │ ├── request_context.go
│ │ │ │ │ │ ├── request_context_1_6.go
│ │ │ │ │ │ ├── request_pagination.go
│ │ │ │ │ │ ├── retryer.go
│ │ │ │ │ │ ├── serialization_error.go
│ │ │ │ │ │ ├── serialization_error_appengine.go
│ │ │ │ │ │ ├── timeout_read_closer.go
│ │ │ │ │ │ ├── validation.go
│ │ │ │ │ │ └── waiter.go
│ │ │ │ │ ├── session/
│ │ │ │ │ │ ├── doc.go
│ │ │ │ │ │ ├── env_config.go
│ │ │ │ │ │ ├── session.go
│ │ │ │ │ │ └── shared_config.go
│ │ │ │ │ ├── signer/
│ │ │ │ │ │ └── v4/
│ │ │ │ │ │ ├── header_rules.go
│ │ │ │ │ │ ├── options.go
│ │ │ │ │ │ ├── uri_path.go
│ │ │ │ │ │ └── v4.go
│ │ │ │ │ ├── types.go
│ │ │ │ │ ├── url.go
│ │ │ │ │ ├── url_1_7.go
│ │ │ │ │ └── version.go
│ │ │ │ ├── private/
│ │ │ │ │ └── protocol/
│ │ │ │ │ ├── LICENSE.txt
│ │ │ │ │ ├── ec2query/
│ │ │ │ │ │ ├── build.go
│ │ │ │ │ │ └── unmarshal.go
│ │ │ │ │ ├── idempotency.go
│ │ │ │ │ ├── json/
│ │ │ │ │ │ └── jsonutil/
│ │ │ │ │ │ ├── build.go
│ │ │ │ │ │ └── unmarshal.go
│ │ │ │ │ ├── jsonrpc/
│ │ │ │ │ │ └── jsonrpc.go
│ │ │ │ │ ├── query/
│ │ │ │ │ │ ├── build.go
│ │ │ │ │ │ ├── queryutil/
│ │ │ │ │ │ │ └── queryutil.go
│ │ │ │ │ │ ├── unmarshal.go
│ │ │ │ │ │ └── unmarshal_error.go
│ │ │ │ │ ├── rest/
│ │ │ │ │ │ ├── build.go
│ │ │ │ │ │ ├── payload.go
│ │ │ │ │ │ └── unmarshal.go
│ │ │ │ │ ├── restjson/
│ │ │ │ │ │ └── restjson.go
│ │ │ │ │ ├── restxml/
│ │ │ │ │ │ └── restxml.go
│ │ │ │ │ ├── unmarshal.go
│ │ │ │ │ └── xml/
│ │ │ │ │ └── xmlutil/
│ │ │ │ │ ├── build.go
│ │ │ │ │ ├── unmarshal.go
│ │ │ │ │ └── xml_to_struct.go
│ │ │ │ ├── service/
│ │ │ │ │ ├── kinesis/
│ │ │ │ │ │ ├── LICENSE.txt
│ │ │ │ │ │ ├── api.go
│ │ │ │ │ │ ├── customizations.go
│ │ │ │ │ │ ├── errors.go
│ │ │ │ │ │ ├── kinesisiface/
│ │ │ │ │ │ │ └── interface.go
│ │ │ │ │ │ ├── service.go
│ │ │ │ │ │ └── waiters.go
│ │ │ │ │ └── sts/
│ │ │ │ │ ├── LICENSE.txt
│ │ │ │ │ ├── api.go
│ │ │ │ │ ├── customizations.go
│ │ │ │ │ ├── errors.go
│ │ │ │ │ ├── service.go
│ │ │ │ │ └── stsiface/
│ │ │ │ │ └── interface.go
│ │ │ │ └── vendor/
│ │ │ │ └── github.com/
│ │ │ │ ├── go-ini/
│ │ │ │ │ └── ini/
│ │ │ │ │ ├── LICENSE.txt
│ │ │ │ │ ├── error.go
│ │ │ │ │ ├── ini.go
│ │ │ │ │ ├── key.go
│ │ │ │ │ ├── parser.go
│ │ │ │ │ ├── section.go
│ │ │ │ │ └── struct.go
│ │ │ │ └── jmespath/
│ │ │ │ └── go-jmespath/
│ │ │ │ ├── LICENSE.txt
│ │ │ │ ├── api.go
│ │ │ │ ├── astnodetype_string.go
│ │ │ │ ├── functions.go
│ │ │ │ ├── fuzz/
│ │ │ │ │ └── jmespath.go
│ │ │ │ ├── interpreter.go
│ │ │ │ ├── lexer.go
│ │ │ │ ├── parser.go
│ │ │ │ ├── toktype_string.go
│ │ │ │ └── util.go
│ │ │ ├── go-logfmt/
│ │ │ │ └── logfmt/
│ │ │ │ ├── LICENSE
│ │ │ │ ├── decode.go
│ │ │ │ ├── doc.go
│ │ │ │ ├── encode.go
│ │ │ │ ├── fuzz.go
│ │ │ │ └── jsonstring.go
│ │ │ ├── jpillora/
│ │ │ │ └── backoff/
│ │ │ │ ├── LICENSE
│ │ │ │ └── backoff.go
│ │ │ ├── kr/
│ │ │ │ └── logfmt/
│ │ │ │ ├── decode.go
│ │ │ │ ├── scanner.go
│ │ │ │ └── unquote.go
│ │ │ ├── pkg/
│ │ │ │ └── errors/
│ │ │ │ ├── LICENSE
│ │ │ │ ├── errors.go
│ │ │ │ └── stack.go
│ │ │ ├── rogpeppe/
│ │ │ │ └── fastuuid/
│ │ │ │ ├── LICENSE
│ │ │ │ └── uuid.go
│ │ │ ├── satori/
│ │ │ │ └── go.uuid/
│ │ │ │ ├── LICENSE
│ │ │ │ └── uuid.go
│ │ │ └── tj/
│ │ │ ├── go-elastic/
│ │ │ │ └── batch/
│ │ │ │ └── batch.go
│ │ │ └── go-kinesis/
│ │ │ ├── LICENSE
│ │ │ ├── config.go
│ │ │ └── kinesis.go
│ │ └── manifest
│ ├── chapter2/
│ │ ├── run
│ │ └── vendor/
│ │ ├── github.com/
│ │ │ └── namsral/
│ │ │ └── flag/
│ │ │ ├── LICENSE
│ │ │ ├── examples/
│ │ │ │ └── gopher.go
│ │ │ └── flag.go
│ │ └── manifest
│ ├── chapter3/
│ │ ├── flags/
│ │ │ ├── flags.go
│ │ │ ├── run
│ │ │ └── vendor/
│ │ │ ├── github.com/
│ │ │ │ └── namsral/
│ │ │ │ └── flag/
│ │ │ │ ├── LICENSE
│ │ │ │ ├── examples/
│ │ │ │ │ └── gopher.go
│ │ │ │ ├── extras.go
│ │ │ │ └── flag.go
│ │ │ └── manifest
│ │ ├── godotenv/
│ │ │ ├── flags.go
│ │ │ ├── run
│ │ │ └── vendor/
│ │ │ ├── github.com/
│ │ │ │ ├── joho/
│ │ │ │ │ └── godotenv/
│ │ │ │ │ ├── LICENCE
│ │ │ │ │ ├── autoload/
│ │ │ │ │ │ └── autoload.go
│ │ │ │ │ ├── cmd/
│ │ │ │ │ │ └── godotenv/
│ │ │ │ │ │ └── cmd.go
│ │ │ │ │ └── godotenv.go
│ │ │ │ └── namsral/
│ │ │ │ └── flag/
│ │ │ │ ├── LICENSE
│ │ │ │ ├── examples/
│ │ │ │ │ └── gopher.go
│ │ │ │ ├── extras.go
│ │ │ │ └── flag.go
│ │ │ └── manifest
│ │ └── viper/
│ │ ├── main.go
│ │ ├── run
│ │ ├── run_with_env
│ │ └── vendor/
│ │ ├── github.com/
│ │ │ ├── armon/
│ │ │ │ └── consul-api/
│ │ │ │ ├── LICENSE
│ │ │ │ ├── acl.go
│ │ │ │ ├── agent.go
│ │ │ │ ├── api.go
│ │ │ │ ├── catalog.go
│ │ │ │ ├── event.go
│ │ │ │ ├── health.go
│ │ │ │ ├── kv.go
│ │ │ │ ├── session.go
│ │ │ │ └── status.go
│ │ │ ├── coreos/
│ │ │ │ └── go-etcd/
│ │ │ │ └── etcd/
│ │ │ │ ├── LICENSE
│ │ │ │ ├── add_child.go
│ │ │ │ ├── client.go
│ │ │ │ ├── cluster.go
│ │ │ │ ├── compare_and_delete.go
│ │ │ │ ├── compare_and_swap.go
│ │ │ │ ├── debug.go
│ │ │ │ ├── delete.go
│ │ │ │ ├── error.go
│ │ │ │ ├── get.go
│ │ │ │ ├── member.go
│ │ │ │ ├── options.go
│ │ │ │ ├── requests.go
│ │ │ │ ├── response.generated.go
│ │ │ │ ├── response.go
│ │ │ │ ├── set_update_create.go
│ │ │ │ ├── shuffle.go
│ │ │ │ ├── version.go
│ │ │ │ └── watch.go
│ │ │ ├── fsnotify/
│ │ │ │ └── fsnotify/
│ │ │ │ ├── LICENSE
│ │ │ │ ├── fen.go
│ │ │ │ ├── fsnotify.go
│ │ │ │ ├── inotify.go
│ │ │ │ ├── inotify_poller.go
│ │ │ │ ├── kqueue.go
│ │ │ │ ├── open_mode_bsd.go
│ │ │ │ ├── open_mode_darwin.go
│ │ │ │ └── windows.go
│ │ │ ├── hashicorp/
│ │ │ │ └── hcl/
│ │ │ │ ├── LICENSE
│ │ │ │ ├── decoder.go
│ │ │ │ ├── hcl/
│ │ │ │ │ ├── ast/
│ │ │ │ │ │ ├── ast.go
│ │ │ │ │ │ └── walk.go
│ │ │ │ │ ├── fmtcmd/
│ │ │ │ │ │ └── fmtcmd.go
│ │ │ │ │ ├── parser/
│ │ │ │ │ │ ├── error.go
│ │ │ │ │ │ └── parser.go
│ │ │ │ │ ├── printer/
│ │ │ │ │ │ ├── nodes.go
│ │ │ │ │ │ └── printer.go
│ │ │ │ │ ├── scanner/
│ │ │ │ │ │ └── scanner.go
│ │ │ │ │ ├── strconv/
│ │ │ │ │ │ └── quote.go
│ │ │ │ │ └── token/
│ │ │ │ │ ├── position.go
│ │ │ │ │ └── token.go
│ │ │ │ ├── hcl.go
│ │ │ │ ├── json/
│ │ │ │ │ ├── parser/
│ │ │ │ │ │ ├── flatten.go
│ │ │ │ │ │ └── parser.go
│ │ │ │ │ ├── scanner/
│ │ │ │ │ │ └── scanner.go
│ │ │ │ │ └── token/
│ │ │ │ │ ├── position.go
│ │ │ │ │ └── token.go
│ │ │ │ ├── lex.go
│ │ │ │ ├── parse.go
│ │ │ │ └── testhelper/
│ │ │ │ └── unix2dos.go
│ │ │ ├── kr/
│ │ │ │ └── fs/
│ │ │ │ ├── LICENSE
│ │ │ │ ├── filesystem.go
│ │ │ │ └── walk.go
│ │ │ ├── magiconair/
│ │ │ │ └── properties/
│ │ │ │ ├── LICENSE
│ │ │ │ ├── assert/
│ │ │ │ │ └── assert.go
│ │ │ │ ├── decode.go
│ │ │ │ ├── doc.go
│ │ │ │ ├── integrate.go
│ │ │ │ ├── lex.go
│ │ │ │ ├── load.go
│ │ │ │ ├── parser.go
│ │ │ │ ├── properties.go
│ │ │ │ └── rangecheck.go
│ │ │ ├── mitchellh/
│ │ │ │ └── mapstructure/
│ │ │ │ ├── LICENSE
│ │ │ │ ├── decode_hooks.go
│ │ │ │ ├── error.go
│ │ │ │ └── mapstructure.go
│ │ │ ├── pelletier/
│ │ │ │ ├── go-buffruneio/
│ │ │ │ │ └── buffruneio.go
│ │ │ │ └── go-toml/
│ │ │ │ ├── LICENSE
│ │ │ │ ├── cmd/
│ │ │ │ │ ├── test_program.go
│ │ │ │ │ ├── tomljson/
│ │ │ │ │ │ └── main.go
│ │ │ │ │ └── tomll/
│ │ │ │ │ └── main.go
│ │ │ │ ├── doc.go
│ │ │ │ ├── keysparsing.go
│ │ │ │ ├── lexer.go
│ │ │ │ ├── marshal.go
│ │ │ │ ├── match.go
│ │ │ │ ├── parser.go
│ │ │ │ ├── position.go
│ │ │ │ ├── query.go
│ │ │ │ ├── querylexer.go
│ │ │ │ ├── queryparser.go
│ │ │ │ ├── token.go
│ │ │ │ ├── toml.go
│ │ │ │ ├── tomltree_create.go
│ │ │ │ └── tomltree_write.go
│ │ │ ├── pkg/
│ │ │ │ ├── errors/
│ │ │ │ │ ├── LICENSE
│ │ │ │ │ ├── errors.go
│ │ │ │ │ └── stack.go
│ │ │ │ └── sftp/
│ │ │ │ ├── LICENSE
│ │ │ │ ├── attrs.go
│ │ │ │ ├── attrs_stubs.go
│ │ │ │ ├── attrs_unix.go
│ │ │ │ ├── client.go
│ │ │ │ ├── conn.go
│ │ │ │ ├── debug.go
│ │ │ │ ├── examples/
│ │ │ │ │ ├── buffered-read-benchmark/
│ │ │ │ │ │ └── main.go
│ │ │ │ │ ├── buffered-write-benchmark/
│ │ │ │ │ │ └── main.go
│ │ │ │ │ ├── request-server/
│ │ │ │ │ │ └── main.go
│ │ │ │ │ ├── sftp-server/
│ │ │ │ │ │ └── main.go
│ │ │ │ │ ├── streaming-read-benchmark/
│ │ │ │ │ │ └── main.go
│ │ │ │ │ └── streaming-write-benchmark/
│ │ │ │ │ └── main.go
│ │ │ │ ├── match.go
│ │ │ │ ├── packet-manager.go
│ │ │ │ ├── packet-manager_go1.8.go
│ │ │ │ ├── packet-manager_legacy.go
│ │ │ │ ├── packet-typing.go
│ │ │ │ ├── packet.go
│ │ │ │ ├── release.go
│ │ │ │ ├── request-example.go
│ │ │ │ ├── request-interfaces.go
│ │ │ │ ├── request-server.go
│ │ │ │ ├── request-unix.go
│ │ │ │ ├── request.go
│ │ │ │ ├── request_windows.go
│ │ │ │ ├── server.go
│ │ │ │ ├── server_standalone/
│ │ │ │ │ └── main.go
│ │ │ │ ├── server_statvfs_darwin.go
│ │ │ │ ├── server_statvfs_impl.go
│ │ │ │ ├── server_statvfs_linux.go
│ │ │ │ ├── server_statvfs_stubs.go
│ │ │ │ ├── server_stubs.go
│ │ │ │ ├── server_unix.go
│ │ │ │ └── sftp.go
│ │ │ ├── spf13/
│ │ │ │ ├── afero/
│ │ │ │ │ ├── LICENSE.txt
│ │ │ │ │ ├── afero.go
│ │ │ │ │ ├── basepath.go
│ │ │ │ │ ├── cacheOnReadFs.go
│ │ │ │ │ ├── const_bsds.go
│ │ │ │ │ ├── const_win_unix.go
│ │ │ │ │ ├── copyOnWriteFs.go
│ │ │ │ │ ├── httpFs.go
│ │ │ │ │ ├── ioutil.go
│ │ │ │ │ ├── mem/
│ │ │ │ │ │ ├── dir.go
│ │ │ │ │ │ ├── dirmap.go
│ │ │ │ │ │ └── file.go
│ │ │ │ │ ├── memmap.go
│ │ │ │ │ ├── memradix.go
│ │ │ │ │ ├── os.go
│ │ │ │ │ ├── path.go
│ │ │ │ │ ├── readonlyfs.go
│ │ │ │ │ ├── regexpfs.go
│ │ │ │ │ ├── sftpfs/
│ │ │ │ │ │ ├── file.go
│ │ │ │ │ │ └── sftp.go
│ │ │ │ │ ├── unionFile.go
│ │ │ │ │ └── util.go
│ │ │ │ ├── cast/
│ │ │ │ │ ├── LICENSE
│ │ │ │ │ ├── cast.go
│ │ │ │ │ └── caste.go
│ │ │ │ ├── jwalterweatherman/
│ │ │ │ │ ├── LICENSE
│ │ │ │ │ ├── default_notepad.go
│ │ │ │ │ ├── log_counter.go
│ │ │ │ │ └── notepad.go
│ │ │ │ ├── pflag/
│ │ │ │ │ ├── LICENSE
│ │ │ │ │ ├── bool.go
│ │ │ │ │ ├── bool_slice.go
│ │ │ │ │ ├── count.go
│ │ │ │ │ ├── duration.go
│ │ │ │ │ ├── flag.go
│ │ │ │ │ ├── float32.go
│ │ │ │ │ ├── float64.go
│ │ │ │ │ ├── golangflag.go
│ │ │ │ │ ├── int.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
│ │ │ │ └── viper/
│ │ │ │ ├── LICENSE
│ │ │ │ ├── flags.go
│ │ │ │ ├── remote/
│ │ │ │ │ └── remote.go
│ │ │ │ ├── util.go
│ │ │ │ └── viper.go
│ │ │ ├── ugorji/
│ │ │ │ └── go/
│ │ │ │ └── codec/
│ │ │ │ ├── 0doc.go
│ │ │ │ ├── LICENSE
│ │ │ │ ├── binc.go
│ │ │ │ ├── cbor.go
│ │ │ │ ├── codecgen/
│ │ │ │ │ ├── gen.go
│ │ │ │ │ └── z.go
│ │ │ │ ├── decode.go
│ │ │ │ ├── decode_go.go
│ │ │ │ ├── decode_go14.go
│ │ │ │ ├── encode.go
│ │ │ │ ├── fast-path.generated.go
│ │ │ │ ├── fast-path.not.go
│ │ │ │ ├── gen-helper.generated.go
│ │ │ │ ├── gen.generated.go
│ │ │ │ ├── gen.go
│ │ │ │ ├── gen_15.go
│ │ │ │ ├── gen_16.go
│ │ │ │ ├── gen_17.go
│ │ │ │ ├── helper.go
│ │ │ │ ├── helper_internal.go
│ │ │ │ ├── helper_not_unsafe.go
│ │ │ │ ├── helper_unsafe.go
│ │ │ │ ├── json.go
│ │ │ │ ├── msgpack.go
│ │ │ │ ├── noop.go
│ │ │ │ ├── prebuild.go
│ │ │ │ ├── rpc.go
│ │ │ │ ├── simple.go
│ │ │ │ └── time.go
│ │ │ └── xordataexchange/
│ │ │ └── crypt/
│ │ │ ├── backend/
│ │ │ │ ├── LICENSE
│ │ │ │ ├── backend.go
│ │ │ │ ├── consul/
│ │ │ │ │ └── consul.go
│ │ │ │ ├── etcd/
│ │ │ │ │ └── etcd.go
│ │ │ │ └── mock/
│ │ │ │ └── mock.go
│ │ │ ├── config/
│ │ │ │ ├── LICENSE
│ │ │ │ └── config.go
│ │ │ └── encoding/
│ │ │ └── secconf/
│ │ │ ├── LICENSE
│ │ │ └── secconf.go
│ │ ├── golang.org/
│ │ │ └── x/
│ │ │ ├── crypto/
│ │ │ │ ├── cast5/
│ │ │ │ │ ├── LICENSE
│ │ │ │ │ └── cast5.go
│ │ │ │ ├── curve25519/
│ │ │ │ │ ├── LICENSE
│ │ │ │ │ ├── const_amd64.h
│ │ │ │ │ ├── const_amd64.s
│ │ │ │ │ ├── cswap_amd64.s
│ │ │ │ │ ├── curve25519.go
│ │ │ │ │ ├── doc.go
│ │ │ │ │ ├── freeze_amd64.s
│ │ │ │ │ ├── ladderstep_amd64.s
│ │ │ │ │ ├── mont25519_amd64.go
│ │ │ │ │ ├── mul_amd64.s
│ │ │ │ │ └── square_amd64.s
│ │ │ │ ├── ed25519/
│ │ │ │ │ ├── LICENSE
│ │ │ │ │ ├── ed25519.go
│ │ │ │ │ └── internal/
│ │ │ │ │ └── edwards25519/
│ │ │ │ │ ├── const.go
│ │ │ │ │ └── edwards25519.go
│ │ │ │ ├── openpgp/
│ │ │ │ │ ├── LICENSE
│ │ │ │ │ ├── armor/
│ │ │ │ │ │ ├── armor.go
│ │ │ │ │ │ └── encode.go
│ │ │ │ │ ├── canonical_text.go
│ │ │ │ │ ├── clearsign/
│ │ │ │ │ │ └── clearsign.go
│ │ │ │ │ ├── elgamal/
│ │ │ │ │ │ └── elgamal.go
│ │ │ │ │ ├── errors/
│ │ │ │ │ │ └── errors.go
│ │ │ │ │ ├── keys.go
│ │ │ │ │ ├── packet/
│ │ │ │ │ │ ├── compressed.go
│ │ │ │ │ │ ├── config.go
│ │ │ │ │ │ ├── encrypted_key.go
│ │ │ │ │ │ ├── literal.go
│ │ │ │ │ │ ├── ocfb.go
│ │ │ │ │ │ ├── one_pass_signature.go
│ │ │ │ │ │ ├── opaque.go
│ │ │ │ │ │ ├── packet.go
│ │ │ │ │ │ ├── private_key.go
│ │ │ │ │ │ ├── public_key.go
│ │ │ │ │ │ ├── public_key_v3.go
│ │ │ │ │ │ ├── reader.go
│ │ │ │ │ │ ├── signature.go
│ │ │ │ │ │ ├── signature_v3.go
│ │ │ │ │ │ ├── symmetric_key_encrypted.go
│ │ │ │ │ │ ├── symmetrically_encrypted.go
│ │ │ │ │ │ ├── userattribute.go
│ │ │ │ │ │ └── userid.go
│ │ │ │ │ ├── read.go
│ │ │ │ │ ├── s2k/
│ │ │ │ │ │ └── s2k.go
│ │ │ │ │ └── write.go
│ │ │ │ └── ssh/
│ │ │ │ ├── LICENSE
│ │ │ │ ├── agent/
│ │ │ │ │ ├── client.go
│ │ │ │ │ ├── forward.go
│ │ │ │ │ ├── keyring.go
│ │ │ │ │ └── server.go
│ │ │ │ ├── buffer.go
│ │ │ │ ├── certs.go
│ │ │ │ ├── channel.go
│ │ │ │ ├── cipher.go
│ │ │ │ ├── client.go
│ │ │ │ ├── client_auth.go
│ │ │ │ ├── common.go
│ │ │ │ ├── connection.go
│ │ │ │ ├── doc.go
│ │ │ │ ├── handshake.go
│ │ │ │ ├── kex.go
│ │ │ │ ├── keys.go
│ │ │ │ ├── knownhosts/
│ │ │ │ │ └── knownhosts.go
│ │ │ │ ├── mac.go
│ │ │ │ ├── messages.go
│ │ │ │ ├── mux.go
│ │ │ │ ├── server.go
│ │ │ │ ├── session.go
│ │ │ │ ├── streamlocal.go
│ │ │ │ ├── tcpip.go
│ │ │ │ ├── terminal/
│ │ │ │ │ ├── terminal.go
│ │ │ │ │ ├── util.go
│ │ │ │ │ ├── util_bsd.go
│ │ │ │ │ ├── util_linux.go
│ │ │ │ │ ├── util_plan9.go
│ │ │ │ │ ├── util_solaris.go
│ │ │ │ │ └── util_windows.go
│ │ │ │ ├── test/
│ │ │ │ │ └── doc.go
│ │ │ │ └── transport.go
│ │ │ ├── sys/
│ │ │ │ └── unix/
│ │ │ │ ├── LICENSE
│ │ │ │ ├── asm_darwin_386.s
│ │ │ │ ├── asm_darwin_amd64.s
│ │ │ │ ├── asm_darwin_arm.s
│ │ │ │ ├── asm_darwin_arm64.s
│ │ │ │ ├── asm_dragonfly_amd64.s
│ │ │ │ ├── asm_freebsd_386.s
│ │ │ │ ├── asm_freebsd_amd64.s
│ │ │ │ ├── asm_freebsd_arm.s
│ │ │ │ ├── asm_linux_386.s
│ │ │ │ ├── asm_linux_amd64.s
│ │ │ │ ├── asm_linux_arm.s
│ │ │ │ ├── asm_linux_arm64.s
│ │ │ │ ├── asm_linux_mips64x.s
│ │ │ │ ├── asm_linux_mipsx.s
│ │ │ │ ├── asm_linux_ppc64x.s
│ │ │ │ ├── asm_linux_s390x.s
│ │ │ │ ├── asm_netbsd_386.s
│ │ │ │ ├── asm_netbsd_amd64.s
│ │ │ │ ├── asm_netbsd_arm.s
│ │ │ │ ├── asm_openbsd_386.s
│ │ │ │ ├── asm_openbsd_amd64.s
│ │ │ │ ├── asm_solaris_amd64.s
│ │ │ │ ├── bluetooth_linux.go
│ │ │ │ ├── constants.go
│ │ │ │ ├── dirent.go
│ │ │ │ ├── endian_big.go
│ │ │ │ ├── endian_little.go
│ │ │ │ ├── env_unix.go
│ │ │ │ ├── env_unset.go
│ │ │ │ ├── flock.go
│ │ │ │ ├── flock_linux_32bit.go
│ │ │ │ ├── gccgo.go
│ │ │ │ ├── gccgo_c.c
│ │ │ │ ├── gccgo_linux_amd64.go
│ │ │ │ ├── gccgo_linux_sparc64.go
│ │ │ │ ├── mkpost.go
│ │ │ │ ├── openbsd_pledge.go
│ │ │ │ ├── race.go
│ │ │ │ ├── race0.go
│ │ │ │ ├── sockcmsg_linux.go
│ │ │ │ ├── sockcmsg_unix.go
│ │ │ │ ├── str.go
│ │ │ │ ├── syscall.go
│ │ │ │ ├── syscall_bsd.go
│ │ │ │ ├── syscall_darwin.go
│ │ │ │ ├── syscall_darwin_386.go
│ │ │ │ ├── syscall_darwin_amd64.go
│ │ │ │ ├── syscall_darwin_arm.go
│ │ │ │ ├── syscall_darwin_arm64.go
│ │ │ │ ├── syscall_dragonfly.go
│ │ │ │ ├── syscall_dragonfly_amd64.go
│ │ │ │ ├── syscall_freebsd.go
│ │ │ │ ├── syscall_freebsd_386.go
│ │ │ │ ├── syscall_freebsd_amd64.go
│ │ │ │ ├── syscall_freebsd_arm.go
│ │ │ │ ├── syscall_linux.go
│ │ │ │ ├── syscall_linux_386.go
│ │ │ │ ├── syscall_linux_amd64.go
│ │ │ │ ├── syscall_linux_amd64_gc.go
│ │ │ │ ├── syscall_linux_arm.go
│ │ │ │ ├── syscall_linux_arm64.go
│ │ │ │ ├── syscall_linux_mips64x.go
│ │ │ │ ├── syscall_linux_mipsx.go
│ │ │ │ ├── syscall_linux_ppc64x.go
│ │ │ │ ├── syscall_linux_s390x.go
│ │ │ │ ├── syscall_linux_sparc64.go
│ │ │ │ ├── syscall_netbsd.go
│ │ │ │ ├── syscall_netbsd_386.go
│ │ │ │ ├── syscall_netbsd_amd64.go
│ │ │ │ ├── syscall_netbsd_arm.go
│ │ │ │ ├── syscall_no_getwd.go
│ │ │ │ ├── syscall_openbsd.go
│ │ │ │ ├── syscall_openbsd_386.go
│ │ │ │ ├── syscall_openbsd_amd64.go
│ │ │ │ ├── syscall_solaris.go
│ │ │ │ ├── syscall_solaris_amd64.go
│ │ │ │ ├── syscall_unix.go
│ │ │ │ ├── syscall_unix_gc.go
│ │ │ │ ├── types_darwin.go
│ │ │ │ ├── types_dragonfly.go
│ │ │ │ ├── types_freebsd.go
│ │ │ │ ├── types_linux.go
│ │ │ │ ├── types_netbsd.go
│ │ │ │ ├── types_openbsd.go
│ │ │ │ ├── types_solaris.go
│ │ │ │ ├── zerrors_darwin_386.go
│ │ │ │ ├── zerrors_darwin_amd64.go
│ │ │ │ ├── zerrors_darwin_arm.go
│ │ │ │ ├── zerrors_darwin_arm64.go
│ │ │ │ ├── zerrors_dragonfly_amd64.go
│ │ │ │ ├── zerrors_freebsd_386.go
│ │ │ │ ├── zerrors_freebsd_amd64.go
│ │ │ │ ├── zerrors_freebsd_arm.go
│ │ │ │ ├── zerrors_linux_386.go
│ │ │ │ ├── zerrors_linux_amd64.go
│ │ │ │ ├── zerrors_linux_arm.go
│ │ │ │ ├── zerrors_linux_arm64.go
│ │ │ │ ├── zerrors_linux_mips.go
│ │ │ │ ├── zerrors_linux_mips64.go
│ │ │ │ ├── zerrors_linux_mips64le.go
│ │ │ │ ├── zerrors_linux_mipsle.go
│ │ │ │ ├── zerrors_linux_ppc64.go
│ │ │ │ ├── zerrors_linux_ppc64le.go
│ │ │ │ ├── zerrors_linux_s390x.go
│ │ │ │ ├── zerrors_linux_sparc64.go
│ │ │ │ ├── zerrors_netbsd_386.go
│ │ │ │ ├── zerrors_netbsd_amd64.go
│ │ │ │ ├── zerrors_netbsd_arm.go
│ │ │ │ ├── zerrors_openbsd_386.go
│ │ │ │ ├── zerrors_openbsd_amd64.go
│ │ │ │ ├── zerrors_solaris_amd64.go
│ │ │ │ ├── zsyscall_darwin_386.go
│ │ │ │ ├── zsyscall_darwin_amd64.go
│ │ │ │ ├── zsyscall_darwin_arm.go
│ │ │ │ ├── zsyscall_darwin_arm64.go
│ │ │ │ ├── zsyscall_dragonfly_amd64.go
│ │ │ │ ├── zsyscall_freebsd_386.go
│ │ │ │ ├── zsyscall_freebsd_amd64.go
│ │ │ │ ├── zsyscall_freebsd_arm.go
│ │ │ │ ├── zsyscall_linux_386.go
│ │ │ │ ├── zsyscall_linux_amd64.go
│ │ │ │ ├── zsyscall_linux_arm.go
│ │ │ │ ├── zsyscall_linux_arm64.go
│ │ │ │ ├── zsyscall_linux_mips.go
│ │ │ │ ├── zsyscall_linux_mips64.go
│ │ │ │ ├── zsyscall_linux_mips64le.go
│ │ │ │ ├── zsyscall_linux_mipsle.go
│ │ │ │ ├── zsyscall_linux_ppc64.go
│ │ │ │ ├── zsyscall_linux_ppc64le.go
│ │ │ │ ├── zsyscall_linux_s390x.go
│ │ │ │ ├── zsyscall_linux_sparc64.go
│ │ │ │ ├── zsyscall_netbsd_386.go
│ │ │ │ ├── zsyscall_netbsd_amd64.go
│ │ │ │ ├── zsyscall_netbsd_arm.go
│ │ │ │ ├── zsyscall_openbsd_386.go
│ │ │ │ ├── zsyscall_openbsd_amd64.go
│ │ │ │ ├── zsyscall_solaris_amd64.go
│ │ │ │ ├── zsysctl_openbsd.go
│ │ │ │ ├── zsysnum_darwin_386.go
│ │ │ │ ├── zsysnum_darwin_amd64.go
│ │ │ │ ├── zsysnum_darwin_arm.go
│ │ │ │ ├── zsysnum_darwin_arm64.go
│ │ │ │ ├── zsysnum_dragonfly_amd64.go
│ │ │ │ ├── zsysnum_freebsd_386.go
│ │ │ │ ├── zsysnum_freebsd_amd64.go
│ │ │ │ ├── zsysnum_freebsd_arm.go
│ │ │ │ ├── zsysnum_linux_386.go
│ │ │ │ ├── zsysnum_linux_amd64.go
│ │ │ │ ├── zsysnum_linux_arm.go
│ │ │ │ ├── zsysnum_linux_arm64.go
│ │ │ │ ├── zsysnum_linux_mips.go
│ │ │ │ ├── zsysnum_linux_mips64.go
│ │ │ │ ├── zsysnum_linux_mips64le.go
│ │ │ │ ├── zsysnum_linux_mipsle.go
│ │ │ │ ├── zsysnum_linux_ppc64.go
│ │ │ │ ├── zsysnum_linux_ppc64le.go
│ │ │ │ ├── zsysnum_linux_s390x.go
│ │ │ │ ├── zsysnum_linux_sparc64.go
│ │ │ │ ├── zsysnum_netbsd_386.go
│ │ │ │ ├── zsysnum_netbsd_amd64.go
│ │ │ │ ├── zsysnum_netbsd_arm.go
│ │ │ │ ├── zsysnum_openbsd_386.go
│ │ │ │ ├── zsysnum_openbsd_amd64.go
│ │ │ │ ├── zsysnum_solaris_amd64.go
│ │ │ │ ├── ztypes_darwin_386.go
│ │ │ │ ├── ztypes_darwin_amd64.go
│ │ │ │ ├── ztypes_darwin_arm.go
│ │ │ │ ├── ztypes_darwin_arm64.go
│ │ │ │ ├── ztypes_dragonfly_amd64.go
│ │ │ │ ├── ztypes_freebsd_386.go
│ │ │ │ ├── ztypes_freebsd_amd64.go
│ │ │ │ ├── ztypes_freebsd_arm.go
│ │ │ │ ├── ztypes_linux_386.go
│ │ │ │ ├── ztypes_linux_amd64.go
│ │ │ │ ├── ztypes_linux_arm.go
│ │ │ │ ├── ztypes_linux_arm64.go
│ │ │ │ ├── ztypes_linux_mips.go
│ │ │ │ ├── ztypes_linux_mips64.go
│ │ │ │ ├── ztypes_linux_mips64le.go
│ │ │ │ ├── ztypes_linux_mipsle.go
│ │ │ │ ├── ztypes_linux_ppc64.go
│ │ │ │ ├── ztypes_linux_ppc64le.go
│ │ │ │ ├── ztypes_linux_s390x.go
│ │ │ │ ├── ztypes_linux_sparc64.go
│ │ │ │ ├── ztypes_netbsd_386.go
│ │ │ │ ├── ztypes_netbsd_amd64.go
│ │ │ │ ├── ztypes_netbsd_arm.go
│ │ │ │ ├── ztypes_openbsd_386.go
│ │ │ │ ├── ztypes_openbsd_amd64.go
│ │ │ │ └── ztypes_solaris_amd64.go
│ │ │ └── text/
│ │ │ ├── internal/
│ │ │ │ ├── gen/
│ │ │ │ │ ├── LICENSE
│ │ │ │ │ ├── code.go
│ │ │ │ │ └── gen.go
│ │ │ │ ├── triegen/
│ │ │ │ │ ├── LICENSE
│ │ │ │ │ ├── compact.go
│ │ │ │ │ ├── print.go
│ │ │ │ │ └── triegen.go
│ │ │ │ └── ucd/
│ │ │ │ ├── LICENSE
│ │ │ │ └── ucd.go
│ │ │ ├── transform/
│ │ │ │ ├── LICENSE
│ │ │ │ └── transform.go
│ │ │ └── unicode/
│ │ │ ├── cldr/
│ │ │ │ ├── LICENSE
│ │ │ │ ├── base.go
│ │ │ │ ├── cldr.go
│ │ │ │ ├── collate.go
│ │ │ │ ├── decode.go
│ │ │ │ ├── makexml.go
│ │ │ │ ├── resolve.go
│ │ │ │ ├── slice.go
│ │ │ │ └── xml.go
│ │ │ └── norm/
│ │ │ ├── LICENSE
│ │ │ ├── composition.go
│ │ │ ├── forminfo.go
│ │ │ ├── input.go
│ │ │ ├── iter.go
│ │ │ ├── maketables.go
│ │ │ ├── normalize.go
│ │ │ ├── readwriter.go
│ │ │ ├── tables.go
│ │ │ ├── transform.go
│ │ │ ├── trie.go
│ │ │ └── triegen.go
│ │ ├── gopkg.in/
│ │ │ └── yaml.v2/
│ │ │ ├── LICENSE
│ │ │ ├── apic.go
│ │ │ ├── decode.go
│ │ │ ├── emitterc.go
│ │ │ ├── encode.go
│ │ │ ├── parserc.go
│ │ │ ├── readerc.go
│ │ │ ├── resolve.go
│ │ │ ├── scannerc.go
│ │ │ ├── sorter.go
│ │ │ ├── writerc.go
│ │ │ ├── yaml.go
│ │ │ ├── yamlh.go
│ │ │ └── yamlprivateh.go
│ │ └── manifest
│ ├── chapter4/
│ │ ├── mysql/
│ │ │ ├── main.go
│ │ │ ├── main.go.txt
│ │ │ ├── main_namsral.go
│ │ │ ├── main_namsral.go.txt
│ │ │ ├── main_pflag.go
│ │ │ ├── main_pflag.go.txt
│ │ │ ├── run
│ │ │ ├── service/
│ │ │ │ └── database.go
│ │ │ └── vendor/
│ │ │ ├── github.com/
│ │ │ │ ├── go-sql-driver/
│ │ │ │ │ └── mysql/
│ │ │ │ │ ├── LICENSE
│ │ │ │ │ ├── appengine.go
│ │ │ │ │ ├── buffer.go
│ │ │ │ │ ├── collations.go
│ │ │ │ │ ├── connection.go
│ │ │ │ │ ├── const.go
│ │ │ │ │ ├── driver.go
│ │ │ │ │ ├── dsn.go
│ │ │ │ │ ├── errors.go
│ │ │ │ │ ├── infile.go
│ │ │ │ │ ├── packets.go
│ │ │ │ │ ├── result.go
│ │ │ │ │ ├── rows.go
│ │ │ │ │ ├── statement.go
│ │ │ │ │ ├── transaction.go
│ │ │ │ │ └── utils.go
│ │ │ │ ├── jmoiron/
│ │ │ │ │ └── sqlx/
│ │ │ │ │ ├── LICENSE
│ │ │ │ │ ├── bind.go
│ │ │ │ │ ├── doc.go
│ │ │ │ │ ├── named.go
│ │ │ │ │ ├── named_context.go
│ │ │ │ │ ├── reflectx/
│ │ │ │ │ │ └── reflect.go
│ │ │ │ │ ├── sqlx.go
│ │ │ │ │ ├── sqlx_context.go
│ │ │ │ │ └── types/
│ │ │ │ │ └── types.go
│ │ │ │ ├── namsral/
│ │ │ │ │ └── flag/
│ │ │ │ │ ├── LICENSE
│ │ │ │ │ ├── examples/
│ │ │ │ │ │ └── gopher.go
│ │ │ │ │ ├── extras.go
│ │ │ │ │ └── flag.go
│ │ │ │ └── spf13/
│ │ │ │ └── pflag/
│ │ │ │ ├── LICENSE
│ │ │ │ ├── bool.go
│ │ │ │ ├── bool_slice.go
│ │ │ │ ├── count.go
│ │ │ │ ├── duration.go
│ │ │ │ ├── flag.go
│ │ │ │ ├── float32.go
│ │ │ │ ├── float64.go
│ │ │ │ ├── golangflag.go
│ │ │ │ ├── int.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
│ │ │ └── manifest
│ │ └── redis/
│ │ ├── redis1.go
│ │ ├── redis1.go.txt
│ │ ├── redis2.go
│ │ ├── redis2.go.txt
│ │ ├── redis3.go
│ │ ├── redis3.go.txt
│ │ ├── run
│ │ ├── run_containers
│ │ ├── service/
│ │ │ ├── now.go
│ │ │ └── redis.go
│ │ └── vendor/
│ │ ├── github.com/
│ │ │ └── garyburd/
│ │ │ └── redigo/
│ │ │ ├── internal/
│ │ │ │ ├── LICENSE
│ │ │ │ ├── commandinfo.go
│ │ │ │ └── redistest/
│ │ │ │ └── testdb.go
│ │ │ └── redis/
│ │ │ ├── LICENSE
│ │ │ ├── conn.go
│ │ │ ├── doc.go
│ │ │ ├── go17.go
│ │ │ ├── log.go
│ │ │ ├── pool.go
│ │ │ ├── pre_go17.go
│ │ │ ├── pubsub.go
│ │ │ ├── redis.go
│ │ │ ├── reply.go
│ │ │ ├── scan.go
│ │ │ └── script.go
│ │ └── manifest
│ ├── chapter7/
│ │ ├── .gitignore
│ │ ├── Dockerfile
│ │ ├── README.md
│ │ ├── api/
│ │ │ ├── health.go
│ │ │ └── twitter.go
│ │ ├── build.sh
│ │ ├── build_static.sh
│ │ ├── main.go
│ │ ├── public_html/
│ │ │ ├── index.html
│ │ │ └── index.js
│ │ ├── run
│ │ ├── run_docker
│ │ ├── run_errcheck
│ │ ├── run_golint
│ │ ├── services/
│ │ │ ├── redis.go
│ │ │ └── respond.go
│ │ └── vendor/
│ │ ├── github.com/
│ │ │ ├── garyburd/
│ │ │ │ └── redigo/
│ │ │ │ ├── LICENSE
│ │ │ │ ├── internal/
│ │ │ │ │ ├── commandinfo.go
│ │ │ │ │ └── redistest/
│ │ │ │ │ └── testdb.go
│ │ │ │ ├── redis/
│ │ │ │ │ ├── conn.go
│ │ │ │ │ ├── doc.go
│ │ │ │ │ ├── go17.go
│ │ │ │ │ ├── log.go
│ │ │ │ │ ├── pool.go
│ │ │ │ │ ├── pre_go17.go
│ │ │ │ │ ├── pubsub.go
│ │ │ │ │ ├── redis.go
│ │ │ │ │ ├── reply.go
│ │ │ │ │ ├── scan.go
│ │ │ │ │ └── script.go
│ │ │ │ └── redisx/
│ │ │ │ ├── connmux.go
│ │ │ │ └── doc.go
│ │ │ └── namsral/
│ │ │ └── flag/
│ │ │ ├── LICENSE
│ │ │ ├── examples/
│ │ │ │ └── gopher.go
│ │ │ ├── extras.go
│ │ │ └── flag.go
│ │ └── manifest
│ ├── chapter8/
│ │ ├── .gitignore
│ │ ├── README.md
│ │ ├── haproxy/
│ │ │ └── haproxy.cfg
│ │ ├── pm2_exec
│ │ ├── pm2_haproxy
│ │ ├── pm2_run
│ │ └── process.yml
│ ├── digitalocean/
│ │ ├── create.sh
│ │ ├── destroy.sh
│ │ ├── get-ip.sh
│ │ ├── ssh.sh
│ │ └── swarm/
│ │ ├── .gitignore
│ │ ├── README.md
│ │ ├── add-manager.sh
│ │ ├── add-worker.sh
│ │ ├── destroy.sh
│ │ ├── list-managers.sh
│ │ ├── list-swarm.sh
│ │ ├── list-workers.sh
│ │ ├── list.sh
│ │ ├── remove-manager.sh
│ │ ├── remove-worker.sh
│ │ ├── ssh-key.sh
│ │ ├── ssh-one.sh
│ │ └── ssh.sh
│ ├── scaleway/
│ │ ├── .gitignore
│ │ ├── create.sh
│ │ ├── destroy.sh
│ │ ├── get-ip.sh
│ │ ├── install.sh
│ │ ├── list.sh
│ │ ├── ssh.sh
│ │ └── swarm/
│ │ ├── include/
│ │ │ └── common.sh
│ │ └── scripts/
│ │ └── bootstrap.sh
│ ├── services/
│ │ ├── mysql/
│ │ │ ├── .gitignore
│ │ │ ├── bin/
│ │ │ │ └── run
│ │ │ └── conf/
│ │ │ ├── .my.cnf
│ │ │ └── conf.d/
│ │ │ ├── .placeholder
│ │ │ └── skipresolve.conf
│ │ ├── redis/
│ │ │ ├── bin/
│ │ │ │ ├── redis-cli
│ │ │ │ ├── run
│ │ │ │ └── shutdown
│ │ │ └── docker.image
│ │ └── registry/
│ │ ├── .gitignore
│ │ └── bin/
│ │ ├── purge
│ │ └── run
│ └── shell/
│ ├── .gitignore
│ ├── docker_network
│ ├── gogs
│ ├── gogs_backup
│ └── mysql
├── LICENSE
├── README.md
└── api-foundations/
├── .gitignore
├── chapter1/
│ ├── hello_world.go
│ └── run
├── chapter2/
│ ├── bootstrap/
│ │ └── now.go
│ ├── chapter2b.go
│ ├── reflection.go
│ ├── run
│ ├── type1.go
│ ├── type2.go
│ ├── type3.go
│ └── type5.go
├── chapter3/
│ ├── example1.go
│ ├── example1.json
│ ├── example2.go
│ ├── example2.json
│ ├── example3.go
│ ├── example3.txt
│ └── run
├── chapter4/
│ ├── run
│ ├── server1.go
│ ├── server2.go
│ ├── server3.go
│ ├── server4.go
│ └── server5.go
├── chapter4b/
│ ├── Gopkg.toml
│ ├── run
│ ├── server1.go
│ ├── server2.go
│ ├── server3.go
│ ├── server4.go
│ └── vendor/
│ └── github.com/
│ └── go-chi/
│ ├── chi/
│ │ ├── .gitignore
│ │ ├── .travis.yml
│ │ ├── CHANGELOG.md
│ │ ├── CONTRIBUTING.md
│ │ ├── LICENSE
│ │ ├── README.md
│ │ ├── _examples/
│ │ │ ├── custom-handler/
│ │ │ │ └── main.go
│ │ │ ├── custom-method/
│ │ │ │ └── main.go
│ │ │ ├── fileserver/
│ │ │ │ ├── files/
│ │ │ │ │ └── notes.txt
│ │ │ │ └── main.go
│ │ │ ├── graceful/
│ │ │ │ └── main.go
│ │ │ ├── hello-world/
│ │ │ │ └── main.go
│ │ │ ├── limits/
│ │ │ │ └── main.go
│ │ │ ├── logging/
│ │ │ │ └── main.go
│ │ │ ├── rest/
│ │ │ │ ├── main.go
│ │ │ │ ├── routes.json
│ │ │ │ └── routes.md
│ │ │ ├── router-walk/
│ │ │ │ └── main.go
│ │ │ ├── todos-resource/
│ │ │ │ ├── main.go
│ │ │ │ ├── todos.go
│ │ │ │ └── users.go
│ │ │ └── versions/
│ │ │ ├── data/
│ │ │ │ ├── article.go
│ │ │ │ └── errors.go
│ │ │ ├── main.go
│ │ │ └── presenter/
│ │ │ ├── v1/
│ │ │ │ └── article.go
│ │ │ ├── v2/
│ │ │ │ └── article.go
│ │ │ └── v3/
│ │ │ └── article.go
│ │ ├── chain.go
│ │ ├── chi.go
│ │ ├── context.go
│ │ ├── middleware/
│ │ │ ├── closenotify17.go
│ │ │ ├── closenotify18.go
│ │ │ ├── compress.go
│ │ │ ├── compress18.go
│ │ │ ├── content_charset.go
│ │ │ ├── content_charset_test.go
│ │ │ ├── content_type.go
│ │ │ ├── get_head.go
│ │ │ ├── get_head_test.go
│ │ │ ├── heartbeat.go
│ │ │ ├── logger.go
│ │ │ ├── middleware.go
│ │ │ ├── middleware18_test.go
│ │ │ ├── middleware_test.go
│ │ │ ├── nocache.go
│ │ │ ├── profiler.go
│ │ │ ├── realip.go
│ │ │ ├── realip_test.go
│ │ │ ├── recoverer.go
│ │ │ ├── request_id.go
│ │ │ ├── strip.go
│ │ │ ├── strip_test.go
│ │ │ ├── terminal.go
│ │ │ ├── throttle.go
│ │ │ ├── throttle_test.go
│ │ │ ├── timeout.go
│ │ │ ├── url_format.go
│ │ │ ├── value.go
│ │ │ ├── wrap_writer.go
│ │ │ ├── wrap_writer17.go
│ │ │ └── wrap_writer18.go
│ │ ├── mux.go
│ │ ├── mux_test.go
│ │ ├── testdata/
│ │ │ ├── cert.pem
│ │ │ └── key.pem
│ │ ├── tree.go
│ │ └── tree_test.go
│ └── cors/
│ ├── README.md
│ ├── _example/
│ │ └── main.go
│ ├── cors.go
│ └── utils.go
├── chapter4b-jwt/
│ ├── Gopkg.toml
│ ├── jwt.go
│ ├── main.go
│ ├── run.sh
│ └── vendor/
│ └── github.com/
│ ├── dgrijalva/
│ │ └── jwt-go/
│ │ ├── .gitignore
│ │ ├── .travis.yml
│ │ ├── LICENSE
│ │ ├── MIGRATION_GUIDE.md
│ │ ├── README.md
│ │ ├── VERSION_HISTORY.md
│ │ ├── claims.go
│ │ ├── cmd/
│ │ │ └── jwt/
│ │ │ ├── README.md
│ │ │ ├── app.go
│ │ │ └── args.go
│ │ ├── doc.go
│ │ ├── ecdsa.go
│ │ ├── ecdsa_test.go
│ │ ├── ecdsa_utils.go
│ │ ├── errors.go
│ │ ├── example_test.go
│ │ ├── hmac.go
│ │ ├── hmac_example_test.go
│ │ ├── hmac_test.go
│ │ ├── http_example_test.go
│ │ ├── map_claims.go
│ │ ├── none.go
│ │ ├── none_test.go
│ │ ├── parser.go
│ │ ├── parser_test.go
│ │ ├── request/
│ │ │ ├── doc.go
│ │ │ ├── extractor.go
│ │ │ ├── extractor_example_test.go
│ │ │ ├── extractor_test.go
│ │ │ ├── oauth2.go
│ │ │ ├── request.go
│ │ │ └── request_test.go
│ │ ├── rsa.go
│ │ ├── rsa_pss.go
│ │ ├── rsa_pss_test.go
│ │ ├── rsa_test.go
│ │ ├── rsa_utils.go
│ │ ├── signing_method.go
│ │ ├── test/
│ │ │ ├── ec256-private.pem
│ │ │ ├── ec256-public.pem
│ │ │ ├── ec384-private.pem
│ │ │ ├── ec384-public.pem
│ │ │ ├── ec512-private.pem
│ │ │ ├── ec512-public.pem
│ │ │ ├── helpers.go
│ │ │ ├── hmacTestKey
│ │ │ ├── privateSecure.pem
│ │ │ ├── sample_key
│ │ │ └── sample_key.pub
│ │ └── token.go
│ ├── go-chi/
│ │ ├── chi/
│ │ │ ├── .gitignore
│ │ │ ├── .travis.yml
│ │ │ ├── CHANGELOG.md
│ │ │ ├── CONTRIBUTING.md
│ │ │ ├── LICENSE
│ │ │ ├── README.md
│ │ │ ├── _examples/
│ │ │ │ ├── custom-handler/
│ │ │ │ │ └── main.go
│ │ │ │ ├── custom-method/
│ │ │ │ │ └── main.go
│ │ │ │ ├── fileserver/
│ │ │ │ │ ├── files/
│ │ │ │ │ │ └── notes.txt
│ │ │ │ │ └── main.go
│ │ │ │ ├── graceful/
│ │ │ │ │ └── main.go
│ │ │ │ ├── hello-world/
│ │ │ │ │ └── main.go
│ │ │ │ ├── limits/
│ │ │ │ │ └── main.go
│ │ │ │ ├── logging/
│ │ │ │ │ └── main.go
│ │ │ │ ├── rest/
│ │ │ │ │ ├── main.go
│ │ │ │ │ ├── routes.json
│ │ │ │ │ └── routes.md
│ │ │ │ ├── router-walk/
│ │ │ │ │ └── main.go
│ │ │ │ ├── todos-resource/
│ │ │ │ │ ├── main.go
│ │ │ │ │ ├── todos.go
│ │ │ │ │ └── users.go
│ │ │ │ └── versions/
│ │ │ │ ├── data/
│ │ │ │ │ ├── article.go
│ │ │ │ │ └── errors.go
│ │ │ │ ├── main.go
│ │ │ │ └── presenter/
│ │ │ │ ├── v1/
│ │ │ │ │ └── article.go
│ │ │ │ ├── v2/
│ │ │ │ │ └── article.go
│ │ │ │ └── v3/
│ │ │ │ └── article.go
│ │ │ ├── chain.go
│ │ │ ├── chi.go
│ │ │ ├── context.go
│ │ │ ├── middleware/
│ │ │ │ ├── closenotify17.go
│ │ │ │ ├── closenotify18.go
│ │ │ │ ├── compress.go
│ │ │ │ ├── compress18.go
│ │ │ │ ├── content_charset.go
│ │ │ │ ├── content_charset_test.go
│ │ │ │ ├── content_type.go
│ │ │ │ ├── get_head.go
│ │ │ │ ├── get_head_test.go
│ │ │ │ ├── heartbeat.go
│ │ │ │ ├── logger.go
│ │ │ │ ├── middleware.go
│ │ │ │ ├── middleware18_test.go
│ │ │ │ ├── middleware_test.go
│ │ │ │ ├── nocache.go
│ │ │ │ ├── profiler.go
│ │ │ │ ├── realip.go
│ │ │ │ ├── realip_test.go
│ │ │ │ ├── recoverer.go
│ │ │ │ ├── request_id.go
│ │ │ │ ├── strip.go
│ │ │ │ ├── strip_test.go
│ │ │ │ ├── terminal.go
│ │ │ │ ├── throttle.go
│ │ │ │ ├── throttle_test.go
│ │ │ │ ├── timeout.go
│ │ │ │ ├── url_format.go
│ │ │ │ ├── value.go
│ │ │ │ ├── wrap_writer.go
│ │ │ │ ├── wrap_writer17.go
│ │ │ │ └── wrap_writer18.go
│ │ │ ├── mux.go
│ │ │ ├── mux_test.go
│ │ │ ├── testdata/
│ │ │ │ ├── cert.pem
│ │ │ │ └── key.pem
│ │ │ ├── tree.go
│ │ │ └── tree_test.go
│ │ └── cors/
│ │ ├── README.md
│ │ ├── _example/
│ │ │ └── main.go
│ │ ├── cors.go
│ │ └── utils.go
│ ├── pkg/
│ │ └── errors/
│ │ ├── .gitignore
│ │ ├── .travis.yml
│ │ ├── LICENSE
│ │ ├── README.md
│ │ ├── appveyor.yml
│ │ ├── bench_test.go
│ │ ├── errors.go
│ │ ├── errors_test.go
│ │ ├── example_test.go
│ │ ├── format_test.go
│ │ ├── stack.go
│ │ └── stack_test.go
│ └── titpetric/
│ └── factory/
│ ├── LICENSE
│ ├── README.md
│ ├── database.go
│ ├── profiler.go
│ ├── resputil/
│ │ └── resputil.go
│ ├── semaphore.go
│ └── sonyflake.go
├── chapter5/
│ ├── apiservice/
│ │ └── apiservice.go
│ ├── bootstrap/
│ │ └── now.go
│ ├── run
│ ├── server1.go
│ ├── server2.go
│ └── server3.go
├── chapter6/
│ ├── bootstrap/
│ │ ├── now.go
│ │ ├── redigo.go
│ │ ├── redigo.go.txt
│ │ └── redis.go
│ ├── redis1.go
│ ├── redis1.go.txt
│ ├── redis2.go
│ ├── redis2.go.txt
│ ├── redis3.go
│ ├── redis3.go.txt
│ ├── run
│ └── run_containers
├── chapter6b/
│ ├── bootstrap/
│ │ ├── now.go
│ │ └── sqlx.go
│ ├── main_sql.go
│ ├── main_sql.go.txt
│ ├── main_sqlx.go
│ ├── main_sqlx.go.txt
│ ├── main_sqlx2.go
│ ├── main_sqlx2.go.txt
│ ├── main_sqlx3.go
│ ├── main_sqlx3.go.txt
│ └── run
├── chapter7/
│ ├── .gitignore
│ ├── run
│ ├── t1/
│ │ ├── bootstrap/
│ │ │ ├── now.go
│ │ │ ├── redigo.go
│ │ │ └── redis.go
│ │ ├── registry.go
│ │ └── registry_test.go
│ ├── t2/
│ │ ├── bootstrap/
│ │ │ ├── now.go
│ │ │ ├── redigo.go
│ │ │ └── redis.go
│ │ ├── registry.go
│ │ └── registry_test.go
│ └── t3/
│ ├── bootstrap/
│ │ ├── now.go
│ │ ├── redigo.go
│ │ └── redis.go
│ ├── registry.go
│ └── registry_test.go
├── chapter8/
│ ├── .gitignore
│ ├── api/
│ │ ├── registry.go
│ │ └── registry_test.go
│ ├── bootstrap/
│ │ ├── now.go
│ │ ├── redigo.go
│ │ └── redis.go
│ ├── redis_api.go
│ ├── redis_api2.go
│ ├── redis_api_pprof.go
│ ├── run
│ ├── run_benchmark
│ ├── test_curl
│ ├── test_pprof
│ └── test_torch
├── chapter9/
│ ├── .gitignore
│ ├── Dockerfile
│ ├── api/
│ │ ├── registry.go
│ │ └── registry_test.go
│ ├── bootstrap/
│ │ ├── now.go
│ │ ├── redigo.go
│ │ └── redis.go
│ ├── build_docker
│ ├── build_flags
│ ├── flags.go
│ ├── flags.sh
│ ├── redis_api.go
│ ├── test-flags
│ ├── test-flags.txt
│ ├── test-flags2
│ ├── test-flags2.txt
│ └── test-remote.txt
└── shell/
├── common.sh
└── go
================================================
FILE CONTENTS
================================================
================================================
FILE: 12fa-docker-golang/README.md
================================================
# The 12 Factors of Docker & Go
This is a general roadmap what to cover within the book. It lists external
projects and references for the type of software which can be used to
satisfy individual guidelines of the 12-Factor app. The criteria for
inclusion will be based on idiomatic guidelines and the traction which
individual projects managed to get.
Leanpub: [12 Factor Applications with Docker and Go](https://leanpub.com/12fa-docker-golang)
## I. Codebase - One codebase tracked in revision control, many deploys
The obvious choice in regards to codebase today is git. There are two
aspects which are interesting here. One is the software being used
on the server side, and options for self-hosting (GitLab, Gogs) and the
other is development methodologies for teams.
- [x] Self hosted git option: [Gogs](https://gogs.io/)
- [x] Workflows for development with git - [Feature branches](https://www.atlassian.com/git/tutorials/comparing-workflows)
## II. Dependencies - Explicitly declare and isolate dependencies
There are a few package managers which are available for Go. Depending on your needs,
any might be fine. My personal favorite is [gvt](https://github.com/FiloSottile/gvt) and
I've seen [godep](https://github.com/tools/godep) many times in the wild.
In addition to a quick how-to and why in regards to vendoring, there should be some
things explained here in terms of our own dependencies and how to structure the project
in such a way, that reuse from other projects is possible.
## III. Config - Store config in the environment
- [x] [spf13/viper](https://github.com/spf13/viper)
- [x] [namsral/flag](https://github.com/namsral/flag)
- [x] [joho/godotenv](https://github.com/joho/godotenv)
The project `spf13/viper` will be covered due to terrific adption by several large projects.
The other packages are listed as simpler options which may be considered for a
nano-services approach, where only few configuration/environment variables are needed.
## IV. Backing services - Treat backing services as attached resources
Demonstrate use of common backing services.
- [x] MySQL [jmoiron/sqlx](https://github.com/jmoiron/sqlx)
- [x] Redis [garyburd/redigo](https://github.com/garyburd/redigo)
- ~~Minio/S3 [minio/minio-go](https://github.com/minio/minio-go)~~
## V. Build, release, run - Strictly separate build and run stages
There are a few considerations to make when publishing 12 Factor apps. While applications
with multiple files may be the norm, there's existing software which is used for packaging
these apps, and more. I'd like to cover a few things:
### Build
Set up and use a CI system which fully supports Docker.
- [x] Codeship CI
- ~~GitLab CI?~~
- ~~[Buildkite](https://buildkite.com/)~~
### Release
This is very variable and subject to changes.
- [x] Setting up a docker registry [docker/registry](https://docs.docker.com/registry/),
- ~~Using the GitLab container registry,~~
- [x] Registry review: [Amazon ECR](https://aws.amazon.com/ecr/), Google GCR, Docker Hub, Quay.io
- [x] Building your own release system (Codeship, release to Docker Hub and Github)
### Run
Subject to change.
- [x] Docker to run go applications, scaling with docker swarm,
- [x] Migrating your container(s) to the cloud (Digital Ocean `doctl`, in intro)
- [ ] set up a scalable docker swarm with doctl?
## VI. Processes - Execute the app as one or more stateless processes
The principle says that the application itself shouldn't keep a local state - a local cache or
in-memory values. For persistent data storage a database or a caching server like redis or memcached
should be used as a backing service. The intent of this guideline is to improve reliability of
the service in face of random outages. If individual apps don't have their own caches or data,
it means that you can tolerate the outage with low impact.
This chapter is closely related to "IX. Disposability" in the sense that there's just one
logical conclusion towards testing it - reap some of the running application processes in
order to discover possible problems in terms of caches and data storage.
## VII. Port binding - Export services via port binding
Exposing ports via `net/http` and Docker `-p` option is the baseline for this chapter.
There are possible areas of extending the principles behind it:
1. Exposing a multi-host service with docker swarm (networking),
2. Private network topology with an exposed reverse-proxy setup,
3. Multi-host Docker private networking
## VIII. Concurrency - Scale out via the process model
While not applicable to Go programs directly, due to it's strong concurrency model and ability to
scale it's processing to multiple CPU cores, it is worth to look at this option as a way to provide
redundancy via the process model, and with this also a graceful upgrade path when deploying new
application versions. By using Docker we can also satisfy basic process management requirements
set forth in the 12FA guidelines - respond to crashed processes and handle user initiated restarts
and shutdowns.
## IX. Disposability - Maximize robustness with fast startup and graceful shutdown
Much like the principle set out in "VI. Processes", the 12FA guidelines push home the notion
that each application may fail at any given moment, and that it should be resilient to these failures.
Several approaches to automating failure and testing this should be noted - one of the
most known is [Netflix Chaos Monkey](https://blog.codinghorror.com/working-with-the-chaos-monkey/).
> One of the first systems our engineers built in AWS is called the Chaos Monkey. The Chaos Monkey’s job is to randomly kill instances and services within our architecture. If we aren’t constantly testing our ability to succeed despite failure, then it isn’t likely to work when it matters most – in the event of an unexpected outage.
In terms of recovery, docker swarm and docker infrakit might be good options to start with, to
demonstrate how it's possible to tolerate failure in a clustered environment. There are some
secondary goals within this chapter in terms of how a program behaves in terms of it's workload.
## X. Dev/prod parity - Keep development, staging, and production as similar as possible
Even if we're not using Docker to keep these environments as similar as possible, we have
to account for the nature of the 12FA guidelines - each application is a microservice, which
should only define it's dependencies explicitly (12FA, item II.).
While I realize that some dependencies (e.g. `rsync`) are provided completely outside the Go app,
it is possible to have "pre-flight" check within the application itself which would report
possible issues (much like automake `./configure` does).
## XI. Logs - Treat logs as event streams
Output logs appropriately to stdout/stderr and have external tooling to review this output
when applicable. There are tools that work within the Docker ecosystem like [Rancher](http://rancher.com/),
and there are external tools like [Logstash](https://www.elastic.co/products/logstash) which may
provide insight to your logs.
- [x] Use Papertrail from Docker (stdout),
- [x] Papertrail as a backing-service
## XII. Admin processes - Run admin/management tasks as one-off processes
================================================
FILE: 12fa-docker-golang/chapter1/apiservice/apiservice.go
================================================
package apiservice
import "fmt"
import "github.com/namsral/flag"
var (
networkPort = flag.String("port", "8080", "Network port to listen on")
)
func HelloWorld() {
flag.Parse();
fmt.Printf("Hello world! Network port: %s\n", *networkPort);
}
================================================
FILE: 12fa-docker-golang/chapter1/main.go
================================================
package main
import "app/apiservice"
func main() {
apiservice.HelloWorld()
}
================================================
FILE: 12fa-docker-golang/chapter1/run
================================================
#!/bin/bash
docker run --rm -it -v `pwd`:/go/src/app -w /go/src/app golang go run main.go
================================================
FILE: 12fa-docker-golang/chapter1/subpackage1.go
================================================
package subpackage1
import "fmt"
import "app/subpackage2"
func Hello() {
return subpackage2.Hello();
}
================================================
FILE: 12fa-docker-golang/chapter1/vendor/github.com/namsral/flag/LICENSE
================================================
Copyright (c) 2012 The Go Authors. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above
copyright notice, this list of conditions and the following disclaimer
in the documentation and/or other materials provided with the
distribution.
* Neither the name of Google Inc. nor the names of its
contributors may be used to endorse or promote products derived from
this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
================================================
FILE: 12fa-docker-golang/chapter1/vendor/github.com/namsral/flag/examples/gopher.go
================================================
package main
import (
"github.com/namsral/flag"
"fmt"
)
func main() {
var (
config string
length float64
age int
name string
female bool
)
flag.StringVar(&config, "config", "", "help message")
flag.StringVar(&name, "name", "", "help message")
flag.IntVar(&age, "age", 0, "help message")
flag.Float64Var(&length, "length", 0, "help message")
flag.BoolVar(&female, "female", false, "help message")
flag.Parse()
fmt.Println("length:", length)
fmt.Println("age:", age)
fmt.Println("name:", name)
fmt.Println("female:", female)
}
================================================
FILE: 12fa-docker-golang/chapter1/vendor/github.com/namsral/flag/flag.go
================================================
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
/*Package flag implements command-line flag parsing.
Usage:
Define flags using flag.String(), Bool(), Int(), etc.
This declares an integer flag, -flagname, stored in the pointer ip, with type *int.
import "flag"
var ip = flag.Int("flagname", 1234, "help message for flagname")
If you like, you can bind the flag to a variable using the Var() functions.
var flagvar int
func init() {
flag.IntVar(&flagvar, "flagname", 1234, "help message for flagname")
}
Or you can create custom flags that satisfy the Value interface (with
pointer receivers) and couple them to flag parsing by
flag.Var(&flagVal, "name", "help message for flagname")
For such flags, the default value is just the initial value of the variable.
After all flags are defined, call
flag.Parse()
to parse the command line into the defined flags.
Flags may then be used directly. If you're using the flags themselves,
they are all pointers; if you bind to variables, they're values.
fmt.Println("ip has value ", *ip)
fmt.Println("flagvar has value ", flagvar)
After parsing, the arguments after the flag are available as the
slice flag.Args() or individually as flag.Arg(i).
The arguments are indexed from 0 through flag.NArg()-1.
Command line flag syntax:
-flag
-flag=x
-flag x // non-boolean flags only
One or two minus signs may be used; they are equivalent.
The last form is not permitted for boolean flags because the
meaning of the command
cmd -x *
will change if there is a file called 0, false, etc. You must
use the -flag=false form to turn off a boolean flag.
Flag parsing stops just before the first non-flag argument
("-" is a non-flag argument) or after the terminator "--".
Integer flags accept 1234, 0664, 0x1234 and may be negative.
Boolean flags may be 1, 0, t, f, true, false, TRUE, FALSE, True, False.
Duration flags accept any input valid for time.ParseDuration.
The default set of command-line flags is controlled by
top-level functions. The FlagSet type allows one to define
independent sets of flags, such as to implement subcommands
in a command-line interface. The methods of FlagSet are
analogous to the top-level functions for the command-line
flag set.
*/
package flag
import (
"bufio"
"errors"
"fmt"
"io"
"os"
"sort"
"strconv"
"strings"
"time"
)
// EnvironmentPrefix defines a string that will be implicitely prefixed to a
// flag name before looking it up in the environment variables.
var EnvironmentPrefix = ""
// ErrHelp is the error returned if the flag -help is invoked but no such flag is defined.
var ErrHelp = errors.New("flag: help requested")
// -- bool Value
type boolValue bool
func newBoolValue(val bool, p *bool) *boolValue {
*p = val
return (*boolValue)(p)
}
func (b *boolValue) Set(s string) error {
v, err := strconv.ParseBool(s)
*b = boolValue(v)
return err
}
func (b *boolValue) Get() interface{} { return bool(*b) }
func (b *boolValue) String() string { return fmt.Sprintf("%v", *b) }
func (b *boolValue) IsBoolFlag() bool { return true }
// optional interface to indicate boolean flags that can be
// supplied without "=value" text
type boolFlag interface {
Value
IsBoolFlag() bool
}
// -- int Value
type intValue int
func newIntValue(val int, p *int) *intValue {
*p = val
return (*intValue)(p)
}
func (i *intValue) Set(s string) error {
v, err := strconv.ParseInt(s, 0, 64)
*i = intValue(v)
return err
}
func (i *intValue) Get() interface{} { return int(*i) }
func (i *intValue) String() string { return fmt.Sprintf("%v", *i) }
// -- int64 Value
type int64Value int64
func newInt64Value(val int64, p *int64) *int64Value {
*p = val
return (*int64Value)(p)
}
func (i *int64Value) Set(s string) error {
v, err := strconv.ParseInt(s, 0, 64)
*i = int64Value(v)
return err
}
func (i *int64Value) Get() interface{} { return int64(*i) }
func (i *int64Value) String() string { return fmt.Sprintf("%v", *i) }
// -- uint Value
type uintValue uint
func newUintValue(val uint, p *uint) *uintValue {
*p = val
return (*uintValue)(p)
}
func (i *uintValue) Set(s string) error {
v, err := strconv.ParseUint(s, 0, 64)
*i = uintValue(v)
return err
}
func (i *uintValue) Get() interface{} { return uint(*i) }
func (i *uintValue) String() string { return fmt.Sprintf("%v", *i) }
// -- uint64 Value
type uint64Value uint64
func newUint64Value(val uint64, p *uint64) *uint64Value {
*p = val
return (*uint64Value)(p)
}
func (i *uint64Value) Set(s string) error {
v, err := strconv.ParseUint(s, 0, 64)
*i = uint64Value(v)
return err
}
func (i *uint64Value) Get() interface{} { return uint64(*i) }
func (i *uint64Value) String() string { return fmt.Sprintf("%v", *i) }
// -- string Value
type stringValue string
func newStringValue(val string, p *string) *stringValue {
*p = val
return (*stringValue)(p)
}
func (s *stringValue) Set(val string) error {
*s = stringValue(val)
return nil
}
func (s *stringValue) Get() interface{} { return string(*s) }
func (s *stringValue) String() string { return fmt.Sprintf("%s", *s) }
// -- float64 Value
type float64Value float64
func newFloat64Value(val float64, p *float64) *float64Value {
*p = val
return (*float64Value)(p)
}
func (f *float64Value) Set(s string) error {
v, err := strconv.ParseFloat(s, 64)
*f = float64Value(v)
return err
}
func (f *float64Value) Get() interface{} { return float64(*f) }
func (f *float64Value) String() string { return fmt.Sprintf("%v", *f) }
// -- time.Duration Value
type durationValue time.Duration
func newDurationValue(val time.Duration, p *time.Duration) *durationValue {
*p = val
return (*durationValue)(p)
}
func (d *durationValue) Set(s string) error {
v, err := time.ParseDuration(s)
*d = durationValue(v)
return err
}
func (d *durationValue) Get() interface{} { return time.Duration(*d) }
func (d *durationValue) String() string { return (*time.Duration)(d).String() }
// Value is the interface to the dynamic value stored in a flag.
// (The default value is represented as a string.)
//
// If a Value has an IsBoolFlag() bool method returning true,
// the command-line parser makes -name equivalent to -name=true
// rather than using the next command-line argument.
type Value interface {
String() string
Set(string) error
}
// Getter is an interface that allows the contents of a Value to be retrieved.
// It wraps the Value interface, rather than being part of it, because it
// appeared after Go 1 and its compatibility rules. All Value types provided
// by this package satisfy the Getter interface.
type Getter interface {
Value
Get() interface{}
}
// ErrorHandling defines how to handle flag parsing errors.
type ErrorHandling int
const (
ContinueOnError ErrorHandling = iota
ExitOnError
PanicOnError
)
// A FlagSet represents a set of defined flags. The zero value of a FlagSet
// has no name and has ContinueOnError error handling.
type FlagSet struct {
// Usage is the function called when an error occurs while parsing flags.
// The field is a function (not a method) that may be changed to point to
// a custom error handler.
Usage func()
name string
parsed bool
actual map[string]*Flag
formal map[string]*Flag
envPrefix string // prefix to all env variable names
args []string // arguments after flags
exitOnError bool // does the program exit if there's an error?
errorHandling ErrorHandling
output io.Writer // nil means stderr; use out() accessor
}
// A Flag represents the state of a flag.
type Flag struct {
Name string // name as it appears on command line
Usage string // help message
Value Value // value as set
DefValue string // default value (as text); for usage message
}
// sortFlags returns the flags as a slice in lexicographical sorted order.
func sortFlags(flags map[string]*Flag) []*Flag {
list := make(sort.StringSlice, len(flags))
i := 0
for _, f := range flags {
list[i] = f.Name
i++
}
list.Sort()
result := make([]*Flag, len(list))
for i, name := range list {
result[i] = flags[name]
}
return result
}
func (f *FlagSet) out() io.Writer {
if f.output == nil {
return os.Stderr
}
return f.output
}
// SetOutput sets the destination for usage and error messages.
// If output is nil, os.Stderr is used.
func (f *FlagSet) SetOutput(output io.Writer) {
f.output = output
}
// VisitAll visits the flags in lexicographical order, calling fn for each.
// It visits all flags, even those not set.
func (f *FlagSet) VisitAll(fn func(*Flag)) {
for _, flag := range sortFlags(f.formal) {
fn(flag)
}
}
// VisitAll visits the command-line flags in lexicographical order, calling
// fn for each. It visits all flags, even those not set.
func VisitAll(fn func(*Flag)) {
CommandLine.VisitAll(fn)
}
// Visit visits the flags in lexicographical order, calling fn for each.
// It visits only those flags that have been set.
func (f *FlagSet) Visit(fn func(*Flag)) {
for _, flag := range sortFlags(f.actual) {
fn(flag)
}
}
// Visit visits the command-line flags in lexicographical order, calling fn
// for each. It visits only those flags that have been set.
func Visit(fn func(*Flag)) {
CommandLine.Visit(fn)
}
// Lookup returns the Flag structure of the named flag, returning nil if none exists.
func (f *FlagSet) Lookup(name string) *Flag {
return f.formal[name]
}
// Lookup returns the Flag structure of the named command-line flag,
// returning nil if none exists.
func Lookup(name string) *Flag {
return CommandLine.formal[name]
}
// Set sets the value of the named flag.
func (f *FlagSet) Set(name, value string) error {
flag, ok := f.formal[name]
if !ok {
return fmt.Errorf("no such flag -%v", name)
}
err := flag.Value.Set(value)
if err != nil {
return err
}
if f.actual == nil {
f.actual = make(map[string]*Flag)
}
f.actual[name] = flag
return nil
}
// Set sets the value of the named command-line flag.
func Set(name, value string) error {
return CommandLine.Set(name, value)
}
// PrintDefaults prints, to standard error unless configured
// otherwise, the default values of all defined flags in the set.
func (f *FlagSet) PrintDefaults() {
f.VisitAll(func(flag *Flag) {
format := " -%s=%s: %s\n"
if _, ok := flag.Value.(*stringValue); ok {
// put quotes on the value
format = " -%s=%q: %s\n"
}
fmt.Fprintf(f.out(), format, flag.Name, flag.DefValue, flag.Usage)
})
}
// PrintDefaults prints to standard error the default values of all defined command-line flags.
func PrintDefaults() {
CommandLine.PrintDefaults()
}
// defaultUsage is the default function to print a usage message.
func defaultUsage(f *FlagSet) {
if f.name == "" {
fmt.Fprintf(f.out(), "Usage:\n")
} else {
fmt.Fprintf(f.out(), "Usage of %s:\n", f.name)
}
f.PrintDefaults()
}
// NOTE: Usage is not just defaultUsage(CommandLine)
// because it serves (via godoc flag Usage) as the example
// for how to write your own usage function.
// Usage prints to standard error a usage message documenting all defined command-line flags.
// The function is a variable that may be changed to point to a custom function.
var Usage = func() {
fmt.Fprintf(os.Stderr, "Usage of %s:\n", os.Args[0])
PrintDefaults()
}
// NFlag returns the number of flags that have been set.
func (f *FlagSet) NFlag() int { return len(f.actual) }
// NFlag returns the number of command-line flags that have been set.
func NFlag() int { return len(CommandLine.actual) }
// Arg returns the i'th argument. Arg(0) is the first remaining argument
// after flags have been processed.
func (f *FlagSet) Arg(i int) string {
if i < 0 || i >= len(f.args) {
return ""
}
return f.args[i]
}
// Arg returns the i'th command-line argument. Arg(0) is the first remaining argument
// after flags have been processed.
func Arg(i int) string {
return CommandLine.Arg(i)
}
// NArg is the number of arguments remaining after flags have been processed.
func (f *FlagSet) NArg() int { return len(f.args) }
// NArg is the number of arguments remaining after flags have been processed.
func NArg() int { return len(CommandLine.args) }
// Args returns the non-flag arguments.
func (f *FlagSet) Args() []string { return f.args }
// Args returns the non-flag command-line arguments.
func Args() []string { return CommandLine.args }
// BoolVar defines a bool flag with specified name, default value, and usage string.
// The argument p points to a bool variable in which to store the value of the flag.
func (f *FlagSet) BoolVar(p *bool, name string, value bool, usage string) {
f.Var(newBoolValue(value, p), name, usage)
}
// BoolVar defines a bool flag with specified name, default value, and usage string.
// The argument p points to a bool variable in which to store the value of the flag.
func BoolVar(p *bool, name string, value bool, usage string) {
CommandLine.Var(newBoolValue(value, p), name, usage)
}
// Bool defines a bool flag with specified name, default value, and usage string.
// The return value is the address of a bool variable that stores the value of the flag.
func (f *FlagSet) Bool(name string, value bool, usage string) *bool {
p := new(bool)
f.BoolVar(p, name, value, usage)
return p
}
// Bool defines a bool flag with specified name, default value, and usage string.
// The return value is the address of a bool variable that stores the value of the flag.
func Bool(name string, value bool, usage string) *bool {
return CommandLine.Bool(name, value, usage)
}
// IntVar defines an int flag with specified name, default value, and usage string.
// The argument p points to an int variable in which to store the value of the flag.
func (f *FlagSet) IntVar(p *int, name string, value int, usage string) {
f.Var(newIntValue(value, p), name, usage)
}
// IntVar defines an int flag with specified name, default value, and usage string.
// The argument p points to an int variable in which to store the value of the flag.
func IntVar(p *int, name string, value int, usage string) {
CommandLine.Var(newIntValue(value, p), name, usage)
}
// Int defines an int flag with specified name, default value, and usage string.
// The return value is the address of an int variable that stores the value of the flag.
func (f *FlagSet) Int(name string, value int, usage string) *int {
p := new(int)
f.IntVar(p, name, value, usage)
return p
}
// Int defines an int flag with specified name, default value, and usage string.
// The return value is the address of an int variable that stores the value of the flag.
func Int(name string, value int, usage string) *int {
return CommandLine.Int(name, value, usage)
}
// Int64Var defines an int64 flag with specified name, default value, and usage string.
// The argument p points to an int64 variable in which to store the value of the flag.
func (f *FlagSet) Int64Var(p *int64, name string, value int64, usage string) {
f.Var(newInt64Value(value, p), name, usage)
}
// Int64Var defines an int64 flag with specified name, default value, and usage string.
// The argument p points to an int64 variable in which to store the value of the flag.
func Int64Var(p *int64, name string, value int64, usage string) {
CommandLine.Var(newInt64Value(value, p), name, usage)
}
// Int64 defines an int64 flag with specified name, default value, and usage string.
// The return value is the address of an int64 variable that stores the value of the flag.
func (f *FlagSet) Int64(name string, value int64, usage string) *int64 {
p := new(int64)
f.Int64Var(p, name, value, usage)
return p
}
// Int64 defines an int64 flag with specified name, default value, and usage string.
// The return value is the address of an int64 variable that stores the value of the flag.
func Int64(name string, value int64, usage string) *int64 {
return CommandLine.Int64(name, value, usage)
}
// UintVar defines a uint flag with specified name, default value, and usage string.
// The argument p points to a uint variable in which to store the value of the flag.
func (f *FlagSet) UintVar(p *uint, name string, value uint, usage string) {
f.Var(newUintValue(value, p), name, usage)
}
// UintVar defines a uint flag with specified name, default value, and usage string.
// The argument p points to a uint variable in which to store the value of the flag.
func UintVar(p *uint, name string, value uint, usage string) {
CommandLine.Var(newUintValue(value, p), name, usage)
}
// Uint defines a uint flag with specified name, default value, and usage string.
// The return value is the address of a uint variable that stores the value of the flag.
func (f *FlagSet) Uint(name string, value uint, usage string) *uint {
p := new(uint)
f.UintVar(p, name, value, usage)
return p
}
// Uint defines a uint flag with specified name, default value, and usage string.
// The return value is the address of a uint variable that stores the value of the flag.
func Uint(name string, value uint, usage string) *uint {
return CommandLine.Uint(name, value, usage)
}
// Uint64Var defines a uint64 flag with specified name, default value, and usage string.
// The argument p points to a uint64 variable in which to store the value of the flag.
func (f *FlagSet) Uint64Var(p *uint64, name string, value uint64, usage string) {
f.Var(newUint64Value(value, p), name, usage)
}
// Uint64Var defines a uint64 flag with specified name, default value, and usage string.
// The argument p points to a uint64 variable in which to store the value of the flag.
func Uint64Var(p *uint64, name string, value uint64, usage string) {
CommandLine.Var(newUint64Value(value, p), name, usage)
}
// Uint64 defines a uint64 flag with specified name, default value, and usage string.
// The return value is the address of a uint64 variable that stores the value of the flag.
func (f *FlagSet) Uint64(name string, value uint64, usage string) *uint64 {
p := new(uint64)
f.Uint64Var(p, name, value, usage)
return p
}
// Uint64 defines a uint64 flag with specified name, default value, and usage string.
// The return value is the address of a uint64 variable that stores the value of the flag.
func Uint64(name string, value uint64, usage string) *uint64 {
return CommandLine.Uint64(name, value, usage)
}
// StringVar defines a string flag with specified name, default value, and usage string.
// The argument p points to a string variable in which to store the value of the flag.
func (f *FlagSet) StringVar(p *string, name string, value string, usage string) {
f.Var(newStringValue(value, p), name, usage)
}
// StringVar defines a string flag with specified name, default value, and usage string.
// The argument p points to a string variable in which to store the value of the flag.
func StringVar(p *string, name string, value string, usage string) {
CommandLine.Var(newStringValue(value, p), name, usage)
}
// String defines a string flag with specified name, default value, and usage string.
// The return value is the address of a string variable that stores the value of the flag.
func (f *FlagSet) String(name string, value string, usage string) *string {
p := new(string)
f.StringVar(p, name, value, usage)
return p
}
// String defines a string flag with specified name, default value, and usage string.
// The return value is the address of a string variable that stores the value of the flag.
func String(name string, value string, usage string) *string {
return CommandLine.String(name, value, usage)
}
// Float64Var defines a float64 flag with specified name, default value, and usage string.
// The argument p points to a float64 variable in which to store the value of the flag.
func (f *FlagSet) Float64Var(p *float64, name string, value float64, usage string) {
f.Var(newFloat64Value(value, p), name, usage)
}
// Float64Var defines a float64 flag with specified name, default value, and usage string.
// The argument p points to a float64 variable in which to store the value of the flag.
func Float64Var(p *float64, name string, value float64, usage string) {
CommandLine.Var(newFloat64Value(value, p), name, usage)
}
// Float64 defines a float64 flag with specified name, default value, and usage string.
// The return value is the address of a float64 variable that stores the value of the flag.
func (f *FlagSet) Float64(name string, value float64, usage string) *float64 {
p := new(float64)
f.Float64Var(p, name, value, usage)
return p
}
// Float64 defines a float64 flag with specified name, default value, and usage string.
// The return value is the address of a float64 variable that stores the value of the flag.
func Float64(name string, value float64, usage string) *float64 {
return CommandLine.Float64(name, value, usage)
}
// DurationVar defines a time.Duration flag with specified name, default value, and usage string.
// The argument p points to a time.Duration variable in which to store the value of the flag.
func (f *FlagSet) DurationVar(p *time.Duration, name string, value time.Duration, usage string) {
f.Var(newDurationValue(value, p), name, usage)
}
// DurationVar defines a time.Duration flag with specified name, default value, and usage string.
// The argument p points to a time.Duration variable in which to store the value of the flag.
func DurationVar(p *time.Duration, name string, value time.Duration, usage string) {
CommandLine.Var(newDurationValue(value, p), name, usage)
}
// Duration defines a time.Duration flag with specified name, default value, and usage string.
// The return value is the address of a time.Duration variable that stores the value of the flag.
func (f *FlagSet) Duration(name string, value time.Duration, usage string) *time.Duration {
p := new(time.Duration)
f.DurationVar(p, name, value, usage)
return p
}
// Duration defines a time.Duration flag with specified name, default value, and usage string.
// The return value is the address of a time.Duration variable that stores the value of the flag.
func Duration(name string, value time.Duration, usage string) *time.Duration {
return CommandLine.Duration(name, value, usage)
}
// Var defines a flag with the specified name and usage string. The type and
// value of the flag are represented by the first argument, of type Value, which
// typically holds a user-defined implementation of Value. For instance, the
// caller could create a flag that turns a comma-separated string into a slice
// of strings by giving the slice the methods of Value; in particular, Set would
// decompose the comma-separated string into the slice.
func (f *FlagSet) Var(value Value, name string, usage string) {
// Remember the default value as a string; it won't change.
flag := &Flag{name, usage, value, value.String()}
_, alreadythere := f.formal[name]
if alreadythere {
var msg string
if f.name == "" {
msg = fmt.Sprintf("flag redefined: %s", name)
} else {
msg = fmt.Sprintf("%s flag redefined: %s", f.name, name)
}
fmt.Fprintln(f.out(), msg)
panic(msg) // Happens only if flags are declared with identical names
}
if f.formal == nil {
f.formal = make(map[string]*Flag)
}
f.formal[name] = flag
}
// Var defines a flag with the specified name and usage string. The type and
// value of the flag are represented by the first argument, of type Value, which
// typically holds a user-defined implementation of Value. For instance, the
// caller could create a flag that turns a comma-separated string into a slice
// of strings by giving the slice the methods of Value; in particular, Set would
// decompose the comma-separated string into the slice.
func Var(value Value, name string, usage string) {
CommandLine.Var(value, name, usage)
}
// failf prints to standard error a formatted error and usage message and
// returns the error.
func (f *FlagSet) failf(format string, a ...interface{}) error {
err := fmt.Errorf(format, a...)
fmt.Fprintln(f.out(), err)
f.usage()
return err
}
// usage calls the Usage method for the flag set, or the usage function if
// the flag set is CommandLine.
func (f *FlagSet) usage() {
if f == CommandLine {
Usage()
} else if f.Usage == nil {
defaultUsage(f)
} else {
f.Usage()
}
}
// parseOne parses one flag. It reports whether a flag was seen.
func (f *FlagSet) parseOne() (bool, error) {
if len(f.args) == 0 {
return false, nil
}
s := f.args[0]
if len(s) == 0 || s[0] != '-' || len(s) == 1 {
return false, nil
}
numMinuses := 1
if s[1] == '-' {
numMinuses++
if len(s) == 2 { // "--" terminates the flags
f.args = f.args[1:]
return false, nil
}
}
name := s[numMinuses:]
if len(name) == 0 || name[0] == '-' || name[0] == '=' {
return false, f.failf("bad flag syntax: %s", s)
}
// it's a flag. does it have an argument?
f.args = f.args[1:]
hasValue := false
value := ""
for i := 1; i < len(name); i++ { // equals cannot be first
if name[i] == '=' {
value = name[i+1:]
hasValue = true
name = name[0:i]
break
}
}
m := f.formal
flag, alreadythere := m[name] // BUG
if !alreadythere {
if name == "help" || name == "h" { // special case for nice help message.
f.usage()
return false, ErrHelp
}
return false, f.failf("flag provided but not defined: -%s", name)
}
if fv, ok := flag.Value.(boolFlag); ok && fv.IsBoolFlag() { // special case: doesn't need an arg
if hasValue {
if err := fv.Set(value); err != nil {
return false, f.failf("invalid boolean value %q for -%s: %v", value, name, err)
}
} else {
fv.Set("true")
}
} else {
// It must have a value, which might be the next argument.
if !hasValue && len(f.args) > 0 {
// value is the next arg
hasValue = true
value, f.args = f.args[0], f.args[1:]
}
if !hasValue {
return false, f.failf("flag needs an argument: -%s", name)
}
if err := flag.Value.Set(value); err != nil {
return false, f.failf("invalid value %q for flag -%s: %v", value, name, err)
}
}
if f.actual == nil {
f.actual = make(map[string]*Flag)
}
f.actual[name] = flag
return true, nil
}
// Parse parses flag definitions from the argument list, which should not
// include the command name. Must be called after all flags in the FlagSet
// are defined and before flags are accessed by the program.
// The return value will be ErrHelp if -help was set but not defined.
func (f *FlagSet) Parse(arguments []string) error {
f.parsed = true
f.args = arguments
for {
seen, err := f.parseOne()
if seen {
continue
}
if err == nil {
break
}
switch f.errorHandling {
case ContinueOnError:
return err
case ExitOnError:
os.Exit(2)
case PanicOnError:
panic(err)
}
}
// Parse environment variables
f.ParseEnv(os.Environ())
// Parse configuration from file
configFlag := f.actual["config"]
if configFlag != nil {
f.ParseFile(configFlag.Value.String())
}
return nil
}
// ParseEnv parses flags from environment variables.
// Flags already set will be ignored.
func (f *FlagSet) ParseEnv(environ []string) error {
m := f.formal
env := make(map[string]string)
for _, s := range environ {
i := strings.Index(s, "=")
if i < 1 {
continue
}
env[s[0:i]] = s[i+1 : len(s)]
}
for _, flag := range m {
name := flag.Name
_, set := f.actual[name]
if set {
continue
}
flag, alreadythere := m[name]
if !alreadythere {
if name == "help" || name == "h" { // special case for nice help message.
f.usage()
return ErrHelp
}
return f.failf("environment variable provided but not defined: %s", name)
}
envKey := strings.ToUpper(flag.Name)
if f.envPrefix != "" {
envKey = f.envPrefix + "_" + envKey
}
envKey = strings.Replace(envKey, "-", "_", -1)
value, isSet := env[envKey]
if !isSet {
continue
}
hasValue := false
if len(value) > 0 {
hasValue = true
}
if fv, ok := flag.Value.(boolFlag); ok && fv.IsBoolFlag() { // special case: doesn't need an arg
if hasValue {
if err := fv.Set(value); err != nil {
return f.failf("invalid boolean value %q for environment variable %s: %v", value, name, err)
}
} else {
// flag without value is regarded a bool
fv.Set("true")
}
} else {
if !hasValue {
return f.failf("environment variable needs an value: %s", name)
}
if err := flag.Value.Set(value); err != nil {
return f.failf("invalid value %q for environment variable %s: %v", value, name, err)
}
}
// update f.actual
if f.actual == nil {
f.actual = make(map[string]*Flag)
}
f.actual[name] = flag
}
return nil
}
// ParseFile parses flags from the file in path.
// Same format as commandline argumens, newlines and lines beginning with a
// "#" charater are ignored. Flags already set will be ignored.
func (f *FlagSet) ParseFile(path string) error {
// Extract arguments from file
fp, err := os.Open(path)
if err != nil {
return err
}
defer fp.Close()
scanner := bufio.NewScanner(fp)
for scanner.Scan() {
line := scanner.Text()
// Ignore empty lines
if len(line) == 0 {
continue
}
// Ignore comments
if line[:1] == "#" {
continue
}
// Match `key=value` and `key value`
var name, value string
hasValue := false
for i, v := range line {
if v == '=' || v == ' ' {
hasValue = true
name, value = line[:i], line[i+1:]
break
}
}
if hasValue == false {
name = line
}
// Ignore flag when already set; arguments have precedence over file
if f.actual[name] != nil {
continue
}
m := f.formal
flag, alreadythere := m[name]
if !alreadythere {
if name == "help" || name == "h" { // special case for nice help message.
f.usage()
return ErrHelp
}
return f.failf("configuration variable provided but not defined: %s", name)
}
if fv, ok := flag.Value.(boolFlag); ok && fv.IsBoolFlag() { // special case: doesn't need an arg
if hasValue {
if err := fv.Set(value); err != nil {
return f.failf("invalid boolean value %q for configuration variable %s: %v", value, name, err)
}
} else {
// flag without value is regarded a bool
fv.Set("true")
}
} else {
if !hasValue {
return f.failf("configuration variable needs an argument: %s", name)
}
if err := flag.Value.Set(value); err != nil {
return f.failf("invalid value %q for configuration variable %s: %v", value, name, err)
}
}
// update f.actual
if f.actual == nil {
f.actual = make(map[string]*Flag)
}
f.actual[name] = flag
}
if err := scanner.Err(); err != nil {
return err
}
return nil
}
// Parsed reports whether f.Parse has been called.
func (f *FlagSet) Parsed() bool {
return f.parsed
}
// Parse parses the command-line flags from os.Args[1:]. Must be called
// after all flags are defined and before flags are accessed by the program.
func Parse() {
// Ignore errors; CommandLine is set for ExitOnError.
CommandLine.Parse(os.Args[1:])
}
// Parsed returns true if the command-line flags have been parsed.
func Parsed() bool {
return CommandLine.Parsed()
}
// CommandLine is the default set of command-line flags, parsed from os.Args.
// The top-level functions such as BoolVar, Arg, and on are wrappers for the
// methods of CommandLine.
var CommandLine = NewFlagSet(os.Args[0], ExitOnError)
// NewFlagSet returns a new, empty flag set with the specified name and
// error handling property.
func NewFlagSet(name string, errorHandling ErrorHandling) *FlagSet {
f := &FlagSet{
name: name,
errorHandling: errorHandling,
}
return f
}
// NewFlagSetWithEnvPrefix returns a new empty flag set with the specified name,
// environment variable prefix, and error handling property.
func NewFlagSetWithEnvPrefix(name string, prefix string, errorHandling ErrorHandling) *FlagSet {
f := NewFlagSet(name, errorHandling)
f.envPrefix = prefix
return f
}
// Init sets the name, environment name prefix, and error handling property
// for a flag set.
// By default, the zero FlagSet uses an empty name, EnvironmentPrefix, and the
// ContinueOnError error handling policy.
func (f *FlagSet) Init(name string, errorHandling ErrorHandling) {
f.name = name
f.envPrefix = EnvironmentPrefix
f.errorHandling = errorHandling
}
================================================
FILE: 12fa-docker-golang/chapter1/vendor/manifest
================================================
{
"version": 0,
"dependencies": [
{
"importpath": "github.com/namsral/flag",
"repository": "https://github.com/namsral/flag",
"vcs": "git",
"revision": "881a43080604bcf99ab1118a814d1cb2c268fc36",
"branch": "master",
"notests": true
}
]
}
================================================
FILE: 12fa-docker-golang/chapter11/main.go
================================================
package main
import (
"errors"
"os"
"time"
"github.com/apex/log"
"github.com/apex/log/handlers/multi"
"github.com/apex/log/handlers/papertrail"
"github.com/apex/log/handlers/text"
)
func main() {
handlerText := text.New(os.Stdout)
handlerPapertrail := papertrail.New(&papertrail.Config{
Host: "logs5",
Port: 41062,
Hostname: "app",
Tag: "production",
})
handler := multi.New(handlerPapertrail, handlerText)
log.SetHandler(handler)
ctx := log.WithFields(log.Fields{
"file": "something.png",
"type": "image/png",
"user": "tobi",
})
for range time.Tick(time.Second * 2) {
ctx.Info("upload")
ctx.Info("upload complete")
ctx.Warn("upload retry")
ctx.WithError(errors.New("unauthorized")).Error("upload failed")
ctx.Errorf("failed to upload %s", "img.png")
}
}
================================================
FILE: 12fa-docker-golang/chapter11/run
================================================
#!/bin/bash
function gvt_fetch {
if [ ! -d "vendor/$1" ]; then
gvt fetch $1
fi
}
gvt_fetch "github.com/apex/log"
gvt_fetch "github.com/apex/log/handlers/text"
gvt_fetch "github.com/apex/log/handlers/papertrail"
gvt_fetch "github.com/apex/log/handlers/multi"
go run main.go
================================================
FILE: 12fa-docker-golang/chapter11/vendor/github.com/apex/log/LICENSE
================================================
(The MIT License)
Copyright (c) 2015 TJ Holowaychuk <tj@tjholowaychuk.coma>
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
'Software'), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:
The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
================================================
FILE: 12fa-docker-golang/chapter11/vendor/github.com/apex/log/default.go
================================================
package log
import (
"bytes"
"fmt"
"log"
"sort"
)
// field used for sorting.
type field struct {
Name string
Value interface{}
}
// by sorts fields by name.
type byName []field
func (a byName) Len() int { return len(a) }
func (a byName) Swap(i, j int) { a[i], a[j] = a[j], a[i] }
func (a byName) Less(i, j int) bool { return a[i].Name < a[j].Name }
// handleStdLog outpouts to the stlib log.
func handleStdLog(e *Entry) error {
level := levelNames[e.Level]
var fields []field
for k, v := range e.Fields {
fields = append(fields, field{k, v})
}
sort.Sort(byName(fields))
var b bytes.Buffer
fmt.Fprintf(&b, "%5s %-25s", level, e.Message)
for _, f := range fields {
fmt.Fprintf(&b, " %s=%v", f.Name, f.Value)
}
log.Println(b.String())
return nil
}
================================================
FILE: 12fa-docker-golang/chapter11/vendor/github.com/apex/log/doc.go
================================================
/*
Package log implements a simple structured logging API designed with few assumptions. Designed for
centralized logging solutions such as Kinesis which require encoding and decoding before fanning-out
to handlers.
You may use this package with inline handlers, much like Logrus, however a centralized solution
is recommended so that apps do not need to be re-deployed to add or remove logging service
providers.
*/
package log
================================================
FILE: 12fa-docker-golang/chapter11/vendor/github.com/apex/log/entry.go
================================================
package log
import (
"fmt"
"os"
"strings"
"time"
)
// assert interface compliance.
var _ Interface = (*Entry)(nil)
// Now returns the current time.
var Now = time.Now
// Entry represents a single log entry.
type Entry struct {
Logger *Logger `json:"-"`
Fields Fields `json:"fields"`
Level Level `json:"level"`
Timestamp time.Time `json:"timestamp"`
Message string `json:"message"`
start time.Time
fields []Fields
}
// NewEntry returns a new entry for `log`.
func NewEntry(log *Logger) *Entry {
return &Entry{
Logger: log,
}
}
// WithFields returns a new entry with `fields` set.
func (e *Entry) WithFields(fields Fielder) *Entry {
f := []Fields{}
f = append(f, e.fields...)
f = append(f, fields.Fields())
return &Entry{
Logger: e.Logger,
fields: f,
}
}
// WithField returns a new entry with the `key` and `value` set.
func (e *Entry) WithField(key string, value interface{}) *Entry {
return e.WithFields(Fields{key: value})
}
// WithError returns a new entry with the "error" set to `err`.
//
// The given error may implement .Fielder, if it does the method
// will add all its `.Fields()` into the returned entry.
func (e *Entry) WithError(err error) *Entry {
ctx := e.WithField("error", err.Error())
if s, ok := err.(stackTracer); ok {
frame := s.StackTrace()[0]
name := fmt.Sprintf("%n", frame)
file := fmt.Sprintf("%+s", frame)
line := fmt.Sprintf("%d", frame)
parts := strings.Split(file, "\n\t")
if len(parts) > 1 {
file = parts[1]
}
ctx = ctx.WithField("source", fmt.Sprintf("%s: %s:%s", name, file, line))
}
if f, ok := err.(Fielder); ok {
ctx = ctx.WithFields(f.Fields())
}
return ctx
}
// Debug level message.
func (e *Entry) Debug(msg string) {
e.Logger.log(DebugLevel, e, msg)
}
// Info level message.
func (e *Entry) Info(msg string) {
e.Logger.log(InfoLevel, e, msg)
}
// Warn level message.
func (e *Entry) Warn(msg string) {
e.Logger.log(WarnLevel, e, msg)
}
// Error level message.
func (e *Entry) Error(msg string) {
e.Logger.log(ErrorLevel, e, msg)
}
// Fatal level message, followed by an exit.
func (e *Entry) Fatal(msg string) {
e.Logger.log(FatalLevel, e, msg)
os.Exit(1)
}
// Debugf level formatted message.
func (e *Entry) Debugf(msg string, v ...interface{}) {
e.Debug(fmt.Sprintf(msg, v...))
}
// Infof level formatted message.
func (e *Entry) Infof(msg string, v ...interface{}) {
e.Info(fmt.Sprintf(msg, v...))
}
// Warnf level formatted message.
func (e *Entry) Warnf(msg string, v ...interface{}) {
e.Warn(fmt.Sprintf(msg, v...))
}
// Errorf level formatted message.
func (e *Entry) Errorf(msg string, v ...interface{}) {
e.Error(fmt.Sprintf(msg, v...))
}
// Fatalf level formatted message, followed by an exit.
func (e *Entry) Fatalf(msg string, v ...interface{}) {
e.Fatal(fmt.Sprintf(msg, v...))
}
// Trace returns a new entry with a Stop method to fire off
// a corresponding completion log, useful with defer.
func (e *Entry) Trace(msg string) *Entry {
e.Info(msg)
v := e.WithFields(e.Fields)
v.Message = msg
v.start = time.Now()
return v
}
// Stop should be used with Trace, to fire off the completion message. When
// an `err` is passed the "error" field is set, and the log level is error.
func (e *Entry) Stop(err *error) {
if err == nil || *err == nil {
e.WithField("duration", time.Since(e.start)).Info(e.Message)
} else {
e.WithField("duration", time.Since(e.start)).WithError(*err).Error(e.Message)
}
}
// mergedFields returns the fields list collapsed into a single map.
func (e *Entry) mergedFields() Fields {
f := Fields{}
for _, fields := range e.fields {
for k, v := range fields {
f[k] = v
}
}
return f
}
// finalize returns a copy of the Entry with Fields merged.
func (e *Entry) finalize(level Level, msg string) *Entry {
return &Entry{
Logger: e.Logger,
Fields: e.mergedFields(),
Level: level,
Message: msg,
Timestamp: Now(),
}
}
================================================
FILE: 12fa-docker-golang/chapter11/vendor/github.com/apex/log/handlers/cli/cli.go
================================================
// Package cli implements a colored text handler suitable for command-line interfaces.
package cli
import (
"fmt"
"io"
"os"
"sync"
"time"
"github.com/apex/log"
)
// Default handler outputting to stderr.
var Default = New(os.Stderr)
// start time.
var start = time.Now()
// colors.
const (
none = 0
red = 31
green = 32
yellow = 33
blue = 34
gray = 37
)
// Colors mapping.
var Colors = [...]int{
log.DebugLevel: gray,
log.InfoLevel: blue,
log.WarnLevel: yellow,
log.ErrorLevel: red,
log.FatalLevel: red,
}
// Strings mapping.
var Strings = [...]string{
log.DebugLevel: "•",
log.InfoLevel: "•",
log.WarnLevel: "•",
log.ErrorLevel: "⨯",
log.FatalLevel: "⨯",
}
// Handler implementation.
type Handler struct {
mu sync.Mutex
Writer io.Writer
Padding int
}
// New handler.
func New(w io.Writer) *Handler {
return &Handler{
Writer: w,
Padding: 3,
}
}
// HandleLog implements log.Handler.
func (h *Handler) HandleLog(e *log.Entry) error {
color := Colors[e.Level]
level := Strings[e.Level]
names := e.Fields.Names()
h.mu.Lock()
defer h.mu.Unlock()
fmt.Fprintf(h.Writer, "\033[%dm%*s\033[0m %-25s", color, h.Padding+1, level, e.Message)
for _, name := range names {
if name == "source" {
continue
}
fmt.Fprintf(h.Writer, " \033[%dm%s\033[0m=%v", color, name, e.Fields.Get(name))
}
fmt.Fprintln(h.Writer)
return nil
}
================================================
FILE: 12fa-docker-golang/chapter11/vendor/github.com/apex/log/handlers/discard/discard.go
================================================
// Package discard implements a no-op handler useful for benchmarks and tests.
package discard
import (
"github.com/apex/log"
)
// Default handler.
var Default = New()
// Handler implementation.
type Handler struct{}
// New handler.
func New() *Handler {
return &Handler{}
}
// HandleLog implements log.Handler.
func (h *Handler) HandleLog(e *log.Entry) error {
return nil
}
================================================
FILE: 12fa-docker-golang/chapter11/vendor/github.com/apex/log/handlers/es/es.go
================================================
// Package es implements an Elasticsearch batch handler. Currently this implementation
// assumes the index format of "logs-YY-MM-DD".
package es
import (
"io"
stdlog "log"
"sync"
"time"
"github.com/tj/go-elastic/batch"
"github.com/apex/log"
)
// TODO(tj): allow dumping logs to stderr on timeout
// TODO(tj): allow custom format that does not include .fields etc
// TODO(tj): allow interval flushes
// TODO(tj): allow explicit Flush() (for Lambda where you have to flush at the end of function)
// Elasticsearch interface.
type Elasticsearch interface {
Bulk(io.Reader) error
}
// Config for handler.
type Config struct {
BufferSize int // BufferSize is the number of logs to buffer before flush (default: 100)
Format string // Format for index
Client Elasticsearch // Client for ES
}
// defaults applies defaults to the config.
func (c *Config) defaults() {
if c.BufferSize == 0 {
c.BufferSize = 100
}
if c.Format == "" {
c.Format = "logs-06-01-02"
}
}
// Handler implementation.
type Handler struct {
*Config
mu sync.Mutex
batch *batch.Batch
}
// New handler with BufferSize
func New(config *Config) *Handler {
config.defaults()
return &Handler{
Config: config,
}
}
// HandleLog implements log.Handler.
func (h *Handler) HandleLog(e *log.Entry) error {
h.mu.Lock()
defer h.mu.Unlock()
if h.batch == nil {
h.batch = &batch.Batch{
Index: time.Now().Format(h.Config.Format),
Elastic: h.Client,
Type: "log",
}
}
h.batch.Add(e)
if h.batch.Size() >= h.BufferSize {
go h.flush(h.batch)
h.batch = nil
}
return nil
}
// flush the given `batch` asynchronously.
func (h *Handler) flush(batch *batch.Batch) {
size := batch.Size()
start := time.Now()
stdlog.Printf("log/elastic: flushing %d logs", size)
if err := batch.Flush(); err != nil {
stdlog.Printf("log/elastic: failed to flush %d logs: %s", size, err)
}
stdlog.Printf("log/elastic: flushed %d logs in %s", size, time.Since(start))
}
================================================
FILE: 12fa-docker-golang/chapter11/vendor/github.com/apex/log/handlers/graylog/graylog.go
================================================
// Package implements a Graylog-backed handler.
package graylog
import (
"github.com/apex/log"
"github.com/aphistic/golf"
)
// Handler implementation.
type Handler struct {
logger *golf.Logger
client *golf.Client
}
// New handler.
// Connection string should be in format "udp://<ip_address>:<port>".
// Server should have GELF input enabled on that port.
func New(url string) (*Handler, error) {
c, err := golf.NewClient()
if err != nil {
return nil, err
}
err = c.Dial(url)
if err != nil {
return nil, err
}
l, err := c.NewLogger()
if err != nil {
return nil, err
}
return &Handler{
logger: l,
client: c,
}, nil
}
// HandleLog implements log.Handler.
func (h *Handler) HandleLog(e *log.Entry) error {
switch e.Level {
case log.DebugLevel:
return h.logger.Dbgm(e.Fields, e.Message)
case log.InfoLevel:
return h.logger.Infom(e.Fields, e.Message)
case log.WarnLevel:
return h.logger.Warnm(e.Fields, e.Message)
case log.ErrorLevel:
return h.logger.Errm(e.Fields, e.Message)
case log.FatalLevel:
return h.logger.Critm(e.Fields, e.Message)
}
return nil
}
// Closes connection to server, flushing message queue.
func (h *Handler) Close() error {
return h.client.Close()
}
================================================
FILE: 12fa-docker-golang/chapter11/vendor/github.com/apex/log/handlers/json/json.go
================================================
// Package json implements a JSON handler.
package json
import (
j "encoding/json"
"io"
"os"
"sync"
"github.com/apex/log"
)
// Default handler outputting to stderr.
var Default = New(os.Stderr)
// Handler implementation.
type Handler struct {
mu sync.Mutex
enc *j.Encoder
}
// New handler.
func New(w io.Writer) *Handler {
return &Handler{
enc: j.NewEncoder(w),
}
}
// HandleLog implements log.Handler.
func (h *Handler) HandleLog(e *log.Entry) error {
h.mu.Lock()
defer h.mu.Unlock()
return h.enc.Encode(e)
}
================================================
FILE: 12fa-docker-golang/chapter11/vendor/github.com/apex/log/handlers/kinesis/kinesis.go
================================================
package kinesis
import (
"encoding/base64"
"encoding/json"
"github.com/apex/log"
"github.com/aws/aws-sdk-go/aws"
"github.com/aws/aws-sdk-go/aws/session"
"github.com/aws/aws-sdk-go/service/kinesis"
"github.com/rogpeppe/fastuuid"
k "github.com/tj/go-kinesis"
)
// Handler implementation.
type Handler struct {
appName string
producer *k.Producer
gen *fastuuid.Generator
}
// New handler sending logs to Kinesis. To configure producer options or pass your
// own AWS Kinesis client use NewConfig instead.
func New(stream string) *Handler {
return NewConfig(k.Config{
StreamName: stream,
Client: kinesis.New(session.New(aws.NewConfig())),
})
}
// NewConfig handler sending logs to Kinesis. The `config` given is passed to the batch
// Kinesis producer, and a random value is used as the partition key for even distribution.
func NewConfig(config k.Config) *Handler {
producer := k.New(config)
producer.Start()
return &Handler{
producer: producer,
gen: fastuuid.MustNewGenerator(),
}
}
// HandleLog implements log.Handler.
func (h *Handler) HandleLog(e *log.Entry) error {
b, err := json.Marshal(e)
if err != nil {
return err
}
uuid := h.gen.Next()
key := base64.StdEncoding.EncodeToString(uuid[:])
return h.producer.Put(b, key)
}
================================================
FILE: 12fa-docker-golang/chapter11/vendor/github.com/apex/log/handlers/level/level.go
================================================
// Package level implements a level filter handler.
package level
import "github.com/apex/log"
// Handler implementation.
type Handler struct {
Level log.Level
Handler log.Handler
}
// New handler.
func New(h log.Handler, level log.Level) *Handler {
return &Handler{
Level: level,
Handler: h,
}
}
// HandleLog implements log.Handler.
func (h *Handler) HandleLog(e *log.Entry) error {
if e.Level < h.Level {
return nil
}
return h.Handler.HandleLog(e)
}
================================================
FILE: 12fa-docker-golang/chapter11/vendor/github.com/apex/log/handlers/logfmt/logfmt.go
================================================
// Package logfmt implements a "logfmt" format handler.
package logfmt
import (
"io"
"os"
"sync"
"github.com/apex/log"
"github.com/go-logfmt/logfmt"
)
// Default handler outputting to stderr.
var Default = New(os.Stderr)
// Handler implementation.
type Handler struct {
mu sync.Mutex
enc *logfmt.Encoder
}
// New handler.
func New(w io.Writer) *Handler {
return &Handler{
enc: logfmt.NewEncoder(w),
}
}
// HandleLog implements log.Handler.
func (h *Handler) HandleLog(e *log.Entry) error {
names := e.Fields.Names()
h.mu.Lock()
defer h.mu.Unlock()
h.enc.EncodeKeyval("timestamp", e.Timestamp)
h.enc.EncodeKeyval("level", e.Level.String())
h.enc.EncodeKeyval("message", e.Message)
for _, name := range names {
h.enc.EncodeKeyval(name, e.Fields.Get(name))
}
h.enc.EndRecord()
return nil
}
================================================
FILE: 12fa-docker-golang/chapter11/vendor/github.com/apex/log/handlers/memory/memory.go
================================================
// Package memory implements an in-memory handler useful for testing, as the
// entries can be accessed after writes.
package memory
import (
"sync"
"github.com/apex/log"
)
// Handler implementation.
type Handler struct {
mu sync.Mutex
Entries []*log.Entry
}
// New handler.
func New() *Handler {
return &Handler{}
}
// HandleLog implements log.Handler.
func (h *Handler) HandleLog(e *log.Entry) error {
h.mu.Lock()
defer h.mu.Unlock()
h.Entries = append(h.Entries, e)
return nil
}
================================================
FILE: 12fa-docker-golang/chapter11/vendor/github.com/apex/log/handlers/multi/multi.go
================================================
// Package multi implements a handler which invokes a number of handlers.
package multi
import (
"github.com/apex/log"
)
// Handler implementation.
type Handler struct {
Handlers []log.Handler
}
// New handler.
func New(h ...log.Handler) *Handler {
return &Handler{
Handlers: h,
}
}
// HandleLog implements log.Handler.
func (h *Handler) HandleLog(e *log.Entry) error {
for _, handler := range h.Handlers {
// TODO(tj): maybe just write to stderr here, definitely not ideal
// to miss out logging to a more critical handler if something
// goes wrong
if err := handler.HandleLog(e); err != nil {
return err
}
}
return nil
}
================================================
FILE: 12fa-docker-golang/chapter11/vendor/github.com/apex/log/handlers/papertrail/papertrail.go
================================================
// Package papertrail implements a papertrail logfmt format handler.
package papertrail
import (
"bytes"
"fmt"
"log/syslog"
"net"
"os"
"sync"
"time"
"github.com/apex/log"
"github.com/go-logfmt/logfmt"
)
// TODO: syslog portion is ad-hoc for my serverless use-case,
// I don't really need hostnames etc, but this should be improved
// Config for Papertrail.
type Config struct {
// Papertrail settings.
Host string // Host subdomain such as "logs4"
Port int // Port number
// Application settings
Hostname string // Hostname value
Tag string // Tag value
}
// Handler implementation.
type Handler struct {
*Config
mu sync.Mutex
conn net.Conn
}
// New handler.
func New(config *Config) *Handler {
conn, err := net.Dial("udp", fmt.Sprintf("%s.papertrailapp.com:%d", config.Host, config.Port))
if err != nil {
panic(err)
}
return &Handler{
Config: config,
conn: conn,
}
}
// HandleLog implements log.Handler.
func (h *Handler) HandleLog(e *log.Entry) error {
ts := time.Now().Format(time.Stamp)
var buf bytes.Buffer
enc := logfmt.NewEncoder(&buf)
enc.EncodeKeyval("level", e.Level.String())
enc.EncodeKeyval("message", e.Message)
for k, v := range e.Fields {
enc.EncodeKeyval(k, v)
}
enc.EndRecord()
msg := []byte(fmt.Sprintf("<%d>%s %s %s[%d]: %s\n", syslog.LOG_KERN, ts, h.Hostname, h.Tag, os.Getpid(), buf.String()))
h.mu.Lock()
_, err := h.conn.Write(msg)
h.mu.Unlock()
return err
}
================================================
FILE: 12fa-docker-golang/chapter11/vendor/github.com/apex/log/handlers/text/text.go
================================================
// Package text implements a development-friendly textual handler.
package text
import (
"fmt"
"io"
"os"
"sync"
"time"
"github.com/apex/log"
)
// Default handler outputting to stderr.
var Default = New(os.Stderr)
// start time.
var start = time.Now()
// colors.
const (
none = 0
red = 31
green = 32
yellow = 33
blue = 34
gray = 37
)
// Colors mapping.
var Colors = [...]int{
log.DebugLevel: gray,
log.InfoLevel: blue,
log.WarnLevel: yellow,
log.ErrorLevel: red,
log.FatalLevel: red,
}
// Strings mapping.
var Strings = [...]string{
log.DebugLevel: "DEBUG",
log.InfoLevel: "INFO",
log.WarnLevel: "WARN",
log.ErrorLevel: "ERROR",
log.FatalLevel: "FATAL",
}
// Handler implementation.
type Handler struct {
mu sync.Mutex
Writer io.Writer
}
// New handler.
func New(w io.Writer) *Handler {
return &Handler{
Writer: w,
}
}
// HandleLog implements log.Handler.
func (h *Handler) HandleLog(e *log.Entry) error {
color := Colors[e.Level]
level := Strings[e.Level]
names := e.Fields.Names()
h.mu.Lock()
defer h.mu.Unlock()
ts := time.Since(start) / time.Second
fmt.Fprintf(h.Writer, "\033[%dm%6s\033[0m[%04d] %-25s", color, level, ts, e.Message)
for _, name := range names {
fmt.Fprintf(h.Writer, " \033[%dm%s\033[0m=%v", color, name, e.Fields.Get(name))
}
fmt.Fprintln(h.Writer)
return nil
}
================================================
FILE: 12fa-docker-golang/chapter11/vendor/github.com/apex/log/interface.go
================================================
package log
// Interface represents the API of both Logger and Entry.
type Interface interface {
WithFields(fields Fielder) *Entry
WithField(key string, value interface{}) *Entry
WithError(err error) *Entry
Debug(msg string)
Info(msg string)
Warn(msg string)
Error(msg string)
Fatal(msg string)
Debugf(msg string, v ...interface{})
Infof(msg string, v ...interface{})
Warnf(msg string, v ...interface{})
Errorf(msg string, v ...interface{})
Fatalf(msg string, v ...interface{})
Trace(msg string) *Entry
}
================================================
FILE: 12fa-docker-golang/chapter11/vendor/github.com/apex/log/levels.go
================================================
package log
import (
"errors"
"strings"
)
// Level of severity.
type Level int
// Log levels.
const (
DebugLevel Level = iota
InfoLevel
WarnLevel
ErrorLevel
FatalLevel
)
var levelNames = [...]string{
DebugLevel: "debug",
InfoLevel: "info",
WarnLevel: "warn",
ErrorLevel: "error",
FatalLevel: "fatal",
}
// String implements io.Stringer.
func (l Level) String() string {
return levelNames[l]
}
// MarshalJSON returns the level string.
func (l Level) MarshalJSON() ([]byte, error) {
return []byte(`"` + l.String() + `"`), nil
}
// ParseLevel parses level string.
func ParseLevel(s string) (Level, error) {
switch strings.ToLower(s) {
case "debug":
return DebugLevel, nil
case "info":
return InfoLevel, nil
case "warn", "warning":
return WarnLevel, nil
case "error":
return ErrorLevel, nil
case "fatal":
return FatalLevel, nil
default:
return -1, errors.New("invalid level")
}
}
// MustParseLevel parses level string or panics.
func MustParseLevel(s string) Level {
l, err := ParseLevel(s)
if err != nil {
panic("invalid log level")
}
return l
}
================================================
FILE: 12fa-docker-golang/chapter11/vendor/github.com/apex/log/logger.go
================================================
package log
import (
stdlog "log"
"sort"
)
// assert interface compliance.
var _ Interface = (*Logger)(nil)
// Fielder is an interface for providing fields to custom types.
type Fielder interface {
Fields() Fields
}
// Fields represents a map of entry level data used for structured logging.
type Fields map[string]interface{}
// Fields implements Fielder.
func (f Fields) Fields() Fields {
return f
}
// Get field value by name.
func (f Fields) Get(name string) interface{} {
return f[name]
}
// Names returns field names sorted.
func (f Fields) Names() (v []string) {
for k := range f {
v = append(v, k)
}
sort.Strings(v)
return
}
// The HandlerFunc type is an adapter to allow the use of ordinary functions as
// log handlers. If f is a function with the appropriate signature,
// HandlerFunc(f) is a Handler object that calls f.
type HandlerFunc func(*Entry) error
// HandleLog calls f(e).
func (f HandlerFunc) HandleLog(e *Entry) error {
return f(e)
}
// Handler is used to handle log events, outputting them to
// stdio or sending them to remote services. See the "handlers"
// directory for implementations.
//
// It is left up to Handlers to implement thread-safety.
type Handler interface {
HandleLog(*Entry) error
}
// Logger represents a logger with configurable Level and Handler.
type Logger struct {
Handler Handler
Level Level
}
// WithFields returns a new entry with `fields` set.
func (l *Logger) WithFields(fields Fielder) *Entry {
return NewEntry(l).WithFields(fields.Fields())
}
// WithField returns a new entry with the `key` and `value` set.
//
// Note that the `key` should not have spaces in it - use camel
// case or underscores
func (l *Logger) WithField(key string, value interface{}) *Entry {
return NewEntry(l).WithField(key, value)
}
// WithError returns a new entry with the "error" set to `err`.
func (l *Logger) WithError(err error) *Entry {
return NewEntry(l).WithError(err)
}
// Debug level message.
func (l *Logger) Debug(msg string) {
NewEntry(l).Debug(msg)
}
// Info level message.
func (l *Logger) Info(msg string) {
NewEntry(l).Info(msg)
}
// Warn level message.
func (l *Logger) Warn(msg string) {
NewEntry(l).Warn(msg)
}
// Error level message.
func (l *Logger) Error(msg string) {
NewEntry(l).Error(msg)
}
// Fatal level message, followed by an exit.
func (l *Logger) Fatal(msg string) {
NewEntry(l).Fatal(msg)
}
// Debugf level formatted message.
func (l *Logger) Debugf(msg string, v ...interface{}) {
NewEntry(l).Debugf(msg, v...)
}
// Infof level formatted message.
func (l *Logger) Infof(msg string, v ...interface{}) {
NewEntry(l).Infof(msg, v...)
}
// Warnf level formatted message.
func (l *Logger) Warnf(msg string, v ...interface{}) {
NewEntry(l).Warnf(msg, v...)
}
// Errorf level formatted message.
func (l *Logger) Errorf(msg string, v ...interface{}) {
NewEntry(l).Errorf(msg, v...)
}
// Fatalf level formatted message, followed by an exit.
func (l *Logger) Fatalf(msg string, v ...interface{}) {
NewEntry(l).Fatalf(msg, v...)
}
// Trace returns a new entry with a Stop method to fire off
// a corresponding completion log, useful with defer.
func (l *Logger) Trace(msg string) *Entry {
return NewEntry(l).Trace(msg)
}
// log the message, invoking the handler. We clone the entry here
// to bypass the overhead in Entry methods when the level is not
// met.
func (l *Logger) log(level Level, e *Entry, msg string) {
if level < l.Level {
return
}
if err := l.Handler.HandleLog(e.finalize(level, msg)); err != nil {
stdlog.Printf("error logging: %s", err)
}
}
================================================
FILE: 12fa-docker-golang/chapter11/vendor/github.com/apex/log/pkg.go
================================================
package log
// singletons ftw?
var Log Interface = &Logger{
Handler: HandlerFunc(handleStdLog),
Level: InfoLevel,
}
// SetHandler sets the handler. This is not thread-safe.
// The default handler outputs to the stdlib log.
func SetHandler(h Handler) {
if logger, ok := Log.(*Logger); ok {
logger.Handler = h
}
}
// SetLevel sets the log level. This is not thread-safe.
func SetLevel(l Level) {
if logger, ok := Log.(*Logger); ok {
logger.Level = l
}
}
// WithFields returns a new entry with `fields` set.
func WithFields(fields Fielder) *Entry {
return Log.WithFields(fields)
}
// WithField returns a new entry with the `key` and `value` set.
func WithField(key string, value interface{}) *Entry {
return Log.WithField(key, value)
}
// WithError returns a new entry with the "error" set to `err`.
func WithError(err error) *Entry {
return Log.WithError(err)
}
// Debug level message.
func Debug(msg string) {
Log.Debug(msg)
}
// Info level message.
func Info(msg string) {
Log.Info(msg)
}
// Warn level message.
func Warn(msg string) {
Log.Warn(msg)
}
// Error level message.
func Error(msg string) {
Log.Error(msg)
}
// Fatal level message, followed by an exit.
func Fatal(msg string) {
Log.Fatal(msg)
}
// Debugf level formatted message.
func Debugf(msg string, v ...interface{}) {
Log.Debugf(msg, v...)
}
// Infof level formatted message.
func Infof(msg string, v ...interface{}) {
Log.Infof(msg, v...)
}
// Warnf level formatted message.
func Warnf(msg string, v ...interface{}) {
Log.Warnf(msg, v...)
}
// Errorf level formatted message.
func Errorf(msg string, v ...interface{}) {
Log.Errorf(msg, v...)
}
// Fatalf level formatted message, followed by an exit.
func Fatalf(msg string, v ...interface{}) {
Log.Fatalf(msg, v...)
}
// Trace returns a new entry with a Stop method to fire off
// a corresponding completion log, useful with defer.
func Trace(msg string) *Entry {
return Log.Trace(msg)
}
================================================
FILE: 12fa-docker-golang/chapter11/vendor/github.com/apex/log/stack.go
================================================
package log
import "github.com/pkg/errors"
// stackTracer interface.
type stackTracer interface {
StackTrace() errors.StackTrace
}
================================================
FILE: 12fa-docker-golang/chapter11/vendor/github.com/aphistic/golf/LICENSE
================================================
The MIT License (MIT)
Copyright (c) 2015 Erik Davidson
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
================================================
FILE: 12fa-docker-golang/chapter11/vendor/github.com/aphistic/golf/chunker.go
================================================
package golf
import (
"errors"
"github.com/satori/go.uuid"
"io"
"math"
)
type chunker struct {
chunkSize int
buff []byte
w io.Writer
}
func newChunker(w io.Writer, chunkSize int) (*chunker, error) {
if chunkSize < 13 {
return nil, errors.New("Chunk size must be at least 13.")
}
c := &chunker{
chunkSize: chunkSize,
buff: make([]byte, 0),
w: w,
}
return c, nil
}
func (c *chunker) reset() {
c.buff = make([]byte, 0)
}
func (c *chunker) Write(p []byte) (int, error) {
c.buff = append(c.buff, p...)
return len(p), nil
}
func (c *chunker) Flush() error {
idFull := uuid.NewV4()
err := c.flushWithId(idFull.Bytes()[0:8])
return err
}
func (c *chunker) flushWithId(id []byte) error {
if len(id) < 8 || len(id) > 8 {
return errors.New("id length must be equal to 8")
}
offset := 0
buffLen := len(c.buff)
chunkSize := c.chunkSize - 12
// Reusing this buffer may cause problems with duplicate data being sent
// if the data isn't written to something else by the io.Writer before
// the chunk's data is updated.
chunkBuff := make([]byte, c.chunkSize)
copy(chunkBuff[0:2], []byte{0x1e, 0x0f})
copy(chunkBuff[2:10], id)
totalChunks := int(math.Ceil(float64(buffLen) / float64(chunkSize)))
chunkBuff[11] = byte(totalChunks)
for {
left := buffLen - offset
if left > chunkSize {
copy(chunkBuff[12:], c.buff[offset:offset+chunkSize])
c.w.Write(chunkBuff)
} else {
copy(chunkBuff[12:], c.buff[offset:offset+left])
c.w.Write(chunkBuff[0 : left+12])
break
}
offset += chunkSize
chunkBuff[10] += 1
}
c.reset()
return nil
}
================================================
FILE: 12fa-docker-golang/chapter11/vendor/github.com/aphistic/golf/client.go
================================================
package golf
import (
"compress/gzip"
"compress/zlib"
"errors"
"io"
"net"
"net/url"
"os"
"strings"
"sync"
"time"
)
// Compression type to use for GELF messages that are sent
const (
COMP_NONE = iota // No compression
COMP_GZIP // gzip compression
COMP_ZLIB // zlib compression
)
type Client struct {
hostname string
conn net.Conn
queue []*Message
queueMutex sync.Mutex
msgChan chan *Message
queueCtl chan int
sendCtl chan int
config ClientConfig
}
// Configuration used when creating a server instance
type ClientConfig struct {
ChunkSize int // The data size for each chunk sent to the server
Compression int // Compression to use for messagec.
}
/*
Create a new Client instance with the default values for ClientConfig:
{
ChunkSize: 1420,
Compression: COMP_GZIP,
}
*/
func NewClient() (*Client, error) {
cc := ClientConfig{
ChunkSize: 1420,
Compression: COMP_GZIP,
}
return NewClientWithConfig(cc)
}
// Create a new Client instance with the given ClientConfig
func NewClientWithConfig(config ClientConfig) (*Client, error) {
c := &Client{
config: config,
queue: make([]*Message, 0),
msgChan: make(chan *Message, 500),
queueCtl: make(chan int),
sendCtl: make(chan int),
}
host, err := os.Hostname()
if err != nil {
return nil, err
}
c.hostname = host
return c, nil
}
// Connect to a GELF server at the given URI.
func (c *Client) Dial(uri string) error {
parsedUri, err := url.Parse(uri)
if err != nil {
return err
}
if !strings.Contains(parsedUri.Host, ":") {
parsedUri.Host = parsedUri.Host + ":12201"
}
switch parsedUri.Scheme {
case "udp":
case "tcp":
default:
return errors.New("Unsupported scheme provided")
}
conn, err := net.Dial(parsedUri.Scheme, parsedUri.Host)
if err != nil {
return err
}
c.conn = conn
go c.queueReceiver()
go c.msgSender()
return nil
}
// Close the connection to the server. This call will block until all the
// currently queued messages for the client are sent.
func (c *Client) Close() error {
if c.conn == nil {
// Already shut down so it doesn't need to run again
return nil
}
// First quit the queue and wait for it to respond
// that it's quit
c.queueCtl <- 1
for {
quitVal := <-c.queueCtl
if quitVal == 2 {
break
}
c.queueCtl <- quitVal
}
// Then quit the sender and wait for it to respond
// that it's quit
c.sendCtl <- 1
for {
quitVal := <-c.sendCtl
if quitVal == 2 {
break
}
c.sendCtl <- quitVal
}
err := c.conn.Close()
if err != nil {
return err
}
c.conn = nil
return nil
}
// Queue the given message at the end of the message queue
func (c *Client) QueueMsg(msg *Message) error {
if msg.Timestamp == nil {
curTime := time.Now()
msg.Timestamp = &curTime
}
c.msgChan <- msg
return nil
}
func (c *Client) queueReceiver() {
for {
select {
case msg := <-c.msgChan:
c.queueMutex.Lock()
c.queue = append(c.queue, msg)
c.queueMutex.Unlock()
case quitVal := <-c.queueCtl:
if quitVal == 1 {
// Don't quit if there are still
// messages in the channel
if len(c.msgChan) > 0 {
c.queueCtl <- 1
continue
}
c.queueCtl <- 2
return
}
}
}
}
func (c *Client) msgSender() {
var msg *Message
for {
if len(c.queue) > 0 {
c.queueMutex.Lock()
msg, c.queue = c.queue[0], c.queue[1:]
c.queueMutex.Unlock()
data, err := generateMsgJson(msg)
if err != nil {
// TODO Not sure what to do at this point? Fail the
// message silently?
// Might be able to add an error channel that the
// user can watch for errors
continue
}
err = c.writeMsg(data, c.conn, COMP_GZIP)
if err != nil {
// TODO Same as above...
}
} else {
time.Sleep(1 * time.Second)
select {
case quitVal := <-c.sendCtl:
if quitVal == 1 {
if len(c.queue) > 0 {
c.sendCtl <- 1
continue
}
c.sendCtl <- 2
return
}
default:
}
}
}
}
func (c *Client) writeMsg(data string, w io.Writer, compression int) error {
chnk, err := newChunker(w, c.config.ChunkSize)
if err != nil {
return err
}
defer chnk.Flush()
switch compression {
case COMP_GZIP:
gz, err := gzip.NewWriterLevel(chnk, gzip.DefaultCompression)
if err != nil {
return err
}
gz.Write([]byte(data))
gz.Close()
case COMP_ZLIB:
zz, err := zlib.NewWriterLevel(chnk, zlib.DefaultCompression)
if err != nil {
return err
}
zz.Write([]byte(data))
zz.Close()
default:
chnk.Write([]byte(data))
}
return nil
}
================================================
FILE: 12fa-docker-golang/chapter11/vendor/github.com/aphistic/golf/json.go
================================================
package golf
import (
"encoding/json"
"fmt"
)
// Workaround for json encoding 64 bit floats. When using
// a normal float it's marshalled in scientific notation instead
// of decimal notation
type jsonFloat struct {
val float64
}
func newJsonFloat(val float64) *jsonFloat {
return &jsonFloat{val: val}
}
func (jf *jsonFloat) MarshalJSON() ([]byte, error) {
return []byte(fmt.Sprintf("%0f", jf.val)), nil
}
func generateMsgJson(msg *Message) (string, error) {
obj := make(map[string]interface{}, 0)
obj["version"] = msg.version
obj["host"] = msg.Hostname
obj["level"] = msg.Level
obj["short_message"] = msg.ShortMessage
if len(msg.FullMessage) > 0 {
obj["full_message"] = msg.FullMessage
}
ts := float64(msg.Timestamp.UnixNano()) * float64(0.000000001)
obj["timestamp"] = newJsonFloat(ts)
// First add all the logger level attrs if it exists
if msg.logger != nil {
for attrName, attrVal := range msg.logger.attrs {
obj[fmt.Sprintf("_%v", attrName)] = attrVal
}
}
// Next add all the message level attrs. Those override
// logger level attrs
for attrName, attrVal := range msg.Attrs {
obj[fmt.Sprintf("_%v", attrName)] = attrVal
}
data, err := json.Marshal(obj)
if err != nil {
return "", err
}
return string(data), nil
}
================================================
FILE: 12fa-docker-golang/chapter11/vendor/github.com/aphistic/golf/log.go
================================================
package golf
import (
"fmt"
)
func (l *Logger) genMsg(attrs map[string]interface{}, level int, msg string, va ...interface{}) *Message {
newMsg := l.NewMessage()
newMsg.Level = level
if len(va) > 0 {
newMsg.ShortMessage = fmt.Sprintf(msg, va...)
} else {
newMsg.ShortMessage = msg
}
newMsg.Attrs = attrs
return newMsg
}
func (l *Logger) logMsg(attrs map[string]interface{}, level int, msg string, va ...interface{}) error {
newMsg := l.genMsg(attrs, level, msg, va...)
return l.client.QueueMsg(newMsg)
}
// Dbg logs message 'msg' at LEVEL_DBG level
func (l *Logger) Dbg(msg string) error {
return l.logMsg(nil, LEVEL_DBG, msg)
}
// Log a message at LEVEL_DBG with 'format' populated with values from 'va'
func (l *Logger) Dbgf(format string, va ...interface{}) error {
return l.logMsg(nil, LEVEL_DBG, format, va...)
}
// Log a message at LEVEL_DBG with 'format' populated with values from 'va'. The
// attributes from 'attrs' will be included with the message, overriding any that may
// be set at the Logger level
func (l *Logger) Dbgm(attrs map[string]interface{}, format string, va ...interface{}) error {
return l.logMsg(attrs, LEVEL_DBG, format, va...)
}
// Log a message 'msg' at LEVEL_INFO level
func (l *Logger) Info(msg string) error {
return l.logMsg(nil, LEVEL_INFO, msg)
}
// Log a message at LEVEL_INFO with 'format' populated with values from 'va'
func (l *Logger) Infof(format string, va ...interface{}) error {
return l.logMsg(nil, LEVEL_INFO, format, va...)
}
// Log a message at LEVEL_INFO with 'format' populated with values from 'va'. The
// attributes from 'attrs' will be included with the message, overriding any that may
// be set at the Logger level
func (l *Logger) Infom(attrs map[string]interface{}, format string, va ...interface{}) error {
return l.logMsg(attrs, LEVEL_INFO, format, va...)
}
// Log a message 'msg' at LEVEL_NOTICE level
func (l *Logger) Notice(msg string) error {
return l.logMsg(nil, LEVEL_NOTICE, msg)
}
// Log a message at LEVEL_NOTICE with 'format' populated with values from 'va'
func (l *Logger) Noticef(format string, va ...interface{}) error {
return l.logMsg(nil, LEVEL_NOTICE, format, va...)
}
// Log a message at LEVEL_NOTICE with 'format' populated with values from 'va'. The
// attributes from 'attrs' will be included with the message, overriding any that may
// be set at the Logger level
func (l *Logger) Noticem(attrs map[string]interface{}, format string, va ...interface{}) error {
return l.logMsg(attrs, LEVEL_NOTICE, format, va...)
}
// Log a message 'msg' at LEVEL_WARN level
func (l *Logger) Warn(msg string) error {
return l.logMsg(nil, LEVEL_WARN, msg)
}
// Log a message at LEVEL_WARN with 'format' populated with values from 'va'
func (l *Logger) Warnf(format string, va ...interface{}) error {
return l.logMsg(nil, LEVEL_WARN, format, va...)
}
// Log a message at LEVEL_WARN with 'format' populated with values from 'va'. The
// attributes from 'attrs' will be included with the message, overriding any that may
// be set at the Logger level
func (l *Logger) Warnm(attrs map[string]interface{}, format string, va ...interface{}) error {
return l.logMsg(attrs, LEVEL_WARN, format, va...)
}
// Log a message 'msg' at LEVEL_ERR level
func (l *Logger) Err(msg string) error {
return l.logMsg(nil, LEVEL_ERR, msg)
}
// Log a message at LEVEL_ERR with 'format' populated with values from 'va'
func (l *Logger) Errf(format string, va ...interface{}) error {
return l.logMsg(nil, LEVEL_ERR, format, va...)
}
// Log a message at LEVEL_ERR with 'format' populated with values from 'va'. The
// attributes from 'attrs' will be included with the message, overriding any that may
// be set at the Logger level
func (l *Logger) Errm(attrs map[string]interface{}, format string, va ...interface{}) error {
return l.logMsg(attrs, LEVEL_ERR, format, va...)
}
// Log a message 'msg' at LEVEL_CRIT level
func (l *Logger) Crit(msg string) error {
return l.logMsg(nil, LEVEL_CRIT, msg)
}
// Log a message at LEVEL_CRIT with 'format' populated with values from 'va'
func (l *Logger) Critf(format string, va ...interface{}) error {
return l.logMsg(nil, LEVEL_CRIT, format, va...)
}
// Log a message at LEVEL_CRIT with 'format' populated with values from 'va'. The
// attributes from 'attrs' will be included with the message, overriding any that may
// be set at the Logger level
func (l *Logger) Critm(attrs map[string]interface{}, format string, va ...interface{}) error {
return l.logMsg(attrs, LEVEL_CRIT, format, va...)
}
// Log a message 'msg' at LEVEL_ALERT level
func (l *Logger) Alert(msg string) error {
return l.logMsg(nil, LEVEL_ALERT, msg)
}
// Log a message at LEVEL_ALERT with 'format' populated with values from 'va'
func (l *Logger) Alertf(format string, va ...interface{}) error {
return l.logMsg(nil, LEVEL_ALERT, format, va...)
}
// Log a message at LEVEL_ALERT with 'format' populated with values from 'va'. The
// attributes from 'attrs' will be included with the message, overriding any that may
// be set at the Logger level
func (l *Logger) Alertm(attrs map[string]interface{}, format string, va ...interface{}) error {
return l.logMsg(attrs, LEVEL_ALERT, format, va...)
}
// Log a message 'msg' at LEVEL_EMERG level
func (l *Logger) Emerg(msg string) error {
return l.logMsg(nil, LEVEL_EMERG, msg)
}
// Log a message at LEVEL_EMERG with 'format' populated with values from 'va'
func (l *Logger) Emergf(format string, va ...interface{}) error {
return l.logMsg(nil, LEVEL_EMERG, format, va...)
}
// Log a message at LEVEL_EMERG with 'format' populated with values from 'va'. The
// attributes from 'attrs' will be included with the message, overriding any that may
// be set at the Logger level
func (l *Logger) Emergm(attrs map[string]interface{}, format string, va ...interface{}) error {
return l.logMsg(attrs, LEVEL_EMERG, format, va...)
}
================================================
FILE: 12fa-docker-golang/chapter11/vendor/github.com/aphistic/golf/log_default.go
================================================
package golf
import (
"errors"
"fmt"
)
var defaultLogger *Logger
// Set the default Logger. Any calls to log messages not associated with a
// specific Logger (such as calling l.Dbg()) will use the default logger.
func DefaultLogger(l *Logger) {
defaultLogger = l
}
func genDefaultMsg(attrs map[string]interface{}, level int, msg string, va ...interface{}) *Message {
newMsg := defaultLogger.NewMessage()
newMsg.Level = level
if len(va) > 0 {
newMsg.ShortMessage = fmt.Sprintf(msg, va...)
} else {
newMsg.ShortMessage = msg
}
newMsg.Attrs = attrs
return newMsg
}
func logDefaultMsg(attrs map[string]interface{}, level int, msg string, va ...interface{}) error {
if defaultLogger == nil {
return errors.New("A default logger is not set.")
}
newMsg := genDefaultMsg(attrs, level, msg, va...)
return defaultLogger.client.QueueMsg(newMsg)
}
// Log a message 'msg' at LEVEL_DBG level on the default logger
func Dbg(msg string) error {
return logDefaultMsg(nil, LEVEL_DBG, msg)
}
// Log a message at LEVEL_DBG with 'format' populated with values from 'va' on the default logger
func Dbgf(format string, va ...interface{}) error {
return logDefaultMsg(nil, LEVEL_DBG, format, va...)
}
// Log a message at LEVEL_DBG with 'format' populated with values from 'va' on the default logger.
// The attributes from 'attrs' will be included with the message, overriding any that may
// be set at the Logger level
func Dbgm(attrs map[string]interface{}, format string, va ...interface{}) error {
return logDefaultMsg(attrs, LEVEL_DBG, format, va...)
}
// Log a message 'msg' at LEVEL_INFO level on the default logger
func Info(msg string) error {
return logDefaultMsg(nil, LEVEL_INFO, msg)
}
// Log a message at LEVEL_INFO with 'format' populated with values from 'va' on the default logger
func Infof(format string, va ...interface{}) error {
return logDefaultMsg(nil, LEVEL_INFO, format, va...)
}
// Log a message at LEVEL_INFO with 'format' populated with values from 'va' on the default logger.
// The attributes from 'attrs' will be included with the message, overriding any that may
// be set at the Logger level
func Infom(attrs map[string]interface{}, format string, va ...interface{}) error {
return logDefaultMsg(attrs, LEVEL_INFO, format, va...)
}
// Log a message 'msg' at LEVEL_NOTICE level on the default logger
func Notice(msg string) error {
return logDefaultMsg(nil, LEVEL_NOTICE, msg)
}
// Log a message at LEVEL_NOTICE with 'format' populated with values from 'va' on the default logger
func Noticef(format string, va ...interface{}) error {
return logDefaultMsg(nil, LEVEL_NOTICE, format, va...)
}
// Log a message at LEVEL_NOTICE with 'format' populated with values from 'va' on the default logger.
// The attributes from 'attrs' will be included with the message, overriding any that may
// be set at the Logger level
func Noticem(attrs map[string]interface{}, format string, va ...interface{}) error {
return logDefaultMsg(attrs, LEVEL_NOTICE, format, va...)
}
// Log a message 'msg' at LEVEL_WARN level on the default logger
func Warn(msg string) error {
return logDefaultMsg(nil, LEVEL_WARN, msg)
}
// Log a message at LEVEL_WARN with 'format' populated with values from 'va' on the default logger
func Warnf(format string, va ...interface{}) error {
return logDefaultMsg(nil, LEVEL_WARN, format, va...)
}
// Log a message at LEVEL_WARN with 'format' populated with values from 'va' on the default logger.
// The attributes from 'attrs' will be included with the message, overriding any that may
// be set at the Logger level
func Warnm(attrs map[string]interface{}, format string, va ...interface{}) error {
return logDefaultMsg(attrs, LEVEL_WARN, format, va...)
}
// Log a message 'msg' at LEVEL_ERR level on the default logger on the default logger
func Err(msg string) error {
return logDefaultMsg(nil, LEVEL_ERR, msg)
}
// Log a message at LEVEL_ERR with 'format' populated with values from 'va' on the default logger
func Errf(format string, va ...interface{}) error {
return logDefaultMsg(nil, LEVEL_ERR, format, va...)
}
// Log a message at LEVEL_ERR with 'format' populated with values from 'va' on the default logger.
// The attributes from 'attrs' will be included with the message, overriding any that may
// be set at the Logger level
func Errm(attrs map[string]interface{}, format string, va ...interface{}) error {
return logDefaultMsg(attrs, LEVEL_ERR, format, va...)
}
// Log a message 'msg' at LEVEL_CRIT level on the default logger
func Crit(msg string) error {
return logDefaultMsg(nil, LEVEL_CRIT, msg)
}
// Log a message at LEVEL_CRIT with 'format' populated with values from 'va' on the default logger
func Critf(format string, va ...interface{}) error {
return logDefaultMsg(nil, LEVEL_CRIT, format, va...)
}
// Log a message at LEVEL_CRIT with 'format' populated with values from 'va' on the default logger.
// The attributes from 'attrs' will be included with the message, overriding any that may
// be set at the Logger level
func Critm(attrs map[string]interface{}, format string, va ...interface{}) error {
return logDefaultMsg(attrs, LEVEL_CRIT, format, va...)
}
// Log a message 'msg' at LEVEL_ALERT level on the default logger
func Alert(msg string) error {
return logDefaultMsg(nil, LEVEL_ALERT, msg)
}
// Log a message at LEVEL_ALERT with 'format' populated with values from 'va' on the default logger
func Alertf(format string, va ...interface{}) error {
return logDefaultMsg(nil, LEVEL_ALERT, format, va...)
}
// Log a message at LEVEL_ALERT with 'format' populated with values from 'va' on the default logger.
// The attributes from 'attrs' will be included with the message, overriding any that may
// be set at the Logger level
func Alertm(attrs map[string]interface{}, format string, va ...interface{}) error {
return logDefaultMsg(attrs, LEVEL_ALERT, format, va...)
}
// Log a message 'msg' at LEVEL_EMERG level on the default logger
func Emerg(msg string) error {
return logDefaultMsg(nil, LEVEL_EMERG, msg)
}
// Log a message at LEVEL_EMERG with 'format' populated with values from 'va' on the default logger
func Emergf(format string, va ...interface{}) error {
return logDefaultMsg(nil, LEVEL_EMERG, format, va...)
}
// Log a message at LEVEL_EMERG with 'format' populated with values from 'va' on the default logger.
// The attributes from 'attrs' will be included with the message, overriding any that may
// be set at the Logger level
func Emergm(attrs map[string]interface{}, format string, va ...interface{}) error {
return logDefaultMsg(attrs, LEVEL_EMERG, format, va...)
}
================================================
FILE: 12fa-docker-golang/chapter11/vendor/github.com/aphistic/golf/logger.go
================================================
package golf
// A Logger is a set of attributes associated with a Client. When a message is
// sent with the Logger, the attributes from that Logger will be added to the
// message.
type Logger struct {
client *Client
attrs map[string]interface{}
}
func newLogger() *Logger {
log := &Logger{
attrs: make(map[string]interface{}, 0),
}
return log
}
// Create a new Logger associated with the Client. Any messages logged with
// this Logger (and any Logger cloned from this) will be sent to Client.
func (c *Client) NewLogger() (*Logger, error) {
log := newLogger()
log.client = c
return log, nil
}
// Create a new Logger with a shallow copy of the original Logger's attributes
func (l *Logger) Clone() *Logger {
newLogger, _ := l.client.NewLogger()
for attrKey, attrVal := range l.attrs {
newLogger.SetAttr(attrKey, attrVal)
}
return newLogger
}
// Retrieve the current value of the Logger level attribute named 'name'.
// Returns nil if the attribute was not found
func (l *Logger) Attr(name string) interface{} {
val, ok := l.attrs[name]
if !ok {
return nil
}
return val
}
// Set an attribute named 'name' to the value 'val' at the Logger
// level of attributes
func (l *Logger) SetAttr(name string, val interface{}) {
l.attrs[name] = val
}
// Remove the attribute named 'name' from the Logger level of attributes
func (l *Logger) RemAttr(name string) {
delete(l.attrs, name)
}
================================================
FILE: 12fa-docker-golang/chapter11/vendor/github.com/aphistic/golf/main.go
================================================
/*
Provides logging capabilities using the GELF (https://www.graylog.org/resources/gelf-2/) log format
*/
package golf
================================================
FILE: 12fa-docker-golang/chapter11/vendor/github.com/aphistic/golf/message.go
================================================
package golf
import (
"time"
)
// Levels to be used when logging messages. These match syslog levels as the
// GELF spec specifies.
const (
LEVEL_EMERG = iota // Emergency
LEVEL_ALERT // Alert
LEVEL_CRIT // Critical
LEVEL_ERR // Error
LEVEL_WARN // Warning
LEVEL_NOTICE // Notice
LEVEL_INFO // Informational
LEVEL_DBG // Debug
)
// A message to be serialized and sent to the GELF server
type Message struct {
logger *Logger
version string // GELF version to serialize to
Level int // Log level for the message (see LEVEL_DBG, etc)
Hostname string // Hostname of the client
Timestamp *time.Time // Timestamp for the message. Populated automatically if left nil
ShortMessage string // Short log message
FullMessage string // Full message (optional). Can be used for things like stack traces.
Attrs map[string]interface{} // A list of attributes to add to the message
}
// Create a new message associated with a Logger. When the message is sent, it
// will use the attributes associated with the Logger it was created from in addition
// to its own
func (l *Logger) NewMessage() *Message {
msg := newMessage()
msg.logger = l
msg.Hostname = l.client.hostname
return msg
}
func newMessage() *Message {
return newMessageForVersion("1.1")
}
func newMessageForVersion(version string) *Message {
msg := &Message{
version: version,
Attrs: make(map[string]interface{}, 0),
}
return msg
}
================================================
FILE: 12fa-docker-golang/chapter11/vendor/github.com/aws/aws-sdk-go/aws/LICENSE.txt
================================================
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.
"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.
"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.
3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.
4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:
(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and
(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and
(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and
(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.
You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.
5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.
8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf
of any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.
END OF TERMS AND CONDITIONS
APPENDIX: How to apply the Apache License to your work.
To apply the Apache License to your work, attach the following
boilerplate notice, with the fields enclosed by brackets "[]"
replaced with your own identifying information. (Don't include
the brackets!) The text should be enclosed in the appropriate
comment syntax for the file format. We also recommend that a
file or class name and description of purpose be included on the
same "printed page" as the copyright notice for easier
identification within third-party archives.
Copyright [yyyy] [name of copyright owner]
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
================================================
FILE: 12fa-docker-golang/chapter11/vendor/github.com/aws/aws-sdk-go/aws/awserr/error.go
================================================
// Package awserr represents API error interface accessors for the SDK.
package awserr
// An Error wraps lower level errors with code, message and an original error.
// The underlying concrete error type may also satisfy other interfaces which
// can be to used to obtain more specific information about the error.
//
// Calling Error() or String() will always include the full information about
// an error based on its underlying type.
//
// Example:
//
// output, err := s3manage.Upload(svc, input, opts)
// if err != nil {
// if awsErr, ok := err.(awserr.Error); ok {
// // Get error details
// log.Println("Error:", awsErr.Code(), awsErr.Message())
//
// // Prints out full error message, including original error if there was one.
// log.Println("Error:", awsErr.Error())
//
// // Get original error
// if origErr := awsErr.OrigErr(); origErr != nil {
// // operate on original error.
// }
// } else {
// fmt.Println(err.Error())
// }
// }
//
type Error interface {
// Satisfy the generic error interface.
error
// Returns the short phrase depicting the classification of the error.
Code() string
// Returns the error details message.
Message() string
// Returns the original error if one was set. Nil is returned if not set.
OrigErr() error
}
// BatchError is a batch of errors which also wraps lower level errors with
// code, message, and original errors. Calling Error() will include all errors
// that occurred in the batch.
//
// Deprecated: Replaced with BatchedErrors. Only defined for backwards
// compatibility.
type BatchError interface {
// Satisfy the generic error interface.
error
// Returns the short phrase depicting the classification of the error.
Code() string
// Returns the error details message.
Message() string
// Returns the original error if one was set. Nil is returned if not set.
OrigErrs() []error
}
// BatchedErrors is a batch of errors which also wraps lower level errors with
// code, message, and original errors. Calling Error() will include all errors
// that occurred in the batch.
//
// Replaces BatchError
type BatchedErrors interface {
// Satisfy the base Error interface.
Error
// Returns the original error if one was set. Nil is returned if not set.
OrigErrs() []error
}
// New returns an Error object described by the code, message, and origErr.
//
// If origErr satisfies the Error interface it will not be wrapped within a new
// Error object and will instead be returned.
func New(code, message string, origErr error) Error {
var errs []error
if origErr != nil {
errs = append(errs, origErr)
}
return newBaseError(code, message, errs)
}
// NewBatchError returns an BatchedErrors with a collection of errors as an
// array of errors.
func NewBatchError(code, message string, errs []error) BatchedErrors {
return newBaseError(code, message, errs)
}
// A RequestFailure is an interface to extract request failure information from
// an Error such as the request ID of the failed request returned by a service.
// RequestFailures may not always have a requestID value if the request failed
// prior to reaching the service such as a connection error.
//
// Example:
//
// output, err := s3manage.Upload(svc, input, opts)
// if err != nil {
// if reqerr, ok := err.(RequestFailure); ok {
// log.Println("Request failed", reqerr.Code(), reqerr.Message(), reqerr.RequestID())
// } else {
// log.Println("Error:", err.Error())
// }
// }
//
// Combined with awserr.Error:
//
// output, err := s3manage.Upload(svc, input, opts)
// if err != nil {
// if awsErr, ok := err.(awserr.Error); ok {
// // Generic AWS Error with Code, Message, and original error (if any)
// fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr())
//
// if reqErr, ok := err.(awserr.RequestFailure); ok {
// // A service error occurred
// fmt.Println(reqErr.StatusCode(), reqErr.RequestID())
// }
// } else {
// fmt.Println(err.Error())
// }
// }
//
type RequestFailure interface {
Error
// The status code of the HTTP response.
StatusCode() int
// The request ID returned by the service for a request failure. This will
// be empty if no request ID is available such as the request failed due
// to a connection error.
RequestID() string
}
// NewRequestFailure returns a new request error wrapper for the given Error
// provided.
func NewRequestFailure(err Error, statusCode int, reqID string) RequestFailure {
return newRequestError(err, statusCode, reqID)
}
================================================
FILE: 12fa-docker-golang/chapter11/vendor/github.com/aws/aws-sdk-go/aws/awserr/types.go
================================================
package awserr
import "fmt"
// SprintError returns a string of the formatted error code.
//
// Both extra and origErr are optional. If they are included their lines
// will be added, but if they are not included their lines will be ignored.
func SprintError(code, message, extra string, origErr error) string {
msg := fmt.Sprintf("%s: %s", code, message)
if extra != "" {
msg = fmt.Sprintf("%s\n\t%s", msg, extra)
}
if origErr != nil {
msg = fmt.Sprintf("%s\ncaused by: %s", msg, origErr.Error())
}
return msg
}
// A baseError wraps the code and message which defines an error. It also
// can be used to wrap an original error object.
//
// Should be used as the root for errors satisfying the awserr.Error. Also
// for any error which does not fit into a specific error wrapper type.
type baseError struct {
// Classification of error
code string
// Detailed information about error
message string
// Optional original error this error is based off of. Allows building
// chained errors.
errs []error
}
// newBaseError returns an error object for the code, message, and errors.
//
// code is a short no whitespace phrase depicting the classification of
// the error that is being created.
//
// message is the free flow string containing detailed information about the
// error.
//
// origErrs is the error objects which will be nested under the new errors to
// be returned.
func newBaseError(code, message string, origErrs []error) *baseError {
b := &baseError{
code: code,
message: message,
errs: origErrs,
}
return b
}
// Error returns the string representation of the error.
//
// See ErrorWithExtra for formatting.
//
// Satisfies the error interface.
func (b baseError) Error() string {
size := len(b.errs)
if size > 0 {
return SprintError(b.code, b.message, "", errorList(b.errs))
}
return SprintError(b.code, b.message, "", nil)
}
// String returns the string representation of the error.
// Alias for Error to satisfy the stringer interface.
func (b baseError) String() string {
return b.Error()
}
// Code returns the short phrase depicting the classification of the error.
func (b baseError) Code() string {
return b.code
}
// Message returns the error details message.
func (b baseError) Message() string {
return b.message
}
// OrigErr returns the original error if one was set. Nil is returned if no
// error was set. This only returns the first element in the list. If the full
// list is needed, use BatchedErrors.
func (b baseError) OrigErr() error {
switch len(b.errs) {
case 0:
return nil
case 1:
return b.errs[0]
default:
if err, ok := b.errs[0].(Error); ok {
return NewBatchError(err.Code(), err.Message(), b.errs[1:])
}
return NewBatchError("BatchedErrors",
"multiple errors occurred", b.errs)
}
}
// OrigErrs returns the original errors if one was set. An empty slice is
// returned if no error was set.
func (b baseError) OrigErrs() []error {
return b.errs
}
// So that the Error interface type can be included as an anonymous field
// in the requestError struct and not conflict with the error.Error() method.
type awsError Error
// A requestError wraps a request or service error.
//
// Composed of baseError for code, message, and original error.
type requestError struct {
awsError
statusCode int
requestID string
}
// newRequestError returns a wrapped error with additional information for
// request status code, and service requestID.
//
// Should be used to wrap all request which involve service requests. Even if
// the request failed without a service response, but had an HTTP status code
// that may be meaningful.
//
// Also wraps original errors via the baseError.
func newRequestError(err Error, statusCode int, requestID string) *requestError {
return &requestError{
awsError: err,
statusCode: statusCode,
requestID: requestID,
}
}
// Error returns the string representation of the error.
// Satisfies the error interface.
func (r requestError) Error() string {
extra := fmt.Sprintf("status code: %d, request id: %s",
r.statusCode, r.requestID)
return SprintError(r.Code(), r.Message(), extra, r.OrigErr())
}
// String returns the string representation of the error.
// Alias for Error to satisfy the stringer interface.
func (r requestError) String() string {
return r.Error()
}
// StatusCode returns the wrapped status code for the error
func (r requestError) StatusCode() int {
return r.statusCode
}
// RequestID returns the wrapped requestID
func (r requestError) RequestID() string {
return r.requestID
}
// OrigErrs returns the original errors if one was set. An empty slice is
// returned if no error was set.
func (r requestError) OrigErrs() []error {
if b, ok := r.awsError.(BatchedErrors); ok {
return b.OrigErrs()
}
return []error{r.OrigErr()}
}
// An error list that satisfies the golang interface
type errorList []error
// Error returns the string representation of the error.
//
// Satisfies the error interface.
func (e errorList) Error() string {
msg := ""
// How do we want to handle the array size being zero
if size := len(e); size > 0 {
for i := 0; i < size; i++ {
msg += fmt.Sprintf("%s", e[i].Error())
// We check the next index to see if it is within the slice.
// If it is, then we append a newline. We do this, because unit tests
// could be broken with the additional '\n'
if i+1 < size {
msg += "\n"
}
}
}
return msg
}
================================================
FILE: 12fa-docker-golang/chapter11/vendor/github.com/aws/aws-sdk-go/aws/awsutil/copy.go
================================================
package awsutil
import (
"io"
"reflect"
"time"
)
// Copy deeply copies a src structure to dst. Useful for copying request and
// response structures.
//
// Can copy between structs of different type, but will only copy fields which
// are assignable, and exist in both structs. Fields which are not assignable,
// or do not exist in both structs are ignored.
func Copy(dst, src interface{}) {
dstval := reflect.ValueOf(dst)
if !dstval.IsValid() {
panic("Copy dst cannot be nil")
}
rcopy(dstval, reflect.ValueOf(src), true)
}
// CopyOf returns a copy of src while also allocating the memory for dst.
// src must be a pointer type or this operation will fail.
func CopyOf(src interface{}) (dst interface{}) {
dsti := reflect.New(reflect.TypeOf(src).Elem())
dst = dsti.Interface()
rcopy(dsti, reflect.ValueOf(src), true)
return
}
// rcopy performs a recursive copy of values from the source to destination.
//
// root is used to skip certain aspects of the copy which are not valid
// for the root node of a object.
func rcopy(dst, src reflect.Value, root bool) {
if !src.IsValid() {
return
}
switch src.Kind() {
case reflect.Ptr:
if _, ok := src.Interface().(io.Reader); ok {
if dst.Kind() == reflect.Ptr && dst.Elem().CanSet() {
dst.Elem().Set(src)
} else if dst.CanSet() {
dst.Set(src)
}
} else {
e := src.Type().Elem()
if dst.CanSet() && !src.IsNil() {
if _, ok := src.Interface().(*time.Time); !ok {
dst.Set(reflect.New(e))
} else {
tempValue := reflect.New(e)
tempValue.Elem().Set(src.Elem())
// Sets time.Time's unexported values
dst.Set(tempValue)
}
}
if src.Elem().IsValid() {
// Keep the current root state since the depth hasn't changed
rcopy(dst.Elem(), src.Elem(), root)
}
}
case reflect.Struct:
t := dst.Type()
for i := 0; i < t.NumField(); i++ {
name := t.Field(i).Name
srcVal := src.FieldByName(name)
dstVal := dst.FieldByName(name)
if srcVal.IsValid() && dstVal.CanSet() {
rcopy(dstVal, srcVal, false)
}
}
case reflect.Slice:
if src.IsNil() {
break
}
s := reflect.MakeSlice(src.Type(), src.Len(), src.Cap())
dst.Set(s)
for i := 0; i < src.Len(); i++ {
rcopy(dst.Index(i), src.Index(i), false)
}
case reflect.Map:
if src.IsNil() {
break
}
s := reflect.MakeMap(src.Type())
dst.Set(s)
for _, k := range src.MapKeys() {
v := src.MapIndex(k)
v2 := reflect.New(v.Type()).Elem()
rcopy(v2, v, false)
dst.SetMapIndex(k, v2)
}
default:
// Assign the value if possible. If its not assignable, the value would
// need to be converted and the impact of that may be unexpected, or is
// not compatible with the dst type.
if src.Type().AssignableTo(dst.Type()) {
dst.Set(src)
}
}
}
================================================
FILE: 12fa-docker-golang/chapter11/vendor/github.com/aws/aws-sdk-go/aws/awsutil/equal.go
================================================
package awsutil
import (
"reflect"
)
// DeepEqual returns if the two values are deeply equal like reflect.DeepEqual.
// In addition to this, this method will also dereference the input values if
// possible so the DeepEqual performed will not fail if one parameter is a
// pointer and the other is not.
//
// DeepEqual will not perform indirection of nested values of the input parameters.
func DeepEqual(a, b interface{}) bool {
ra := reflect.Indirect(reflect.ValueOf(a))
rb := reflect.Indirect(reflect.ValueOf(b))
if raValid, rbValid := ra.IsValid(), rb.IsValid(); !raValid && !rbValid {
// If the elements are both nil, and of the same type the are equal
// If they are of different types they are not equal
return reflect.TypeOf(a) == reflect.TypeOf(b)
} else if raValid != rbValid {
// Both values must be valid to be equal
return false
}
return reflect.DeepEqual(ra.Interface(), rb.Interface())
}
================================================
FILE: 12fa-docker-golang/chapter11/vendor/github.com/aws/aws-sdk-go/aws/awsutil/path_value.go
================================================
package awsutil
import (
"reflect"
"regexp"
"strconv"
"strings"
"github.com/jmespath/go-jmespath"
)
var indexRe = regexp.MustCompile(`(.+)\[(-?\d+)?\]$`)
// rValuesAtPath returns a slice of values found in value v. The values
// in v are explored recursively so all nested values are collected.
func rValuesAtPath(v interface{}, path string, createPath, caseSensitive, nilTerm bool) []reflect.Value {
pathparts := strings.Split(path, "||")
if len(pathparts) > 1 {
for _, pathpart := range pathparts {
vals := rValuesAtPath(v, pathpart, createPath, caseSensitive, nilTerm)
if len(vals) > 0 {
return vals
}
}
return nil
}
values := []reflect.Value{reflect.Indirect(reflect.ValueOf(v))}
components := strings.Split(path, ".")
for len(values) > 0 && len(components) > 0 {
var index *int64
var indexStar bool
c := strings.TrimSpace(components[0])
if c == "" { // no actual component, illegal syntax
return nil
} else if caseSensitive && c != "*" && strings.ToLower(c[0:1]) == c[0:1] {
// TODO normalize case for user
return nil // don't support unexported fields
}
// parse this component
if m := indexRe.FindStringSubmatch(c); m != nil {
c = m[1]
if m[2] == "" {
index = nil
indexStar = true
} else {
i, _ := strconv.ParseInt(m[2], 10, 32)
index = &i
indexStar = false
}
}
nextvals := []reflect.Value{}
for _, value := range values {
// pull component name out of struct member
if value.Kind() != reflect.Struct {
continue
}
if c == "*" { // pull all members
for i := 0; i < value.NumField(); i++ {
if f := reflect.Indirect(value.Field(i)); f.IsValid() {
nextvals = append(nextvals, f)
}
}
continue
}
value = value.FieldByNameFunc(func(name string) bool {
if c == name {
return true
} else if !caseSensitive && strings.ToLower(name) == strings.ToLower(c) {
return true
}
return false
})
if nilTerm && value.Kind() == reflect.Ptr && len(components[1:]) == 0 {
if !value.IsNil() {
value.Set(reflect.Zero(value.Type()))
}
return []reflect.Value{value}
}
if createPath && value.Kind() == reflect.Ptr && value.IsNil() {
// TODO if the value is the terminus it should not be created
// if the value to be set to its position is nil.
value.Set(reflect.New(value.Type().Elem()))
value = value.Elem()
} else {
value = reflect.Indirect(value)
}
if value.Kind() == reflect.Slice || value.Kind() == reflect.Map {
if !createPath && value.IsNil() {
value = reflect.ValueOf(nil)
}
}
if value.IsValid() {
nextvals = append(nextvals, value)
}
}
values = nextvals
if indexStar || index != nil {
nextvals = []reflect.Value{}
for _, valItem := range values {
value := reflect.Indirect(valItem)
if value.Kind() != reflect.Slice {
continue
}
if indexStar { // grab all indices
for i := 0; i < value.Len(); i++ {
idx := reflect.Indirect(value.Index(i))
if idx.IsValid() {
nextvals = append(nextvals, idx)
}
}
continue
}
// pull out index
i := int(*index)
if i >= value.Len() { // check out of bounds
if createPath {
// TODO resize slice
} else {
continue
}
} else if i < 0 { // support negative indexing
i = value.Len() + i
}
value = reflect.Indirect(value.Index(i))
if value.Kind() == reflect.Slice || value.Kind() == reflect.Map {
if !createPath && value.IsNil() {
value = reflect.ValueOf(nil)
}
}
if value.IsValid() {
nextvals = append(nextvals, value)
}
}
values = nextvals
}
components = components[1:]
}
return values
}
// ValuesAtPath returns a list of values at the case insensitive lexical
// path inside of a structure.
func ValuesAtPath(i interface{}, path string) ([]interface{}, error) {
result, err := jmespath.Search(path, i)
if err != nil {
return nil, err
}
v := reflect.ValueOf(result)
if !v.IsValid() || (v.Kind() == reflect.Ptr && v.IsNil()) {
return nil, nil
}
if s, ok := result.([]interface{}); ok {
return s, err
}
if v.Kind() == reflect.Map && v.Len() == 0 {
return nil, nil
}
if v.Kind() == reflect.Slice {
out := make([]interface{}, v.Len())
for i := 0; i < v.Len(); i++ {
out[i] = v.Index(i).Interface()
}
return out, nil
}
return []interface{}{result}, nil
}
// SetValueAtPath sets a value at the case insensitive lexical path inside
// of a structure.
func SetValueAtPath(i interface{}, path string, v interface{}) {
if rvals := rValuesAtPath(i, path, true, false, v == nil); rvals != nil {
for _, rval := range rvals {
if rval.Kind() == reflect.Ptr && rval.IsNil() {
continue
}
setValue(rval, v)
}
}
}
func setValue(dstVal reflect.Value, src interface{}) {
if dstVal.Kind() == reflect.Ptr {
dstVal = reflect.Indirect(dstVal)
}
srcVal := reflect.ValueOf(src)
if !srcVal.IsValid() { // src is literal nil
if dstVal.CanAddr() {
// Convert to pointer so that pointer's value can be nil'ed
// dstVal = dstVal.Addr()
}
dstVal.Set(reflect.Zero(dstVal.Type()))
} else if srcVal.Kind() == reflect.Ptr {
if srcVal.IsNil() {
srcVal = reflect.Zero(dstVal.Type())
} else {
srcVal = reflect.ValueOf(src).Elem()
}
dstVal.Set(srcVal)
} else {
dstVal.Set(srcVal)
}
}
================================================
FILE: 12fa-docker-golang/chapter11/vendor/github.com/aws/aws-sdk-go/aws/awsutil/prettify.go
================================================
package awsutil
import (
"bytes"
"fmt"
"io"
"reflect"
"strings"
)
// Prettify returns the string representation of a value.
func Prettify(i interface{}) string {
var buf bytes.Buffer
prettify(reflect.ValueOf(i), 0, &buf)
return buf.String()
}
// prettify will recursively walk value v to build a textual
// representation of the value.
func prettify(v reflect.Value, indent int, buf *bytes.Buffer) {
for v.Kind() == reflect.Ptr {
v = v.Elem()
}
switch v.Kind() {
case reflect.Struct:
strtype := v.Type().String()
if strtype == "time.Time" {
fmt.Fprintf(buf, "%s", v.Interface())
break
} else if strings.HasPrefix(strtype, "io.") {
buf.WriteString("<buffer>")
break
}
buf.WriteString("{\n")
names := []string{}
for i := 0; i < v.Type().NumField(); i++ {
name := v.Type().Field(i).Name
f := v.Field(i)
if name[0:1] == strings.ToLower(name[0:1]) {
continue // ignore unexported fields
}
if (f.Kind() == reflect.Ptr || f.Kind() == reflect.Slice || f.Kind() == reflect.Map) && f.IsNil() {
continue // ignore unset fields
}
names = append(names, name)
}
for i, n := range names {
val := v.FieldByName(n)
buf.WriteString(strings.Repeat(" ", indent+2))
buf.WriteString(n + ": ")
prettify(val, indent+2, buf)
if i < len(names)-1 {
buf.WriteString(",\n")
}
}
buf.WriteString("\n" + strings.Repeat(" ", indent) + "}")
case reflect.Slice:
strtype := v.Type().String()
if strtype == "[]uint8" {
fmt.Fprintf(buf, "<binary> len %d", v.Len())
break
}
nl, id, id2 := "", "", ""
if v.Len() > 3 {
nl, id, id2 = "\n", strings.Repeat(" ", indent), strings.Repeat(" ", indent+2)
}
buf.WriteString("[" + nl)
for i := 0; i < v.Len(); i++ {
buf.WriteString(id2)
prettify(v.Index(i), indent+2, buf)
if i < v.Len()-1 {
buf.WriteString("," + nl)
}
}
buf.WriteString(nl + id + "]")
case reflect.Map:
buf.WriteString("{\n")
for i, k := range v.MapKeys() {
buf.WriteString(strings.Repeat(" ", indent+2))
buf.WriteString(k.String() + ": ")
prettify(v.MapIndex(k), indent+2, buf)
if i < v.Len()-1 {
buf.WriteString(",\n")
}
}
buf.WriteString("\n" + strings.Repeat(" ", indent) + "}")
default:
if !v.IsValid() {
fmt.Fprint(buf, "<invalid value>")
return
}
format := "%v"
switch v.Interface().(type) {
case string:
format = "%q"
case io.ReadSeeker, io.Reader:
format = "buffer(%p)"
}
fmt.Fprintf(buf, format, v.Interface())
}
}
================================================
FILE: 12fa-docker-golang/chapter11/vendor/github.com/aws/aws-sdk-go/aws/awsutil/string_value.go
================================================
package awsutil
import (
"bytes"
"fmt"
"reflect"
"strings"
)
// StringValue returns the string representation of a value.
func StringValue(i interface{}) string {
var buf bytes.Buffer
stringValue(reflect.ValueOf(i), 0, &buf)
return buf.String()
}
func stringValue(v reflect.Value, indent int, buf *bytes.Buffer) {
for v.Kind() == reflect.Ptr {
v = v.Elem()
}
switch v.Kind() {
case reflect.Struct:
buf.WriteString("{\n")
names := []string{}
for i := 0; i < v.Type().NumField(); i++ {
name := v.Type().Field(i).Name
f := v.Field(i)
if name[0:1] == strings.ToLower(name[0:1]) {
continue // ignore unexported fields
}
if (f.Kind() == reflect.Ptr || f.Kind() == reflect.Slice) && f.IsNil() {
continue // ignore unset fields
}
names = append(names, name)
}
for i, n := range names {
val := v.FieldByName(n)
buf.WriteString(strings.Repeat(" ", indent+2))
buf.WriteString(n + ": ")
stringValue(val, indent+2, buf)
if i < len(names)-1 {
buf.WriteString(",\n")
}
}
buf.WriteString("\n" + strings.Repeat(" ", indent) + "}")
case reflect.Slice:
nl, id, id2 := "", "", ""
if v.Len() > 3 {
nl, id, id2 = "\n", strings.Repeat(" ", indent), strings.Repeat(" ", indent+2)
}
buf.WriteString("[" + nl)
for i := 0; i < v.Len(); i++ {
buf.WriteString(id2)
stringValue(v.Index(i), indent+2, buf)
if i < v.Len()-1 {
buf.WriteString("," + nl)
}
}
buf.WriteString(nl + id + "]")
case reflect.Map:
buf.WriteString("{\n")
for i, k := range v.MapKeys() {
buf.WriteString(strings.Repeat(" ", indent+2))
buf.WriteString(k.String() + ": ")
stringValue(v.MapIndex(k), indent+2, buf)
if i < v.Len()-1 {
buf.WriteString(",\n")
}
}
buf.WriteString("\n" + strings.Repeat(" ", indent) + "}")
default:
format := "%v"
switch v.Interface().(type) {
case string:
format = "%q"
}
fmt.Fprintf(buf, format, v.Interface())
}
}
================================================
FILE: 12fa-docker-golang/chapter11/vendor/github.com/aws/aws-sdk-go/aws/client/client.go
================================================
package client
import (
"fmt"
"net/http/httputil"
"github.com/aws/aws-sdk-go/aws"
"github.com/aws/aws-sdk-go/aws/client/metadata"
"github.com/aws/aws-sdk-go/aws/request"
)
// A Config provides configuration to a service client instance.
type Config struct {
Config *aws.Config
Handlers request.Handlers
Endpoint string
SigningRegion string
SigningName string
}
// ConfigProvider provides a generic way for a service client to receive
// the ClientConfig without circular dependencies.
type ConfigProvider interface {
ClientConfig(serviceName string, cfgs ...*aws.Config) Config
}
// ConfigNoResolveEndpointProvider same as ConfigProvider except it will not
// resolve the endpoint automatically. The service client's endpoint must be
// provided via the aws.Config.Endpoint field.
type ConfigNoResolveEndpointProvider interface {
ClientConfigNoResolveEndpoint(cfgs ...*aws.Config) Config
}
// A Client implements the base client request and response handling
// used by all service clients.
type Client struct {
request.Retryer
metadata.ClientInfo
Config aws.Config
Handlers request.Handlers
}
// New will return a pointer to a new initialized service client.
func New(cfg aws.Config, info metadata.ClientInfo, handlers request.Handlers, options ...func(*Client)) *Client {
svc := &Client{
Config: cfg,
ClientInfo: info,
Handlers: handlers.Copy(),
}
switch retryer, ok := cfg.Retryer.(request.Retryer); {
case ok:
svc.Retryer = retryer
case cfg.Retryer != nil && cfg.Logger != nil:
s := fmt.Sprintf("WARNING: %T does not implement request.Retryer; using DefaultRetryer instead", cfg.Retryer)
cfg.Logger.Log(s)
fallthrough
default:
maxRetries := aws.IntValue(cfg.MaxRetries)
if cfg.MaxRetries == nil || maxRetries == aws.UseServiceDefaultRetries {
maxRetries = 3
}
svc.Retryer = DefaultRetryer{NumMaxRetries: maxRetries}
}
svc.AddDebugHandlers()
for _, option := range options {
option(svc)
}
return svc
}
// NewRequest returns a new Request pointer for the service API
// operation and parameters.
func (c *Client) NewRequest(operation *request.Operation, params interface{}, data interface{}) *request.Request {
return request.New(c.Config, c.ClientInfo, c.Handlers, c.Retryer, operation, params, data)
}
// AddDebugHandlers injects debug logging handlers into the service to log request
// debug information.
func (c *Client) AddDebugHandlers() {
if !c.Config.LogLevel.AtLeast(aws.LogDebug) {
return
}
c.Handlers.Send.PushFrontNamed(request.NamedHandler{Name: "awssdk.client.LogRequest", Fn: logRequest})
c.Handlers.Send.PushBackNamed(request.NamedHandler{Name: "awssdk.client.LogResponse", Fn: logResponse})
}
const logReqMsg = `DEBUG: Request %s/%s Details:
---[ REQUEST POST-SIGN ]-----------------------------
%s
-----------------------------------------------------`
const logReqErrMsg = `DEBUG ERROR: Request %s/%s:
---[ REQUEST DUMP ERROR ]-----------------------------
%s
-----------------------------------------------------`
func logRequest(r *request.Request) {
logBody := r.Config.LogLevel.Matches(aws.LogDebugWithHTTPBody)
dumpedBody, err := httputil.DumpRequestOut(r.HTTPRequest, logBody)
if err != nil {
r.Config.Logger.Log(fmt.Sprintf(logReqErrMsg, r.ClientInfo.ServiceName, r.Operation.Name, err))
return
}
if logBody {
// Reset the request body because dumpRequest will re-wrap the r.HTTPRequest's
// Body as a NoOpCloser and will not be reset after read by the HTTP
// client reader.
r.ResetBody()
}
r.Config.Logger.Log(fmt.Sprintf(logReqMsg, r.ClientInfo.ServiceName, r.Operation.Name, string(dumpedBody)))
}
const logRespMsg = `DEBUG: Response %s/%s Details:
---[ RESPONSE ]--------------------------------------
%s
-----------------------------------------------------`
const logRespErrMsg = `DEBUG ERROR: Response %s/%s:
---[ RESPONSE DUMP ERROR ]-----------------------------
%s
-----------------------------------------------------`
func logResponse(r *request.Request) {
var msg = "no response data"
if r.HTTPResponse != nil {
logBody := r.Config.LogLevel.Matches(aws.LogDebugWithHTTPBody)
dumpedBody, err := httputil.DumpResponse(r.HTTPResponse, logBody)
if err != nil {
r.Config.Logger.Log(fmt.Sprintf(logRespErrMsg, r.ClientInfo.ServiceName, r.Operation.Name, err))
return
}
msg = string(dumpedBody)
} else if r.Error != nil {
msg = r.Error.Error()
}
r.Config.Logger.Log(fmt.Sprintf(logRespMsg, r.ClientInfo.ServiceName, r.Operation.Name, msg))
}
================================================
FILE: 12fa-docker-golang/chapter11/vendor/github.com/aws/aws-sdk-go/aws/client/default_retryer.go
================================================
package client
import (
"math/rand"
"sync"
"time"
"github.com/aws/aws-sdk-go/aws/request"
)
// DefaultRetryer implements basic retry logic using exponential backoff for
// most services. If you want to implement custom retry logic, implement the
// request.Retryer interface or create a structure type that composes this
// struct and override the specific methods. For example, to override only
// the MaxRetries method:
//
// type retryer struct {
// service.DefaultRetryer
// }
//
// // This implementation always has 100 max retries
// func (d retryer) MaxRetries() uint { return 100 }
type DefaultRetryer struct {
NumMaxRetries int
}
// MaxRetries returns the number of maximum returns the service will use to make
// an individual API request.
func (d DefaultRetryer) MaxRetries() int {
return d.NumMaxRetries
}
var seededRand = rand.New(&lockedSource{src: rand.NewSource(time.Now().UnixNano())})
// RetryRules returns the delay duration before retrying this request again
func (d DefaultRetryer) RetryRules(r *request.Request) time.Duration {
// Set the upper limit of delay in retrying at ~five minutes
minTime := 30
throttle := d.shouldThrottle(r)
if throttle {
minTime = 500
}
retryCount := r.RetryCount
if retryCount > 13 {
retryCount = 13
} else if throttle && retryCount > 8 {
retryCount = 8
}
delay := (1 << uint(retryCount)) * (seededRand.Intn(minTime) + minTime)
return time.Duration(delay) * time.Millisecond
}
// ShouldRetry returns true if the request should be retried.
func (d DefaultRetryer) ShouldRetry(r *request.Request) bool {
if r.HTTPResponse.StatusCode >= 500 {
return true
}
return r.IsErrorRetryable() || d.shouldThrottle(r)
}
// ShouldThrottle returns true if the request should be throttled.
func (d DefaultRetryer) shouldThrottle(r *request.Request) bool {
if r.HTTPResponse.StatusCode == 502 ||
r.HTTPResponse.StatusCode == 503 ||
r.HTTPResponse.StatusCode == 504 {
return true
}
return r.IsErrorThrottle()
}
// lockedSource is a thread-safe implementation of rand.Source
type lockedSource struct {
lk sync.Mutex
src rand.Source
}
func (r *lockedSource) Int63() (n int64) {
r.lk.Lock()
n = r.src.Int63()
r.lk.Unlock()
return
}
func (r *lockedSource) Seed(seed int64) {
r.lk.Lock()
r.src.Seed(seed)
r.lk.Unlock()
}
================================================
FILE: 12fa-docker-golang/chapter11/vendor/github.com/aws/aws-sdk-go/aws/client/metadata/client_info.go
================================================
package metadata
// ClientInfo wraps immutable data from the client.Client structure.
type ClientInfo struct {
ServiceName string
APIVersion string
Endpoint string
SigningName string
SigningRegion string
JSONVersion string
TargetPrefix string
}
================================================
FILE: 12fa-docker-golang/chapter11/vendor/github.com/aws/aws-sdk-go/aws/config.go
================================================
package aws
import (
"net/http"
"time"
"github.com/aws/aws-sdk-go/aws/credentials"
"github.com/aws/aws-sdk-go/aws/endpoints"
)
// UseServiceDefaultRetries instructs the config to use the service's own
// default number of retries. This will be the default action if
// Config.MaxRetries is nil also.
const UseServiceDefaultRetries = -1
// RequestRetryer is an alias for a type that implements the request.Retryer
// interface.
type RequestRetryer interface{}
// A Config provides service configuration for service clients. By default,
// all clients will use the defaults.DefaultConfig tructure.
//
// // Create Session with MaxRetry configuration to be shared by multiple
// // service clients.
// sess := session.Must(session.NewSession(&aws.Config{
// MaxRetries: aws.Int(3),
// }))
//
// // Create S3 service client with a specific Region.
// svc := s3.New(sess, &aws.Config{
// Region: aws.String("us-west-2"),
// })
type Config struct {
// Enables verbose error printing of all credential chain errors.
// Should be used when wanting to see all errors while attempting to
// retrieve credentials.
CredentialsChainVerboseErrors *bool
// The credentials object to use when signing requests. Defaults to a
// chain of credential providers to search for credentials in environment
// variables, shared credential file, and EC2 Instance Roles.
Credentials *credentials.Credentials
// An optional endpoint URL (hostname only or fully qualified URI)
// that overrides the default generated endpoint for a client. Set this
// to `""` to use the default generated endpoint.
//
// @note You must still provide a `Region` value when specifying an
// endpoint for a client.
Endpoint *string
// The resolver to use for looking up endpoints for AWS service clients
// to use based on region.
EndpointResolver endpoints.Resolver
// The region to send requests to. This parameter is required and must
// be configured globally or on a per-client basis unless otherwise
// noted. A full list of regions is found in the "Regions and Endpoints"
// document.
//
// @see http://docs.aws.amazon.com/general/latest/gr/rande.html
// AWS Regions and Endpoints
Region *string
// Set this to `true` to disable SSL when sending requests. Defaults
// to `false`.
DisableSSL *bool
// The HTTP client to use when sending requests. Defaults to
// `http.DefaultClient`.
HTTPClient *http.Client
// An integer value representing the logging level. The default log level
// is zero (LogOff), which represents no logging. To enable logging set
// to a LogLevel Value.
LogLevel *LogLevelType
// The logger writer interface to write logging messages to. Defaults to
// standard out.
Logger Logger
// The maximum number of times that a request will be retried for failures.
// Defaults to -1, which defers the max retry setting to the service
// specific configuration.
MaxRetries *int
// Retryer guides how HTTP requests should be retried in case of
// recoverable failures.
//
// When nil or the value does not implement the request.Retryer interface,
// the request.DefaultRetryer will be used.
//
// When both Retryer and MaxRetries are non-nil, the former is used and
// the latter ignored.
//
// To set the Retryer field in a type-safe manner and with chaining, use
// the request.WithRetryer helper function:
//
// cfg := request.WithRetryer(aws.NewConfig(), myRetryer)
//
Retryer RequestRetryer
// Disables semantic parameter validation, which validates input for
// missing required fields and/or other semantic request input errors.
DisableParamValidation *bool
// Disables the computation of request and response checksums, e.g.,
// CRC32 checksums in Amazon DynamoDB.
DisableComputeChecksums *bool
// Set this to `true` to force the request to use path-style addressing,
// i.e., `http://s3.amazonaws.com/BUCKET/KEY`. By default, the S3 client
// will use virtual hosted bucket addressing when possible
// (`http://BUCKET.s3.amazonaws.com/KEY`).
//
// @note This configuration option is specific to the Amazon S3 service.
// @see http://docs.aws.amazon.com/AmazonS3/latest/dev/VirtualHosting.html
// Amazon S3: Virtual Hosting of Buckets
S3ForcePathStyle *bool
// Set this to `true` to disable the SDK adding the `Expect: 100-Continue`
// header to PUT requests over 2MB of content. 100-Continue instructs the
// HTTP client not to send the body until the service responds with a
// `continue` status. This is useful to prevent sending the request body
// until after the request is authenticated, and validated.
//
// http://docs.aws.amazon.com/AmazonS3/latest/API/RESTObjectPUT.html
//
// 100-Continue is only enabled for Go 1.6 and above. See `http.Transport`'s
// `ExpectContinueTimeout` for information on adjusting the continue wait
// timeout. https://golang.org/pkg/net/http/#Transport
//
// You should use this flag to disble 100-Continue if you experience issues
// with proxies or third party S3 compatible services.
S3Disable100Continue *bool
// Set this to `true` to enable S3 Accelerate feature. For all operations
// compatible with S3 Accelerate will use the accelerate endpoint for
// requests. Requests not compatible will fall back to normal S3 requests.
//
// The bucket must be enable for accelerate to be used with S3 client with
// accelerate enabled. If the bucket is not enabled for accelerate an error
// will be returned. The bucket name must be DNS compatible to also work
// with accelerate.
S3UseAccelerate *bool
// Set this to `true` to disable the EC2Metadata client from overriding the
// default http.Client's Timeout. This is helpful if you do not want the
// EC2Metadata client to create a new http.Client. This options is only
// meaningful if you're not already using a custom HTTP client with the
// SDK. Enabled by default.
//
// Must be set and provided to the session.NewSession() in order to disable
// the EC2Metadata overriding the timeout for default credentials chain.
//
// Example:
// sess := session.Must(session.NewSession(aws.NewConfig()
// .WithEC2MetadataDiableTimeoutOverride(true)))
//
// svc := s3.New(sess)
//
EC2MetadataDisableTimeoutOverride *bool
// Instructs the endpiont to be generated for a service client to
// be the dual stack endpoint. The dual stack endpoint will support
// both IPv4 and IPv6 addressing.
//
// Setting this for a service which does not support dual stack will fail
// to make requets. It is not recommended to set this value on the session
// as it will apply to all service clients created with the session. Even
// services which don't support dual stack endpoints.
//
// If the Endpoint config value is also provided the UseDualStack flag
// will be ignored.
//
// Only supported with.
//
// sess := session.Must(session.NewSession())
//
// svc := s3.New(sess, &aws.Config{
// UseDualStack: aws.Bool(true),
// })
UseDualStack *bool
// SleepDelay is an override for the func the SDK will call when sleeping
// during the lifecycle of a request. Specifically this will be used for
// request delays. This value should only be used for testing. To adjust
// the delay of a request see the aws/client.DefaultRetryer and
// aws/request.Retryer.
//
// SleepDelay will prevent any Context from being used for canceling retry
// delay of an API operation. It is recommended to not use SleepDelay at all
// and specify a Retryer instead.
SleepDelay func(time.Duration)
// DisableRestProtocolURICleaning will not clean the URL path when making rest protocol requests.
// Will default to false. This would only be used for empty directory names in s3 requests.
//
// Example:
// sess := session.Must(session.NewSession(&aws.Config{
// DisableRestProtocolURICleaning: aws.Bool(true),
// }))
//
// svc := s3.New(sess)
// out, err := svc.GetObject(&s3.GetObjectInput {
// Bucket: aws.String("bucketname"),
// Key: aws.String("//foo//bar//moo"),
// })
DisableRestProtocolURICleaning *bool
}
// NewConfig returns a new Config pointer that can be chained with builder
// methods to set multiple configuration values inline without using pointers.
//
// // Create Session with MaxRetry configuration to be shared by multiple
// // service clients.
// sess := session.Must(session.NewSession(aws.NewConfig().
// WithMaxRetries(3),
// ))
//
// // Create S3 service client with a specific Region.
// svc := s3.New(sess, aws.NewConfig().
// WithRegion("us-west-2"),
// )
func NewConfig() *Config {
return &Config{}
}
// WithCredentialsChainVerboseErrors sets a config verbose errors boolean and returning
// a Config pointer.
func (c *Config) WithCredentialsChainVerboseErrors(verboseErrs bool) *Config {
c.CredentialsChainVerboseErrors = &verboseErrs
return c
}
// WithCredentials sets a config Credentials value returning a Config pointer
// for chaining.
func (c *Config) WithCredentials(creds *credentials.Credentials) *Config {
c.Credentials = creds
return c
}
// WithEndpoint sets a config Endpoint value returning a Config pointer for
// chaining.
func (c *Config) WithEndpoint(endpoint string) *Config {
c.Endpoint = &endpoint
return c
}
// WithEndpointResolver sets a config EndpointResolver value returning a
// Config pointer for chaining.
func (c *Config) WithEndpointResolver(resolver endpoints.Resolver) *Config {
c.EndpointResolver = resolver
return c
}
// WithRegion sets a config Region value returning a Config pointer for
// chaining.
func (c *Config) WithRegion(region string) *Config {
c.Region = ®ion
return c
}
// WithDisableSSL sets a config DisableSSL value returning a Config pointer
// for chaining.
func (c *Config) WithDisableSSL(disable bool) *Config {
c.DisableSSL = &disable
return c
}
// WithHTTPClient sets a config HTTPClient value returning a Config pointer
// for chaining.
func (c *Config) WithHTTPClient(client *http.Client) *Config {
c.HTTPClient = client
return c
}
// WithMaxRetries sets a config MaxRetries value returning a Config pointer
// for chaining.
func (c *Config) WithMaxRetries(max int) *Config {
c.MaxRetries = &max
return c
}
// WithDisableParamValidation sets a config DisableParamValidation value
// returning a Config pointer for chaining.
func (c *Config) WithDisableParamValidation(disable bool) *Config {
c.DisableParamValidation = &disable
return c
}
// WithDisableComputeChecksums sets a config DisableComputeChecksums value
// returning a Config pointer for chaining.
func (c *Config) WithDisableComputeChecksums(disable bool) *Config {
c.DisableComputeChecksums = &disable
return c
}
// WithLogLevel sets a config LogLevel value returning a Config pointer for
// chaining.
func (c *Config) WithLogLevel(level LogLevelType) *Config {
c.LogLevel = &level
return c
}
// WithLogger sets a config Logger value returning a Config pointer for
// chaining.
func (c *Config) WithLogger(logger Logger) *Config {
c.Logger = logger
return c
}
// WithS3ForcePathStyle sets a config S3ForcePathStyle value returning a Config
// pointer for chaining.
func (c *Config) WithS3ForcePathStyle(force bool) *Config {
c.S3ForcePathStyle = &force
return c
}
// WithS3Disable100Continue sets a config S3Disable100Continue value returning
// a Config pointer for chaining.
func (c *Config) WithS3Disable100Continue(disable bool) *Config {
c.S3Disable100Continue = &disable
return c
}
// WithS3UseAccelerate sets a config S3UseAccelerate value returning a Config
// pointer for chaining.
func (c *Config) WithS3UseAccelerate(enable bool) *Config {
c.S3UseAccelerate = &enable
return c
}
// WithUseDualStack sets a config UseDualStack value returning a Config
// pointer for chaining.
func (c *Config) WithUseDualStack(enable bool) *Config {
c.UseDualStack = &enable
return c
}
// WithEC2MetadataDisableTimeoutOverride sets a config EC2MetadataDisableTimeoutOverride value
// returning a Config pointer for chaining.
func (c *Config) WithEC2MetadataDisableTimeoutOverride(enable bool) *Config {
c.EC2MetadataDisableTimeoutOverride = &enable
return c
}
// WithSleepDelay overrides the function used to sleep while waiting for the
// next retry. Defaults to time.Sleep.
func (c *Config) WithSleepDelay(fn func(time.Duration)) *Config {
c.SleepDelay = fn
return c
}
// MergeIn merges the passed in configs into the existing config object.
func (c *Config) MergeIn(cfgs ...*Config) {
for _, other := range cfgs {
mergeInConfig(c, other)
}
}
func mergeInConfig(dst *Config, other *Config) {
if other == nil {
return
}
if other.CredentialsChainVerboseErrors != nil {
dst.CredentialsChainVerboseErrors = other.CredentialsChainVerboseErrors
}
if other.Credentials != nil {
dst.Credentials = other.Credentials
}
if other.Endpoint != nil {
dst.Endpoint = other.Endpoint
}
if other.EndpointResolver != nil {
dst.EndpointResolver = other.EndpointResolver
}
if other.Region != nil {
dst.Region = other.Region
}
if other.DisableSSL != nil {
dst.DisableSSL = other.DisableSSL
}
if other.HTTPClient != nil {
dst.HTTPClient = other.HTTPClient
}
if other.LogLevel != nil {
dst.LogLevel = other.LogLevel
}
if other.Logger != nil {
dst.Logger = other.Logger
}
if other.MaxRetries != nil {
dst.MaxRetries = other.MaxRetries
}
if other.Retryer != nil {
dst.Retryer = other.Retryer
}
if other.DisableParamValidation != nil {
dst.DisableParamValidation = other.DisableParamValidation
}
if other.DisableComputeChecksums != nil {
dst.DisableComputeChecksums = other.DisableComputeChecksums
}
if other.S3ForcePathStyle != nil {
dst.S3ForcePathStyle = other.S3ForcePathStyle
}
if other.S3Disable100Continue != nil {
dst.S3Disable100Continue = other.S3Disable100Continue
}
if other.S3UseAccelerate != nil {
dst.S3UseAccelerate = other.S3UseAccelerate
}
if other.UseDualStack != nil {
dst.UseDualStack = other.UseDualStack
}
if other.EC2MetadataDisableTimeoutOverride != nil {
dst.EC2MetadataDisableTimeoutOverride = other.EC2MetadataDisableTimeoutOverride
}
if other.SleepDelay != nil {
dst.SleepDelay = other.SleepDelay
}
if other.DisableRestProtocolURICleaning != nil {
dst.DisableRestProtocolURICleaning = other.DisableRestProtocolURICleaning
}
}
// Copy will return a shallow copy of the Config object. If any additional
// configurations are provided they will be merged into the new config returned.
func (c *Config) Copy(cfgs ...*Config) *Config {
dst := &Config{}
dst.MergeIn(c)
for _, cfg := range cfgs {
dst.MergeIn(cfg)
}
return dst
}
================================================
FILE: 12fa-docker-golang/chapter11/vendor/github.com/aws/aws-sdk-go/aws/context.go
================================================
package aws
import (
"time"
)
// Context is an copy of the Go v1.7 stdlib's context.Context interface.
// It is represented as a SDK interface to enable you to use the "WithContext"
// API methods with Go v1.6 and a Context type such as golang.org/x/net/context.
//
// See https://golang.org/pkg/context on how to use contexts.
type Context interface {
// Deadline returns the time when work done on behalf of this context
// should be canceled. Deadline returns ok==false when no deadline is
// set. Successive calls to Deadline return the same results.
Deadline() (deadline time.Time, ok bool)
// Done returns a channel that's closed when work done on behalf of this
// context should be canceled. Done may return nil if this context can
// never be canceled. Successive calls to Done return the same value.
Done() <-chan struct{}
// Err returns a non-nil error value after Done is closed. Err returns
// Canceled if the context was canceled or DeadlineExceeded if the
// context's deadline passed. No other values for Err are defined.
// After Done is closed, successive calls to Err return the same value.
Err() error
// Value returns the value associated with this context for key, or nil
// if no value is associated with key. Successive calls to Value with
// the same key returns the same result.
//
// Use context values only for request-scoped data that transits
// processes and API boundaries, not for passing optional parameters to
// functions.
Value(key interface{}) interface{}
}
// BackgroundContext returns a context that will never be canceled, has no
// values, and no deadline. This context is used by the SDK to provide
// backwards compatibility with non-context API operations and functionality.
//
// Go 1.6 and before:
// This context function is equivalent to context.Background in the Go stdlib.
//
// Go 1.7 and later:
// The context returned will be the value returned by context.Background()
//
// See https://golang.org/pkg/context for more information on Contexts.
func BackgroundContext() Context {
return backgroundCtx
}
// SleepWithContext will wait for the timer duration to expire, or the context
// is canceled. Which ever happens first. If the context is canceled the Context's
// error will be returned.
//
// Expects Context to always return a non-nil error if the Done channel is closed.
func SleepWithContext(ctx Context, dur time.Duration) error {
t := time.NewTimer(dur)
defer t.Stop()
select {
case <-t.C:
break
case <-ctx.Done():
return ctx.Err()
}
return nil
}
================================================
FILE: 12fa-docker-golang/chapter11/vendor/github.com/aws/aws-sdk-go/aws/context_1_6.go
================================================
// +build !go1.7
package aws
import "time"
// An emptyCtx is a copy of the the Go 1.7 context.emptyCtx type. This
// is copied to provide a 1.6 and 1.5 safe version of context that is compatible
// with Go 1.7's Context.
//
// An emptyCtx is never canceled, has no values, and has no deadline. It is not
// struct{}, since vars of this type must have distinct addresses.
type emptyCtx int
func (*emptyCtx) Deadline() (deadline time.Time, ok bool) {
return
}
func (*emptyCtx) Done() <-chan struct{} {
return nil
}
func (*emptyCtx) Err() error {
return nil
}
func (*emptyCtx) Value(key interface{}) interface{} {
return nil
}
func (e *emptyCtx) String() string {
switch e {
case backgroundCtx:
return "aws.BackgroundContext"
}
return "unknown empty Context"
}
var (
backgroundCtx = new(emptyCtx)
)
================================================
FILE: 12fa-docker-golang/chapter11/vendor/github.com/aws/aws-sdk-go/aws/context_1_7.go
================================================
// +build go1.7
package aws
import "context"
var (
backgroundCtx = context.Background()
)
================================================
FILE: 12fa-docker-golang/chapter11/vendor/github.com/aws/aws-sdk-go/aws/convert_types.go
================================================
package aws
import "time"
// String returns a pointer to the string value passed in.
func String(v string) *string {
return &v
}
// StringValue returns the value of the string pointer passed in or
// "" if the pointer is nil.
func StringValue(v *string) string {
if v != nil {
return *v
}
return ""
}
// StringSlice converts a slice of string values into a slice of
// string pointers
func StringSlice(src []string) []*string {
dst := make([]*string, len(src))
for i := 0; i < len(src); i++ {
dst[i] = &(src[i])
}
return dst
}
// StringValueSlice converts a slice of string pointers into a slice of
// string values
func StringValueSlice(src []*string) []string {
dst := make([]string, len(src))
for i := 0; i < len(src); i++ {
if src[i] != nil {
dst[i] = *(src[i])
}
}
return dst
}
// StringMap converts a string map of string values into a string
// map of string pointers
func StringMap(src map[string]string) map[string]*string {
dst := make(map[string]*string)
for k, val := range src {
v := val
dst[k] = &v
}
return dst
}
// StringValueMap converts a string map of string pointers into a string
// map of string values
func StringValueMap(src map[string]*string) map[string]string {
dst := make(map[string]string)
for k, val := range src {
if val != nil {
dst[k] = *val
}
}
return dst
}
// Bool returns a pointer to the bool value passed in.
func Bool(v bool) *bool {
return &v
}
// BoolValue returns the value of the bool pointer passed in or
// false if the pointer is nil.
func BoolValue(v *bool) bool {
if v != nil {
return *v
}
return false
}
// BoolSlice converts a slice of bool values into a slice of
// bool pointers
func BoolSlice(src []bool) []*bool {
dst := make([]*bool, len(src))
for i := 0; i < len(src); i++ {
dst[i] = &(src[i])
}
return dst
}
// BoolValueSlice converts a slice of bool pointers into a slice of
// bool values
func BoolValueSlice(src []*bool) []bool {
dst := make([]bool, len(src))
for i := 0; i < len(src); i++ {
if src[i] != nil {
dst[i] = *(src[i])
}
}
return dst
}
// BoolMap converts a string map of bool values into a string
// map of bool pointers
func BoolMap(src map[string]bool) map[string]*bool {
dst := make(map[string]*bool)
for k, val := range src {
v := val
dst[k] = &v
}
return dst
}
// BoolValueMap converts a string map of bool pointers into a string
// map of bool values
func BoolValueMap(src map[string]*bool) map[string]bool {
dst := make(map[string]bool)
for k, val := range src {
if val != nil {
dst[k] = *val
}
}
return dst
}
// Int returns a pointer to the int value passed in.
func Int(v int) *int {
return &v
}
// IntValue returns the value of the int pointer passed in or
// 0 if the pointer is nil.
func IntValue(v *int) int {
if v != nil {
return *v
}
return 0
}
// IntSlice converts a slice of int values into a slice of
// int pointers
func IntSlice(src []int) []*int {
dst := make([]*int, len(src))
for i := 0; i < len(src); i++ {
dst[i] = &(src[i])
}
return dst
}
// IntValueSlice converts a slice of int pointers into a slice of
// int values
func IntValueSlice(src []*int) []int {
dst := make([]int, len(src))
for i := 0; i < len(src); i++ {
if src[i] != nil {
dst[i] = *(src[i])
}
}
return dst
}
// IntMap converts a string map of int values into a string
// map of int pointers
func IntMap(src map[string]int) map[string]*int {
dst := make(map[string]*int)
for k, val := range src {
v := val
dst[k] = &v
}
return dst
}
// IntValueMap converts a string map of int pointers into a string
// map of int values
func IntValueMap(src map[string]*int) map[string]int {
dst := make(map[string]int)
for k, val := range src {
if val != nil {
dst[k] = *val
}
}
return dst
}
// Int64 returns a pointer to the int64 value passed in.
func Int64(v int64) *int64 {
return &v
}
// Int64Value returns the value of the int64 pointer passed in or
// 0 if the pointer is nil.
func Int64Value(v *int64) int64 {
if v != nil {
return *v
}
return 0
}
// Int64Slice converts a slice of int64 values into a slice of
// int64 pointers
func Int64Slice(src []int64) []*int64 {
dst := make([]*int64, len(src))
for i := 0; i < len(src); i++ {
dst[i] = &(src[i])
}
return dst
}
// Int64ValueSlice converts a slice of int64 pointers into a slice of
// int64 values
func Int64ValueSlice(src []*int64) []int64 {
dst := make([]int64, len(src))
for i := 0; i < len(src); i++ {
if src[i] != nil {
dst[i] = *(src[i])
}
}
return dst
}
// Int64Map converts a string map of int64 values into a string
// map of int64 pointers
func Int64Map(src map[string]int64) map[string]*int64 {
dst := make(map[string]*int64)
for k, val := range src {
v := val
dst[k] = &v
}
return dst
}
// Int64ValueMap converts a string map of int64 pointers into a string
// map of int64 values
func Int64ValueMap(src map[string]*int64) map[string]int64 {
dst := make(map[string]int64)
for k, val := range src {
if val != nil {
dst[k] = *val
}
}
return dst
}
// Float64 returns a pointer to the float64 value passed in.
func Float64(v float64) *float64 {
return &v
}
// Float64Value returns the value of the float64 pointer passed in or
// 0 if the pointer is nil.
func Float64Value(v *float64) float64 {
if v != nil {
return *v
}
return 0
}
// Float64Slice converts a slice of float64 values into a slice of
// float64 pointers
func Float64Slice(src []float64) []*float64 {
dst := make([]*float64, len(src))
for i := 0; i < len(src); i++ {
dst[i] = &(src[i])
}
return dst
}
// Float64ValueSlice converts a slice of float64 pointers into a slice of
// float64 values
func Float64ValueSlice(src []*float64) []float64 {
dst := make([]float64, len(src))
for i := 0; i < len(src); i++ {
if src[i] != nil {
dst[i] = *(src[i])
}
}
return dst
}
// Float64Map converts a string map of float64 values into a string
// map of float64 pointers
func Float64Map(src map[string]float64) map[string]*float64 {
dst := make(map[string]*float64)
for k, val := range src {
v := val
dst[k] = &v
}
return dst
}
// Float64ValueMap converts a string map of float64 pointers into a string
// map of float64 values
func Float64ValueMap(src map[string]*float64) map[string]float64 {
dst := make(map[string]float64)
for k, val := range src {
if val != nil {
dst[k] = *val
}
}
return dst
}
// Time returns a pointer to the time.Time value passed in.
func Time(v time.Time) *time.Time {
return &v
}
// TimeValue returns the value of the time.Time pointer passed in or
// time.Time{} if the pointer is nil.
func TimeValue(v *time.Time) time.Time {
if v != nil {
return *v
}
return time.Time{}
}
// TimeUnixMilli returns a Unix timestamp in milliseconds from "January 1, 1970 UTC".
// The result is undefined if the Unix time cannot be represented by an int64.
// Which includes calling TimeUnixMilli on a zero Time is undefined.
//
// This utility is useful for service API's such as CloudWatch Logs which require
// their unix time values to be in milliseconds.
//
// See Go stdlib https://golang.org/pkg/time/#Time.UnixNano for more information.
func TimeUnixMilli(t time.Time) int64 {
return t.UnixNano() / int64(time.Millisecond/time.Nanosecond)
}
// TimeSlice converts a slice of time.Time values into a slice of
// time.Time pointers
func TimeSlice(src []time.Time) []*time.Time {
dst := make([]*time.Time, len(src))
for i := 0; i < len(src); i++ {
dst[i] = &(src[i])
}
return dst
}
// TimeValueSlice converts a slice of time.Time pointers into a slice of
// time.Time values
func TimeValueSlice(src []*time.Time) []time.Time {
dst := make([]time.Time, len(src))
for i := 0; i < len(src); i++ {
if src[i] != nil {
dst[i] = *(src[i])
}
}
return dst
}
// TimeMap converts a string map of time.Time values into a string
// map of time.Time pointers
func TimeMap(src map[string]time.Time) map[string]*time.Time {
dst := make(map[string]*time.Time)
for k, val := range src {
v := val
dst[k] = &v
}
return dst
}
// TimeValueMap converts a string map of time.Time pointers into a string
// map of time.Time values
func TimeValueMap(src map[string]*time.Time) map[string]time.Time {
dst := make(map[string]time.Time)
for k, val := range src {
if val != nil {
dst[k] = *val
}
}
return dst
}
================================================
FILE: 12fa-docker-golang/chapter11/vendor/github.com/aws/aws-sdk-go/aws/corehandlers/handlers.go
================================================
package corehandlers
import (
"bytes"
"fmt"
"io"
"io/ioutil"
"net/http"
"net/url"
"regexp"
"runtime"
"strconv"
"time"
"github.com/aws/aws-sdk-go/aws"
"github.com/aws/aws-sdk-go/aws/awserr"
"github.com/aws/aws-sdk-go/aws/credentials"
"github.com/aws/aws-sdk-go/aws/request"
)
// Interface for matching types which also have a Len method.
type lener interface {
Len() int
}
// BuildContentLengthHandler builds the content length of a request based on the body,
// or will use the HTTPRequest.Header's "Content-Length" if defined. If unable
// to determine request body length and no "Content-Length" was specified it will panic.
//
// The Content-Length will only be aded to the request if the length of the body
// is greater than 0. If the body is empty or the current `Content-Length`
// header is <= 0, the header will also be stripped.
var BuildContentLengthHandler = request.NamedHandler{Name: "core.BuildContentLengthHandler", Fn: func(r *request.Request) {
var length int64
if slength := r.HTTPRequest.Header.Get("Content-Length"); slength != "" {
length, _ = strconv.ParseInt(slength, 10, 64)
} else {
switch body := r.Body.(type) {
case nil:
length = 0
case lener:
length = int64(body.Len())
case io.Seeker:
r.BodyStart, _ = body.Seek(0, 1)
end, _ := body.Seek(0, 2)
body.Seek(r.BodyStart, 0) // make sure to seek back to original location
length = end - r.BodyStart
default:
panic("Cannot get length of body, must provide `ContentLength`")
}
}
if length > 0 {
r.HTTPRequest.ContentLength = length
r.HTTPRequest.Header.Set("Content-Length", fmt.Sprintf("%d", length))
} else {
r.HTTPRequest.ContentLength = 0
r.HTTPRequest.Header.Del("Content-Length")
}
}}
// SDKVersionUserAgentHandler is a request handler for adding the SDK Version to the user agent.
var SDKVersionUserAgentHandler = request.NamedHandler{
Name: "core.SDKVersionUserAgentHandler",
Fn: request.MakeAddToUserAgentHandler(aws.SDKName, aws.SDKVersion,
runtime.Version(), runtime.GOOS, runtime.GOARCH),
}
var reStatusCode = regexp.MustCompile(`^(\d{3})`)
// ValidateReqSigHandler is a request handler to ensure that the request's
// signature doesn't expire before it is sent. This can happen when a request
// is built and signed signficantly before it is sent. Or significant delays
// occur whne retrying requests that would cause the signature to expire.
var ValidateReqSigHandler = request.NamedHandler{
Name: "core.ValidateReqSigHandler",
Fn: func(r *request.Request) {
// Unsigned requests are not signed
if r.Config.Credentials == credentials.AnonymousCredentials {
return
}
signedTime := r.Time
if !r.LastSignedAt.IsZero() {
signedTime = r.LastSignedAt
}
// 10 minutes to allow for some clock skew/delays in transmission.
// Would be improved with aws/aws-sdk-go#423
if signedTime.Add(10 * time.Minute).After(time.Now()) {
return
}
fmt.Println("request expired, resigning")
r.Sign()
},
}
// SendHandler is a request handler to send service request using HTTP client.
var SendHandler = request.NamedHandler{Name: "core.SendHandler", Fn: func(r *request.Request) {
var err error
r.HTTPResponse, err = r.Config.HTTPClient.Do(r.HTTPRequest)
if err != nil {
// Prevent leaking if an HTTPResponse was returned. Clean up
// the body.
if r.HTTPResponse != nil {
r.HTTPResponse.Body.Close()
}
// Capture the case where url.Error is returned for error processing
// response. e.g. 301 without location header comes back as string
// error and r.HTTPResponse is nil. Other url redirect errors will
// comeback in a similar method.
if e, ok := err.(*url.Error); ok && e.Err != nil {
if s := reStatusCode.FindStringSubmatch(e.Err.Error()); s != nil {
code, _ := strconv.ParseInt(s[1], 10, 64)
r.HTTPResponse = &http.Response{
StatusCode: int(code),
Status: http.StatusText(int(code)),
Body: ioutil.NopCloser(bytes.NewReader([]byte{})),
}
return
}
}
if r.HTTPResponse == nil {
// Add a dummy request response object to ensure the HTTPResponse
// value is consistent.
r.HTTPResponse = &http.Response{
StatusCode: int(0),
Status: http.StatusText(int(0)),
Body: ioutil.NopCloser(bytes.NewReader([]byte{})),
}
}
// Catch all other request errors.
r.Error = awserr.New("RequestError", "send request failed", err)
r.Retryable = aws.Bool(true) // network errors are retryable
// Override the error with a context canceled error, if that was canceled.
ctx := r.Context()
select {
case <-ctx.Done():
r.Error = awserr.New(request.CanceledErrorCode,
"request context canceled", ctx.Err())
r.Retryable = aws.Bool(false)
default:
}
}
}}
// ValidateResponseHandler is a request handler to validate service response.
var ValidateResponseHandler = request.NamedHandler{Name: "core.ValidateResponseHandler", Fn: func(r *request.Request) {
if r.HTTPResponse.StatusCode == 0 || r.HTTPResponse.StatusCode >= 300 {
// this may be replaced by an UnmarshalError handler
r.Error = awserr.New("UnknownError", "unknown error", nil)
}
}}
// AfterRetryHandler performs final checks to determine if the request should
// be retried and how long to delay.
var AfterRetryHandler = request.NamedHandler{Name: "core.AfterRetryHandler", Fn: func(r *request.Request) {
// If one of the other handlers already set the retry state
// we don't want to override it based on the service's state
if r.Retryable == nil {
r.Retryable = aws.Bool(r.ShouldRetry(r))
}
if r.WillRetry() {
r.RetryDelay = r.RetryRules(r)
if sleepFn := r.Config.SleepDelay; sleepFn != nil {
// Support SleepDelay for backwards compatibility and testing
sleepFn(r.RetryDelay)
} else if err := aws.SleepWithContext(r.Context(), r.RetryDelay); err != nil {
r.Error = awserr.New(request.CanceledErrorCode,
"request context canceled", err)
r.Retryable = aws.Bool(false)
return
}
// when the expired token exception occurs the credentials
// need to be expired locally so that the next request to
// get credentials will trigger a credentials refresh.
if r.IsErrorExpired() {
r.Config.Credentials.Expire()
}
r.RetryCount++
r.Error = nil
}
}}
// ValidateEndpointHandler is a request handler to validate a request had the
// appropriate Region and Endpoint set. Will set r.Error if the endpoint or
// region is not valid.
var ValidateEndpointHandler = request.NamedHandler{Name: "core.ValidateEndpointHandler", Fn: func(r *request.Request) {
if r.ClientInfo.SigningRegion == "" && aws.StringValue(r.Config.Region) == "" {
r.Error = aws.ErrMissingRegion
} else if r.ClientInfo.Endpoint == "" {
r.Error = aws.ErrMissingEndpoint
}
}}
================================================
FILE: 12fa-docker-golang/chapter11/vendor/github.com/aws/aws-sdk-go/aws/corehandlers/param_validator.go
================================================
package corehandlers
import "github.com/aws/aws-sdk-go/aws/request"
// ValidateParametersHandler is a request handler to validate the input parameters.
// Validating parameters only has meaning if done prior to the request being sent.
var ValidateParametersHandler = request.NamedHandler{Name: "core.ValidateParametersHandler", Fn: func(r *request.Request) {
if !r.ParamsFilled() {
return
}
if v, ok := r.Params.(request.Validator); ok {
if err := v.Validate(); err != nil {
r.Error = err
}
}
}}
================================================
FILE: 12fa-docker-golang/chapter11/vendor/github.com/aws/aws-sdk-go/aws/credentials/chain_provider.go
================================================
package credentials
import (
"github.com/aws/aws-sdk-go/aws/awserr"
)
var (
// ErrNoValidProvidersFoundInChain Is returned when there are no valid
// providers in the ChainProvider.
//
// This has been deprecated. For verbose error messaging set
// aws.Config.CredentialsChainVerboseErrors to true
//
// @readonly
ErrNoValidProvidersFoundInChain = awserr.New("NoCredentialProviders",
`no valid providers in chain. Deprecated.
For verbose messaging see aws.Config.CredentialsChainVerboseErrors`,
nil)
)
// A ChainProvider will search for a provider which returns credentials
// and cache that provider until Retrieve is called again.
//
// The ChainProvider provides a way of chaining multiple providers together
// which will pick the first available using priority order of the Providers
// in the list.
//
// If none of the Providers retrieve valid credentials Value, ChainProvider's
// Retrieve() will return the error ErrNoValidProvidersFoundInChain.
//
// If a Provider is found which returns valid credentials Value ChainProvider
// will cache that Provider for all calls to IsExpired(), until Retrieve is
// called again.
//
// Example of ChainProvider to be used with an EnvProvider and EC2RoleProvider.
// In this example EnvProvider will first check if any credentials are available
// via the environment variables. If there are none ChainProvider will check
// the next Provider in the list, EC2RoleProvider in this case. If EC2RoleProvider
// does not return any credentials ChainProvider will return the error
// ErrNoValidProvidersFoundInChain
//
// creds := NewChainCredentials(
// []Provider{
// &EnvProvider{},
// &EC2RoleProvider{
// Client: ec2metadata.New(sess),
// },
// })
//
// // Usage of ChainCredentials with aws.Config
// svc := ec2.New(&aws.Config{Credentials: creds})
//
type ChainProvider struct {
Providers []Provider
curr Provider
VerboseErrors bool
}
// NewChainCredentials returns a pointer to a new Credentials object
// wrapping a chain of providers.
func NewChainCredentials(providers []Provider) *Credentials {
return NewCredentials(&ChainProvider{
Providers: append([]Provider{}, providers...),
})
}
// Retrieve returns the credentials value or error if no provider returned
// without error.
//
// If a provider is found it will be cached and any calls to IsExpired()
// will return the expired state of the cached provider.
func (c *ChainProvider) Retrieve() (Value, error) {
var errs []error
for _, p := range c.Providers {
creds, err := p.Retrieve()
if err == nil {
c.curr = p
return creds, nil
}
errs = append(errs, err)
}
c.curr = nil
var err error
err = ErrNoValidProvidersFoundInChain
if c.VerboseErrors {
err = awserr.NewBatchError("NoCredentialProviders", "no valid providers in chain", errs)
}
return Value{}, err
}
// IsExpired will returned the expired state of the currently cached provider
// if there is one. If there is no current provider, true will be returned.
func (c *ChainProvider) IsExpired() bool {
if c.curr != nil {
return c.curr.IsExpired()
}
return true
}
================================================
FILE: 12fa-docker-golang/chapter11/vendor/github.com/aws/aws-sdk-go/aws/credentials/credentials.go
================================================
// Package credentials provides credential retrieval and management
//
// The Credentials is the primary method of getting access to and managing
// credentials Values. Using dependency injection retrieval of the credential
// values is handled by a object which satisfies the Provider interface.
//
// By default the Credentials.Get() will cache the successful result of a
// Provider's Retrieve() until Provider.IsExpired() returns true. At which
// point Credentials will call Provider's Retrieve() to get new credential Value.
//
// The Provider is responsible for determining when credentials Value have expired.
// It is also important to note that Credentials will always call Retrieve the
// first time Credentials.Get() is called.
//
// Example of using the environment variable credentials.
//
// creds := NewEnvCredentials()
//
// // Retrieve the credentials value
// credValue, err := creds.Get()
// if err != nil {
// // handle error
// }
//
// Example of forcing credentials to expire and be refreshed on the next Get().
// This may be helpful to proactively expire credentials and refresh them sooner
// than they would naturally expire on their own.
//
// creds := NewCredentials(&EC2RoleProvider{})
// creds.Expire()
// credsValue, err := creds.Get()
// // New credentials will be retrieved instead of from cache.
//
//
// Custom Provider
//
// Each Provider built into this package also provides a helper method to generate
// a Credentials pointer setup with the provider. To use a custom Provider just
// create a type which satisfies the Provider interface and pass it to the
// NewCredentials method.
//
// type MyProvider struct{}
// func (m *MyProvider) Retrieve() (Value, error) {...}
// func (m *MyProvider) IsExpired() bool {...}
//
// creds := NewCredentials(&MyProvider{})
// credValue, err := creds.Get()
//
package credentials
import (
"sync"
"time"
)
// AnonymousCredentials is an empty Credential object that can be used as
// dummy placeholder credentials for requests that do not need signed.
//
// This Credentials can be used to configure a service to not sign requests
// when making service API calls. For example, when accessing public
// s3 buckets.
//
// svc := s3.New(&aws.Config{Credentials: AnonymousCredentials})
// // Access public S3 buckets.
//
// @readonly
var AnonymousCredentials = NewStaticCredentials("", "", "")
// A Value is the AWS credentials value for individual credential fields.
type Value struct {
// AWS Access key ID
AccessKeyID string
// AWS Secret Access Key
SecretAccessKey string
// AWS Session Token
SessionToken string
// Provider used to get credentials
ProviderName string
}
// A Provider is the interface for any component which will provide credentials
// Value. A provider is required to manage its own Expired state, and what to
// be expired means.
//
// The Provider should not need to implement its own mutexes, because
// that will be managed by Credentials.
type Provider interface {
// Retrieve returns nil if it successfully retrieved the value.
// Error is returned if the value were not obtainable, or empty.
Retrieve() (Value, error)
// IsExpired returns if the credentials are no longer valid, and need
// to be retrieved.
IsExpired() bool
}
// An ErrorProvider is a stub credentials provider that always returns an error
// this is used by the SDK when construction a known provider is not possible
// due to an error.
type ErrorProvider struct {
// The error to be returned from Retrieve
Err error
// The provider name to set on the Retrieved returned Value
ProviderName string
}
// Retrieve will always return the error that the ErrorProvider was created with.
func (p ErrorProvider) Retrieve() (Value, error) {
return Value{ProviderName: p.ProviderName}, p.Err
}
// IsExpired will always return not expired.
func (p ErrorProvider) IsExpired() bool {
return false
}
// A Expiry provides shared expiration logic to be used by credentials
// providers to implement expiry functionality.
//
// The best method to use this struct is as an anonymous field within the
// provider's struct.
//
// Example:
// type EC2RoleProvider struct {
// Expiry
// ...
// }
type Expiry struct {
// The date/time when to expire on
expiration time.Time
// If set will be used by IsExpired to determine the current time.
// Defaults to time.Now if CurrentTime is not set. Available for testing
// to be able to mock out the current time.
CurrentTime func() time.Time
}
// SetExpiration sets the expiration IsExpired will check when called.
//
// If window is greater than 0 the expiration time will be reduced by the
// window value.
//
// Using a window is helpful to trigger credentials to expire sooner than
// the expiration time given to ensure no requests are made with expired
// tokens.
func (e *Expiry) SetExpiration(expiration time.Time, window time.Duration) {
e.expiration = expiration
if window > 0 {
e.expiration = e.expiration.Add(-window)
}
}
// IsExpired returns if the credentials are expired.
func (e *Expiry) IsExpired() bool {
if e.CurrentTime == nil {
e.CurrentTime = time.Now
}
return e.expiration.Before(e.CurrentTime())
}
// A Credentials provides synchronous safe retrieval of AWS credentials Value.
// Credentials will cache the credentials value until they expire. Once the value
// expires the next Get will attempt to retrieve valid credentials.
//
// Credentials is safe to use across multiple goroutines and will manage the
// synchronous state so the Providers do not need to implement their own
// synchronization.
//
// The first Credentials.Get() will always call Provider.Retrieve() to get the
// first instance of the credentials Value. All calls to Get() after that
// will return the cached credentials Value until IsExpired() returns true.
type Credentials struct {
creds Value
forceRefresh bool
m sync.Mutex
provider Provider
}
// NewCredentials returns a pointer to a new Credentials with the provider set.
func NewCredentials(provider Provider) *Credentials {
return &Credentials{
provider: provider,
forceRefresh: true,
}
}
// Get returns the credentials value, or error if the credentials Value failed
// to be retrieved.
//
// Will return the cached credentials Value if it has not expired. If the
// credentials Value has expired the Provider's Retrieve() will be called
// to refresh the credentials.
//
// If Credentials.Expire() was called the credentials Value will be force
// expired, and the next call to Get() will cause them to be refreshed.
func (c *Credentials) Get() (Value, error) {
c.m.Lock()
defer c.m.Unlock()
if c.isExpired() {
creds, err := c.provider.Retrieve()
if err != nil {
return Value{}, err
}
c.creds = creds
c.forceRefresh = false
}
return c.creds, nil
}
// Expire expires the credentials and forces them to be retrieved on the
// next call to Get().
//
// This will override the Provider's expired state, and force Credentials
// to call the Provider's Retrieve().
func (c *Credentials) Expire() {
c.m.Lock()
defer c.m.Unlock()
c.forceRefresh = true
}
// IsExpired returns if the credentials are no longer valid, and need
// to be retrieved.
//
// If the Credentials were forced to be expired with Expire() this will
// reflect that override.
func (c *Credentials) IsExpired() bool {
c.m.Lock()
defer c.m.Unlock()
return c.isExpired()
}
// isExpired helper method wrapping the definition of expired credentials.
func (c *Credentials) isExpired() bool {
return c.forceRefresh || c.provider.IsExpired()
}
================================================
FILE: 12fa-docker-golang/chapter11/vendor/github.com/aws/aws-sdk-go/aws/credentials/ec2rolecreds/ec2_role_provider.go
================================================
package ec2rolecreds
import (
"bufio"
"encoding/json"
"fmt"
"path"
"strings"
"time"
"github.com/aws/aws-sdk-go/aws/awserr"
"github.com/aws/aws-sdk-go/aws/client"
"github.com/aws/aws-sdk-go/aws/credentials"
"github.com/aws/aws-sdk-go/aws/ec2metadata"
)
// ProviderName provides a name of EC2Role provider
const ProviderName = "EC2RoleProvider"
// A EC2RoleProvider retrieves credentials from the EC2 service, and keeps track if
// those credentials are expired.
//
// Example how to configure the EC2RoleProvider with custom http Client, Endpoint
// or ExpiryWindow
//
// p := &ec2rolecreds.EC2RoleProvider{
// // Pass in a custom timeout to be used when requesting
// // IAM EC2 Role credentials.
// Client: ec2metadata.New(sess, aws.Config{
// HTTPClient: &http.Client{Timeout: 10 * time.Second},
// }),
//
// // Do not use early expiry of credentials. If a non zero value is
// // specified the credentials will be expired early
// ExpiryWindow: 0,
// }
type EC2RoleProvider struct {
credentials.Expiry
// Required EC2Metadata client to use when connecting to EC2 metadata service.
Client *ec2metadata.EC2Metadata
// ExpiryWindow will allow the credentials to trigger refreshing prior to
// the credentials actually expiring. This is beneficial so race conditions
// with expiring credentials do not cause request to fail unexpectedly
// due to ExpiredTokenException exceptions.
//
// So a ExpiryWindow of 10s would cause calls to IsExpired() to return true
// 10 seconds before the credentials are actually expired.
//
// If ExpiryWindow is 0 or less it will be ignored.
ExpiryWindow time.Duration
}
// NewCredentials returns a pointer to a new Credentials object wrapping
// the EC2RoleProvider. Takes a ConfigProvider to create a EC2Metadata client.
// The ConfigProvider is satisfied by the session.Session type.
func NewCredentials(c client.ConfigProvider, options ...func(*EC2RoleProvider)) *credentials.Credentials {
p := &EC2RoleProvider{
Client: ec2metadata.New(c),
}
for _, option := range options {
option(p)
}
return credentials.NewCredentials(p)
}
// NewCredentialsWithClient returns a pointer to a new Credentials object wrapping
// the EC2RoleProvider. Takes a EC2Metadata client to use when connecting to EC2
// metadata service.
func NewCredentialsWithClient(client *ec2metadata.EC2Metadata, options ...func(*EC2RoleProvider)) *credentials.Credentials {
p := &EC2RoleProvider{
Client: client,
}
for _, option := range options {
option(p)
}
return credentials.NewCredentials(p)
}
// Retrieve retrieves credentials from the EC2 service.
// Error will be returned if the request fails, or unable to extract
// the desired credentials.
func (m *EC2RoleProvider) Retrieve() (credentials.Value, error) {
credsList, err := requestCredList(m.Client)
if err != nil {
return credentials.Value{ProviderName: ProviderName}, err
}
if len(credsList) == 0 {
return credentials.Value{ProviderName: ProviderName}, awserr.New("EmptyEC2RoleList", "empty EC2 Role list", nil)
}
credsName := credsList[0]
roleCreds, err := requestCred(m.Client, credsName)
if err != nil {
return credentials.Value{ProviderName: ProviderName}, err
}
m.SetExpiration(roleCreds.Expiration, m.ExpiryWindow)
return credentials.Value{
AccessKeyID: roleCreds.AccessKeyID,
SecretAccessKey: roleCreds.SecretAccessKey,
SessionToken: roleCreds.Token,
ProviderName: ProviderName,
}, nil
}
// A ec2RoleCredRespBody provides the shape for unmarshaling credential
// request responses.
type ec2RoleCredRespBody struct {
// Success State
Expiration time.Time
AccessKeyID string
SecretAccessKey string
Token string
// Error state
Code string
Message string
}
const iamSecurityCredsPath = "/iam/security-credentials"
// requestCredList requests a list of credentials from the EC2 service.
// If there are no credentials, or there is an error making or receiving the request
func requestCredList(client *ec2metadata.EC2Metadata) ([]string, error) {
resp, err := client.GetMetadata(iamSecurityCredsPath)
if err != nil {
return nil, awserr.New("EC2RoleRequestError", "no EC2 instance role found", err)
}
credsList := []string{}
s := bufio.NewScanner(strings.NewReader(resp))
for s.Scan() {
credsList = append(credsList, s.Text())
}
if err := s.Err(); err != nil {
return nil, awserr.New("SerializationError", "failed to read EC2 instance role from metadata service", err)
}
return credsList, nil
}
// requestCred requests the credentials for a specific credentials from the EC2 service.
//
// If the credentials cannot be found, or there is an error reading the response
// and error will be returned.
func requestCred(client *ec2metadata.EC2Metadata, credsName string) (ec2RoleCredRespBody, error) {
resp, err := client.GetMetadata(path.Join(iamSecurityCredsPath, credsName))
if err != nil {
return ec2RoleCredRespBody{},
awserr.New("EC2RoleRequestError",
fmt.Sprintf("failed to get %s EC2 instance role credentials", credsName),
err)
}
respCreds := ec2RoleCredRespBody{}
if err := json.NewDecoder(strings.NewReader(resp)).Decode(&respCreds); err != nil {
return ec2RoleCredRespBody{},
awserr.New("SerializationError",
fmt.Sprintf("failed to decode %s EC2 instance role credentials", credsName),
err)
}
if respCreds.Code != "Success" {
// If an error code was returned something failed requesting the role.
return ec2RoleCredRespBody{}, awserr.New(respCreds.Code, respCreds.Message, nil)
}
return respCreds, nil
}
================================================
FILE: 12fa-docker-golang/chapter11/vendor/github.com/aws/aws-sdk-go/aws/credentials/endpointcreds/provider.go
================================================
// Package endpointcreds provides support for retrieving credentials from an
// arbitrary HTTP endpoint.
//
// The credentials endpoint Provider can receive both static and refreshable
// credentials that will expire. Credentials are static when an "Expiration"
// value is not provided in the endpoint's response.
//
// Static credentials will never expire once they have been retrieved. The format
// of the static credentials response:
// {
// "AccessKeyId" : "MUA...",
// "SecretAccessKey" : "/7PC5om....",
// }
//
// Refreshable credentials will expire within the "ExpiryWindow" of the Expiration
// value in the response. The format of the refreshable credentials response:
// {
// "AccessKeyId" : "MUA...",
// "SecretAccessKey" : "/7PC5om....",
// "Token" : "AQoDY....=",
// "Expiration" : "2016-02-25T06:03:31Z"
// }
//
// Errors should be returned in the following format and only returned with 400
// or 500 HTTP status codes.
// {
// "code": "ErrorCode",
// "message": "Helpful error message."
// }
package endpointcreds
import (
"encoding/json"
"time"
"github.com/aws/aws-sdk-go/aws"
"github.com/aws/aws-sdk-go/aws/awserr"
"github.com/aws/aws-sdk-go/aws/client"
"github.com/aws/aws-sdk-go/aws/client/metadata"
"github.com/aws/aws-sdk-go/aws/credentials"
"github.com/aws/aws-sdk-go/aws/request"
)
// ProviderName is the name of the credentials provider.
const ProviderName = `CredentialsEndpointProvider`
// Provider satisfies the credentials.Provider interface, and is a client to
// retrieve credentials from an arbitrary endpoint.
type Provider struct {
staticCreds bool
credentials.Expiry
// Requires a AWS Client to make HTTP requests to the endpoint with.
// the Endpoint the request will be made to is provided by the aws.Config's
// Endpoint value.
Client *client.Client
// ExpiryWindow will allow the credentials to trigger refreshing prior to
// the credentials actually expiring. This is beneficial so race conditions
// with expiring credentials do not cause request to fail unexpectedly
// due to ExpiredTokenException exceptions.
//
// So a ExpiryWindow of 10s would cause calls to IsExpired() to return true
// 10 seconds before the credentials are actually expired.
//
// If ExpiryWindow is 0 or less it will be ignored.
ExpiryWindow time.Duration
}
// NewProviderClient returns a credentials Provider for retrieving AWS credentials
// from arbitrary endpoint.
func NewProviderClient(cfg aws.Config, handlers request.Handlers, endpoint string, options ...func(*Provider)) credentials.Provider {
p := &Provider{
Client: client.New(
cfg,
metadata.ClientInfo{
ServiceName: "CredentialsEndpoint",
Endpoint: endpoint,
},
handlers,
),
}
p.Client.Handlers.Unmarshal.PushBack(unmarshalHandler)
p.Client.H
gitextract_czb9adhq/
├── 12fa-docker-golang/
│ ├── README.md
│ ├── chapter1/
│ │ ├── apiservice/
│ │ │ └── apiservice.go
│ │ ├── main.go
│ │ ├── run
│ │ ├── subpackage1.go
│ │ └── vendor/
│ │ ├── github.com/
│ │ │ └── namsral/
│ │ │ └── flag/
│ │ │ ├── LICENSE
│ │ │ ├── examples/
│ │ │ │ └── gopher.go
│ │ │ └── flag.go
│ │ └── manifest
│ ├── chapter11/
│ │ ├── main.go
│ │ ├── run
│ │ └── vendor/
│ │ ├── github.com/
│ │ │ ├── apex/
│ │ │ │ └── log/
│ │ │ │ ├── LICENSE
│ │ │ │ ├── default.go
│ │ │ │ ├── doc.go
│ │ │ │ ├── entry.go
│ │ │ │ ├── handlers/
│ │ │ │ │ ├── cli/
│ │ │ │ │ │ └── cli.go
│ │ │ │ │ ├── discard/
│ │ │ │ │ │ └── discard.go
│ │ │ │ │ ├── es/
│ │ │ │ │ │ └── es.go
│ │ │ │ │ ├── graylog/
│ │ │ │ │ │ └── graylog.go
│ │ │ │ │ ├── json/
│ │ │ │ │ │ └── json.go
│ │ │ │ │ ├── kinesis/
│ │ │ │ │ │ └── kinesis.go
│ │ │ │ │ ├── level/
│ │ │ │ │ │ └── level.go
│ │ │ │ │ ├── logfmt/
│ │ │ │ │ │ └── logfmt.go
│ │ │ │ │ ├── memory/
│ │ │ │ │ │ └── memory.go
│ │ │ │ │ ├── multi/
│ │ │ │ │ │ └── multi.go
│ │ │ │ │ ├── papertrail/
│ │ │ │ │ │ └── papertrail.go
│ │ │ │ │ └── text/
│ │ │ │ │ └── text.go
│ │ │ │ ├── interface.go
│ │ │ │ ├── levels.go
│ │ │ │ ├── logger.go
│ │ │ │ ├── pkg.go
│ │ │ │ └── stack.go
│ │ │ ├── aphistic/
│ │ │ │ └── golf/
│ │ │ │ ├── LICENSE
│ │ │ │ ├── chunker.go
│ │ │ │ ├── client.go
│ │ │ │ ├── json.go
│ │ │ │ ├── log.go
│ │ │ │ ├── log_default.go
│ │ │ │ ├── logger.go
│ │ │ │ ├── main.go
│ │ │ │ └── message.go
│ │ │ ├── aws/
│ │ │ │ └── aws-sdk-go/
│ │ │ │ ├── aws/
│ │ │ │ │ ├── LICENSE.txt
│ │ │ │ │ ├── awserr/
│ │ │ │ │ │ ├── error.go
│ │ │ │ │ │ └── types.go
│ │ │ │ │ ├── awsutil/
│ │ │ │ │ │ ├── copy.go
│ │ │ │ │ │ ├── equal.go
│ │ │ │ │ │ ├── path_value.go
│ │ │ │ │ │ ├── prettify.go
│ │ │ │ │ │ └── string_value.go
│ │ │ │ │ ├── client/
│ │ │ │ │ │ ├── client.go
│ │ │ │ │ │ ├── default_retryer.go
│ │ │ │ │ │ └── metadata/
│ │ │ │ │ │ └── client_info.go
│ │ │ │ │ ├── config.go
│ │ │ │ │ ├── context.go
│ │ │ │ │ ├── context_1_6.go
│ │ │ │ │ ├── context_1_7.go
│ │ │ │ │ ├── convert_types.go
│ │ │ │ │ ├── corehandlers/
│ │ │ │ │ │ ├── handlers.go
│ │ │ │ │ │ └── param_validator.go
│ │ │ │ │ ├── credentials/
│ │ │ │ │ │ ├── chain_provider.go
│ │ │ │ │ │ ├── credentials.go
│ │ │ │ │ │ ├── ec2rolecreds/
│ │ │ │ │ │ │ └── ec2_role_provider.go
│ │ │ │ │ │ ├── endpointcreds/
│ │ │ │ │ │ │ └── provider.go
│ │ │ │ │ │ ├── env_provider.go
│ │ │ │ │ │ ├── shared_credentials_provider.go
│ │ │ │ │ │ ├── static_provider.go
│ │ │ │ │ │ └── stscreds/
│ │ │ │ │ │ └── assume_role_provider.go
│ │ │ │ │ ├── defaults/
│ │ │ │ │ │ └── defaults.go
│ │ │ │ │ ├── ec2metadata/
│ │ │ │ │ │ ├── api.go
│ │ │ │ │ │ └── service.go
│ │ │ │ │ ├── endpoints/
│ │ │ │ │ │ ├── decode.go
│ │ │ │ │ │ ├── defaults.go
│ │ │ │ │ │ ├── doc.go
│ │ │ │ │ │ ├── endpoints.go
│ │ │ │ │ │ ├── v3model.go
│ │ │ │ │ │ └── v3model_codegen.go
│ │ │ │ │ ├── errors.go
│ │ │ │ │ ├── jsonvalue.go
│ │ │ │ │ ├── logger.go
│ │ │ │ │ ├── request/
│ │ │ │ │ │ ├── handlers.go
│ │ │ │ │ │ ├── http_request.go
│ │ │ │ │ │ ├── offset_reader.go
│ │ │ │ │ │ ├── request.go
│ │ │ │ │ │ ├── request_1_7.go
│ │ │ │ │ │ ├── request_1_8.go
│ │ │ │ │ │ ├── request_context.go
│ │ │ │ │ │ ├── request_context_1_6.go
│ │ │ │ │ │ ├── request_pagination.go
│ │ │ │ │ │ ├── retryer.go
│ │ │ │ │ │ ├── serialization_error.go
│ │ │ │ │ │ ├── serialization_error_appengine.go
│ │ │ │ │ │ ├── timeout_read_closer.go
│ │ │ │ │ │ ├── validation.go
│ │ │ │ │ │ └── waiter.go
│ │ │ │ │ ├── session/
│ │ │ │ │ │ ├── doc.go
│ │ │ │ │ │ ├── env_config.go
│ │ │ │ │ │ ├── session.go
│ │ │ │ │ │ └── shared_config.go
│ │ │ │ │ ├── signer/
│ │ │ │ │ │ └── v4/
│ │ │ │ │ │ ├── header_rules.go
│ │ │ │ │ │ ├── options.go
│ │ │ │ │ │ ├── uri_path.go
│ │ │ │ │ │ └── v4.go
│ │ │ │ │ ├── types.go
│ │ │ │ │ ├── url.go
│ │ │ │ │ ├── url_1_7.go
│ │ │ │ │ └── version.go
│ │ │ │ ├── private/
│ │ │ │ │ └── protocol/
│ │ │ │ │ ├── LICENSE.txt
│ │ │ │ │ ├── ec2query/
│ │ │ │ │ │ ├── build.go
│ │ │ │ │ │ └── unmarshal.go
│ │ │ │ │ ├── idempotency.go
│ │ │ │ │ ├── json/
│ │ │ │ │ │ └── jsonutil/
│ │ │ │ │ │ ├── build.go
│ │ │ │ │ │ └── unmarshal.go
│ │ │ │ │ ├── jsonrpc/
│ │ │ │ │ │ └── jsonrpc.go
│ │ │ │ │ ├── query/
│ │ │ │ │ │ ├── build.go
│ │ │ │ │ │ ├── queryutil/
│ │ │ │ │ │ │ └── queryutil.go
│ │ │ │ │ │ ├── unmarshal.go
│ │ │ │ │ │ └── unmarshal_error.go
│ │ │ │ │ ├── rest/
│ │ │ │ │ │ ├── build.go
│ │ │ │ │ │ ├── payload.go
│ │ │ │ │ │ └── unmarshal.go
│ │ │ │ │ ├── restjson/
│ │ │ │ │ │ └── restjson.go
│ │ │ │ │ ├── restxml/
│ │ │ │ │ │ └── restxml.go
│ │ │ │ │ ├── unmarshal.go
│ │ │ │ │ └── xml/
│ │ │ │ │ └── xmlutil/
│ │ │ │ │ ├── build.go
│ │ │ │ │ ├── unmarshal.go
│ │ │ │ │ └── xml_to_struct.go
│ │ │ │ ├── service/
│ │ │ │ │ ├── kinesis/
│ │ │ │ │ │ ├── LICENSE.txt
│ │ │ │ │ │ ├── api.go
│ │ │ │ │ │ ├── customizations.go
│ │ │ │ │ │ ├── errors.go
│ │ │ │ │ │ ├── kinesisiface/
│ │ │ │ │ │ │ └── interface.go
│ │ │ │ │ │ ├── service.go
│ │ │ │ │ │ └── waiters.go
│ │ │ │ │ └── sts/
│ │ │ │ │ ├── LICENSE.txt
│ │ │ │ │ ├── api.go
│ │ │ │ │ ├── customizations.go
│ │ │ │ │ ├── errors.go
│ │ │ │ │ ├── service.go
│ │ │ │ │ └── stsiface/
│ │ │ │ │ └── interface.go
│ │ │ │ └── vendor/
│ │ │ │ └── github.com/
│ │ │ │ ├── go-ini/
│ │ │ │ │ └── ini/
│ │ │ │ │ ├── LICENSE.txt
│ │ │ │ │ ├── error.go
│ │ │ │ │ ├── ini.go
│ │ │ │ │ ├── key.go
│ │ │ │ │ ├── parser.go
│ │ │ │ │ ├── section.go
│ │ │ │ │ └── struct.go
│ │ │ │ └── jmespath/
│ │ │ │ └── go-jmespath/
│ │ │ │ ├── LICENSE.txt
│ │ │ │ ├── api.go
│ │ │ │ ├── astnodetype_string.go
│ │ │ │ ├── functions.go
│ │ │ │ ├── fuzz/
│ │ │ │ │ └── jmespath.go
│ │ │ │ ├── interpreter.go
│ │ │ │ ├── lexer.go
│ │ │ │ ├── parser.go
│ │ │ │ ├── toktype_string.go
│ │ │ │ └── util.go
│ │ │ ├── go-logfmt/
│ │ │ │ └── logfmt/
│ │ │ │ ├── LICENSE
│ │ │ │ ├── decode.go
│ │ │ │ ├── doc.go
│ │ │ │ ├── encode.go
│ │ │ │ ├── fuzz.go
│ │ │ │ └── jsonstring.go
│ │ │ ├── jpillora/
│ │ │ │ └── backoff/
│ │ │ │ ├── LICENSE
│ │ │ │ └── backoff.go
│ │ │ ├── kr/
│ │ │ │ └── logfmt/
│ │ │ │ ├── decode.go
│ │ │ │ ├── scanner.go
│ │ │ │ └── unquote.go
│ │ │ ├── pkg/
│ │ │ │ └── errors/
│ │ │ │ ├── LICENSE
│ │ │ │ ├── errors.go
│ │ │ │ └── stack.go
│ │ │ ├── rogpeppe/
│ │ │ │ └── fastuuid/
│ │ │ │ ├── LICENSE
│ │ │ │ └── uuid.go
│ │ │ ├── satori/
│ │ │ │ └── go.uuid/
│ │ │ │ ├── LICENSE
│ │ │ │ └── uuid.go
│ │ │ └── tj/
│ │ │ ├── go-elastic/
│ │ │ │ └── batch/
│ │ │ │ └── batch.go
│ │ │ └── go-kinesis/
│ │ │ ├── LICENSE
│ │ │ ├── config.go
│ │ │ └── kinesis.go
│ │ └── manifest
│ ├── chapter2/
│ │ ├── run
│ │ └── vendor/
│ │ ├── github.com/
│ │ │ └── namsral/
│ │ │ └── flag/
│ │ │ ├── LICENSE
│ │ │ ├── examples/
│ │ │ │ └── gopher.go
│ │ │ └── flag.go
│ │ └── manifest
│ ├── chapter3/
│ │ ├── flags/
│ │ │ ├── flags.go
│ │ │ ├── run
│ │ │ └── vendor/
│ │ │ ├── github.com/
│ │ │ │ └── namsral/
│ │ │ │ └── flag/
│ │ │ │ ├── LICENSE
│ │ │ │ ├── examples/
│ │ │ │ │ └── gopher.go
│ │ │ │ ├── extras.go
│ │ │ │ └── flag.go
│ │ │ └── manifest
│ │ ├── godotenv/
│ │ │ ├── flags.go
│ │ │ ├── run
│ │ │ └── vendor/
│ │ │ ├── github.com/
│ │ │ │ ├── joho/
│ │ │ │ │ └── godotenv/
│ │ │ │ │ ├── LICENCE
│ │ │ │ │ ├── autoload/
│ │ │ │ │ │ └── autoload.go
│ │ │ │ │ ├── cmd/
│ │ │ │ │ │ └── godotenv/
│ │ │ │ │ │ └── cmd.go
│ │ │ │ │ └── godotenv.go
│ │ │ │ └── namsral/
│ │ │ │ └── flag/
│ │ │ │ ├── LICENSE
│ │ │ │ ├── examples/
│ │ │ │ │ └── gopher.go
│ │ │ │ ├── extras.go
│ │ │ │ └── flag.go
│ │ │ └── manifest
│ │ └── viper/
│ │ ├── main.go
│ │ ├── run
│ │ ├── run_with_env
│ │ └── vendor/
│ │ ├── github.com/
│ │ │ ├── armon/
│ │ │ │ └── consul-api/
│ │ │ │ ├── LICENSE
│ │ │ │ ├── acl.go
│ │ │ │ ├── agent.go
│ │ │ │ ├── api.go
│ │ │ │ ├── catalog.go
│ │ │ │ ├── event.go
│ │ │ │ ├── health.go
│ │ │ │ ├── kv.go
│ │ │ │ ├── session.go
│ │ │ │ └── status.go
│ │ │ ├── coreos/
│ │ │ │ └── go-etcd/
│ │ │ │ └── etcd/
│ │ │ │ ├── LICENSE
│ │ │ │ ├── add_child.go
│ │ │ │ ├── client.go
│ │ │ │ ├── cluster.go
│ │ │ │ ├── compare_and_delete.go
│ │ │ │ ├── compare_and_swap.go
│ │ │ │ ├── debug.go
│ │ │ │ ├── delete.go
│ │ │ │ ├── error.go
│ │ │ │ ├── get.go
│ │ │ │ ├── member.go
│ │ │ │ ├── options.go
│ │ │ │ ├── requests.go
│ │ │ │ ├── response.generated.go
│ │ │ │ ├── response.go
│ │ │ │ ├── set_update_create.go
│ │ │ │ ├── shuffle.go
│ │ │ │ ├── version.go
│ │ │ │ └── watch.go
│ │ │ ├── fsnotify/
│ │ │ │ └── fsnotify/
│ │ │ │ ├── LICENSE
│ │ │ │ ├── fen.go
│ │ │ │ ├── fsnotify.go
│ │ │ │ ├── inotify.go
│ │ │ │ ├── inotify_poller.go
│ │ │ │ ├── kqueue.go
│ │ │ │ ├── open_mode_bsd.go
│ │ │ │ ├── open_mode_darwin.go
│ │ │ │ └── windows.go
│ │ │ ├── hashicorp/
│ │ │ │ └── hcl/
│ │ │ │ ├── LICENSE
│ │ │ │ ├── decoder.go
│ │ │ │ ├── hcl/
│ │ │ │ │ ├── ast/
│ │ │ │ │ │ ├── ast.go
│ │ │ │ │ │ └── walk.go
│ │ │ │ │ ├── fmtcmd/
│ │ │ │ │ │ └── fmtcmd.go
│ │ │ │ │ ├── parser/
│ │ │ │ │ │ ├── error.go
│ │ │ │ │ │ └── parser.go
│ │ │ │ │ ├── printer/
│ │ │ │ │ │ ├── nodes.go
│ │ │ │ │ │ └── printer.go
│ │ │ │ │ ├── scanner/
│ │ │ │ │ │ └── scanner.go
│ │ │ │ │ ├── strconv/
│ │ │ │ │ │ └── quote.go
│ │ │ │ │ └── token/
│ │ │ │ │ ├── position.go
│ │ │ │ │ └── token.go
│ │ │ │ ├── hcl.go
│ │ │ │ ├── json/
│ │ │ │ │ ├── parser/
│ │ │ │ │ │ ├── flatten.go
│ │ │ │ │ │ └── parser.go
│ │ │ │ │ ├── scanner/
│ │ │ │ │ │ └── scanner.go
│ │ │ │ │ └── token/
│ │ │ │ │ ├── position.go
│ │ │ │ │ └── token.go
│ │ │ │ ├── lex.go
│ │ │ │ ├── parse.go
│ │ │ │ └── testhelper/
│ │ │ │ └── unix2dos.go
│ │ │ ├── kr/
│ │ │ │ └── fs/
│ │ │ │ ├── LICENSE
│ │ │ │ ├── filesystem.go
│ │ │ │ └── walk.go
│ │ │ ├── magiconair/
│ │ │ │ └── properties/
│ │ │ │ ├── LICENSE
│ │ │ │ ├── assert/
│ │ │ │ │ └── assert.go
│ │ │ │ ├── decode.go
│ │ │ │ ├── doc.go
│ │ │ │ ├── integrate.go
│ │ │ │ ├── lex.go
│ │ │ │ ├── load.go
│ │ │ │ ├── parser.go
│ │ │ │ ├── properties.go
│ │ │ │ └── rangecheck.go
│ │ │ ├── mitchellh/
│ │ │ │ └── mapstructure/
│ │ │ │ ├── LICENSE
│ │ │ │ ├── decode_hooks.go
│ │ │ │ ├── error.go
│ │ │ │ └── mapstructure.go
│ │ │ ├── pelletier/
│ │ │ │ ├── go-buffruneio/
│ │ │ │ │ └── buffruneio.go
│ │ │ │ └── go-toml/
│ │ │ │ ├── LICENSE
│ │ │ │ ├── cmd/
│ │ │ │ │ ├── test_program.go
│ │ │ │ │ ├── tomljson/
│ │ │ │ │ │ └── main.go
│ │ │ │ │ └── tomll/
│ │ │ │ │ └── main.go
│ │ │ │ ├── doc.go
│ │ │ │ ├── keysparsing.go
│ │ │ │ ├── lexer.go
│ │ │ │ ├── marshal.go
│ │ │ │ ├── match.go
│ │ │ │ ├── parser.go
│ │ │ │ ├── position.go
│ │ │ │ ├── query.go
│ │ │ │ ├── querylexer.go
│ │ │ │ ├── queryparser.go
│ │ │ │ ├── token.go
│ │ │ │ ├── toml.go
│ │ │ │ ├── tomltree_create.go
│ │ │ │ └── tomltree_write.go
│ │ │ ├── pkg/
│ │ │ │ ├── errors/
│ │ │ │ │ ├── LICENSE
│ │ │ │ │ ├── errors.go
│ │ │ │ │ └── stack.go
│ │ │ │ └── sftp/
│ │ │ │ ├── LICENSE
│ │ │ │ ├── attrs.go
│ │ │ │ ├── attrs_stubs.go
│ │ │ │ ├── attrs_unix.go
│ │ │ │ ├── client.go
│ │ │ │ ├── conn.go
│ │ │ │ ├── debug.go
│ │ │ │ ├── examples/
│ │ │ │ │ ├── buffered-read-benchmark/
│ │ │ │ │ │ └── main.go
│ │ │ │ │ ├── buffered-write-benchmark/
│ │ │ │ │ │ └── main.go
│ │ │ │ │ ├── request-server/
│ │ │ │ │ │ └── main.go
│ │ │ │ │ ├── sftp-server/
│ │ │ │ │ │ └── main.go
│ │ │ │ │ ├── streaming-read-benchmark/
│ │ │ │ │ │ └── main.go
│ │ │ │ │ └── streaming-write-benchmark/
│ │ │ │ │ └── main.go
│ │ │ │ ├── match.go
│ │ │ │ ├── packet-manager.go
│ │ │ │ ├── packet-manager_go1.8.go
│ │ │ │ ├── packet-manager_legacy.go
│ │ │ │ ├── packet-typing.go
│ │ │ │ ├── packet.go
│ │ │ │ ├── release.go
│ │ │ │ ├── request-example.go
│ │ │ │ ├── request-interfaces.go
│ │ │ │ ├── request-server.go
│ │ │ │ ├── request-unix.go
│ │ │ │ ├── request.go
│ │ │ │ ├── request_windows.go
│ │ │ │ ├── server.go
│ │ │ │ ├── server_standalone/
│ │ │ │ │ └── main.go
│ │ │ │ ├── server_statvfs_darwin.go
│ │ │ │ ├── server_statvfs_impl.go
│ │ │ │ ├── server_statvfs_linux.go
│ │ │ │ ├── server_statvfs_stubs.go
│ │ │ │ ├── server_stubs.go
│ │ │ │ ├── server_unix.go
│ │ │ │ └── sftp.go
│ │ │ ├── spf13/
│ │ │ │ ├── afero/
│ │ │ │ │ ├── LICENSE.txt
│ │ │ │ │ ├── afero.go
│ │ │ │ │ ├── basepath.go
│ │ │ │ │ ├── cacheOnReadFs.go
│ │ │ │ │ ├── const_bsds.go
│ │ │ │ │ ├── const_win_unix.go
│ │ │ │ │ ├── copyOnWriteFs.go
│ │ │ │ │ ├── httpFs.go
│ │ │ │ │ ├── ioutil.go
│ │ │ │ │ ├── mem/
│ │ │ │ │ │ ├── dir.go
│ │ │ │ │ │ ├── dirmap.go
│ │ │ │ │ │ └── file.go
│ │ │ │ │ ├── memmap.go
│ │ │ │ │ ├── memradix.go
│ │ │ │ │ ├── os.go
│ │ │ │ │ ├── path.go
│ │ │ │ │ ├── readonlyfs.go
│ │ │ │ │ ├── regexpfs.go
│ │ │ │ │ ├── sftpfs/
│ │ │ │ │ │ ├── file.go
│ │ │ │ │ │ └── sftp.go
│ │ │ │ │ ├── unionFile.go
│ │ │ │ │ └── util.go
│ │ │ │ ├── cast/
│ │ │ │ │ ├── LICENSE
│ │ │ │ │ ├── cast.go
│ │ │ │ │ └── caste.go
│ │ │ │ ├── jwalterweatherman/
│ │ │ │ │ ├── LICENSE
│ │ │ │ │ ├── default_notepad.go
│ │ │ │ │ ├── log_counter.go
│ │ │ │ │ └── notepad.go
│ │ │ │ ├── pflag/
│ │ │ │ │ ├── LICENSE
│ │ │ │ │ ├── bool.go
│ │ │ │ │ ├── bool_slice.go
│ │ │ │ │ ├── count.go
│ │ │ │ │ ├── duration.go
│ │ │ │ │ ├── flag.go
│ │ │ │ │ ├── float32.go
│ │ │ │ │ ├── float64.go
│ │ │ │ │ ├── golangflag.go
│ │ │ │ │ ├── int.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
│ │ │ │ └── viper/
│ │ │ │ ├── LICENSE
│ │ │ │ ├── flags.go
│ │ │ │ ├── remote/
│ │ │ │ │ └── remote.go
│ │ │ │ ├── util.go
│ │ │ │ └── viper.go
│ │ │ ├── ugorji/
│ │ │ │ └── go/
│ │ │ │ └── codec/
│ │ │ │ ├── 0doc.go
│ │ │ │ ├── LICENSE
│ │ │ │ ├── binc.go
│ │ │ │ ├── cbor.go
│ │ │ │ ├── codecgen/
│ │ │ │ │ ├── gen.go
│ │ │ │ │ └── z.go
│ │ │ │ ├── decode.go
│ │ │ │ ├── decode_go.go
│ │ │ │ ├── decode_go14.go
│ │ │ │ ├── encode.go
│ │ │ │ ├── fast-path.generated.go
│ │ │ │ ├── fast-path.not.go
│ │ │ │ ├── gen-helper.generated.go
│ │ │ │ ├── gen.generated.go
│ │ │ │ ├── gen.go
│ │ │ │ ├── gen_15.go
│ │ │ │ ├── gen_16.go
│ │ │ │ ├── gen_17.go
│ │ │ │ ├── helper.go
│ │ │ │ ├── helper_internal.go
│ │ │ │ ├── helper_not_unsafe.go
│ │ │ │ ├── helper_unsafe.go
│ │ │ │ ├── json.go
│ │ │ │ ├── msgpack.go
│ │ │ │ ├── noop.go
│ │ │ │ ├── prebuild.go
│ │ │ │ ├── rpc.go
│ │ │ │ ├── simple.go
│ │ │ │ └── time.go
│ │ │ └── xordataexchange/
│ │ │ └── crypt/
│ │ │ ├── backend/
│ │ │ │ ├── LICENSE
│ │ │ │ ├── backend.go
│ │ │ │ ├── consul/
│ │ │ │ │ └── consul.go
│ │ │ │ ├── etcd/
│ │ │ │ │ └── etcd.go
│ │ │ │ └── mock/
│ │ │ │ └── mock.go
│ │ │ ├── config/
│ │ │ │ ├── LICENSE
│ │ │ │ └── config.go
│ │ │ └── encoding/
│ │ │ └── secconf/
│ │ │ ├── LICENSE
│ │ │ └── secconf.go
│ │ ├── golang.org/
│ │ │ └── x/
│ │ │ ├── crypto/
│ │ │ │ ├── cast5/
│ │ │ │ │ ├── LICENSE
│ │ │ │ │ └── cast5.go
│ │ │ │ ├── curve25519/
│ │ │ │ │ ├── LICENSE
│ │ │ │ │ ├── const_amd64.h
│ │ │ │ │ ├── const_amd64.s
│ │ │ │ │ ├── cswap_amd64.s
│ │ │ │ │ ├── curve25519.go
│ │ │ │ │ ├── doc.go
│ │ │ │ │ ├── freeze_amd64.s
│ │ │ │ │ ├── ladderstep_amd64.s
│ │ │ │ │ ├── mont25519_amd64.go
│ │ │ │ │ ├── mul_amd64.s
│ │ │ │ │ └── square_amd64.s
│ │ │ │ ├── ed25519/
│ │ │ │ │ ├── LICENSE
│ │ │ │ │ ├── ed25519.go
│ │ │ │ │ └── internal/
│ │ │ │ │ └── edwards25519/
│ │ │ │ │ ├── const.go
│ │ │ │ │ └── edwards25519.go
│ │ │ │ ├── openpgp/
│ │ │ │ │ ├── LICENSE
│ │ │ │ │ ├── armor/
│ │ │ │ │ │ ├── armor.go
│ │ │ │ │ │ └── encode.go
│ │ │ │ │ ├── canonical_text.go
│ │ │ │ │ ├── clearsign/
│ │ │ │ │ │ └── clearsign.go
│ │ │ │ │ ├── elgamal/
│ │ │ │ │ │ └── elgamal.go
│ │ │ │ │ ├── errors/
│ │ │ │ │ │ └── errors.go
│ │ │ │ │ ├── keys.go
│ │ │ │ │ ├── packet/
│ │ │ │ │ │ ├── compressed.go
│ │ │ │ │ │ ├── config.go
│ │ │ │ │ │ ├── encrypted_key.go
│ │ │ │ │ │ ├── literal.go
│ │ │ │ │ │ ├── ocfb.go
│ │ │ │ │ │ ├── one_pass_signature.go
│ │ │ │ │ │ ├── opaque.go
│ │ │ │ │ │ ├── packet.go
│ │ │ │ │ │ ├── private_key.go
│ │ │ │ │ │ ├── public_key.go
│ │ │ │ │ │ ├── public_key_v3.go
│ │ │ │ │ │ ├── reader.go
│ │ │ │ │ │ ├── signature.go
│ │ │ │ │ │ ├── signature_v3.go
│ │ │ │ │ │ ├── symmetric_key_encrypted.go
│ │ │ │ │ │ ├── symmetrically_encrypted.go
│ │ │ │ │ │ ├── userattribute.go
│ │ │ │ │ │ └── userid.go
│ │ │ │ │ ├── read.go
│ │ │ │ │ ├── s2k/
│ │ │ │ │ │ └── s2k.go
│ │ │ │ │ └── write.go
│ │ │ │ └── ssh/
│ │ │ │ ├── LICENSE
│ │ │ │ ├── agent/
│ │ │ │ │ ├── client.go
│ │ │ │ │ ├── forward.go
│ │ │ │ │ ├── keyring.go
│ │ │ │ │ └── server.go
│ │ │ │ ├── buffer.go
│ │ │ │ ├── certs.go
│ │ │ │ ├── channel.go
│ │ │ │ ├── cipher.go
│ │ │ │ ├── client.go
│ │ │ │ ├── client_auth.go
│ │ │ │ ├── common.go
│ │ │ │ ├── connection.go
│ │ │ │ ├── doc.go
│ │ │ │ ├── handshake.go
│ │ │ │ ├── kex.go
│ │ │ │ ├── keys.go
│ │ │ │ ├── knownhosts/
│ │ │ │ │ └── knownhosts.go
│ │ │ │ ├── mac.go
│ │ │ │ ├── messages.go
│ │ │ │ ├── mux.go
│ │ │ │ ├── server.go
│ │ │ │ ├── session.go
│ │ │ │ ├── streamlocal.go
│ │ │ │ ├── tcpip.go
│ │ │ │ ├── terminal/
│ │ │ │ │ ├── terminal.go
│ │ │ │ │ ├── util.go
│ │ │ │ │ ├── util_bsd.go
│ │ │ │ │ ├── util_linux.go
│ │ │ │ │ ├── util_plan9.go
│ │ │ │ │ ├── util_solaris.go
│ │ │ │ │ └── util_windows.go
│ │ │ │ ├── test/
│ │ │ │ │ └── doc.go
│ │ │ │ └── transport.go
│ │ │ ├── sys/
│ │ │ │ └── unix/
│ │ │ │ ├── LICENSE
│ │ │ │ ├── asm_darwin_386.s
│ │ │ │ ├── asm_darwin_amd64.s
│ │ │ │ ├── asm_darwin_arm.s
│ │ │ │ ├── asm_darwin_arm64.s
│ │ │ │ ├── asm_dragonfly_amd64.s
│ │ │ │ ├── asm_freebsd_386.s
│ │ │ │ ├── asm_freebsd_amd64.s
│ │ │ │ ├── asm_freebsd_arm.s
│ │ │ │ ├── asm_linux_386.s
│ │ │ │ ├── asm_linux_amd64.s
│ │ │ │ ├── asm_linux_arm.s
│ │ │ │ ├── asm_linux_arm64.s
│ │ │ │ ├── asm_linux_mips64x.s
│ │ │ │ ├── asm_linux_mipsx.s
│ │ │ │ ├── asm_linux_ppc64x.s
│ │ │ │ ├── asm_linux_s390x.s
│ │ │ │ ├── asm_netbsd_386.s
│ │ │ │ ├── asm_netbsd_amd64.s
│ │ │ │ ├── asm_netbsd_arm.s
│ │ │ │ ├── asm_openbsd_386.s
│ │ │ │ ├── asm_openbsd_amd64.s
│ │ │ │ ├── asm_solaris_amd64.s
│ │ │ │ ├── bluetooth_linux.go
│ │ │ │ ├── constants.go
│ │ │ │ ├── dirent.go
│ │ │ │ ├── endian_big.go
│ │ │ │ ├── endian_little.go
│ │ │ │ ├── env_unix.go
│ │ │ │ ├── env_unset.go
│ │ │ │ ├── flock.go
│ │ │ │ ├── flock_linux_32bit.go
│ │ │ │ ├── gccgo.go
│ │ │ │ ├── gccgo_c.c
│ │ │ │ ├── gccgo_linux_amd64.go
│ │ │ │ ├── gccgo_linux_sparc64.go
│ │ │ │ ├── mkpost.go
│ │ │ │ ├── openbsd_pledge.go
│ │ │ │ ├── race.go
│ │ │ │ ├── race0.go
│ │ │ │ ├── sockcmsg_linux.go
│ │ │ │ ├── sockcmsg_unix.go
│ │ │ │ ├── str.go
│ │ │ │ ├── syscall.go
│ │ │ │ ├── syscall_bsd.go
│ │ │ │ ├── syscall_darwin.go
│ │ │ │ ├── syscall_darwin_386.go
│ │ │ │ ├── syscall_darwin_amd64.go
│ │ │ │ ├── syscall_darwin_arm.go
│ │ │ │ ├── syscall_darwin_arm64.go
│ │ │ │ ├── syscall_dragonfly.go
│ │ │ │ ├── syscall_dragonfly_amd64.go
│ │ │ │ ├── syscall_freebsd.go
│ │ │ │ ├── syscall_freebsd_386.go
│ │ │ │ ├── syscall_freebsd_amd64.go
│ │ │ │ ├── syscall_freebsd_arm.go
│ │ │ │ ├── syscall_linux.go
│ │ │ │ ├── syscall_linux_386.go
│ │ │ │ ├── syscall_linux_amd64.go
│ │ │ │ ├── syscall_linux_amd64_gc.go
│ │ │ │ ├── syscall_linux_arm.go
│ │ │ │ ├── syscall_linux_arm64.go
│ │ │ │ ├── syscall_linux_mips64x.go
│ │ │ │ ├── syscall_linux_mipsx.go
│ │ │ │ ├── syscall_linux_ppc64x.go
│ │ │ │ ├── syscall_linux_s390x.go
│ │ │ │ ├── syscall_linux_sparc64.go
│ │ │ │ ├── syscall_netbsd.go
│ │ │ │ ├── syscall_netbsd_386.go
│ │ │ │ ├── syscall_netbsd_amd64.go
│ │ │ │ ├── syscall_netbsd_arm.go
│ │ │ │ ├── syscall_no_getwd.go
│ │ │ │ ├── syscall_openbsd.go
│ │ │ │ ├── syscall_openbsd_386.go
│ │ │ │ ├── syscall_openbsd_amd64.go
│ │ │ │ ├── syscall_solaris.go
│ │ │ │ ├── syscall_solaris_amd64.go
│ │ │ │ ├── syscall_unix.go
│ │ │ │ ├── syscall_unix_gc.go
│ │ │ │ ├── types_darwin.go
│ │ │ │ ├── types_dragonfly.go
│ │ │ │ ├── types_freebsd.go
│ │ │ │ ├── types_linux.go
│ │ │ │ ├── types_netbsd.go
│ │ │ │ ├── types_openbsd.go
│ │ │ │ ├── types_solaris.go
│ │ │ │ ├── zerrors_darwin_386.go
│ │ │ │ ├── zerrors_darwin_amd64.go
│ │ │ │ ├── zerrors_darwin_arm.go
│ │ │ │ ├── zerrors_darwin_arm64.go
│ │ │ │ ├── zerrors_dragonfly_amd64.go
│ │ │ │ ├── zerrors_freebsd_386.go
│ │ │ │ ├── zerrors_freebsd_amd64.go
│ │ │ │ ├── zerrors_freebsd_arm.go
│ │ │ │ ├── zerrors_linux_386.go
│ │ │ │ ├── zerrors_linux_amd64.go
│ │ │ │ ├── zerrors_linux_arm.go
│ │ │ │ ├── zerrors_linux_arm64.go
│ │ │ │ ├── zerrors_linux_mips.go
│ │ │ │ ├── zerrors_linux_mips64.go
│ │ │ │ ├── zerrors_linux_mips64le.go
│ │ │ │ ├── zerrors_linux_mipsle.go
│ │ │ │ ├── zerrors_linux_ppc64.go
│ │ │ │ ├── zerrors_linux_ppc64le.go
│ │ │ │ ├── zerrors_linux_s390x.go
│ │ │ │ ├── zerrors_linux_sparc64.go
│ │ │ │ ├── zerrors_netbsd_386.go
│ │ │ │ ├── zerrors_netbsd_amd64.go
│ │ │ │ ├── zerrors_netbsd_arm.go
│ │ │ │ ├── zerrors_openbsd_386.go
│ │ │ │ ├── zerrors_openbsd_amd64.go
│ │ │ │ ├── zerrors_solaris_amd64.go
│ │ │ │ ├── zsyscall_darwin_386.go
│ │ │ │ ├── zsyscall_darwin_amd64.go
│ │ │ │ ├── zsyscall_darwin_arm.go
│ │ │ │ ├── zsyscall_darwin_arm64.go
│ │ │ │ ├── zsyscall_dragonfly_amd64.go
│ │ │ │ ├── zsyscall_freebsd_386.go
│ │ │ │ ├── zsyscall_freebsd_amd64.go
│ │ │ │ ├── zsyscall_freebsd_arm.go
│ │ │ │ ├── zsyscall_linux_386.go
│ │ │ │ ├── zsyscall_linux_amd64.go
│ │ │ │ ├── zsyscall_linux_arm.go
│ │ │ │ ├── zsyscall_linux_arm64.go
│ │ │ │ ├── zsyscall_linux_mips.go
│ │ │ │ ├── zsyscall_linux_mips64.go
│ │ │ │ ├── zsyscall_linux_mips64le.go
│ │ │ │ ├── zsyscall_linux_mipsle.go
│ │ │ │ ├── zsyscall_linux_ppc64.go
│ │ │ │ ├── zsyscall_linux_ppc64le.go
│ │ │ │ ├── zsyscall_linux_s390x.go
│ │ │ │ ├── zsyscall_linux_sparc64.go
│ │ │ │ ├── zsyscall_netbsd_386.go
│ │ │ │ ├── zsyscall_netbsd_amd64.go
│ │ │ │ ├── zsyscall_netbsd_arm.go
│ │ │ │ ├── zsyscall_openbsd_386.go
│ │ │ │ ├── zsyscall_openbsd_amd64.go
│ │ │ │ ├── zsyscall_solaris_amd64.go
│ │ │ │ ├── zsysctl_openbsd.go
│ │ │ │ ├── zsysnum_darwin_386.go
│ │ │ │ ├── zsysnum_darwin_amd64.go
│ │ │ │ ├── zsysnum_darwin_arm.go
│ │ │ │ ├── zsysnum_darwin_arm64.go
│ │ │ │ ├── zsysnum_dragonfly_amd64.go
│ │ │ │ ├── zsysnum_freebsd_386.go
│ │ │ │ ├── zsysnum_freebsd_amd64.go
│ │ │ │ ├── zsysnum_freebsd_arm.go
│ │ │ │ ├── zsysnum_linux_386.go
│ │ │ │ ├── zsysnum_linux_amd64.go
│ │ │ │ ├── zsysnum_linux_arm.go
│ │ │ │ ├── zsysnum_linux_arm64.go
│ │ │ │ ├── zsysnum_linux_mips.go
│ │ │ │ ├── zsysnum_linux_mips64.go
│ │ │ │ ├── zsysnum_linux_mips64le.go
│ │ │ │ ├── zsysnum_linux_mipsle.go
│ │ │ │ ├── zsysnum_linux_ppc64.go
│ │ │ │ ├── zsysnum_linux_ppc64le.go
│ │ │ │ ├── zsysnum_linux_s390x.go
│ │ │ │ ├── zsysnum_linux_sparc64.go
│ │ │ │ ├── zsysnum_netbsd_386.go
│ │ │ │ ├── zsysnum_netbsd_amd64.go
│ │ │ │ ├── zsysnum_netbsd_arm.go
│ │ │ │ ├── zsysnum_openbsd_386.go
│ │ │ │ ├── zsysnum_openbsd_amd64.go
│ │ │ │ ├── zsysnum_solaris_amd64.go
│ │ │ │ ├── ztypes_darwin_386.go
│ │ │ │ ├── ztypes_darwin_amd64.go
│ │ │ │ ├── ztypes_darwin_arm.go
│ │ │ │ ├── ztypes_darwin_arm64.go
│ │ │ │ ├── ztypes_dragonfly_amd64.go
│ │ │ │ ├── ztypes_freebsd_386.go
│ │ │ │ ├── ztypes_freebsd_amd64.go
│ │ │ │ ├── ztypes_freebsd_arm.go
│ │ │ │ ├── ztypes_linux_386.go
│ │ │ │ ├── ztypes_linux_amd64.go
│ │ │ │ ├── ztypes_linux_arm.go
│ │ │ │ ├── ztypes_linux_arm64.go
│ │ │ │ ├── ztypes_linux_mips.go
│ │ │ │ ├── ztypes_linux_mips64.go
│ │ │ │ ├── ztypes_linux_mips64le.go
│ │ │ │ ├── ztypes_linux_mipsle.go
│ │ │ │ ├── ztypes_linux_ppc64.go
│ │ │ │ ├── ztypes_linux_ppc64le.go
│ │ │ │ ├── ztypes_linux_s390x.go
│ │ │ │ ├── ztypes_linux_sparc64.go
│ │ │ │ ├── ztypes_netbsd_386.go
│ │ │ │ ├── ztypes_netbsd_amd64.go
│ │ │ │ ├── ztypes_netbsd_arm.go
│ │ │ │ ├── ztypes_openbsd_386.go
│ │ │ │ ├── ztypes_openbsd_amd64.go
│ │ │ │ └── ztypes_solaris_amd64.go
│ │ │ └── text/
│ │ │ ├── internal/
│ │ │ │ ├── gen/
│ │ │ │ │ ├── LICENSE
│ │ │ │ │ ├── code.go
│ │ │ │ │ └── gen.go
│ │ │ │ ├── triegen/
│ │ │ │ │ ├── LICENSE
│ │ │ │ │ ├── compact.go
│ │ │ │ │ ├── print.go
│ │ │ │ │ └── triegen.go
│ │ │ │ └── ucd/
│ │ │ │ ├── LICENSE
│ │ │ │ └── ucd.go
│ │ │ ├── transform/
│ │ │ │ ├── LICENSE
│ │ │ │ └── transform.go
│ │ │ └── unicode/
│ │ │ ├── cldr/
│ │ │ │ ├── LICENSE
│ │ │ │ ├── base.go
│ │ │ │ ├── cldr.go
│ │ │ │ ├── collate.go
│ │ │ │ ├── decode.go
│ │ │ │ ├── makexml.go
│ │ │ │ ├── resolve.go
│ │ │ │ ├── slice.go
│ │ │ │ └── xml.go
│ │ │ └── norm/
│ │ │ ├── LICENSE
│ │ │ ├── composition.go
│ │ │ ├── forminfo.go
│ │ │ ├── input.go
│ │ │ ├── iter.go
│ │ │ ├── maketables.go
│ │ │ ├── normalize.go
│ │ │ ├── readwriter.go
│ │ │ ├── tables.go
│ │ │ ├── transform.go
│ │ │ ├── trie.go
│ │ │ └── triegen.go
│ │ ├── gopkg.in/
│ │ │ └── yaml.v2/
│ │ │ ├── LICENSE
│ │ │ ├── apic.go
│ │ │ ├── decode.go
│ │ │ ├── emitterc.go
│ │ │ ├── encode.go
│ │ │ ├── parserc.go
│ │ │ ├── readerc.go
│ │ │ ├── resolve.go
│ │ │ ├── scannerc.go
│ │ │ ├── sorter.go
│ │ │ ├── writerc.go
│ │ │ ├── yaml.go
│ │ │ ├── yamlh.go
│ │ │ └── yamlprivateh.go
│ │ └── manifest
│ ├── chapter4/
│ │ ├── mysql/
│ │ │ ├── main.go
│ │ │ ├── main.go.txt
│ │ │ ├── main_namsral.go
│ │ │ ├── main_namsral.go.txt
│ │ │ ├── main_pflag.go
│ │ │ ├── main_pflag.go.txt
│ │ │ ├── run
│ │ │ ├── service/
│ │ │ │ └── database.go
│ │ │ └── vendor/
│ │ │ ├── github.com/
│ │ │ │ ├── go-sql-driver/
│ │ │ │ │ └── mysql/
│ │ │ │ │ ├── LICENSE
│ │ │ │ │ ├── appengine.go
│ │ │ │ │ ├── buffer.go
│ │ │ │ │ ├── collations.go
│ │ │ │ │ ├── connection.go
│ │ │ │ │ ├── const.go
│ │ │ │ │ ├── driver.go
│ │ │ │ │ ├── dsn.go
│ │ │ │ │ ├── errors.go
│ │ │ │ │ ├── infile.go
│ │ │ │ │ ├── packets.go
│ │ │ │ │ ├── result.go
│ │ │ │ │ ├── rows.go
│ │ │ │ │ ├── statement.go
│ │ │ │ │ ├── transaction.go
│ │ │ │ │ └── utils.go
│ │ │ │ ├── jmoiron/
│ │ │ │ │ └── sqlx/
│ │ │ │ │ ├── LICENSE
│ │ │ │ │ ├── bind.go
│ │ │ │ │ ├── doc.go
│ │ │ │ │ ├── named.go
│ │ │ │ │ ├── named_context.go
│ │ │ │ │ ├── reflectx/
│ │ │ │ │ │ └── reflect.go
│ │ │ │ │ ├── sqlx.go
│ │ │ │ │ ├── sqlx_context.go
│ │ │ │ │ └── types/
│ │ │ │ │ └── types.go
│ │ │ │ ├── namsral/
│ │ │ │ │ └── flag/
│ │ │ │ │ ├── LICENSE
│ │ │ │ │ ├── examples/
│ │ │ │ │ │ └── gopher.go
│ │ │ │ │ ├── extras.go
│ │ │ │ │ └── flag.go
│ │ │ │ └── spf13/
│ │ │ │ └── pflag/
│ │ │ │ ├── LICENSE
│ │ │ │ ├── bool.go
│ │ │ │ ├── bool_slice.go
│ │ │ │ ├── count.go
│ │ │ │ ├── duration.go
│ │ │ │ ├── flag.go
│ │ │ │ ├── float32.go
│ │ │ │ ├── float64.go
│ │ │ │ ├── golangflag.go
│ │ │ │ ├── int.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
│ │ │ └── manifest
│ │ └── redis/
│ │ ├── redis1.go
│ │ ├── redis1.go.txt
│ │ ├── redis2.go
│ │ ├── redis2.go.txt
│ │ ├── redis3.go
│ │ ├── redis3.go.txt
│ │ ├── run
│ │ ├── run_containers
│ │ ├── service/
│ │ │ ├── now.go
│ │ │ └── redis.go
│ │ └── vendor/
│ │ ├── github.com/
│ │ │ └── garyburd/
│ │ │ └── redigo/
│ │ │ ├── internal/
│ │ │ │ ├── LICENSE
│ │ │ │ ├── commandinfo.go
│ │ │ │ └── redistest/
│ │ │ │ └── testdb.go
│ │ │ └── redis/
│ │ │ ├── LICENSE
│ │ │ ├── conn.go
│ │ │ ├── doc.go
│ │ │ ├── go17.go
│ │ │ ├── log.go
│ │ │ ├── pool.go
│ │ │ ├── pre_go17.go
│ │ │ ├── pubsub.go
│ │ │ ├── redis.go
│ │ │ ├── reply.go
│ │ │ ├── scan.go
│ │ │ └── script.go
│ │ └── manifest
│ ├── chapter7/
│ │ ├── .gitignore
│ │ ├── Dockerfile
│ │ ├── README.md
│ │ ├── api/
│ │ │ ├── health.go
│ │ │ └── twitter.go
│ │ ├── build.sh
│ │ ├── build_static.sh
│ │ ├── main.go
│ │ ├── public_html/
│ │ │ ├── index.html
│ │ │ └── index.js
│ │ ├── run
│ │ ├── run_docker
│ │ ├── run_errcheck
│ │ ├── run_golint
│ │ ├── services/
│ │ │ ├── redis.go
│ │ │ └── respond.go
│ │ └── vendor/
│ │ ├── github.com/
│ │ │ ├── garyburd/
│ │ │ │ └── redigo/
│ │ │ │ ├── LICENSE
│ │ │ │ ├── internal/
│ │ │ │ │ ├── commandinfo.go
│ │ │ │ │ └── redistest/
│ │ │ │ │ └── testdb.go
│ │ │ │ ├── redis/
│ │ │ │ │ ├── conn.go
│ │ │ │ │ ├── doc.go
│ │ │ │ │ ├── go17.go
│ │ │ │ │ ├── log.go
│ │ │ │ │ ├── pool.go
│ │ │ │ │ ├── pre_go17.go
│ │ │ │ │ ├── pubsub.go
│ │ │ │ │ ├── redis.go
│ │ │ │ │ ├── reply.go
│ │ │ │ │ ├── scan.go
│ │ │ │ │ └── script.go
│ │ │ │ └── redisx/
│ │ │ │ ├── connmux.go
│ │ │ │ └── doc.go
│ │ │ └── namsral/
│ │ │ └── flag/
│ │ │ ├── LICENSE
│ │ │ ├── examples/
│ │ │ │ └── gopher.go
│ │ │ ├── extras.go
│ │ │ └── flag.go
│ │ └── manifest
│ ├── chapter8/
│ │ ├── .gitignore
│ │ ├── README.md
│ │ ├── haproxy/
│ │ │ └── haproxy.cfg
│ │ ├── pm2_exec
│ │ ├── pm2_haproxy
│ │ ├── pm2_run
│ │ └── process.yml
│ ├── digitalocean/
│ │ ├── create.sh
│ │ ├── destroy.sh
│ │ ├── get-ip.sh
│ │ ├── ssh.sh
│ │ └── swarm/
│ │ ├── .gitignore
│ │ ├── README.md
│ │ ├── add-manager.sh
│ │ ├── add-worker.sh
│ │ ├── destroy.sh
│ │ ├── list-managers.sh
│ │ ├── list-swarm.sh
│ │ ├── list-workers.sh
│ │ ├── list.sh
│ │ ├── remove-manager.sh
│ │ ├── remove-worker.sh
│ │ ├── ssh-key.sh
│ │ ├── ssh-one.sh
│ │ └── ssh.sh
│ ├── scaleway/
│ │ ├── .gitignore
│ │ ├── create.sh
│ │ ├── destroy.sh
│ │ ├── get-ip.sh
│ │ ├── install.sh
│ │ ├── list.sh
│ │ ├── ssh.sh
│ │ └── swarm/
│ │ ├── include/
│ │ │ └── common.sh
│ │ └── scripts/
│ │ └── bootstrap.sh
│ ├── services/
│ │ ├── mysql/
│ │ │ ├── .gitignore
│ │ │ ├── bin/
│ │ │ │ └── run
│ │ │ └── conf/
│ │ │ ├── .my.cnf
│ │ │ └── conf.d/
│ │ │ ├── .placeholder
│ │ │ └── skipresolve.conf
│ │ ├── redis/
│ │ │ ├── bin/
│ │ │ │ ├── redis-cli
│ │ │ │ ├── run
│ │ │ │ └── shutdown
│ │ │ └── docker.image
│ │ └── registry/
│ │ ├── .gitignore
│ │ └── bin/
│ │ ├── purge
│ │ └── run
│ └── shell/
│ ├── .gitignore
│ ├── docker_network
│ ├── gogs
│ ├── gogs_backup
│ └── mysql
├── LICENSE
├── README.md
└── api-foundations/
├── .gitignore
├── chapter1/
│ ├── hello_world.go
│ └── run
├── chapter2/
│ ├── bootstrap/
│ │ └── now.go
│ ├── chapter2b.go
│ ├── reflection.go
│ ├── run
│ ├── type1.go
│ ├── type2.go
│ ├── type3.go
│ └── type5.go
├── chapter3/
│ ├── example1.go
│ ├── example1.json
│ ├── example2.go
│ ├── example2.json
│ ├── example3.go
│ ├── example3.txt
│ └── run
├── chapter4/
│ ├── run
│ ├── server1.go
│ ├── server2.go
│ ├── server3.go
│ ├── server4.go
│ └── server5.go
├── chapter4b/
│ ├── Gopkg.toml
│ ├── run
│ ├── server1.go
│ ├── server2.go
│ ├── server3.go
│ ├── server4.go
│ └── vendor/
│ └── github.com/
│ └── go-chi/
│ ├── chi/
│ │ ├── .gitignore
│ │ ├── .travis.yml
│ │ ├── CHANGELOG.md
│ │ ├── CONTRIBUTING.md
│ │ ├── LICENSE
│ │ ├── README.md
│ │ ├── _examples/
│ │ │ ├── custom-handler/
│ │ │ │ └── main.go
│ │ │ ├── custom-method/
│ │ │ │ └── main.go
│ │ │ ├── fileserver/
│ │ │ │ ├── files/
│ │ │ │ │ └── notes.txt
│ │ │ │ └── main.go
│ │ │ ├── graceful/
│ │ │ │ └── main.go
│ │ │ ├── hello-world/
│ │ │ │ └── main.go
│ │ │ ├── limits/
│ │ │ │ └── main.go
│ │ │ ├── logging/
│ │ │ │ └── main.go
│ │ │ ├── rest/
│ │ │ │ ├── main.go
│ │ │ │ ├── routes.json
│ │ │ │ └── routes.md
│ │ │ ├── router-walk/
│ │ │ │ └── main.go
│ │ │ ├── todos-resource/
│ │ │ │ ├── main.go
│ │ │ │ ├── todos.go
│ │ │ │ └── users.go
│ │ │ └── versions/
│ │ │ ├── data/
│ │ │ │ ├── article.go
│ │ │ │ └── errors.go
│ │ │ ├── main.go
│ │ │ └── presenter/
│ │ │ ├── v1/
│ │ │ │ └── article.go
│ │ │ ├── v2/
│ │ │ │ └── article.go
│ │ │ └── v3/
│ │ │ └── article.go
│ │ ├── chain.go
│ │ ├── chi.go
│ │ ├── context.go
│ │ ├── middleware/
│ │ │ ├── closenotify17.go
│ │ │ ├── closenotify18.go
│ │ │ ├── compress.go
│ │ │ ├── compress18.go
│ │ │ ├── content_charset.go
│ │ │ ├── content_charset_test.go
│ │ │ ├── content_type.go
│ │ │ ├── get_head.go
│ │ │ ├── get_head_test.go
│ │ │ ├── heartbeat.go
│ │ │ ├── logger.go
│ │ │ ├── middleware.go
│ │ │ ├── middleware18_test.go
│ │ │ ├── middleware_test.go
│ │ │ ├── nocache.go
│ │ │ ├── profiler.go
│ │ │ ├── realip.go
│ │ │ ├── realip_test.go
│ │ │ ├── recoverer.go
│ │ │ ├── request_id.go
│ │ │ ├── strip.go
│ │ │ ├── strip_test.go
│ │ │ ├── terminal.go
│ │ │ ├── throttle.go
│ │ │ ├── throttle_test.go
│ │ │ ├── timeout.go
│ │ │ ├── url_format.go
│ │ │ ├── value.go
│ │ │ ├── wrap_writer.go
│ │ │ ├── wrap_writer17.go
│ │ │ └── wrap_writer18.go
│ │ ├── mux.go
│ │ ├── mux_test.go
│ │ ├── testdata/
│ │ │ ├── cert.pem
│ │ │ └── key.pem
│ │ ├── tree.go
│ │ └── tree_test.go
│ └── cors/
│ ├── README.md
│ ├── _example/
│ │ └── main.go
│ ├── cors.go
│ └── utils.go
├── chapter4b-jwt/
│ ├── Gopkg.toml
│ ├── jwt.go
│ ├── main.go
│ ├── run.sh
│ └── vendor/
│ └── github.com/
│ ├── dgrijalva/
│ │ └── jwt-go/
│ │ ├── .gitignore
│ │ ├── .travis.yml
│ │ ├── LICENSE
│ │ ├── MIGRATION_GUIDE.md
│ │ ├── README.md
│ │ ├── VERSION_HISTORY.md
│ │ ├── claims.go
│ │ ├── cmd/
│ │ │ └── jwt/
│ │ │ ├── README.md
│ │ │ ├── app.go
│ │ │ └── args.go
│ │ ├── doc.go
│ │ ├── ecdsa.go
│ │ ├── ecdsa_test.go
│ │ ├── ecdsa_utils.go
│ │ ├── errors.go
│ │ ├── example_test.go
│ │ ├── hmac.go
│ │ ├── hmac_example_test.go
│ │ ├── hmac_test.go
│ │ ├── http_example_test.go
│ │ ├── map_claims.go
│ │ ├── none.go
│ │ ├── none_test.go
│ │ ├── parser.go
│ │ ├── parser_test.go
│ │ ├── request/
│ │ │ ├── doc.go
│ │ │ ├── extractor.go
│ │ │ ├── extractor_example_test.go
│ │ │ ├── extractor_test.go
│ │ │ ├── oauth2.go
│ │ │ ├── request.go
│ │ │ └── request_test.go
│ │ ├── rsa.go
│ │ ├── rsa_pss.go
│ │ ├── rsa_pss_test.go
│ │ ├── rsa_test.go
│ │ ├── rsa_utils.go
│ │ ├── signing_method.go
│ │ ├── test/
│ │ │ ├── ec256-private.pem
│ │ │ ├── ec256-public.pem
│ │ │ ├── ec384-private.pem
│ │ │ ├── ec384-public.pem
│ │ │ ├── ec512-private.pem
│ │ │ ├── ec512-public.pem
│ │ │ ├── helpers.go
│ │ │ ├── hmacTestKey
│ │ │ ├── privateSecure.pem
│ │ │ ├── sample_key
│ │ │ └── sample_key.pub
│ │ └── token.go
│ ├── go-chi/
│ │ ├── chi/
│ │ │ ├── .gitignore
│ │ │ ├── .travis.yml
│ │ │ ├── CHANGELOG.md
│ │ │ ├── CONTRIBUTING.md
│ │ │ ├── LICENSE
│ │ │ ├── README.md
│ │ │ ├── _examples/
│ │ │ │ ├── custom-handler/
│ │ │ │ │ └── main.go
│ │ │ │ ├── custom-method/
│ │ │ │ │ └── main.go
│ │ │ │ ├── fileserver/
│ │ │ │ │ ├── files/
│ │ │ │ │ │ └── notes.txt
│ │ │ │ │ └── main.go
│ │ │ │ ├── graceful/
│ │ │ │ │ └── main.go
│ │ │ │ ├── hello-world/
│ │ │ │ │ └── main.go
│ │ │ │ ├── limits/
│ │ │ │ │ └── main.go
│ │ │ │ ├── logging/
│ │ │ │ │ └── main.go
│ │ │ │ ├── rest/
│ │ │ │ │ ├── main.go
│ │ │ │ │ ├── routes.json
│ │ │ │ │ └── routes.md
│ │ │ │ ├── router-walk/
│ │ │ │ │ └── main.go
│ │ │ │ ├── todos-resource/
│ │ │ │ │ ├── main.go
│ │ │ │ │ ├── todos.go
│ │ │ │ │ └── users.go
│ │ │ │ └── versions/
│ │ │ │ ├── data/
│ │ │ │ │ ├── article.go
│ │ │ │ │ └── errors.go
│ │ │ │ ├── main.go
│ │ │ │ └── presenter/
│ │ │ │ ├── v1/
│ │ │ │ │ └── article.go
│ │ │ │ ├── v2/
│ │ │ │ │ └── article.go
│ │ │ │ └── v3/
│ │ │ │ └── article.go
│ │ │ ├── chain.go
│ │ │ ├── chi.go
│ │ │ ├── context.go
│ │ │ ├── middleware/
│ │ │ │ ├── closenotify17.go
│ │ │ │ ├── closenotify18.go
│ │ │ │ ├── compress.go
│ │ │ │ ├── compress18.go
│ │ │ │ ├── content_charset.go
│ │ │ │ ├── content_charset_test.go
│ │ │ │ ├── content_type.go
│ │ │ │ ├── get_head.go
│ │ │ │ ├── get_head_test.go
│ │ │ │ ├── heartbeat.go
│ │ │ │ ├── logger.go
│ │ │ │ ├── middleware.go
│ │ │ │ ├── middleware18_test.go
│ │ │ │ ├── middleware_test.go
│ │ │ │ ├── nocache.go
│ │ │ │ ├── profiler.go
│ │ │ │ ├── realip.go
│ │ │ │ ├── realip_test.go
│ │ │ │ ├── recoverer.go
│ │ │ │ ├── request_id.go
│ │ │ │ ├── strip.go
│ │ │ │ ├── strip_test.go
│ │ │ │ ├── terminal.go
│ │ │ │ ├── throttle.go
│ │ │ │ ├── throttle_test.go
│ │ │ │ ├── timeout.go
│ │ │ │ ├── url_format.go
│ │ │ │ ├── value.go
│ │ │ │ ├── wrap_writer.go
│ │ │ │ ├── wrap_writer17.go
│ │ │ │ └── wrap_writer18.go
│ │ │ ├── mux.go
│ │ │ ├── mux_test.go
│ │ │ ├── testdata/
│ │ │ │ ├── cert.pem
│ │ │ │ └── key.pem
│ │ │ ├── tree.go
│ │ │ └── tree_test.go
│ │ └── cors/
│ │ ├── README.md
│ │ ├── _example/
│ │ │ └── main.go
│ │ ├── cors.go
│ │ └── utils.go
│ ├── pkg/
│ │ └── errors/
│ │ ├── .gitignore
│ │ ├── .travis.yml
│ │ ├── LICENSE
│ │ ├── README.md
│ │ ├── appveyor.yml
│ │ ├── bench_test.go
│ │ ├── errors.go
│ │ ├── errors_test.go
│ │ ├── example_test.go
│ │ ├── format_test.go
│ │ ├── stack.go
│ │ └── stack_test.go
│ └── titpetric/
│ └── factory/
│ ├── LICENSE
│ ├── README.md
│ ├── database.go
│ ├── profiler.go
│ ├── resputil/
│ │ └── resputil.go
│ ├── semaphore.go
│ └── sonyflake.go
├── chapter5/
│ ├── apiservice/
│ │ └── apiservice.go
│ ├── bootstrap/
│ │ └── now.go
│ ├── run
│ ├── server1.go
│ ├── server2.go
│ └── server3.go
├── chapter6/
│ ├── bootstrap/
│ │ ├── now.go
│ │ ├── redigo.go
│ │ ├── redigo.go.txt
│ │ └── redis.go
│ ├── redis1.go
│ ├── redis1.go.txt
│ ├── redis2.go
│ ├── redis2.go.txt
│ ├── redis3.go
│ ├── redis3.go.txt
│ ├── run
│ └── run_containers
├── chapter6b/
│ ├── bootstrap/
│ │ ├── now.go
│ │ └── sqlx.go
│ ├── main_sql.go
│ ├── main_sql.go.txt
│ ├── main_sqlx.go
│ ├── main_sqlx.go.txt
│ ├── main_sqlx2.go
│ ├── main_sqlx2.go.txt
│ ├── main_sqlx3.go
│ ├── main_sqlx3.go.txt
│ └── run
├── chapter7/
│ ├── .gitignore
│ ├── run
│ ├── t1/
│ │ ├── bootstrap/
│ │ │ ├── now.go
│ │ │ ├── redigo.go
│ │ │ └── redis.go
│ │ ├── registry.go
│ │ └── registry_test.go
│ ├── t2/
│ │ ├── bootstrap/
│ │ │ ├── now.go
│ │ │ ├── redigo.go
│ │ │ └── redis.go
│ │ ├── registry.go
│ │ └── registry_test.go
│ └── t3/
│ ├── bootstrap/
│ │ ├── now.go
│ │ ├── redigo.go
│ │ └── redis.go
│ ├── registry.go
│ └── registry_test.go
├── chapter8/
│ ├── .gitignore
│ ├── api/
│ │ ├── registry.go
│ │ └── registry_test.go
│ ├── bootstrap/
│ │ ├── now.go
│ │ ├── redigo.go
│ │ └── redis.go
│ ├── redis_api.go
│ ├── redis_api2.go
│ ├── redis_api_pprof.go
│ ├── run
│ ├── run_benchmark
│ ├── test_curl
│ ├── test_pprof
│ └── test_torch
├── chapter9/
│ ├── .gitignore
│ ├── Dockerfile
│ ├── api/
│ │ ├── registry.go
│ │ └── registry_test.go
│ ├── bootstrap/
│ │ ├── now.go
│ │ ├── redigo.go
│ │ └── redis.go
│ ├── build_docker
│ ├── build_flags
│ ├── flags.go
│ ├── flags.sh
│ ├── redis_api.go
│ ├── test-flags
│ ├── test-flags.txt
│ ├── test-flags2
│ ├── test-flags2.txt
│ └── test-remote.txt
└── shell/
├── common.sh
└── go
Showing preview only (5,577K chars total). Download the full file or copy to clipboard to get everything.
SYMBOL INDEX (71125 symbols across 967 files)
FILE: 12fa-docker-golang/chapter1/apiservice/apiservice.go
function HelloWorld (line 10) | func HelloWorld() {
FILE: 12fa-docker-golang/chapter1/main.go
function main (line 5) | func main() {
FILE: 12fa-docker-golang/chapter1/subpackage1.go
function Hello (line 6) | func Hello() {
FILE: 12fa-docker-golang/chapter1/vendor/github.com/namsral/flag/examples/gopher.go
function main (line 8) | func main() {
FILE: 12fa-docker-golang/chapter1/vendor/github.com/namsral/flag/flag.go
type boolValue (line 84) | type boolValue
method Set (line 91) | func (b *boolValue) Set(s string) error {
method Get (line 97) | func (b *boolValue) Get() interface{} { return bool(*b) }
method String (line 99) | func (b *boolValue) String() string { return fmt.Sprintf("%v", *b) }
method IsBoolFlag (line 101) | func (b *boolValue) IsBoolFlag() bool { return true }
function newBoolValue (line 86) | func newBoolValue(val bool, p *bool) *boolValue {
type boolFlag (line 105) | type boolFlag interface
type intValue (line 111) | type intValue
method Set (line 118) | func (i *intValue) Set(s string) error {
method Get (line 124) | func (i *intValue) Get() interface{} { return int(*i) }
method String (line 126) | func (i *intValue) String() string { return fmt.Sprintf("%v", *i) }
function newIntValue (line 113) | func newIntValue(val int, p *int) *intValue {
type int64Value (line 129) | type int64Value
method Set (line 136) | func (i *int64Value) Set(s string) error {
method Get (line 142) | func (i *int64Value) Get() interface{} { return int64(*i) }
method String (line 144) | func (i *int64Value) String() string { return fmt.Sprintf("%v", *i) }
function newInt64Value (line 131) | func newInt64Value(val int64, p *int64) *int64Value {
type uintValue (line 147) | type uintValue
method Set (line 154) | func (i *uintValue) Set(s string) error {
method Get (line 160) | func (i *uintValue) Get() interface{} { return uint(*i) }
method String (line 162) | func (i *uintValue) String() string { return fmt.Sprintf("%v", *i) }
function newUintValue (line 149) | func newUintValue(val uint, p *uint) *uintValue {
type uint64Value (line 165) | type uint64Value
method Set (line 172) | func (i *uint64Value) Set(s string) error {
method Get (line 178) | func (i *uint64Value) Get() interface{} { return uint64(*i) }
method String (line 180) | func (i *uint64Value) String() string { return fmt.Sprintf("%v", *i) }
function newUint64Value (line 167) | func newUint64Value(val uint64, p *uint64) *uint64Value {
type stringValue (line 183) | type stringValue
method Set (line 190) | func (s *stringValue) Set(val string) error {
method Get (line 195) | func (s *stringValue) Get() interface{} { return string(*s) }
method String (line 197) | func (s *stringValue) String() string { return fmt.Sprintf("%s", *s) }
function newStringValue (line 185) | func newStringValue(val string, p *string) *stringValue {
type float64Value (line 200) | type float64Value
method Set (line 207) | func (f *float64Value) Set(s string) error {
method Get (line 213) | func (f *float64Value) Get() interface{} { return float64(*f) }
method String (line 215) | func (f *float64Value) String() string { return fmt.Sprintf("%v", *f) }
function newFloat64Value (line 202) | func newFloat64Value(val float64, p *float64) *float64Value {
type durationValue (line 218) | type durationValue
method Set (line 225) | func (d *durationValue) Set(s string) error {
method Get (line 231) | func (d *durationValue) Get() interface{} { return time.Duration(*d) }
method String (line 233) | func (d *durationValue) String() string { return (*time.Duration)(d).S...
function newDurationValue (line 220) | func newDurationValue(val time.Duration, p *time.Duration) *durationValue {
type Value (line 241) | type Value interface
type Getter (line 250) | type Getter interface
type ErrorHandling (line 256) | type ErrorHandling
constant ContinueOnError (line 259) | ContinueOnError ErrorHandling = iota
constant ExitOnError (line 260) | ExitOnError
constant PanicOnError (line 261) | PanicOnError
type FlagSet (line 266) | type FlagSet struct
method out (line 307) | func (f *FlagSet) out() io.Writer {
method SetOutput (line 316) | func (f *FlagSet) SetOutput(output io.Writer) {
method VisitAll (line 322) | func (f *FlagSet) VisitAll(fn func(*Flag)) {
method Visit (line 336) | func (f *FlagSet) Visit(fn func(*Flag)) {
method Lookup (line 349) | func (f *FlagSet) Lookup(name string) *Flag {
method Set (line 360) | func (f *FlagSet) Set(name, value string) error {
method PrintDefaults (line 383) | func (f *FlagSet) PrintDefaults() {
method NFlag (line 421) | func (f *FlagSet) NFlag() int { return len(f.actual) }
method Arg (line 428) | func (f *FlagSet) Arg(i int) string {
method NArg (line 442) | func (f *FlagSet) NArg() int { return len(f.args) }
method Args (line 448) | func (f *FlagSet) Args() []string { return f.args }
method BoolVar (line 455) | func (f *FlagSet) BoolVar(p *bool, name string, value bool, usage stri...
method Bool (line 467) | func (f *FlagSet) Bool(name string, value bool, usage string) *bool {
method IntVar (line 481) | func (f *FlagSet) IntVar(p *int, name string, value int, usage string) {
method Int (line 493) | func (f *FlagSet) Int(name string, value int, usage string) *int {
method Int64Var (line 507) | func (f *FlagSet) Int64Var(p *int64, name string, value int64, usage s...
method Int64 (line 519) | func (f *FlagSet) Int64(name string, value int64, usage string) *int64 {
method UintVar (line 533) | func (f *FlagSet) UintVar(p *uint, name string, value uint, usage stri...
method Uint (line 545) | func (f *FlagSet) Uint(name string, value uint, usage string) *uint {
method Uint64Var (line 559) | func (f *FlagSet) Uint64Var(p *uint64, name string, value uint64, usag...
method Uint64 (line 571) | func (f *FlagSet) Uint64(name string, value uint64, usage string) *uin...
method StringVar (line 585) | func (f *FlagSet) StringVar(p *string, name string, value string, usag...
method String (line 597) | func (f *FlagSet) String(name string, value string, usage string) *str...
method Float64Var (line 611) | func (f *FlagSet) Float64Var(p *float64, name string, value float64, u...
method Float64 (line 623) | func (f *FlagSet) Float64(name string, value float64, usage string) *f...
method DurationVar (line 637) | func (f *FlagSet) DurationVar(p *time.Duration, name string, value tim...
method Duration (line 649) | func (f *FlagSet) Duration(name string, value time.Duration, usage str...
method Var (line 667) | func (f *FlagSet) Var(value Value, name string, usage string) {
method failf (line 699) | func (f *FlagSet) failf(format string, a ...interface{}) error {
method usage (line 708) | func (f *FlagSet) usage() {
method parseOne (line 719) | func (f *FlagSet) parseOne() (bool, error) {
method Parse (line 794) | func (f *FlagSet) Parse(arguments []string) error {
method ParseEnv (line 829) | func (f *FlagSet) ParseEnv(environ []string) error {
method ParseFile (line 906) | func (f *FlagSet) ParseFile(path string) error {
method Parsed (line 993) | func (f *FlagSet) Parsed() bool {
method Init (line 1036) | func (f *FlagSet) Init(name string, errorHandling ErrorHandling) {
type Flag (line 284) | type Flag struct
function sortFlags (line 292) | func sortFlags(flags map[string]*Flag) []*Flag {
function VisitAll (line 330) | func VisitAll(fn func(*Flag)) {
function Visit (line 344) | func Visit(fn func(*Flag)) {
function Lookup (line 355) | func Lookup(name string) *Flag {
function Set (line 377) | func Set(name, value string) error {
function PrintDefaults (line 395) | func PrintDefaults() {
function defaultUsage (line 400) | func defaultUsage(f *FlagSet) {
function NFlag (line 424) | func NFlag() int { return len(CommandLine.actual) }
function Arg (line 437) | func Arg(i int) string {
function NArg (line 445) | func NArg() int { return len(CommandLine.args) }
function Args (line 451) | func Args() []string { return CommandLine.args }
function BoolVar (line 461) | func BoolVar(p *bool, name string, value bool, usage string) {
function Bool (line 475) | func Bool(name string, value bool, usage string) *bool {
function IntVar (line 487) | func IntVar(p *int, name string, value int, usage string) {
function Int (line 501) | func Int(name string, value int, usage string) *int {
function Int64Var (line 513) | func Int64Var(p *int64, name string, value int64, usage string) {
function Int64 (line 527) | func Int64(name string, value int64, usage string) *int64 {
function UintVar (line 539) | func UintVar(p *uint, name string, value uint, usage string) {
function Uint (line 553) | func Uint(name string, value uint, usage string) *uint {
function Uint64Var (line 565) | func Uint64Var(p *uint64, name string, value uint64, usage string) {
function Uint64 (line 579) | func Uint64(name string, value uint64, usage string) *uint64 {
function StringVar (line 591) | func StringVar(p *string, name string, value string, usage string) {
function String (line 605) | func String(name string, value string, usage string) *string {
function Float64Var (line 617) | func Float64Var(p *float64, name string, value float64, usage string) {
function Float64 (line 631) | func Float64(name string, value float64, usage string) *float64 {
function DurationVar (line 643) | func DurationVar(p *time.Duration, name string, value time.Duration, usa...
function Duration (line 657) | func Duration(name string, value time.Duration, usage string) *time.Dura...
function Var (line 693) | func Var(value Value, name string, usage string) {
function Parse (line 999) | func Parse() {
function Parsed (line 1005) | func Parsed() bool {
function NewFlagSet (line 1016) | func NewFlagSet(name string, errorHandling ErrorHandling) *FlagSet {
function NewFlagSetWithEnvPrefix (line 1026) | func NewFlagSetWithEnvPrefix(name string, prefix string, errorHandling E...
FILE: 12fa-docker-golang/chapter11/main.go
function main (line 14) | func main() {
FILE: 12fa-docker-golang/chapter11/vendor/github.com/apex/log/default.go
type field (line 11) | type field struct
type byName (line 17) | type byName
method Len (line 19) | func (a byName) Len() int { return len(a) }
method Swap (line 20) | func (a byName) Swap(i, j int) { a[i], a[j] = a[j], a[i] }
method Less (line 21) | func (a byName) Less(i, j int) bool { return a[i].Name < a[j].Name }
function handleStdLog (line 24) | func handleStdLog(e *Entry) error {
FILE: 12fa-docker-golang/chapter11/vendor/github.com/apex/log/entry.go
type Entry (line 17) | type Entry struct
method WithFields (line 35) | func (e *Entry) WithFields(fields Fielder) *Entry {
method WithField (line 46) | func (e *Entry) WithField(key string, value interface{}) *Entry {
method WithError (line 54) | func (e *Entry) WithError(err error) *Entry {
method Debug (line 80) | func (e *Entry) Debug(msg string) {
method Info (line 85) | func (e *Entry) Info(msg string) {
method Warn (line 90) | func (e *Entry) Warn(msg string) {
method Error (line 95) | func (e *Entry) Error(msg string) {
method Fatal (line 100) | func (e *Entry) Fatal(msg string) {
method Debugf (line 106) | func (e *Entry) Debugf(msg string, v ...interface{}) {
method Infof (line 111) | func (e *Entry) Infof(msg string, v ...interface{}) {
method Warnf (line 116) | func (e *Entry) Warnf(msg string, v ...interface{}) {
method Errorf (line 121) | func (e *Entry) Errorf(msg string, v ...interface{}) {
method Fatalf (line 126) | func (e *Entry) Fatalf(msg string, v ...interface{}) {
method Trace (line 132) | func (e *Entry) Trace(msg string) *Entry {
method Stop (line 142) | func (e *Entry) Stop(err *error) {
method mergedFields (line 151) | func (e *Entry) mergedFields() Fields {
method finalize (line 164) | func (e *Entry) finalize(level Level, msg string) *Entry {
function NewEntry (line 28) | func NewEntry(log *Logger) *Entry {
FILE: 12fa-docker-golang/chapter11/vendor/github.com/apex/log/handlers/cli/cli.go
constant none (line 22) | none = 0
constant red (line 23) | red = 31
constant green (line 24) | green = 32
constant yellow (line 25) | yellow = 33
constant blue (line 26) | blue = 34
constant gray (line 27) | gray = 37
type Handler (line 49) | type Handler struct
method HandleLog (line 64) | func (h *Handler) HandleLog(e *log.Entry) error {
function New (line 56) | func New(w io.Writer) *Handler {
FILE: 12fa-docker-golang/chapter11/vendor/github.com/apex/log/handlers/discard/discard.go
type Handler (line 12) | type Handler struct
method HandleLog (line 20) | func (h *Handler) HandleLog(e *log.Entry) error {
function New (line 15) | func New() *Handler {
FILE: 12fa-docker-golang/chapter11/vendor/github.com/apex/log/handlers/es/es.go
type Elasticsearch (line 22) | type Elasticsearch interface
type Config (line 27) | type Config struct
method defaults (line 34) | func (c *Config) defaults() {
type Handler (line 45) | type Handler struct
method HandleLog (line 61) | func (h *Handler) HandleLog(e *log.Entry) error {
method flush (line 84) | func (h *Handler) flush(batch *batch.Batch) {
function New (line 53) | func New(config *Config) *Handler {
FILE: 12fa-docker-golang/chapter11/vendor/github.com/apex/log/handlers/graylog/graylog.go
type Handler (line 10) | type Handler struct
method HandleLog (line 41) | func (h *Handler) HandleLog(e *log.Entry) error {
method Close (line 59) | func (h *Handler) Close() error {
function New (line 18) | func New(url string) (*Handler, error) {
FILE: 12fa-docker-golang/chapter11/vendor/github.com/apex/log/handlers/json/json.go
type Handler (line 17) | type Handler struct
method HandleLog (line 30) | func (h *Handler) HandleLog(e *log.Entry) error {
function New (line 23) | func New(w io.Writer) *Handler {
FILE: 12fa-docker-golang/chapter11/vendor/github.com/apex/log/handlers/kinesis/kinesis.go
type Handler (line 16) | type Handler struct
method HandleLog (line 43) | func (h *Handler) HandleLog(e *log.Entry) error {
function New (line 24) | func New(stream string) *Handler {
function NewConfig (line 33) | func NewConfig(config k.Config) *Handler {
FILE: 12fa-docker-golang/chapter11/vendor/github.com/apex/log/handlers/level/level.go
type Handler (line 7) | type Handler struct
method HandleLog (line 21) | func (h *Handler) HandleLog(e *log.Entry) error {
function New (line 13) | func New(h log.Handler, level log.Level) *Handler {
FILE: 12fa-docker-golang/chapter11/vendor/github.com/apex/log/handlers/logfmt/logfmt.go
type Handler (line 17) | type Handler struct
method HandleLog (line 30) | func (h *Handler) HandleLog(e *log.Entry) error {
function New (line 23) | func New(w io.Writer) *Handler {
FILE: 12fa-docker-golang/chapter11/vendor/github.com/apex/log/handlers/memory/memory.go
type Handler (line 12) | type Handler struct
method HandleLog (line 23) | func (h *Handler) HandleLog(e *log.Entry) error {
function New (line 18) | func New() *Handler {
FILE: 12fa-docker-golang/chapter11/vendor/github.com/apex/log/handlers/multi/multi.go
type Handler (line 9) | type Handler struct
method HandleLog (line 21) | func (h *Handler) HandleLog(e *log.Entry) error {
function New (line 14) | func New(h ...log.Handler) *Handler {
FILE: 12fa-docker-golang/chapter11/vendor/github.com/apex/log/handlers/papertrail/papertrail.go
type Config (line 21) | type Config struct
type Handler (line 32) | type Handler struct
method HandleLog (line 53) | func (h *Handler) HandleLog(e *log.Entry) error {
function New (line 40) | func New(config *Config) *Handler {
FILE: 12fa-docker-golang/chapter11/vendor/github.com/apex/log/handlers/text/text.go
constant none (line 22) | none = 0
constant red (line 23) | red = 31
constant green (line 24) | green = 32
constant yellow (line 25) | yellow = 33
constant blue (line 26) | blue = 34
constant gray (line 27) | gray = 37
type Handler (line 49) | type Handler struct
method HandleLog (line 62) | func (h *Handler) HandleLog(e *log.Entry) error {
function New (line 55) | func New(w io.Writer) *Handler {
FILE: 12fa-docker-golang/chapter11/vendor/github.com/apex/log/interface.go
type Interface (line 4) | type Interface interface
FILE: 12fa-docker-golang/chapter11/vendor/github.com/apex/log/levels.go
type Level (line 9) | type Level
method String (line 29) | func (l Level) String() string {
method MarshalJSON (line 34) | func (l Level) MarshalJSON() ([]byte, error) {
constant DebugLevel (line 13) | DebugLevel Level = iota
constant InfoLevel (line 14) | InfoLevel
constant WarnLevel (line 15) | WarnLevel
constant ErrorLevel (line 16) | ErrorLevel
constant FatalLevel (line 17) | FatalLevel
function ParseLevel (line 39) | func ParseLevel(s string) (Level, error) {
function MustParseLevel (line 57) | func MustParseLevel(s string) Level {
FILE: 12fa-docker-golang/chapter11/vendor/github.com/apex/log/logger.go
type Fielder (line 12) | type Fielder interface
type Fields (line 17) | type Fields
method Fields (line 20) | func (f Fields) Fields() Fields {
method Get (line 25) | func (f Fields) Get(name string) interface{} {
method Names (line 30) | func (f Fields) Names() (v []string) {
type HandlerFunc (line 42) | type HandlerFunc
method HandleLog (line 45) | func (f HandlerFunc) HandleLog(e *Entry) error {
type Handler (line 54) | type Handler interface
type Logger (line 59) | type Logger struct
method WithFields (line 65) | func (l *Logger) WithFields(fields Fielder) *Entry {
method WithField (line 73) | func (l *Logger) WithField(key string, value interface{}) *Entry {
method WithError (line 78) | func (l *Logger) WithError(err error) *Entry {
method Debug (line 83) | func (l *Logger) Debug(msg string) {
method Info (line 88) | func (l *Logger) Info(msg string) {
method Warn (line 93) | func (l *Logger) Warn(msg string) {
method Error (line 98) | func (l *Logger) Error(msg string) {
method Fatal (line 103) | func (l *Logger) Fatal(msg string) {
method Debugf (line 108) | func (l *Logger) Debugf(msg string, v ...interface{}) {
method Infof (line 113) | func (l *Logger) Infof(msg string, v ...interface{}) {
method Warnf (line 118) | func (l *Logger) Warnf(msg string, v ...interface{}) {
method Errorf (line 123) | func (l *Logger) Errorf(msg string, v ...interface{}) {
method Fatalf (line 128) | func (l *Logger) Fatalf(msg string, v ...interface{}) {
method Trace (line 134) | func (l *Logger) Trace(msg string) *Entry {
method log (line 141) | func (l *Logger) log(level Level, e *Entry, msg string) {
FILE: 12fa-docker-golang/chapter11/vendor/github.com/apex/log/pkg.go
function SetHandler (line 11) | func SetHandler(h Handler) {
function SetLevel (line 18) | func SetLevel(l Level) {
function WithFields (line 25) | func WithFields(fields Fielder) *Entry {
function WithField (line 30) | func WithField(key string, value interface{}) *Entry {
function WithError (line 35) | func WithError(err error) *Entry {
function Debug (line 40) | func Debug(msg string) {
function Info (line 45) | func Info(msg string) {
function Warn (line 50) | func Warn(msg string) {
function Error (line 55) | func Error(msg string) {
function Fatal (line 60) | func Fatal(msg string) {
function Debugf (line 65) | func Debugf(msg string, v ...interface{}) {
function Infof (line 70) | func Infof(msg string, v ...interface{}) {
function Warnf (line 75) | func Warnf(msg string, v ...interface{}) {
function Errorf (line 80) | func Errorf(msg string, v ...interface{}) {
function Fatalf (line 85) | func Fatalf(msg string, v ...interface{}) {
function Trace (line 91) | func Trace(msg string) *Entry {
FILE: 12fa-docker-golang/chapter11/vendor/github.com/apex/log/stack.go
type stackTracer (line 6) | type stackTracer interface
FILE: 12fa-docker-golang/chapter11/vendor/github.com/aphistic/golf/chunker.go
type chunker (line 10) | type chunker struct
method reset (line 30) | func (c *chunker) reset() {
method Write (line 33) | func (c *chunker) Write(p []byte) (int, error) {
method Flush (line 38) | func (c *chunker) Flush() error {
method flushWithId (line 44) | func (c *chunker) flushWithId(id []byte) error {
function newChunker (line 16) | func newChunker(w io.Writer, chunkSize int) (*chunker, error) {
FILE: 12fa-docker-golang/chapter11/vendor/github.com/aphistic/golf/client.go
constant COMP_NONE (line 18) | COMP_NONE = iota
constant COMP_GZIP (line 19) | COMP_GZIP
constant COMP_ZLIB (line 20) | COMP_ZLIB
type Client (line 23) | type Client struct
method Dial (line 81) | func (c *Client) Dial(uri string) error {
method Close (line 112) | func (c *Client) Close() error {
method QueueMsg (line 150) | func (c *Client) QueueMsg(msg *Message) error {
method queueReceiver (line 160) | func (c *Client) queueReceiver() {
method msgSender (line 182) | func (c *Client) msgSender() {
method writeMsg (line 221) | func (c *Client) writeMsg(data string, w io.Writer, compression int) e...
type ClientConfig (line 39) | type ClientConfig struct
function NewClient (line 52) | func NewClient() (*Client, error) {
function NewClientWithConfig (line 61) | func NewClientWithConfig(config ClientConfig) (*Client, error) {
FILE: 12fa-docker-golang/chapter11/vendor/github.com/aphistic/golf/json.go
type jsonFloat (line 11) | type jsonFloat struct
method MarshalJSON (line 18) | func (jf *jsonFloat) MarshalJSON() ([]byte, error) {
function newJsonFloat (line 15) | func newJsonFloat(val float64) *jsonFloat {
function generateMsgJson (line 22) | func generateMsgJson(msg *Message) (string, error) {
FILE: 12fa-docker-golang/chapter11/vendor/github.com/aphistic/golf/log.go
method genMsg (line 7) | func (l *Logger) genMsg(attrs map[string]interface{}, level int, msg str...
method logMsg (line 19) | func (l *Logger) logMsg(attrs map[string]interface{}, level int, msg str...
method Dbg (line 25) | func (l *Logger) Dbg(msg string) error {
method Dbgf (line 30) | func (l *Logger) Dbgf(format string, va ...interface{}) error {
method Dbgm (line 37) | func (l *Logger) Dbgm(attrs map[string]interface{}, format string, va .....
method Info (line 42) | func (l *Logger) Info(msg string) error {
method Infof (line 47) | func (l *Logger) Infof(format string, va ...interface{}) error {
method Infom (line 54) | func (l *Logger) Infom(attrs map[string]interface{}, format string, va ....
method Notice (line 59) | func (l *Logger) Notice(msg string) error {
method Noticef (line 64) | func (l *Logger) Noticef(format string, va ...interface{}) error {
method Noticem (line 71) | func (l *Logger) Noticem(attrs map[string]interface{}, format string, va...
method Warn (line 76) | func (l *Logger) Warn(msg string) error {
method Warnf (line 81) | func (l *Logger) Warnf(format string, va ...interface{}) error {
method Warnm (line 88) | func (l *Logger) Warnm(attrs map[string]interface{}, format string, va ....
method Err (line 93) | func (l *Logger) Err(msg string) error {
method Errf (line 98) | func (l *Logger) Errf(format string, va ...interface{}) error {
method Errm (line 105) | func (l *Logger) Errm(attrs map[string]interface{}, format string, va .....
method Crit (line 110) | func (l *Logger) Crit(msg string) error {
method Critf (line 115) | func (l *Logger) Critf(format string, va ...interface{}) error {
method Critm (line 122) | func (l *Logger) Critm(attrs map[string]interface{}, format string, va ....
method Alert (line 127) | func (l *Logger) Alert(msg string) error {
method Alertf (line 132) | func (l *Logger) Alertf(format string, va ...interface{}) error {
method Alertm (line 139) | func (l *Logger) Alertm(attrs map[string]interface{}, format string, va ...
method Emerg (line 144) | func (l *Logger) Emerg(msg string) error {
method Emergf (line 149) | func (l *Logger) Emergf(format string, va ...interface{}) error {
method Emergm (line 156) | func (l *Logger) Emergm(attrs map[string]interface{}, format string, va ...
FILE: 12fa-docker-golang/chapter11/vendor/github.com/aphistic/golf/log_default.go
function DefaultLogger (line 12) | func DefaultLogger(l *Logger) {
function genDefaultMsg (line 16) | func genDefaultMsg(attrs map[string]interface{}, level int, msg string, ...
function logDefaultMsg (line 28) | func logDefaultMsg(attrs map[string]interface{}, level int, msg string, ...
function Dbg (line 38) | func Dbg(msg string) error {
function Dbgf (line 43) | func Dbgf(format string, va ...interface{}) error {
function Dbgm (line 50) | func Dbgm(attrs map[string]interface{}, format string, va ...interface{}...
function Info (line 55) | func Info(msg string) error {
function Infof (line 60) | func Infof(format string, va ...interface{}) error {
function Infom (line 67) | func Infom(attrs map[string]interface{}, format string, va ...interface{...
function Notice (line 72) | func Notice(msg string) error {
function Noticef (line 77) | func Noticef(format string, va ...interface{}) error {
function Noticem (line 84) | func Noticem(attrs map[string]interface{}, format string, va ...interfac...
function Warn (line 89) | func Warn(msg string) error {
function Warnf (line 94) | func Warnf(format string, va ...interface{}) error {
function Warnm (line 101) | func Warnm(attrs map[string]interface{}, format string, va ...interface{...
function Err (line 106) | func Err(msg string) error {
function Errf (line 111) | func Errf(format string, va ...interface{}) error {
function Errm (line 118) | func Errm(attrs map[string]interface{}, format string, va ...interface{}...
function Crit (line 123) | func Crit(msg string) error {
function Critf (line 128) | func Critf(format string, va ...interface{}) error {
function Critm (line 135) | func Critm(attrs map[string]interface{}, format string, va ...interface{...
function Alert (line 140) | func Alert(msg string) error {
function Alertf (line 145) | func Alertf(format string, va ...interface{}) error {
function Alertm (line 152) | func Alertm(attrs map[string]interface{}, format string, va ...interface...
function Emerg (line 157) | func Emerg(msg string) error {
function Emergf (line 162) | func Emergf(format string, va ...interface{}) error {
function Emergm (line 169) | func Emergm(attrs map[string]interface{}, format string, va ...interface...
FILE: 12fa-docker-golang/chapter11/vendor/github.com/aphistic/golf/logger.go
type Logger (line 6) | type Logger struct
method Clone (line 29) | func (l *Logger) Clone() *Logger {
method Attr (line 41) | func (l *Logger) Attr(name string) interface{} {
method SetAttr (line 51) | func (l *Logger) SetAttr(name string, val interface{}) {
method RemAttr (line 56) | func (l *Logger) RemAttr(name string) {
function newLogger (line 12) | func newLogger() *Logger {
method NewLogger (line 21) | func (c *Client) NewLogger() (*Logger, error) {
FILE: 12fa-docker-golang/chapter11/vendor/github.com/aphistic/golf/message.go
constant LEVEL_EMERG (line 10) | LEVEL_EMERG = iota
constant LEVEL_ALERT (line 11) | LEVEL_ALERT
constant LEVEL_CRIT (line 12) | LEVEL_CRIT
constant LEVEL_ERR (line 13) | LEVEL_ERR
constant LEVEL_WARN (line 14) | LEVEL_WARN
constant LEVEL_NOTICE (line 15) | LEVEL_NOTICE
constant LEVEL_INFO (line 16) | LEVEL_INFO
constant LEVEL_DBG (line 17) | LEVEL_DBG
type Message (line 21) | type Message struct
method NewMessage (line 36) | func (l *Logger) NewMessage() *Message {
function newMessage (line 43) | func newMessage() *Message {
function newMessageForVersion (line 46) | func newMessageForVersion(version string) *Message {
FILE: 12fa-docker-golang/chapter11/vendor/github.com/aws/aws-sdk-go/aws/awserr/error.go
type Error (line 31) | type Error interface
type BatchError (line 51) | type BatchError interface
type BatchedErrors (line 70) | type BatchedErrors interface
function New (line 82) | func New(code, message string, origErr error) Error {
function NewBatchError (line 92) | func NewBatchError(code, message string, errs []error) BatchedErrors {
type RequestFailure (line 129) | type RequestFailure interface
function NewRequestFailure (line 143) | func NewRequestFailure(err Error, statusCode int, reqID string) RequestF...
FILE: 12fa-docker-golang/chapter11/vendor/github.com/aws/aws-sdk-go/aws/awserr/types.go
function SprintError (line 9) | func SprintError(code, message, extra string, origErr error) string {
type baseError (line 25) | type baseError struct
method Error (line 62) | func (b baseError) Error() string {
method String (line 73) | func (b baseError) String() string {
method Code (line 78) | func (b baseError) Code() string {
method Message (line 83) | func (b baseError) Message() string {
method OrigErr (line 90) | func (b baseError) OrigErr() error {
method OrigErrs (line 107) | func (b baseError) OrigErrs() []error {
function newBaseError (line 47) | func newBaseError(code, message string, origErrs []error) *baseError {
type awsError (line 113) | type awsError
type requestError (line 118) | type requestError struct
method Error (line 142) | func (r requestError) Error() string {
method String (line 150) | func (r requestError) String() string {
method StatusCode (line 155) | func (r requestError) StatusCode() int {
method RequestID (line 160) | func (r requestError) RequestID() string {
method OrigErrs (line 166) | func (r requestError) OrigErrs() []error {
function newRequestError (line 132) | func newRequestError(err Error, statusCode int, requestID string) *reque...
type errorList (line 174) | type errorList
method Error (line 179) | func (e errorList) Error() string {
FILE: 12fa-docker-golang/chapter11/vendor/github.com/aws/aws-sdk-go/aws/awsutil/copy.go
function Copy (line 15) | func Copy(dst, src interface{}) {
function CopyOf (line 26) | func CopyOf(src interface{}) (dst interface{}) {
function rcopy (line 37) | func rcopy(dst, src reflect.Value, root bool) {
FILE: 12fa-docker-golang/chapter11/vendor/github.com/aws/aws-sdk-go/aws/awsutil/equal.go
function DeepEqual (line 13) | func DeepEqual(a, b interface{}) bool {
FILE: 12fa-docker-golang/chapter11/vendor/github.com/aws/aws-sdk-go/aws/awsutil/path_value.go
function rValuesAtPath (line 16) | func rValuesAtPath(v interface{}, path string, createPath, caseSensitive...
function ValuesAtPath (line 158) | func ValuesAtPath(i interface{}, path string) ([]interface{}, error) {
function SetValueAtPath (line 187) | func SetValueAtPath(i interface{}, path string, v interface{}) {
function setValue (line 198) | func setValue(dstVal reflect.Value, src interface{}) {
FILE: 12fa-docker-golang/chapter11/vendor/github.com/aws/aws-sdk-go/aws/awsutil/prettify.go
function Prettify (line 12) | func Prettify(i interface{}) string {
function prettify (line 20) | func prettify(v reflect.Value, indent int, buf *bytes.Buffer) {
FILE: 12fa-docker-golang/chapter11/vendor/github.com/aws/aws-sdk-go/aws/awsutil/string_value.go
function StringValue (line 11) | func StringValue(i interface{}) string {
function stringValue (line 17) | func stringValue(v reflect.Value, indent int, buf *bytes.Buffer) {
FILE: 12fa-docker-golang/chapter11/vendor/github.com/aws/aws-sdk-go/aws/client/client.go
type Config (line 13) | type Config struct
type ConfigProvider (line 23) | type ConfigProvider interface
type ConfigNoResolveEndpointProvider (line 30) | type ConfigNoResolveEndpointProvider interface
type Client (line 36) | type Client struct
method NewRequest (line 78) | func (c *Client) NewRequest(operation *request.Operation, params inter...
method AddDebugHandlers (line 84) | func (c *Client) AddDebugHandlers() {
function New (line 45) | func New(cfg aws.Config, info metadata.ClientInfo, handlers request.Hand...
constant logReqMsg (line 93) | logReqMsg = `DEBUG: Request %s/%s Details:
constant logReqErrMsg (line 98) | logReqErrMsg = `DEBUG ERROR: Request %s/%s:
function logRequest (line 103) | func logRequest(r *request.Request) {
constant logRespMsg (line 121) | logRespMsg = `DEBUG: Response %s/%s Details:
constant logRespErrMsg (line 126) | logRespErrMsg = `DEBUG ERROR: Response %s/%s:
function logResponse (line 131) | func logResponse(r *request.Request) {
FILE: 12fa-docker-golang/chapter11/vendor/github.com/aws/aws-sdk-go/aws/client/default_retryer.go
type DefaultRetryer (line 23) | type DefaultRetryer struct
method MaxRetries (line 29) | func (d DefaultRetryer) MaxRetries() int {
method RetryRules (line 36) | func (d DefaultRetryer) RetryRules(r *request.Request) time.Duration {
method ShouldRetry (line 56) | func (d DefaultRetryer) ShouldRetry(r *request.Request) bool {
method shouldThrottle (line 64) | func (d DefaultRetryer) shouldThrottle(r *request.Request) bool {
type lockedSource (line 74) | type lockedSource struct
method Int63 (line 79) | func (r *lockedSource) Int63() (n int64) {
method Seed (line 86) | func (r *lockedSource) Seed(seed int64) {
FILE: 12fa-docker-golang/chapter11/vendor/github.com/aws/aws-sdk-go/aws/client/metadata/client_info.go
type ClientInfo (line 4) | type ClientInfo struct
FILE: 12fa-docker-golang/chapter11/vendor/github.com/aws/aws-sdk-go/aws/config.go
constant UseServiceDefaultRetries (line 14) | UseServiceDefaultRetries = -1
type RequestRetryer (line 18) | type RequestRetryer interface
type Config (line 33) | type Config struct
method WithCredentialsChainVerboseErrors (line 231) | func (c *Config) WithCredentialsChainVerboseErrors(verboseErrs bool) *...
method WithCredentials (line 238) | func (c *Config) WithCredentials(creds *credentials.Credentials) *Conf...
method WithEndpoint (line 245) | func (c *Config) WithEndpoint(endpoint string) *Config {
method WithEndpointResolver (line 252) | func (c *Config) WithEndpointResolver(resolver endpoints.Resolver) *Co...
method WithRegion (line 259) | func (c *Config) WithRegion(region string) *Config {
method WithDisableSSL (line 266) | func (c *Config) WithDisableSSL(disable bool) *Config {
method WithHTTPClient (line 273) | func (c *Config) WithHTTPClient(client *http.Client) *Config {
method WithMaxRetries (line 280) | func (c *Config) WithMaxRetries(max int) *Config {
method WithDisableParamValidation (line 287) | func (c *Config) WithDisableParamValidation(disable bool) *Config {
method WithDisableComputeChecksums (line 294) | func (c *Config) WithDisableComputeChecksums(disable bool) *Config {
method WithLogLevel (line 301) | func (c *Config) WithLogLevel(level LogLevelType) *Config {
method WithLogger (line 308) | func (c *Config) WithLogger(logger Logger) *Config {
method WithS3ForcePathStyle (line 315) | func (c *Config) WithS3ForcePathStyle(force bool) *Config {
method WithS3Disable100Continue (line 322) | func (c *Config) WithS3Disable100Continue(disable bool) *Config {
method WithS3UseAccelerate (line 329) | func (c *Config) WithS3UseAccelerate(enable bool) *Config {
method WithUseDualStack (line 336) | func (c *Config) WithUseDualStack(enable bool) *Config {
method WithEC2MetadataDisableTimeoutOverride (line 343) | func (c *Config) WithEC2MetadataDisableTimeoutOverride(enable bool) *C...
method WithSleepDelay (line 350) | func (c *Config) WithSleepDelay(fn func(time.Duration)) *Config {
method MergeIn (line 356) | func (c *Config) MergeIn(cfgs ...*Config) {
method Copy (line 450) | func (c *Config) Copy(cfgs ...*Config) *Config {
function NewConfig (line 225) | func NewConfig() *Config {
function mergeInConfig (line 362) | func mergeInConfig(dst *Config, other *Config) {
FILE: 12fa-docker-golang/chapter11/vendor/github.com/aws/aws-sdk-go/aws/context.go
type Context (line 12) | type Context interface
function BackgroundContext (line 50) | func BackgroundContext() Context {
function SleepWithContext (line 59) | func SleepWithContext(ctx Context, dur time.Duration) error {
FILE: 12fa-docker-golang/chapter11/vendor/github.com/aws/aws-sdk-go/aws/context_1_6.go
type emptyCtx (line 13) | type emptyCtx
method Deadline (line 15) | func (*emptyCtx) Deadline() (deadline time.Time, ok bool) {
method Done (line 19) | func (*emptyCtx) Done() <-chan struct{} {
method Err (line 23) | func (*emptyCtx) Err() error {
method Value (line 27) | func (*emptyCtx) Value(key interface{}) interface{} {
method String (line 31) | func (e *emptyCtx) String() string {
FILE: 12fa-docker-golang/chapter11/vendor/github.com/aws/aws-sdk-go/aws/convert_types.go
function String (line 6) | func String(v string) *string {
function StringValue (line 12) | func StringValue(v *string) string {
function StringSlice (line 21) | func StringSlice(src []string) []*string {
function StringValueSlice (line 31) | func StringValueSlice(src []*string) []string {
function StringMap (line 43) | func StringMap(src map[string]string) map[string]*string {
function StringValueMap (line 54) | func StringValueMap(src map[string]*string) map[string]string {
function Bool (line 65) | func Bool(v bool) *bool {
function BoolValue (line 71) | func BoolValue(v *bool) bool {
function BoolSlice (line 80) | func BoolSlice(src []bool) []*bool {
function BoolValueSlice (line 90) | func BoolValueSlice(src []*bool) []bool {
function BoolMap (line 102) | func BoolMap(src map[string]bool) map[string]*bool {
function BoolValueMap (line 113) | func BoolValueMap(src map[string]*bool) map[string]bool {
function Int (line 124) | func Int(v int) *int {
function IntValue (line 130) | func IntValue(v *int) int {
function IntSlice (line 139) | func IntSlice(src []int) []*int {
function IntValueSlice (line 149) | func IntValueSlice(src []*int) []int {
function IntMap (line 161) | func IntMap(src map[string]int) map[string]*int {
function IntValueMap (line 172) | func IntValueMap(src map[string]*int) map[string]int {
function Int64 (line 183) | func Int64(v int64) *int64 {
function Int64Value (line 189) | func Int64Value(v *int64) int64 {
function Int64Slice (line 198) | func Int64Slice(src []int64) []*int64 {
function Int64ValueSlice (line 208) | func Int64ValueSlice(src []*int64) []int64 {
function Int64Map (line 220) | func Int64Map(src map[string]int64) map[string]*int64 {
function Int64ValueMap (line 231) | func Int64ValueMap(src map[string]*int64) map[string]int64 {
function Float64 (line 242) | func Float64(v float64) *float64 {
function Float64Value (line 248) | func Float64Value(v *float64) float64 {
function Float64Slice (line 257) | func Float64Slice(src []float64) []*float64 {
function Float64ValueSlice (line 267) | func Float64ValueSlice(src []*float64) []float64 {
function Float64Map (line 279) | func Float64Map(src map[string]float64) map[string]*float64 {
function Float64ValueMap (line 290) | func Float64ValueMap(src map[string]*float64) map[string]float64 {
function Time (line 301) | func Time(v time.Time) *time.Time {
function TimeValue (line 307) | func TimeValue(v *time.Time) time.Time {
function TimeUnixMilli (line 322) | func TimeUnixMilli(t time.Time) int64 {
function TimeSlice (line 328) | func TimeSlice(src []time.Time) []*time.Time {
function TimeValueSlice (line 338) | func TimeValueSlice(src []*time.Time) []time.Time {
function TimeMap (line 350) | func TimeMap(src map[string]time.Time) map[string]*time.Time {
function TimeValueMap (line 361) | func TimeValueMap(src map[string]*time.Time) map[string]time.Time {
FILE: 12fa-docker-golang/chapter11/vendor/github.com/aws/aws-sdk-go/aws/corehandlers/handlers.go
type lener (line 22) | type lener interface
FILE: 12fa-docker-golang/chapter11/vendor/github.com/aws/aws-sdk-go/aws/credentials/chain_provider.go
type ChainProvider (line 53) | type ChainProvider struct
method Retrieve (line 72) | func (c *ChainProvider) Retrieve() (Value, error) {
method IsExpired (line 94) | func (c *ChainProvider) IsExpired() bool {
function NewChainCredentials (line 61) | func NewChainCredentials(providers []Provider) *Credentials {
FILE: 12fa-docker-golang/chapter11/vendor/github.com/aws/aws-sdk-go/aws/credentials/credentials.go
type Value (line 70) | type Value struct
type Provider (line 90) | type Provider interface
type ErrorProvider (line 103) | type ErrorProvider struct
method Retrieve (line 112) | func (p ErrorProvider) Retrieve() (Value, error) {
method IsExpired (line 117) | func (p ErrorProvider) IsExpired() bool {
type Expiry (line 132) | type Expiry struct
method SetExpiration (line 150) | func (e *Expiry) SetExpiration(expiration time.Time, window time.Durat...
method IsExpired (line 158) | func (e *Expiry) IsExpired() bool {
type Credentials (line 176) | type Credentials struct
method Get (line 201) | func (c *Credentials) Get() (Value, error) {
method Expire (line 222) | func (c *Credentials) Expire() {
method IsExpired (line 234) | func (c *Credentials) IsExpired() bool {
method isExpired (line 242) | func (c *Credentials) isExpired() bool {
function NewCredentials (line 185) | func NewCredentials(provider Provider) *Credentials {
FILE: 12fa-docker-golang/chapter11/vendor/github.com/aws/aws-sdk-go/aws/credentials/ec2rolecreds/ec2_role_provider.go
constant ProviderName (line 18) | ProviderName = "EC2RoleProvider"
type EC2RoleProvider (line 37) | type EC2RoleProvider struct
method Retrieve (line 88) | func (m *EC2RoleProvider) Retrieve() (credentials.Value, error) {
function NewCredentials (line 58) | func NewCredentials(c client.ConfigProvider, options ...func(*EC2RolePro...
function NewCredentialsWithClient (line 73) | func NewCredentialsWithClient(client *ec2metadata.EC2Metadata, options ....
type ec2RoleCredRespBody (line 116) | type ec2RoleCredRespBody struct
constant iamSecurityCredsPath (line 128) | iamSecurityCredsPath = "/iam/security-credentials"
function requestCredList (line 132) | func requestCredList(client *ec2metadata.EC2Metadata) ([]string, error) {
function requestCred (line 155) | func requestCred(client *ec2metadata.EC2Metadata, credsName string) (ec2...
FILE: 12fa-docker-golang/chapter11/vendor/github.com/aws/aws-sdk-go/aws/credentials/endpointcreds/provider.go
constant ProviderName (line 45) | ProviderName = `CredentialsEndpointProvider`
type Provider (line 49) | type Provider struct
method IsExpired (line 104) | func (p *Provider) IsExpired() bool {
method Retrieve (line 113) | func (p *Provider) Retrieve() (credentials.Value, error) {
method getCredentials (line 146) | func (p *Provider) getCredentials() (*getCredentialsOutput, error) {
function NewProviderClient (line 72) | func NewProviderClient(cfg aws.Config, handlers request.Handlers, endpoi...
function NewCredentialsClient (line 98) | func NewCredentialsClient(cfg aws.Config, handlers request.Handlers, end...
type getCredentialsOutput (line 134) | type getCredentialsOutput struct
type errorOutput (line 141) | type errorOutput struct
function validateEndpointHandler (line 159) | func validateEndpointHandler(r *request.Request) {
function unmarshalHandler (line 165) | func unmarshalHandler(r *request.Request) {
function unmarshalError (line 177) | func unmarshalError(r *request.Request) {
FILE: 12fa-docker-golang/chapter11/vendor/github.com/aws/aws-sdk-go/aws/credentials/env_provider.go
constant EnvProviderName (line 10) | EnvProviderName = "EnvProvider"
type EnvProvider (line 33) | type EnvProvider struct
method Retrieve (line 44) | func (e *EnvProvider) Retrieve() (Value, error) {
method IsExpired (line 75) | func (e *EnvProvider) IsExpired() bool {
function NewEnvCredentials (line 39) | func NewEnvCredentials() *Credentials {
FILE: 12fa-docker-golang/chapter11/vendor/github.com/aws/aws-sdk-go/aws/credentials/shared_credentials_provider.go
constant SharedCredsProviderName (line 14) | SharedCredsProviderName = "SharedCredentialsProvider"
type SharedCredentialsProvider (line 27) | type SharedCredentialsProvider struct
method Retrieve (line 56) | func (p *SharedCredentialsProvider) Retrieve() (Value, error) {
method IsExpired (line 74) | func (p *SharedCredentialsProvider) IsExpired() bool {
method filename (line 119) | func (p *SharedCredentialsProvider) filename() (string, error) {
method profile (line 142) | func (p *SharedCredentialsProvider) profile() string {
function NewSharedCredentials (line 47) | func NewSharedCredentials(filename, profile string) *Credentials {
function loadProfile (line 81) | func loadProfile(filename, profile string) (Value, error) {
FILE: 12fa-docker-golang/chapter11/vendor/github.com/aws/aws-sdk-go/aws/credentials/static_provider.go
constant StaticProviderName (line 8) | StaticProviderName = "StaticProvider"
type StaticProvider (line 19) | type StaticProvider struct
method Retrieve (line 41) | func (s *StaticProvider) Retrieve() (Value, error) {
method IsExpired (line 55) | func (s *StaticProvider) IsExpired() bool {
function NewStaticCredentials (line 25) | func NewStaticCredentials(id, secret, token string) *Credentials {
function NewStaticCredentialsFromCreds (line 36) | func NewStaticCredentialsFromCreds(creds Value) *Credentials {
FILE: 12fa-docker-golang/chapter11/vendor/github.com/aws/aws-sdk-go/aws/credentials/stscreds/assume_role_provider.go
function StdinTokenProvider (line 103) | func StdinTokenProvider() (string, error) {
constant ProviderName (line 112) | ProviderName = "AssumeRoleProvider"
type AssumeRoler (line 115) | type AssumeRoler interface
type AssumeRoleProvider (line 133) | type AssumeRoleProvider struct
method Retrieve (line 246) | func (p *AssumeRoleProvider) Retrieve() (credentials.Value, error) {
function NewCredentials (line 208) | func NewCredentials(c client.ConfigProvider, roleARN string, options ......
function NewCredentialsWithClient (line 231) | func NewCredentialsWithClient(svc AssumeRoler, roleARN string, options ....
FILE: 12fa-docker-golang/chapter11/vendor/github.com/aws/aws-sdk-go/aws/defaults/defaults.go
type Defaults (line 29) | type Defaults struct
function Get (line 35) | func Get() Defaults {
function Config (line 53) | func Config() *aws.Config {
function Handlers (line 69) | func Handlers() request.Handlers {
function CredChain (line 90) | func CredChain(cfg *aws.Config, handlers request.Handlers) *credentials....
constant httpProviderEnvVar (line 102) | httpProviderEnvVar = "AWS_CONTAINER_CREDENTIALS_FULL_URI"
constant ecsCredsProviderEnvVar (line 103) | ecsCredsProviderEnvVar = "AWS_CONTAINER_CREDENTIALS_RELATIVE_URI"
function RemoteCredProvider (line 108) | func RemoteCredProvider(cfg aws.Config, handlers request.Handlers) crede...
function localHTTPCredProvider (line 121) | func localHTTPCredProvider(cfg aws.Config, handlers request.Handlers, u ...
function httpCredProvider (line 144) | func httpCredProvider(cfg aws.Config, handlers request.Handlers, u strin...
function ec2RoleProvider (line 152) | func ec2RoleProvider(cfg aws.Config, handlers request.Handlers) credenti...
FILE: 12fa-docker-golang/chapter11/vendor/github.com/aws/aws-sdk-go/aws/ec2metadata/api.go
method GetMetadata (line 18) | func (c *EC2Metadata) GetMetadata(p string) (string, error) {
method GetUserData (line 34) | func (c *EC2Metadata) GetUserData() (string, error) {
method GetDynamicData (line 55) | func (c *EC2Metadata) GetDynamicData(p string) (string, error) {
method GetInstanceIdentityDocument (line 71) | func (c *EC2Metadata) GetInstanceIdentityDocument() (EC2InstanceIdentity...
method IAMInfo (line 90) | func (c *EC2Metadata) IAMInfo() (EC2IAMInfo, error) {
method Region (line 115) | func (c *EC2Metadata) Region() (string, error) {
method Available (line 128) | func (c *EC2Metadata) Available() bool {
type EC2IAMInfo (line 138) | type EC2IAMInfo struct
type EC2InstanceIdentityDocument (line 147) | type EC2InstanceIdentityDocument struct
FILE: 12fa-docker-golang/chapter11/vendor/github.com/aws/aws-sdk-go/aws/ec2metadata/service.go
constant ServiceName (line 20) | ServiceName = "ec2metadata"
type EC2Metadata (line 23) | type EC2Metadata struct
function New (line 37) | func New(p client.ConfigProvider, cfgs ...*aws.Config) *EC2Metadata {
function NewClient (line 49) | func NewClient(cfg aws.Config, handlers request.Handlers, endpoint, sign...
function httpClientZero (line 86) | func httpClientZero(c *http.Client) bool {
type metadataOutput (line 90) | type metadataOutput struct
function unmarshalHandler (line 94) | func unmarshalHandler(r *request.Request) {
function unmarshalError (line 107) | func unmarshalError(r *request.Request) {
function validateEndpointHandler (line 120) | func validateEndpointHandler(r *request.Request) {
FILE: 12fa-docker-golang/chapter11/vendor/github.com/aws/aws-sdk-go/aws/endpoints/decode.go
type modelDefinition (line 11) | type modelDefinition
type DecodeModelOptions (line 15) | type DecodeModelOptions struct
method Set (line 20) | func (d *DecodeModelOptions) Set(optFns ...func(*DecodeModelOptions)) {
function DecodeModel (line 40) | func DecodeModel(r io.Reader, optFns ...func(*DecodeModelOptions)) (Reso...
function decodeV3Endpoints (line 66) | func decodeV3Endpoints(modelDef modelDefinition, opts DecodeModelOptions...
function custAddS3DualStack (line 92) | func custAddS3DualStack(p *partition) {
function custAddEC2Metadata (line 108) | func custAddEC2Metadata(p *partition) {
function custRmIotDataService (line 121) | func custRmIotDataService(p *partition) {
type decodeModelError (line 125) | type decodeModelError struct
function newDecodeModelError (line 129) | func newDecodeModelError(msg string, err error) decodeModelError {
FILE: 12fa-docker-golang/chapter11/vendor/github.com/aws/aws-sdk-go/aws/endpoints/defaults.go
constant AwsPartitionID (line 11) | AwsPartitionID = "aws"
constant AwsCnPartitionID (line 12) | AwsCnPartitionID = "aws-cn"
constant AwsUsGovPartitionID (line 13) | AwsUsGovPartitionID = "aws-us-gov"
constant ApNortheast1RegionID (line 18) | ApNortheast1RegionID = "ap-northeast-1"
constant ApNortheast2RegionID (line 19) | ApNortheast2RegionID = "ap-northeast-2"
constant ApSouth1RegionID (line 20) | ApSouth1RegionID = "ap-south-1"
constant ApSoutheast1RegionID (line 21) | ApSoutheast1RegionID = "ap-southeast-1"
constant ApSoutheast2RegionID (line 22) | ApSoutheast2RegionID = "ap-southeast-2"
constant CaCentral1RegionID (line 23) | CaCentral1RegionID = "ca-central-1"
constant EuCentral1RegionID (line 24) | EuCentral1RegionID = "eu-central-1"
constant EuWest1RegionID (line 25) | EuWest1RegionID = "eu-west-1"
constant EuWest2RegionID (line 26) | EuWest2RegionID = "eu-west-2"
constant SaEast1RegionID (line 27) | SaEast1RegionID = "sa-east-1"
constant UsEast1RegionID (line 28) | UsEast1RegionID = "us-east-1"
constant UsEast2RegionID (line 29) | UsEast2RegionID = "us-east-2"
constant UsWest1RegionID (line 30) | UsWest1RegionID = "us-west-1"
constant UsWest2RegionID (line 31) | UsWest2RegionID = "us-west-2"
constant CnNorth1RegionID (line 36) | CnNorth1RegionID = "cn-north-1"
constant UsGovWest1RegionID (line 41) | UsGovWest1RegionID = "us-gov-west-1"
constant AcmServiceID (line 46) | AcmServiceID = "acm"
constant ApigatewayServiceID (line 47) | ApigatewayServiceID = "apigateway"
constant ApplicationAutoscalingServiceID (line 48) | ApplicationAutoscalingServiceID = "application-autoscaling"
constant Appstream2ServiceID (line 49) | Appstream2ServiceID = "appstream2"
constant AutoscalingServiceID (line 50) | AutoscalingServiceID = "autoscaling"
constant BatchServiceID (line 51) | BatchServiceID = "batch"
constant BudgetsServiceID (line 52) | BudgetsServiceID = "budgets"
constant ClouddirectoryServiceID (line 53) | ClouddirectoryServiceID = "clouddirectory"
constant CloudformationServiceID (line 54) | CloudformationServiceID = "cloudformation"
constant CloudfrontServiceID (line 55) | CloudfrontServiceID = "cloudfront"
constant CloudhsmServiceID (line 56) | CloudhsmServiceID = "cloudhsm"
constant CloudsearchServiceID (line 57) | CloudsearchServiceID = "cloudsearch"
constant CloudtrailServiceID (line 58) | CloudtrailServiceID = "cloudtrail"
constant CodebuildServiceID (line 59) | CodebuildServiceID = "codebuild"
constant CodecommitServiceID (line 60) | CodecommitServiceID = "codecommit"
constant CodedeployServiceID (line 61) | CodedeployServiceID = "codedeploy"
constant CodepipelineServiceID (line 62) | CodepipelineServiceID = "codepipeline"
constant CognitoIdentityServiceID (line 63) | CognitoIdentityServiceID = "cognito-identity"
constant CognitoIdpServiceID (line 64) | CognitoIdpServiceID = "cognito-idp"
constant CognitoSyncServiceID (line 65) | CognitoSyncServiceID = "cognito-sync"
constant ConfigServiceID (line 66) | ConfigServiceID = "config"
constant CurServiceID (line 67) | CurServiceID = "cur"
constant DatapipelineServiceID (line 68) | DatapipelineServiceID = "datapipeline"
constant DevicefarmServiceID (line 69) | DevicefarmServiceID = "devicefarm"
constant DirectconnectServiceID (line 70) | DirectconnectServiceID = "directconnect"
constant DiscoveryServiceID (line 71) | DiscoveryServiceID = "discovery"
constant DmsServiceID (line 72) | DmsServiceID = "dms"
constant DsServiceID (line 73) | DsServiceID = "ds"
constant DynamodbServiceID (line 74) | DynamodbServiceID = "dynamodb"
constant Ec2ServiceID (line 75) | Ec2ServiceID = "ec2"
constant Ec2metadataServiceID (line 76) | Ec2metadataServiceID = "ec2metadata"
constant EcrServiceID (line 77) | EcrServiceID = "ecr"
constant EcsServiceID (line 78) | EcsServiceID = "ecs"
constant ElasticacheServiceID (line 79) | ElasticacheServiceID = "elasticache"
constant ElasticbeanstalkServiceID (line 80) | ElasticbeanstalkServiceID = "elasticbeanstalk"
constant ElasticfilesystemServiceID (line 81) | ElasticfilesystemServiceID = "elasticfilesystem"
constant ElasticloadbalancingServiceID (line 82) | ElasticloadbalancingServiceID = "elasticloadbalancing"
constant ElasticmapreduceServiceID (line 83) | ElasticmapreduceServiceID = "elasticmapreduce"
constant ElastictranscoderServiceID (line 84) | ElastictranscoderServiceID = "elastictranscoder"
constant EmailServiceID (line 85) | EmailServiceID = "email"
constant EsServiceID (line 86) | EsServiceID = "es"
constant EventsServiceID (line 87) | EventsServiceID = "events"
constant FirehoseServiceID (line 88) | FirehoseServiceID = "firehose"
constant GameliftServiceID (line 89) | GameliftServiceID = "gamelift"
constant GlacierServiceID (line 90) | GlacierServiceID = "glacier"
constant HealthServiceID (line 91) | HealthServiceID = "health"
constant IamServiceID (line 92) | IamServiceID = "iam"
constant ImportexportServiceID (line 93) | ImportexportServiceID = "importexport"
constant InspectorServiceID (line 94) | InspectorServiceID = "inspector"
constant IotServiceID (line 95) | IotServiceID = "iot"
constant KinesisServiceID (line 96) | KinesisServiceID = "kinesis"
constant KinesisanalyticsServiceID (line 97) | KinesisanalyticsServiceID = "kinesisanalytics"
constant KmsServiceID (line 98) | KmsServiceID = "kms"
constant LambdaServiceID (line 99) | LambdaServiceID = "lambda"
constant LightsailServiceID (line 100) | LightsailServiceID = "lightsail"
constant LogsServiceID (line 101) | LogsServiceID = "logs"
constant MachinelearningServiceID (line 102) | MachinelearningServiceID = "machinelearning"
constant MarketplacecommerceanalyticsServiceID (line 103) | MarketplacecommerceanalyticsServiceID = "marketplacecommerceanalytics"
constant MeteringMarketplaceServiceID (line 104) | MeteringMarketplaceServiceID = "metering.marketplace"
constant MobileanalyticsServiceID (line 105) | MobileanalyticsServiceID = "mobileanalytics"
constant MonitoringServiceID (line 106) | MonitoringServiceID = "monitoring"
constant MturkRequesterServiceID (line 107) | MturkRequesterServiceID = "mturk-requester"
constant OpsworksServiceID (line 108) | OpsworksServiceID = "opsworks"
constant OpsworksCmServiceID (line 109) | OpsworksCmServiceID = "opsworks-cm"
constant OrganizationsServiceID (line 110) | OrganizationsServiceID = "organizations"
constant PinpointServiceID (line 111) | PinpointServiceID = "pinpoint"
constant PollyServiceID (line 112) | PollyServiceID = "polly"
constant RdsServiceID (line 113) | RdsServiceID = "rds"
constant RedshiftServiceID (line 114) | RedshiftServiceID = "redshift"
constant RekognitionServiceID (line 115) | RekognitionServiceID = "rekognition"
constant Route53ServiceID (line 116) | Route53ServiceID = "route53"
constant Route53domainsServiceID (line 117) | Route53domainsServiceID = "route53domains"
constant RuntimeLexServiceID (line 118) | RuntimeLexServiceID = "runtime.lex"
constant S3ServiceID (line 119) | S3ServiceID = "s3"
constant SdbServiceID (line 120) | SdbServiceID = "sdb"
constant ServicecatalogServiceID (line 121) | ServicecatalogServiceID = "servicecatalog"
constant ShieldServiceID (line 122) | ShieldServiceID = "shield"
constant SmsServiceID (line 123) | SmsServiceID = "sms"
constant SnowballServiceID (line 124) | SnowballServiceID = "snowball"
constant SnsServiceID (line 125) | SnsServiceID = "sns"
constant SqsServiceID (line 126) | SqsServiceID = "sqs"
constant SsmServiceID (line 127) | SsmServiceID = "ssm"
constant StatesServiceID (line 128) | StatesServiceID = "states"
constant StoragegatewayServiceID (line 129) | StoragegatewayServiceID = "storagegateway"
constant StreamsDynamodbServiceID (line 130) | StreamsDynamodbServiceID = "streams.dynamodb"
constant StsServiceID (line 131) | StsServiceID = "sts"
constant SupportServiceID (line 132) | SupportServiceID = "support"
constant SwfServiceID (line 133) | SwfServiceID = "swf"
constant TaggingServiceID (line 134) | TaggingServiceID = "tagging"
constant WafServiceID (line 135) | WafServiceID = "waf"
constant WafRegionalServiceID (line 136) | WafRegionalServiceID = "waf-regional"
constant WorkdocsServiceID (line 137) | WorkdocsServiceID = "workdocs"
constant WorkspacesServiceID (line 138) | WorkspacesServiceID = "workspaces"
constant XrayServiceID (line 139) | XrayServiceID = "xray"
function DefaultResolver (line 154) | func DefaultResolver() Resolver {
function AwsPartition (line 165) | func AwsPartition() Partition {
function AwsCnPartition (line 1662) | func AwsCnPartition() Partition {
function AwsUsGovPartition (line 1904) | func AwsUsGovPartition() Partition {
FILE: 12fa-docker-golang/chapter11/vendor/github.com/aws/aws-sdk-go/aws/endpoints/endpoints.go
type Options (line 12) | type Options struct
method Set (line 52) | func (o *Options) Set(optFns ...func(*Options)) {
function DisableSSLOption (line 60) | func DisableSSLOption(o *Options) {
function UseDualStackOption (line 66) | func UseDualStackOption(o *Options) {
function StrictMatchingOption (line 72) | func StrictMatchingOption(o *Options) {
function ResolveUnknownServiceOption (line 78) | func ResolveUnknownServiceOption(o *Options) {
type Resolver (line 84) | type Resolver interface
type ResolverFunc (line 91) | type ResolverFunc
method EndpointFor (line 94) | func (fn ResolverFunc) EndpointFor(service, region string, opts ...fun...
function AddScheme (line 105) | func AddScheme(endpoint string, disableSSL bool) string {
type EnumPartitions (line 123) | type EnumPartitions interface
type Partition (line 129) | type Partition struct
method ID (line 135) | func (p *Partition) ID() string { return p.id }
method EndpointFor (line 158) | func (p *Partition) EndpointFor(service, region string, opts ...func(*...
method Regions (line 164) | func (p *Partition) Regions() map[string]Region {
method Services (line 178) | func (p *Partition) Services() map[string]Service {
type Region (line 192) | type Region struct
method ID (line 198) | func (r *Region) ID() string { return r.id }
method ResolveEndpoint (line 202) | func (r *Region) ResolveEndpoint(service string, opts ...func(*Options...
method Services (line 207) | func (r *Region) Services() map[string]Service {
type Service (line 223) | type Service struct
method ID (line 229) | func (s *Service) ID() string { return s.id }
method ResolveEndpoint (line 233) | func (s *Service) ResolveEndpoint(region string, opts ...func(*Options...
method Endpoints (line 239) | func (s *Service) Endpoints() map[string]Endpoint {
type Endpoint (line 255) | type Endpoint struct
method ID (line 262) | func (e *Endpoint) ID() string { return e.id }
method ServiceID (line 265) | func (e *Endpoint) ServiceID() string { return e.serviceID }
method ResolveEndpoint (line 270) | func (e *Endpoint) ResolveEndpoint(opts ...func(*Options)) (ResolvedEn...
type ResolvedEndpoint (line 276) | type ResolvedEndpoint struct
type awsError (line 292) | type awsError
type EndpointNotFoundError (line 296) | type EndpointNotFoundError struct
type UnknownServiceError (line 328) | type UnknownServiceError struct
method Error (line 347) | func (e UnknownServiceError) Error() string {
method String (line 357) | func (e UnknownServiceError) String() string {
function NewUnknownServiceError (line 336) | func NewUnknownServiceError(p, s string, known []string) UnknownServiceE...
type UnknownEndpointError (line 364) | type UnknownEndpointError struct
method Error (line 385) | func (e UnknownEndpointError) Error() string {
method String (line 395) | func (e UnknownEndpointError) String() string {
function NewUnknownEndpointError (line 373) | func NewUnknownEndpointError(p, s, r string, known []string) UnknownEndp...
FILE: 12fa-docker-golang/chapter11/vendor/github.com/aws/aws-sdk-go/aws/endpoints/v3model.go
type partitions (line 10) | type partitions
method EndpointFor (line 12) | func (ps partitions) EndpointFor(service, region string, opts ...func(...
method Partitions (line 36) | func (ps partitions) Partitions() []Partition {
type partition (line 45) | type partition struct
method Partition (line 55) | func (p partition) Partition() Partition {
method canResolveEndpoint (line 62) | func (p partition) canResolveEndpoint(service, region string, strictMa...
method EndpointFor (line 77) | func (p partition) EndpointFor(service, region string, opts ...func(*O...
function serviceList (line 97) | func serviceList(ss services) []string {
function endpointList (line 104) | func endpointList(es endpoints) []string {
type regionRegex (line 112) | type regionRegex struct
method UnmarshalJSON (line 116) | func (rr *regionRegex) UnmarshalJSON(b []byte) (err error) {
type regions (line 130) | type regions
type region (line 132) | type region struct
type services (line 136) | type services
type service (line 138) | type service struct
method endpointForRegion (line 145) | func (s *service) endpointForRegion(region string) (endpoint, bool) {
type endpoints (line 159) | type endpoints
type endpoint (line 161) | type endpoint struct
method resolve (line 203) | func (e endpoint) resolve(service, region, dnsSuffix string, defs []en...
method mergeIn (line 250) | func (e *endpoint) mergeIn(other endpoint) {
constant defaultProtocol (line 178) | defaultProtocol = "https"
constant defaultSigner (line 179) | defaultSigner = "v4"
function getByPriority (line 187) | func getByPriority(s []string, p []string, def string) string {
function getEndpointScheme (line 242) | func getEndpointScheme(protocols []string, disableSSL bool) string {
type credentialScope (line 277) | type credentialScope struct
type boxedBool (line 282) | type boxedBool
method UnmarshalJSON (line 284) | func (b *boxedBool) UnmarshalJSON(buf []byte) error {
constant boxedBoolUnset (line 300) | boxedBoolUnset boxedBool = iota
constant boxedFalse (line 301) | boxedFalse
constant boxedTrue (line 302) | boxedTrue
FILE: 12fa-docker-golang/chapter11/vendor/github.com/aws/aws-sdk-go/aws/endpoints/v3model_codegen.go
type CodeGenOptions (line 16) | type CodeGenOptions struct
method Set (line 22) | func (d *CodeGenOptions) Set(optFns ...func(*CodeGenOptions)) {
function CodeGenModel (line 31) | func CodeGenModel(modelFile io.Reader, outFile io.Writer, optFns ...func...
function toSymbol (line 50) | func toSymbol(v string) string {
function quoteString (line 63) | func quoteString(v string) string {
function regionConstName (line 67) | func regionConstName(p, r string) string {
function partitionGetter (line 71) | func partitionGetter(id string) string {
function partitionVarName (line 75) | func partitionVarName(id string) string {
function listPartitionNames (line 79) | func listPartitionNames(ps partitions) string {
function boxedBoolIfSet (line 98) | func boxedBoolIfSet(msg string, v boxedBool) string {
function stringIfSet (line 109) | func stringIfSet(msg, v string) string {
function stringSliceIfSet (line 117) | func stringSliceIfSet(msg string, vs []string) string {
function endpointIsSet (line 130) | func endpointIsSet(v endpoint) bool {
function serviceSet (line 134) | func serviceSet(ps partitions) map[string]struct{} {
constant v3Tmpl (line 159) | v3Tmpl = `
FILE: 12fa-docker-golang/chapter11/vendor/github.com/aws/aws-sdk-go/aws/jsonvalue.go
type JSONValue (line 11) | type JSONValue
FILE: 12fa-docker-golang/chapter11/vendor/github.com/aws/aws-sdk-go/aws/logger.go
type LogLevelType (line 10) | type LogLevelType
method Value (line 20) | func (l *LogLevelType) Value() LogLevelType {
method Matches (line 30) | func (l *LogLevelType) Matches(v LogLevelType) bool {
method AtLeast (line 38) | func (l *LogLevelType) AtLeast(v LogLevelType) bool {
function LogLevel (line 14) | func LogLevel(l LogLevelType) *LogLevelType {
constant LogOff (line 46) | LogOff LogLevelType = iota * 0x1000
constant LogDebug (line 50) | LogDebug
constant LogDebugWithSigning (line 58) | LogDebugWithSigning LogLevelType = LogDebug | (1 << iota)
constant LogDebugWithHTTPBody (line 64) | LogDebugWithHTTPBody
constant LogDebugWithRequestRetries (line 69) | LogDebugWithRequestRetries
constant LogDebugWithRequestErrors (line 73) | LogDebugWithRequestErrors
type Logger (line 78) | type Logger interface
type LoggerFunc (line 89) | type LoggerFunc
method Log (line 92) | func (f LoggerFunc) Log(args ...interface{}) {
function NewDefaultLogger (line 98) | func NewDefaultLogger() Logger {
type defaultLogger (line 105) | type defaultLogger struct
method Log (line 110) | func (l defaultLogger) Log(args ...interface{}) {
FILE: 12fa-docker-golang/chapter11/vendor/github.com/aws/aws-sdk-go/aws/request/handlers.go
type Handlers (line 10) | type Handlers struct
method Copy (line 25) | func (h *Handlers) Copy() Handlers {
method Clear (line 42) | func (h *Handlers) Clear() {
type HandlerListRunItem (line 58) | type HandlerListRunItem struct
type HandlerList (line 65) | type HandlerList struct
method copy (line 87) | func (l *HandlerList) copy() HandlerList {
method Clear (line 100) | func (l *HandlerList) Clear() {
method Len (line 105) | func (l *HandlerList) Len() int {
method PushBack (line 110) | func (l *HandlerList) PushBack(f func(*Request)) {
method PushBackNamed (line 115) | func (l *HandlerList) PushBackNamed(n NamedHandler) {
method PushFront (line 123) | func (l *HandlerList) PushFront(f func(*Request)) {
method PushFrontNamed (line 128) | func (l *HandlerList) PushFrontNamed(n NamedHandler) {
method Remove (line 141) | func (l *HandlerList) Remove(n NamedHandler) {
method RemoveByName (line 146) | func (l *HandlerList) RemoveByName(name string) {
method Run (line 162) | func (l *HandlerList) Run(r *Request) {
type NamedHandler (line 81) | type NamedHandler struct
function HandlerListLogItem (line 177) | func HandlerListLogItem(item HandlerListRunItem) bool {
function HandlerListStopOnError (line 190) | func HandlerListStopOnError(item HandlerListRunItem) bool {
function WithAppendUserAgent (line 196) | func WithAppendUserAgent(s string) Option {
function MakeAddToUserAgentHandler (line 209) | func MakeAddToUserAgentHandler(name, version string, extra ...string) fu...
function MakeAddToUserAgentFreeFormHandler (line 221) | func MakeAddToUserAgentFreeFormHandler(s string) func(*Request) {
FILE: 12fa-docker-golang/chapter11/vendor/github.com/aws/aws-sdk-go/aws/request/http_request.go
function copyHTTPRequest (line 9) | func copyHTTPRequest(r *http.Request, body io.ReadCloser) *http.Request {
FILE: 12fa-docker-golang/chapter11/vendor/github.com/aws/aws-sdk-go/aws/request/offset_reader.go
type offsetReader (line 10) | type offsetReader struct
method Close (line 26) | func (o *offsetReader) Close() error {
method Read (line 34) | func (o *offsetReader) Read(p []byte) (int, error) {
method Seek (line 46) | func (o *offsetReader) Seek(offset int64, whence int) (int64, error) {
method CloseAndCopy (line 55) | func (o *offsetReader) CloseAndCopy(offset int64) *offsetReader {
function newOffsetReader (line 16) | func newOffsetReader(buf io.ReadSeeker, offset int64) *offsetReader {
FILE: 12fa-docker-golang/chapter11/vendor/github.com/aws/aws-sdk-go/aws/request/request.go
constant ErrCodeSerialization (line 22) | ErrCodeSerialization = "SerializationError"
constant ErrCodeResponseTimeout (line 26) | ErrCodeResponseTimeout = "ResponseTimeout"
constant CanceledErrorCode (line 31) | CanceledErrorCode = "RequestCanceled"
type Request (line 35) | type Request struct
method ApplyOptions (line 173) | func (r *Request) ApplyOptions(opts ...Option) {
method Context (line 181) | func (r *Request) Context() aws.Context {
method SetContext (line 204) | func (r *Request) SetContext(ctx aws.Context) {
method WillRetry (line 212) | func (r *Request) WillRetry() bool {
method ParamsFilled (line 219) | func (r *Request) ParamsFilled() bool {
method DataFilled (line 226) | func (r *Request) DataFilled() bool {
method SetBufferBody (line 232) | func (r *Request) SetBufferBody(buf []byte) {
method SetStringBody (line 237) | func (r *Request) SetStringBody(s string) {
method SetReaderBody (line 242) | func (r *Request) SetReaderBody(reader io.ReadSeeker) {
method Presign (line 249) | func (r *Request) Presign(expireTime time.Duration) (string, error) {
method PresignRequest (line 270) | func (r *Request) PresignRequest(expireTime time.Duration) (string, ht...
method Build (line 304) | func (r *Request) Build() error {
method Sign (line 326) | func (r *Request) Sign() error {
method ResetBody (line 340) | func (r *Request) ResetBody() {
method GetBody (line 426) | func (r *Request) GetBody() io.ReadSeeker {
method Send (line 443) | func (r *Request) Send() error {
method copy (line 529) | func (r *Request) copy() *Request {
type Operation (line 71) | type Operation struct
function New (line 86) | func New(cfg aws.Config, clientInfo metadata.ClientInfo, handlers Handlers,
type Option (line 125) | type Option
function WithGetResponseHeader (line 139) | func WithGetResponseHeader(key string, val *string) Option {
function WithGetResponseHeaders (line 153) | func WithGetResponseHeaders(headers *http.Header) Option {
function WithLogLevel (line 165) | func WithLogLevel(l aws.LogLevelType) Option {
function debugLogReqError (line 280) | func debugLogReqError(r *Request, stage string, retrying bool, err error) {
function computeBodyLength (line 392) | func computeBodyLength(r io.ReadSeeker) (int64, error) {
function AddToUserAgent (line 539) | func AddToUserAgent(r *Request, s string) {
function shouldRetryCancel (line 547) | func shouldRetryCancel(r *Request) bool {
FILE: 12fa-docker-golang/chapter11/vendor/github.com/aws/aws-sdk-go/aws/request/request_1_7.go
type noBody (line 13) | type noBody struct
method Read (line 15) | func (noBody) Read([]byte) (int, error) { return 0, io.EOF }
method Close (line 16) | func (noBody) Close() error { return nil }
method WriteTo (line 17) | func (noBody) WriteTo(io.Writer) (int64, error) { return 0, nil }
FILE: 12fa-docker-golang/chapter11/vendor/github.com/aws/aws-sdk-go/aws/request/request_context.go
function setRequestContext (line 11) | func setRequestContext(r *Request, ctx aws.Context) {
FILE: 12fa-docker-golang/chapter11/vendor/github.com/aws/aws-sdk-go/aws/request/request_context_1_6.go
function setRequestContext (line 11) | func setRequestContext(r *Request, ctx aws.Context) {
FILE: 12fa-docker-golang/chapter11/vendor/github.com/aws/aws-sdk-go/aws/request/request_pagination.go
type Pagination (line 29) | type Pagination struct
method HasNextPage (line 51) | func (p *Pagination) HasNextPage() bool {
method Err (line 56) | func (p *Pagination) Err() error {
method Page (line 63) | func (p *Pagination) Page() interface{} {
method Next (line 75) | func (p *Pagination) Next() bool {
type Paginator (line 112) | type Paginator struct
method nextPageTokens (line 120) | func (r *Request) nextPageTokens() []interface{} {
function logDeprecatedf (line 161) | func logDeprecatedf(logger aws.Logger, flag *int32, msg string) {
method HasNextPage (line 179) | func (r *Request) HasNextPage() bool {
method NextPage (line 190) | func (r *Request) NextPage() *Request {
method EachPage (line 222) | func (r *Request) EachPage(fn func(data interface{}, isLastPage bool) (s...
FILE: 12fa-docker-golang/chapter11/vendor/github.com/aws/aws-sdk-go/aws/request/retryer.go
type Retryer (line 13) | type Retryer interface
function WithRetryer (line 21) | func WithRetryer(cfg *aws.Config, retryer Retryer) *aws.Config {
function isCodeThrottle (line 55) | func isCodeThrottle(code string) bool {
function isCodeRetryable (line 60) | func isCodeRetryable(code string) bool {
function isCodeExpiredCreds (line 68) | func isCodeExpiredCreds(code string) bool {
function isSerializationErrorRetryable (line 73) | func isSerializationErrorRetryable(err error) bool {
function IsErrorRetryable (line 87) | func IsErrorRetryable(err error) bool {
function IsErrorThrottle (line 100) | func IsErrorThrottle(err error) bool {
function IsErrorExpiredCreds (line 111) | func IsErrorExpiredCreds(err error) bool {
method IsErrorRetryable (line 124) | func (r *Request) IsErrorRetryable() bool {
method IsErrorThrottle (line 132) | func (r *Request) IsErrorThrottle() bool {
method IsErrorExpired (line 140) | func (r *Request) IsErrorExpired() bool {
FILE: 12fa-docker-golang/chapter11/vendor/github.com/aws/aws-sdk-go/aws/request/serialization_error.go
function isErrConnectionReset (line 11) | func isErrConnectionReset(err error) bool {
FILE: 12fa-docker-golang/chapter11/vendor/github.com/aws/aws-sdk-go/aws/request/serialization_error_appengine.go
function isErrConnectionReset (line 9) | func isErrConnectionReset(err error) bool {
FILE: 12fa-docker-golang/chapter11/vendor/github.com/aws/aws-sdk-go/aws/request/timeout_read_closer.go
type readResult (line 16) | type readResult struct
type timeoutReadCloser (line 23) | type timeoutReadCloser struct
method Read (line 31) | func (r *timeoutReadCloser) Read(b []byte) (int, error) {
method Close (line 49) | func (r *timeoutReadCloser) Close() error {
constant HandlerResponseTimeout (line 56) | HandlerResponseTimeout = "ResponseTimeoutHandler"
function adaptToResponseTimeoutError (line 61) | func adaptToResponseTimeoutError(req *Request) {
function WithResponseReadTimeout (line 75) | func WithResponseReadTimeout(duration time.Duration) Option {
FILE: 12fa-docker-golang/chapter11/vendor/github.com/aws/aws-sdk-go/aws/request/validation.go
constant InvalidParameterErrCode (line 12) | InvalidParameterErrCode = "InvalidParameter"
constant ParamRequiredErrCode (line 14) | ParamRequiredErrCode = "ParamRequiredError"
constant ParamMinValueErrCode (line 17) | ParamMinValueErrCode = "ParamMinValueError"
constant ParamMinLenErrCode (line 19) | ParamMinLenErrCode = "ParamMinLenError"
type Validator (line 25) | type Validator interface
type ErrInvalidParams (line 31) | type ErrInvalidParams struct
method Add (line 40) | func (e *ErrInvalidParams) Add(err ErrInvalidParam) {
method AddNested (line 50) | func (e *ErrInvalidParams) AddNested(nestedCtx string, nested ErrInval...
method Len (line 59) | func (e ErrInvalidParams) Len() int {
method Code (line 64) | func (e ErrInvalidParams) Code() string {
method Message (line 69) | func (e ErrInvalidParams) Message() string {
method Error (line 74) | func (e ErrInvalidParams) Error() string {
method OrigErr (line 86) | func (e ErrInvalidParams) OrigErr() error {
method OrigErrs (line 92) | func (e ErrInvalidParams) OrigErrs() []error {
type ErrInvalidParam (line 102) | type ErrInvalidParam interface
type errInvalidParam (line 115) | type errInvalidParam struct
method Code (line 124) | func (e *errInvalidParam) Code() string {
method Message (line 129) | func (e *errInvalidParam) Message() string {
method Error (line 134) | func (e *errInvalidParam) Error() string {
method OrigErr (line 139) | func (e *errInvalidParam) OrigErr() error {
method Field (line 144) | func (e *errInvalidParam) Field() string {
method SetContext (line 158) | func (e *errInvalidParam) SetContext(ctx string) {
method AddNestedContext (line 163) | func (e *errInvalidParam) AddNestedContext(ctx string) {
type ErrParamRequired (line 173) | type ErrParamRequired struct
function NewErrParamRequired (line 178) | func NewErrParamRequired(field string) *ErrParamRequired {
type ErrParamMinValue (line 189) | type ErrParamMinValue struct
method MinValue (line 209) | func (e *ErrParamMinValue) MinValue() float64 {
function NewErrParamMinValue (line 195) | func NewErrParamMinValue(field string, min float64) *ErrParamMinValue {
type ErrParamMinLen (line 214) | type ErrParamMinLen struct
method MinLen (line 232) | func (e *ErrParamMinLen) MinLen() int {
function NewErrParamMinLen (line 220) | func NewErrParamMinLen(field string, min int) *ErrParamMinLen {
FILE: 12fa-docker-golang/chapter11/vendor/github.com/aws/aws-sdk-go/aws/request/waiter.go
constant WaiterResourceNotReadyErrorCode (line 14) | WaiterResourceNotReadyErrorCode = "ResourceNotReady"
type WaiterOption (line 18) | type WaiterOption
function WithWaiterMaxAttempts (line 22) | func WithWaiterMaxAttempts(max int) WaiterOption {
type WaiterDelay (line 34) | type WaiterDelay
function ConstantWaiterDelay (line 39) | func ConstantWaiterDelay(delay time.Duration) WaiterDelay {
function WithWaiterDelay (line 46) | func WithWaiterDelay(delayer WaiterDelay) WaiterOption {
function WithWaiterLogger (line 54) | func WithWaiterLogger(logger aws.Logger) WaiterOption {
function WithWaiterRequestOptions (line 63) | func WithWaiterRequestOptions(opts ...Option) WaiterOption {
type Waiter (line 74) | type Waiter struct
method ApplyOptions (line 87) | func (w *Waiter) ApplyOptions(opts ...WaiterOption) {
method WaitWithContext (line 168) | func (w Waiter) WaitWithContext(ctx aws.Context) error {
type WaiterState (line 95) | type WaiterState
method String (line 98) | func (s WaiterState) String() string {
constant SuccessWaiterState (line 113) | SuccessWaiterState WaiterState = iota
constant FailureWaiterState (line 114) | FailureWaiterState
constant RetryWaiterState (line 115) | RetryWaiterState
type WaiterMatchMode (line 120) | type WaiterMatchMode
method String (line 134) | func (m WaiterMatchMode) String() string {
constant PathAllWaiterMatch (line 125) | PathAllWaiterMatch WaiterMatchMode = iota
constant PathWaiterMatch (line 126) | PathWaiterMatch
constant PathAnyWaiterMatch (line 127) | PathAnyWaiterMatch
constant PathListWaiterMatch (line 128) | PathListWaiterMatch
constant StatusWaiterMatch (line 129) | StatusWaiterMatch
constant ErrorWaiterMatch (line 130) | ErrorWaiterMatch
type WaiterAcceptor (line 208) | type WaiterAcceptor struct
method match (line 218) | func (a *WaiterAcceptor) match(name string, l aws.Logger, req *Request...
function waiterLogf (line 283) | func waiterLogf(logger aws.Logger, msg string, args ...interface{}) {
FILE: 12fa-docker-golang/chapter11/vendor/github.com/aws/aws-sdk-go/aws/session/env_config.go
type envConfig (line 15) | type envConfig struct
function loadEnvConfig (line 127) | func loadEnvConfig() envConfig {
function loadSharedEnvConfig (line 138) | func loadSharedEnvConfig() envConfig {
function envConfigLoad (line 142) | func envConfigLoad(enableSharedConfig bool) envConfig {
function setFromEnvVal (line 176) | func setFromEnvVal(dst *string, keys []string) {
function sharedCredentialsFilename (line 185) | func sharedCredentialsFilename() string {
function sharedConfigFilename (line 193) | func sharedConfigFilename() string {
function userHomeDir (line 201) | func userHomeDir() string {
FILE: 12fa-docker-golang/chapter11/vendor/github.com/aws/aws-sdk-go/aws/session/session.go
type Session (line 30) | type Session struct
method Copy (line 512) | func (s *Session) Copy(cfgs ...*aws.Config) *Session {
method ClientConfig (line 526) | func (s *Session) ClientConfig(serviceName string, cfgs ...*aws.Config...
method clientConfigWithErr (line 534) | func (s *Session) clientConfigWithErr(serviceName string, cfgs ...*aws...
method ClientConfigNoResolveEndpoint (line 571) | func (s *Session) ClientConfigNoResolveEndpoint(cfgs ...*aws.Config) c...
function New (line 56) | func New(cfgs ...*aws.Config) *Session {
function NewSession (line 100) | func NewSession(cfgs ...*aws.Config) (*Session, error) {
type SharedConfigState (line 110) | type SharedConfigState
constant SharedConfigStateFromEnv (line 116) | SharedConfigStateFromEnv SharedConfigState = iota
constant SharedConfigDisable (line 120) | SharedConfigDisable
constant SharedConfigEnable (line 124) | SharedConfigEnable
type Options (line 130) | type Options struct
function NewSessionWithOptions (line 223) | func NewSessionWithOptions(opts Options) (*Session, error) {
function Must (line 263) | func Must(sess *Session, err error) *Session {
function deprecatedNewSession (line 271) | func deprecatedNewSession(cfgs ...*aws.Config) *Session {
function newSession (line 298) | func newSession(opts Options, envCfg envConfig, cfgs ...*aws.Config) (*S...
function loadCustomCABundle (line 343) | func loadCustomCABundle(s *Session, bundle io.Reader) error {
function loadCertPool (line 372) | func loadCertPool(r io.Reader) (*x509.CertPool, error) {
function mergeConfigSrcs (line 388) | func mergeConfigSrcs(cfg, userCfg *aws.Config, envCfg envConfig, sharedC...
type AssumeRoleTokenProviderNotSetError (line 463) | type AssumeRoleTokenProviderNotSetError struct
method Code (line 466) | func (e AssumeRoleTokenProviderNotSetError) Code() string {
method Message (line 471) | func (e AssumeRoleTokenProviderNotSetError) Message() string {
method OrigErr (line 476) | func (e AssumeRoleTokenProviderNotSetError) OrigErr() error {
method Error (line 481) | func (e AssumeRoleTokenProviderNotSetError) Error() string {
type credProviderError (line 485) | type credProviderError struct
method Retrieve (line 491) | func (c credProviderError) Retrieve() (credentials.Value, error) {
method IsExpired (line 494) | func (c credProviderError) IsExpired() bool {
function initHandlers (line 498) | func initHandlers(s *Session) {
FILE: 12fa-docker-golang/chapter11/vendor/github.com/aws/aws-sdk-go/aws/session/shared_config.go
constant accessKeyIDKey (line 14) | accessKeyIDKey = `aws_access_key_id`
constant secretAccessKey (line 15) | secretAccessKey = `aws_secret_access_key`
constant sessionTokenKey (line 16) | sessionTokenKey = `aws_session_token`
constant roleArnKey (line 19) | roleArnKey = `role_arn`
constant sourceProfileKey (line 20) | sourceProfileKey = `source_profile`
constant externalIDKey (line 21) | externalIDKey = `external_id`
constant mfaSerialKey (line 22) | mfaSerialKey = `mfa_serial`
constant roleSessionNameKey (line 23) | roleSessionNameKey = `role_session_name`
constant regionKey (line 26) | regionKey = `region`
constant DefaultSharedConfigProfile (line 31) | DefaultSharedConfigProfile = `default`
type assumeRoleConfig (line 34) | type assumeRoleConfig struct
type sharedConfig (line 43) | type sharedConfig struct
method setAssumeRoleSource (line 127) | func (cfg *sharedConfig) setAssumeRoleSource(origProfile string, files...
method setFromIniFiles (line 150) | func (cfg *sharedConfig) setFromIniFiles(profile string, files []share...
method setFromIniFile (line 173) | func (cfg *sharedConfig) setFromIniFile(profile string, file sharedCon...
type sharedConfigFile (line 65) | type sharedConfigFile struct
function loadSharedConfig (line 80) | func loadSharedConfig(profile string, filenames []string) (sharedConfig,...
function loadSharedConfigIniFiles (line 104) | func loadSharedConfigIniFiles(filenames []string) ([]sharedConfigFile, e...
type SharedConfigLoadError (line 217) | type SharedConfigLoadError struct
method Code (line 223) | func (e SharedConfigLoadError) Code() string {
method Message (line 228) | func (e SharedConfigLoadError) Message() string {
method OrigErr (line 233) | func (e SharedConfigLoadError) OrigErr() error {
method Error (line 238) | func (e SharedConfigLoadError) Error() string {
type SharedConfigProfileNotExistsError (line 244) | type SharedConfigProfileNotExistsError struct
method Code (line 250) | func (e SharedConfigProfileNotExistsError) Code() string {
method Message (line 255) | func (e SharedConfigProfileNotExistsError) Message() string {
method OrigErr (line 260) | func (e SharedConfigProfileNotExistsError) OrigErr() error {
method Error (line 265) | func (e SharedConfigProfileNotExistsError) Error() string {
type SharedConfigAssumeRoleError (line 272) | type SharedConfigAssumeRoleError struct
method Code (line 277) | func (e SharedConfigAssumeRoleError) Code() string {
method Message (line 282) | func (e SharedConfigAssumeRoleError) Message() string {
method OrigErr (line 288) | func (e SharedConfigAssumeRoleError) OrigErr() error {
method Error (line 293) | func (e SharedConfigAssumeRoleError) Error() string {
FILE: 12fa-docker-golang/chapter11/vendor/github.com/aws/aws-sdk-go/aws/signer/v4/header_rules.go
type rules (line 10) | type rules
method IsValid (line 20) | func (r rules) IsValid(value string) bool {
type rule (line 14) | type rule interface
type mapRule (line 30) | type mapRule
method IsValid (line 33) | func (m mapRule) IsValid(value string) bool {
type whitelist (line 39) | type whitelist struct
method IsValid (line 44) | func (w whitelist) IsValid(value string) bool {
type blacklist (line 49) | type blacklist struct
method IsValid (line 54) | func (b blacklist) IsValid(value string) bool {
type patterns (line 58) | type patterns
method IsValid (line 62) | func (p patterns) IsValid(value string) bool {
type inclusiveRules (line 72) | type inclusiveRules
method IsValid (line 75) | func (r inclusiveRules) IsValid(value string) bool {
FILE: 12fa-docker-golang/chapter11/vendor/github.com/aws/aws-sdk-go/aws/signer/v4/options.go
function WithUnsignedPayload (line 5) | func WithUnsignedPayload(v4 *Signer) {
FILE: 12fa-docker-golang/chapter11/vendor/github.com/aws/aws-sdk-go/aws/signer/v4/uri_path.go
function getURIPath (line 10) | func getURIPath(u *url.URL) string {
FILE: 12fa-docker-golang/chapter11/vendor/github.com/aws/aws-sdk-go/aws/signer/v4/v4.go
constant authHeaderPrefix (line 79) | authHeaderPrefix = "AWS4-HMAC-SHA256"
constant timeFormat (line 80) | timeFormat = "20060102T150405Z"
constant shortTimeFormat (line 81) | shortTimeFormat = "20060102"
constant emptyStringSHA256 (line 84) | emptyStringSHA256 = `e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca49...
type Signer (line 152) | type Signer struct
method Sign (line 271) | func (v4 Signer) Sign(r *http.Request, body io.ReadSeeker, service, re...
method Presign (line 305) | func (v4 Signer) Presign(r *http.Request, body io.ReadSeeker, service,...
method signWithBody (line 309) | func (v4 Signer) signWithBody(r *http.Request, body io.ReadSeeker, ser...
method logSigningInfo (line 493) | func (v4 *Signer) logSigningInfo(ctx *signingCtx) {
function NewSigner (line 206) | func NewSigner(credentials *credentials.Credentials, options ...func(*Si...
type signingCtx (line 218) | type signingCtx struct
method handlePresignRemoval (line 367) | func (ctx *signingCtx) handlePresignRemoval() {
method assignAmzQueryValues (line 381) | func (ctx *signingCtx) assignAmzQueryValues() {
method build (line 502) | func (ctx *signingCtx) build(disableHeaderHoisting bool) {
method buildTime (line 535) | func (ctx *signingCtx) buildTime() {
method buildCredentialString (line 548) | func (ctx *signingCtx) buildCredentialString() {
method buildCanonicalHeaders (line 574) | func (ctx *signingCtx) buildCanonicalHeaders(r rule, header http.Heade...
method buildCanonicalString (line 617) | func (ctx *signingCtx) buildCanonicalString() {
method buildStringToSign (line 636) | func (ctx *signingCtx) buildStringToSign() {
method buildSignature (line 645) | func (ctx *signingCtx) buildSignature() {
method buildBodyDigest (line 655) | func (ctx *signingCtx) buildBodyDigest() {
method isRequestSigned (line 673) | func (ctx *signingCtx) isRequestSigned() bool {
method removePresign (line 685) | func (ctx *signingCtx) removePresign() {
function SignSDKRequest (line 415) | func SignSDKRequest(req *request.Request) {
function BuildNamedHandler (line 420) | func BuildNamedHandler(name string, opts ...func(*Signer)) request.Named...
function signSDKRequestWithCurrTime (line 429) | func signSDKRequestWithCurrTime(req *request.Request, curTimeFn func() t...
constant logSignInfoMsg (line 483) | logSignInfoMsg = `DEBUG: Request Signature:
constant logSignedURLMsg (line 489) | logSignedURLMsg = `
function buildQuery (line 561) | func buildQuery(r rule, header http.Header) (url.Values, http.Header) {
function makeHmac (line 695) | func makeHmac(key []byte, data []byte) []byte {
function makeSha256 (line 701) | func makeSha256(data []byte) []byte {
function makeSha256Reader (line 707) | func makeSha256Reader(reader io.ReadSeeker) []byte {
constant doubleSpaces (line 716) | doubleSpaces = " "
function stripExcessSpaces (line 720) | func stripExcessSpaces(headerVals []string) []string {
FILE: 12fa-docker-golang/chapter11/vendor/github.com/aws/aws-sdk-go/aws/types.go
function ReadSeekCloser (line 15) | func ReadSeekCloser(r io.Reader) ReaderSeekerCloser {
type ReaderSeekerCloser (line 21) | type ReaderSeekerCloser struct
method Read (line 31) | func (r ReaderSeekerCloser) Read(p []byte) (int, error) {
method Seek (line 45) | func (r ReaderSeekerCloser) Seek(offset int64, whence int) (int64, err...
method IsSeeker (line 54) | func (r ReaderSeekerCloser) IsSeeker() bool {
method Close (line 62) | func (r ReaderSeekerCloser) Close() error {
type WriteAtBuffer (line 73) | type WriteAtBuffer struct
method WriteAt (line 93) | func (b *WriteAtBuffer) WriteAt(p []byte, pos int64) (n int, err error) {
method Bytes (line 114) | func (b *WriteAtBuffer) Bytes() []byte {
function NewWriteAtBuffer (line 86) | func NewWriteAtBuffer(buf []byte) *WriteAtBuffer {
FILE: 12fa-docker-golang/chapter11/vendor/github.com/aws/aws-sdk-go/aws/url.go
function URLHostname (line 10) | func URLHostname(url *url.URL) string {
FILE: 12fa-docker-golang/chapter11/vendor/github.com/aws/aws-sdk-go/aws/url_1_7.go
function URLHostname (line 13) | func URLHostname(url *url.URL) string {
function stripPort (line 20) | func stripPort(hostport string) string {
FILE: 12fa-docker-golang/chapter11/vendor/github.com/aws/aws-sdk-go/aws/version.go
constant SDKName (line 5) | SDKName = "aws-sdk-go"
constant SDKVersion (line 8) | SDKVersion = "1.8.12"
FILE: 12fa-docker-golang/chapter11/vendor/github.com/aws/aws-sdk-go/private/protocol/ec2query/build.go
function Build (line 18) | func Build(r *request.Request) {
FILE: 12fa-docker-golang/chapter11/vendor/github.com/aws/aws-sdk-go/private/protocol/ec2query/unmarshal.go
function Unmarshal (line 24) | func Unmarshal(r *request.Request) {
function UnmarshalMeta (line 37) | func UnmarshalMeta(r *request.Request) {
type xmlErrorResponse (line 41) | type xmlErrorResponse struct
function UnmarshalError (line 49) | func UnmarshalError(r *request.Request) {
FILE: 12fa-docker-golang/chapter11/vendor/github.com/aws/aws-sdk-go/private/protocol/idempotency.go
constant idempotencyTokenFillTag (line 13) | idempotencyTokenFillTag = `idempotencyToken`
function CanSetIdempotencyToken (line 20) | func CanSetIdempotencyToken(v reflect.Value, f reflect.StructField) bool {
function GetIdempotencyToken (line 34) | func GetIdempotencyToken() string {
function SetIdempotencyToken (line 43) | func SetIdempotencyToken(v reflect.Value) {
function UUIDVersion4 (line 67) | func UUIDVersion4(u []byte) string {
FILE: 12fa-docker-golang/chapter11/vendor/github.com/aws/aws-sdk-go/private/protocol/json/jsonutil/build.go
function BuildJSON (line 22) | func BuildJSON(v interface{}) ([]byte, error) {
function buildAny (line 29) | func buildAny(value reflect.Value, buf *bytes.Buffer, tag reflect.Struct...
function buildStruct (line 71) | func buildStruct(value reflect.Value, buf *bytes.Buffer, tag reflect.Str...
function buildList (line 148) | func buildList(value reflect.Value, buf *bytes.Buffer, tag reflect.Struc...
type sortedValues (line 164) | type sortedValues
method Len (line 166) | func (sv sortedValues) Len() int { return len(sv) }
method Swap (line 167) | func (sv sortedValues) Swap(i, j int) { sv[i], sv[j] = sv[j], sv[...
method Less (line 168) | func (sv sortedValues) Less(i, j int) bool { return sv[i].String() < s...
function buildMap (line 170) | func buildMap(value reflect.Value, buf *bytes.Buffer, tag reflect.Struct...
function buildScalar (line 192) | func buildScalar(v reflect.Value, buf *bytes.Buffer, tag reflect.StructT...
function writeString (line 245) | func writeString(s string, buf *bytes.Buffer) {
function elemOf (line 274) | func elemOf(value reflect.Value) reflect.Value {
FILE: 12fa-docker-golang/chapter11/vendor/github.com/aws/aws-sdk-go/private/protocol/json/jsonutil/unmarshal.go
function UnmarshalJSON (line 14) | func UnmarshalJSON(v interface{}, stream io.Reader) error {
function unmarshalAny (line 33) | func unmarshalAny(value reflect.Value, data interface{}, tag reflect.Str...
function unmarshalStruct (line 72) | func unmarshalStruct(value reflect.Value, data interface{}, tag reflect....
function unmarshalList (line 120) | func unmarshalList(value reflect.Value, data interface{}, tag reflect.St...
function unmarshalMap (line 144) | func unmarshalMap(value reflect.Value, data interface{}, tag reflect.Str...
function unmarshalScalar (line 168) | func unmarshalScalar(value reflect.Value, data interface{}, tag reflect....
FILE: 12fa-docker-golang/chapter11/vendor/github.com/aws/aws-sdk-go/private/protocol/jsonrpc/jsonrpc.go
function Build (line 34) | func Build(req *request.Request) {
function Unmarshal (line 62) | func Unmarshal(req *request.Request) {
function UnmarshalMeta (line 74) | func UnmarshalMeta(req *request.Request) {
function UnmarshalError (line 79) | func UnmarshalError(req *request.Request) {
type jsonErrorResponse (line 108) | type jsonErrorResponse struct
FILE: 12fa-docker-golang/chapter11/vendor/github.com/aws/aws-sdk-go/private/protocol/query/build.go
function Build (line 18) | func Build(r *request.Request) {
FILE: 12fa-docker-golang/chapter11/vendor/github.com/aws/aws-sdk-go/private/protocol/query/queryutil/queryutil.go
function Parse (line 18) | func Parse(body url.Values, i interface{}, isEC2 bool) error {
function elemOf (line 23) | func elemOf(value reflect.Value) reflect.Value {
type queryParser (line 30) | type queryParser struct
method parseValue (line 34) | func (q *queryParser) parseValue(v url.Values, value reflect.Value, pr...
method parseStruct (line 66) | func (q *queryParser) parseStruct(v url.Values, value reflect.Value, p...
method parseList (line 117) | func (q *queryParser) parseList(v url.Values, value reflect.Value, pre...
method parseMap (line 147) | func (q *queryParser) parseMap(v url.Values, value reflect.Value, pref...
method parseScalar (line 212) | func (q *queryParser) parseScalar(v url.Values, r reflect.Value, name ...
FILE: 12fa-docker-golang/chapter11/vendor/github.com/aws/aws-sdk-go/private/protocol/query/unmarshal.go
function Unmarshal (line 20) | func Unmarshal(r *request.Request) {
function UnmarshalMeta (line 33) | func UnmarshalMeta(r *request.Request) {
FILE: 12fa-docker-golang/chapter11/vendor/github.com/aws/aws-sdk-go/private/protocol/query/unmarshal_error.go
type xmlErrorResponse (line 11) | type xmlErrorResponse struct
type xmlServiceUnavailableResponse (line 18) | type xmlServiceUnavailableResponse struct
function UnmarshalError (line 26) | func UnmarshalError(r *request.Request) {
FILE: 12fa-docker-golang/chapter11/vendor/github.com/aws/aws-sdk-go/private/protocol/rest/build.go
constant RFC822 (line 24) | RFC822 = "Mon, 2 Jan 2006 15:04:05 GMT"
function init (line 31) | func init() {
function Build (line 48) | func Build(r *request.Request) {
function BuildAsGET (line 58) | func BuildAsGET(r *request.Request) {
function buildLocationElements (line 66) | func buildLocationElements(r *request.Request, v reflect.Value, buildGET...
function buildBody (line 128) | func buildBody(r *request.Request, v reflect.Value) {
function buildHeader (line 153) | func buildHeader(header *http.Header, v reflect.Value, name string, tag ...
function buildHeaderMap (line 166) | func buildHeaderMap(header *http.Header, v reflect.Value, tag reflect.St...
function buildURI (line 182) | func buildURI(u *url.URL, v reflect.Value, name string, tag reflect.Stru...
function buildQueryString (line 199) | func buildQueryString(query url.Values, v reflect.Value, name string, ta...
function cleanPath (line 228) | func cleanPath(u *url.URL) {
function EscapePath (line 242) | func EscapePath(path string, encodeSep bool) string {
function convertType (line 255) | func convertType(v reflect.Value, tag reflect.StructTag) (string, error) {
FILE: 12fa-docker-golang/chapter11/vendor/github.com/aws/aws-sdk-go/private/protocol/rest/payload.go
function PayloadMember (line 6) | func PayloadMember(i interface{}) interface{} {
function PayloadType (line 32) | func PayloadType(i interface{}) string {
FILE: 12fa-docker-golang/chapter11/vendor/github.com/aws/aws-sdk-go/private/protocol/rest/unmarshal.go
function Unmarshal (line 28) | func Unmarshal(r *request.Request) {
function UnmarshalMeta (line 36) | func UnmarshalMeta(r *request.Request) {
function unmarshalBody (line 48) | func unmarshalBody(r *request.Request, v reflect.Value) {
function unmarshalLocationElements (line 99) | func unmarshalLocationElements(r *request.Request, v reflect.Value) {
function unmarshalStatusCode (line 136) | func unmarshalStatusCode(v reflect.Value, statusCode int) {
function unmarshalHeaderMap (line 148) | func unmarshalHeaderMap(r reflect.Value, headers http.Header, prefix str...
function unmarshalHeader (line 163) | func unmarshalHeader(v reflect.Value, header string, tag reflect.StructT...
FILE: 12fa-docker-golang/chapter11/vendor/github.com/aws/aws-sdk-go/private/protocol/restjson/restjson.go
function Build (line 32) | func Build(r *request.Request) {
function Unmarshal (line 41) | func Unmarshal(r *request.Request) {
function UnmarshalMeta (line 50) | func UnmarshalMeta(r *request.Request) {
function UnmarshalError (line 55) | func UnmarshalError(r *request.Request) {
type jsonErrorResponse (line 89) | type jsonErrorResponse struct
FILE: 12fa-docker-golang/chapter11/vendor/github.com/aws/aws-sdk-go/private/protocol/restxml/restxml.go
function Build (line 32) | func Build(r *request.Request) {
function Unmarshal (line 47) | func Unmarshal(r *request.Request) {
function UnmarshalMeta (line 62) | func UnmarshalMeta(r *request.Request) {
function UnmarshalError (line 67) | func UnmarshalError(r *request.Request) {
FILE: 12fa-docker-golang/chapter11/vendor/github.com/aws/aws-sdk-go/private/protocol/unmarshal.go
function UnmarshalDiscardBody (line 14) | func UnmarshalDiscardBody(r *request.Request) {
FILE: 12fa-docker-golang/chapter11/vendor/github.com/aws/aws-sdk-go/private/protocol/xml/xmlutil/build.go
function BuildXML (line 18) | func BuildXML(params interface{}, e *xml.Encoder) error {
function elemOf (line 33) | func elemOf(value reflect.Value) reflect.Value {
type xmlBuilder (line 41) | type xmlBuilder struct
method buildValue (line 51) | func (b *xmlBuilder) buildValue(value reflect.Value, current *XMLNode,...
method buildStruct (line 88) | func (b *xmlBuilder) buildStruct(value reflect.Value, current *XMLNode...
method buildList (line 166) | func (b *xmlBuilder) buildList(value reflect.Value, current *XMLNode, ...
method buildMap (line 208) | func (b *xmlBuilder) buildMap(value reflect.Value, current *XMLNode, t...
method buildScalar (line 262) | func (b *xmlBuilder) buildScalar(value reflect.Value, current *XMLNode...
FILE: 12fa-docker-golang/chapter11/vendor/github.com/aws/aws-sdk-go/private/protocol/xml/xmlutil/unmarshal.go
function UnmarshalXML (line 17) | func UnmarshalXML(v interface{}, d *xml.Decoder, wrapper string) error {
function parse (line 42) | func parse(r reflect.Value, node *XMLNode, tag reflect.StructTag) error {
function parseStruct (line 77) | func parseStruct(r reflect.Value, node *XMLNode, tag reflect.StructTag) ...
function parseList (line 132) | func parseList(r reflect.Value, node *XMLNode, tag reflect.StructTag) er...
function parseMap (line 171) | func parseMap(r reflect.Value, node *XMLNode, tag reflect.StructTag) err...
function parseMapEntry (line 188) | func parseMapEntry(r reflect.Value, node *XMLNode, tag reflect.StructTag...
function parseScalar (line 217) | func parseScalar(r reflect.Value, node *XMLNode, tag reflect.StructTag) ...
FILE: 12fa-docker-golang/chapter11/vendor/github.com/aws/aws-sdk-go/private/protocol/xml/xmlutil/xml_to_struct.go
type XMLNode (line 11) | type XMLNode struct
method AddChild (line 31) | func (n *XMLNode) AddChild(child *XMLNode) {
method findNamespaces (line 88) | func (n *XMLNode) findNamespaces() {
method findElem (line 99) | func (n *XMLNode) findElem(name string) (string, bool) {
function NewXMLElement (line 22) | func NewXMLElement(name xml.Name) *XMLNode {
function XMLToStruct (line 39) | func XMLToStruct(d *xml.Decoder, s *xml.StartElement) (*XMLNode, error) {
function StructToXML (line 115) | func StructToXML(e *xml.Encoder, node *XMLNode, sorted bool) error {
FILE: 12fa-docker-golang/chapter11/vendor/github.com/aws/aws-sdk-go/service/kinesis/api.go
constant opAddTagsToStream (line 17) | opAddTagsToStream = "AddTagsToStream"
method AddTagsToStreamRequest (line 44) | func (c *Kinesis) AddTagsToStreamRequest(input *AddTagsToStreamInput) (r...
method AddTagsToStream (line 95) | func (c *Kinesis) AddTagsToStream(input *AddTagsToStreamInput) (*AddTags...
method AddTagsToStreamWithContext (line 109) | func (c *Kinesis) AddTagsToStreamWithContext(ctx aws.Context, input *Add...
constant opCreateStream (line 116) | opCreateStream = "CreateStream"
method CreateStreamRequest (line 143) | func (c *Kinesis) CreateStreamRequest(input *CreateStreamInput) (req *re...
method CreateStream (line 223) | func (c *Kinesis) CreateStream(input *CreateStreamInput) (*CreateStreamO...
method CreateStreamWithContext (line 237) | func (c *Kinesis) CreateStreamWithContext(ctx aws.Context, input *Create...
constant opDecreaseStreamRetentionPeriod (line 244) | opDecreaseStreamRetentionPeriod = "DecreaseStreamRetentionPeriod"
method DecreaseStreamRetentionPeriodRequest (line 271) | func (c *Kinesis) DecreaseStreamRetentionPeriodRequest(input *DecreaseSt...
method DecreaseStreamRetentionPeriod (line 320) | func (c *Kinesis) DecreaseStreamRetentionPeriod(input *DecreaseStreamRet...
method DecreaseStreamRetentionPeriodWithContext (line 334) | func (c *Kinesis) DecreaseStreamRetentionPeriodWithContext(ctx aws.Conte...
constant opDeleteStream (line 341) | opDeleteStream = "DeleteStream"
method DeleteStreamRequest (line 368) | func (c *Kinesis) DeleteStreamRequest(input *DeleteStreamInput) (req *re...
method DeleteStream (line 426) | func (c *Kinesis) DeleteStream(input *DeleteStreamInput) (*DeleteStreamO...
method DeleteStreamWithContext (line 440) | func (c *Kinesis) DeleteStreamWithContext(ctx aws.Context, input *Delete...
constant opDescribeLimits (line 447) | opDescribeLimits = "DescribeLimits"
method DescribeLimitsRequest (line 474) | func (c *Kinesis) DescribeLimitsRequest(input *DescribeLimitsInput) (req...
method DescribeLimits (line 512) | func (c *Kinesis) DescribeLimits(input *DescribeLimitsInput) (*DescribeL...
method DescribeLimitsWithContext (line 526) | func (c *Kinesis) DescribeLimitsWithContext(ctx aws.Context, input *Desc...
constant opDescribeStream (line 533) | opDescribeStream = "DescribeStream"
method DescribeStreamRequest (line 560) | func (c *Kinesis) DescribeStreamRequest(input *DescribeStreamInput) (req...
method DescribeStream (line 621) | func (c *Kinesis) DescribeStream(input *DescribeStreamInput) (*DescribeS...
method DescribeStreamWithContext (line 635) | func (c *Kinesis) DescribeStreamWithContext(ctx aws.Context, input *Desc...
method DescribeStreamPages (line 659) | func (c *Kinesis) DescribeStreamPages(input *DescribeStreamInput, fn fun...
method DescribeStreamPagesWithContext (line 670) | func (c *Kinesis) DescribeStreamPagesWithContext(ctx aws.Context, input ...
constant opDisableEnhancedMonitoring (line 692) | opDisableEnhancedMonitoring = "DisableEnhancedMonitoring"
method DisableEnhancedMonitoringRequest (line 719) | func (c *Kinesis) DisableEnhancedMonitoringRequest(input *DisableEnhance...
method DisableEnhancedMonitoring (line 764) | func (c *Kinesis) DisableEnhancedMonitoring(input *DisableEnhancedMonito...
method DisableEnhancedMonitoringWithContext (line 778) | func (c *Kinesis) DisableEnhancedMonitoringWithContext(ctx aws.Context, ...
constant opEnableEnhancedMonitoring (line 785) | opEnableEnhancedMonitoring = "EnableEnhancedMonitoring"
method EnableEnhancedMonitoringRequest (line 812) | func (c *Kinesis) EnableEnhancedMonitoringRequest(input *EnableEnhancedM...
method EnableEnhancedMonitoring (line 857) | func (c *Kinesis) EnableEnhancedMonitoring(input *EnableEnhancedMonitori...
method EnableEnhancedMonitoringWithContext (line 871) | func (c *Kinesis) EnableEnhancedMonitoringWithContext(ctx aws.Context, i...
constant opGetRecords (line 878) | opGetRecords = "GetRecords"
method GetRecordsRequest (line 905) | func (c *Kinesis) GetRecordsRequest(input *GetRecordsInput) (req *reques...
method GetRecords (line 1005) | func (c *Kinesis) GetRecords(input *GetRecordsInput) (*GetRecordsOutput,...
method GetRecordsWithContext (line 1019) | func (c *Kinesis) GetRecordsWithContext(ctx aws.Context, input *GetRecor...
constant opGetShardIterator (line 1026) | opGetShardIterator = "GetShardIterator"
method GetShardIteratorRequest (line 1053) | func (c *Kinesis) GetShardIteratorRequest(input *GetShardIteratorInput) ...
method GetShardIterator (line 1135) | func (c *Kinesis) GetShardIterator(input *GetShardIteratorInput) (*GetSh...
method GetShardIteratorWithContext (line 1149) | func (c *Kinesis) GetShardIteratorWithContext(ctx aws.Context, input *Ge...
constant opIncreaseStreamRetentionPeriod (line 1156) | opIncreaseStreamRetentionPeriod = "IncreaseStreamRetentionPeriod"
method IncreaseStreamRetentionPeriodRequest (line 1183) | func (c *Kinesis) IncreaseStreamRetentionPeriodRequest(input *IncreaseSt...
method IncreaseStreamRetentionPeriod (line 1236) | func (c *Kinesis) IncreaseStreamRetentionPeriod(input *IncreaseStreamRet...
method IncreaseStreamRetentionPeriodWithContext (line 1250) | func (c *Kinesis) IncreaseStreamRetentionPeriodWithContext(ctx aws.Conte...
constant opListStreams (line 1257) | opListStreams = "ListStreams"
method ListStreamsRequest (line 1284) | func (c *Kinesis) ListStreamsRequest(input *ListStreamsInput) (req *requ...
method ListStreams (line 1338) | func (c *Kinesis) ListStreams(input *ListStreamsInput) (*ListStreamsOutp...
method ListStreamsWithContext (line 1352) | func (c *Kinesis) ListStreamsWithContext(ctx aws.Context, input *ListStr...
method ListStreamsPages (line 1376) | func (c *Kinesis) ListStreamsPages(input *ListStreamsInput, fn func(*Lis...
method ListStreamsPagesWithContext (line 1387) | func (c *Kinesis) ListStreamsPagesWithContext(ctx aws.Context, input *Li...
constant opListTagsForStream (line 1409) | opListTagsForStream = "ListTagsForStream"
method ListTagsForStreamRequest (line 1436) | func (c *Kinesis) ListTagsForStreamRequest(input *ListTagsForStreamInput...
method ListTagsForStream (line 1477) | func (c *Kinesis) ListTagsForStream(input *ListTagsForStreamInput) (*Lis...
method ListTagsForStreamWithContext (line 1491) | func (c *Kinesis) ListTagsForStreamWithContext(ctx aws.Context, input *L...
constant opMergeShards (line 1498) | opMergeShards = "MergeShards"
method MergeShardsRequest (line 1525) | func (c *Kinesis) MergeShardsRequest(input *MergeShardsInput) (req *requ...
method MergeShards (line 1607) | func (c *Kinesis) MergeShards(input *MergeShardsInput) (*MergeShardsOutp...
method MergeShardsWithContext (line 1621) | func (c *Kinesis) MergeShardsWithContext(ctx aws.Context, input *MergeSh...
constant opPutRecord (line 1628) | opPutRecord = "PutRecord"
method PutRecordRequest (line 1655) | func (c *Kinesis) PutRecordRequest(input *PutRecordInput) (req *request....
method PutRecord (line 1737) | func (c *Kinesis) PutRecord(input *PutRecordInput) (*PutRecordOutput, er...
method PutRecordWithContext (line 1751) | func (c *Kinesis) PutRecordWithContext(ctx aws.Context, input *PutRecord...
constant opPutRecords (line 1758) | opPutRecords = "PutRecords"
method PutRecordsRequest (line 1785) | func (c *Kinesis) PutRecordsRequest(input *PutRecordsInput) (req *reques...
method PutRecords (line 1889) | func (c *Kinesis) PutRecords(input *PutRecordsInput) (*PutRecordsOutput,...
method PutRecordsWithContext (line 1903) | func (c *Kinesis) PutRecordsWithContext(ctx aws.Context, input *PutRecor...
constant opRemoveTagsFromStream (line 1910) | opRemoveTagsFromStream = "RemoveTagsFromStream"
method RemoveTagsFromStreamRequest (line 1937) | func (c *Kinesis) RemoveTagsFromStreamRequest(input *RemoveTagsFromStrea...
method RemoveTagsFromStream (line 1987) | func (c *Kinesis) RemoveTagsFromStream(input *RemoveTagsFromStreamInput)...
method RemoveTagsFromStreamWithContext (line 2001) | func (c *Kinesis) RemoveTagsFromStreamWithContext(ctx aws.Context, input...
constant opSplitShard (line 2008) | opSplitShard = "SplitShard"
method SplitShardRequest (line 2035) | func (c *Kinesis) SplitShardRequest(input *SplitShardInput) (req *reques...
method SplitShard (line 2126) | func (c *Kinesis) SplitShard(input *SplitShardInput) (*SplitShardOutput,...
method SplitShardWithContext (line 2140) | func (c *Kinesis) SplitShardWithContext(ctx aws.Context, input *SplitSha...
constant opUpdateShardCount (line 2147) | opUpdateShardCount = "UpdateShardCount"
method UpdateShardCountRequest (line 2174) | func (c *Kinesis) UpdateShardCountRequest(input *UpdateShardCountInput) ...
method UpdateShardCount (line 2240) | func (c *Kinesis) UpdateShardCount(input *UpdateShardCountInput) (*Updat...
method UpdateShardCountWithContext (line 2254) | func (c *Kinesis) UpdateShardCountWithContext(ctx aws.Context, input *Up...
type AddTagsToStreamInput (line 2263) | type AddTagsToStreamInput struct
method String (line 2278) | func (s AddTagsToStreamInput) String() string {
method GoString (line 2283) | func (s AddTagsToStreamInput) GoString() string {
method Validate (line 2288) | func (s *AddTagsToStreamInput) Validate() error {
method SetStreamName (line 2310) | func (s *AddTagsToStreamInput) SetStreamName(v string) *AddTagsToStrea...
method SetTags (line 2316) | func (s *AddTagsToStreamInput) SetTags(v map[string]*string) *AddTagsT...
type AddTagsToStreamOutput (line 2322) | type AddTagsToStreamOutput struct
method String (line 2327) | func (s AddTagsToStreamOutput) String() string {
method GoString (line 2332) | func (s AddTagsToStreamOutput) GoString() string {
type CreateStreamInput (line 2338) | type CreateStreamInput struct
method String (line 2361) | func (s CreateStreamInput) String() string {
method GoString (line 2366) | func (s CreateStreamInput) GoString() string {
method Validate (line 2371) | func (s *CreateStreamInput) Validate() error {
method SetShardCount (line 2393) | func (s *CreateStreamInput) SetShardCount(v int64) *CreateStreamInput {
method SetStreamName (line 2399) | func (s *CreateStreamInput) SetStreamName(v string) *CreateStreamInput {
type CreateStreamOutput (line 2405) | type CreateStreamOutput struct
method String (line 2410) | func (s CreateStreamOutput) String() string {
method GoString (line 2415) | func (s CreateStreamOutput) GoString() string {
type DecreaseStreamRetentionPeriodInput (line 2421) | type DecreaseStreamRetentionPeriodInput struct
method String (line 2437) | func (s DecreaseStreamRetentionPeriodInput) String() string {
method GoString (line 2442) | func (s DecreaseStreamRetentionPeriodInput) GoString() string {
method Validate (line 2447) | func (s *DecreaseStreamRetentionPeriodInput) Validate() error {
method SetRetentionPeriodHours (line 2469) | func (s *DecreaseStreamRetentionPeriodInput) SetRetentionPeriodHours(v...
method SetStreamName (line 2475) | func (s *DecreaseStreamRetentionPeriodInput) SetStreamName(v string) *...
type DecreaseStreamRetentionPeriodOutput (line 2481) | type DecreaseStreamRetentionPeriodOutput struct
method String (line 2486) | func (s DecreaseStreamRetentionPeriodOutput) String() string {
method GoString (line 2491) | func (s DecreaseStreamRetentionPeriodOutput) GoString() string {
type DeleteStreamInput (line 2497) | type DeleteStreamInput struct
method String (line 2507) | func (s DeleteStreamInput) String() string {
method GoString (line 2512) | func (s DeleteStreamInput) GoString() string {
method Validate (line 2517) | func (s *DeleteStreamInput) Validate() error {
method SetStreamName (line 2533) | func (s *DeleteStreamInput) SetStreamName(v string) *DeleteStreamInput {
type DeleteStreamOutput (line 2539) | type DeleteStreamOutput struct
method String (line 2544) | func (s DeleteStreamOutput) String() string {
method GoString (line 2549) | func (s DeleteStreamOutput) GoString() string {
type DescribeLimitsInput (line 2554) | type DescribeLimitsInput struct
method String (line 2559) | func (s DescribeLimitsInput) String() string {
method GoString (line 2564) | func (s DescribeLimitsInput) GoString() string {
type DescribeLimitsOutput (line 2569) | type DescribeLimitsOutput struct
method String (line 2584) | func (s DescribeLimitsOutput) String() string {
method GoString (line 2589) | func (s DescribeLimitsOutput) GoString() string {
method SetOpenShardCount (line 2594) | func (s *DescribeLimitsOutput) SetOpenShardCount(v int64) *DescribeLim...
method SetShardLimit (line 2600) | func (s *DescribeLimitsOutput) SetShardLimit(v int64) *DescribeLimitsO...
type DescribeStreamInput (line 2607) | type DescribeStreamInput struct
method String (line 2624) | func (s DescribeStreamInput) String() string {
method GoString (line 2629) | func (s DescribeStreamInput) GoString() string {
method Validate (line 2634) | func (s *DescribeStreamInput) Validate() error {
method SetExclusiveStartShardId (line 2656) | func (s *DescribeStreamInput) SetExclusiveStartShardId(v string) *Desc...
method SetLimit (line 2662) | func (s *DescribeStreamInput) SetLimit(v int64) *DescribeStreamInput {
method SetStreamName (line 2668) | func (s *DescribeStreamInput) SetStreamName(v string) *DescribeStreamI...
type DescribeStreamOutput (line 2675) | type DescribeStreamOutput struct
method String (line 2686) | func (s DescribeStreamOutput) String() string {
method GoString (line 2691) | func (s DescribeStreamOutput) GoString() string {
method SetStreamDescription (line 2696) | func (s *DescribeStreamOutput) SetStreamDescription(v *StreamDescripti...
type DisableEnhancedMonitoringInput (line 2703) | type DisableEnhancedMonitoringInput struct
method String (line 2741) | func (s DisableEnhancedMonitoringInput) String() string {
method GoString (line 2746) | func (s DisableEnhancedMonitoringInput) GoString() string {
method Validate (line 2751) | func (s *DisableEnhancedMonitoringInput) Validate() error {
method SetShardLevelMetrics (line 2773) | func (s *DisableEnhancedMonitoringInput) SetShardLevelMetrics(v []*str...
method SetStreamName (line 2779) | func (s *DisableEnhancedMonitoringInput) SetStreamName(v string) *Disa...
type EnableEnhancedMonitoringInput (line 2786) | type EnableEnhancedMonitoringInput struct
method String (line 2824) | func (s EnableEnhancedMonitoringInput) String() string {
method GoString (line 2829) | func (s EnableEnhancedMonitoringInput) GoString() string {
method Validate (line 2834) | func (s *EnableEnhancedMonitoringInput) Validate() error {
method SetShardLevelMetrics (line 2856) | func (s *EnableEnhancedMonitoringInput) SetShardLevelMetrics(v []*stri...
method SetStreamName (line 2862) | func (s *EnableEnhancedMonitoringInput) SetStreamName(v string) *Enabl...
type EnhancedMetrics (line 2869) | type EnhancedMetrics struct
method String (line 2900) | func (s EnhancedMetrics) String() string {
method GoString (line 2905) | func (s EnhancedMetrics) GoString() string {
method SetShardLevelMetrics (line 2910) | func (s *EnhancedMetrics) SetShardLevelMetrics(v []*string) *EnhancedM...
type EnhancedMonitoringOutput (line 2917) | type EnhancedMonitoringOutput struct
method String (line 2933) | func (s EnhancedMonitoringOutput) String() string {
method GoString (line 2938) | func (s EnhancedMonitoringOutput) GoString() string {
method SetCurrentShardLevelMetrics (line 2943) | func (s *EnhancedMonitoringOutput) SetCurrentShardLevelMetrics(v []*st...
method SetDesiredShardLevelMetrics (line 2949) | func (s *EnhancedMonitoringOutput) SetDesiredShardLevelMetrics(v []*st...
method SetStreamName (line 2955) | func (s *EnhancedMonitoringOutput) SetStreamName(v string) *EnhancedMo...
type GetRecordsInput (line 2962) | type GetRecordsInput struct
method String (line 2978) | func (s GetRecordsInput) String() string {
method GoString (line 2983) | func (s GetRecordsInput) GoString() string {
method Validate (line 2988) | func (s *GetRecordsInput) Validate() error {
method SetLimit (line 3007) | func (s *GetRecordsInput) SetLimit(v int64) *GetRecordsInput {
method SetShardIterator (line 3013) | func (s *GetRecordsInput) SetShardIterator(v string) *GetRecordsInput {
type GetRecordsOutput (line 3020) | type GetRecordsOutput struct
method String (line 3041) | func (s GetRecordsOutput) String() string {
method GoString (line 3046) | func (s GetRecordsOutput) GoString() string {
method SetMillisBehindLatest (line 3051) | func (s *GetRecordsOutput) SetMillisBehindLatest(v int64) *GetRecordsO...
method SetNextShardIterator (line 3057) | func (s *GetRecordsOutput) SetNextShardIterator(v string) *GetRecordsO...
method SetRecords (line 3063) | func (s *GetRecordsOutput) SetRecords(v []*Record) *GetRecordsOutput {
type GetShardIteratorInput (line 3070) | type GetShardIteratorInput struct
method String (line 3121) | func (s GetShardIteratorInput) String() string {
method GoString (line 3126) | func (s GetShardIteratorInput) GoString() string {
method Validate (line 3131) | func (s *GetShardIteratorInput) Validate() error {
method SetShardId (line 3156) | func (s *GetShardIteratorInput) SetShardId(v string) *GetShardIterator...
method SetShardIteratorType (line 3162) | func (s *GetShardIteratorInput) SetShardIteratorType(v string) *GetSha...
method SetStartingSequenceNumber (line 3168) | func (s *GetShardIteratorInput) SetStartingSequenceNumber(v string) *G...
method SetStreamName (line 3174) | func (s *GetShardIteratorInput) SetStreamName(v string) *GetShardItera...
method SetTimestamp (line 3180) | func (s *GetShardIteratorInput) SetTimestamp(v time.Time) *GetShardIte...
type GetShardIteratorOutput (line 3187) | type GetShardIteratorOutput struct
method String (line 3197) | func (s GetShardIteratorOutput) String() string {
method GoString (line 3202) | func (s GetShardIteratorOutput) GoString() string {
method SetShardIterator (line 3207) | func (s *GetShardIteratorOutput) SetShardIterator(v string) *GetShardI...
type HashKeyRange (line 3215) | type HashKeyRange struct
method String (line 3230) | func (s HashKeyRange) String() string {
method GoString (line 3235) | func (s HashKeyRange) GoString() string {
method SetEndingHashKey (line 3240) | func (s *HashKeyRange) SetEndingHashKey(v string) *HashKeyRange {
method SetStartingHashKey (line 3246) | func (s *HashKeyRange) SetStartingHashKey(v string) *HashKeyRange {
type IncreaseStreamRetentionPeriodInput (line 3253) | type IncreaseStreamRetentionPeriodInput struct
method String (line 3269) | func (s IncreaseStreamRetentionPeriodInput) String() string {
method GoString (line 3274) | func (s IncreaseStreamRetentionPeriodInput) GoString() string {
method Validate (line 3279) | func (s *IncreaseStreamRetentionPeriodInput) Validate() error {
method SetRetentionPeriodHours (line 3301) | func (s *IncreaseStreamRetentionPeriodInput) SetRetentionPeriodHours(v...
method SetStreamName (line 3307) | func (s *IncreaseStreamRetentionPeriodInput) SetStreamName(v string) *...
type IncreaseStreamRetentionPeriodOutput (line 3313) | type IncreaseStreamRetentionPeriodOutput struct
method String (line 3318) | func (s IncreaseStreamRetentionPeriodOutput) String() string {
method GoString (line 3323) | func (s IncreaseStreamRetentionPeriodOutput) GoString() string {
type ListStreamsInput (line 3329) | type ListStreamsInput struct
method String (line 3340) | func (s ListStreamsInput) String() string {
method GoString (line 3345) | func (s ListStreamsInput) GoString() string {
method Validate (line 3350) | func (s *ListStreamsInput) Validate() error {
method SetExclusiveStartStreamName (line 3366) | func (s *ListStreamsInput) SetExclusiveStartStreamName(v string) *List...
method SetLimit (line 3372) | func (s *ListStreamsInput) SetLimit(v int64) *ListStreamsInput {
type ListStreamsOutput (line 3379) | type ListStreamsOutput struct
method String (line 3395) | func (s ListStreamsOutput) String() string {
method GoString (line 3400) | func (s ListStreamsOutput) GoString() string {
method SetHasMoreStreams (line 3405) | func (s *ListStreamsOutput) SetHasMoreStreams(v bool) *ListStreamsOutp...
method SetStreamNames (line 3411) | func (s *ListStreamsOutput) SetStreamNames(v []*string) *ListStreamsOu...
type ListTagsForStreamInput (line 3418) | type ListTagsForStreamInput struct
method String (line 3437) | func (s ListTagsForStreamInput) String() string {
method GoString (line 3442) | func (s ListTagsForStreamInput) GoString() string {
method Validate (line 3447) | func (s *ListTagsForStreamInput) Validate() error {
method SetExclusiveStartTagKey (line 3469) | func (s *ListTagsForStreamInput) SetExclusiveStartTagKey(v string) *Li...
method SetLimit (line 3475) | func (s *ListTagsForStreamInput) SetLimit(v int64) *ListTagsForStreamI...
method SetStreamName (line 3481) | func (s *ListTagsForStreamInput) SetStreamName(v string) *ListTagsForS...
type ListTagsForStreamOutput (line 3488) | type ListTagsForStreamOutput struct
method String (line 3505) | func (s ListTagsForStreamOutput) String() string {
method GoString (line 3510) | func (s ListTagsForStreamOutput) GoString() string {
method SetHasMoreTags (line 3515) | func (s *ListTagsForStreamOutput) SetHasMoreTags(v bool) *ListTagsForS...
method SetTags (line 3521) | func (s *ListTagsForStreamOutput) SetTags(v []*Tag) *ListTagsForStream...
type MergeShardsInput (line 3528) | type MergeShardsInput struct
method String (line 3548) | func (s MergeShardsInput) String() string {
method GoString (line 3553) | func (s MergeShardsInput) GoString() string {
method Validate (line 3558) | func (s *MergeShardsInput) Validate() error {
method SetAdjacentShardToMerge (line 3586) | func (s *MergeShardsInput) SetAdjacentShardToMerge(v string) *MergeSha...
method SetShardToMerge (line 3592) | func (s *MergeShardsInput) SetShardToMerge(v string) *MergeShardsInput {
method SetStreamName (line 3598) | func (s *MergeShardsInput) SetStreamName(v string) *MergeShardsInput {
type MergeShardsOutput (line 3604) | type MergeShardsOutput struct
method String (line 3609) | func (s MergeShardsOutput) String() string {
method GoString (line 3614) | func (s MergeShardsOutput) GoString() string {
type PutRecordInput (line 3620) | type PutRecordInput struct
method String (line 3663) | func (s PutRecordInput) String() string {
method GoString (line 3668) | func (s PutRecordInput) GoString() string {
method Validate (line 3673) | func (s *PutRecordInput) Validate() error {
method SetData (line 3698) | func (s *PutRecordInput) SetData(v []byte) *PutRecordInput {
method SetExplicitHashKey (line 3704) | func (s *PutRecordInput) SetExplicitHashKey(v string) *PutRecordInput {
method SetPartitionKey (line 3710) | func (s *PutRecordInput) SetPartitionKey(v string) *PutRecordInput {
method SetSequenceNumberForOrdering (line 3716) | func (s *PutRecordInput) SetSequenceNumberForOrdering(v string) *PutRe...
method SetStreamName (line 3722) | func (s *PutRecordInput) SetStreamName(v string) *PutRecordInput {
type PutRecordOutput (line 3729) | type PutRecordOutput struct
method String (line 3747) | func (s PutRecordOutput) String() string {
method GoString (line 3752) | func (s PutRecordOutput) GoString() string {
method SetSequenceNumber (line 3757) | func (s *PutRecordOutput) SetSequenceNumber(v string) *PutRecordOutput {
method SetShardId (line 3763) | func (s *PutRecordOutput) SetShardId(v string) *PutRecordOutput {
type PutRecordsInput (line 3770) | type PutRecordsInput struct
method String (line 3785) | func (s PutRecordsInput) String() string {
method GoString (line 3790) | func (s PutRecordsInput) GoString() string {
method Validate (line 3795) | func (s *PutRecordsInput) Validate() error {
method SetRecords (line 3827) | func (s *PutRecordsInput) SetRecords(v []*PutRecordsRequestEntry) *Put...
method SetStreamName (line 3833) | func (s *PutRecordsInput) SetStreamName(v string) *PutRecordsInput {
type PutRecordsOutput (line 3840) | type PutRecordsOutput struct
method String (line 3857) | func (s PutRecordsOutput) String() string {
method GoString (line 3862) | func (s PutRecordsOutput) GoString() string {
method SetFailedRecordCount (line 3867) | func (s *PutRecordsOutput) SetFailedRecordCount(v int64) *PutRecordsOu...
method SetRecords (line 3873) | func (s *PutRecordsOutput) SetRecords(v []*PutRecordsResultEntry) *Put...
type PutRecordsRequestEntry (line 3880) | type PutRecordsRequestEntry struct
method String (line 3911) | func (s PutRecordsRequestEntry) String() string {
method GoString (line 3916) | func (s PutRecordsRequestEntry) GoString() string {
method Validate (line 3921) | func (s *PutRecordsRequestEntry) Validate() error {
method SetData (line 3940) | func (s *PutRecordsRequestEntry) SetData(v []byte) *PutRecordsRequestE...
method SetExplicitHashKey (line 3946) | func (s *PutRecordsRequestEntry) SetExplicitHashKey(v string) *PutReco...
method SetPartitionKey (line 3952) | func (s *PutRecordsRequestEntry) SetPartitionKey(v string) *PutRecords...
type PutRecordsResultEntry (line 3962) | type PutRecordsResultEntry struct
method String (line 3983) | func (s PutRecordsResultEntry) String() string {
method GoString (line 3988) | func (s PutRecordsResultEntry) GoString() string {
method SetErrorCode (line 3993) | func (s *PutRecordsResultEntry) SetErrorCode(v string) *PutRecordsResu...
method SetErrorMessage (line 3999) | func (s *PutRecordsResultEntry) SetErrorMessage(v string) *PutRecordsR...
method SetSequenceNumber (line 4005) | func (s *PutRecordsResultEntry) SetSequenceNumber(v string) *PutRecord...
method SetShardId (line 4011) | func (s *PutRecordsResultEntry) SetShardId(v string) *PutRecordsResult...
type Record (line 4019) | type Record struct
method String (line 4048) | func (s Record) String() string {
method GoString (line 4053) | func (s Record) GoString() string {
method SetApproximateArrivalTimestamp (line 4058) | func (s *Record) SetApproximateArrivalTimestamp(v time.Time) *Record {
method SetData (line 4064) | func (s *Record) SetData(v []byte) *Record {
method SetPartitionKey (line 4070) | func (s *Record) SetPartitionKey(v string) *Record {
method SetSequenceNumber (line 4076) | func (s *Record) SetSequenceNumber(v string) *Record {
type RemoveTagsFromStreamInput (line 4083) | type RemoveTagsFromStreamInput struct
method String (line 4098) | func (s RemoveTagsFromStreamInput) String() string {
method GoString (line 4103) | func (s RemoveTagsFromStreamInput) GoString() string {
method Validate (line 4108) | func (s *RemoveTagsFromStreamInput) Validate() error {
method SetStreamName (line 4130) | func (s *RemoveTagsFromStreamInput) SetStreamName(v string) *RemoveTag...
method SetTagKeys (line 4136) | func (s *RemoveTagsFromStreamInput) SetTagKeys(v []*string) *RemoveTag...
type RemoveTagsFromStreamOutput (line 4142) | type RemoveTagsFromStreamOutput struct
method String (line 4147) | func (s RemoveTagsFromStreamOutput) String() string {
method GoString (line 4152) | func (s RemoveTagsFromStreamOutput) GoString() string {
type SequenceNumberRange (line 4158) | type SequenceNumberRange struct
method String (line 4172) | func (s SequenceNumberRange) String() string {
method GoString (line 4177) | func (s SequenceNumberRange) GoString() string {
method SetEndingSequenceNumber (line 4182) | func (s *SequenceNumberRange) SetEndingSequenceNumber(v string) *Seque...
method SetStartingSequenceNumber (line 4188) | func (s *SequenceNumberRange) SetStartingSequenceNumber(v string) *Seq...
type Shard (line 4195) | type Shard struct
method String (line 4222) | func (s Shard) String() string {
method GoString (line 4227) | func (s Shard) GoString() string {
method SetAdjacentParentShardId (line 4232) | func (s *Shard) SetAdjacentParentShardId(v string) *Shard {
method SetHashKeyRange (line 4238) | func (s *Shard) SetHashKeyRange(v *HashKeyRange) *Shard {
method SetParentShardId (line 4244) | func (s *Shard) SetParentShardId(v string) *Shard {
method SetSequenceNumberRange (line 4250) | func (s *Shard) SetSequenceNumberRange(v *SequenceNumberRange) *Shard {
method SetShardId (line 4256) | func (s *Shard) SetShardId(v string) *Shard {
type SplitShardInput (line 4263) | type SplitShardInput struct
method String (line 4289) | func (s SplitShardInput) String() string {
method GoString (line 4294) | func (s SplitShardInput) GoString() string {
method Validate (line 4299) | func (s *SplitShardInput) Validate() error {
method SetNewStartingHashKey (line 4324) | func (s *SplitShardInput) SetNewStartingHashKey(v string) *SplitShardI...
method SetShardToSplit (line 4330) | func (s *SplitShardInput) SetShardToSplit(v string) *SplitShardInput {
method SetStreamName (line 4336) | func (s *SplitShardInput) SetStreamName(v string) *SplitShardInput {
type SplitShardOutput (line 4342) | type SplitShardOutput struct
method String (line 4347) | func (s SplitShardOutput) String() string {
method GoString (line 4352) | func (s SplitShardOutput) GoString() string {
type StreamDescription (line 4358) | type StreamDescription struct
method String (line 4418) | func (s StreamDescription) String() string {
method GoString (line 4423) | func (s StreamDescription) GoString() string {
method SetEnhancedMonitoring (line 4428) | func (s *StreamDescription) SetEnhancedMonitoring(v []*EnhancedMetrics...
method SetHasMoreShards (line 4434) | func (s *StreamDescription) SetHasMoreShards(v bool) *StreamDescription {
method SetRetentionPeriodHours (line 4440) | func (s *StreamDescription) SetRetentionPeriodHours(v int64) *StreamDe...
method SetShards (line 4446) | func (s *StreamDescription) SetShards(v []*Shard) *StreamDescription {
method SetStreamARN (line 4452) | func (s *StreamDescription) SetStreamARN(v string) *StreamDescription {
method SetStreamCreationTimestamp (line 4458) | func (s *StreamDescription) SetStreamCreationTimestamp(v time.Time) *S...
method SetStreamName (line 4464) | func (s *StreamDescription) SetStreamName(v string) *StreamDescription {
method SetStreamStatus (line 4470) | func (s *StreamDescription) SetStreamStatus(v string) *StreamDescripti...
type Tag (line 4477) | type Tag struct
method String (line 4493) | func (s Tag) String() string {
method GoString (line 4498) | func (s Tag) GoString() string {
method SetKey (line 4503) | func (s *Tag) SetKey(v string) *Tag {
method SetValue (line 4509) | func (s *Tag) SetValue(v string) *Tag {
type UpdateShardCountInput (line 4515) | type UpdateShardCountInput struct
method String (line 4535) | func (s UpdateShardCountInput) String() string {
method GoString (line 4540) | func (s UpdateShardCountInput) GoString() string {
method Validate (line 4545) | func (s *UpdateShardCountInput) Validate() error {
method SetScalingType (line 4570) | func (s *UpdateShardCountInput) SetScalingType(v string) *UpdateShardC...
method SetStreamName (line 4576) | func (s *UpdateShardCountInput) SetStreamName(v string) *UpdateShardCo...
method SetTargetShardCount (line 4582) | func (s *UpdateShardCountInput) SetTargetShardCount(v int64) *UpdateSh...
type UpdateShardCountOutput (line 4588) | type UpdateShardCountOutput struct
method String (line 4602) | func (s UpdateShardCountOutput) String() string {
method GoString (line 4607) | func (s UpdateShardCountOutput) GoString() string {
method SetCurrentShardCount (line 4612) | func (s *UpdateShardCountOutput) SetCurrentShardCount(v int64) *Update...
method SetStreamName (line 4618) | func (s *UpdateShardCountOutput) SetStreamName(v string) *UpdateShardC...
method SetTargetShardCount (line 4624) | func (s *UpdateShardCountOutput) SetTargetShardCount(v int64) *UpdateS...
constant MetricsNameIncomingBytes (line 4631) | MetricsNameIncomingBytes = "IncomingBytes"
constant MetricsNameIncomingRecords (line 4634) | MetricsNameIncomingRecords = "IncomingRecords"
constant MetricsNameOutgoingBytes (line 4637) | MetricsNameOutgoingBytes = "OutgoingBytes"
constant MetricsNameOutgoingRecords (line 4640) | MetricsNameOutgoingRecords = "OutgoingRecords"
constant MetricsNameWriteProvisionedThroughputExceeded (line 4643) | MetricsNameWriteProvisionedThroughputExceeded = "WriteProvisionedThrough...
constant MetricsNameReadProvisionedThroughputExceeded (line 4646) | MetricsNameReadProvisionedThroughputExceeded = "ReadProvisionedThroughpu...
constant MetricsNameIteratorAgeMilliseconds (line 4649) | MetricsNameIteratorAgeMilliseconds = "IteratorAgeMilliseconds"
constant MetricsNameAll (line 4652) | MetricsNameAll = "ALL"
constant ScalingTypeUniformScaling (line 4657) | ScalingTypeUniformScaling = "UNIFORM_SCALING"
constant ShardIteratorTypeAtSequenceNumber (line 4662) | ShardIteratorTypeAtSequenceNumber = "AT_SEQUENCE_NUMBER"
constant ShardIteratorTypeAfterSequenceNumber (line 4665) | ShardIteratorTypeAfterSequenceNumber = "AFTER_SEQUENCE_NUMBER"
constant ShardIteratorTypeTrimHorizon (line 4668) | ShardIteratorTypeTrimHorizon = "TRIM_HORIZON"
constant ShardIteratorTypeLatest (line 4671) | ShardIteratorTypeLatest = "LATEST"
constant ShardIteratorTypeAtTimestamp (line 4674) | ShardIteratorTypeAtTimestamp = "AT_TIMESTAMP"
constant StreamStatusCreating (line 4679) | StreamStatusCreating = "CREATING"
constant StreamStatusDeleting (line 4682) | StreamStatusDeleting = "DELETING"
constant StreamStatusActive (line 4685) | StreamStatusActive = "ACTIVE"
constant StreamStatusUpdating (line 4688) | StreamStatusUpdating = "UPDATING"
FILE: 12fa-docker-golang/chapter11/vendor/github.com/aws/aws-sdk-go/service/kinesis/customizations.go
function init (line 11) | func init() {
FILE: 12fa-docker-golang/chapter11/vendor/github.com/aws/aws-sdk-go/service/kinesis/errors.go
constant ErrCodeExpiredIteratorException (line 11) | ErrCodeExpiredIteratorException = "ExpiredIteratorException"
constant ErrCodeInvalidArgumentException (line 18) | ErrCodeInvalidArgumentException = "InvalidArgumentException"
constant ErrCodeLimitExceededException (line 25) | ErrCodeLimitExceededException = "LimitExceededException"
constant ErrCodeProvisionedThroughputExceededException (line 36) | ErrCodeProvisionedThroughputExceededException = "ProvisionedThroughputEx...
constant ErrCodeResourceInUseException (line 43) | ErrCodeResourceInUseException = "ResourceInUseException"
constant ErrCodeResourceNotFoundException (line 50) | ErrCodeResourceNotFoundException = "ResourceNotFoundException"
FILE: 12fa-docker-golang/chapter11/vendor/github.com/aws/aws-sdk-go/service/kinesis/kinesisiface/interface.go
type KinesisAPI (line 62) | type KinesisAPI interface
FILE: 12fa-docker-golang/chapter11/vendor/github.com/aws/aws-sdk-go/service/kinesis/service.go
type Kinesis (line 19) | type Kinesis struct
method newRequest (line 85) | func (c *Kinesis) newRequest(op *request.Operation, params, data inter...
constant ServiceName (line 31) | ServiceName = "kinesis"
constant EndpointsID (line 32) | EndpointsID = ServiceName
function New (line 45) | func New(p client.ConfigProvider, cfgs ...*aws.Config) *Kinesis {
function newClient (line 51) | func newClient(cfg aws.Config, handlers request.Handlers, endpoint, sign...
FILE: 12fa-docker-golang/chapter11/vendor/github.com/aws/aws-sdk-go/service/kinesis/waiters.go
method WaitUntilStreamExists (line 16) | func (c *Kinesis) WaitUntilStreamExists(input *DescribeStreamInput) error {
method WaitUntilStreamExistsWithContext (line 28) | func (c *Kinesis) WaitUntilStreamExistsWithContext(ctx aws.Context, inpu...
FILE: 12fa-docker-golang/chapter11/vendor/github.com/aws/aws-sdk-go/service/sts/api.go
constant opAssumeRole (line 14) | opAssumeRole = "AssumeRole"
method AssumeRoleRequest (line 41) | func (c *STS) AssumeRoleRequest(input *AssumeRoleInput) (req *request.Re...
method AssumeRole (line 174) | func (c *STS) AssumeRole(input *AssumeRoleInput) (*AssumeRoleOutput, err...
method AssumeRoleWithContext (line 188) | func (c *STS) AssumeRoleWithContext(ctx aws.Context, input *AssumeRoleIn...
constant opAssumeRoleWithSAML (line 195) | opAssumeRoleWithSAML = "AssumeRoleWithSAML"
method AssumeRoleWithSAMLRequest (line 222) | func (c *STS) AssumeRoleWithSAMLRequest(input *AssumeRoleWithSAMLInput) ...
method AssumeRoleWithSAML (line 348) | func (c *STS) AssumeRoleWithSAML(input *AssumeRoleWithSAMLInput) (*Assum...
method AssumeRoleWithSAMLWithContext (line 362) | func (c *STS) AssumeRoleWithSAMLWithContext(ctx aws.Context, input *Assu...
constant opAssumeRoleWithWebIdentity (line 369) | opAssumeRoleWithWebIdentity = "AssumeRoleWithWebIdentity"
method AssumeRoleWithWebIdentityRequest (line 396) | func (c *STS) AssumeRoleWithWebIdentityRequest(input *AssumeRoleWithWebI...
method AssumeRoleWithWebIdentity (line 551) | func (c *STS) AssumeRoleWithWebIdentity(input *AssumeRoleWithWebIdentity...
method AssumeRoleWithWebIdentityWithContext (line 565) | func (c *STS) AssumeRoleWithWebIdentityWithContext(ctx aws.Context, inpu...
constant opDecodeAuthorizationMessage (line 572) | opDecodeAuthorizationMessage = "DecodeAuthorizationMessage"
method DecodeAuthorizationMessageRequest (line 599) | func (c *STS) DecodeAuthorizationMessageRequest(input *DecodeAuthorizati...
method DecodeAuthorizationMessage (line 664) | func (c *STS) DecodeAuthorizationMessage(input *DecodeAuthorizationMessa...
method DecodeAuthorizationMessageWithContext (line 678) | func (c *STS) DecodeAuthorizationMessageWithContext(ctx aws.Context, inp...
constant opGetCallerIdentity (line 685) | opGetCallerIdentity = "GetCallerIdentity"
method GetCallerIdentityRequest (line 712) | func (c *STS) GetCallerIdentityRequest(input *GetCallerIdentityInput) (r...
method GetCallerIdentity (line 740) | func (c *STS) GetCallerIdentity(input *GetCallerIdentityInput) (*GetCall...
method GetCallerIdentityWithContext (line 754) | func (c *STS) GetCallerIdentityWithContext(ctx aws.Context, input *GetCa...
constant opGetFederationToken (line 761) | opGetFederationToken = "GetFederationToken"
method GetFederationTokenRequest (line 788) | func (c *STS) GetFederationTokenRequest(input *GetFederationTokenInput) ...
method GetFederationToken (line 910) | func (c *STS) GetFederationToken(input *GetFederationTokenInput) (*GetFe...
method GetFederationTokenWithContext (line 924) | func (c *STS) GetFederationTokenWithContext(ctx aws.Context, input *GetF...
constant opGetSessionToken (line 931) | opGetSessionToken = "GetSessionToken"
method GetSessionTokenRequest (line 958) | func (c *STS) GetSessionTokenRequest(input *GetSessionTokenInput) (req *...
method GetSessionToken (line 1039) | func (c *STS) GetSessionToken(input *GetSessionTokenInput) (*GetSessionT...
method GetSessionTokenWithContext (line 1053) | func (c *STS) GetSessionTokenWithContext(ctx aws.Context, input *GetSess...
type AssumeRoleInput (line 1061) | type AssumeRoleInput struct
method String (line 1162) | func (s AssumeRoleInput) String() string {
method GoString (line 1167) | func (s AssumeRoleInput) GoString() string {
method Validate (line 1172) | func (s *AssumeRoleInput) Validate() error {
method SetDurationSeconds (line 1209) | func (s *AssumeRoleInput) SetDurationSeconds(v int64) *AssumeRoleInput {
method SetExternalId (line 1215) | func (s *AssumeRoleInput) SetExternalId(v string) *AssumeRoleInput {
method SetPolicy (line 1221) | func (s *AssumeRoleInput) SetPolicy(v string) *AssumeRoleInput {
method SetRoleArn (line 1227) | func (s *AssumeRoleInput) SetRoleArn(v string) *AssumeRoleInput {
method SetRoleSessionName (line 1233) | func (s *AssumeRoleInput) SetRoleSessionName(v string) *AssumeRoleInput {
method SetSerialNumber (line 1239) | func (s *AssumeRoleInput) SetSerialNumber(v string) *AssumeRoleInput {
method SetTokenCode (line 1245) | func (s *AssumeRoleInput) SetTokenCode(v string) *AssumeRoleInput {
type AssumeRoleOutput (line 1253) | type AssumeRoleOutput struct
method String (line 1279) | func (s AssumeRoleOutput) String() string {
method GoString (line 1284) | func (s AssumeRoleOutput) GoString() string {
method SetAssumedRoleUser (line 1289) | func (s *AssumeRoleOutput) SetAssumedRoleUser(v *AssumedRoleUser) *Ass...
method SetCredentials (line 1295) | func (s *AssumeRoleOutput) SetCredentials(v *Credentials) *AssumeRoleO...
method SetPackedPolicySize (line 1301) | func (s *AssumeRoleOutput) SetPackedPolicySize(v int64) *AssumeRoleOut...
type AssumeRoleWithSAMLInput (line 1307) | type AssumeRoleWithSAMLInput struct
method String (line 1372) | func (s AssumeRoleWithSAMLInput) String() string {
method GoString (line 1377) | func (s AssumeRoleWithSAMLInput) GoString() string {
method Validate (line 1382) | func (s *AssumeRoleWithSAMLInput) Validate() error {
method SetDurationSeconds (line 1416) | func (s *AssumeRoleWithSAMLInput) SetDurationSeconds(v int64) *AssumeR...
method SetPolicy (line 1422) | func (s *AssumeRoleWithSAMLInput) SetPolicy(v string) *AssumeRoleWithS...
method SetPrincipalArn (line 1428) | func (s *AssumeRoleWithSAMLInput) SetPrincipalArn(v string) *AssumeRol...
method SetRoleArn (line 1434) | func (s *AssumeRoleWithSAMLInput) SetRoleArn(v string) *AssumeRoleWith...
method SetSAMLAssertion (line 1440) | func (s *AssumeRoleWithSAMLInput) SetSAMLAssertion(v string) *AssumeRo...
type AssumeRoleWithSAMLOutput (line 1448) | type AssumeRoleWithSAMLOutput struct
method String (line 1502) | func (s AssumeRoleWithSAMLOutput) String() string {
method GoString (line 1507) | func (s AssumeRoleWithSAMLOutput) GoString() string {
method SetAssumedRoleUser (line 1512) | func (s *AssumeRoleWithSAMLOutput) SetAssumedRoleUser(v *AssumedRoleUs...
method SetAudience (line 1518) | func (s *AssumeRoleWithSAMLOutput) SetAudience(v string) *AssumeRoleWi...
method SetCredentials (line 1524) | func (s *AssumeRoleWithSAMLOutput) SetCredentials(v *Credentials) *Ass...
method SetIssuer (line 1530) | func (s *AssumeRoleWithSAMLOutput) SetIssuer(v string) *AssumeRoleWith...
method SetNameQualifier (line 1536) | func (s *AssumeRoleWithSAMLOutput) SetNameQualifier(v string) *AssumeR...
method SetPackedPolicySize (line 1542) | func (s *AssumeRoleWithSAMLOutput) SetPackedPolicySize(v int64) *Assum...
method SetSubject (line 1548) | func (s *AssumeRoleWithSAMLOutput) SetSubject(v string) *AssumeRoleWit...
method SetSubjectType (line 1554) | func (s *AssumeRoleWithSAMLOutput) SetSubjectType(v string) *AssumeRol...
type AssumeRoleWithWebIdentityInput (line 1560) | type AssumeRoleWithWebIdentityInput struct
method String (line 1638) | func (s AssumeRoleWithWebIdentityInput) String() string {
method GoString (line 1643) | func (s AssumeRoleWithWebIdentityInput) GoString() string {
method Validate (line 1648) | func (s *AssumeRoleWithWebIdentityInput) Validate() error {
method SetDurationSeconds (line 1685) | func (s *AssumeRoleWithWebIdentityInput) SetDurationSeconds(v int64) *...
method SetPolicy (line 1691) | func (s *AssumeRoleWithWebIdentityInput) SetPolicy(v string) *AssumeRo...
method SetProviderId (line 1697) | func (s *AssumeRoleWithWebIdentityInput) SetProviderId(v string) *Assu...
method SetRoleArn (line 1703) | func (s *AssumeRoleWithWebIdentityInput) SetRoleArn(v string) *AssumeR...
method SetRoleSessionName (line 1709) | func (s *AssumeRoleWithWebIdentityInput) SetRoleSessionName(v string) ...
method SetWebIdentityToken (line 1715) | func (s *AssumeRoleWithWebIdentityInput) SetWebIdentityToken(v string)...
type AssumeRoleWithWebIdentityOutput (line 1723) | type AssumeRoleWithWebIdentityOutput struct
method String (line 1768) | func (s AssumeRoleWithWebIdentityOutput) String() string {
method GoString (line 1773) | func (s AssumeRoleWithWebIdentityOutput) GoString() string {
method SetAssumedRoleUser (line 1778) | func (s *AssumeRoleWithWebIdentityOutput) SetAssumedRoleUser(v *Assume...
method SetAudience (line 1784) | func (s *AssumeRoleWithWebIdentityOutput) SetAudience(v string) *Assum...
method SetCredentials (line 1790) | func (s *AssumeRoleWithWebIdentityOutput) SetCredentials(v *Credential...
method SetPackedPolicySize (line 1796) | func (s *AssumeRoleWithWebIdentityOutput) SetPackedPolicySize(v int64)...
method SetProvider (line 1802) | func (s *AssumeRoleWithWebIdentityOutput) SetProvider(v string) *Assum...
method SetSubjectFromWebIdentityToken (line 1808) | func (s *AssumeRoleWithWebIdentityOutput) SetSubjectFromWebIdentityTok...
type AssumedRoleUser (line 1816) | type AssumedRoleUser struct
method String (line 1836) | func (s AssumedRoleUser) String() string {
method GoString (line 1841) | func (s AssumedRoleUser) GoString() string {
method SetArn (line 1846) | func (s *AssumedRoleUser) SetArn(v string) *AssumedRoleUser {
method SetAssumedRoleId (line 1852) | func (s *AssumedRoleUser) SetAssumedRoleId(v string) *AssumedRoleUser {
type Credentials (line 1859) | type Credentials struct
method String (line 1884) | func (s Credentials) String() string {
method GoString (line 1889) | func (s Credentials) GoString() string {
method SetAccessKeyId (line 1894) | func (s *Credentials) SetAccessKeyId(v string) *Credentials {
method SetExpiration (line 1900) | func (s *Credentials) SetExpiration(v time.Time) *Credentials {
method SetSecretAccessKey (line 1906) | func (s *Credentials) SetSecretAccessKey(v string) *Credentials {
method SetSessionToken (line 1912) | func (s *Credentials) SetSessionToken(v string) *Credentials {
type DecodeAuthorizationMessageInput (line 1918) | type DecodeAuthorizationMessageInput struct
method String (line 1928) | func (s DecodeAuthorizationMessageInput) String() string {
method GoString (line 1933) | func (s DecodeAuthorizationMessageInput) GoString() string {
method Validate (line 1938) | func (s *DecodeAuthorizationMessageInput) Validate() error {
method SetEncodedMessage (line 1954) | func (s *DecodeAuthorizationMessageInput) SetEncodedMessage(v string) ...
type DecodeAuthorizationMessageOutput (line 1963) | type DecodeAuthorizationMessageOutput struct
method String (line 1971) | func (s DecodeAuthorizationMessageOutput) String() string {
method GoString (line 1976) | func (s DecodeAuthorizationMessageOutput) GoString() string {
method SetDecodedMessage (line 1981) | func (s *DecodeAuthorizationMessageOutput) SetDecodedMessage(v string)...
type FederatedUser (line 1988) | type FederatedUser struct
method String (line 2007) | func (s FederatedUser) String() string {
method GoString (line 2012) | func (s FederatedUser) GoString() string {
method SetArn (line 2017) | func (s *FederatedUser) SetArn(v string) *FederatedUser {
method SetFederatedUserId (line 2023) | func (s *FederatedUser) SetFederatedUserId(v string) *FederatedUser {
type GetCallerIdentityInput (line 2029) | type GetCallerIdentityInput struct
method String (line 2034) | func (s GetCallerIdentityInput) String() string {
method GoString (line 2039) | func (s GetCallerIdentityInput) GoString() string {
type GetCallerIdentityOutput (line 2046) | type GetCallerIdentityOutput struct
method String (line 2064) | func (s GetCallerIdentityOutput) String() string {
method GoString (line 2069) | func (s GetCallerIdentityOutput) GoString() string {
method SetAccount (line 2074) | func (s *GetCallerIdentityOutput) SetAccount(v string) *GetCallerIdent...
method SetArn (line 2080) | func (s *GetCallerIdentityOutput) SetArn(v string) *GetCallerIdentityO...
method SetUserId (line 2086) | func (s *GetCallerIdentityOutput) SetUserId(v string) *GetCallerIdenti...
type GetFederationTokenInput (line 2092) | type GetFederationTokenInput struct
method String (line 2149) | func (s GetFederationTokenInput) String() string {
method GoString (line 2154) | func (s GetFederationTokenInput) GoString() string {
method Validate (line 2159) | func (s *GetFederationTokenInput) Validate() error {
method SetDurationSeconds (line 2181) | func (s *GetFederationTokenInput) SetDurationSeconds(v int64) *GetFede...
method SetName (line 2187) | func (s *GetFederationTokenInput) SetName(v string) *GetFederationToke...
method SetPolicy (line 2193) | func (s *GetFederationTokenInput) SetPolicy(v string) *GetFederationTo...
type GetFederationTokenOutput (line 2201) | type GetFederationTokenOutput struct
method String (line 2226) | func (s GetFederationTokenOutput) String() string {
method GoString (line 2231) | func (s GetFederationTokenOutput) GoString() string {
method SetCredentials (line 2236) | func (s *GetFederationTokenOutput) SetCredentials(v *Credentials) *Get...
method SetFederatedUser (line 2242) | func (s *GetFederationTokenOutput) SetFederatedUser(v *FederatedUser) ...
method SetPackedPolicySize (line 2248) | func (s *GetFederationTokenOutput) SetPackedPolicySize(v int64) *GetFe...
type GetSessionTokenInput (line 2254) | type GetSessionTokenInput struct
method String (line 2290) | func (s GetSessionTokenInput) String() string {
method GoString (line 2295) | func (s GetSessionTokenInput) GoString() string {
method Validate (line 2300) | func (s *GetSessionTokenInput) Validate() error {
method SetDurationSeconds (line 2319) | func (s *GetSessionTokenInput) SetDurationSeconds(v int64) *GetSession...
method SetSerialNumber (line 2325) | func (s *GetSessionTokenInput) SetSerialNumber(v string) *GetSessionTo...
method SetTokenCode (line 2331) | func (s *GetSessionTokenInput) SetTokenCode(v string) *GetSessionToken...
type GetSessionTokenOutput (line 2339) | type GetSessionTokenOutput struct
method String (line 2353) | func (s GetSessionTokenOutput) String() string {
method GoString (line 2358) | func (s GetSessionTokenOutput) GoString() string {
method SetCredentials (line 2363) | func (s *GetSessionTokenOutput) SetCredentials(v *Credentials) *GetSes...
FILE: 12fa-docker-golang/chapter11/vendor/github.com/aws/aws-sdk-go/service/sts/customizations.go
function init (line 5) | func init() {
FILE: 12fa-docker-golang/chapter11/vendor/github.com/aws/aws-sdk-go/service/sts/errors.go
constant ErrCodeExpiredTokenException (line 12) | ErrCodeExpiredTokenException = "ExpiredTokenException"
constant ErrCodeIDPCommunicationErrorException (line 22) | ErrCodeIDPCommunicationErrorException = "IDPCommunicationError"
constant ErrCodeIDPRejectedClaimException (line 32) | ErrCodeIDPRejectedClaimException = "IDPRejectedClaim"
constant ErrCodeInvalidAuthorizationMessageException (line 40) | ErrCodeInvalidAuthorizationMessageException = "InvalidAuthorizationMessa...
constant ErrCodeInvalidIdentityTokenException (line 47) | ErrCodeInvalidIdentityTokenException = "InvalidIdentityToken"
constant ErrCodeMalformedPolicyDocumentException (line 54) | ErrCodeMalformedPolicyDocumentException = "MalformedPolicyDocument"
constant ErrCodePackedPolicyTooLargeException (line 62) | ErrCodePackedPolicyTooLargeException = "PackedPolicyTooLarge"
constant ErrCodeRegionDisabledException (line 72) | ErrCodeRegionDisabledException = "RegionDisabledException"
FILE: 12fa-docker-golang/chapter11/vendor/github.com/aws/aws-sdk-go/service/sts/service.go
type STS (line 62) | type STS struct
method newRequest (line 126) | func (c *STS) newRequest(op *request.Operation, params, data interface...
constant ServiceName (line 74) | ServiceName = "sts"
constant EndpointsID (line 75) | EndpointsID = ServiceName
function New (line 88) | func New(p client.ConfigProvider, cfgs ...*aws.Config) *STS {
function newClient (line 94) | func newClient(cfg aws.Config, handlers request.Handlers, endpoint, sign...
FILE: 12fa-docker-golang/chapter11/vendor/github.com/aws/aws-sdk-go/service/sts/stsiface/interface.go
type STSAPI (line 62) | type STSAPI interface
FILE: 12fa-docker-golang/chapter11/vendor/github.com/aws/aws-sdk-go/vendor/github.com/go-ini/ini/error.go
type ErrDelimiterNotFound (line 21) | type ErrDelimiterNotFound struct
method Error (line 30) | func (err ErrDelimiterNotFound) Error() string {
function IsErrDelimiterNotFound (line 25) | func IsErrDelimiterNotFound(err error) bool {
FILE: 12fa-docker-golang/chapter11/vendor/github.com/aws/aws-sdk-go/vendor/github.com/go-ini/ini/ini.go
constant DEFAULT_SECTION (line 36) | DEFAULT_SECTION = "DEFAULT"
constant _DEPTH_VALUES (line 39) | _DEPTH_VALUES = 99
constant _VERSION (line 40) | _VERSION = "1.25.4"
function Version (line 44) | func Version() string {
function init (line 65) | func init() {
function inSlice (line 71) | func inSlice(str string, s []string) bool {
type dataSource (line 81) | type dataSource interface
type sourceFile (line 86) | type sourceFile struct
method ReadCloser (line 90) | func (s sourceFile) ReadCloser() (_ io.ReadCloser, err error) {
type bytesReadCloser (line 94) | type bytesReadCloser struct
method Read (line 98) | func (rc *bytesReadCloser) Read(p []byte) (n int, err error) {
method Close (line 102) | func (rc *bytesReadCloser) Close() error {
type sourceData (line 107) | type sourceData struct
method ReadCloser (line 111) | func (s *sourceData) ReadCloser() (io.ReadCloser, error) {
type sourceReadCloser (line 116) | type sourceReadCloser struct
method ReadCloser (line 120) | func (s *sourceReadCloser) ReadCloser() (io.ReadCloser, error) {
type File (line 125) | type File struct
method NewSection (line 238) | func (f *File) NewSection(name string) (*Section, error) {
method NewRawSection (line 260) | func (f *File) NewRawSection(name, body string) (*Section, error) {
method NewSections (line 272) | func (f *File) NewSections(names ...string) (err error) {
method GetSection (line 282) | func (f *File) GetSection(name string) (*Section, error) {
method Section (line 302) | func (f *File) Section(name string) *Section {
method Sections (line 314) | func (f *File) Sections() []*Section {
method SectionStrings (line 323) | func (f *File) SectionStrings() []string {
method DeleteSection (line 330) | func (f *File) DeleteSection(name string) {
method reload (line 349) | func (f *File) reload(s dataSource) error {
method Reload (line 360) | func (f *File) Reload() (err error) {
method Append (line 375) | func (f *File) Append(source interface{}, others ...interface{}) error {
method WriteToIndent (line 394) | func (f *File) WriteToIndent(w io.Writer, indent string) (n int64, err...
method WriteTo (line 519) | func (f *File) WriteTo(w io.Writer) (int64, error) {
method SaveToIndent (line 524) | func (f *File) SaveToIndent(filename, indent string) error {
method SaveTo (line 547) | func (f *File) SaveTo(filename string) error {
function newFile (line 146) | func newFile(dataSources []dataSource, opts LoadOptions) *File {
function parseDataSource (line 156) | func parseDataSource(source interface{}) (dataSource, error) {
type LoadOptions (line 169) | type LoadOptions struct
function LoadSources (line 186) | func LoadSources(opts LoadOptions, source interface{}, others ...interfa...
function Load (line 208) | func Load(source interface{}, others ...interface{}) (*File, error) {
function LooseLoad (line 214) | func LooseLoad(source interface{}, others ...interface{}) (*File, error) {
function InsensitiveLoad (line 220) | func InsensitiveLoad(source interface{}, others ...interface{}) (*File, ...
function ShadowLoad (line 226) | func ShadowLoad(source interface{}, others ...interface{}) (*File, error) {
function Empty (line 231) | func Empty() *File {
FILE: 12fa-docker-golang/chapter11/vendor/github.com/aws/aws-sdk-go/vendor/github.com/go-ini/ini/key.go
type Key (line 26) | type Key struct
method addShadow (line 48) | func (k *Key) addShadow(val string) error {
method AddShadow (line 62) | func (k *Key) AddShadow(val string) error {
method Name (line 73) | func (k *Key) Name() string {
method Value (line 78) | func (k *Key) Value() string {
method ValueWithShadows (line 83) | func (k *Key) ValueWithShadows() []string {
method transformValue (line 96) | func (k *Key) transformValue(val string) string {
method String (line 129) | func (k *Key) String() string {
method Validate (line 135) | func (k *Key) Validate(fn func(string) string) string {
method Bool (line 155) | func (k *Key) Bool() (bool, error) {
method Float64 (line 160) | func (k *Key) Float64() (float64, error) {
method Int (line 165) | func (k *Key) Int() (int, error) {
method Int64 (line 170) | func (k *Key) Int64() (int64, error) {
method Uint (line 175) | func (k *Key) Uint() (uint, error) {
method Uint64 (line 181) | func (k *Key) Uint64() (uint64, error) {
method Duration (line 186) | func (k *Key) Duration() (time.Duration, error) {
method TimeFormat (line 191) | func (k *Key) TimeFormat(format string) (time.Time, error) {
method Time (line 196) | func (k *Key) Time() (time.Time, error) {
method MustString (line 201) | func (k *Key) MustString(defaultVal string) string {
method MustBool (line 212) | func (k *Key) MustBool(defaultVal ...bool) bool {
method MustFloat64 (line 223) | func (k *Key) MustFloat64(defaultVal ...float64) float64 {
method MustInt (line 234) | func (k *Key) MustInt(defaultVal ...int) int {
method MustInt64 (line 245) | func (k *Key) MustInt64(defaultVal ...int64) int64 {
method MustUint (line 256) | func (k *Key) MustUint(defaultVal ...uint) uint {
method MustUint64 (line 267) | func (k *Key) MustUint64(defaultVal ...uint64) uint64 {
method MustDuration (line 278) | func (k *Key) MustDuration(defaultVal ...time.Duration) time.Duration {
method MustTimeFormat (line 289) | func (k *Key) MustTimeFormat(format string, defaultVal ...time.Time) t...
method MustTime (line 300) | func (k *Key) MustTime(defaultVal ...time.Time) time.Time {
method In (line 306) | func (k *Key) In(defaultVal string, candidates []string) string {
method InFloat64 (line 318) | func (k *Key) InFloat64(defaultVal float64, candidates []float64) floa...
method InInt (line 330) | func (k *Key) InInt(defaultVal int, candidates []int) int {
method InInt64 (line 342) | func (k *Key) InInt64(defaultVal int64, candidates []int64) int64 {
method InUint (line 354) | func (k *Key) InUint(defaultVal uint, candidates []uint) uint {
method InUint64 (line 366) | func (k *Key) InUint64(defaultVal uint64, candidates []uint64) uint64 {
method InTimeFormat (line 378) | func (k *Key) InTimeFormat(format string, defaultVal time.Time, candid...
method InTime (line 390) | func (k *Key) InTime(defaultVal time.Time, candidates []time.Time) tim...
method RangeFloat64 (line 396) | func (k *Key) RangeFloat64(defaultVal, min, max float64) float64 {
method RangeInt (line 406) | func (k *Key) RangeInt(defaultVal, min, max int) int {
method RangeInt64 (line 416) | func (k *Key) RangeInt64(defaultVal, min, max int64) int64 {
method RangeTimeFormat (line 426) | func (k *Key) RangeTimeFormat(format string, defaultVal, min, max time...
method RangeTime (line 436) | func (k *Key) RangeTime(defaultVal, min, max time.Time) time.Time {
method Strings (line 441) | func (k *Key) Strings(delim string) []string {
method StringsWithShadows (line 457) | func (k *Key) StringsWithShadows(delim string) []string {
method Float64s (line 475) | func (k *Key) Float64s(delim string) []float64 {
method Ints (line 481) | func (k *Key) Ints(delim string) []int {
method Int64s (line 487) | func (k *Key) Int64s(delim string) []int64 {
method Uints (line 493) | func (k *Key) Uints(delim string) []uint {
method Uint64s (line 499) | func (k *Key) Uint64s(delim string) []uint64 {
method TimesFormat (line 506) | func (k *Key) TimesFormat(format, delim string) []time.Time {
method Times (line 513) | func (k *Key) Times(delim string) []time.Time {
method ValidFloat64s (line 519) | func (k *Key) ValidFloat64s(delim string) []float64 {
method ValidInts (line 526) | func (k *Key) ValidInts(delim string) []int {
method ValidInt64s (line 533) | func (k *Key) ValidInt64s(delim string) []int64 {
method ValidUints (line 540) | func (k *Key) ValidUints(delim string) []uint {
method ValidUint64s (line 547) | func (k *Key) ValidUint64s(delim string) []uint64 {
method ValidTimesFormat (line 553) | func (k *Key) ValidTimesFormat(format, delim string) []time.Time {
method ValidTimes (line 559) | func (k *Key) ValidTimes(delim string) []time.Time {
method StrictFloat64s (line 564) | func (k *Key) StrictFloat64s(delim string) ([]float64, error) {
method StrictInts (line 569) | func (k *Key) StrictInts(delim string) ([]int, error) {
method StrictInt64s (line 574) | func (k *Key) StrictInt64s(delim string) ([]int64, error) {
method StrictUints (line 579) | func (k *Key) StrictUints(delim string) ([]uint, error) {
method StrictUint64s (line 584) | func (k *Key) StrictUint64s(delim string) ([]uint64, error) {
method StrictTimesFormat (line 590) | func (k *Key) StrictTimesFormat(format, delim string) ([]time.Time, er...
method StrictTimes (line 596) | func (k *Key) StrictTimes(delim string) ([]time.Time, error) {
method getFloat64s (line 601) | func (k *Key) getFloat64s(delim string, addInvalid, returnOnInvalid bo...
method parseInts (line 617) | func (k *Key) parseInts(strs []string, addInvalid, returnOnInvalid boo...
method parseInt64s (line 632) | func (k *Key) parseInt64s(strs []string, addInvalid, returnOnInvalid b...
method getUints (line 647) | func (k *Key) getUints(delim string, addInvalid, returnOnInvalid bool)...
method getUint64s (line 663) | func (k *Key) getUint64s(delim string, addInvalid, returnOnInvalid boo...
method getTimesFormat (line 679) | func (k *Key) getTimesFormat(format, delim string, addInvalid, returnO...
method SetValue (line 695) | func (k *Key) SetValue(v string) {
function newKey (line 40) | func newKey(s *Section, name, val string) *Key {
type ValueMapper (line 70) | type ValueMapper
function parseBool (line 144) | func parseBool(str string) (value bool, err error) {
FILE: 12fa-docker-golang/chapter11/vendor/github.com/aws/aws-sdk-go/vendor/github.com/go-ini/ini/parser.go
type tokenType (line 27) | type tokenType
constant _TOKEN_INVALID (line 30) | _TOKEN_INVALID tokenType = iota
constant _TOKEN_COMMENT (line 31) | _TOKEN_COMMENT
constant _TOKEN_SECTION (line 32) | _TOKEN_SECTION
constant _TOKEN_KEY (line 33) | _TOKEN_KEY
type parser (line 36) | type parser struct
method BOM (line 53) | func (p *parser) BOM() error {
method readUntil (line 80) | func (p *parser) readUntil(delim byte) ([]byte, error) {
method readMultilines (line 142) | func (p *parser) readMultilines(line, val, valQuote string) (string, e...
method readContinuationLines (line 168) | func (p *parser) readContinuationLines(val string) (string, error) {
method readValue (line 196) | func (p *parser) readValue(in []byte, ignoreContinuation bool) (string...
function newParser (line 43) | func newParser(r io.Reader) *parser {
function cleanComment (line 92) | func cleanComment(in []byte) ([]byte, bool) {
function readKeyName (line 100) | func readKeyName(in []byte) (string, int, error) {
function hasSurroundedQuote (line 191) | func hasSurroundedQuote(in string, quote byte) bool {
method parse (line 243) | func (f *File) parse(reader io.Reader) (err error) {
FILE: 12fa-docker-golang/chapter11/vendor/github.com/aws/aws-sdk-go/vendor/github.com/go-ini/ini/section.go
type Section (line 24) | type Section struct
method Name (line 47) | func (s *Section) Name() string {
method Body (line 53) | func (s *Section) Body() string {
method NewKey (line 58) | func (s *Section) NewKey(name, val string) (*Key, error) {
method NewBooleanKey (line 88) | func (s *Section) NewBooleanKey(name string) (*Key, error) {
method GetKey (line 99) | func (s *Section) GetKey(name string) (*Key, error) {
method HasKey (line 133) | func (s *Section) HasKey(name string) bool {
method Haskey (line 139) | func (s *Section) Haskey(name string) bool {
method HasValue (line 144) | func (s *Section) HasValue(value string) bool {
method Key (line 159) | func (s *Section) Key(name string) *Key {
method Keys (line 171) | func (s *Section) Keys() []*Key {
method ParentKeys (line 180) | func (s *Section) ParentKeys() []*Key {
method KeyStrings (line 200) | func (s *Section) KeyStrings() []string {
method KeysHash (line 207) | func (s *Section) KeysHash() map[string]string {
method DeleteKey (line 221) | func (s *Section) DeleteKey(name string) {
function newSection (line 36) | func newSection(f *File, name string) *Section {
FILE: 12fa-docker-golang/chapter11/vendor/github.com/aws/aws-sdk-go/vendor/github.com/go-ini/ini/struct.go
type NameMapper (line 28) | type NameMapper
method parseFieldName (line 61) | func (s *Section) parseFieldName(raw, actual string) string {
function parseDelim (line 71) | func parseDelim(actual string) string {
function setSliceWithProperType (line 81) | func setSliceWithProperType(key *Key, field reflect.Value, delim string,...
function setWithProperType (line 142) | func setWithProperType(t reflect.Type, key *Key, field reflect.Value, de...
function parseTagOptions (line 203) | func parseTagOptions(tag string) (rawName string, omitEmpty bool, allowS...
method mapTo (line 215) | func (s *Section) mapTo(val reflect.Value) error {
method MapTo (line 262) | func (s *Section) MapTo(v interface{}) error {
method MapTo (line 276) | func (f *File) MapTo(v interface{}) error {
function MapToWithMapper (line 281) | func MapToWithMapper(v interface{}, mapper NameMapper, source interface{...
function MapTo (line 291) | func MapTo(v, source interface{}, others ...interface{}) error {
function reflectSliceWithProperType (line 296) | func reflectSliceWithProperType(key *Key, field reflect.Value, delim str...
function reflectWithProperType (line 326) | func reflectWithProperType(t reflect.Type, key *Key, field reflect.Value...
function isEmptyValue (line 350) | func isEmptyValue(v reflect.Value) bool {
method reflectFrom (line 370) | func (s *Section) reflectFrom(val reflect.Value) error {
method ReflectFrom (line 423) | func (s *Section) ReflectFrom(v interface{}) error {
method ReflectFrom (line 437) | func (f *File) ReflectFrom(v interface{}) error {
function ReflectFromWithMapper (line 442) | func ReflectFromWithMapper(cfg *File, v interface{}, mapper NameMapper) ...
function ReflectFrom (line 448) | func ReflectFrom(cfg *File, v interface{}) error {
FILE: 12fa-docker-golang/chapter11/vendor/github.com/aws/aws-sdk-go/vendor/github.com/jmespath/go-jmespath/api.go
type JMESPath (line 7) | type JMESPath struct
method Search (line 36) | func (jp *JMESPath) Search(data interface{}) (interface{}, error) {
function Compile (line 14) | func Compile(expression string) (*JMESPath, error) {
function MustCompile (line 27) | func MustCompile(expression string) *JMESPath {
function Search (line 41) | func Search(expression string, data interface{}) (interface{}, error) {
FILE: 12fa-docker-golang/chapter11/vendor/github.com/aws/aws-sdk-go/vendor/github.com/jmespath/go-jmespath/astnodetype_string.go
constant _astNodeType_name (line 7) | _astNodeType_name = "ASTEmptyASTComparatorASTCurrentNodeASTExpRefASTFunc...
method String (line 11) | func (i astNodeType) String() string {
FILE: 12fa-docker-golang/chapter11/vendor/github.com/aws/aws-sdk-go/vendor/github.com/jmespath/go-jmespath/functions.go
type jpFunction (line 15) | type jpFunction
type jpType (line 17) | type jpType
constant jpUnknown (line 20) | jpUnknown jpType = "unknown"
constant jpNumber (line 21) | jpNumber jpType = "number"
constant jpString (line 22) | jpString jpType = "string"
constant jpArray (line 23) | jpArray jpType = "array"
constant jpObject (line 24) | jpObject jpType = "object"
constant jpArrayNumber (line 25) | jpArrayNumber jpType = "array[number]"
constant jpArrayString (line 26) | jpArrayString jpType = "array[string]"
constant jpExpref (line 27) | jpExpref jpType = "expref"
constant jpAny (line 28) | jpAny jpType = "any"
type functionEntry (line 31) | type functionEntry struct
method resolveArgs (line 326) | func (e *functionEntry) resolveArgs(arguments []interface{}) ([]interf...
type argSpec (line 38) | type argSpec struct
method typeCheck (line 349) | func (a *argSpec) typeCheck(arg interface{}) error {
type byExprString (line 43) | type byExprString struct
method Len (line 50) | func (a *byExprString) Len() int {
method Swap (line 53) | func (a *byExprString) Swap(i, j int) {
method Less (line 56) | func (a *byExprString) Less(i, j int) bool {
type byExprFloat (line 82) | type byExprFloat struct
method Len (line 89) | func (a *byExprFloat) Len() int {
method Swap (line 92) | func (a *byExprFloat) Swap(i, j int) {
method Less (line 95) | func (a *byExprFloat) Less(i, j int) bool {
type functionCaller (line 121) | type functionCaller struct
method CallFunction (line 387) | func (f *functionCaller) CallFunction(name string, arguments []interfa...
function newFunctionCaller (line 125) | func newFunctionCaller() *functionCaller {
function jpfAbs (line 404) | func jpfAbs(arguments []interface{}) (interface{}, error) {
function jpfLength (line 409) | func jpfLength(arguments []interface{}) (interface{}, error) {
function jpfStartsWith (line 422) | func jpfStartsWith(arguments []interface{}) (interface{}, error) {
function jpfAvg (line 428) | func jpfAvg(arguments []interface{}) (interface{}, error) {
function jpfCeil (line 439) | func jpfCeil(arguments []interface{}) (interface{}, error) {
function jpfContains (line 443) | func jpfContains(arguments []interface{}) (interface{}, error) {
function jpfEndsWith (line 461) | func jpfEndsWith(arguments []interface{}) (interface{}, error) {
function jpfFloor (line 466) | func jpfFloor(arguments []interface{}) (interface{}, error) {
function jpfMap (line 470) | func jpfMap(arguments []interface{}) (interface{}, error) {
function jpfMax (line 485) | func jpfMax(arguments []interface{}) (interface{}, error) {
function jpfMerge (line 517) | func jpfMerge(arguments []interface{}) (interface{}, error) {
function jpfMaxBy (line 527) | func jpfMaxBy(arguments []interface{}) (interface{}, error) {
function jpfSum (line 582) | func jpfSum(arguments []interface{}) (interface{}, error) {
function jpfMin (line 591) | func jpfMin(arguments []interface{}) (interface{}, error) {
function jpfMinBy (line 623) | func jpfMinBy(arguments []interface{}) (interface{}, error) {
function jpfType (line 677) | func jpfType(arguments []interface{}) (interface{}, error) {
function jpfKeys (line 699) | func jpfKeys(arguments []interface{}) (interface{}, error) {
function jpfValues (line 707) | func jpfValues(arguments []interface{}) (interface{}, error) {
function jpfSort (line 715) | func jpfSort(arguments []interface{}) (interface{}, error) {
function jpfSortBy (line 735) | func jpfSortBy(arguments []interface{}) (interface{}, error) {
function jpfJoin (line 767) | func jpfJoin(arguments []interface{}) (interface{}, error) {
function jpfReverse (line 777) | func jpfReverse(arguments []interface{}) (interface{}, error) {
function jpfToArray (line 793) | func jpfToArray(arguments []interface{}) (interface{}, error) {
function jpfToString (line 799) | func jpfToString(arguments []interface{}) (interface{}, error) {
function jpfToNumber (line 809) | func jpfToNumber(arguments []interface{}) (interface{}, error) {
function jpfNotNull (line 835) | func jpfNotNull(arguments []interface{}) (interface{}, error) {
FILE: 12fa-docker-golang/chapter11/vendor/github.com/aws/aws-sdk-go/vendor/github.com/jmespath/go-jmespath/fuzz/jmespath.go
function Fuzz (line 6) | func Fuzz(data []byte) int {
FILE: 12fa-docker-golang/chapter11/vendor/github.com/aws/aws-sdk-go/vendor/github.com/jmespath/go-jmespath/interpreter.go
type treeInterpreter (line 14) | type treeInterpreter struct
method Execute (line 31) | func (intr *treeInterpreter) Execute(node ASTNode, value interface{}) ...
method fieldFromStruct (line 317) | func (intr *treeInterpreter) fieldFromStruct(key string, value interfa...
method flattenWithReflection (line 342) | func (intr *treeInterpreter) flattenWithReflection(value interface{}) ...
method sliceWithReflection (line 363) | func (intr *treeInterpreter) sliceWithReflection(node ASTNode, value i...
method filterProjectionWithReflection (line 381) | func (intr *treeInterpreter) filterProjectionWithReflection(node ASTNo...
method projectWithReflection (line 404) | func (intr *treeInterpreter) projectWithReflection(node ASTNode, value...
function newInterpreter (line 18) | func newInterpreter() *treeInterpreter {
type expRef (line 24) | type expRef struct
FILE: 12fa-docker-golang/chapter11/vendor/github.com/aws/aws-sdk-go/vendor/github.com/jmespath/go-jmespath/lexer.go
type token (line 12) | type token struct
method String (line 111) | func (t token) String() string {
type tokType (line 19) | type tokType
constant eof (line 21) | eof = -1
type Lexer (line 24) | type Lexer struct
method next (line 122) | func (lexer *Lexer) next() rune {
method back (line 133) | func (lexer *Lexer) back() {
method peek (line 137) | func (lexer *Lexer) peek() rune {
method tokenize (line 144) | func (lexer *Lexer) tokenize(expression string) ([]token, error) {
method consumeUntil (line 223) | func (lexer *Lexer) consumeUntil(end rune) (string, error) {
method consumeLiteral (line 244) | func (lexer *Lexer) consumeLiteral() (token, error) {
method consumeRawStringLiteral (line 259) | func (lexer *Lexer) consumeRawStringLiteral() (token, error) {
method syntaxError (line 296) | func (lexer *Lexer) syntaxError(msg string) SyntaxError {
method matchOrElse (line 307) | func (lexer *Lexer) matchOrElse(first rune, second rune, matchedType t...
method consumeLBracket (line 330) | func (lexer *Lexer) consumeLBracket() token {
method consumeQuotedIdentifier (line 364) | func (lexer *Lexer) consumeQuotedIdentifier() (token, error) {
method consumeUnquotedIdentifier (line 383) | func (lexer *Lexer) consumeUnquotedIdentifier() token {
method consumeNumber (line 403) | func (lexer *Lexer) consumeNumber() token {
type SyntaxError (line 32) | type SyntaxError struct
method Error (line 38) | func (e SyntaxError) Error() string {
method HighlightLocation (line 47) | func (e SyntaxError) HighlightLocation() string {
constant tUnknown (line 53) | tUnknown tokType = iota
constant tStar (line 54) | tStar
constant tDot (line 55) | tDot
constant tFilter (line 56) | tFilter
constant tFlatten (line 57) | tFlatten
constant tLparen (line 58) | tLparen
constant tRparen (line 59) | tRparen
constant tLbracket (line 60) | tLbracket
constant tRbracket (line 61) | tRbracket
constant tLbrace (line 62) | tLbrace
constant tRbrace (line 63) | tRbrace
constant tOr (line 64) | tOr
constant tPipe (line 65) | tPipe
constant tNumber (line 66) | tNumber
constant tUnquotedIdentifier (line 67) | tUnquotedIdentifier
constant tQuotedIdentifier (line 68) | tQuotedIdentifier
constant tComma (line 69) | tComma
constant tColon (line 70) | tColon
constant tLT (line 71) | tLT
constant tLTE (line 72) | tLTE
constant tGT (line 73) | tGT
constant tGTE (line 74) | tGTE
constant tEQ (line 75) | tEQ
constant tNE (line 76) | tNE
constant tJSONLiteral (line 77) | tJSONLiteral
constant tStringLiteral (line 78) | tStringLiteral
constant tCurrent (line 79) | tCurrent
constant tExpref (line 80) | tExpref
constant tAnd (line 81) | tAnd
constant tNot (line 82) | tNot
constant tEOF (line 83) | tEOF
constant identifierStartBits (line 102) | identifierStartBits uint64 = 576460745995190270
function NewLexer (line 117) | func NewLexer() *Lexer {
FILE: 12fa-docker-golang/chapter11/vendor/github.com/aws/aws-sdk-go/vendor/github.com/jmespath/go-jmespath/parser.go
type astNodeType (line 10) | type astNodeType
constant ASTEmpty (line 14) | ASTEmpty astNodeType = iota
constant ASTComparator (line 15) | ASTComparator
constant ASTCurrentNode (line 16) | ASTCurrentNode
constant ASTExpRef (line 17) | ASTExpRef
constant ASTFunctionExpression (line 18) | ASTFunctionExpression
constant ASTField (line 19) | ASTField
constant ASTFilterProjection (line 20) | ASTFilterProjection
constant ASTFlatten (line 21) | ASTFlatten
constant ASTIdentity (line 22) | ASTIdentity
constant ASTIndex (line 23) | ASTIndex
constant ASTIndexExpression (line 24) | ASTIndexExpression
constant ASTKeyValPair (line 25) | ASTKeyValPair
constant ASTLiteral (line 26) | ASTLiteral
constant ASTMultiSelectHash (line 27) | ASTMultiSelectHash
constant ASTMultiSelectList (line 28) | ASTMultiSelectList
constant ASTOrExpression (line 29) | ASTOrExpression
constant ASTAndExpression (line 30) | ASTAndExpression
constant ASTNotExpression (line 31) | ASTNotExpression
constant ASTPipe (line 32) | ASTPipe
constant ASTProjection (line 33) | ASTProjection
constant ASTSubexpression (line 34) | ASTSubexpression
constant ASTSlice (line 35) | ASTSlice
constant ASTValueProjection (line 36) | ASTValueProjection
type ASTNode (line 40) | type ASTNode struct
method String (line 46) | func (node ASTNode) String() string {
method PrettyPrint (line 55) | func (node ASTNode) PrettyPrint(indent int) string {
type Parser (line 112) | type Parser struct
method Parse (line 125) | func (p *Parser) Parse(expression string) (ASTNode, error) {
method parseExpression (line 145) | func (p *Parser) parseExpression(bindingPower int) (ASTNode, error) {
method parseIndexExpression (line 165) | func (p *Parser) parseIndexExpression() (ASTNode, error) {
method parseSliceExpression (line 182) | func (p *Parser) parseSliceExpression() (ASTNode, error) {
method match (line 212) | func (p *Parser) match(tokenType tokType) error {
method led (line 220) | func (p *Parser) led(tokenType tokType, node ASTNode) (ASTNode, error) {
method nud (line 317) | func (p *Parser) nud(token token) (ASTNode, error) {
method parseMultiSelectList (line 416) | func (p *Parser) parseMultiSelectList() (ASTNode, error) {
method parseMultiSelectHash (line 442) | func (p *Parser) parseMultiSelectHash() (ASTNode, error) {
method projectIfSlice (line 485) | func (p *Parser) projectIfSlice(left ASTNode, right ASTNode) (ASTNode,...
method parseFilter (line 499) | func (p *Parser) parseFilter(node ASTNode) (ASTNode, error) {
method parseDotRHS (line 524) | func (p *Parser) parseDotRHS(bindingPower int) (ASTNode, error) {
method parseProjectionRHS (line 542) | func (p *Parser) parseProjectionRHS(bindingPower int) (ASTNode, error) {
method lookahead (line 561) | func (p *Parser) lookahead(number int) tokType {
method current (line 565) | func (p *Parser) current() tokType {
method lookaheadToken (line 569) | func (p *Parser) lookaheadToken(number int) token {
method advance (line 573) | func (p *Parser) advance() {
method syntaxError (line 586) | func (p *Parser) syntaxError(msg string) SyntaxError {
method syntaxErrorToken (line 597) | func (p *Parser) syntaxErrorToken(msg string, t token) SyntaxError {
function NewParser (line 119) | func NewParser() *Parser {
function tokensOneOf (line 577) | func tokensOneOf(elements []tokType, token tokType) bool {
FILE: 12fa-docker-golang/chapter11/vendor/github.com/aws/aws-sdk-go/vendor/github.com/jmespath/go-jmespath/toktype_string.go
constant _tokType_name (line 7) | _tokType_name = "tUnknowntStartDottFiltertFlattentLparentRparentLbracket...
method String (line 11) | func (i tokType) String() string {
FILE: 12fa-docker-golang/chapter11/vendor/github.com/aws/aws-sdk-go/vendor/github.com/jmespath/go-jmespath/util.go
function isFalse (line 13) | func isFalse(value interface{}) bool {
function objsEqual (line 50) | func objsEqual(left interface{}, right interface{}) bool {
type sliceParam (line 57) | type sliceParam struct
function slice (line 63) | func slice(slice []interface{}, parts []sliceParam) ([]interface{}, erro...
function computeSliceParams (line 82) | func computeSliceParams(length int, parts []sliceParam) ([]int, error) {
function capSlice (line 120) | func capSlice(length int, actual int, step int) int {
function toArrayNum (line 143) | func toArrayNum(data interface{}) ([]float64, bool) {
function toArrayStr (line 164) | func toArrayStr(data interface{}) ([]string, bool) {
function isSliceType (line 180) | func isSliceType(v interface{}) bool {
FILE: 12fa-docker-golang/chapter11/vendor/github.com/go-logfmt/logfmt/decode.go
type Decoder (line 12) | type Decoder struct
method ScanRecord (line 37) | func (dec *Decoder) ScanRecord() bool {
method ScanKeyval (line 54) | func (dec *Decoder) ScanKeyval() bool {
method Key (line 195) | func (dec *Decoder) Key() []byte {
method Value (line 203) | func (dec *Decoder) Value() []byte {
method Err (line 208) | func (dec *Decoder) Err() error {
method syntaxError (line 212) | func (dec *Decoder) syntaxError(msg string) {
method unexpectedByte (line 220) | func (dec *Decoder) unexpectedByte(c byte) {
function NewDecoder (line 25) | func NewDecoder(r io.Reader) *Decoder {
type SyntaxError (line 229) | type SyntaxError struct
method Error (line 235) | func (e *SyntaxError) Error() string {
FILE: 12fa-docker-golang/chapter11/vendor/github.com/go-logfmt/logfmt/encode.go
function MarshalKeyvals (line 16) | func MarshalKeyvals(keyvals ...interface{}) ([]byte, error) {
type Encoder (line 25) | type Encoder struct
method EncodeKeyval (line 48) | func (enc *Encoder) EncodeKeyval(key, value interface{}) error {
method EncodeKeyvals (line 75) | func (enc *Encoder) EncodeKeyvals(keyvals ...interface{}) error {
method EndRecord (line 262) | func (enc *Encoder) EndRecord() error {
method Reset (line 271) | func (enc *Encoder) Reset() {
function NewEncoder (line 32) | func NewEncoder(w io.Writer) *Encoder {
type MarshalerError (line 100) | type MarshalerError struct
method Error (line 105) | func (e *MarshalerError) Error() string {
function writeKey (line 125) | func writeKey(w io.Writer, key interface{}) error {
function invalidKeyRune (line 168) | func invalidKeyRune(r rune) bool {
function invalidKeyString (line 172) | func invalidKeyString(key string) bool {
function invalidKey (line 176) | func invalidKey(key []byte) bool {
function writeStringKey (line 180) | func writeStringKey(w io.Writer, key string) error {
function writeBytesKey (line 188) | func writeBytesKey(w io.Writer, key []byte) error {
function writeValue (line 196) | func writeValue(w io.Writer, value interface{}) error {
function needsQuotedValueRune (line 234) | func needsQuotedValueRune(r rune) bool {
function writeStringValue (line 238) | func writeStringValue(w io.Writer, value string, ok bool) error {
function writeBytesValue (line 250) | func writeBytesValue(w io.Writer, value []byte) error {
function safeError (line 275) | func safeError(err error) (s string, ok bool) {
function safeString (line 289) | func safeString(str fmt.Stringer) (s string, ok bool) {
function safeMarshal (line 303) | func safeMarshal(tm encoding.TextMarshaler) (b []byte, err error) {
FILE: 12fa-docker-golang/chapter11/vendor/github.com/go-logfmt/logfmt/fuzz.go
function Fuzz (line 16) | func Fuzz(data []byte) int {
function FuzzVsKR (line 40) | func FuzzVsKR(data []byte) int {
type kv (line 63) | type kv struct
function parse (line 67) | func parse(data []byte) ([][]kv, error) {
function parseKR (line 80) | func parseKR(data []byte) ([][]kv, error) {
type saveHandler (line 98) | type saveHandler struct
method HandleLogfmt (line 102) | func (h *saveHandler) HandleLogfmt(key, val []byte) error {
function write (line 113) | func write(recs [][]kv, w io.Writer) error {
FILE: 12fa-docker-golang/chapter11/vendor/github.com/go-logfmt/logfmt/jsonstring.go
function getBuffer (line 27) | func getBuffer() *bytes.Buffer {
function poolBuffer (line 31) | func poolBuffer(buf *bytes.Buffer) {
function writeQuotedString (line 37) | func writeQuotedString(w io.Writer, s string) (int, error) {
function writeQuotedBytes (line 95) | func writeQuotedBytes(w io.Writer, s []byte) (int, error) {
function getu4 (line 154) | func getu4(s []byte) rune {
function unquoteBytes (line 165) | func unquoteBytes(s []byte) (t []byte, ok bool) {
FILE: 12fa-docker-golang/chapter11/vendor/github.com/jpillora/backoff/backoff.go
type Backoff (line 16) | type Backoff struct
method Duration (line 27) | func (b *Backoff) Duration() time.Duration {
method ForAttempt (line 41) | func (b *Backoff) ForAttempt(attempt float64) time.Duration {
method Reset (line 81) | func (b *Backoff) Reset() {
method Attempt (line 86) | func (b *Backoff) Attempt() float64 {
constant maxInt64 (line 33) | maxInt64 = float64(math.MaxInt64 - 512)
FILE: 12fa-docker-golang/chapter11/vendor/github.com/kr/logfmt/decode.go
type Handler (line 33) | type Handler interface
type HandlerFunc (line 40) | type HandlerFunc
method HandleLogfmt (line 42) | func (f HandlerFunc) HandleLogfmt(key, val []byte) error {
function Unmarshal (line 52) | func Unmarshal(data []byte, v interface{}) (err error) {
type StructHandler (line 80) | type StructHandler struct
method HandleLogfmt (line 92) | func (h *StructHandler) HandleLogfmt(key, val []byte) error {
function NewStructHandler (line 84) | func NewStructHandler(v interface{}) (Handler, error) {
type InvalidUnmarshalError (line 160) | type InvalidUnmarshalError struct
method Error (line 164) | func (e *InvalidUnmarshalError) Error() string {
type UnmarshalTypeError (line 177) | type UnmarshalTypeError struct
method Error (line 182) | func (e *UnmarshalTypeError) Error() string {
FILE: 12fa-docker-golang/chapter11/vendor/github.com/kr/logfmt/scanner.go
function gotoScanner (line 10) | func gotoScanner(data []byte, h Handler) (err error) {
FILE: 12fa-docker-golang/chapter11/vendor/github.com/kr/logfmt/unquote.go
function getu4 (line 18) | func getu4(s []byte) rune {
function unquote (line 31) | func unquote(s []byte) (t string, ok bool) {
function unquoteBytes (line 37) | func unquoteBytes(s []byte) (t []byte, ok bool) {
FILE: 12fa-docker-golang/chapter11/vendor/github.com/pkg/errors/errors.go
function New (line 101) | func New(message string) error {
function Errorf (line 111) | func Errorf(format string, args ...interface{}) error {
type fundamental (line 119) | type fundamental struct
method Error (line 124) | func (f *fundamental) Error() string { return f.msg }
method Format (line 126) | func (f *fundamental) Format(s fmt.State, verb rune) {
function WithStack (line 144) | func WithStack(err error) error {
type withStack (line 154) | type withStack struct
method Cause (line 159) | func (w *withStack) Cause() error { return w.error }
method Format (line 161) | func (w *withStack) Format(s fmt.State, verb rune) {
function Wrap (line 180) | func Wrap(err error, message string) error {
function Wrapf (line 197) | func Wrapf(err error, format string, args ...interface{}) error {
function WithMessage (line 213) | func WithMessage(err error, message string) error {
type withMessage (line 223) | type withMessage struct
method Error (line 228) | func (w *withMessage) Error() string { return w.msg + ": " + w.cause.E...
method Cause (line 229) | func (w *withMessage) Cause() error { return w.cause }
method Format (line 231) | func (w *withMessage) Format(s fmt.State, verb rune) {
function Cause (line 256) | func Cause(err error) error {
FILE: 12fa-docker-golang/chapter11/vendor/github.com/pkg/errors/stack.go
type Frame (line 12) | type Frame
method pc (line 16) | func (f Frame) pc() uintptr { return uintptr(f) - 1 }
method file (line 20) | func (f Frame) file() string {
method line (line 31) | func (f Frame) line() int {
method Format (line 51) | func (f Frame) Format(s fmt.State, verb rune) {
type StackTrace (line 80) | type StackTrace
method Format (line 82) | func (st StackTrace) Format(s fmt.State, verb rune) {
type stack (line 101) | type stack
method Format (line 103) | func (s *stack) Format(st fmt.State, verb rune) {
method StackTrace (line 116) | func (s *stack) StackTrace() StackTrace {
function callers (line 124) | func callers() *stack {
function funcname (line 133) | func funcname(name string) string {
function trimGOPATH (line 140) | func trimGOPATH(name, file string) string {
FILE: 12fa-docker-golang/chapter11/vendor/github.com/rogpeppe/fastuuid/uuid.go
type Generator (line 24) | type Generator struct
method Next (line 56) | func (g *Generator) Next() [24]byte {
function NewGenerator (line 31) | func NewGenerator() (*Generator, error) {
function MustNewGenerator (line 42) | func MustNewGenerator() *Generator {
FILE: 12fa-docker-golang/chapter11/vendor/github.com/satori/go.uuid/uuid.go
constant VariantNCS (line 45) | VariantNCS = iota
constant VariantRFC4122 (line 46) | VariantRFC4122
constant VariantMicrosoft (line 47) | VariantMicrosoft
constant VariantFuture (line 48) | VariantFuture
constant DomainPerson (line 53) | DomainPerson = iota
constant DomainGroup (line 54) | DomainGroup
constant DomainOrg (line 55) | DomainOrg
constant epochStart (line 60) | epochStart = 122192928000000000
constant dash (line 63) | dash byte = '-'
function initClockSequence (line 83) | func initClockSequence() {
function initHardwareAddr (line 89) | func initHardwareAddr() {
function initStorage (line 108) | func initStorage() {
function safeRandom (line 113) | func safeRandom(dest []byte) {
function unixTimeFunc (line 122) | func unixTimeFunc() uint64 {
type UUID (line 128) | type UUID
method Version (line 173) | func (u UUID) Version() uint {
method Variant (line 178) | func (u UUID) Variant() uint {
method Bytes (line 191) | func (u UUID) Bytes() []byte {
method String (line 197) | func (u UUID) String() string {
method SetVersion (line 214) | func (u *UUID) SetVersion(v byte) {
method SetVariant (line 219) | func (u *UUID) SetVariant() {
method MarshalText (line 225) | func (u UUID) MarshalText() (text []byte, err error) {
method UnmarshalText (line 235) | func (u *UUID) UnmarshalText(text []byte) (err error) {
method MarshalBinary (line 286) | func (u UUID) MarshalBinary() (data []byte, err error) {
method UnmarshalBinary (line 293) | func (u *UUID) UnmarshalBinary(data []byte) (err error) {
method Value (line 304) | func (u UUID) Value() (driver.Value, error) {
method Scan (line 311) | func (u *UUID) Scan(src interface{}) error {
type NullUUID (line 132) | type NullUUID struct
method Value (line 327) | func (u NullUUID) Value() (driver.Value, error) {
method Scan (line 336) | func (u *NullUUID) Scan(src interface{}) error {
function And (line 150) | func And(u1 UUID, u2 UUID) UUID {
function Or (line 159) | func Or(u1 UUID, u2 UUID) UUID {
function Equal (line 168) | func Equal(u1 UUID, u2 UUID) bool {
function FromBytes (line 349) | func FromBytes(input []byte) (u UUID, err error) {
function FromBytesOrNil (line 356) | func FromBytesOrNil(input []byte) UUID {
function FromString (line 366) | func FromString(input string) (u UUID, err error) {
function FromStringOrNil (line 373) | func FromStringOrNil(input string) UUID {
function getStorage (line 383) | func getStorage() (uint64, uint16, []byte) {
function NewV1 (line 401) | func NewV1() UUID {
function NewV2 (line 420) | func NewV2(domain byte) UUID {
function NewV3 (line 446) | func NewV3(ns UUID, name string) UUID {
function NewV4 (line 455) | func NewV4() UUID {
function NewV5 (line 465) | func NewV5(ns UUID, name string) UUID {
function newFromHash (line 474) | func newFromHash(h hash.Hash, ns UUID, name strin
Copy disabled (too large)
Download .json
Condensed preview — 1261 files, each showing path, character count, and a content snippet. Download the .json file for the full structured content (11,258K chars).
[
{
"path": "12fa-docker-golang/README.md",
"chars": 7255,
"preview": "# The 12 Factors of Docker & Go\n\nThis is a general roadmap what to cover within the book. It lists external\nprojects and"
},
{
"path": "12fa-docker-golang/chapter1/apiservice/apiservice.go",
"chars": 247,
"preview": "package apiservice\n\nimport \"fmt\"\nimport \"github.com/namsral/flag\"\n\nvar (\n\tnetworkPort = flag.String(\"port\", \"8080\", \"Net"
},
{
"path": "12fa-docker-golang/chapter1/main.go",
"chars": 79,
"preview": "package main\n\nimport \"app/apiservice\"\n\nfunc main() {\n\tapiservice.HelloWorld()\n}"
},
{
"path": "12fa-docker-golang/chapter1/run",
"chars": 90,
"preview": "#!/bin/bash\ndocker run --rm -it -v `pwd`:/go/src/app -w /go/src/app golang go run main.go\n"
},
{
"path": "12fa-docker-golang/chapter1/subpackage1.go",
"chars": 105,
"preview": "package subpackage1\n\nimport \"fmt\"\nimport \"app/subpackage2\"\n\nfunc Hello() {\n\treturn subpackage2.Hello();\n}"
},
{
"path": "12fa-docker-golang/chapter1/vendor/github.com/namsral/flag/LICENSE",
"chars": 1478,
"preview": "Copyright (c) 2012 The Go Authors. All rights reserved.\n\nRedistribution and use in source and binary forms, with or with"
},
{
"path": "12fa-docker-golang/chapter1/vendor/github.com/namsral/flag/examples/gopher.go",
"chars": 638,
"preview": "package main\n\nimport (\n \"github.com/namsral/flag\"\n \"fmt\"\n )\n\nfunc main() {\n var (\n config string\n "
},
{
"path": "12fa-docker-golang/chapter1/vendor/github.com/namsral/flag/flag.go",
"chars": 32242,
"preview": "// Copyright 2009 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license "
},
{
"path": "12fa-docker-golang/chapter1/vendor/manifest",
"chars": 262,
"preview": "{\n\t\"version\": 0,\n\t\"dependencies\": [\n\t\t{\n\t\t\t\"importpath\": \"github.com/namsral/flag\",\n\t\t\t\"repository\": \"https://github.com"
},
{
"path": "12fa-docker-golang/chapter11/main.go",
"chars": 814,
"preview": "package main\n\nimport (\n\t\"errors\"\n\t\"os\"\n\t\"time\"\n\n\t\"github.com/apex/log\"\n\t\"github.com/apex/log/handlers/multi\"\n\t\"github.co"
},
{
"path": "12fa-docker-golang/chapter11/run",
"chars": 278,
"preview": "#!/bin/bash\nfunction gvt_fetch {\n\tif [ ! -d \"vendor/$1\" ]; then\n\t\tgvt fetch $1\n\tfi\n}\n\ngvt_fetch \"github.com/apex/log\"\ngv"
},
{
"path": "12fa-docker-golang/chapter11/vendor/github.com/apex/log/LICENSE",
"chars": 1107,
"preview": "(The MIT License)\n\nCopyright (c) 2015 TJ Holowaychuk <tj@tjholowaychuk.coma>\n\nPermission is hereby granted, free o"
},
{
"path": "12fa-docker-golang/chapter11/vendor/github.com/apex/log/default.go",
"chars": 794,
"preview": "package log\n\nimport (\n\t\"bytes\"\n\t\"fmt\"\n\t\"log\"\n\t\"sort\"\n)\n\n// field used for sorting.\ntype field struct {\n\tName string\n\tVa"
},
{
"path": "12fa-docker-golang/chapter11/vendor/github.com/apex/log/doc.go",
"chars": 430,
"preview": "/*\nPackage log implements a simple structured logging API designed with few assumptions. Designed for\ncentralized loggin"
},
{
"path": "12fa-docker-golang/chapter11/vendor/github.com/apex/log/entry.go",
"chars": 3954,
"preview": "package log\n\nimport (\n\t\"fmt\"\n\t\"os\"\n\t\"strings\"\n\t\"time\"\n)\n\n// assert interface compliance.\nvar _ Interface = (*Entry)(nil)"
},
{
"path": "12fa-docker-golang/chapter11/vendor/github.com/apex/log/handlers/cli/cli.go",
"chars": 1394,
"preview": "// Package cli implements a colored text handler suitable for command-line interfaces.\npackage cli\n\nimport (\n\t\"fmt\"\n\t\"io"
},
{
"path": "12fa-docker-golang/chapter11/vendor/github.com/apex/log/handlers/discard/discard.go",
"chars": 383,
"preview": "// Package discard implements a no-op handler useful for benchmarks and tests.\npackage discard\n\nimport (\n\t\"github.com/ap"
},
{
"path": "12fa-docker-golang/chapter11/vendor/github.com/apex/log/handlers/es/es.go",
"chars": 1993,
"preview": "// Package es implements an Elasticsearch batch handler. Currently this implementation\n// assumes the index format of \"l"
},
{
"path": "12fa-docker-golang/chapter11/vendor/github.com/apex/log/handlers/graylog/graylog.go",
"chars": 1220,
"preview": "// Package implements a Graylog-backed handler.\npackage graylog\n\nimport (\n\t\"github.com/apex/log\"\n\t\"github.com/aphistic/g"
},
{
"path": "12fa-docker-golang/chapter11/vendor/github.com/apex/log/handlers/json/json.go",
"chars": 531,
"preview": "// Package json implements a JSON handler.\npackage json\n\nimport (\n\tj \"encoding/json\"\n\t\"io\"\n\t\"os\"\n\t\"sync\"\n\n\t\"github.com/a"
},
{
"path": "12fa-docker-golang/chapter11/vendor/github.com/apex/log/handlers/kinesis/kinesis.go",
"chars": 1281,
"preview": "package kinesis\n\nimport (\n\t\"encoding/base64\"\n\t\"encoding/json\"\n\n\t\"github.com/apex/log\"\n\t\"github.com/aws/aws-sdk-go/aws\"\n\t"
},
{
"path": "12fa-docker-golang/chapter11/vendor/github.com/apex/log/handlers/level/level.go",
"chars": 474,
"preview": "// Package level implements a level filter handler.\npackage level\n\nimport \"github.com/apex/log\"\n\n// Handler implementati"
},
{
"path": "12fa-docker-golang/chapter11/vendor/github.com/apex/log/handlers/logfmt/logfmt.go",
"chars": 822,
"preview": "// Package logfmt implements a \"logfmt\" format handler.\npackage logfmt\n\nimport (\n\t\"io\"\n\t\"os\"\n\t\"sync\"\n\n\t\"github.com/apex/"
},
{
"path": "12fa-docker-golang/chapter11/vendor/github.com/apex/log/handlers/memory/memory.go",
"chars": 501,
"preview": "// Package memory implements an in-memory handler useful for testing, as the\n// entries can be accessed after writes.\npa"
},
{
"path": "12fa-docker-golang/chapter11/vendor/github.com/apex/log/handlers/multi/multi.go",
"chars": 651,
"preview": "// Package multi implements a handler which invokes a number of handlers.\npackage multi\n\nimport (\n\t\"github.com/apex/log\""
},
{
"path": "12fa-docker-golang/chapter11/vendor/github.com/apex/log/handlers/papertrail/papertrail.go",
"chars": 1456,
"preview": "// Package papertrail implements a papertrail logfmt format handler.\npackage papertrail\n\nimport (\n\t\"bytes\"\n\t\"fmt\"\n\t\"log/"
},
{
"path": "12fa-docker-golang/chapter11/vendor/github.com/apex/log/handlers/text/text.go",
"chars": 1358,
"preview": "// Package text implements a development-friendly textual handler.\npackage text\n\nimport (\n\t\"fmt\"\n\t\"io\"\n\t\"os\"\n\t\"sync\"\n\t\"t"
},
{
"path": "12fa-docker-golang/chapter11/vendor/github.com/apex/log/interface.go",
"chars": 520,
"preview": "package log\n\n// Interface represents the API of both Logger and Entry.\ntype Interface interface {\n\tWithFields(fields Fie"
},
{
"path": "12fa-docker-golang/chapter11/vendor/github.com/apex/log/levels.go",
"chars": 1094,
"preview": "package log\n\nimport (\n\t\"errors\"\n\t\"strings\"\n)\n\n// Level of severity.\ntype Level int\n\n// Log levels.\nconst (\n\tDebugLevel L"
},
{
"path": "12fa-docker-golang/chapter11/vendor/github.com/apex/log/logger.go",
"chars": 3582,
"preview": "package log\n\nimport (\n\tstdlog \"log\"\n\t\"sort\"\n)\n\n// assert interface compliance.\nvar _ Interface = (*Logger)(nil)\n\n// Fiel"
},
{
"path": "12fa-docker-golang/chapter11/vendor/github.com/apex/log/pkg.go",
"chars": 1948,
"preview": "package log\n\n// singletons ftw?\nvar Log Interface = &Logger{\n\tHandler: HandlerFunc(handleStdLog),\n\tLevel: InfoLevel,\n}"
},
{
"path": "12fa-docker-golang/chapter11/vendor/github.com/apex/log/stack.go",
"chars": 134,
"preview": "package log\n\nimport \"github.com/pkg/errors\"\n\n// stackTracer interface.\ntype stackTracer interface {\n\tStackTrace() errors"
},
{
"path": "12fa-docker-golang/chapter11/vendor/github.com/aphistic/golf/LICENSE",
"chars": 1080,
"preview": "The MIT License (MIT)\n\nCopyright (c) 2015 Erik Davidson\n\nPermission is hereby granted, free of charge, to any person obt"
},
{
"path": "12fa-docker-golang/chapter11/vendor/github.com/aphistic/golf/chunker.go",
"chars": 1617,
"preview": "package golf\n\nimport (\n\t\"errors\"\n\t\"github.com/satori/go.uuid\"\n\t\"io\"\n\t\"math\"\n)\n\ntype chunker struct {\n\tchunkSize int\n\tbuf"
},
{
"path": "12fa-docker-golang/chapter11/vendor/github.com/aphistic/golf/client.go",
"chars": 4535,
"preview": "package golf\n\nimport (\n\t\"compress/gzip\"\n\t\"compress/zlib\"\n\t\"errors\"\n\t\"io\"\n\t\"net\"\n\t\"net/url\"\n\t\"os\"\n\t\"strings\"\n\t\"sync\"\n\t\"ti"
},
{
"path": "12fa-docker-golang/chapter11/vendor/github.com/aphistic/golf/json.go",
"chars": 1270,
"preview": "package golf\n\nimport (\n\t\"encoding/json\"\n\t\"fmt\"\n)\n\n// Workaround for json encoding 64 bit floats. When using\n// a normal"
},
{
"path": "12fa-docker-golang/chapter11/vendor/github.com/aphistic/golf/log.go",
"chars": 5886,
"preview": "package golf\n\nimport (\n\t\"fmt\"\n)\n\nfunc (l *Logger) genMsg(attrs map[string]interface{}, level int, msg string, va ...inte"
},
{
"path": "12fa-docker-golang/chapter11/vendor/github.com/aphistic/golf/log_default.go",
"chars": 6608,
"preview": "package golf\n\nimport (\n\t\"errors\"\n\t\"fmt\"\n)\n\nvar defaultLogger *Logger\n\n// Set the default Logger. Any calls to log messag"
},
{
"path": "12fa-docker-golang/chapter11/vendor/github.com/aphistic/golf/logger.go",
"chars": 1414,
"preview": "package golf\n\n// A Logger is a set of attributes associated with a Client. When a message is\n// sent with the Logger, th"
},
{
"path": "12fa-docker-golang/chapter11/vendor/github.com/aphistic/golf/main.go",
"chars": 120,
"preview": "/*\nProvides logging capabilities using the GELF (https://www.graylog.org/resources/gelf-2/) log format\n\n*/\npackage golf\n"
},
{
"path": "12fa-docker-golang/chapter11/vendor/github.com/aphistic/golf/message.go",
"chars": 1600,
"preview": "package golf\n\nimport (\n\t\"time\"\n)\n\n// Levels to be used when logging messages. These match syslog levels as the\n// GELF "
},
{
"path": "12fa-docker-golang/chapter11/vendor/github.com/aws/aws-sdk-go/aws/LICENSE.txt",
"chars": 11358,
"preview": "\n Apache License\n Version 2.0, January 2004\n "
},
{
"path": "12fa-docker-golang/chapter11/vendor/github.com/aws/aws-sdk-go/aws/awserr/error.go",
"chars": 4764,
"preview": "// Package awserr represents API error interface accessors for the SDK.\npackage awserr\n\n// An Error wraps lower level er"
},
{
"path": "12fa-docker-golang/chapter11/vendor/github.com/aws/aws-sdk-go/aws/awserr/types.go",
"chars": 5434,
"preview": "package awserr\n\nimport \"fmt\"\n\n// SprintError returns a string of the formatted error code.\n//\n// Both extra and origErr "
},
{
"path": "12fa-docker-golang/chapter11/vendor/github.com/aws/aws-sdk-go/aws/awsutil/copy.go",
"chars": 2779,
"preview": "package awsutil\n\nimport (\n\t\"io\"\n\t\"reflect\"\n\t\"time\"\n)\n\n// Copy deeply copies a src structure to dst. Useful for copying r"
},
{
"path": "12fa-docker-golang/chapter11/vendor/github.com/aws/aws-sdk-go/aws/awsutil/equal.go",
"chars": 924,
"preview": "package awsutil\n\nimport (\n\t\"reflect\"\n)\n\n// DeepEqual returns if the two values are deeply equal like reflect.DeepEqual.\n"
},
{
"path": "12fa-docker-golang/chapter11/vendor/github.com/aws/aws-sdk-go/aws/awsutil/path_value.go",
"chars": 5424,
"preview": "package awsutil\n\nimport (\n\t\"reflect\"\n\t\"regexp\"\n\t\"strconv\"\n\t\"strings\"\n\n\t\"github.com/jmespath/go-jmespath\"\n)\n\nvar indexRe "
},
{
"path": "12fa-docker-golang/chapter11/vendor/github.com/aws/aws-sdk-go/aws/awsutil/prettify.go",
"chars": 2511,
"preview": "package awsutil\n\nimport (\n\t\"bytes\"\n\t\"fmt\"\n\t\"io\"\n\t\"reflect\"\n\t\"strings\"\n)\n\n// Prettify returns the string representation o"
},
{
"path": "12fa-docker-golang/chapter11/vendor/github.com/aws/aws-sdk-go/aws/awsutil/string_value.go",
"chars": 1951,
"preview": "package awsutil\n\nimport (\n\t\"bytes\"\n\t\"fmt\"\n\t\"reflect\"\n\t\"strings\"\n)\n\n// StringValue returns the string representation of a"
},
{
"path": "12fa-docker-golang/chapter11/vendor/github.com/aws/aws-sdk-go/aws/client/client.go",
"chars": 4532,
"preview": "package client\n\nimport (\n\t\"fmt\"\n\t\"net/http/httputil\"\n\n\t\"github.com/aws/aws-sdk-go/aws\"\n\t\"github.com/aws/aws-sdk-go/aws/c"
},
{
"path": "12fa-docker-golang/chapter11/vendor/github.com/aws/aws-sdk-go/aws/client/default_retryer.go",
"chars": 2324,
"preview": "package client\n\nimport (\n\t\"math/rand\"\n\t\"sync\"\n\t\"time\"\n\n\t\"github.com/aws/aws-sdk-go/aws/request\"\n)\n\n// DefaultRetryer imp"
},
{
"path": "12fa-docker-golang/chapter11/vendor/github.com/aws/aws-sdk-go/aws/client/metadata/client_info.go",
"chars": 268,
"preview": "package metadata\n\n// ClientInfo wraps immutable data from the client.Client structure.\ntype ClientInfo struct {\n\tService"
},
{
"path": "12fa-docker-golang/chapter11/vendor/github.com/aws/aws-sdk-go/aws/config.go",
"chars": 14726,
"preview": "package aws\n\nimport (\n\t\"net/http\"\n\t\"time\"\n\n\t\"github.com/aws/aws-sdk-go/aws/credentials\"\n\t\"github.com/aws/aws-sdk-go/aws/"
},
{
"path": "12fa-docker-golang/chapter11/vendor/github.com/aws/aws-sdk-go/aws/context.go",
"chars": 2553,
"preview": "package aws\n\nimport (\n\t\"time\"\n)\n\n// Context is an copy of the Go v1.7 stdlib's context.Context interface.\n// It is repre"
},
{
"path": "12fa-docker-golang/chapter11/vendor/github.com/aws/aws-sdk-go/aws/context_1_6.go",
"chars": 816,
"preview": "// +build !go1.7\n\npackage aws\n\nimport \"time\"\n\n// An emptyCtx is a copy of the the Go 1.7 context.emptyCtx type. This\n// "
},
{
"path": "12fa-docker-golang/chapter11/vendor/github.com/aws/aws-sdk-go/aws/context_1_7.go",
"chars": 94,
"preview": "// +build go1.7\n\npackage aws\n\nimport \"context\"\n\nvar (\n\tbackgroundCtx = context.Background()\n)\n"
},
{
"path": "12fa-docker-golang/chapter11/vendor/github.com/aws/aws-sdk-go/aws/convert_types.go",
"chars": 8358,
"preview": "package aws\n\nimport \"time\"\n\n// String returns a pointer to the string value passed in.\nfunc String(v string) *string {\n\t"
},
{
"path": "12fa-docker-golang/chapter11/vendor/github.com/aws/aws-sdk-go/aws/corehandlers/handlers.go",
"chars": 6754,
"preview": "package corehandlers\n\nimport (\n\t\"bytes\"\n\t\"fmt\"\n\t\"io\"\n\t\"io/ioutil\"\n\t\"net/http\"\n\t\"net/url\"\n\t\"regexp\"\n\t\"runtime\"\n\t\"strconv\""
},
{
"path": "12fa-docker-golang/chapter11/vendor/github.com/aws/aws-sdk-go/aws/corehandlers/param_validator.go",
"chars": 512,
"preview": "package corehandlers\n\nimport \"github.com/aws/aws-sdk-go/aws/request\"\n\n// ValidateParametersHandler is a request handler "
},
{
"path": "12fa-docker-golang/chapter11/vendor/github.com/aws/aws-sdk-go/aws/credentials/chain_provider.go",
"chars": 3179,
"preview": "package credentials\n\nimport (\n\t\"github.com/aws/aws-sdk-go/aws/awserr\"\n)\n\nvar (\n\t// ErrNoValidProvidersFoundInChain Is re"
},
{
"path": "12fa-docker-golang/chapter11/vendor/github.com/aws/aws-sdk-go/aws/credentials/credentials.go",
"chars": 7666,
"preview": "// Package credentials provides credential retrieval and management\n//\n// The Credentials is the primary method of getti"
},
{
"path": "12fa-docker-golang/chapter11/vendor/github.com/aws/aws-sdk-go/aws/credentials/ec2rolecreds/ec2_role_provider.go",
"chars": 5641,
"preview": "package ec2rolecreds\n\nimport (\n\t\"bufio\"\n\t\"encoding/json\"\n\t\"fmt\"\n\t\"path\"\n\t\"strings\"\n\t\"time\"\n\n\t\"github.com/aws/aws-sdk-go/"
},
{
"path": "12fa-docker-golang/chapter11/vendor/github.com/aws/aws-sdk-go/aws/credentials/endpointcreds/provider.go",
"chars": 5824,
"preview": "// Package endpointcreds provides support for retrieving credentials from an\n// arbitrary HTTP endpoint.\n//\n// The crede"
},
{
"path": "12fa-docker-golang/chapter11/vendor/github.com/aws/aws-sdk-go/aws/credentials/env_provider.go",
"chars": 2075,
"preview": "package credentials\n\nimport (\n\t\"os\"\n\n\t\"github.com/aws/aws-sdk-go/aws/awserr\"\n)\n\n// EnvProviderName provides a name of En"
},
{
"path": "12fa-docker-golang/chapter11/vendor/github.com/aws/aws-sdk-go/aws/credentials/shared_credentials_provider.go",
"chars": 4688,
"preview": "package credentials\n\nimport (\n\t\"fmt\"\n\t\"os\"\n\t\"path/filepath\"\n\n\t\"github.com/go-ini/ini\"\n\n\t\"github.com/aws/aws-sdk-go/aws/a"
},
{
"path": "12fa-docker-golang/chapter11/vendor/github.com/aws/aws-sdk-go/aws/credentials/static_provider.go",
"chars": 1716,
"preview": "package credentials\n\nimport (\n\t\"github.com/aws/aws-sdk-go/aws/awserr\"\n)\n\n// StaticProviderName provides a name of Static"
},
{
"path": "12fa-docker-golang/chapter11/vendor/github.com/aws/aws-sdk-go/aws/credentials/stscreds/assume_role_provider.go",
"chars": 11610,
"preview": "/*\nPackage stscreds are credential Providers to retrieve STS AWS credentials.\n\nSTS provides multiple ways to retrieve cr"
},
{
"path": "12fa-docker-golang/chapter11/vendor/github.com/aws/aws-sdk-go/aws/defaults/defaults.go",
"chars": 5492,
"preview": "// Package defaults is a collection of helpers to retrieve the SDK's default\n// configuration and handlers.\n//\n// Genera"
},
{
"path": "12fa-docker-golang/chapter11/vendor/github.com/aws/aws-sdk-go/aws/ec2metadata/api.go",
"chars": 4970,
"preview": "package ec2metadata\n\nimport (\n\t\"encoding/json\"\n\t\"fmt\"\n\t\"net/http\"\n\t\"path\"\n\t\"strings\"\n\t\"time\"\n\n\t\"github.com/aws/aws-sdk-g"
},
{
"path": "12fa-docker-golang/chapter11/vendor/github.com/aws/aws-sdk-go/aws/ec2metadata/service.go",
"chars": 3856,
"preview": "// Package ec2metadata provides the client for making API calls to the\n// EC2 Metadata service.\npackage ec2metadata\n\nimp"
},
{
"path": "12fa-docker-golang/chapter11/vendor/github.com/aws/aws-sdk-go/aws/endpoints/decode.go",
"chars": 3220,
"preview": "package endpoints\n\nimport (\n\t\"encoding/json\"\n\t\"fmt\"\n\t\"io\"\n\n\t\"github.com/aws/aws-sdk-go/aws/awserr\"\n)\n\ntype modelDefiniti"
},
{
"path": "12fa-docker-golang/chapter11/vendor/github.com/aws/aws-sdk-go/aws/endpoints/defaults.go",
"chars": 58025,
"preview": "// Code generated by aws/endpoints/v3model_codegen.go. DO NOT EDIT.\n\npackage endpoints\n\nimport (\n\t\"regexp\"\n)\n\n// Partiti"
},
{
"path": "12fa-docker-golang/chapter11/vendor/github.com/aws/aws-sdk-go/aws/endpoints/doc.go",
"chars": 2812,
"preview": "// Package endpoints provides the types and functionality for defining regions\n// and endpoints, as well as querying tho"
},
{
"path": "12fa-docker-golang/chapter11/vendor/github.com/aws/aws-sdk-go/aws/endpoints/endpoints.go",
"chars": 13298,
"preview": "package endpoints\n\nimport (\n\t\"fmt\"\n\t\"regexp\"\n\n\t\"github.com/aws/aws-sdk-go/aws/awserr\"\n)\n\n// Options provide the configur"
},
{
"path": "12fa-docker-golang/chapter11/vendor/github.com/aws/aws-sdk-go/aws/endpoints/v3model.go",
"chars": 7197,
"preview": "package endpoints\n\nimport (\n\t\"fmt\"\n\t\"regexp\"\n\t\"strconv\"\n\t\"strings\"\n)\n\ntype partitions []partition\n\nfunc (ps partitions) "
},
{
"path": "12fa-docker-golang/chapter11/vendor/github.com/aws/aws-sdk-go/aws/endpoints/v3model_codegen.go",
"chars": 8060,
"preview": "// +build codegen\n\npackage endpoints\n\nimport (\n\t\"fmt\"\n\t\"io\"\n\t\"reflect\"\n\t\"strings\"\n\t\"text/template\"\n\t\"unicode\"\n)\n\n// A Co"
},
{
"path": "12fa-docker-golang/chapter11/vendor/github.com/aws/aws-sdk-go/aws/errors.go",
"chars": 508,
"preview": "package aws\n\nimport \"github.com/aws/aws-sdk-go/aws/awserr\"\n\nvar (\n\t// ErrMissingRegion is an error that is returned if r"
},
{
"path": "12fa-docker-golang/chapter11/vendor/github.com/aws/aws-sdk-go/aws/jsonvalue.go",
"chars": 283,
"preview": "package aws\n\n// JSONValue is a representation of a grab bag type that will be marshaled\n// into a json string. This type"
},
{
"path": "12fa-docker-golang/chapter11/vendor/github.com/aws/aws-sdk-go/aws/logger.go",
"chars": 3717,
"preview": "package aws\n\nimport (\n\t\"log\"\n\t\"os\"\n)\n\n// A LogLevelType defines the level logging should be performed at. Used to instru"
},
{
"path": "12fa-docker-golang/chapter11/vendor/github.com/aws/aws-sdk-go/aws/request/handlers.go",
"chars": 6366,
"preview": "package request\n\nimport (\n\t\"fmt\"\n\t\"strings\"\n)\n\n// A Handlers provides a collection of request handlers for various\n// st"
},
{
"path": "12fa-docker-golang/chapter11/vendor/github.com/aws/aws-sdk-go/aws/request/http_request.go",
"chars": 358,
"preview": "package request\n\nimport (\n\t\"io\"\n\t\"net/http\"\n\t\"net/url\"\n)\n\nfunc copyHTTPRequest(r *http.Request, body io.ReadCloser) *htt"
},
{
"path": "12fa-docker-golang/chapter11/vendor/github.com/aws/aws-sdk-go/aws/request/offset_reader.go",
"chars": 1214,
"preview": "package request\n\nimport (\n\t\"io\"\n\t\"sync\"\n)\n\n// offsetReader is a thread-safe io.ReadCloser to prevent racing\n// with retr"
},
{
"path": "12fa-docker-golang/chapter11/vendor/github.com/aws/aws-sdk-go/aws/request/request.go",
"chars": 16787,
"preview": "package request\n\nimport (\n\t\"bytes\"\n\t\"fmt\"\n\t\"io\"\n\t\"net\"\n\t\"net/http\"\n\t\"net/url\"\n\t\"reflect\"\n\t\"strings\"\n\t\"time\"\n\n\t\"github.co"
},
{
"path": "12fa-docker-golang/chapter11/vendor/github.com/aws/aws-sdk-go/aws/request/request_1_7.go",
"chars": 727,
"preview": "// +build !go1.8\n\npackage request\n\nimport \"io\"\n\n// NoBody is an io.ReadCloser with no bytes. Read always returns EOF\n// "
},
{
"path": "12fa-docker-golang/chapter11/vendor/github.com/aws/aws-sdk-go/aws/request/request_1_8.go",
"chars": 186,
"preview": "// +build go1.8\n\npackage request\n\nimport \"net/http\"\n\n// Is a http.NoBody reader instructing Go HTTP client to not includ"
},
{
"path": "12fa-docker-golang/chapter11/vendor/github.com/aws/aws-sdk-go/aws/request/request_context.go",
"chars": 406,
"preview": "// +build go1.7\n\npackage request\n\nimport \"github.com/aws/aws-sdk-go/aws\"\n\n// setContext updates the Request to use the p"
},
{
"path": "12fa-docker-golang/chapter11/vendor/github.com/aws/aws-sdk-go/aws/request/request_context_1_6.go",
"chars": 394,
"preview": "// +build !go1.7\n\npackage request\n\nimport \"github.com/aws/aws-sdk-go/aws\"\n\n// setContext updates the Request to use the "
},
{
"path": "12fa-docker-golang/chapter11/vendor/github.com/aws/aws-sdk-go/aws/request/request_pagination.go",
"chars": 7124,
"preview": "package request\n\nimport (\n\t\"reflect\"\n\t\"sync/atomic\"\n\n\t\"github.com/aws/aws-sdk-go/aws\"\n\t\"github.com/aws/aws-sdk-go/aws/aw"
},
{
"path": "12fa-docker-golang/chapter11/vendor/github.com/aws/aws-sdk-go/aws/request/retryer.go",
"chars": 4082,
"preview": "package request\n\nimport (\n\t\"time\"\n\n\t\"github.com/aws/aws-sdk-go/aws\"\n\t\"github.com/aws/aws-sdk-go/aws/awserr\"\n)\n\n// Retrye"
},
{
"path": "12fa-docker-golang/chapter11/vendor/github.com/aws/aws-sdk-go/aws/request/serialization_error.go",
"chars": 282,
"preview": "// +build !appengine\n\npackage request\n\nimport (\n\t\"net\"\n\t\"os\"\n\t\"syscall\"\n)\n\nfunc isErrConnectionReset(err error) bool {\n\t"
},
{
"path": "12fa-docker-golang/chapter11/vendor/github.com/aws/aws-sdk-go/aws/request/serialization_error_appengine.go",
"chars": 165,
"preview": "// +build appengine\n\npackage request\n\nimport (\n\t\"strings\"\n)\n\nfunc isErrConnectionReset(err error) bool {\n\treturn strings"
},
{
"path": "12fa-docker-golang/chapter11/vendor/github.com/aws/aws-sdk-go/aws/request/timeout_read_closer.go",
"chars": 2453,
"preview": "package request\n\nimport (\n\t\"io\"\n\t\"time\"\n\n\t\"github.com/aws/aws-sdk-go/aws/awserr\"\n)\n\nvar timeoutErr = awserr.New(\n\tErrCod"
},
{
"path": "12fa-docker-golang/chapter11/vendor/github.com/aws/aws-sdk-go/aws/request/validation.go",
"chars": 6227,
"preview": "package request\n\nimport (\n\t\"bytes\"\n\t\"fmt\"\n\n\t\"github.com/aws/aws-sdk-go/aws/awserr\"\n)\n\nconst (\n\t// InvalidParameterErrCod"
},
{
"path": "12fa-docker-golang/chapter11/vendor/github.com/aws/aws-sdk-go/aws/request/waiter.go",
"chars": 8874,
"preview": "package request\n\nimport (\n\t\"fmt\"\n\t\"time\"\n\n\t\"github.com/aws/aws-sdk-go/aws\"\n\t\"github.com/aws/aws-sdk-go/aws/awserr\"\n\t\"git"
},
{
"path": "12fa-docker-golang/chapter11/vendor/github.com/aws/aws-sdk-go/aws/session/doc.go",
"chars": 11310,
"preview": "/*\nPackage session provides configuration for the SDK's service clients.\n\nSessions can be shared across all service clie"
},
{
"path": "12fa-docker-golang/chapter11/vendor/github.com/aws/aws-sdk-go/aws/session/env_config.go",
"chars": 6537,
"preview": "package session\n\nimport (\n\t\"os\"\n\t\"path/filepath\"\n\t\"strconv\"\n\n\t\"github.com/aws/aws-sdk-go/aws/credentials\"\n)\n\n// envConfi"
},
{
"path": "12fa-docker-golang/chapter11/vendor/github.com/aws/aws-sdk-go/aws/session/session.go",
"chars": 20905,
"preview": "package session\n\nimport (\n\t\"crypto/tls\"\n\t\"crypto/x509\"\n\t\"fmt\"\n\t\"io\"\n\t\"io/ioutil\"\n\t\"net/http\"\n\t\"os\"\n\n\t\"github.com/aws/aws"
},
{
"path": "12fa-docker-golang/chapter11/vendor/github.com/aws/aws-sdk-go/aws/session/shared_config.go",
"chars": 8649,
"preview": "package session\n\nimport (\n\t\"fmt\"\n\t\"io/ioutil\"\n\n\t\"github.com/aws/aws-sdk-go/aws/awserr\"\n\t\"github.com/aws/aws-sdk-go/aws/c"
},
{
"path": "12fa-docker-golang/chapter11/vendor/github.com/aws/aws-sdk-go/aws/signer/v4/header_rules.go",
"chars": 1816,
"preview": "package v4\n\nimport (\n\t\"net/http\"\n\t\"strings\"\n)\n\n// validator houses a set of rule needed for validation of a\n// string va"
},
{
"path": "12fa-docker-golang/chapter11/vendor/github.com/aws/aws-sdk-go/aws/signer/v4/options.go",
"chars": 175,
"preview": "package v4\n\n// WithUnsignedPayload will enable and set the UnsignedPayload field to\n// true of the signer.\nfunc WithUnsi"
},
{
"path": "12fa-docker-golang/chapter11/vendor/github.com/aws/aws-sdk-go/aws/signer/v4/uri_path.go",
"chars": 295,
"preview": "// +build go1.5\n\npackage v4\n\nimport (\n\t\"net/url\"\n\t\"strings\"\n)\n\nfunc getURIPath(u *url.URL) string {\n\tvar uri string\n\n\tif"
},
{
"path": "12fa-docker-golang/chapter11/vendor/github.com/aws/aws-sdk-go/aws/signer/v4/v4.go",
"chars": 25973,
"preview": "// Package v4 implements signing for AWS V4 signer\n//\n// Provides request signing for request that need to be signed wit"
},
{
"path": "12fa-docker-golang/chapter11/vendor/github.com/aws/aws-sdk-go/aws/types.go",
"chars": 3505,
"preview": "package aws\n\nimport (\n\t\"io\"\n\t\"sync\"\n)\n\n// ReadSeekCloser wraps a io.Reader returning a ReaderSeekerCloser. Should\n// onl"
},
{
"path": "12fa-docker-golang/chapter11/vendor/github.com/aws/aws-sdk-go/aws/url.go",
"chars": 265,
"preview": "// +build go1.8\n\npackage aws\n\nimport \"net/url\"\n\n// URLHostname will extract the Hostname without port from the URL value"
},
{
"path": "12fa-docker-golang/chapter11/vendor/github.com/aws/aws-sdk-go/aws/url_1_7.go",
"chars": 627,
"preview": "// +build !go1.8\n\npackage aws\n\nimport (\n\t\"net/url\"\n\t\"strings\"\n)\n\n// URLHostname will extract the Hostname without port f"
},
{
"path": "12fa-docker-golang/chapter11/vendor/github.com/aws/aws-sdk-go/aws/version.go",
"chars": 231,
"preview": "// Package aws provides core functionality for making requests to AWS services.\npackage aws\n\n// SDKName is the name of t"
},
{
"path": "12fa-docker-golang/chapter11/vendor/github.com/aws/aws-sdk-go/private/protocol/LICENSE.txt",
"chars": 11358,
"preview": "\n Apache License\n Version 2.0, January 2004\n "
},
{
"path": "12fa-docker-golang/chapter11/vendor/github.com/aws/aws-sdk-go/private/protocol/ec2query/build.go",
"chars": 1215,
"preview": "// Package ec2query provides serialization of AWS EC2 requests and responses.\npackage ec2query\n\n//go:generate go run -ta"
},
{
"path": "12fa-docker-golang/chapter11/vendor/github.com/aws/aws-sdk-go/private/protocol/ec2query/unmarshal.go",
"chars": 2199,
"preview": "package ec2query\n\n//go:generate go run -tags codegen ../../../models/protocol_tests/generate.go ../../../models/protocol"
},
{
"path": "12fa-docker-golang/chapter11/vendor/github.com/aws/aws-sdk-go/private/protocol/idempotency.go",
"chars": 2114,
"preview": "package protocol\n\nimport (\n\t\"crypto/rand\"\n\t\"fmt\"\n\t\"reflect\"\n)\n\n// RandReader is the random reader the protocol package w"
},
{
"path": "12fa-docker-golang/chapter11/vendor/github.com/aws/aws-sdk-go/private/protocol/json/jsonutil/build.go",
"chars": 6271,
"preview": "// Package jsonutil provides JSON serialization of AWS requests and responses.\npackage jsonutil\n\nimport (\n\t\"bytes\"\n\t\"enc"
},
{
"path": "12fa-docker-golang/chapter11/vendor/github.com/aws/aws-sdk-go/private/protocol/json/jsonutil/unmarshal.go",
"chars": 4480,
"preview": "package jsonutil\n\nimport (\n\t\"encoding/base64\"\n\t\"encoding/json\"\n\t\"fmt\"\n\t\"io\"\n\t\"io/ioutil\"\n\t\"reflect\"\n\t\"time\"\n)\n\n// Unmars"
},
{
"path": "12fa-docker-golang/chapter11/vendor/github.com/aws/aws-sdk-go/private/protocol/jsonrpc/jsonrpc.go",
"chars": 3725,
"preview": "// Package jsonrpc provides JSON RPC utilities for serialization of AWS\n// requests and responses.\npackage jsonrpc\n\n//go"
},
{
"path": "12fa-docker-golang/chapter11/vendor/github.com/aws/aws-sdk-go/private/protocol/query/build.go",
"chars": 1218,
"preview": "// Package query provides serialization of AWS query requests, and responses.\npackage query\n\n//go:generate go run -tags "
},
{
"path": "12fa-docker-golang/chapter11/vendor/github.com/aws/aws-sdk-go/private/protocol/query/queryutil/queryutil.go",
"chars": 5503,
"preview": "package queryutil\n\nimport (\n\t\"encoding/base64\"\n\t\"fmt\"\n\t\"net/url\"\n\t\"reflect\"\n\t\"sort\"\n\t\"strconv\"\n\t\"strings\"\n\t\"time\"\n\n\t\"git"
},
{
"path": "12fa-docker-golang/chapter11/vendor/github.com/aws/aws-sdk-go/private/protocol/query/unmarshal.go",
"chars": 1294,
"preview": "package query\n\n//go:generate go run -tags codegen ../../../models/protocol_tests/generate.go ../../../models/protocol_te"
},
{
"path": "12fa-docker-golang/chapter11/vendor/github.com/aws/aws-sdk-go/private/protocol/query/unmarshal_error.go",
"chars": 1808,
"preview": "package query\n\nimport (\n\t\"encoding/xml\"\n\t\"io/ioutil\"\n\n\t\"github.com/aws/aws-sdk-go/aws/awserr\"\n\t\"github.com/aws/aws-sdk-g"
},
{
"path": "12fa-docker-golang/chapter11/vendor/github.com/aws/aws-sdk-go/private/protocol/rest/build.go",
"chars": 7359,
"preview": "// Package rest provides RESTful serialization of AWS requests and responses.\npackage rest\n\nimport (\n\t\"bytes\"\n\t\"encoding"
},
{
"path": "12fa-docker-golang/chapter11/vendor/github.com/aws/aws-sdk-go/private/protocol/rest/payload.go",
"chars": 1108,
"preview": "package rest\n\nimport \"reflect\"\n\n// PayloadMember returns the payload field member of i if there is one, or nil.\nfunc Pay"
},
{
"path": "12fa-docker-golang/chapter11/vendor/github.com/aws/aws-sdk-go/private/protocol/rest/unmarshal.go",
"chars": 6047,
"preview": "package rest\n\nimport (\n\t\"bytes\"\n\t\"encoding/base64\"\n\t\"encoding/json\"\n\t\"fmt\"\n\t\"io\"\n\t\"io/ioutil\"\n\t\"net/http\"\n\t\"reflect\"\n\t\"s"
},
{
"path": "12fa-docker-golang/chapter11/vendor/github.com/aws/aws-sdk-go/private/protocol/restjson/restjson.go",
"chars": 3053,
"preview": "// Package restjson provides RESTful JSON serialization of AWS\n// requests and responses.\npackage restjson\n\n//go:generat"
},
{
"path": "12fa-docker-golang/chapter11/vendor/github.com/aws/aws-sdk-go/private/protocol/restxml/restxml.go",
"chars": 2604,
"preview": "// Package restxml provides RESTful XML serialization of AWS\n// requests and responses.\npackage restxml\n\n//go:generate g"
},
{
"path": "12fa-docker-golang/chapter11/vendor/github.com/aws/aws-sdk-go/private/protocol/unmarshal.go",
"chars": 596,
"preview": "package protocol\n\nimport (\n\t\"io\"\n\t\"io/ioutil\"\n\n\t\"github.com/aws/aws-sdk-go/aws/request\"\n)\n\n// UnmarshalDiscardBodyHandle"
},
{
"path": "12fa-docker-golang/chapter11/vendor/github.com/aws/aws-sdk-go/private/protocol/xml/xmlutil/build.go",
"chars": 7881,
"preview": "// Package xmlutil provides XML serialization of AWS requests and responses.\npackage xmlutil\n\nimport (\n\t\"encoding/base64"
},
{
"path": "12fa-docker-golang/chapter11/vendor/github.com/aws/aws-sdk-go/private/protocol/xml/xmlutil/unmarshal.go",
"chars": 6177,
"preview": "package xmlutil\n\nimport (\n\t\"encoding/base64\"\n\t\"encoding/xml\"\n\t\"fmt\"\n\t\"io\"\n\t\"reflect\"\n\t\"strconv\"\n\t\"strings\"\n\t\"time\"\n)\n\n//"
},
{
"path": "12fa-docker-golang/chapter11/vendor/github.com/aws/aws-sdk-go/private/protocol/xml/xmlutil/xml_to_struct.go",
"chars": 3317,
"preview": "package xmlutil\n\nimport (\n\t\"encoding/xml\"\n\t\"fmt\"\n\t\"io\"\n\t\"sort\"\n)\n\n// A XMLNode contains the values to be encoded or deco"
},
{
"path": "12fa-docker-golang/chapter11/vendor/github.com/aws/aws-sdk-go/service/kinesis/LICENSE.txt",
"chars": 11358,
"preview": "\n Apache License\n Version 2.0, January 2004\n "
},
{
"path": "12fa-docker-golang/chapter11/vendor/github.com/aws/aws-sdk-go/service/kinesis/api.go",
"chars": 177860,
"preview": "// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.\n\n// Package kinesis provides a client for Amazon Ki"
},
{
"path": "12fa-docker-golang/chapter11/vendor/github.com/aws/aws-sdk-go/service/kinesis/customizations.go",
"chars": 360,
"preview": "package kinesis\n\nimport (\n\t\"time\"\n\n\t\"github.com/aws/aws-sdk-go/aws/request\"\n)\n\nvar readDuration = 5 * time.Second\n\nfunc "
},
{
"path": "12fa-docker-golang/chapter11/vendor/github.com/aws/aws-sdk-go/service/kinesis/errors.go",
"chars": 2209,
"preview": "// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.\n\npackage kinesis\n\nconst (\n\n\t// ErrCodeExpiredIterat"
},
{
"path": "12fa-docker-golang/chapter11/vendor/github.com/aws/aws-sdk-go/service/kinesis/kinesisiface/interface.go",
"chars": 9201,
"preview": "// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.\n\n// Package kinesisiface provides an interface to e"
},
{
"path": "12fa-docker-golang/chapter11/vendor/github.com/aws/aws-sdk-go/service/kinesis/service.go",
"chars": 3074,
"preview": "// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.\n\npackage kinesis\n\nimport (\n\t\"github.com/aws/aws-sdk"
},
{
"path": "12fa-docker-golang/chapter11/vendor/github.com/aws/aws-sdk-go/service/kinesis/waiters.go",
"chars": 1881,
"preview": "// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.\n\npackage kinesis\n\nimport (\n\t\"time\"\n\n\t\"github.com/aw"
},
{
"path": "12fa-docker-golang/chapter11/vendor/github.com/aws/aws-sdk-go/service/sts/LICENSE.txt",
"chars": 11358,
"preview": "\n Apache License\n Version 2.0, January 2004\n "
},
{
"path": "12fa-docker-golang/chapter11/vendor/github.com/aws/aws-sdk-go/service/sts/api.go",
"chars": 106031,
"preview": "// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.\n\n// Package sts provides a client for AWS Security "
},
{
"path": "12fa-docker-golang/chapter11/vendor/github.com/aws/aws-sdk-go/service/sts/customizations.go",
"chars": 272,
"preview": "package sts\n\nimport \"github.com/aws/aws-sdk-go/aws/request\"\n\nfunc init() {\n\tinitRequest = func(r *request.Request) {\n\t\ts"
},
{
"path": "12fa-docker-golang/chapter11/vendor/github.com/aws/aws-sdk-go/service/sts/errors.go",
"chars": 3364,
"preview": "// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.\n\npackage sts\n\nconst (\n\n\t// ErrCodeExpiredTokenExcep"
},
{
"path": "12fa-docker-golang/chapter11/vendor/github.com/aws/aws-sdk-go/service/sts/service.go",
"chars": 5886,
"preview": "// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.\n\npackage sts\n\nimport (\n\t\"github.com/aws/aws-sdk-go/"
},
{
"path": "12fa-docker-golang/chapter11/vendor/github.com/aws/aws-sdk-go/service/sts/stsiface/interface.go",
"chars": 4471,
"preview": "// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.\n\n// Package stsiface provides an interface to enabl"
},
{
"path": "12fa-docker-golang/chapter11/vendor/github.com/aws/aws-sdk-go/vendor/github.com/go-ini/ini/LICENSE.txt",
"chars": 11358,
"preview": "\n Apache License\n Version 2.0, January 2004\n "
},
{
"path": "12fa-docker-golang/chapter11/vendor/github.com/aws/aws-sdk-go/vendor/github.com/go-ini/ini/error.go",
"chars": 883,
"preview": "// Copyright 2016 Unknwon\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\"): you may\n// not use this "
},
{
"path": "12fa-docker-golang/chapter11/vendor/github.com/aws/aws-sdk-go/vendor/github.com/go-ini/ini/ini.go",
"chars": 14195,
"preview": "// Copyright 2014 Unknwon\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\"): you may\n// not use this "
},
{
"path": "12fa-docker-golang/chapter11/vendor/github.com/aws/aws-sdk-go/vendor/github.com/go-ini/ini/key.go",
"chars": 20529,
"preview": "// Copyright 2014 Unknwon\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\"): you may\n// not use this "
},
{
"path": "12fa-docker-golang/chapter11/vendor/github.com/aws/aws-sdk-go/vendor/github.com/go-ini/ini/parser.go",
"chars": 8154,
"preview": "// Copyright 2015 Unknwon\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\"): you may\n// not use this "
},
{
"path": "12fa-docker-golang/chapter11/vendor/github.com/aws/aws-sdk-go/vendor/github.com/go-ini/ini/section.go",
"chars": 5315,
"preview": "// Copyright 2014 Unknwon\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\"): you may\n// not use this "
},
{
"path": "12fa-docker-golang/chapter11/vendor/github.com/aws/aws-sdk-go/vendor/github.com/go-ini/ini/struct.go",
"chars": 12245,
"preview": "// Copyright 2014 Unknwon\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\"): you may\n// not use this "
},
{
"path": "12fa-docker-golang/chapter11/vendor/github.com/aws/aws-sdk-go/vendor/github.com/jmespath/go-jmespath/LICENSE.txt",
"chars": 11358,
"preview": "\n Apache License\n Version 2.0, January 2004\n "
},
{
"path": "12fa-docker-golang/chapter11/vendor/github.com/aws/aws-sdk-go/vendor/github.com/jmespath/go-jmespath/api.go",
"chars": 1473,
"preview": "package jmespath\n\nimport \"strconv\"\n\n// JmesPath is the epresentation of a compiled JMES path query. A JmesPath is\n// saf"
},
{
"path": "12fa-docker-golang/chapter11/vendor/github.com/aws/aws-sdk-go/vendor/github.com/jmespath/go-jmespath/astnodetype_string.go",
"chars": 793,
"preview": "// generated by stringer -type astNodeType; DO NOT EDIT\n\npackage jmespath\n\nimport \"fmt\"\n\nconst _astNodeType_name = \"ASTE"
},
{
"path": "12fa-docker-golang/chapter11/vendor/github.com/aws/aws-sdk-go/vendor/github.com/jmespath/go-jmespath/functions.go",
"chars": 18532,
"preview": "package jmespath\n\nimport (\n\t\"encoding/json\"\n\t\"errors\"\n\t\"fmt\"\n\t\"math\"\n\t\"reflect\"\n\t\"sort\"\n\t\"strconv\"\n\t\"strings\"\n\t\"unicode/"
},
{
"path": "12fa-docker-golang/chapter11/vendor/github.com/aws/aws-sdk-go/vendor/github.com/jmespath/go-jmespath/fuzz/jmespath.go",
"chars": 236,
"preview": "package jmespath\n\nimport \"github.com/jmespath/go-jmespath\"\n\n// Fuzz will fuzz test the JMESPath parser.\nfunc Fuzz(data ["
},
{
"path": "12fa-docker-golang/chapter11/vendor/github.com/aws/aws-sdk-go/vendor/github.com/jmespath/go-jmespath/interpreter.go",
"chars": 10508,
"preview": "package jmespath\n\nimport (\n\t\"errors\"\n\t\"reflect\"\n\t\"unicode\"\n\t\"unicode/utf8\"\n)\n\n/* This is a tree based interpreter. It w"
},
{
"path": "12fa-docker-golang/chapter11/vendor/github.com/aws/aws-sdk-go/vendor/github.com/jmespath/go-jmespath/lexer.go",
"chars": 10251,
"preview": "package jmespath\n\nimport (\n\t\"bytes\"\n\t\"encoding/json\"\n\t\"fmt\"\n\t\"strconv\"\n\t\"strings\"\n\t\"unicode/utf8\"\n)\n\ntype token struct {"
},
{
"path": "12fa-docker-golang/chapter11/vendor/github.com/aws/aws-sdk-go/vendor/github.com/jmespath/go-jmespath/parser.go",
"chars": 15312,
"preview": "package jmespath\n\nimport (\n\t\"encoding/json\"\n\t\"fmt\"\n\t\"strconv\"\n\t\"strings\"\n)\n\ntype astNodeType int\n\n//go:generate stringer"
},
{
"path": "12fa-docker-golang/chapter11/vendor/github.com/aws/aws-sdk-go/vendor/github.com/jmespath/go-jmespath/toktype_string.go",
"chars": 692,
"preview": "// generated by stringer -type=tokType; DO NOT EDIT\n\npackage jmespath\n\nimport \"fmt\"\n\nconst _tokType_name = \"tUnknowntSta"
},
{
"path": "12fa-docker-golang/chapter11/vendor/github.com/aws/aws-sdk-go/vendor/github.com/jmespath/go-jmespath/util.go",
"chars": 4334,
"preview": "package jmespath\n\nimport (\n\t\"errors\"\n\t\"reflect\"\n)\n\n// IsFalse determines if an object is false based on the JMESPath spe"
},
{
"path": "12fa-docker-golang/chapter11/vendor/github.com/go-logfmt/logfmt/LICENSE",
"chars": 1077,
"preview": "The MIT License (MIT)\n\nCopyright (c) 2015 go-logfmt\n\nPermission is hereby granted, free of charge, to any person obtaini"
},
{
"path": "12fa-docker-golang/chapter11/vendor/github.com/go-logfmt/logfmt/decode.go",
"chars": 5062,
"preview": "package logfmt\n\nimport (\n\t\"bufio\"\n\t\"bytes\"\n\t\"fmt\"\n\t\"io\"\n\t\"unicode/utf8\"\n)\n\n// A Decoder reads and decodes logfmt records"
},
{
"path": "12fa-docker-golang/chapter11/vendor/github.com/go-logfmt/logfmt/doc.go",
"chars": 336,
"preview": "// Package logfmt implements utilities to marshal and unmarshal data in the\n// logfmt format. The logfmt format records "
},
{
"path": "12fa-docker-golang/chapter11/vendor/github.com/go-logfmt/logfmt/encode.go",
"chars": 7746,
"preview": "package logfmt\n\nimport (\n\t\"bytes\"\n\t\"encoding\"\n\t\"errors\"\n\t\"fmt\"\n\t\"io\"\n\t\"reflect\"\n\t\"strings\"\n\t\"unicode/utf8\"\n)\n\n// Marshal"
},
{
"path": "12fa-docker-golang/chapter11/vendor/github.com/go-logfmt/logfmt/fuzz.go",
"chars": 2378,
"preview": "// +build gofuzz\n\npackage logfmt\n\nimport (\n\t\"bufio\"\n\t\"bytes\"\n\t\"fmt\"\n\t\"io\"\n\t\"reflect\"\n\n\tkr \"github.com/kr/logfmt\"\n)\n\n// F"
},
{
"path": "12fa-docker-golang/chapter11/vendor/github.com/go-logfmt/logfmt/jsonstring.go",
"chars": 5222,
"preview": "package logfmt\n\nimport (\n\t\"bytes\"\n\t\"io\"\n\t\"strconv\"\n\t\"sync\"\n\t\"unicode\"\n\t\"unicode/utf16\"\n\t\"unicode/utf8\"\n)\n\n// Taken from "
},
{
"path": "12fa-docker-golang/chapter11/vendor/github.com/jpillora/backoff/LICENSE",
"chars": 1080,
"preview": "The MIT License (MIT)\n\nCopyright (c) 2017 Jaime Pillora\n\nPermission is hereby granted, free of charge, to any person obt"
},
{
"path": "12fa-docker-golang/chapter11/vendor/github.com/jpillora/backoff/backoff.go",
"chars": 2150,
"preview": "// Package backoff provides an exponential-backoff implementation.\npackage backoff\n\nimport (\n\t\"math\"\n\t\"math/rand\"\n\t\"time"
},
{
"path": "12fa-docker-golang/chapter11/vendor/github.com/kr/logfmt/decode.go",
"chars": 5094,
"preview": "// Package implements the decoding of logfmt key-value pairs.\n//\n// Example logfmt message:\n//\n//\tfoo=bar a=14 baz=\"hell"
},
{
"path": "12fa-docker-golang/chapter11/vendor/github.com/kr/logfmt/scanner.go",
"chars": 2003,
"preview": "package logfmt\n\nimport (\n\t\"errors\"\n\t\"fmt\"\n)\n\nvar ErrUnterminatedString = errors.New(\"logfmt: unterminated string\")\n\nfunc"
},
{
"path": "12fa-docker-golang/chapter11/vendor/github.com/kr/logfmt/unquote.go",
"chars": 2859,
"preview": "package logfmt\n\nimport (\n\t\"strconv\"\n\t\"unicode\"\n\t\"unicode/utf16\"\n\t\"unicode/utf8\"\n)\n\n// Taken from Go's encoding/json\n\n// "
},
{
"path": "12fa-docker-golang/chapter11/vendor/github.com/pkg/errors/LICENSE",
"chars": 1312,
"preview": "Copyright (c) 2015, Dave Cheney <dave@cheney.net>\nAll rights reserved.\n\nRedistribution and use in source and binary form"
},
{
"path": "12fa-docker-golang/chapter11/vendor/github.com/pkg/errors/errors.go",
"chars": 6838,
"preview": "// Package errors provides simple error handling primitives.\n//\n// The traditional error handling idiom in Go is roughly"
},
{
"path": "12fa-docker-golang/chapter11/vendor/github.com/pkg/errors/stack.go",
"chars": 4412,
"preview": "package errors\n\nimport (\n\t\"fmt\"\n\t\"io\"\n\t\"path\"\n\t\"runtime\"\n\t\"strings\"\n)\n\n// Frame represents a program counter inside a st"
},
{
"path": "12fa-docker-golang/chapter11/vendor/github.com/rogpeppe/fastuuid/LICENSE",
"chars": 1508,
"preview": "Copyright © 2014, Roger Peppe\nAll rights reserved.\n\nRedistribution and use in source and binary forms, with or without m"
},
{
"path": "12fa-docker-golang/chapter11/vendor/github.com/rogpeppe/fastuuid/uuid.go",
"chars": 1703,
"preview": "// Package fastuuid provides fast UUID generation of 192 bit\n// universally unique identifiers. It does not provide\n// f"
},
{
"path": "12fa-docker-golang/chapter11/vendor/github.com/satori/go.uuid/LICENSE",
"chars": 1082,
"preview": "Copyright (C) 2013-2016 by Maxim Bublis <b@codemonkey.ru>\n\nPermission is hereby granted, free of charge, to any person o"
},
{
"path": "12fa-docker-golang/chapter11/vendor/github.com/satori/go.uuid/uuid.go",
"chars": 11450,
"preview": "// Copyright (C) 2013-2015 by Maxim Bublis <b@codemonkey.ru>\n//\n// Permission is hereby granted, free of charge, to any "
},
{
"path": "12fa-docker-golang/chapter11/vendor/github.com/tj/go-elastic/batch/batch.go",
"chars": 1697,
"preview": "// Package batch lets you buffer bulk documents for insert. None of the methods\n// provided are thread-safe, you must sy"
},
{
"path": "12fa-docker-golang/chapter11/vendor/github.com/tj/go-kinesis/LICENSE",
"chars": 1106,
"preview": "(The MIT License)\n\nCopyright (c) 2015 TJ Holowaychuk <tj@tjholowaychuk.coma>\n\nPermission is hereby granted, free o"
},
{
"path": "12fa-docker-golang/chapter11/vendor/github.com/tj/go-kinesis/config.go",
"chars": 1656,
"preview": "package kinesis\n\nimport (\n\t\"time\"\n\n\t\"github.com/apex/log\"\n\t\"github.com/aws/aws-sdk-go/aws\"\n\t\"github.com/aws/aws-sdk-go/a"
},
{
"path": "12fa-docker-golang/chapter11/vendor/github.com/tj/go-kinesis/kinesis.go",
"chars": 3359,
"preview": "// Package kinesis implements a batch producer built on top of the official AWS SDK.\npackage kinesis\n\nimport (\n\t\"errors\""
},
{
"path": "12fa-docker-golang/chapter11/vendor/manifest",
"chars": 3994,
"preview": "{\n\t\"version\": 0,\n\t\"dependencies\": [\n\t\t{\n\t\t\t\"importpath\": \"github.com/apex/log\",\n\t\t\t\"repository\": \"https://github.com/ape"
},
{
"path": "12fa-docker-golang/chapter2/run",
"chars": 33,
"preview": "gvt fetch github.com/namsral/flag"
},
{
"path": "12fa-docker-golang/chapter2/vendor/github.com/namsral/flag/LICENSE",
"chars": 1478,
"preview": "Copyright (c) 2012 The Go Authors. All rights reserved.\n\nRedistribution and use in source and binary forms, with or with"
},
{
"path": "12fa-docker-golang/chapter2/vendor/github.com/namsral/flag/examples/gopher.go",
"chars": 638,
"preview": "package main\n\nimport (\n \"github.com/namsral/flag\"\n \"fmt\"\n )\n\nfunc main() {\n var (\n config string\n "
},
{
"path": "12fa-docker-golang/chapter2/vendor/github.com/namsral/flag/flag.go",
"chars": 32242,
"preview": "// Copyright 2009 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license "
},
{
"path": "12fa-docker-golang/chapter2/vendor/manifest",
"chars": 262,
"preview": "{\n\t\"version\": 0,\n\t\"dependencies\": [\n\t\t{\n\t\t\t\"importpath\": \"github.com/namsral/flag\",\n\t\t\t\"repository\": \"https://github.com"
},
{
"path": "12fa-docker-golang/chapter3/flags/flags.go",
"chars": 175,
"preview": "package main\n\nimport (\n\t\"fmt\"\n\t\"github.com/namsral/flag\"\n)\n\nfunc main() {\n\tvar age int\n\n\tflag.IntVar(&age, \"age\", 0, \"ag"
},
{
"path": "12fa-docker-golang/chapter3/flags/run",
"chars": 100,
"preview": "#!/bin/bash\ndocker run --rm -e \"AGE=35\" -v $(pwd):/go/src/app -w /go/src/app golang go run flags.go\n"
},
{
"path": "12fa-docker-golang/chapter3/flags/vendor/github.com/namsral/flag/LICENSE",
"chars": 1478,
"preview": "Copyright (c) 2012 The Go Authors. All rights reserved.\n\nRedistribution and use in source and binary forms, with or with"
},
{
"path": "12fa-docker-golang/chapter3/flags/vendor/github.com/namsral/flag/examples/gopher.go",
"chars": 638,
"preview": "package main\n\nimport (\n \"github.com/namsral/flag\"\n \"fmt\"\n )\n\nfunc main() {\n var (\n config string\n "
},
{
"path": "12fa-docker-golang/chapter3/flags/vendor/github.com/namsral/flag/extras.go",
"chars": 4377,
"preview": "// Copyright 2009 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license "
},
{
"path": "12fa-docker-golang/chapter3/flags/vendor/github.com/namsral/flag/flag.go",
"chars": 33031,
"preview": "// Copyright 2009 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license "
},
{
"path": "12fa-docker-golang/chapter3/flags/vendor/manifest",
"chars": 262,
"preview": "{\n\t\"version\": 0,\n\t\"dependencies\": [\n\t\t{\n\t\t\t\"importpath\": \"github.com/namsral/flag\",\n\t\t\t\"repository\": \"https://github.com"
},
{
"path": "12fa-docker-golang/chapter3/godotenv/flags.go",
"chars": 221,
"preview": "package main\n\nimport (\n\t\"fmt\"\n\t\"github.com/joho/godotenv\"\n\t\"github.com/namsral/flag\"\n)\n\nfunc main() {\n\tvar age int\n\n\tgod"
},
{
"path": "12fa-docker-golang/chapter3/godotenv/run",
"chars": 88,
"preview": "#!/bin/bash\ndocker run --rm -v $(pwd):/go/src/app -w /go/src/app golang go run flags.go\n"
},
{
"path": "12fa-docker-golang/chapter3/godotenv/vendor/github.com/joho/godotenv/LICENCE",
"chars": 1069,
"preview": "Copyright (c) 2013 John Barton\n\nMIT License\n\nPermission is hereby granted, free of charge, to any person obtaining\na cop"
},
{
"path": "12fa-docker-golang/chapter3/godotenv/vendor/github.com/joho/godotenv/autoload/autoload.go",
"chars": 232,
"preview": "package autoload\n\n/*\n\tYou can just read the .env file on import just by doing\n\n\t\timport _ \"github.com/joho/godotenv/auto"
},
{
"path": "12fa-docker-golang/chapter3/godotenv/vendor/github.com/joho/godotenv/cmd/godotenv/cmd.go",
"chars": 1008,
"preview": "package main\n\nimport (\n\t\"flag\"\n\t\"fmt\"\n\t\"log\"\n\n\t\"strings\"\n\n\t\"github.com/joho/godotenv\"\n)\n\nfunc main() {\n\tvar showHelp boo"
},
{
"path": "12fa-docker-golang/chapter3/godotenv/vendor/github.com/joho/godotenv/godotenv.go",
"chars": 5953,
"preview": "// Package godotenv is a go port of the ruby dotenv library (https://github.com/bkeepers/dotenv)\n//\n// Examples/readme c"
},
{
"path": "12fa-docker-golang/chapter3/godotenv/vendor/github.com/namsral/flag/LICENSE",
"chars": 1478,
"preview": "Copyright (c) 2012 The Go Authors. All rights reserved.\n\nRedistribution and use in source and binary forms, with or with"
},
{
"path": "12fa-docker-golang/chapter3/godotenv/vendor/github.com/namsral/flag/examples/gopher.go",
"chars": 638,
"preview": "package main\n\nimport (\n \"github.com/namsral/flag\"\n \"fmt\"\n )\n\nfunc main() {\n var (\n config string\n "
},
{
"path": "12fa-docker-golang/chapter3/godotenv/vendor/github.com/namsral/flag/extras.go",
"chars": 4377,
"preview": "// Copyright 2009 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license "
}
]
// ... and 1061 more files (download for full content)
About this extraction
This page contains the full source code of the titpetric/books GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 1261 files (9.9 MB), approximately 2.7M tokens, and a symbol index with 71125 extracted functions, classes, methods, constants, and types. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.
Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.