├── .gitignore ├── .proverc ├── IMAGES.md ├── INSTALL.md ├── LICENSE ├── Makefile ├── README.md ├── Vagrantfile ├── cmd ├── jetpack │ ├── command.go │ ├── fetch.go │ ├── flags.go │ ├── help.go │ ├── host.go │ ├── image.go │ ├── list.go │ ├── main.go │ ├── mds.go │ ├── pod.go │ └── trust.go └── mds │ └── main.go ├── contrib ├── ansible │ ├── etc │ │ └── pf.conf │ ├── group_vars │ │ └── all.yml │ ├── tasks │ │ ├── dependencies.yml │ │ ├── networking.yml │ │ └── pf.yml │ ├── usr │ │ └── local │ │ │ └── etc │ │ │ └── jetpack.conf.j2 │ └── vagrant-playbook.yml ├── port │ ├── .gitignore │ ├── GIDs │ ├── Makefile │ ├── UIDs │ ├── distinfo │ ├── files │ │ └── jetpack_mds.in │ ├── pkg-descr │ └── pkg-plist └── xjetpack.sh ├── images ├── .gitignore ├── debootstrap │ ├── .gitignore │ ├── Makefile │ ├── README.md │ ├── debootstrap.sh │ └── manifest.json.sh ├── example.nginx │ ├── Makefile │ ├── manifest.json.sh │ └── nginx.conf ├── example.showenv │ ├── Makefile │ ├── manifest.json │ └── showenv.sh ├── freebsd-base │ ├── .gitignore │ ├── Makefile │ ├── base.manifest.json.sh │ ├── manifest.json.sh │ └── rc.conf ├── freebsd-current │ ├── .gitignore │ ├── Makefile │ └── manifest.json ├── minecraft-server │ ├── .gitignore │ ├── Makefile │ ├── manifest.json │ ├── minecraft-server.sh │ └── pre-start.sh ├── portbuilder │ ├── .gitignore │ ├── Makefile │ ├── README.md │ ├── make.conf │ ├── manifest.json │ ├── portbuild.pre-start.sh │ └── portbuild.sh └── ubuntu │ ├── .gitignore │ ├── Makefile │ ├── build.sh │ └── manifest.json.sh ├── jetpack.conf.sample ├── lib ├── acutil │ ├── flags.go │ ├── labels.go │ ├── util.go │ └── values.go ├── drain │ ├── drain.go │ └── drain_test.go ├── fetch │ ├── discovery.go │ └── location.go ├── jetpack │ ├── app.go │ ├── build.go │ ├── config.go │ ├── host.go │ ├── image.go │ ├── mds.go │ ├── pod.go │ └── utils.go ├── keystore │ ├── data_for_test.go │ ├── entity.go │ ├── keyring.go │ ├── keystore.go │ ├── keystore_test.go │ └── util.go ├── passwd │ ├── group.go │ └── passwd.go ├── run │ ├── run.go │ ├── shell.go │ └── shell_test.go ├── ui │ ├── spinner.go │ ├── ui.go │ ├── ui.spin │ │ └── spin.go │ └── ui.spinwriter │ │ └── main.go ├── wraperr │ └── wraperr.go └── zfs │ └── zfs.go ├── man └── jetpack.conf.5 ├── script ├── govendor.sh ├── jetpack └── mds ├── share ├── jetpack.image.mk └── makeaci.sh ├── stage2.c ├── t ├── 00_sanity_init.t ├── 10_portbuilder_build_image.t ├── 11_portbuilder_use.t ├── 20_validator.t ├── 20_volumes.t ├── fixtures │ ├── 20_process_mgmt.t │ │ └── pod.json │ ├── 20_validator.t │ │ ├── pod-manifest.json │ │ ├── run-validator.sh │ │ └── validate.sh │ └── 20_volumes.t │ │ └── pod-manifest.json └── lib │ └── Test │ └── JetpackHelpers.pm └── vendor ├── .gitignore ├── github.com ├── PuerkitoBio │ ├── purell │ │ ├── LICENSE │ │ ├── README.md │ │ └── purell.go │ └── urlesc │ │ ├── LICENSE │ │ ├── README.md │ │ └── urlesc.go ├── appc │ └── spec │ │ ├── CHANGELOG.md │ │ ├── CONTRIBUTING.md │ │ ├── DCO │ │ ├── GUIDE.md │ │ ├── LICENSE │ │ ├── MAINTAINERS │ │ ├── POLICY.md │ │ ├── README.md │ │ ├── SPEC.md │ │ ├── VERSION │ │ ├── ace │ │ ├── doc.go │ │ ├── image_manifest_main.json.in │ │ ├── image_manifest_sidekick.json.in │ │ ├── os_default.go │ │ ├── os_freebsd.go │ │ ├── os_linux.go │ │ ├── os_shared.go │ │ └── validator.go │ │ ├── aci │ │ ├── build.go │ │ ├── doc.go │ │ ├── file.go │ │ ├── layout.go │ │ └── writer.go │ │ ├── actool │ │ ├── actool.go │ │ ├── build.go │ │ ├── discover.go │ │ ├── doc.go │ │ ├── help.go │ │ ├── manifest.go │ │ ├── validate.go │ │ └── version.go │ │ ├── build.sh │ │ ├── discovery │ │ ├── discovery.go │ │ ├── doc.go │ │ ├── http.go │ │ └── parse.go │ │ ├── examples │ │ ├── image.json │ │ ├── pod_runtime.json │ │ └── pod_template.json │ │ ├── glide.lock │ │ ├── glide.yaml │ │ ├── logos │ │ ├── appc-horizontal-black.png │ │ ├── appc-horizontal-black.svg │ │ ├── appc-horizontal-color.png │ │ ├── appc-horizontal-color.svg │ │ ├── appc-horizontal-white.png │ │ ├── appc-stacked-black.png │ │ ├── appc-stacked-black.svg │ │ ├── appc-stacked-color.png │ │ ├── appc-stacked-color.svg │ │ └── appc-stacked-white.svg │ │ ├── pkg │ │ ├── acirenderer │ │ │ ├── acirenderer.go │ │ │ └── resolve.go │ │ ├── device │ │ │ ├── device_linux.go │ │ │ └── device_posix.go │ │ └── tarheader │ │ │ ├── doc.go │ │ │ ├── pop_darwin.go │ │ │ ├── pop_linux.go │ │ │ ├── pop_posix.go │ │ │ └── tarheader.go │ │ ├── schema │ │ ├── common │ │ │ └── common.go │ │ ├── doc.go │ │ ├── image.go │ │ ├── kind.go │ │ ├── lastditch │ │ │ ├── doc.go │ │ │ ├── image.go │ │ │ ├── labels.go │ │ │ └── pod.go │ │ ├── pod.go │ │ ├── types │ │ │ ├── acidentifier.go │ │ │ ├── ackind.go │ │ │ ├── acname.go │ │ │ ├── annotations.go │ │ │ ├── app.go │ │ │ ├── date.go │ │ │ ├── dependencies.go │ │ │ ├── doc.go │ │ │ ├── environment.go │ │ │ ├── errors.go │ │ │ ├── event_handler.go │ │ │ ├── exec.go │ │ │ ├── hash.go │ │ │ ├── isolator.go │ │ │ ├── isolator_linux_specific.go │ │ │ ├── isolator_resources.go │ │ │ ├── isolator_unix.go │ │ │ ├── labels.go │ │ │ ├── mountpoint.go │ │ │ ├── port.go │ │ │ ├── semver.go │ │ │ ├── url.go │ │ │ ├── uuid.go │ │ │ └── volume.go │ │ └── version.go │ │ ├── scripts │ │ ├── build-ace-validator-acis │ │ ├── build-release │ │ ├── bump-release │ │ └── glide-update │ │ ├── spec │ │ ├── OS-SPEC.md │ │ ├── ace.md │ │ ├── aci.md │ │ ├── discovery.md │ │ ├── pods.md │ │ └── types.md │ │ ├── test.sh │ │ └── vendor │ │ ├── github.com │ │ ├── coreos │ │ │ └── go-semver │ │ │ │ ├── LICENSE │ │ │ │ ├── example.go │ │ │ │ └── semver │ │ │ │ ├── semver.go │ │ │ │ └── sort.go │ │ ├── gogo │ │ │ └── protobuf │ │ │ │ ├── LICENSE │ │ │ │ └── proto │ │ │ │ ├── clone.go │ │ │ │ ├── decode.go │ │ │ │ ├── decode_gogo.go │ │ │ │ ├── encode.go │ │ │ │ ├── encode_gogo.go │ │ │ │ ├── equal.go │ │ │ │ ├── extensions.go │ │ │ │ ├── extensions_gogo.go │ │ │ │ ├── lib.go │ │ │ │ ├── lib_gogo.go │ │ │ │ ├── message_set.go │ │ │ │ ├── pointer_reflect.go │ │ │ │ ├── pointer_unsafe.go │ │ │ │ ├── pointer_unsafe_gogo.go │ │ │ │ ├── properties.go │ │ │ │ ├── properties_gogo.go │ │ │ │ ├── skip_gogo.go │ │ │ │ ├── text.go │ │ │ │ ├── text_gogo.go │ │ │ │ └── text_parser.go │ │ └── spf13 │ │ │ └── pflag │ │ │ ├── LICENSE │ │ │ └── flag.go │ │ ├── go4.org │ │ ├── LICENSE │ │ └── errorutil │ │ │ └── highlight.go │ │ ├── golang.org │ │ └── x │ │ │ └── net │ │ │ ├── LICENSE │ │ │ ├── PATENTS │ │ │ └── html │ │ │ ├── atom │ │ │ ├── atom.go │ │ │ ├── gen.go │ │ │ └── table.go │ │ │ ├── const.go │ │ │ ├── doc.go │ │ │ ├── doctype.go │ │ │ ├── entity.go │ │ │ ├── escape.go │ │ │ ├── foreign.go │ │ │ ├── node.go │ │ │ ├── parse.go │ │ │ ├── render.go │ │ │ └── token.go │ │ ├── gopkg.in │ │ └── inf.v0 │ │ │ ├── LICENSE │ │ │ ├── dec.go │ │ │ └── rounder.go │ │ └── k8s.io │ │ └── kubernetes │ │ ├── LICENSE │ │ ├── pkg │ │ ├── api │ │ │ └── resource │ │ │ │ ├── amount.go │ │ │ │ ├── deep_copy.go │ │ │ │ ├── generated.pb.go │ │ │ │ ├── math.go │ │ │ │ ├── quantity.go │ │ │ │ ├── quantity_proto.go │ │ │ │ ├── scale_int.go │ │ │ │ └── suffix.go │ │ └── conversion │ │ │ ├── cloner.go │ │ │ ├── converter.go │ │ │ ├── deep_equal.go │ │ │ ├── doc.go │ │ │ └── helper.go │ │ └── third_party │ │ └── forked │ │ └── reflect │ │ ├── LICENSE │ │ └── deep_equal.go ├── coreos │ ├── go-semver │ │ ├── LICENSE │ │ └── semver │ │ │ ├── semver.go │ │ │ └── sort.go │ └── ioprogress │ │ ├── LICENSE │ │ ├── README.md │ │ ├── draw.go │ │ └── reader.go ├── emicklei │ └── go-restful │ │ ├── CHANGES.md │ │ ├── LICENSE │ │ ├── README.md │ │ ├── Srcfile │ │ ├── bench_test.sh │ │ ├── compress.go │ │ ├── compressor_cache.go │ │ ├── compressor_pools.go │ │ ├── compressors.go │ │ ├── constants.go │ │ ├── container.go │ │ ├── cors_filter.go │ │ ├── coverage.sh │ │ ├── curly.go │ │ ├── curly_route.go │ │ ├── doc.go │ │ ├── entity_accessors.go │ │ ├── filter.go │ │ ├── install.sh │ │ ├── jsr311.go │ │ ├── log │ │ └── log.go │ │ ├── logger.go │ │ ├── mime.go │ │ ├── options_filter.go │ │ ├── parameter.go │ │ ├── path_expression.go │ │ ├── request.go │ │ ├── response.go │ │ ├── route.go │ │ ├── route_builder.go │ │ ├── router.go │ │ ├── service_error.go │ │ ├── web_service.go │ │ └── web_service_container.go ├── go-openapi │ ├── jsonpointer │ │ ├── CODE_OF_CONDUCT.md │ │ ├── LICENSE │ │ ├── README.md │ │ └── pointer.go │ ├── jsonreference │ │ ├── CODE_OF_CONDUCT.md │ │ ├── LICENSE │ │ ├── README.md │ │ └── reference.go │ ├── spec │ │ ├── CODE_OF_CONDUCT.md │ │ ├── LICENSE │ │ ├── README.md │ │ ├── bindata.go │ │ ├── contact_info.go │ │ ├── debug.test │ │ ├── expander.go │ │ ├── external_docs.go │ │ ├── header.go │ │ ├── info.go │ │ ├── items.go │ │ ├── license.go │ │ ├── operation.go │ │ ├── parameter.go │ │ ├── path_item.go │ │ ├── paths.go │ │ ├── ref.go │ │ ├── response.go │ │ ├── responses.go │ │ ├── schema.go │ │ ├── security_scheme.go │ │ ├── spec.go │ │ ├── swagger.go │ │ ├── tag.go │ │ └── xml_object.go │ └── swag │ │ ├── CODE_OF_CONDUCT.md │ │ ├── LICENSE │ │ ├── README.md │ │ ├── convert.go │ │ ├── convert_types.go │ │ ├── json.go │ │ ├── loading.go │ │ ├── net.go │ │ ├── path.go │ │ └── util.go ├── gogo │ └── protobuf │ │ ├── LICENSE │ │ └── proto │ │ ├── Makefile │ │ ├── clone.go │ │ ├── decode.go │ │ ├── decode_gogo.go │ │ ├── duration.go │ │ ├── duration_gogo.go │ │ ├── encode.go │ │ ├── encode_gogo.go │ │ ├── equal.go │ │ ├── extensions.go │ │ ├── extensions_gogo.go │ │ ├── lib.go │ │ ├── lib_gogo.go │ │ ├── message_set.go │ │ ├── pointer_reflect.go │ │ ├── pointer_unsafe.go │ │ ├── pointer_unsafe_gogo.go │ │ ├── properties.go │ │ ├── properties_gogo.go │ │ ├── skip_gogo.go │ │ ├── text.go │ │ ├── text_gogo.go │ │ ├── text_parser.go │ │ ├── timestamp.go │ │ └── timestamp_gogo.go ├── hashicorp │ ├── errwrap │ │ ├── LICENSE │ │ ├── README.md │ │ └── errwrap.go │ └── go-multierror │ │ ├── LICENSE │ │ ├── Makefile │ │ ├── README.md │ │ ├── append.go │ │ ├── flatten.go │ │ ├── format.go │ │ ├── multierror.go │ │ └── prefix.go ├── juju │ └── errors │ │ ├── LICENSE │ │ ├── Makefile │ │ ├── README.md │ │ ├── doc.go │ │ ├── error.go │ │ ├── errortypes.go │ │ ├── functions.go │ │ └── path.go ├── magiconair │ └── properties │ │ ├── CHANGELOG.md │ │ ├── LICENSE │ │ ├── README.md │ │ ├── _third_party │ │ └── gopkg.in │ │ │ └── check.v1 │ │ │ ├── LICENSE │ │ │ ├── README.md │ │ │ ├── TODO │ │ │ ├── benchmark.go │ │ │ ├── benchmark_test.go │ │ │ ├── bootstrap_test.go │ │ │ ├── check.go │ │ │ ├── check_test.go │ │ │ ├── checkers.go │ │ │ ├── checkers_test.go │ │ │ ├── export_test.go │ │ │ ├── fixture_test.go │ │ │ ├── foundation_test.go │ │ │ ├── helpers.go │ │ │ ├── helpers_test.go │ │ │ ├── printer.go │ │ │ ├── printer_test.go │ │ │ ├── run.go │ │ │ └── run_test.go │ │ ├── decode.go │ │ ├── doc.go │ │ ├── integrate.go │ │ ├── lex.go │ │ ├── load.go │ │ ├── parser.go │ │ ├── properties.go │ │ └── rangecheck.go ├── mailru │ └── easyjson │ │ ├── LICENSE │ │ ├── buffer │ │ └── pool.go │ │ ├── jlexer │ │ ├── error.go │ │ └── lexer.go │ │ └── jwriter │ │ └── writer.go ├── mattrobenolt │ └── size │ │ ├── LICENSE │ │ ├── README.rst │ │ └── size.go ├── mgutz │ └── ansi │ │ ├── LICENSE │ │ ├── README.md │ │ ├── ansi.go │ │ ├── doc.go │ │ └── print.go ├── pborman │ └── uuid │ │ ├── CONTRIBUTING.md │ │ ├── CONTRIBUTORS │ │ ├── LICENSE │ │ ├── README.md │ │ ├── dce.go │ │ ├── doc.go │ │ ├── hash.go │ │ ├── json.go │ │ ├── node.go │ │ ├── sql.go │ │ ├── time.go │ │ ├── util.go │ │ ├── uuid.go │ │ ├── version1.go │ │ └── version4.go └── spf13 │ └── pflag │ ├── LICENSE │ ├── README.md │ ├── bool.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 │ ├── ipmask.go │ ├── ipnet.go │ ├── string.go │ ├── string_array.go │ ├── string_slice.go │ ├── uint.go │ ├── uint16.go │ ├── uint32.go │ ├── uint64.go │ └── uint8.go ├── go4.org ├── LICENSE └── errorutil │ └── highlight.go ├── golang.org └── x │ ├── crypto │ ├── AUTHORS │ ├── CONTRIBUTING.md │ ├── CONTRIBUTORS │ ├── LICENSE │ ├── PATENTS │ ├── README │ ├── cast5 │ │ └── cast5.go │ ├── codereview.cfg │ ├── openpgp │ │ ├── armor │ │ │ ├── armor.go │ │ │ └── encode.go │ │ ├── canonical_text.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 │ ├── sha3 │ │ └── testdata │ │ │ └── keccakKats.json.deflate │ └── ssh │ │ ├── terminal │ │ ├── terminal.go │ │ ├── util.go │ │ ├── util_bsd.go │ │ ├── util_linux.go │ │ ├── util_plan9.go │ │ ├── util_solaris.go │ │ └── util_windows.go │ │ └── testdata │ │ ├── doc.go │ │ └── keys.go │ ├── net │ ├── LICENSE │ ├── PATENTS │ ├── html │ │ ├── atom │ │ │ ├── atom.go │ │ │ ├── gen.go │ │ │ └── table.go │ │ ├── const.go │ │ ├── doc.go │ │ ├── doctype.go │ │ ├── entity.go │ │ ├── escape.go │ │ ├── foreign.go │ │ ├── node.go │ │ ├── parse.go │ │ ├── render.go │ │ └── token.go │ └── idna │ │ ├── idna.go │ │ └── punycode.go │ ├── sys │ ├── LICENSE │ ├── PATENTS │ └── unix │ │ ├── asm.s │ │ ├── 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_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 │ │ ├── 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 │ │ ├── mkall.sh │ │ ├── mkerrors.sh │ │ ├── mkpost.go │ │ ├── mksyscall.pl │ │ ├── mksyscall_solaris.pl │ │ ├── mksysctl_openbsd.pl │ │ ├── mksysnum_darwin.pl │ │ ├── mksysnum_dragonfly.pl │ │ ├── mksysnum_freebsd.pl │ │ ├── mksysnum_linux.pl │ │ ├── mksysnum_netbsd.pl │ │ ├── mksysnum_openbsd.pl │ │ ├── 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_arm.go │ │ ├── syscall_linux_arm64.go │ │ ├── syscall_linux_mips64x.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 │ │ ├── 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_mips64.go │ │ ├── zerrors_linux_mips64le.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_mips64.go │ │ ├── zsyscall_linux_mips64le.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_mips64.go │ │ ├── zsysnum_linux_mips64le.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_mips64.go │ │ ├── ztypes_linux_mips64le.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 │ ├── LICENSE │ ├── PATENTS │ ├── cases │ ├── cases.go │ ├── context.go │ ├── fold.go │ ├── gen.go │ ├── gen_trieval.go │ ├── icu.go │ ├── info.go │ ├── map.go │ ├── tables.go │ └── trieval.go │ ├── internal │ ├── gen.go │ ├── gen │ │ ├── code.go │ │ └── gen.go │ ├── internal.go │ ├── match.go │ ├── tables.go │ ├── tag │ │ └── tag.go │ ├── triegen │ │ ├── compact.go │ │ ├── print.go │ │ └── triegen.go │ └── ucd │ │ └── ucd.go │ ├── language │ ├── Makefile │ ├── common.go │ ├── coverage.go │ ├── gen_common.go │ ├── gen_index.go │ ├── go1_1.go │ ├── go1_2.go │ ├── index.go │ ├── language.go │ ├── lookup.go │ ├── maketables.go │ ├── match.go │ ├── parse.go │ ├── tables.go │ └── tags.go │ ├── runes │ ├── cond.go │ └── runes.go │ ├── secure │ ├── bidirule │ │ └── bidirule.go │ └── precis │ │ ├── class.go │ │ ├── context.go │ │ ├── doc.go │ │ ├── gen.go │ │ ├── gen_trieval.go │ │ ├── nickname.go │ │ ├── options.go │ │ ├── profile.go │ │ ├── profiles.go │ │ ├── tables.go │ │ ├── transformer.go │ │ └── trieval.go │ ├── transform │ └── transform.go │ ├── unicode │ ├── bidi │ │ ├── bidi.go │ │ ├── bracket.go │ │ ├── core.go │ │ ├── gen.go │ │ ├── gen_ranges.go │ │ ├── gen_trieval.go │ │ ├── prop.go │ │ ├── tables.go │ │ └── trieval.go │ ├── cldr │ │ ├── base.go │ │ ├── cldr.go │ │ ├── collate.go │ │ ├── decode.go │ │ ├── makexml.go │ │ ├── resolve.go │ │ ├── slice.go │ │ └── xml.go │ ├── norm │ │ ├── composition.go │ │ ├── forminfo.go │ │ ├── input.go │ │ ├── iter.go │ │ ├── maketables.go │ │ ├── normalize.go │ │ ├── readwriter.go │ │ ├── tables.go │ │ ├── transform.go │ │ ├── trie.go │ │ └── triegen.go │ └── rangetable │ │ ├── gen.go │ │ ├── merge.go │ │ ├── rangetable.go │ │ └── tables.go │ └── width │ ├── gen.go │ ├── gen_common.go │ ├── gen_trieval.go │ ├── kind_string.go │ ├── tables.go │ ├── transform.go │ ├── trieval.go │ └── width.go ├── gopkg.in └── inf.v0 │ ├── LICENSE │ ├── dec.go │ └── rounder.go ├── k8s.io └── kubernetes │ ├── LICENSE │ ├── pkg │ ├── api │ │ └── resource │ │ │ ├── amount.go │ │ │ ├── generated.pb.go │ │ │ ├── generated.proto │ │ │ ├── math.go │ │ │ ├── quantity.go │ │ │ ├── quantity_proto.go │ │ │ ├── scale_int.go │ │ │ └── suffix.go │ ├── conversion │ │ ├── OWNERS │ │ ├── cloner.go │ │ ├── converter.go │ │ ├── deep_equal.go │ │ ├── doc.go │ │ └── helper.go │ └── genericapiserver │ │ └── openapi │ │ └── common │ │ ├── common.go │ │ └── doc.go │ └── third_party │ └── forked │ └── golang │ ├── LICENSE │ ├── PATENTS │ └── reflect │ ├── deep_equal.go │ └── type.go └── vendor.json /.gitignore: -------------------------------------------------------------------------------- 1 | .fuse* 2 | /tmp 3 | /jetpack.conf 4 | /.vagrant 5 | /bin 6 | /gopath 7 | /vendor/github.com/appc/spec/bin 8 | /vendor/github.com/appc/spec/gopath 9 | -------------------------------------------------------------------------------- /.proverc: -------------------------------------------------------------------------------- 1 | -It/lib 2 | -------------------------------------------------------------------------------- /Vagrantfile: -------------------------------------------------------------------------------- 1 | # -*- mode: ruby; -*- 2 | Vagrant.configure("2") do |config| 3 | config.vm.guest = :freebsd 4 | config.vm.box_url = "http://opscode-vm-bento.s3.amazonaws.com/vagrant/virtualbox/opscode_freebsd-10.1_chef-provisionerless.box" 5 | config.vm.box = "opscode_freebsd-10.1_chef-provisionerless.box" 6 | # private network em1 for nfs mount 7 | config.vm.network "private_network", ip: "10.0.1.10" 8 | config.ssh.shell = "/bin/sh" 9 | # Use NFS as a shared folder 10 | config.vm.synced_folder ".", "/vagrant", :nfs => true, id: "vagrant-root" 11 | 12 | config.vm.provider :virtualbox do |vb| 13 | vb.customize ["modifyvm", :id, "--memory", "512"] 14 | vb.customize ["modifyvm", :id, "--cpus", "2"] 15 | vb.customize ["modifyvm", :id, "--hwvirtex", "on"] 16 | vb.customize ["modifyvm", :id, "--audio", "none"] 17 | vb.customize ["modifyvm", :id, "--nictype1", "virtio"] 18 | vb.customize ["modifyvm", :id, "--nictype2", "virtio"] 19 | #vb.gui = true 20 | end 21 | 22 | config.vm.provision "ansible" do |ansible| 23 | ansible.playbook = "contrib/ansible/vagrant-playbook.yml" 24 | ansible.sudo = true 25 | ansible.verbose = 'v' 26 | end 27 | 28 | 29 | end 30 | -------------------------------------------------------------------------------- /cmd/jetpack/flags.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "flag" 5 | "fmt" 6 | 7 | "github.com/appc/spec/schema" 8 | 9 | "github.com/3ofcoins/jetpack/lib/acutil" 10 | ) 11 | 12 | // Custom flag types 13 | 14 | type sliceFlag []string 15 | 16 | func (sf *sliceFlag) String() string { 17 | return fmt.Sprintf("%v", *sf) 18 | } 19 | 20 | func (sf *sliceFlag) Set(v string) error { 21 | *sf = append(*sf, v) 22 | return nil 23 | } 24 | 25 | // Command line flags used by different commands 26 | 27 | var SaveID string 28 | 29 | func SaveIDFlag(fl *flag.FlagSet) { 30 | fl.StringVar(&SaveID, "saveid", "", "Save ID to file") 31 | } 32 | 33 | var Quiet bool 34 | 35 | func QuietFlag(fl *flag.FlagSet, desc string) { 36 | fl.BoolVar(&Quiet, "q", false, fmt.Sprintf("quiet (%v)", desc)) 37 | } 38 | 39 | var thePodManifest = schema.BlankPodManifest() 40 | 41 | func flPodManifest(fl *flag.FlagSet) { 42 | acutil.PodManifestFlags(fl, thePodManifest) 43 | } 44 | -------------------------------------------------------------------------------- /cmd/jetpack/help.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "flag" 5 | "fmt" 6 | "os" 7 | 8 | "github.com/3ofcoins/jetpack/lib/jetpack" 9 | ) 10 | 11 | func init() { 12 | AddCommand("help [COMMAND]", "Show help", cmdHelp, nil) 13 | AddCommand("version", "Show jetpack version", cmdVersion, nil) 14 | } 15 | 16 | func cmdHelp(args []string) error { 17 | switch len(args) { 18 | case 0: 19 | Help() 20 | return nil 21 | case 1: 22 | if cmd := Commands[args[0]]; cmd != nil { 23 | cmd.Help() 24 | return nil 25 | } 26 | return ErrUsage 27 | default: 28 | return ErrUsage 29 | } 30 | } 31 | 32 | func cmdVersion([]string) error { 33 | fmt.Println(jetpack.Version()) 34 | return nil 35 | } 36 | 37 | func Help() { 38 | fmt.Fprintf(os.Stderr, "Jetpack version %v\nUsage: %v [OPTION...] COMMAND [ARGS...]\nCommands:\n", jetpack.Version(), AppName) 39 | 40 | cmds := make([][]string, 0, len(Commands)) 41 | for _, cmd := range Commands { 42 | cmds = append(cmds, []string{"", AppName + " " + cmd.Usage, cmd.Synopsis}) 43 | } 44 | doListF(os.Stderr, "", cmds) 45 | 46 | fmt.Fprintln(os.Stderr, "Global options:") 47 | flag.PrintDefaults() 48 | } 49 | -------------------------------------------------------------------------------- /cmd/jetpack/host.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "fmt" 5 | "sort" 6 | "strings" 7 | 8 | "github.com/juju/errors" 9 | 10 | "github.com/3ofcoins/jetpack/lib/jetpack" 11 | ) 12 | 13 | func init() { 14 | AddCommand("init", "Initialize host", cmdWrapErr(cmdInit), nil) 15 | AddCommand("config [VAR...]", "Show configuration", cmdConfig, nil) 16 | } 17 | 18 | func cmdConfig(args []string) error { 19 | if len(args) == 0 { 20 | lines := strings.Split(jetpack.Config().String(), "\n") 21 | sort.Strings(lines) 22 | fmt.Println(strings.Join(lines[1:], "\n")) // first "line" is empty due to trailing newline 23 | } else { 24 | for _, propName := range args { 25 | if val, ok := jetpack.Config().Get(propName); ok { 26 | fmt.Println(val) 27 | } else { 28 | return errors.Errorf("No such property: %v", propName) 29 | } 30 | } 31 | } 32 | return nil 33 | } 34 | 35 | func cmdInit() error { 36 | return Host.Initialize() 37 | } 38 | -------------------------------------------------------------------------------- /cmd/jetpack/main.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "flag" 5 | "fmt" 6 | "os" 7 | 8 | "github.com/juju/errors" 9 | 10 | "github.com/3ofcoins/jetpack/lib/jetpack" 11 | ) 12 | 13 | const AppName = "jetpack" 14 | 15 | // Die on error 16 | func Die(err error) { 17 | if err != nil { 18 | fmt.Fprintln(os.Stderr, errors.ErrorStack(err)) 19 | os.Exit(1) 20 | } 21 | } 22 | 23 | var Host *jetpack.Host 24 | 25 | func main() { 26 | flag.Parse() 27 | 28 | if h, err := jetpack.NewHost(); err != nil { 29 | Die(err) 30 | } else { 31 | Host = h 32 | } 33 | 34 | if args := flag.Args(); len(args) == 0 { 35 | Help() 36 | } else if cmd, ok := Commands[args[0]]; ok { 37 | Die(cmd.Run(args[1:])) 38 | } else { 39 | Help() 40 | os.Exit(1) 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /cmd/jetpack/mds.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import "fmt" 4 | 5 | // FIXME: THE WHOLE THING 6 | 7 | func init() { 8 | AddCommand("mds", "Check metadata service process", cmdMds, nil) 9 | } 10 | 11 | func cmdMds(args []string) error { 12 | if mdsi, err := Host.CheckMDS(); err != nil && mdsi == nil { 13 | fmt.Println("Could not find metadata service:", err) 14 | return err 15 | } else if err != nil { 16 | fmt.Printf("Metadata service ERROR (%v): %v\n", err, mdsi) 17 | return err 18 | } else { 19 | fmt.Println("Metadata service OK:", mdsi) 20 | return nil 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /contrib/ansible/etc/pf.conf: -------------------------------------------------------------------------------- 1 | ext_if="em0" 2 | set skip on lo0 3 | # scrub in all 4 | 5 | nat on $ext_if from lo1:network to any -> $ext_if 6 | 7 | pass all 8 | -------------------------------------------------------------------------------- /contrib/ansible/group_vars/all.yml: -------------------------------------------------------------------------------- 1 | --- 2 | # Variables listed here are applicable to all host groups. 3 | 4 | ansible_python_interpreter: /usr/local/bin/python2 5 | -------------------------------------------------------------------------------- /contrib/ansible/tasks/dependencies.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: update packages 3 | command: "pkg update" 4 | 5 | - name: upgrade pkg 6 | command: "pkg install -f -y pkg" 7 | 8 | - name: ensure dependencies are installed. 9 | pkgng: name={{item}} state=present cached=no 10 | with_items: 11 | - git 12 | - lang/go 13 | -------------------------------------------------------------------------------- /contrib/ansible/tasks/networking.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: cloned interface lo1 3 | action: command sysrc cloned_interfaces=lo1 4 | 5 | - name: ipv4 addresses for lo1 6 | action: command sysrc ipv4_addrs_lo1=172.23.0.1/16 7 | 8 | - name: start lo1 9 | action: command service netif start lo1 10 | register: command_result 11 | failed_when: "'172.23.0.1' not in command_result.stdout" 12 | -------------------------------------------------------------------------------- /contrib/ansible/tasks/pf.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: enable pf 3 | action: command sysrc pf_enable=YES 4 | 5 | - name: copy pf.conf 6 | copy: src=etc/pf.conf dest="/etc/pf.conf" 7 | notify: 8 | - restart pf 9 | -------------------------------------------------------------------------------- /contrib/ansible/usr/local/etc/jetpack.conf.j2: -------------------------------------------------------------------------------- 1 | mds.signing-key = {{ jetpack_mds_signing_key.stdout }} 2 | -------------------------------------------------------------------------------- /contrib/port/.gitignore: -------------------------------------------------------------------------------- 1 | /work 2 | -------------------------------------------------------------------------------- /contrib/port/GIDs: -------------------------------------------------------------------------------- 1 | _jetpack:*:906: 2 | -------------------------------------------------------------------------------- /contrib/port/Makefile: -------------------------------------------------------------------------------- 1 | # Created by: Maciej Pasternacki 2 | # $FreeBSD$ 3 | 4 | PORTNAME= jetpack 5 | PORTVERSION= 0.0.1.20161011 6 | CATEGORIES= sysutils 7 | 8 | MAINTAINER= maciej@3ofcoins.net 9 | COMMENT= App Container runtime 10 | 11 | LICENSE= BSD3CLAUSE 12 | 13 | BUILD_DEPENDS= go>=1.6:lang/go 14 | 15 | USE_GITHUB= yes 16 | GH_ACCOUNT= 3ofcoins 17 | GH_TAGNAME= 96a9629 18 | 19 | USERS= _jetpack 20 | GROUPS= _jetpack 21 | USE_RC_SUBR= jetpack_mds 22 | 23 | UID_FILES+= ${MASTERDIR}/UIDs 24 | GID_FILES+= ${MASTERDIR}/GIDs 25 | 26 | MAKE_ARGS= prefix=${LOCALBASE} 27 | USES= compiler 28 | 29 | .include 30 | 31 | # golang assumes that if clang is in use, it is called "clang" and not "cc". If 32 | # it's called "cc", go fails. 33 | .if ${COMPILER_TYPE} == clang 34 | CC= clang 35 | .endif 36 | 37 | .include 38 | -------------------------------------------------------------------------------- /contrib/port/UIDs: -------------------------------------------------------------------------------- 1 | _jetpack:*:906:906::0:0:Jetpack Metadata Service:/var/jetpack:/usr/sbin/nologin 2 | -------------------------------------------------------------------------------- /contrib/port/distinfo: -------------------------------------------------------------------------------- 1 | SHA256 (3ofcoins-jetpack-0.0.1.20161011-96a9629_GH0.tar.gz) = 31ca76df3ff18aebc8a543da28f4074ae20c25702c4d97cf45949a5469487688 2 | SIZE (3ofcoins-jetpack-0.0.1.20161011-96a9629_GH0.tar.gz) = 4521053 3 | -------------------------------------------------------------------------------- /contrib/port/files/jetpack_mds.in: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # $FreeBSD$ 4 | # 5 | # PROVIDE: jetpack_mds 6 | # REQUIRE: LOGIN 7 | # KEYWORD: shutdown 8 | # 9 | # Add these lines to /etc/rc.conf.local or /etc/rc.conf 10 | # to enable this service: 11 | # 12 | # jetpack_mds_enable (bool): Set to NO by default. 13 | # Set it to YES to enable Jetpack metadata service. 14 | 15 | . /etc/rc.subr 16 | 17 | name=jetpack_mds 18 | rcvar=jetpack_mds_enable 19 | desc="Jetpack metadata service" 20 | 21 | load_rc_config $name 22 | 23 | : ${jetpack_mds_enable:=NO} 24 | : ${jetpack_conf="%%PREFIX%%/etc/jetpack.conf"} 25 | : ${jetpack_mds_conf="${jetpack_conf}"} 26 | 27 | procname="%%PREFIX%%/libexec/jetpack/mds" 28 | command=/usr/sbin/daemon 29 | pidfile=/var/run/${name}.pid 30 | logfile=/var/log/${name}.log 31 | 32 | command_args="-c -f ${procname} -config=${jetpack_mds_conf} -o mds.pidfile=$pidfile -o mds.logfile=$logfile ${jetpack_opts} ${jetpack_mds_opts}" 33 | 34 | run_rc_command "$1" 35 | -------------------------------------------------------------------------------- /contrib/port/pkg-descr: -------------------------------------------------------------------------------- 1 | Jetpack is an implementation of the App Container Specification for 2 | FreeBSD, using jails for isolation and ZFS for layered storage. 3 | -------------------------------------------------------------------------------- /contrib/port/pkg-plist: -------------------------------------------------------------------------------- 1 | bin/jetpack 2 | etc/jetpack.conf.sample 3 | libexec/jetpack/mds 4 | libexec/jetpack/stage2 5 | %%DATADIR%%/jetpack.image.mk 6 | %%DATADIR%%/makeaci.sh 7 | man/man5/jetpack.conf.5 8 | -------------------------------------------------------------------------------- /images/.gitignore: -------------------------------------------------------------------------------- 1 | *.aci 2 | *.aci.id 3 | -------------------------------------------------------------------------------- /images/debootstrap/.gitignore: -------------------------------------------------------------------------------- 1 | /rootfs.* 2 | /manifest.*.json 3 | -------------------------------------------------------------------------------- /images/debootstrap/Makefile: -------------------------------------------------------------------------------- 1 | .MAKEFLAGS: -I${../../share:L:tA} 2 | 3 | SUITE ?= wheezy 4 | IMPORT_FILE = rootfs.${SUITE}.txz 5 | IMPORT_MANIFEST = manifest.${SUITE}.json 6 | 7 | ${IMPORT_MANIFEST}: ${IMPORT_FILE} manifest.json.sh 8 | ./manifest.json.sh ${SUITE} > $@ 9 | 10 | CLEAN_FILES = rootfs.*.txz manifest.*.json 11 | 12 | .include "jetpack.image.mk" 13 | -------------------------------------------------------------------------------- /images/debootstrap/README.md: -------------------------------------------------------------------------------- 1 | Debootstrapped Linux Images 2 | =========================== 3 | 4 | Jetpack runs 32-bit Linux images, using Linux emulation layer. To 5 | build the images: 6 | 7 | 1. On an x86 or x86_64 Linux, run `./debootstrap.sh CODENAME`, where 8 | `CODENAME` is a Debian or Ubuntu release codename; tested so far on 9 | wheezy (Debian 7) and Precise (Ubuntu 12.04). 10 | 2. Copy the resulting `rootfs.CODENAME.txz` file to the build 11 | directory on FreeBSD with installed Jetpack. 12 | 3. Run `make SUITE=CODENAME` to build the image. 13 | -------------------------------------------------------------------------------- /images/debootstrap/debootstrap.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -e 3 | suite="$1" 4 | mirror="$2" 5 | if [ -z "$2" ]; then 6 | case "$suite" in 7 | potato|woody|sarge|etch|lenny) 8 | mirror="http://archive.debian.org/debian-archive/debian/" 9 | ;; 10 | squeeze|wheezy|jessie) 11 | mirror="http://ftp2.de.debian.org/debian/" 12 | ;; 13 | warty|hoary|breezy|dapper|edgy|feisty|gutsy|hardy|intrepid|jaunty|karmic|lucid|maverick|natty|oneiric|precise|quantal|raring|saucy|trusty|utopic|vivid) 14 | mirror="http://archive.ubuntu.com/ubuntu/" 15 | ;; 16 | *) 17 | echo "Don't know the mirror for $suite" >&2 18 | exit 1 19 | esac 20 | fi 21 | 22 | set -x 23 | rm -rf rootfs.$suite 24 | debootstrap --arch=i386 --variant=minbase $suite ./rootfs.$suite $mirror 25 | tar -C rootfs.$suite -cJf rootfs.$suite.txz . 26 | rm -rf rootfs.$suite 27 | -------------------------------------------------------------------------------- /images/debootstrap/manifest.json.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -e 3 | 4 | distrib_id="debian" 5 | distrib_codename="$1" 6 | distrib_release="$(tar -xjOf "rootfs.${distrib_codename}.txz" ./etc/debian_version)" 7 | eval "$(tar -xJOf "rootfs.${distrib_codename}.txz" ./etc/lsb-release | tr A-Z a-z || :)" 8 | 9 | cat < $@ 10 | 11 | .include <${.jetpack.image.mk:U${${JETPACK:Ujetpack} config path.share:L:sh}/jetpack.image.mk}> 12 | -------------------------------------------------------------------------------- /images/example.nginx/manifest.json.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -e 3 | 4 | version="$(nginx -v 2>&1)" 5 | version="${version##* nginx/}" 6 | 7 | cat < 9 | -------------------------------------------------------------------------------- /images/example.showenv/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "example/showenv", 3 | "labels": [ 4 | { "name": "version", "value": "1.2.0" } 5 | ], 6 | "app": { 7 | "exec": [ 8 | "/usr/local/bin/showenv", 9 | "foo", 10 | "bar", 11 | "baz", 12 | "quux" 13 | ], 14 | "user": "games", 15 | "group": "guest", 16 | "eventHandlers": [ 17 | { "name": "pre-start", "exec": [ "/bin/sh", "-c", "id > /opt/data/pre-start-id.txt" ] }, 18 | { "name": "post-stop", "exec": [ "/bin/sh", "-c", "id > /opt/data/post-stop-id.txt" ] } 19 | ], 20 | "workingDirectory": "/opt/data", 21 | "mountPoints": [ 22 | {"name": "data", "path": "/opt/data"} 23 | ], 24 | "environment": [ 25 | {"name": "FOO", "value": "bar"}, 26 | {"name": "BAZ", "value": "quux"} 27 | ] 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /images/example.showenv/showenv.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -e 3 | 4 | cat < /opt/data/date.txt 16 | 17 | cat <" }, 14 | { "name": "homepage", "value": "https://github.com/3ofcoins/jetpack/" }, 15 | { "name": "created", "value": "$(TZ=UTC date +%FT%TZ)" } 16 | ] 17 | } 18 | EOF 19 | -------------------------------------------------------------------------------- /images/freebsd-base/manifest.json.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -e 3 | 4 | version="$(freebsd-version -u | sed -e 's/-[A-Z][A-Z]*-p/./' -e 's/-RELEASE$/.0/')" 5 | arch="$(uname -m)" 6 | 7 | cat < 5 | -------------------------------------------------------------------------------- /images/freebsd-current/manifest.json: -------------------------------------------------------------------------------- 1 | 2 | { 3 | "name": "freebsd-current", 4 | "labels": [ 5 | { "name": "version", "value": "11" }, 6 | { "name": "os", "value": "freebsd" }, 7 | { "name": "arch", "value": "amd64" } 8 | ] 9 | } 10 | -------------------------------------------------------------------------------- /images/minecraft-server/.gitignore: -------------------------------------------------------------------------------- 1 | minecraft*.jar 2 | -------------------------------------------------------------------------------- /images/minecraft-server/Makefile: -------------------------------------------------------------------------------- 1 | PARENT_IMAGE = 3ofcoins.net/freebsd-base 2 | 3 | SERVER_VERSION = 1.10.2 4 | SERVER_JAR = minecraft_server.${SERVER_VERSION}.jar 5 | SERVER_JAR_URL = https://s3.amazonaws.com/Minecraft.Download/versions/${SERVER_VERSION}/${SERVER_JAR} 6 | SERVER_JAR_SHA256 = 195f468227c5f9218f3919538b9b16ba34adced67fc7d7b652c508a5e8d07a21 7 | 8 | PKG_INSTALL = openjdk8 9 | 10 | prepare: ${SERVER_JAR} 11 | sha256 -c ${SERVER_JAR_SHA256} ${SERVER_JAR} 12 | 13 | ${SERVER_JAR}: 14 | fetch ${SERVER_JAR_URL} 15 | 16 | # build: 17 | 18 | build..pkg-install: build..pkg-latest 19 | build..pkg-latest: .PHONY 20 | sed -i~ s/quarterly/latest/g /etc/pkg/FreeBSD.conf 21 | rm /etc/pkg/FreeBSD.conf~ 22 | 23 | build: 24 | pw groupadd mcserver -g 199 25 | pw useradd mcserver -u 199 -g 199 -c 'Minecraft Server' -d /nonexistent -s /bin/sh 26 | install -d /opt/minecraft-server 27 | install ${SERVER_JAR} /opt/minecraft-server 28 | ln -sv ${SERVER_JAR} /opt/minecraft-server/minecraft-server.jar 29 | install -m 0755 pre-start.sh minecraft-server.sh /opt/minecraft-server 30 | for tgt in banned-ips.json banned-players.json ops.json usercache.json whitelist.json world logs debug server.properties ; do \ 31 | ln -sfv /vol/minecraft-server/$$tgt /opt/minecraft-server/$$tgt ; done 32 | install -d -o mcserver -g mcserver /vol/minecraft-server 33 | rm -rf /var/cache/pkg/* 34 | 35 | .include <${.jetpack.image.mk:U${${JETPACK:Ujetpack} config path.share:L:sh}/jetpack.image.mk}> 36 | -------------------------------------------------------------------------------- /images/minecraft-server/manifest.json: -------------------------------------------------------------------------------- 1 | { "acKind": "ImageManifest", "acVersion": "0.8.1", 2 | "name": "3ofcoins.net/minecraft-server", 3 | "labels": [ 4 | { "name": "version", "value": "1.10.2" } 5 | ], 6 | "app": { 7 | "exec": [ "/opt/minecraft-server/minecraft-server.sh" ], 8 | "user": "mcserver", 9 | "group": "mcserver", 10 | "workingDirectory": "/opt/minecraft-server", 11 | "eventHandlers": [ 12 | { "name": "pre-start", 13 | "exec": ["/opt/minecraft-server/pre-start.sh"] } 14 | ], 15 | "mountPoints": [{ "name": "data", "path": "/vol/minecraft-server" }], 16 | "ports": [{"name": "minecraft", "protocol": "tcp", "port": 25565, "count": 1, "socketActivated": false}] 17 | }, 18 | "annotations": [ 19 | {"name": "java-opts", "value": "-server -Djava.awt.headless=true -Xmx1024M -Xms1024M"}, 20 | {"name": "eula", "value": "false"} 21 | ] 22 | } 23 | -------------------------------------------------------------------------------- /images/minecraft-server/minecraft-server.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -x 3 | exec java $(ac-mdc app-annotation java-opts) -jar ./minecraft-server.jar 4 | -------------------------------------------------------------------------------- /images/minecraft-server/pre-start.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -e -x 3 | 4 | echo "eula=$(ac-mdc app-annotation eula)" > /opt/minecraft-server/eula.txt 5 | install -v -d -o mcserver -g mcserver /vol/minecraft-server /vol/minecraft-server/logs /vol/minecraft-server/world 6 | 7 | -------------------------------------------------------------------------------- /images/portbuilder/.gitignore: -------------------------------------------------------------------------------- 1 | /image.aci.id 2 | /image.aci 3 | -------------------------------------------------------------------------------- /images/portbuilder/Makefile: -------------------------------------------------------------------------------- 1 | PARENT_IMAGE = 3ofcoins.net/freebsd-base 2 | PKG_INSTALL = dialog4ports 3 | 4 | build: 5 | install -v -d /usr/ports /usr/ports.distfiles /usr/ports.wrkdir /usr/ports.packages /usr/local/bin 6 | install -v make.conf /etc/make.conf 7 | install -v -m 0755 portbuild.sh portbuild.pre-start.sh /usr/local/bin/ 8 | 9 | .include <${.jetpack.image.mk:U${${JETPACK:Ujetpack} config path.share:L:sh}/jetpack.image.mk}> 10 | -------------------------------------------------------------------------------- /images/portbuilder/README.md: -------------------------------------------------------------------------------- 1 | Clean Room Port Builder 2 | ======================= 3 | 4 | Mount `ports` tree (read-only), optionally `distfiles` dir (r/w), 5 | `packages` dir for dependency reuse (r/w), and `dbdir` for port 6 | options (`/var/db/ports`). Perform builds in a clean environment to 7 | catch missing dependencies. 8 | 9 | jetpack pod create -run \ 10 | -v ports:/usr/ports \ 11 | -v distfiles:/usr/ports/distfiles \ 12 | -v packages:/srv/portbuilder.packages \ 13 | 3ofcoins.net/port-builder \ 14 | -a port=graphics/imp 15 | 16 | Fix, retry from the failure: 17 | 18 | jetpack pod UUID run 19 | 20 | Poke around to make sure stuff works: 21 | 22 | jetpack pod UUID console 23 | -------------------------------------------------------------------------------- /images/portbuilder/make.conf: -------------------------------------------------------------------------------- 1 | WRKDIRPREFIX = /usr/ports.wrkdir 2 | DISTDIR = /usr/ports.distfiles 3 | PACKAGES = /usr/ports.packages 4 | 5 | DEVELOPER = 1 6 | USE_PACKAGE_DEPENDS = 1 7 | NO_DIALOG = 1 8 | -------------------------------------------------------------------------------- /images/portbuilder/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "acVersion": "0.6.1", 3 | "acKind": "ImageManifest", 4 | "name": "3ofcoins.net/port-builder", 5 | "labels": [ 6 | {"name": "version", "value": "0.0.20150705"} 7 | ], 8 | "app": { 9 | "exec": [ "/usr/local/bin/portbuild.sh" ], 10 | "user": "0", 11 | "group": "0", 12 | "eventHandlers": [ 13 | {"name": "pre-start", "exec": ["/usr/local/bin/portbuild.pre-start.sh"]} 14 | ], 15 | "mountPoints": [ 16 | { "name": "ports", "path": "/usr/ports", "readOnly": true }, 17 | { "name": "distfiles", "path": "/usr/ports.distfiles" }, 18 | { "name": "packages", "path": "/usr/ports.packages" }, 19 | { "name": "dbdir", "path": "/var/db/ports" } 20 | ] 21 | }, 22 | "annotations": [ 23 | { "name": "make", "value": "install" } 24 | ] 25 | } 26 | -------------------------------------------------------------------------------- /images/portbuilder/portbuild.pre-start.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -x 3 | /sbin/ldconfig 4 | -------------------------------------------------------------------------------- /images/portbuilder/portbuild.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -e 3 | portname="$(ac-mdc app-annotation port)" 4 | maketarget="$(ac-mdc app-annotation make)" 5 | exec /usr/bin/make -C "/usr/ports/${portname}" ${maketarget} 6 | -------------------------------------------------------------------------------- /images/ubuntu/.gitignore: -------------------------------------------------------------------------------- 1 | SHA256SUMS 2 | SHA256SUMS.gpg 3 | *-root.tar.gz 4 | build-info.txt 5 | *.manifest.json 6 | /appc-metadata-client 7 | -------------------------------------------------------------------------------- /images/ubuntu/manifest.json.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -e 3 | 4 | if [ $# -lt 3 ]; then 5 | echo "Usage: $0 RELEASE CODENAME ARCH" >&2 6 | exit 1 7 | fi 8 | 9 | test -f build-info.txt 10 | . ./build-info.txt 11 | 12 | cat <&2 5 | exit 1 6 | fi 7 | 8 | if ! which fakeroot >/dev/null ; then 9 | echo "Please install security/fakeroot to use this script" >&2 10 | exit 1 11 | fi 12 | 13 | pv=$(which pv || echo cat) 14 | tmpdir=$(mktemp -d ./makeaci.XXXXXXXX) 15 | savefile=${tmpdir}/fakeroot.save 16 | 17 | fr () 18 | { 19 | case $1 in 20 | [\<\>\|]*) 21 | suffix=" $1" 22 | shift 23 | ;; 24 | *) 25 | suffix="" 26 | esac 27 | 28 | echo "# $*$suffix" >&2 29 | if test -f ${savefile} ; then load="-i ${savefile}" ; else load='' ; fi 30 | fakeroot -s ${savefile} ${load} -- "${@}" 31 | } 32 | 33 | fr install -v -d -o 0 -g 0 -m 0755 $tmpdir/rootfs 34 | fr install -v -o 0 -g 0 -m 0444 $2 $tmpdir/manifest 35 | ${pv} "$1" | fr "< $1" tar -C $tmpdir/rootfs -xf - 36 | fr "| xz > $3" tar -C $tmpdir -cf - manifest rootfs | xz -z -c | ${pv} > "$3" 37 | 38 | rm -rf ${tmpdir} 39 | -------------------------------------------------------------------------------- /t/11_portbuilder_use.t: -------------------------------------------------------------------------------- 1 | # -*- cperl -*- 2 | 3 | use warnings; 4 | use strict; 5 | use autodie qw(:all); 6 | 7 | use File::Slurp; 8 | use File::Spec::Functions; 9 | 10 | use Test::Most tests => 5; 11 | use Test::Command; 12 | use Test::JetpackHelpers; 13 | 14 | # Check prerequisites 15 | die_on_fail; 16 | ok(-f '/usr/ports/misc/figlet/Makefile', "have ports tree"); 17 | run_command('jetpack', 'show-image', '3ofcoins.net/port-builder'); 18 | restore_fail; 19 | 20 | my $pkgdir = workdir('vol.packages'); 21 | my $idfile = catfile(workdir, "pod.id"); 22 | run_command 'jetpack', 'run', "-saveid=$idfile", 23 | '-v', 'ports:/usr/ports', 24 | '-v', 'distfiles:/usr/ports/distfiles', 25 | '-v', "packages:$pkgdir", 26 | '3ofcoins.net/port-builder', 27 | '-a', 'port=misc/figlet', 28 | '-a', 'make=package install'; 29 | 30 | chomp(my $pod = read_file($idfile)); 31 | 32 | ok(glob("$pkgdir/All/figlet-*.txz"), "figlet package has been built"); 33 | 34 | # TODO: { 35 | # local $TODO = '`jetpack enter` not implemented yet'; 36 | # my $cmdout = stdout_value run_command "jetpack", "enter", $pod, "figlet", "testink"; 37 | # ok($cmdout eq < 5; 7 | use Test::JetpackHelpers; 8 | 9 | use File::Spec::Functions; 10 | 11 | use constant APPC_SPEC_BIN => catfile(JETPACK_ROOT, "vendor/github.com/appc/spec/bin"); 12 | 13 | die_on_fail; 14 | 15 | for my $imgname ( qw(ace-validator-main ace-validator-sidekick) ) { 16 | my $aci = catfile(APPC_SPEC_BIN, "$imgname.aci"); 17 | ok(-f $aci, "have $imgname.aci"); 18 | destroy_images "coreos.com/$imgname"; 19 | run_command 'jetpack', 'import', $aci; 20 | } 21 | 22 | run_command(fixture("validate.sh")); 23 | -------------------------------------------------------------------------------- /t/20_volumes.t: -------------------------------------------------------------------------------- 1 | # -*- cperl -*- 2 | use warnings; 3 | use strict; 4 | use autodie qw(:all); 5 | 6 | use Test::Most tests => 2; 7 | use Test::JetpackHelpers; 8 | 9 | use File::Slurp; 10 | use File::Spec::Functions; 11 | 12 | die_on_fail; 13 | 14 | my $idfile = catfile(workdir, "pod.id"); 15 | 16 | run_command('jetpack', 'prepare', '-saveid', $idfile, '-f', fixture("pod-manifest.json")); 17 | chomp(my $pod = read_file($idfile)); 18 | run_command('jetpack', 'run', '-destroy', $pod); 19 | -------------------------------------------------------------------------------- /t/fixtures/20_process_mgmt.t/pod.json: -------------------------------------------------------------------------------- 1 | { "acKind": "PodManifest", "acVersion": "0.6.1", 2 | "apps": [ 3 | { "name": "three", 4 | "image": {"name": "3ofcoins.net/freebsd-base"}, 5 | "app": { 6 | "user": "0", 7 | "group": "0", 8 | "exec": [ "/bin/sh", "-c", "while true ; do date ; sleep 3 ; done" ] 9 | } 10 | }, 11 | { "name": "five", 12 | "image": {"name": "3ofcoins.net/freebsd-base"}, 13 | "app": { 14 | "user": "0", 15 | "group": "0", 16 | "exec": [ "/bin/sh", "-c", "while true ; do date ; sleep 5 ; done" ] 17 | } 18 | }, 19 | { "name": "seven", 20 | "image": {"name": "3ofcoins.net/freebsd-base"}, 21 | "app": { 22 | "user": "0", 23 | "group": "0", 24 | "exec": [ "/bin/sh", "-c", "while true ; do date ; sleep 7 ; done" ] 25 | } 26 | } 27 | ] 28 | } 29 | -------------------------------------------------------------------------------- /t/fixtures/20_validator.t/pod-manifest.json: -------------------------------------------------------------------------------- 1 | { "acKind": "PodManifest", "acVersion": "0.6.1", 2 | "apps": [ 3 | { "name": "ace-validator-main", 4 | "image": {"name": "coreos.com/ace-validator-main"}, 5 | "annotations": [ 6 | {"name": "created", "value": "2014-10-27T19:32:27.67021798Z"}, 7 | {"name": "authors", "value": "Carly Container , Nat Network "}, 8 | {"name": "homepage", "value": "https://github.com/containers/standard"}, 9 | {"name": "documentation", "value": "https://github.com/containers/standard/blob/master/README.md"}, 10 | {"name": "lorem", "value": "ipsum"}]}, 11 | { "name": "ace-validator-sidekick", 12 | "image": {"name": "coreos.com/ace-validator-sidekick"}} 13 | ], 14 | "annotations": [ 15 | {"name": "jetpack/jail.conf/enforce-statfs", "value": "1"} 16 | ]} 17 | -------------------------------------------------------------------------------- /t/fixtures/20_validator.t/run-validator.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -x 3 | 4 | jetpack run -app=ace-validator-sidekick $1 & 5 | skpid=$! 6 | sleep 0.5 7 | 8 | jetpack run -app=ace-validator-main $1 9 | mrv=$? 10 | 11 | wait $skpid 12 | skrv=$? 13 | 14 | exit $(($mrv+$skrv)) 15 | -------------------------------------------------------------------------------- /t/fixtures/20_validator.t/validate.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -x 3 | 4 | idfile="$(mktemp -t jetpack.validator)" 5 | valdir="$(dirname "$0")" 6 | 7 | # TODO: prepare vs run, accept all flags 8 | jetpack prepare -saveid="$idfile" -f "$valdir/pod-manifest.json" 9 | jetpack run -destroy `cat $idfile` 10 | -------------------------------------------------------------------------------- /t/fixtures/20_volumes.t/pod-manifest.json: -------------------------------------------------------------------------------- 1 | { "acKind": "PodManifest", "acVersion": "0.7.1", 2 | "apps": [ 3 | { "name": "main", 4 | "image": { "name": "3ofcoins.net/freebsd-base" }, 5 | "app": { 6 | "exec": [ 7 | "/bin/sh", "-e", "-x", "-c", 8 | "echo wat > /var/games/foo ; cat /var/cache/foo ; test \"$(cat /var/cache/foo)\" == wat ; echo OK"], 9 | "user": "0", "group": "0", 10 | "mountPoints": [{ "name": "games", 11 | "path": "/var/games" }] 12 | }, 13 | "mounts": [ 14 | { "volume": "vol", "path": "games" }, 15 | { "volume": "vol", "path": "/var/cache" } 16 | ] 17 | } 18 | ]} 19 | -------------------------------------------------------------------------------- /vendor/.gitignore: -------------------------------------------------------------------------------- 1 | /src/github.com/appc/spec/bin/ 2 | /src/github.com/appc/spec/gopath/ 3 | -------------------------------------------------------------------------------- /vendor/github.com/PuerkitoBio/urlesc/README.md: -------------------------------------------------------------------------------- 1 | urlesc [![Build Status](https://travis-ci.org/PuerkitoBio/urlesc.png?branch=master)](https://travis-ci.org/PuerkitoBio/urlesc) [![GoDoc](http://godoc.org/github.com/PuerkitoBio/urlesc?status.svg)](http://godoc.org/github.com/PuerkitoBio/urlesc) 2 | ====== 3 | 4 | Package urlesc implements query escaping as per RFC 3986. 5 | 6 | It contains some parts of the net/url package, modified so as to allow 7 | some reserved characters incorrectly escaped by net/url (see [issue 5684](https://github.com/golang/go/issues/5684)). 8 | 9 | ## Install 10 | 11 | go get github.com/PuerkitoBio/urlesc 12 | 13 | ## License 14 | 15 | Go license (BSD-3-Clause) 16 | 17 | -------------------------------------------------------------------------------- /vendor/github.com/appc/spec/MAINTAINERS: -------------------------------------------------------------------------------- 1 | Brandon Philips (@philips) 2 | Charles Aylward (@cdaylward) 3 | Jonathan Boulle (@jonboulle) 4 | Ken Robertson (@krobertson) 5 | Tim Hockin (@thockin) 6 | Vincent Batts (@vbatts) 7 | -------------------------------------------------------------------------------- /vendor/github.com/appc/spec/VERSION: -------------------------------------------------------------------------------- 1 | 0.8.7 2 | -------------------------------------------------------------------------------- /vendor/github.com/appc/spec/ace/doc.go: -------------------------------------------------------------------------------- 1 | // Copyright 2015 The appc Authors 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | 15 | // Package ace contains a tool intended to be run within an _Application 16 | // Container Executor_ to validate that the ACE has set up the container 17 | // environment correctly. This tool can be built into an ACI image ready for 18 | // running on an executor by using the `build_aci` script. 19 | package main 20 | -------------------------------------------------------------------------------- /vendor/github.com/appc/spec/ace/image_manifest_sidekick.json.in: -------------------------------------------------------------------------------- 1 | { 2 | "acVersion": "0.8.7", 3 | "acKind": "ImageManifest", 4 | "name": "coreos.com/ace-validator-sidekick", 5 | "labels": [ 6 | { "name": "version", "value": "0.8.7" }, 7 | { "name": "os", "value": "@GOOS@" }, 8 | { "name": "arch", "value": "@GOARCH@" } 9 | ], 10 | "app": { 11 | "exec": [ 12 | "/ace-validator", "sidekick" 13 | ], 14 | "user": "0", 15 | "group": "0", 16 | "mountPoints": [ 17 | { 18 | "name": "database", 19 | "path": "/db", 20 | "readOnly": false 21 | } 22 | ] 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /vendor/github.com/appc/spec/ace/os_default.go: -------------------------------------------------------------------------------- 1 | // Copyright 2015 The appc Authors 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | 15 | // +build !linux 16 | // +build !freebsd 17 | 18 | package main 19 | 20 | import ( 21 | "syscall" 22 | ) 23 | 24 | func isSameFilesystem(a, b *syscall.Statfs_t) bool { 25 | return a.Fsid == b.Fsid 26 | } 27 | -------------------------------------------------------------------------------- /vendor/github.com/appc/spec/ace/os_freebsd.go: -------------------------------------------------------------------------------- 1 | // Copyright 2015 The appc Authors 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | 15 | // +build freebsd 16 | 17 | package main 18 | 19 | import ( 20 | "syscall" 21 | ) 22 | 23 | func isSameFilesystem(a, b *syscall.Statfs_t) bool { 24 | if a.Fsid != (syscall.Fsid{}) || b.Fsid != (syscall.Fsid{}) { 25 | // If Fsid is not empty, we can just compare the IDs 26 | return a.Fsid == b.Fsid 27 | } 28 | // Fsids are zero, this happens in jails, but we can compare the rest 29 | return a.Fstypename == b.Fstypename && 30 | a.Mntfromname == b.Mntfromname && 31 | a.Mntonname == b.Mntonname 32 | } 33 | -------------------------------------------------------------------------------- /vendor/github.com/appc/spec/ace/os_linux.go: -------------------------------------------------------------------------------- 1 | // Copyright 2015 The appc Authors 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | 15 | // +build linux 16 | 17 | package main 18 | 19 | import ( 20 | "fmt" 21 | "os" 22 | ) 23 | 24 | func checkMountImpl(d string, readonly bool) error { 25 | mountinfoPath := fmt.Sprintf("/proc/self/mountinfo") 26 | mi, err := os.Open(mountinfoPath) 27 | if err != nil { 28 | return err 29 | } 30 | defer mi.Close() 31 | 32 | isMounted, ro, err := parseMountinfo(mi, d) 33 | if err != nil { 34 | return err 35 | } 36 | if !isMounted { 37 | return fmt.Errorf("%q is not a mount point", d) 38 | } 39 | 40 | if ro == readonly { 41 | return nil 42 | } else { 43 | return fmt.Errorf("%q mounted ro=%t, want %t", d, ro, readonly) 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /vendor/github.com/appc/spec/ace/os_shared.go: -------------------------------------------------------------------------------- 1 | // +build !linux 2 | 3 | package main 4 | 5 | import ( 6 | "fmt" 7 | "path/filepath" 8 | "syscall" 9 | ) 10 | 11 | func checkMountStatfs(d string, readonly bool) error { 12 | // or.... 13 | // os.Stat(path).Sys().(*syscall.Stat_t).Dev 14 | sfs1 := &syscall.Statfs_t{} 15 | if err := syscall.Statfs(d, sfs1); err != nil { 16 | return fmt.Errorf("error calling statfs on %q: %v", d, err) 17 | } 18 | sfs2 := &syscall.Statfs_t{} 19 | if err := syscall.Statfs(filepath.Dir(d), sfs2); err != nil { 20 | return fmt.Errorf("error calling statfs on %q: %v", d, err) 21 | } 22 | if isSameFilesystem(sfs1, sfs2) { 23 | return fmt.Errorf("%q is not a mount point", d) 24 | } 25 | ro := sfs1.Flags&syscall.O_RDONLY == 1 26 | if ro != readonly { 27 | return fmt.Errorf("%q mounted ro=%t, want %t", d, ro, readonly) 28 | } 29 | 30 | return nil 31 | } 32 | 33 | func checkMountImpl(d string, readonly bool) error { 34 | return checkMountStatfs(d, readonly) 35 | } 36 | -------------------------------------------------------------------------------- /vendor/github.com/appc/spec/aci/doc.go: -------------------------------------------------------------------------------- 1 | // Copyright 2015 The appc Authors 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | 15 | // Package aci contains various functions for working with App Container Images. 16 | package aci 17 | -------------------------------------------------------------------------------- /vendor/github.com/appc/spec/actool/doc.go: -------------------------------------------------------------------------------- 1 | // Copyright 2015 The appc Authors 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | 15 | // Package main contains a tool for building and validating images and 16 | // manifests that meet the App Container specifications. 17 | package main 18 | -------------------------------------------------------------------------------- /vendor/github.com/appc/spec/actool/version.go: -------------------------------------------------------------------------------- 1 | // Copyright 2015 The appc Authors 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | 15 | package main 16 | 17 | import ( 18 | "fmt" 19 | 20 | "github.com/appc/spec/schema" 21 | ) 22 | 23 | var cmdVersion = &Command{ 24 | Name: "version", 25 | Description: "Print the version and exit", 26 | Summary: "Print the version and exit", 27 | Run: runVersion, 28 | } 29 | 30 | func runVersion(args []string) (exit int) { 31 | fmt.Printf("actool version %s\n", schema.AppContainerVersion.String()) 32 | return 33 | } 34 | -------------------------------------------------------------------------------- /vendor/github.com/appc/spec/build.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -e 3 | 4 | # Gets the directory that this script is stored in. 5 | # https://stackoverflow.com/questions/59895/can-a-bash-script-tell-what-directory-its-stored-in 6 | DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" 7 | 8 | ORG_PATH="github.com/appc" 9 | REPO_PATH="${ORG_PATH}/spec" 10 | 11 | if [ ! -h ${DIR}/gopath/src/${REPO_PATH} ]; then 12 | mkdir -p ${DIR}/gopath/src/${ORG_PATH} 13 | cd ${DIR} && ln -s ../../../.. gopath/src/${REPO_PATH} || exit 255 14 | fi 15 | 16 | export GO15VENDOREXPERIMENT=1 17 | export GOBIN=${DIR}/bin 18 | export GOPATH=${DIR}/gopath 19 | export GOOS GOARCH 20 | 21 | eval $(go env) 22 | 23 | if [ "${GOOS}" = "freebsd" ]; then 24 | # /usr/bin/cc is clang on freebsd, but we need to tell it to go to 25 | # make it generate proper flavour of code that doesn't emit 26 | # warnings. 27 | export CC=clang 28 | fi 29 | 30 | echo "Building actool..." 31 | go build -o ${GOBIN}/actool ${REPO_PATH}/actool 32 | 33 | if ! [[ -d "$(go env GOROOT)/pkg/${GOOS}_${GOARCH}" ]]; then 34 | echo "go ${GOOS}/${GOARCH} not bootstrapped, not building ACE validator" 35 | else 36 | echo "Building ACE validator..." 37 | CGO_ENABLED=0 go build -a -installsuffix ace -ldflags '-extldflags "-static"' -o ${GOBIN}/ace-validator ${REPO_PATH}/ace 38 | fi 39 | -------------------------------------------------------------------------------- /vendor/github.com/appc/spec/discovery/doc.go: -------------------------------------------------------------------------------- 1 | // Copyright 2015 The appc Authors 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | 15 | // Package discovery contains an experimental implementation of the Image 16 | // Discovery section of the appc specification. 17 | package discovery 18 | -------------------------------------------------------------------------------- /vendor/github.com/appc/spec/examples/pod_template.json: -------------------------------------------------------------------------------- 1 | { 2 | "acVersion": "0.3.0", 3 | "acKind": "PodManifest", 4 | "apps": [ 5 | { 6 | "name": "reduce-worker", 7 | "image": { 8 | "name": "example.com/reduce-worker", 9 | "id": "sha512-8d3fffddf79e9a232ffd19f9ccaa4d6b37a6a243dbe0f23137b108a043d9da13121a9b505c804956b22e93c7f93969f4a7ba8ddea45bf4aab0bebc8f814e0990" 10 | } 11 | }, 12 | { 13 | "name": "backup", 14 | "image": { 15 | "name": "example.com/worker-backup", 16 | "labels": [ 17 | { 18 | "name": "version", 19 | "value": "latest" 20 | } 21 | ] 22 | } 23 | }, 24 | { 25 | "name": "register", 26 | "image": { 27 | "name": "example.com/reduce-worker-register", 28 | "labels": [ 29 | { 30 | "name": "version", 31 | "value": "3.0.0" 32 | } 33 | ] 34 | } 35 | } 36 | ], 37 | "isolators": [ 38 | { 39 | "name": "resource/memory", 40 | "value": {"limit": "4G"} 41 | } 42 | ] 43 | } 44 | -------------------------------------------------------------------------------- /vendor/github.com/appc/spec/glide.lock: -------------------------------------------------------------------------------- 1 | hash: 272f875960af6af2a372ccc62e3155654d203f78cc83d5489f613500fc956ac2 2 | updated: 2016-07-06T16:35:25.445306953+02:00 3 | imports: 4 | - name: github.com/coreos/go-semver 5 | version: 294930c1e79c64e7dbe360054274fdad492c8cf5 6 | subpackages: 7 | - semver 8 | - name: github.com/gogo/protobuf 9 | version: 4168943e65a2802828518e95310aeeed6d84c4e5 10 | subpackages: 11 | - proto 12 | - name: github.com/spf13/pflag 13 | version: 94e98a55fb412fcbcfc302555cb990f5e1590627 14 | - name: go4.org 15 | version: 03efcb870d84809319ea509714dd6d19a1498483 16 | subpackages: 17 | - errorutil 18 | - name: golang.org/x/net 19 | version: ccfcd82c7124abd517842acbacc3b8c1e390c73d 20 | subpackages: 21 | - html 22 | - html/atom 23 | - name: gopkg.in/inf.v0 24 | version: 3887ee99ecf07df5b447e9b00d9c0b2adaa9f3e4 25 | - name: k8s.io/kubernetes 26 | version: a639d02cbff6f21e89eb639c7b7e5ad268bd4c29 27 | subpackages: 28 | - pkg/api/resource 29 | - pkg/conversion 30 | - third_party/forked/reflect 31 | devImports: [] 32 | -------------------------------------------------------------------------------- /vendor/github.com/appc/spec/glide.yaml: -------------------------------------------------------------------------------- 1 | package: "github.com/appc/spec" 2 | import: 3 | - package: github.com/coreos/go-semver 4 | version: ~0.1.0 5 | subpackages: 6 | - semver 7 | - package: github.com/gogo/protobuf 8 | version: ~0.2 9 | subpackages: 10 | - proto 11 | - package: github.com/spf13/pflag 12 | version: 94e98a55fb412fcbcfc302555cb990f5e1590627 13 | - package: go4.org 14 | version: 03efcb870d84809319ea509714dd6d19a1498483 15 | subpackages: 16 | - errorutil 17 | - package: golang.org/x/net 18 | version: ccfcd82c7124abd517842acbacc3b8c1e390c73d 19 | subpackages: 20 | - html 21 | - html/atom 22 | - package: gopkg.in/inf.v0 23 | version: 3887ee99ecf07df5b447e9b00d9c0b2adaa9f3e4 24 | - package: k8s.io/kubernetes 25 | version: ~1.3.0 26 | subpackages: 27 | - pkg/api/resource 28 | - pkg/conversion 29 | - third_party/forked/reflect 30 | -------------------------------------------------------------------------------- /vendor/github.com/appc/spec/logos/appc-horizontal-black.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/3ofcoins/jetpack/502c8ae5af14d4c086b56171e893e17c60436710/vendor/github.com/appc/spec/logos/appc-horizontal-black.png -------------------------------------------------------------------------------- /vendor/github.com/appc/spec/logos/appc-horizontal-color.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/3ofcoins/jetpack/502c8ae5af14d4c086b56171e893e17c60436710/vendor/github.com/appc/spec/logos/appc-horizontal-color.png -------------------------------------------------------------------------------- /vendor/github.com/appc/spec/logos/appc-horizontal-white.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/3ofcoins/jetpack/502c8ae5af14d4c086b56171e893e17c60436710/vendor/github.com/appc/spec/logos/appc-horizontal-white.png -------------------------------------------------------------------------------- /vendor/github.com/appc/spec/logos/appc-stacked-black.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/3ofcoins/jetpack/502c8ae5af14d4c086b56171e893e17c60436710/vendor/github.com/appc/spec/logos/appc-stacked-black.png -------------------------------------------------------------------------------- /vendor/github.com/appc/spec/logos/appc-stacked-color.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/3ofcoins/jetpack/502c8ae5af14d4c086b56171e893e17c60436710/vendor/github.com/appc/spec/logos/appc-stacked-color.png -------------------------------------------------------------------------------- /vendor/github.com/appc/spec/pkg/device/device_linux.go: -------------------------------------------------------------------------------- 1 | // Copyright 2016 The appc Authors 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | 15 | // +build linux 16 | 17 | package device 18 | 19 | // with glibc/sysdeps/unix/sysv/linux/sys/sysmacros.h as reference 20 | 21 | func Major(rdev uint64) uint { 22 | return uint((rdev>>8)&0xfff) | (uint(rdev>>32) & ^uint(0xfff)) 23 | } 24 | 25 | func Minor(rdev uint64) uint { 26 | return uint(rdev&0xff) | uint(uint32(rdev>>12) & ^uint32(0xff)) 27 | } 28 | 29 | func Makedev(maj uint, min uint) uint64 { 30 | return uint64(min&0xff) | (uint64(maj&0xfff) << 8) | 31 | ((uint64(min) & ^uint64(0xff)) << 12) | 32 | ((uint64(maj) & ^uint64(0xfff)) << 32) 33 | } 34 | -------------------------------------------------------------------------------- /vendor/github.com/appc/spec/pkg/tarheader/doc.go: -------------------------------------------------------------------------------- 1 | // Copyright 2015 The appc Authors 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | 15 | // Package tarheader contains a simple abstraction to accurately create 16 | // tar.Headers on different operating systems. 17 | package tarheader 18 | -------------------------------------------------------------------------------- /vendor/github.com/appc/spec/pkg/tarheader/pop_darwin.go: -------------------------------------------------------------------------------- 1 | // Copyright 2015 The appc Authors 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | 15 | //+build darwin 16 | 17 | package tarheader 18 | 19 | import ( 20 | "archive/tar" 21 | "os" 22 | "syscall" 23 | "time" 24 | ) 25 | 26 | func init() { 27 | populateHeaderStat = append(populateHeaderStat, populateHeaderCtime) 28 | } 29 | 30 | func populateHeaderCtime(h *tar.Header, fi os.FileInfo, _ map[uint64]string) { 31 | st, ok := fi.Sys().(*syscall.Stat_t) 32 | if !ok { 33 | return 34 | } 35 | 36 | sec, nsec := st.Ctimespec.Unix() 37 | ctime := time.Unix(sec, nsec) 38 | h.ChangeTime = ctime 39 | } 40 | -------------------------------------------------------------------------------- /vendor/github.com/appc/spec/pkg/tarheader/pop_linux.go: -------------------------------------------------------------------------------- 1 | // Copyright 2015 The appc Authors 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | 15 | // +build linux 16 | 17 | package tarheader 18 | 19 | import ( 20 | "archive/tar" 21 | "os" 22 | "syscall" 23 | "time" 24 | ) 25 | 26 | func init() { 27 | populateHeaderStat = append(populateHeaderStat, populateHeaderCtime) 28 | } 29 | 30 | func populateHeaderCtime(h *tar.Header, fi os.FileInfo, _ map[uint64]string) { 31 | st, ok := fi.Sys().(*syscall.Stat_t) 32 | if !ok { 33 | return 34 | } 35 | 36 | sec, nsec := st.Ctim.Unix() 37 | ctime := time.Unix(sec, nsec) 38 | h.ChangeTime = ctime 39 | } 40 | -------------------------------------------------------------------------------- /vendor/github.com/appc/spec/pkg/tarheader/tarheader.go: -------------------------------------------------------------------------------- 1 | // Copyright 2015 The appc Authors 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | 15 | package tarheader 16 | 17 | import ( 18 | "archive/tar" 19 | "os" 20 | ) 21 | 22 | var populateHeaderStat []func(h *tar.Header, fi os.FileInfo, seen map[uint64]string) 23 | 24 | func Populate(h *tar.Header, fi os.FileInfo, seen map[uint64]string) { 25 | for _, pop := range populateHeaderStat { 26 | pop(h, fi, seen) 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /vendor/github.com/appc/spec/schema/doc.go: -------------------------------------------------------------------------------- 1 | // Copyright 2015 The appc Authors 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | 15 | // Package schema provides definitions for the JSON schema of the different 16 | // manifests in the App Container Specification. The manifests are canonically 17 | // represented in their respective structs: 18 | // - `ImageManifest` 19 | // - `PodManifest` 20 | // 21 | // Validation is performed through serialization: if a blob of JSON data will 22 | // unmarshal to one of the *Manifests, it is considered a valid implementation 23 | // of the standard. Similarly, if a constructed *Manifest struct marshals 24 | // successfully to JSON, it must be valid. 25 | package schema 26 | -------------------------------------------------------------------------------- /vendor/github.com/appc/spec/schema/kind.go: -------------------------------------------------------------------------------- 1 | // Copyright 2015 The appc Authors 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | 15 | package schema 16 | 17 | import ( 18 | "encoding/json" 19 | 20 | "github.com/appc/spec/schema/types" 21 | ) 22 | 23 | type Kind struct { 24 | ACVersion types.SemVer `json:"acVersion"` 25 | ACKind types.ACKind `json:"acKind"` 26 | } 27 | 28 | type kind Kind 29 | 30 | func (k *Kind) UnmarshalJSON(data []byte) error { 31 | nk := kind{} 32 | err := json.Unmarshal(data, &nk) 33 | if err != nil { 34 | return err 35 | } 36 | *k = Kind(nk) 37 | return nil 38 | } 39 | 40 | func (k Kind) MarshalJSON() ([]byte, error) { 41 | return json.Marshal(kind(k)) 42 | } 43 | -------------------------------------------------------------------------------- /vendor/github.com/appc/spec/schema/lastditch/doc.go: -------------------------------------------------------------------------------- 1 | // Copyright 2015 The appc Authors 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | 15 | // Package lastditch provides fallback redefinitions of parts of 16 | // schemas provided by schema package. 17 | // 18 | // Almost no validation of schemas is done (besides checking if data 19 | // really is `JSON`-encoded and kind is either `ImageManifest` or 20 | // `PodManifest`. This is to get as much data as possible from an 21 | // invalid manifest. The main aim of the package is to be used for the 22 | // better error reporting. The another aim might be to force some 23 | // operation (like removing a pod), which would otherwise fail because 24 | // of an invalid manifest. 25 | // 26 | // To avoid validation during deserialization, types provided by this 27 | // package use plain strings. 28 | package lastditch 29 | -------------------------------------------------------------------------------- /vendor/github.com/appc/spec/schema/lastditch/image.go: -------------------------------------------------------------------------------- 1 | // Copyright 2015 The appc Authors 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | 15 | package lastditch 16 | 17 | import ( 18 | "encoding/json" 19 | 20 | "github.com/appc/spec/schema" 21 | "github.com/appc/spec/schema/types" 22 | ) 23 | 24 | type ImageManifest struct { 25 | ACVersion string `json:"acVersion"` 26 | ACKind string `json:"acKind"` 27 | Name string `json:"name"` 28 | Labels Labels `json:"labels,omitempty"` 29 | } 30 | 31 | // a type just to avoid a recursion during unmarshalling 32 | type imageManifest ImageManifest 33 | 34 | func (im *ImageManifest) UnmarshalJSON(data []byte) error { 35 | i := imageManifest(*im) 36 | err := json.Unmarshal(data, &i) 37 | if err != nil { 38 | return err 39 | } 40 | if i.ACKind != string(schema.ImageManifestKind) { 41 | return types.InvalidACKindError(schema.ImageManifestKind) 42 | } 43 | *im = ImageManifest(i) 44 | return nil 45 | } 46 | -------------------------------------------------------------------------------- /vendor/github.com/appc/spec/schema/lastditch/labels.go: -------------------------------------------------------------------------------- 1 | // Copyright 2015 The appc Authors 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | 15 | package lastditch 16 | 17 | import ( 18 | "encoding/json" 19 | ) 20 | 21 | type Labels []Label 22 | 23 | // a type just to avoid a recursion during unmarshalling 24 | type labels Labels 25 | 26 | type Label struct { 27 | Name string `json:"name"` 28 | Value string `json:"value"` 29 | } 30 | 31 | func (l *Labels) UnmarshalJSON(data []byte) error { 32 | var jl labels 33 | if err := json.Unmarshal(data, &jl); err != nil { 34 | return err 35 | } 36 | *l = Labels(jl) 37 | return nil 38 | } 39 | -------------------------------------------------------------------------------- /vendor/github.com/appc/spec/schema/types/doc.go: -------------------------------------------------------------------------------- 1 | // Copyright 2015 The appc Authors 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | 15 | // Package types contains structs representing the various types in the app 16 | // container specification. It is used by the [schema manifest types](../) 17 | // to enforce validation. 18 | package types 19 | -------------------------------------------------------------------------------- /vendor/github.com/appc/spec/schema/types/exec.go: -------------------------------------------------------------------------------- 1 | // Copyright 2015 The appc Authors 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | 15 | package types 16 | 17 | import "encoding/json" 18 | 19 | type Exec []string 20 | 21 | type exec Exec 22 | 23 | func (e Exec) assertValid() error { 24 | return nil 25 | } 26 | 27 | func (e Exec) MarshalJSON() ([]byte, error) { 28 | if err := e.assertValid(); err != nil { 29 | return nil, err 30 | } 31 | return json.Marshal(exec(e)) 32 | } 33 | 34 | func (e *Exec) UnmarshalJSON(data []byte) error { 35 | var je exec 36 | err := json.Unmarshal(data, &je) 37 | if err != nil { 38 | return err 39 | } 40 | ne := Exec(je) 41 | if err := ne.assertValid(); err != nil { 42 | return err 43 | } 44 | *e = ne 45 | return nil 46 | } 47 | -------------------------------------------------------------------------------- /vendor/github.com/appc/spec/schema/version.go: -------------------------------------------------------------------------------- 1 | // Copyright 2015 The appc Authors 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | 15 | package schema 16 | 17 | import ( 18 | "github.com/appc/spec/schema/types" 19 | ) 20 | 21 | const ( 22 | // version represents the canonical version of the appc spec and tooling. 23 | // For now, the schema and tooling is coupled with the spec itself, so 24 | // this must be kept in sync with the VERSION file in the root of the repo. 25 | version string = "0.8.7" 26 | ) 27 | 28 | var ( 29 | // AppContainerVersion is the SemVer representation of version 30 | AppContainerVersion types.SemVer 31 | ) 32 | 33 | func init() { 34 | v, err := types.NewSemVer(version) 35 | if err != nil { 36 | panic(err) 37 | } 38 | AppContainerVersion = *v 39 | } 40 | -------------------------------------------------------------------------------- /vendor/github.com/appc/spec/scripts/build-ace-validator-acis: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # 3 | set -eu 4 | 5 | PREFIX="ace" 6 | : ${NO_SIGNATURE=} 7 | GOOS="$(go env GOOS)" 8 | GOARCH="$(go env GOARCH)" 9 | 10 | if ! [[ $0 =~ "scripts/build-ace-validator-acis" ]]; then 11 | echo "invoke from repository root" 1>&2 12 | exit 255 13 | fi 14 | 15 | if ! [[ -f "bin/ace-validator" ]]; then 16 | ./build 17 | fi 18 | 19 | for typ in main sidekick; do 20 | layoutdir="bin/ace-validator-${typ}-layout" 21 | mkdir -p ${layoutdir}/rootfs/opt/acvalidator 22 | cp bin/ace-validator ${layoutdir}/rootfs/ 23 | sed -e "s/@GOOS@/$GOOS/" -e "s/@GOARCH@/$GOARCH/" < ${PREFIX}/image_manifest_${typ}.json.in > ${layoutdir}/manifest 24 | # now build the tarball, and sign it 25 | pushd ${layoutdir} >/dev/null 26 | # Set a consistent timestamp so we get a consistent hash 27 | # TODO(jonboulle): make this cleaner.. 28 | for path in rootfs rootfs/ace-validator; do 29 | touch -a -m -d 1970-01-01T00:00:00Z ${path} 30 | done 31 | ../actool build --overwrite ./ ../ace-validator-${typ}.aci 32 | if [ -z "$NO_SIGNATURE" ] ; then 33 | gpg --cipher-algo AES256 --armor --output ace-validator-${typ}.aci.asc --detach-sig ../ace-validator-${typ}.aci 34 | mv ace-validator-${typ}.aci.asc ../ 35 | fi 36 | popd >/dev/null 37 | echo "Wrote unsigned ${typ} ACI bin/ace-validator-${typ}.aci" 38 | if [ -f "bin/ace-validator-${typ}.aci.asc" ]; then 39 | echo "Wrote ${typ} ACI signature bin/ace-validator-${typ}.aci.asc" 40 | fi 41 | done 42 | -------------------------------------------------------------------------------- /vendor/github.com/appc/spec/scripts/build-release: -------------------------------------------------------------------------------- 1 | #!/bin/bash -eu 2 | # 3 | # Build the appc release of the specified version. 4 | # 5 | # YMMV, no disclaimer or warranty, etc. 6 | 7 | if ! [[ "$1" =~ ^v[[:digit:]]+.[[:digit:]]+.[[:digit:]]$ ]]; then 8 | echo "Usage: scripts/build-release " 9 | echo " where VERSION must be vX.Y.Z" 10 | exit 255 11 | fi 12 | 13 | ver="appc-${1}" 14 | releasedir="release-${ver}" 15 | mkdir "${ver}" 16 | mkdir "release-${ver}" 17 | 18 | git checkout "${1}" 19 | ./build 20 | cp -r bin/actool SPEC.md spec/ "${ver}/" 21 | tar czvf "${ver}.tar.gz" "${ver}" 22 | echo "Wrote release tarball ${ver}.tar.gz" 23 | rm -fr "${ver}" 24 | gpg --detach-sign "${ver}.tar.gz" 25 | mv "${ver}.tar.gz" "${ver}.tar.gz.sig" "${releasedir}/" 26 | 27 | echo "Building ACE validators" 28 | if [[ -f scripts/build-ace-validator-acis ]]; then 29 | scripts/build-ace-validator-acis 30 | else 31 | ace/build_aci # backwards-compatible fallback 32 | fi 33 | cp bin/ace-validator-{main,sidekick}.aci{,.asc} "${releasedir}/" 34 | 35 | git checkout - 36 | 37 | echo "Done. Release artifacts in ${releasedir}/" 38 | -------------------------------------------------------------------------------- /vendor/github.com/appc/spec/scripts/bump-release: -------------------------------------------------------------------------------- 1 | #!/bin/bash -e 2 | # 3 | # Attempt to bump the appc release to the specified version by replacing all 4 | # occurrences of the current/previous version. 5 | # 6 | # Generates two commits: the release itself and the bump to the next +git 7 | # version 8 | # 9 | # YMMV, no disclaimer or warranty, etc. 10 | 11 | if ! [[ "$1" =~ ^v[[:digit:]]+.[[:digit:]]+.[[:digit:]]$ ]]; then 12 | echo "Usage: scripts/bump-release " 13 | echo " where VERSION must be vX.Y.Z" 14 | exit 255 15 | fi 16 | 17 | function replace_all() { 18 | REPLACE=$(sed -e 's/[]\/$*.^|[]/\\&/g'<<< $1) 19 | git ls-files | fgrep -v CHANGELOG.md | xargs sed -i -e "s/$REPLACE/$2/g" 20 | } 21 | 22 | function replace_version() { 23 | REPLACE=$(sed -e 's/[]\/$*.^|[]/\\&/g'<<< $1) 24 | sed -i -e "s/$REPLACE/$2/g" VERSION schema/version.go 25 | } 26 | 27 | NEXT=${1:1} # 0.2.3 28 | NEXTGIT="${NEXT}+git" # 0.2.3+git 29 | 30 | PREVGIT=$(cat VERSION) # 0.1.2+git 31 | PREV=${PREVGIT::-4} # 0.1.2 32 | 33 | replace_version $PREVGIT $NEXT 34 | replace_all $PREV $NEXT 35 | git commit -am "version: bump to v${NEXT}" 36 | 37 | replace_version $NEXT $NEXTGIT 38 | git commit -am "version: bump to v${NEXTGIT}" 39 | -------------------------------------------------------------------------------- /vendor/github.com/appc/spec/scripts/glide-update: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -e 3 | 4 | if ! [[ "$0" =~ "scripts/glide-update" ]]; then 5 | echo "must be run from repository root" 6 | exit 255 7 | fi 8 | 9 | if [ ! $(command -v glide) ]; then 10 | echo "glide: command not found" 11 | exit 255 12 | fi 13 | 14 | if [ ! $(command -v glide-vc) ]; then 15 | echo "glide-vc: command not found" 16 | exit 255 17 | fi 18 | 19 | glide update --strip-vcs --strip-vendor --update-vendored --delete 20 | glide-vc --only-code --no-tests 21 | -------------------------------------------------------------------------------- /vendor/github.com/appc/spec/vendor/github.com/coreos/go-semver/example.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "fmt" 5 | "github.com/coreos/go-semver/semver" 6 | "os" 7 | ) 8 | 9 | func main() { 10 | vA, err := semver.NewVersion(os.Args[1]) 11 | if err != nil { 12 | fmt.Println(err.Error()) 13 | } 14 | vB, err := semver.NewVersion(os.Args[2]) 15 | if err != nil { 16 | fmt.Println(err.Error()) 17 | } 18 | 19 | fmt.Printf("%s < %s == %t\n", vA, vB, vA.LessThan(*vB)) 20 | } 21 | -------------------------------------------------------------------------------- /vendor/github.com/appc/spec/vendor/github.com/coreos/go-semver/semver/sort.go: -------------------------------------------------------------------------------- 1 | // Copyright 2013-2015 CoreOS, Inc. 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | 15 | package semver 16 | 17 | import ( 18 | "sort" 19 | ) 20 | 21 | type Versions []*Version 22 | 23 | func (s Versions) Len() int { 24 | return len(s) 25 | } 26 | 27 | func (s Versions) Swap(i, j int) { 28 | s[i], s[j] = s[j], s[i] 29 | } 30 | 31 | func (s Versions) Less(i, j int) bool { 32 | return s[i].LessThan(*s[j]) 33 | } 34 | 35 | // Sort sorts the given slice of Version 36 | func Sort(versions []*Version) { 37 | sort.Sort(Versions(versions)) 38 | } 39 | -------------------------------------------------------------------------------- /vendor/github.com/appc/spec/vendor/golang.org/x/net/PATENTS: -------------------------------------------------------------------------------- 1 | Additional IP Rights Grant (Patents) 2 | 3 | "This implementation" means the copyrightable works distributed by 4 | Google as part of the Go project. 5 | 6 | Google hereby grants to You a perpetual, worldwide, non-exclusive, 7 | no-charge, royalty-free, irrevocable (except as stated in this section) 8 | patent license to make, have made, use, offer to sell, sell, import, 9 | transfer and otherwise run, modify and propagate the contents of this 10 | implementation of Go, where such license applies only to those patent 11 | claims, both currently owned or controlled by Google and acquired in 12 | the future, licensable by Google that are necessarily infringed by this 13 | implementation of Go. This grant does not include claims that would be 14 | infringed only as a consequence of further modification of this 15 | implementation. If you or your agent or exclusive licensee institute or 16 | order or agree to the institution of patent litigation against any 17 | entity (including a cross-claim or counterclaim in a lawsuit) alleging 18 | that this implementation of Go or any code incorporated within this 19 | implementation of Go constitutes direct or contributory patent 20 | infringement, or inducement of patent infringement, then any patent 21 | rights granted to you under this License for this implementation of Go 22 | shall terminate as of the date such litigation is filed. 23 | -------------------------------------------------------------------------------- /vendor/github.com/appc/spec/vendor/k8s.io/kubernetes/pkg/api/resource/deep_copy.go: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2016 The Kubernetes Authors All rights reserved. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | 17 | package resource 18 | 19 | import ( 20 | inf "gopkg.in/inf.v0" 21 | 22 | conversion "k8s.io/kubernetes/pkg/conversion" 23 | ) 24 | 25 | func DeepCopy_resource_Quantity(in Quantity, out *Quantity, c *conversion.Cloner) error { 26 | *out = in 27 | if in.d.Dec != nil { 28 | tmp := &inf.Dec{} 29 | out.d.Dec = tmp.Set(in.d.Dec) 30 | } 31 | return nil 32 | } 33 | -------------------------------------------------------------------------------- /vendor/github.com/appc/spec/vendor/k8s.io/kubernetes/pkg/conversion/deep_equal.go: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2015 The Kubernetes Authors All rights reserved. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | 17 | package conversion 18 | 19 | import ( 20 | "k8s.io/kubernetes/third_party/forked/reflect" 21 | ) 22 | 23 | // The code for this type must be located in third_party, since it forks from 24 | // go std lib. But for convenience, we expose the type here, too. 25 | type Equalities struct { 26 | reflect.Equalities 27 | } 28 | 29 | // For convenience, panics on errrors 30 | func EqualitiesOrDie(funcs ...interface{}) Equalities { 31 | e := Equalities{reflect.Equalities{}} 32 | if err := e.AddFuncs(funcs...); err != nil { 33 | panic(err) 34 | } 35 | return e 36 | } 37 | -------------------------------------------------------------------------------- /vendor/github.com/appc/spec/vendor/k8s.io/kubernetes/pkg/conversion/doc.go: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2014 The Kubernetes Authors All rights reserved. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | 17 | // Package conversion provides go object versioning. 18 | // 19 | // Specifically, conversion provides a way for you to define multiple versions 20 | // of the same object. You may write functions which implement conversion logic, 21 | // but for the fields which did not change, copying is automated. This makes it 22 | // easy to modify the structures you use in memory without affecting the format 23 | // you store on disk or respond to in your external API calls. 24 | package conversion 25 | -------------------------------------------------------------------------------- /vendor/github.com/appc/spec/vendor/k8s.io/kubernetes/pkg/conversion/helper.go: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2014 The Kubernetes Authors All rights reserved. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | 17 | package conversion 18 | 19 | import ( 20 | "fmt" 21 | "reflect" 22 | ) 23 | 24 | // EnforcePtr ensures that obj is a pointer of some sort. Returns a reflect.Value 25 | // of the dereferenced pointer, ensuring that it is settable/addressable. 26 | // Returns an error if this is not possible. 27 | func EnforcePtr(obj interface{}) (reflect.Value, error) { 28 | v := reflect.ValueOf(obj) 29 | if v.Kind() != reflect.Ptr { 30 | if v.Kind() == reflect.Invalid { 31 | return reflect.Value{}, fmt.Errorf("expected pointer, but got invalid kind") 32 | } 33 | return reflect.Value{}, fmt.Errorf("expected pointer, but got %v type", v.Type()) 34 | } 35 | if v.IsNil() { 36 | return reflect.Value{}, fmt.Errorf("expected pointer, but got nil") 37 | } 38 | return v.Elem(), nil 39 | } 40 | -------------------------------------------------------------------------------- /vendor/github.com/coreos/go-semver/semver/sort.go: -------------------------------------------------------------------------------- 1 | // Copyright 2013-2015 CoreOS, Inc. 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | 15 | package semver 16 | 17 | import ( 18 | "sort" 19 | ) 20 | 21 | type Versions []*Version 22 | 23 | func (s Versions) Len() int { 24 | return len(s) 25 | } 26 | 27 | func (s Versions) Swap(i, j int) { 28 | s[i], s[j] = s[j], s[i] 29 | } 30 | 31 | func (s Versions) Less(i, j int) bool { 32 | return s[i].LessThan(*s[j]) 33 | } 34 | 35 | // Sort sorts the given slice of Version 36 | func Sort(versions []*Version) { 37 | sort.Sort(Versions(versions)) 38 | } 39 | -------------------------------------------------------------------------------- /vendor/github.com/coreos/ioprogress/LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2014 Mitchell Hashimoto 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in 13 | all copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | THE SOFTWARE. 22 | -------------------------------------------------------------------------------- /vendor/github.com/coreos/ioprogress/README.md: -------------------------------------------------------------------------------- 1 | # ioprogress 2 | 3 | ioprogress is a Go (golang) library with implementations of `io.Reader` 4 | and `io.Writer` that draws progress bars. The primary use case for these 5 | are for CLI applications but alternate progress bar writers can be supplied 6 | for alternate environments. 7 | 8 | ## Example 9 | 10 | ![Progress](http://g.recordit.co/GO5HxT16QH.gif) 11 | 12 | ## Installation 13 | 14 | Standard `go get`: 15 | 16 | ``` 17 | $ go get github.com/mitchellh/ioprogress 18 | ``` 19 | 20 | ## Usage 21 | 22 | Here is an example of outputting a basic progress bar to the CLI as 23 | we're "downloading" from some other `io.Reader` (perhaps from a network 24 | connection): 25 | 26 | ```go 27 | // Imagine this came from some external source, such as a network connection, 28 | // and that we have the full size of it, such as from a Content-Length HTTP 29 | // header. 30 | var r io.Reader 31 | 32 | // Create the progress reader 33 | progressR := &ioprogress.Reader{ 34 | Reader: r, 35 | Size: rSize, 36 | } 37 | 38 | // Copy all of the reader to some local file f. As it copies, the 39 | // progressR will write progress to the terminal on os.Stdout. This is 40 | // customizable. 41 | io.Copy(f, progressR) 42 | ``` 43 | -------------------------------------------------------------------------------- /vendor/github.com/emicklei/go-restful/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2012,2013 Ernest Micklei 2 | 3 | MIT License 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining 6 | a copy of this software and associated documentation files (the 7 | "Software"), to deal in the Software without restriction, including 8 | without limitation the rights to use, copy, modify, merge, publish, 9 | distribute, sublicense, and/or sell copies of the Software, and to 10 | permit persons to whom the Software is furnished to do so, subject to 11 | the following conditions: 12 | 13 | The above copyright notice and this permission notice shall be 14 | included in all copies or substantial portions of the Software. 15 | 16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 17 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 18 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 19 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 20 | LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 21 | OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 22 | WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -------------------------------------------------------------------------------- /vendor/github.com/emicklei/go-restful/Srcfile: -------------------------------------------------------------------------------- 1 | {"SkipDirs": ["examples"]} 2 | -------------------------------------------------------------------------------- /vendor/github.com/emicklei/go-restful/bench_test.sh: -------------------------------------------------------------------------------- 1 | #go test -run=none -file bench_test.go -test.bench . -cpuprofile=bench_test.out 2 | 3 | go test -c 4 | ./go-restful.test -test.run=none -test.cpuprofile=tmp.prof -test.bench=BenchmarkMany 5 | ./go-restful.test -test.run=none -test.cpuprofile=curly.prof -test.bench=BenchmarkManyCurly 6 | 7 | #go tool pprof go-restful.test tmp.prof 8 | go tool pprof go-restful.test curly.prof 9 | 10 | 11 | -------------------------------------------------------------------------------- /vendor/github.com/emicklei/go-restful/coverage.sh: -------------------------------------------------------------------------------- 1 | go test -coverprofile=coverage.out 2 | go tool cover -html=coverage.out -------------------------------------------------------------------------------- /vendor/github.com/emicklei/go-restful/curly_route.go: -------------------------------------------------------------------------------- 1 | package restful 2 | 3 | // Copyright 2013 Ernest Micklei. All rights reserved. 4 | // Use of this source code is governed by a license 5 | // that can be found in the LICENSE file. 6 | 7 | // curlyRoute exits for sorting Routes by the CurlyRouter based on number of parameters and number of static path elements. 8 | type curlyRoute struct { 9 | route Route 10 | paramCount int 11 | staticCount int 12 | } 13 | 14 | type sortableCurlyRoutes []curlyRoute 15 | 16 | func (s *sortableCurlyRoutes) add(route curlyRoute) { 17 | *s = append(*s, route) 18 | } 19 | 20 | func (s sortableCurlyRoutes) routes() (routes []Route) { 21 | for _, each := range s { 22 | routes = append(routes, each.route) // TODO change return type 23 | } 24 | return routes 25 | } 26 | 27 | func (s sortableCurlyRoutes) Len() int { 28 | return len(s) 29 | } 30 | func (s sortableCurlyRoutes) Swap(i, j int) { 31 | s[i], s[j] = s[j], s[i] 32 | } 33 | func (s sortableCurlyRoutes) Less(i, j int) bool { 34 | ci := s[i] 35 | cj := s[j] 36 | 37 | // primary key 38 | if ci.staticCount < cj.staticCount { 39 | return true 40 | } 41 | if ci.staticCount > cj.staticCount { 42 | return false 43 | } 44 | // secundary key 45 | if ci.paramCount < cj.paramCount { 46 | return true 47 | } 48 | if ci.paramCount > cj.paramCount { 49 | return false 50 | } 51 | return ci.route.Path < cj.route.Path 52 | } 53 | -------------------------------------------------------------------------------- /vendor/github.com/emicklei/go-restful/filter.go: -------------------------------------------------------------------------------- 1 | package restful 2 | 3 | // Copyright 2013 Ernest Micklei. All rights reserved. 4 | // Use of this source code is governed by a license 5 | // that can be found in the LICENSE file. 6 | 7 | // FilterChain is a request scoped object to process one or more filters before calling the target RouteFunction. 8 | type FilterChain struct { 9 | Filters []FilterFunction // ordered list of FilterFunction 10 | Index int // index into filters that is currently in progress 11 | Target RouteFunction // function to call after passing all filters 12 | } 13 | 14 | // ProcessFilter passes the request,response pair through the next of Filters. 15 | // Each filter can decide to proceed to the next Filter or handle the Response itself. 16 | func (f *FilterChain) ProcessFilter(request *Request, response *Response) { 17 | if f.Index < len(f.Filters) { 18 | f.Index++ 19 | f.Filters[f.Index-1](request, response, f) 20 | } else { 21 | f.Target(request, response) 22 | } 23 | } 24 | 25 | // FilterFunction definitions must call ProcessFilter on the FilterChain to pass on the control and eventually call the RouteFunction 26 | type FilterFunction func(*Request, *Response, *FilterChain) 27 | -------------------------------------------------------------------------------- /vendor/github.com/emicklei/go-restful/install.sh: -------------------------------------------------------------------------------- 1 | go test -test.v ...restful && \ 2 | go test -test.v ...swagger && \ 3 | go vet ...restful && \ 4 | go fmt ...swagger && \ 5 | go install ...swagger && \ 6 | go fmt ...restful && \ 7 | go install ...restful 8 | cd examples 9 | ls *.go | xargs -I {} go build -o /tmp/ignore {} 10 | cd .. -------------------------------------------------------------------------------- /vendor/github.com/emicklei/go-restful/log/log.go: -------------------------------------------------------------------------------- 1 | package log 2 | 3 | import ( 4 | stdlog "log" 5 | "os" 6 | ) 7 | 8 | // Logger corresponds to a minimal subset of the interface satisfied by stdlib log.Logger 9 | type StdLogger interface { 10 | Print(v ...interface{}) 11 | Printf(format string, v ...interface{}) 12 | } 13 | 14 | var Logger StdLogger 15 | 16 | func init() { 17 | // default Logger 18 | SetLogger(stdlog.New(os.Stderr, "[restful] ", stdlog.LstdFlags|stdlog.Lshortfile)) 19 | } 20 | 21 | func SetLogger(customLogger StdLogger) { 22 | Logger = customLogger 23 | } 24 | 25 | func Print(v ...interface{}) { 26 | Logger.Print(v...) 27 | } 28 | 29 | func Printf(format string, v ...interface{}) { 30 | Logger.Printf(format, v...) 31 | } 32 | -------------------------------------------------------------------------------- /vendor/github.com/emicklei/go-restful/logger.go: -------------------------------------------------------------------------------- 1 | package restful 2 | 3 | // Copyright 2014 Ernest Micklei. All rights reserved. 4 | // Use of this source code is governed by a license 5 | // that can be found in the LICENSE file. 6 | import ( 7 | "github.com/emicklei/go-restful/log" 8 | ) 9 | 10 | var trace bool = false 11 | var traceLogger log.StdLogger 12 | 13 | func init() { 14 | traceLogger = log.Logger // use the package logger by default 15 | } 16 | 17 | // TraceLogger enables detailed logging of Http request matching and filter invocation. Default no logger is set. 18 | // You may call EnableTracing() directly to enable trace logging to the package-wide logger. 19 | func TraceLogger(logger log.StdLogger) { 20 | traceLogger = logger 21 | EnableTracing(logger != nil) 22 | } 23 | 24 | // expose the setter for the global logger on the top-level package 25 | func SetLogger(customLogger log.StdLogger) { 26 | log.SetLogger(customLogger) 27 | } 28 | 29 | // EnableTracing can be used to Trace logging on and off. 30 | func EnableTracing(enabled bool) { 31 | trace = enabled 32 | } 33 | -------------------------------------------------------------------------------- /vendor/github.com/emicklei/go-restful/mime.go: -------------------------------------------------------------------------------- 1 | package restful 2 | 3 | import ( 4 | "strconv" 5 | "strings" 6 | ) 7 | 8 | type mime struct { 9 | media string 10 | quality float64 11 | } 12 | 13 | // insertMime adds a mime to a list and keeps it sorted by quality. 14 | func insertMime(l []mime, e mime) []mime { 15 | for i, each := range l { 16 | // if current mime has lower quality then insert before 17 | if e.quality > each.quality { 18 | left := append([]mime{}, l[0:i]...) 19 | return append(append(left, e), l[i:]...) 20 | } 21 | } 22 | return append(l, e) 23 | } 24 | 25 | // sortedMimes returns a list of mime sorted (desc) by its specified quality. 26 | func sortedMimes(accept string) (sorted []mime) { 27 | for _, each := range strings.Split(accept, ",") { 28 | typeAndQuality := strings.Split(strings.Trim(each, " "), ";") 29 | if len(typeAndQuality) == 1 { 30 | sorted = insertMime(sorted, mime{typeAndQuality[0], 1.0}) 31 | } else { 32 | // take factor 33 | parts := strings.Split(typeAndQuality[1], "=") 34 | if len(parts) == 2 { 35 | f, err := strconv.ParseFloat(parts[1], 64) 36 | if err != nil { 37 | traceLogger.Printf("unable to parse quality in %s, %v", each, err) 38 | } else { 39 | sorted = insertMime(sorted, mime{typeAndQuality[0], f}) 40 | } 41 | } 42 | } 43 | } 44 | return 45 | } 46 | -------------------------------------------------------------------------------- /vendor/github.com/emicklei/go-restful/options_filter.go: -------------------------------------------------------------------------------- 1 | package restful 2 | 3 | import "strings" 4 | 5 | // Copyright 2013 Ernest Micklei. All rights reserved. 6 | // Use of this source code is governed by a license 7 | // that can be found in the LICENSE file. 8 | 9 | // OPTIONSFilter is a filter function that inspects the Http Request for the OPTIONS method 10 | // and provides the response with a set of allowed methods for the request URL Path. 11 | // As for any filter, you can also install it for a particular WebService within a Container. 12 | // Note: this filter is not needed when using CrossOriginResourceSharing (for CORS). 13 | func (c *Container) OPTIONSFilter(req *Request, resp *Response, chain *FilterChain) { 14 | if "OPTIONS" != req.Request.Method { 15 | chain.ProcessFilter(req, resp) 16 | return 17 | } 18 | resp.AddHeader(HEADER_Allow, strings.Join(c.computeAllowedMethods(req), ",")) 19 | } 20 | 21 | // OPTIONSFilter is a filter function that inspects the Http Request for the OPTIONS method 22 | // and provides the response with a set of allowed methods for the request URL Path. 23 | // Note: this filter is not needed when using CrossOriginResourceSharing (for CORS). 24 | func OPTIONSFilter() FilterFunction { 25 | return DefaultContainer.OPTIONSFilter 26 | } 27 | -------------------------------------------------------------------------------- /vendor/github.com/emicklei/go-restful/router.go: -------------------------------------------------------------------------------- 1 | package restful 2 | 3 | // Copyright 2013 Ernest Micklei. All rights reserved. 4 | // Use of this source code is governed by a license 5 | // that can be found in the LICENSE file. 6 | 7 | import "net/http" 8 | 9 | // A RouteSelector finds the best matching Route given the input HTTP Request 10 | type RouteSelector interface { 11 | 12 | // SelectRoute finds a Route given the input HTTP Request and a list of WebServices. 13 | // It returns a selected Route and its containing WebService or an error indicating 14 | // a problem. 15 | SelectRoute( 16 | webServices []*WebService, 17 | httpRequest *http.Request) (selectedService *WebService, selected *Route, err error) 18 | } 19 | -------------------------------------------------------------------------------- /vendor/github.com/emicklei/go-restful/service_error.go: -------------------------------------------------------------------------------- 1 | package restful 2 | 3 | // Copyright 2013 Ernest Micklei. All rights reserved. 4 | // Use of this source code is governed by a license 5 | // that can be found in the LICENSE file. 6 | 7 | import "fmt" 8 | 9 | // ServiceError is a transport object to pass information about a non-Http error occurred in a WebService while processing a request. 10 | type ServiceError struct { 11 | Code int 12 | Message string 13 | } 14 | 15 | // NewError returns a ServiceError using the code and reason 16 | func NewError(code int, message string) ServiceError { 17 | return ServiceError{Code: code, Message: message} 18 | } 19 | 20 | // Error returns a text representation of the service error 21 | func (s ServiceError) Error() string { 22 | return fmt.Sprintf("[ServiceError:%v] %v", s.Code, s.Message) 23 | } 24 | -------------------------------------------------------------------------------- /vendor/github.com/emicklei/go-restful/web_service_container.go: -------------------------------------------------------------------------------- 1 | package restful 2 | 3 | // Copyright 2013 Ernest Micklei. All rights reserved. 4 | // Use of this source code is governed by a license 5 | // that can be found in the LICENSE file. 6 | 7 | import ( 8 | "net/http" 9 | ) 10 | 11 | // DefaultContainer is a restful.Container that uses http.DefaultServeMux 12 | var DefaultContainer *Container 13 | 14 | func init() { 15 | DefaultContainer = NewContainer() 16 | DefaultContainer.ServeMux = http.DefaultServeMux 17 | } 18 | 19 | // If set the true then panics will not be caught to return HTTP 500. 20 | // In that case, Route functions are responsible for handling any error situation. 21 | // Default value is false = recover from panics. This has performance implications. 22 | // OBSOLETE ; use restful.DefaultContainer.DoNotRecover(true) 23 | var DoNotRecover = false 24 | 25 | // Add registers a new WebService add it to the DefaultContainer. 26 | func Add(service *WebService) { 27 | DefaultContainer.Add(service) 28 | } 29 | 30 | // Filter appends a container FilterFunction from the DefaultContainer. 31 | // These are called before dispatching a http.Request to a WebService. 32 | func Filter(filter FilterFunction) { 33 | DefaultContainer.Filter(filter) 34 | } 35 | 36 | // RegisteredWebServices returns the collections of WebServices from the DefaultContainer 37 | func RegisteredWebServices() []*WebService { 38 | return DefaultContainer.RegisteredWebServices() 39 | } 40 | -------------------------------------------------------------------------------- /vendor/github.com/go-openapi/jsonpointer/README.md: -------------------------------------------------------------------------------- 1 | # gojsonpointer [![Build Status](https://ci.vmware.run/api/badges/go-openapi/jsonpointer/status.svg)](https://ci.vmware.run/go-openapi/jsonpointer) [![Coverage](https://coverage.vmware.run/badges/go-openapi/jsonpointer/coverage.svg)](https://coverage.vmware.run/go-openapi/jsonpointer) [![Slack Status](https://slackin.goswagger.io/badge.svg)](https://slackin.goswagger.io) 2 | 3 | [![license](http://img.shields.io/badge/license-Apache%20v2-orange.svg)](https://raw.githubusercontent.com/go-openapi/jsonpointer/master/LICENSE) [![GoDoc](https://godoc.org/github.com/go-openapi/jsonpointer?status.svg)](http://godoc.org/github.com/go-openapi/jsonpointer) 4 | An implementation of JSON Pointer - Go language 5 | 6 | ## Status 7 | Completed YES 8 | 9 | Tested YES 10 | 11 | ## References 12 | http://tools.ietf.org/html/draft-ietf-appsawg-json-pointer-07 13 | 14 | ### Note 15 | The 4.Evaluation part of the previous reference, starting with 'If the currently referenced value is a JSON array, the reference token MUST contain either...' is not implemented. 16 | -------------------------------------------------------------------------------- /vendor/github.com/go-openapi/jsonreference/README.md: -------------------------------------------------------------------------------- 1 | # gojsonreference [![Build Status](https://ci.vmware.run/api/badges/go-openapi/jsonreference/status.svg)](https://ci.vmware.run/go-openapi/jsonreference) [![Coverage](https://coverage.vmware.run/badges/go-openapi/jsonreference/coverage.svg)](https://coverage.vmware.run/go-openapi/jsonreference) [![Slack Status](https://slackin.goswagger.io/badge.svg)](https://slackin.goswagger.io) 2 | 3 | [![license](http://img.shields.io/badge/license-Apache%20v2-orange.svg)](https://raw.githubusercontent.com/go-openapi/jsonreference/master/LICENSE) [![GoDoc](https://godoc.org/github.com/go-openapi/jsonreference?status.svg)](http://godoc.org/github.com/go-openapi/jsonreference) 4 | An implementation of JSON Reference - Go language 5 | 6 | ## Status 7 | Work in progress ( 90% done ) 8 | 9 | ## Dependencies 10 | https://github.com/xeipuuv/gojsonpointer 11 | 12 | ## References 13 | http://tools.ietf.org/html/draft-ietf-appsawg-json-pointer-07 14 | 15 | http://tools.ietf.org/html/draft-pbryan-zyp-json-ref-03 16 | -------------------------------------------------------------------------------- /vendor/github.com/go-openapi/spec/README.md: -------------------------------------------------------------------------------- 1 | # OAI object model [![Build Status](https://travis-ci.org/go-openapi/spec.svg?branch=master)](https://travis-ci.org/go-openapi/spec) [![codecov](https://codecov.io/gh/go-openapi/spec/branch/master/graph/badge.svg)](https://codecov.io/gh/go-openapi/spec) [![Slack Status](https://slackin.goswagger.io/badge.svg)](https://slackin.goswagger.io) 2 | 3 | [![license](http://img.shields.io/badge/license-Apache%20v2-orange.svg)](https://raw.githubusercontent.com/go-openapi/spec/master/LICENSE) [![GoDoc](https://godoc.org/github.com/go-openapi/spec?status.svg)](http://godoc.org/github.com/go-openapi/spec) 4 | 5 | The object model for OpenAPI specification documents 6 | -------------------------------------------------------------------------------- /vendor/github.com/go-openapi/spec/contact_info.go: -------------------------------------------------------------------------------- 1 | // Copyright 2015 go-swagger maintainers 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | 15 | package spec 16 | 17 | // ContactInfo contact information for the exposed API. 18 | // 19 | // For more information: http://goo.gl/8us55a#contactObject 20 | type ContactInfo struct { 21 | Name string `json:"name,omitempty"` 22 | URL string `json:"url,omitempty"` 23 | Email string `json:"email,omitempty"` 24 | } 25 | -------------------------------------------------------------------------------- /vendor/github.com/go-openapi/spec/debug.test: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/3ofcoins/jetpack/502c8ae5af14d4c086b56171e893e17c60436710/vendor/github.com/go-openapi/spec/debug.test -------------------------------------------------------------------------------- /vendor/github.com/go-openapi/spec/external_docs.go: -------------------------------------------------------------------------------- 1 | // Copyright 2015 go-swagger maintainers 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | 15 | package spec 16 | 17 | // ExternalDocumentation allows referencing an external resource for 18 | // extended documentation. 19 | // 20 | // For more information: http://goo.gl/8us55a#externalDocumentationObject 21 | type ExternalDocumentation struct { 22 | Description string `json:"description,omitempty"` 23 | URL string `json:"url,omitempty"` 24 | } 25 | -------------------------------------------------------------------------------- /vendor/github.com/go-openapi/spec/license.go: -------------------------------------------------------------------------------- 1 | // Copyright 2015 go-swagger maintainers 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | 15 | package spec 16 | 17 | // License information for the exposed API. 18 | // 19 | // For more information: http://goo.gl/8us55a#licenseObject 20 | type License struct { 21 | Name string `json:"name,omitempty"` 22 | URL string `json:"url,omitempty"` 23 | } 24 | -------------------------------------------------------------------------------- /vendor/github.com/go-openapi/swag/README.md: -------------------------------------------------------------------------------- 1 | # Swag [![Build Status](https://travis-ci.org/go-openapi/swag.svg?branch=master)](https://travis-ci.org/go-openapi/swag) [![codecov](https://codecov.io/gh/go-openapi/swag/branch/master/graph/badge.svg)](https://codecov.io/gh/go-openapi/swag) [![Slack Status](https://slackin.goswagger.io/badge.svg)](https://slackin.goswagger.io) 2 | 3 | [![license](http://img.shields.io/badge/license-Apache%20v2-orange.svg)](https://raw.githubusercontent.com/go-openapi/swag/master/LICENSE) [![GoDoc](https://godoc.org/github.com/go-openapi/swag?status.svg)](http://godoc.org/github.com/go-openapi/swag) 4 | 5 | Contains a bunch of helper functions: 6 | 7 | * convert between value and pointers for builtins 8 | * convert from string to builtin 9 | * fast json concatenation 10 | * search in path 11 | * load from file or http 12 | * name manglin -------------------------------------------------------------------------------- /vendor/github.com/go-openapi/swag/net.go: -------------------------------------------------------------------------------- 1 | package swag 2 | 3 | import ( 4 | "net" 5 | "strconv" 6 | ) 7 | 8 | // SplitHostPort splits a network address into a host and a port. 9 | // The port is -1 when there is no port to be found 10 | func SplitHostPort(addr string) (host string, port int, err error) { 11 | h, p, err := net.SplitHostPort(addr) 12 | if err != nil { 13 | return "", -1, err 14 | } 15 | if p == "" { 16 | return "", -1, &net.AddrError{Err: "missing port in address", Addr: addr} 17 | } 18 | 19 | pi, err := strconv.Atoi(p) 20 | if err != nil { 21 | return "", -1, err 22 | } 23 | return h, pi, nil 24 | } 25 | -------------------------------------------------------------------------------- /vendor/github.com/hashicorp/go-multierror/Makefile: -------------------------------------------------------------------------------- 1 | TEST?=./... 2 | 3 | default: test 4 | 5 | # test runs the test suite and vets the code. 6 | test: generate 7 | @echo "==> Running tests..." 8 | @go list $(TEST) \ 9 | | grep -v "/vendor/" \ 10 | | xargs -n1 go test -timeout=60s -parallel=10 ${TESTARGS} 11 | 12 | # testrace runs the race checker 13 | testrace: generate 14 | @echo "==> Running tests (race)..." 15 | @go list $(TEST) \ 16 | | grep -v "/vendor/" \ 17 | | xargs -n1 go test -timeout=60s -race ${TESTARGS} 18 | 19 | # updatedeps installs all the dependencies needed to run and build. 20 | updatedeps: 21 | @sh -c "'${CURDIR}/scripts/deps.sh' '${NAME}'" 22 | 23 | # generate runs `go generate` to build the dynamically generated source files. 24 | generate: 25 | @echo "==> Generating..." 26 | @find . -type f -name '.DS_Store' -delete 27 | @go list ./... \ 28 | | grep -v "/vendor/" \ 29 | | xargs -n1 go generate 30 | 31 | .PHONY: default test testrace updatedeps generate 32 | -------------------------------------------------------------------------------- /vendor/github.com/hashicorp/go-multierror/append.go: -------------------------------------------------------------------------------- 1 | package multierror 2 | 3 | // Append is a helper function that will append more errors 4 | // onto an Error in order to create a larger multi-error. 5 | // 6 | // If err is not a multierror.Error, then it will be turned into 7 | // one. If any of the errs are multierr.Error, they will be flattened 8 | // one level into err. 9 | func Append(err error, errs ...error) *Error { 10 | switch err := err.(type) { 11 | case *Error: 12 | // Typed nils can reach here, so initialize if we are nil 13 | if err == nil { 14 | err = new(Error) 15 | } 16 | 17 | // Go through each error and flatten 18 | for _, e := range errs { 19 | switch e := e.(type) { 20 | case *Error: 21 | err.Errors = append(err.Errors, e.Errors...) 22 | default: 23 | err.Errors = append(err.Errors, e) 24 | } 25 | } 26 | 27 | return err 28 | default: 29 | newErrs := make([]error, 0, len(errs)+1) 30 | if err != nil { 31 | newErrs = append(newErrs, err) 32 | } 33 | newErrs = append(newErrs, errs...) 34 | 35 | return Append(&Error{}, newErrs...) 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /vendor/github.com/hashicorp/go-multierror/flatten.go: -------------------------------------------------------------------------------- 1 | package multierror 2 | 3 | // Flatten flattens the given error, merging any *Errors together into 4 | // a single *Error. 5 | func Flatten(err error) error { 6 | // If it isn't an *Error, just return the error as-is 7 | if _, ok := err.(*Error); !ok { 8 | return err 9 | } 10 | 11 | // Otherwise, make the result and flatten away! 12 | flatErr := new(Error) 13 | flatten(err, flatErr) 14 | return flatErr 15 | } 16 | 17 | func flatten(err error, flatErr *Error) { 18 | switch err := err.(type) { 19 | case *Error: 20 | for _, e := range err.Errors { 21 | flatten(e, flatErr) 22 | } 23 | default: 24 | flatErr.Errors = append(flatErr.Errors, err) 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /vendor/github.com/hashicorp/go-multierror/format.go: -------------------------------------------------------------------------------- 1 | package multierror 2 | 3 | import ( 4 | "fmt" 5 | "strings" 6 | ) 7 | 8 | // ErrorFormatFunc is a function callback that is called by Error to 9 | // turn the list of errors into a string. 10 | type ErrorFormatFunc func([]error) string 11 | 12 | // ListFormatFunc is a basic formatter that outputs the number of errors 13 | // that occurred along with a bullet point list of the errors. 14 | func ListFormatFunc(es []error) string { 15 | points := make([]string, len(es)) 16 | for i, err := range es { 17 | points[i] = fmt.Sprintf("* %s", err) 18 | } 19 | 20 | return fmt.Sprintf( 21 | "%d error(s) occurred:\n\n%s", 22 | len(es), strings.Join(points, "\n")) 23 | } 24 | -------------------------------------------------------------------------------- /vendor/github.com/hashicorp/go-multierror/prefix.go: -------------------------------------------------------------------------------- 1 | package multierror 2 | 3 | import ( 4 | "fmt" 5 | 6 | "github.com/hashicorp/errwrap" 7 | ) 8 | 9 | // Prefix is a helper function that will prefix some text 10 | // to the given error. If the error is a multierror.Error, then 11 | // it will be prefixed to each wrapped error. 12 | // 13 | // This is useful to use when appending multiple multierrors 14 | // together in order to give better scoping. 15 | func Prefix(err error, prefix string) error { 16 | if err == nil { 17 | return nil 18 | } 19 | 20 | format := fmt.Sprintf("%s {{err}}", prefix) 21 | switch err := err.(type) { 22 | case *Error: 23 | // Typed nils can reach here, so initialize if we are nil 24 | if err == nil { 25 | err = new(Error) 26 | } 27 | 28 | // Wrap each of the errors 29 | for i, e := range err.Errors { 30 | err.Errors[i] = errwrap.Wrapf(format, e) 31 | } 32 | 33 | return err 34 | default: 35 | return errwrap.Wrapf(format, err) 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /vendor/github.com/juju/errors/Makefile: -------------------------------------------------------------------------------- 1 | default: check 2 | 3 | check: 4 | go test && go test -compiler gccgo 5 | 6 | docs: 7 | godoc2md github.com/juju/errors > README.md 8 | sed -i 's|\[godoc-link-here\]|[![GoDoc](https://godoc.org/github.com/juju/errors?status.svg)](https://godoc.org/github.com/juju/errors)|' README.md 9 | 10 | 11 | .PHONY: default check docs 12 | -------------------------------------------------------------------------------- /vendor/github.com/juju/errors/path.go: -------------------------------------------------------------------------------- 1 | // Copyright 2013, 2014 Canonical Ltd. 2 | // Licensed under the LGPLv3, see LICENCE file for details. 3 | 4 | package errors 5 | 6 | import ( 7 | "runtime" 8 | "strings" 9 | ) 10 | 11 | // prefixSize is used internally to trim the user specific path from the 12 | // front of the returned filenames from the runtime call stack. 13 | var prefixSize int 14 | 15 | // goPath is the deduced path based on the location of this file as compiled. 16 | var goPath string 17 | 18 | func init() { 19 | _, file, _, ok := runtime.Caller(0) 20 | if file == "?" { 21 | return 22 | } 23 | if ok { 24 | // We know that the end of the file should be: 25 | // github.com/juju/errors/path.go 26 | size := len(file) 27 | suffix := len("github.com/juju/errors/path.go") 28 | goPath = file[:size-suffix] 29 | prefixSize = len(goPath) 30 | } 31 | } 32 | 33 | func trimGoPath(filename string) string { 34 | if strings.HasPrefix(filename, goPath) { 35 | return filename[prefixSize:] 36 | } 37 | return filename 38 | } 39 | -------------------------------------------------------------------------------- /vendor/github.com/magiconair/properties/LICENSE: -------------------------------------------------------------------------------- 1 | goproperties - properties file decoder for Go 2 | 3 | Copyright (c) 2013-2014 - Frank Schroeder 4 | 5 | All rights reserved. 6 | 7 | Redistribution and use in source and binary forms, with or without 8 | modification, are permitted provided that the following conditions are met: 9 | 10 | 1. Redistributions of source code must retain the above copyright notice, this 11 | list of conditions and the following disclaimer. 12 | 2. Redistributions in binary form must reproduce the above copyright notice, 13 | this list of conditions and the following disclaimer in the documentation 14 | and/or other materials provided with the distribution. 15 | 16 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 17 | ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 18 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 19 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR 20 | ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 21 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 22 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 23 | ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 24 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 25 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 | -------------------------------------------------------------------------------- /vendor/github.com/magiconair/properties/_third_party/gopkg.in/check.v1/README.md: -------------------------------------------------------------------------------- 1 | Instructions 2 | ============ 3 | 4 | Install the package with: 5 | 6 | go get gopkg.in/check.v1 7 | 8 | Import it with: 9 | 10 | import "gopkg.in/check.v1" 11 | 12 | and use _check_ as the package name inside the code. 13 | 14 | For more details, visit the project page: 15 | 16 | * http://labix.org/gocheck 17 | 18 | and the API documentation: 19 | 20 | * https://gopkg.in/check.v1 21 | -------------------------------------------------------------------------------- /vendor/github.com/magiconair/properties/_third_party/gopkg.in/check.v1/TODO: -------------------------------------------------------------------------------- 1 | - Assert(slice, Contains, item) 2 | - Parallel test support 3 | -------------------------------------------------------------------------------- /vendor/github.com/magiconair/properties/_third_party/gopkg.in/check.v1/export_test.go: -------------------------------------------------------------------------------- 1 | package check 2 | 3 | func PrintLine(filename string, line int) (string, error) { 4 | return printLine(filename, line) 5 | } 6 | 7 | func Indent(s, with string) string { 8 | return indent(s, with) 9 | } 10 | -------------------------------------------------------------------------------- /vendor/github.com/magiconair/properties/integrate.go: -------------------------------------------------------------------------------- 1 | // Copyright 2016 Frank Schroeder. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package properties 6 | 7 | import "flag" 8 | 9 | // MustFlag sets flags that are skipped by dst.Parse when p contains 10 | // the respective key for flag.Flag.Name. 11 | // 12 | // It's use is recommended with command line arguments as in: 13 | // flag.Parse() 14 | // p.MustFlag(flag.CommandLine) 15 | func (p *Properties) MustFlag(dst *flag.FlagSet) { 16 | m := make(map[string]*flag.Flag) 17 | dst.VisitAll(func(f *flag.Flag) { 18 | m[f.Name] = f 19 | }) 20 | dst.Visit(func(f *flag.Flag) { 21 | delete(m, f.Name) // overridden 22 | }) 23 | 24 | for name, f := range m { 25 | v, ok := p.Get(name) 26 | if !ok { 27 | continue 28 | } 29 | 30 | if err := f.Value.Set(v); err != nil { 31 | ErrorHandler(err) 32 | } 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /vendor/github.com/magiconair/properties/rangecheck.go: -------------------------------------------------------------------------------- 1 | // Copyright 2016 Frank Schroeder. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package properties 6 | 7 | import ( 8 | "fmt" 9 | "math" 10 | ) 11 | 12 | // make this a var to overwrite it in a test 13 | var is32Bit = ^uint(0) == math.MaxUint32 14 | 15 | // intRangeCheck checks if the value fits into the int type and 16 | // panics if it does not. 17 | func intRangeCheck(key string, v int64) int { 18 | if is32Bit && (v < math.MinInt32 || v > math.MaxInt32) { 19 | panic(fmt.Sprintf("Value %d for key %s out of range", v, key)) 20 | } 21 | return int(v) 22 | } 23 | 24 | // uintRangeCheck checks if the value fits into the uint type and 25 | // panics if it does not. 26 | func uintRangeCheck(key string, v uint64) uint { 27 | if is32Bit && v > math.MaxUint32 { 28 | panic(fmt.Sprintf("Value %d for key %s out of range", v, key)) 29 | } 30 | return uint(v) 31 | } 32 | -------------------------------------------------------------------------------- /vendor/github.com/mailru/easyjson/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2016 Mail.Ru Group 2 | 3 | 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: 4 | 5 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 6 | 7 | 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. 8 | -------------------------------------------------------------------------------- /vendor/github.com/mailru/easyjson/jlexer/error.go: -------------------------------------------------------------------------------- 1 | package jlexer 2 | 3 | import "fmt" 4 | 5 | // LexerError implements the error interface and represents all possible errors that can be 6 | // generated during parsing the JSON data. 7 | type LexerError struct { 8 | Reason string 9 | Offset int 10 | Data string 11 | } 12 | 13 | func (l *LexerError) Error() string { 14 | return fmt.Sprintf("parse error: %s near offset %d of '%s'", l.Reason, l.Offset, l.Data) 15 | } 16 | -------------------------------------------------------------------------------- /vendor/github.com/mattrobenolt/size/README.rst: -------------------------------------------------------------------------------- 1 | size 2 | ==== 3 | 4 | .. image:: https://travis-ci.org/mattrobenolt/size.svg?branch=master 5 | :target: https://travis-ci.org/mattrobenolt/size 6 | 7 | .. image:: https://godoc.org/github.com/mattrobenolt/size?status.png 8 | :target: https://godoc.org/github.com/mattrobenolt/size 9 | 10 | ``size`` is a package for working with byte capacities similar to ``time.Duration``. 11 | 12 | Usage 13 | ~~~~~ 14 | 15 | .. code-block:: go 16 | 17 | // Returns a Capacity which is a uint64 representing 18 | // 5 gigabytes in bytes. 19 | 5*size.Gigabyte 20 | 21 | // Turn the string "5G" into a Capacity 22 | // Useful for parsing from flags. 23 | size.ParseCapacity("5G") 24 | 25 | Installation 26 | ~~~~~~~~~~~~ 27 | 28 | .. code-block:: console 29 | 30 | $ go get github.com/mattrobenolt/size 31 | 32 | Resources 33 | ~~~~~~~~~ 34 | * `Documentation `_ 35 | -------------------------------------------------------------------------------- /vendor/github.com/mgutz/ansi/LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | Copyright (c) 2013 Mario L. Gutierrez 3 | 4 | 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: 5 | 6 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 7 | 8 | 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. 9 | 10 | -------------------------------------------------------------------------------- /vendor/github.com/mgutz/ansi/print.go: -------------------------------------------------------------------------------- 1 | package ansi 2 | 3 | // PrintStyles prints all style combinations to the terminal. 4 | func PrintStyles() { 5 | oldPlain := plain 6 | plain = false 7 | 8 | bgColors := []string{ 9 | "", 10 | ":black", 11 | ":red", 12 | ":green", 13 | ":yellow", 14 | ":blue", 15 | ":magenta", 16 | ":cyan", 17 | ":white", 18 | } 19 | for fg := range Colors { 20 | for _, bg := range bgColors { 21 | println(padColor(fg, []string{"" + bg, "+b" + bg, "+bh" + bg, "+u" + bg})) 22 | println(padColor(fg, []string{"+uh" + bg, "+B" + bg, "+Bb" + bg /* backgrounds */, "" + bg + "+h"})) 23 | println(padColor(fg, []string{"+b" + bg + "+h", "+bh" + bg + "+h", "+u" + bg + "+h", "+uh" + bg + "+h"})) 24 | } 25 | } 26 | plain = oldPlain 27 | } 28 | 29 | func pad(s string, length int) string { 30 | for len(s) < length { 31 | s += " " 32 | } 33 | return s 34 | } 35 | 36 | func padColor(s string, styles []string) string { 37 | buffer := "" 38 | for _, style := range styles { 39 | buffer += Color(pad(s+style, 20), s+style) 40 | } 41 | return buffer 42 | } 43 | -------------------------------------------------------------------------------- /vendor/github.com/pborman/uuid/CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # How to contribute 2 | 3 | We definitely welcome patches and contribution to this project! 4 | 5 | ### Legal requirements 6 | 7 | In order to protect both you and ourselves, you will need to sign the 8 | [Contributor License Agreement](https://cla.developers.google.com/clas). 9 | 10 | You may have already signed it for other Google projects. 11 | -------------------------------------------------------------------------------- /vendor/github.com/pborman/uuid/CONTRIBUTORS: -------------------------------------------------------------------------------- 1 | Paul Borman 2 | -------------------------------------------------------------------------------- /vendor/github.com/pborman/uuid/README.md: -------------------------------------------------------------------------------- 1 | This project was automatically exported from code.google.com/p/go-uuid 2 | 3 | # uuid ![build status](https://travis-ci.org/pborman/uuid.svg?branch=master) 4 | The uuid package generates and inspects UUIDs based on [RFC 412](http://tools.ietf.org/html/rfc4122) and DCE 1.1: Authentication and Security Services. 5 | 6 | ###### Install 7 | `go get github.com/pborman/uuid` 8 | 9 | ###### Documentation 10 | [![GoDoc](https://godoc.org/github.com/pborman/uuid?status.svg)](http://godoc.org/github.com/pborman/uuid) 11 | 12 | Full `go doc` style documentation for the package can be viewed online without installing this package by using the GoDoc site here: 13 | http://godoc.org/github.com/pborman/uuid 14 | -------------------------------------------------------------------------------- /vendor/github.com/pborman/uuid/doc.go: -------------------------------------------------------------------------------- 1 | // Copyright 2011 Google Inc. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // The uuid package generates and inspects UUIDs. 6 | // 7 | // UUIDs are based on RFC 4122 and DCE 1.1: Authentication and Security Services. 8 | package uuid 9 | -------------------------------------------------------------------------------- /vendor/github.com/pborman/uuid/json.go: -------------------------------------------------------------------------------- 1 | // Copyright 2014 Google Inc. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package uuid 6 | 7 | import "errors" 8 | 9 | func (u UUID) MarshalJSON() ([]byte, error) { 10 | if len(u) != 16 { 11 | return []byte(`""`), nil 12 | } 13 | var js [38]byte 14 | js[0] = '"' 15 | encodeHex(js[1:], u) 16 | js[37] = '"' 17 | return js[:], nil 18 | } 19 | 20 | func (u *UUID) UnmarshalJSON(data []byte) error { 21 | if string(data) == `""` { 22 | return nil 23 | } 24 | if data[0] != '"' { 25 | return errors.New("invalid UUID format") 26 | } 27 | data = data[1 : len(data)-1] 28 | uu := Parse(string(data)) 29 | if uu == nil { 30 | return errors.New("invalid UUID format") 31 | } 32 | *u = uu 33 | return nil 34 | } 35 | -------------------------------------------------------------------------------- /vendor/github.com/pborman/uuid/version1.go: -------------------------------------------------------------------------------- 1 | // Copyright 2011 Google Inc. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package uuid 6 | 7 | import ( 8 | "encoding/binary" 9 | ) 10 | 11 | // NewUUID returns a Version 1 UUID based on the current NodeID and clock 12 | // sequence, and the current time. If the NodeID has not been set by SetNodeID 13 | // or SetNodeInterface then it will be set automatically. If the NodeID cannot 14 | // be set NewUUID returns nil. If clock sequence has not been set by 15 | // SetClockSequence then it will be set automatically. If GetTime fails to 16 | // return the current NewUUID returns nil. 17 | func NewUUID() UUID { 18 | if nodeID == nil { 19 | SetNodeInterface("") 20 | } 21 | 22 | now, seq, err := GetTime() 23 | if err != nil { 24 | return nil 25 | } 26 | 27 | uuid := make([]byte, 16) 28 | 29 | time_low := uint32(now & 0xffffffff) 30 | time_mid := uint16((now >> 32) & 0xffff) 31 | time_hi := uint16((now >> 48) & 0x0fff) 32 | time_hi |= 0x1000 // Version 1 33 | 34 | binary.BigEndian.PutUint32(uuid[0:], time_low) 35 | binary.BigEndian.PutUint16(uuid[4:], time_mid) 36 | binary.BigEndian.PutUint16(uuid[6:], time_hi) 37 | binary.BigEndian.PutUint16(uuid[8:], seq) 38 | copy(uuid[10:], nodeID) 39 | 40 | return uuid 41 | } 42 | -------------------------------------------------------------------------------- /vendor/github.com/pborman/uuid/version4.go: -------------------------------------------------------------------------------- 1 | // Copyright 2011 Google Inc. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package uuid 6 | 7 | // Random returns a Random (Version 4) UUID or panics. 8 | // 9 | // The strength of the UUIDs is based on the strength of the crypto/rand 10 | // package. 11 | // 12 | // A note about uniqueness derived from from the UUID Wikipedia entry: 13 | // 14 | // Randomly generated UUIDs have 122 random bits. One's annual risk of being 15 | // hit by a meteorite is estimated to be one chance in 17 billion, that 16 | // means the probability is about 0.00000000006 (6 × 10−11), 17 | // equivalent to the odds of creating a few tens of trillions of UUIDs in a 18 | // year and having one duplicate. 19 | func NewRandom() UUID { 20 | uuid := make([]byte, 16) 21 | randomBits([]byte(uuid)) 22 | uuid[6] = (uuid[6] & 0x0f) | 0x40 // Version 4 23 | uuid[8] = (uuid[8] & 0x3f) | 0x80 // Variant is 10 24 | return uuid 25 | } 26 | -------------------------------------------------------------------------------- /vendor/golang.org/x/crypto/AUTHORS: -------------------------------------------------------------------------------- 1 | # This source code refers to The Go Authors for copyright purposes. 2 | # The master list of authors is in the main Go distribution, 3 | # visible at http://tip.golang.org/AUTHORS. 4 | -------------------------------------------------------------------------------- /vendor/golang.org/x/crypto/CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # Contributing to Go 2 | 3 | Go is an open source project. 4 | 5 | It is the work of hundreds of contributors. We appreciate your help! 6 | 7 | 8 | ## Filing issues 9 | 10 | When [filing an issue](https://golang.org/issue/new), make sure to answer these five questions: 11 | 12 | 1. What version of Go are you using (`go version`)? 13 | 2. What operating system and processor architecture are you using? 14 | 3. What did you do? 15 | 4. What did you expect to see? 16 | 5. What did you see instead? 17 | 18 | General questions should go to the [golang-nuts mailing list](https://groups.google.com/group/golang-nuts) instead of the issue tracker. 19 | The gophers there will answer or ask you to file an issue if you've tripped over a bug. 20 | 21 | ## Contributing code 22 | 23 | Please read the [Contribution Guidelines](https://golang.org/doc/contribute.html) 24 | before sending patches. 25 | 26 | **We do not accept GitHub pull requests** 27 | (we use [Gerrit](https://code.google.com/p/gerrit/) instead for code review). 28 | 29 | Unless otherwise noted, the Go source files are distributed under 30 | the BSD-style license found in the LICENSE file. 31 | 32 | -------------------------------------------------------------------------------- /vendor/golang.org/x/crypto/CONTRIBUTORS: -------------------------------------------------------------------------------- 1 | # This source code was written by the Go contributors. 2 | # The master list of contributors is in the main Go distribution, 3 | # visible at http://tip.golang.org/CONTRIBUTORS. 4 | -------------------------------------------------------------------------------- /vendor/golang.org/x/crypto/PATENTS: -------------------------------------------------------------------------------- 1 | Additional IP Rights Grant (Patents) 2 | 3 | "This implementation" means the copyrightable works distributed by 4 | Google as part of the Go project. 5 | 6 | Google hereby grants to You a perpetual, worldwide, non-exclusive, 7 | no-charge, royalty-free, irrevocable (except as stated in this section) 8 | patent license to make, have made, use, offer to sell, sell, import, 9 | transfer and otherwise run, modify and propagate the contents of this 10 | implementation of Go, where such license applies only to those patent 11 | claims, both currently owned or controlled by Google and acquired in 12 | the future, licensable by Google that are necessarily infringed by this 13 | implementation of Go. This grant does not include claims that would be 14 | infringed only as a consequence of further modification of this 15 | implementation. If you or your agent or exclusive licensee institute or 16 | order or agree to the institution of patent litigation against any 17 | entity (including a cross-claim or counterclaim in a lawsuit) alleging 18 | that this implementation of Go or any code incorporated within this 19 | implementation of Go constitutes direct or contributory patent 20 | infringement, or inducement of patent infringement, then any patent 21 | rights granted to you under this License for this implementation of Go 22 | shall terminate as of the date such litigation is filed. 23 | -------------------------------------------------------------------------------- /vendor/golang.org/x/crypto/README: -------------------------------------------------------------------------------- 1 | This repository holds supplementary Go cryptography libraries. 2 | 3 | To submit changes to this repository, see http://golang.org/doc/contribute.html. 4 | -------------------------------------------------------------------------------- /vendor/golang.org/x/crypto/codereview.cfg: -------------------------------------------------------------------------------- 1 | issuerepo: golang/go 2 | -------------------------------------------------------------------------------- /vendor/golang.org/x/crypto/openpgp/canonical_text.go: -------------------------------------------------------------------------------- 1 | // Copyright 2011 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package openpgp 6 | 7 | import "hash" 8 | 9 | // NewCanonicalTextHash reformats text written to it into the canonical 10 | // form and then applies the hash h. See RFC 4880, section 5.2.1. 11 | func NewCanonicalTextHash(h hash.Hash) hash.Hash { 12 | return &canonicalTextHash{h, 0} 13 | } 14 | 15 | type canonicalTextHash struct { 16 | h hash.Hash 17 | s int 18 | } 19 | 20 | var newline = []byte{'\r', '\n'} 21 | 22 | func (cth *canonicalTextHash) Write(buf []byte) (int, error) { 23 | start := 0 24 | 25 | for i, c := range buf { 26 | switch cth.s { 27 | case 0: 28 | if c == '\r' { 29 | cth.s = 1 30 | } else if c == '\n' { 31 | cth.h.Write(buf[start:i]) 32 | cth.h.Write(newline) 33 | start = i + 1 34 | } 35 | case 1: 36 | cth.s = 0 37 | } 38 | } 39 | 40 | cth.h.Write(buf[start:]) 41 | return len(buf), nil 42 | } 43 | 44 | func (cth *canonicalTextHash) Sum(in []byte) []byte { 45 | return cth.h.Sum(in) 46 | } 47 | 48 | func (cth *canonicalTextHash) Reset() { 49 | cth.h.Reset() 50 | cth.s = 0 51 | } 52 | 53 | func (cth *canonicalTextHash) Size() int { 54 | return cth.h.Size() 55 | } 56 | 57 | func (cth *canonicalTextHash) BlockSize() int { 58 | return cth.h.BlockSize() 59 | } 60 | -------------------------------------------------------------------------------- /vendor/golang.org/x/crypto/sha3/testdata/keccakKats.json.deflate: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/3ofcoins/jetpack/502c8ae5af14d4c086b56171e893e17c60436710/vendor/golang.org/x/crypto/sha3/testdata/keccakKats.json.deflate -------------------------------------------------------------------------------- /vendor/golang.org/x/crypto/ssh/terminal/util_bsd.go: -------------------------------------------------------------------------------- 1 | // Copyright 2013 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build darwin dragonfly freebsd netbsd openbsd 6 | 7 | package terminal 8 | 9 | import "syscall" 10 | 11 | const ioctlReadTermios = syscall.TIOCGETA 12 | const ioctlWriteTermios = syscall.TIOCSETA 13 | -------------------------------------------------------------------------------- /vendor/golang.org/x/crypto/ssh/terminal/util_linux.go: -------------------------------------------------------------------------------- 1 | // Copyright 2013 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package terminal 6 | 7 | // These constants are declared here, rather than importing 8 | // them from the syscall package as some syscall packages, even 9 | // on linux, for example gccgo, do not declare them. 10 | const ioctlReadTermios = 0x5401 // syscall.TCGETS 11 | const ioctlWriteTermios = 0x5402 // syscall.TCSETS 12 | -------------------------------------------------------------------------------- /vendor/golang.org/x/crypto/ssh/testdata/doc.go: -------------------------------------------------------------------------------- 1 | // Copyright 2014 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // This package contains test data shared between the various subpackages of 6 | // the golang.org/x/crypto/ssh package. Under no circumstance should 7 | // this data be used for production code. 8 | package testdata // import "golang.org/x/crypto/ssh/testdata" 9 | -------------------------------------------------------------------------------- /vendor/golang.org/x/net/PATENTS: -------------------------------------------------------------------------------- 1 | Additional IP Rights Grant (Patents) 2 | 3 | "This implementation" means the copyrightable works distributed by 4 | Google as part of the Go project. 5 | 6 | Google hereby grants to You a perpetual, worldwide, non-exclusive, 7 | no-charge, royalty-free, irrevocable (except as stated in this section) 8 | patent license to make, have made, use, offer to sell, sell, import, 9 | transfer and otherwise run, modify and propagate the contents of this 10 | implementation of Go, where such license applies only to those patent 11 | claims, both currently owned or controlled by Google and acquired in 12 | the future, licensable by Google that are necessarily infringed by this 13 | implementation of Go. This grant does not include claims that would be 14 | infringed only as a consequence of further modification of this 15 | implementation. If you or your agent or exclusive licensee institute or 16 | order or agree to the institution of patent litigation against any 17 | entity (including a cross-claim or counterclaim in a lawsuit) alleging 18 | that this implementation of Go or any code incorporated within this 19 | implementation of Go constitutes direct or contributory patent 20 | infringement, or inducement of patent infringement, then any patent 21 | rights granted to you under this License for this implementation of Go 22 | shall terminate as of the date such litigation is filed. 23 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/PATENTS: -------------------------------------------------------------------------------- 1 | Additional IP Rights Grant (Patents) 2 | 3 | "This implementation" means the copyrightable works distributed by 4 | Google as part of the Go project. 5 | 6 | Google hereby grants to You a perpetual, worldwide, non-exclusive, 7 | no-charge, royalty-free, irrevocable (except as stated in this section) 8 | patent license to make, have made, use, offer to sell, sell, import, 9 | transfer and otherwise run, modify and propagate the contents of this 10 | implementation of Go, where such license applies only to those patent 11 | claims, both currently owned or controlled by Google and acquired in 12 | the future, licensable by Google that are necessarily infringed by this 13 | implementation of Go. This grant does not include claims that would be 14 | infringed only as a consequence of further modification of this 15 | implementation. If you or your agent or exclusive licensee institute or 16 | order or agree to the institution of patent litigation against any 17 | entity (including a cross-claim or counterclaim in a lawsuit) alleging 18 | that this implementation of Go or any code incorporated within this 19 | implementation of Go constitutes direct or contributory patent 20 | infringement, or inducement of patent infringement, then any patent 21 | rights granted to you under this License for this implementation of Go 22 | shall terminate as of the date such litigation is filed. 23 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/asm.s: -------------------------------------------------------------------------------- 1 | // Copyright 2014 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build !gccgo 6 | 7 | #include "textflag.h" 8 | 9 | TEXT ·use(SB),NOSPLIT,$0 10 | RET 11 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/asm_darwin_386.s: -------------------------------------------------------------------------------- 1 | // Copyright 2009 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build !gccgo 6 | 7 | #include "textflag.h" 8 | 9 | // 10 | // System call support for 386, Darwin 11 | // 12 | 13 | // Just jump to package syscall's implementation for all these functions. 14 | // The runtime may know about them. 15 | 16 | TEXT ·Syscall(SB),NOSPLIT,$0-28 17 | JMP syscall·Syscall(SB) 18 | 19 | TEXT ·Syscall6(SB),NOSPLIT,$0-40 20 | JMP syscall·Syscall6(SB) 21 | 22 | TEXT ·Syscall9(SB),NOSPLIT,$0-52 23 | JMP syscall·Syscall9(SB) 24 | 25 | TEXT ·RawSyscall(SB),NOSPLIT,$0-28 26 | JMP syscall·RawSyscall(SB) 27 | 28 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-40 29 | JMP syscall·RawSyscall6(SB) 30 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/asm_darwin_amd64.s: -------------------------------------------------------------------------------- 1 | // Copyright 2009 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build !gccgo 6 | 7 | #include "textflag.h" 8 | 9 | // 10 | // System call support for AMD64, Darwin 11 | // 12 | 13 | // Just jump to package syscall's implementation for all these functions. 14 | // The runtime may know about them. 15 | 16 | TEXT ·Syscall(SB),NOSPLIT,$0-56 17 | JMP syscall·Syscall(SB) 18 | 19 | TEXT ·Syscall6(SB),NOSPLIT,$0-80 20 | JMP syscall·Syscall6(SB) 21 | 22 | TEXT ·Syscall9(SB),NOSPLIT,$0-104 23 | JMP syscall·Syscall9(SB) 24 | 25 | TEXT ·RawSyscall(SB),NOSPLIT,$0-56 26 | JMP syscall·RawSyscall(SB) 27 | 28 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-80 29 | JMP syscall·RawSyscall6(SB) 30 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/asm_darwin_arm.s: -------------------------------------------------------------------------------- 1 | // Copyright 2015 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build !gccgo 6 | // +build arm,darwin 7 | 8 | #include "textflag.h" 9 | 10 | // 11 | // System call support for ARM, Darwin 12 | // 13 | 14 | // Just jump to package syscall's implementation for all these functions. 15 | // The runtime may know about them. 16 | 17 | TEXT ·Syscall(SB),NOSPLIT,$0-28 18 | B syscall·Syscall(SB) 19 | 20 | TEXT ·Syscall6(SB),NOSPLIT,$0-40 21 | B syscall·Syscall6(SB) 22 | 23 | TEXT ·Syscall9(SB),NOSPLIT,$0-52 24 | B syscall·Syscall9(SB) 25 | 26 | TEXT ·RawSyscall(SB),NOSPLIT,$0-28 27 | B syscall·RawSyscall(SB) 28 | 29 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-40 30 | B syscall·RawSyscall6(SB) 31 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/asm_darwin_arm64.s: -------------------------------------------------------------------------------- 1 | // Copyright 2015 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build !gccgo 6 | // +build arm64,darwin 7 | 8 | #include "textflag.h" 9 | 10 | // 11 | // System call support for AMD64, Darwin 12 | // 13 | 14 | // Just jump to package syscall's implementation for all these functions. 15 | // The runtime may know about them. 16 | 17 | TEXT ·Syscall(SB),NOSPLIT,$0-56 18 | B syscall·Syscall(SB) 19 | 20 | TEXT ·Syscall6(SB),NOSPLIT,$0-80 21 | B syscall·Syscall6(SB) 22 | 23 | TEXT ·Syscall9(SB),NOSPLIT,$0-104 24 | B syscall·Syscall9(SB) 25 | 26 | TEXT ·RawSyscall(SB),NOSPLIT,$0-56 27 | B syscall·RawSyscall(SB) 28 | 29 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-80 30 | B syscall·RawSyscall6(SB) 31 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/asm_dragonfly_amd64.s: -------------------------------------------------------------------------------- 1 | // Copyright 2009 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build !gccgo 6 | 7 | #include "textflag.h" 8 | 9 | // 10 | // System call support for AMD64, DragonFly 11 | // 12 | 13 | // Just jump to package syscall's implementation for all these functions. 14 | // The runtime may know about them. 15 | 16 | TEXT ·Syscall(SB),NOSPLIT,$0-64 17 | JMP syscall·Syscall(SB) 18 | 19 | TEXT ·Syscall6(SB),NOSPLIT,$0-88 20 | JMP syscall·Syscall6(SB) 21 | 22 | TEXT ·Syscall9(SB),NOSPLIT,$0-112 23 | JMP syscall·Syscall9(SB) 24 | 25 | TEXT ·RawSyscall(SB),NOSPLIT,$0-64 26 | JMP syscall·RawSyscall(SB) 27 | 28 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-88 29 | JMP syscall·RawSyscall6(SB) 30 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/asm_freebsd_386.s: -------------------------------------------------------------------------------- 1 | // Copyright 2009 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build !gccgo 6 | 7 | #include "textflag.h" 8 | 9 | // 10 | // System call support for 386, FreeBSD 11 | // 12 | 13 | // Just jump to package syscall's implementation for all these functions. 14 | // The runtime may know about them. 15 | 16 | TEXT ·Syscall(SB),NOSPLIT,$0-28 17 | JMP syscall·Syscall(SB) 18 | 19 | TEXT ·Syscall6(SB),NOSPLIT,$0-40 20 | JMP syscall·Syscall6(SB) 21 | 22 | TEXT ·Syscall9(SB),NOSPLIT,$0-52 23 | JMP syscall·Syscall9(SB) 24 | 25 | TEXT ·RawSyscall(SB),NOSPLIT,$0-28 26 | JMP syscall·RawSyscall(SB) 27 | 28 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-40 29 | JMP syscall·RawSyscall6(SB) 30 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/asm_freebsd_amd64.s: -------------------------------------------------------------------------------- 1 | // Copyright 2009 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build !gccgo 6 | 7 | #include "textflag.h" 8 | 9 | // 10 | // System call support for AMD64, FreeBSD 11 | // 12 | 13 | // Just jump to package syscall's implementation for all these functions. 14 | // The runtime may know about them. 15 | 16 | TEXT ·Syscall(SB),NOSPLIT,$0-56 17 | JMP syscall·Syscall(SB) 18 | 19 | TEXT ·Syscall6(SB),NOSPLIT,$0-80 20 | JMP syscall·Syscall6(SB) 21 | 22 | TEXT ·Syscall9(SB),NOSPLIT,$0-104 23 | JMP syscall·Syscall9(SB) 24 | 25 | TEXT ·RawSyscall(SB),NOSPLIT,$0-56 26 | JMP syscall·RawSyscall(SB) 27 | 28 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-80 29 | JMP syscall·RawSyscall6(SB) 30 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/asm_freebsd_arm.s: -------------------------------------------------------------------------------- 1 | // Copyright 2012 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build !gccgo 6 | 7 | #include "textflag.h" 8 | 9 | // 10 | // System call support for ARM, FreeBSD 11 | // 12 | 13 | // Just jump to package syscall's implementation for all these functions. 14 | // The runtime may know about them. 15 | 16 | TEXT ·Syscall(SB),NOSPLIT,$0-28 17 | B syscall·Syscall(SB) 18 | 19 | TEXT ·Syscall6(SB),NOSPLIT,$0-40 20 | B syscall·Syscall6(SB) 21 | 22 | TEXT ·Syscall9(SB),NOSPLIT,$0-52 23 | B syscall·Syscall9(SB) 24 | 25 | TEXT ·RawSyscall(SB),NOSPLIT,$0-28 26 | B syscall·RawSyscall(SB) 27 | 28 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-40 29 | B syscall·RawSyscall6(SB) 30 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/asm_linux_386.s: -------------------------------------------------------------------------------- 1 | // Copyright 2009 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build !gccgo 6 | 7 | #include "textflag.h" 8 | 9 | // 10 | // System calls for 386, Linux 11 | // 12 | 13 | // Just jump to package syscall's implementation for all these functions. 14 | // The runtime may know about them. 15 | 16 | TEXT ·Syscall(SB),NOSPLIT,$0-28 17 | JMP syscall·Syscall(SB) 18 | 19 | TEXT ·Syscall6(SB),NOSPLIT,$0-40 20 | JMP syscall·Syscall6(SB) 21 | 22 | TEXT ·RawSyscall(SB),NOSPLIT,$0-28 23 | JMP syscall·RawSyscall(SB) 24 | 25 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-40 26 | JMP syscall·RawSyscall6(SB) 27 | 28 | TEXT ·socketcall(SB),NOSPLIT,$0-36 29 | JMP syscall·socketcall(SB) 30 | 31 | TEXT ·rawsocketcall(SB),NOSPLIT,$0-36 32 | JMP syscall·rawsocketcall(SB) 33 | 34 | TEXT ·seek(SB),NOSPLIT,$0-28 35 | JMP syscall·seek(SB) 36 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/asm_linux_amd64.s: -------------------------------------------------------------------------------- 1 | // Copyright 2009 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build !gccgo 6 | 7 | #include "textflag.h" 8 | 9 | // 10 | // System calls for AMD64, Linux 11 | // 12 | 13 | // Just jump to package syscall's implementation for all these functions. 14 | // The runtime may know about them. 15 | 16 | TEXT ·Syscall(SB),NOSPLIT,$0-56 17 | JMP syscall·Syscall(SB) 18 | 19 | TEXT ·Syscall6(SB),NOSPLIT,$0-80 20 | JMP syscall·Syscall6(SB) 21 | 22 | TEXT ·RawSyscall(SB),NOSPLIT,$0-56 23 | JMP syscall·RawSyscall(SB) 24 | 25 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-80 26 | JMP syscall·RawSyscall6(SB) 27 | 28 | TEXT ·gettimeofday(SB),NOSPLIT,$0-16 29 | JMP syscall·gettimeofday(SB) 30 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/asm_linux_arm.s: -------------------------------------------------------------------------------- 1 | // Copyright 2009 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build !gccgo 6 | 7 | #include "textflag.h" 8 | 9 | // 10 | // System calls for arm, Linux 11 | // 12 | 13 | // Just jump to package syscall's implementation for all these functions. 14 | // The runtime may know about them. 15 | 16 | TEXT ·Syscall(SB),NOSPLIT,$0-28 17 | B syscall·Syscall(SB) 18 | 19 | TEXT ·Syscall6(SB),NOSPLIT,$0-40 20 | B syscall·Syscall6(SB) 21 | 22 | TEXT ·RawSyscall(SB),NOSPLIT,$0-28 23 | B syscall·RawSyscall(SB) 24 | 25 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-40 26 | B syscall·RawSyscall6(SB) 27 | 28 | TEXT ·seek(SB),NOSPLIT,$0-32 29 | B syscall·seek(SB) 30 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/asm_linux_arm64.s: -------------------------------------------------------------------------------- 1 | // Copyright 2015 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build linux 6 | // +build arm64 7 | // +build !gccgo 8 | 9 | #include "textflag.h" 10 | 11 | // Just jump to package syscall's implementation for all these functions. 12 | // The runtime may know about them. 13 | 14 | TEXT ·Syscall(SB),NOSPLIT,$0-56 15 | B syscall·Syscall(SB) 16 | 17 | TEXT ·Syscall6(SB),NOSPLIT,$0-80 18 | B syscall·Syscall6(SB) 19 | 20 | TEXT ·RawSyscall(SB),NOSPLIT,$0-56 21 | B syscall·RawSyscall(SB) 22 | 23 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-80 24 | B syscall·RawSyscall6(SB) 25 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/asm_linux_mips64x.s: -------------------------------------------------------------------------------- 1 | // Copyright 2015 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build linux 6 | // +build mips64 mips64le 7 | // +build !gccgo 8 | 9 | #include "textflag.h" 10 | 11 | // 12 | // System calls for mips64, Linux 13 | // 14 | 15 | // Just jump to package syscall's implementation for all these functions. 16 | // The runtime may know about them. 17 | 18 | TEXT ·Syscall(SB),NOSPLIT,$0-56 19 | JMP syscall·Syscall(SB) 20 | 21 | TEXT ·Syscall6(SB),NOSPLIT,$0-80 22 | JMP syscall·Syscall6(SB) 23 | 24 | TEXT ·RawSyscall(SB),NOSPLIT,$0-56 25 | JMP syscall·RawSyscall(SB) 26 | 27 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-80 28 | JMP syscall·RawSyscall6(SB) 29 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/asm_linux_ppc64x.s: -------------------------------------------------------------------------------- 1 | // Copyright 2014 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build linux 6 | // +build ppc64 ppc64le 7 | // +build !gccgo 8 | 9 | #include "textflag.h" 10 | 11 | // 12 | // System calls for ppc64, Linux 13 | // 14 | 15 | // Just jump to package syscall's implementation for all these functions. 16 | // The runtime may know about them. 17 | 18 | TEXT ·Syscall(SB),NOSPLIT,$0-56 19 | BR syscall·Syscall(SB) 20 | 21 | TEXT ·Syscall6(SB),NOSPLIT,$0-80 22 | BR syscall·Syscall6(SB) 23 | 24 | TEXT ·RawSyscall(SB),NOSPLIT,$0-56 25 | BR syscall·RawSyscall(SB) 26 | 27 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-80 28 | BR syscall·RawSyscall6(SB) 29 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/asm_linux_s390x.s: -------------------------------------------------------------------------------- 1 | // Copyright 2016 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build s390x 6 | // +build linux 7 | // +build !gccgo 8 | 9 | #include "textflag.h" 10 | 11 | // 12 | // System calls for s390x, Linux 13 | // 14 | 15 | // Just jump to package syscall's implementation for all these functions. 16 | // The runtime may know about them. 17 | 18 | TEXT ·Syscall(SB),NOSPLIT,$0-56 19 | BR syscall·Syscall(SB) 20 | 21 | TEXT ·Syscall6(SB),NOSPLIT,$0-80 22 | BR syscall·Syscall6(SB) 23 | 24 | TEXT ·RawSyscall(SB),NOSPLIT,$0-56 25 | BR syscall·RawSyscall(SB) 26 | 27 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-80 28 | BR syscall·RawSyscall6(SB) 29 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/asm_netbsd_386.s: -------------------------------------------------------------------------------- 1 | // Copyright 2009 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build !gccgo 6 | 7 | #include "textflag.h" 8 | 9 | // 10 | // System call support for 386, NetBSD 11 | // 12 | 13 | // Just jump to package syscall's implementation for all these functions. 14 | // The runtime may know about them. 15 | 16 | TEXT ·Syscall(SB),NOSPLIT,$0-28 17 | JMP syscall·Syscall(SB) 18 | 19 | TEXT ·Syscall6(SB),NOSPLIT,$0-40 20 | JMP syscall·Syscall6(SB) 21 | 22 | TEXT ·Syscall9(SB),NOSPLIT,$0-52 23 | JMP syscall·Syscall9(SB) 24 | 25 | TEXT ·RawSyscall(SB),NOSPLIT,$0-28 26 | JMP syscall·RawSyscall(SB) 27 | 28 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-40 29 | JMP syscall·RawSyscall6(SB) 30 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/asm_netbsd_amd64.s: -------------------------------------------------------------------------------- 1 | // Copyright 2009 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build !gccgo 6 | 7 | #include "textflag.h" 8 | 9 | // 10 | // System call support for AMD64, NetBSD 11 | // 12 | 13 | // Just jump to package syscall's implementation for all these functions. 14 | // The runtime may know about them. 15 | 16 | TEXT ·Syscall(SB),NOSPLIT,$0-56 17 | JMP syscall·Syscall(SB) 18 | 19 | TEXT ·Syscall6(SB),NOSPLIT,$0-80 20 | JMP syscall·Syscall6(SB) 21 | 22 | TEXT ·Syscall9(SB),NOSPLIT,$0-104 23 | JMP syscall·Syscall9(SB) 24 | 25 | TEXT ·RawSyscall(SB),NOSPLIT,$0-56 26 | JMP syscall·RawSyscall(SB) 27 | 28 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-80 29 | JMP syscall·RawSyscall6(SB) 30 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/asm_netbsd_arm.s: -------------------------------------------------------------------------------- 1 | // Copyright 2013 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build !gccgo 6 | 7 | #include "textflag.h" 8 | 9 | // 10 | // System call support for ARM, NetBSD 11 | // 12 | 13 | // Just jump to package syscall's implementation for all these functions. 14 | // The runtime may know about them. 15 | 16 | TEXT ·Syscall(SB),NOSPLIT,$0-28 17 | B syscall·Syscall(SB) 18 | 19 | TEXT ·Syscall6(SB),NOSPLIT,$0-40 20 | B syscall·Syscall6(SB) 21 | 22 | TEXT ·Syscall9(SB),NOSPLIT,$0-52 23 | B syscall·Syscall9(SB) 24 | 25 | TEXT ·RawSyscall(SB),NOSPLIT,$0-28 26 | B syscall·RawSyscall(SB) 27 | 28 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-40 29 | B syscall·RawSyscall6(SB) 30 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/asm_openbsd_386.s: -------------------------------------------------------------------------------- 1 | // Copyright 2009 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build !gccgo 6 | 7 | #include "textflag.h" 8 | 9 | // 10 | // System call support for 386, OpenBSD 11 | // 12 | 13 | // Just jump to package syscall's implementation for all these functions. 14 | // The runtime may know about them. 15 | 16 | TEXT ·Syscall(SB),NOSPLIT,$0-28 17 | JMP syscall·Syscall(SB) 18 | 19 | TEXT ·Syscall6(SB),NOSPLIT,$0-40 20 | JMP syscall·Syscall6(SB) 21 | 22 | TEXT ·Syscall9(SB),NOSPLIT,$0-52 23 | JMP syscall·Syscall9(SB) 24 | 25 | TEXT ·RawSyscall(SB),NOSPLIT,$0-28 26 | JMP syscall·RawSyscall(SB) 27 | 28 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-40 29 | JMP syscall·RawSyscall6(SB) 30 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/asm_openbsd_amd64.s: -------------------------------------------------------------------------------- 1 | // Copyright 2009 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build !gccgo 6 | 7 | #include "textflag.h" 8 | 9 | // 10 | // System call support for AMD64, OpenBSD 11 | // 12 | 13 | // Just jump to package syscall's implementation for all these functions. 14 | // The runtime may know about them. 15 | 16 | TEXT ·Syscall(SB),NOSPLIT,$0-56 17 | JMP syscall·Syscall(SB) 18 | 19 | TEXT ·Syscall6(SB),NOSPLIT,$0-80 20 | JMP syscall·Syscall6(SB) 21 | 22 | TEXT ·Syscall9(SB),NOSPLIT,$0-104 23 | JMP syscall·Syscall9(SB) 24 | 25 | TEXT ·RawSyscall(SB),NOSPLIT,$0-56 26 | JMP syscall·RawSyscall(SB) 27 | 28 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-80 29 | JMP syscall·RawSyscall6(SB) 30 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/asm_solaris_amd64.s: -------------------------------------------------------------------------------- 1 | // Copyright 2014 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build !gccgo 6 | 7 | #include "textflag.h" 8 | 9 | // 10 | // System calls for amd64, Solaris are implemented in runtime/syscall_solaris.go 11 | // 12 | 13 | TEXT ·sysvicall6(SB),NOSPLIT,$0-64 14 | JMP syscall·sysvicall6(SB) 15 | 16 | TEXT ·rawSysvicall6(SB),NOSPLIT,$0-64 17 | JMP syscall·rawSysvicall6(SB) 18 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/bluetooth_linux.go: -------------------------------------------------------------------------------- 1 | // Copyright 2016 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // Bluetooth sockets and messages 6 | 7 | package unix 8 | 9 | // Bluetooth Protocols 10 | const ( 11 | BTPROTO_L2CAP = 0 12 | BTPROTO_HCI = 1 13 | BTPROTO_SCO = 2 14 | BTPROTO_RFCOMM = 3 15 | BTPROTO_BNEP = 4 16 | BTPROTO_CMTP = 5 17 | BTPROTO_HIDP = 6 18 | BTPROTO_AVDTP = 7 19 | ) 20 | 21 | const ( 22 | HCI_CHANNEL_RAW = 0 23 | HCI_CHANNEL_USER = 1 24 | HCI_CHANNEL_MONITOR = 2 25 | HCI_CHANNEL_CONTROL = 3 26 | ) 27 | 28 | // Socketoption Level 29 | const ( 30 | SOL_BLUETOOTH = 0x112 31 | SOL_HCI = 0x0 32 | SOL_L2CAP = 0x6 33 | SOL_RFCOMM = 0x12 34 | SOL_SCO = 0x11 35 | ) 36 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/constants.go: -------------------------------------------------------------------------------- 1 | // Copyright 2015 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build darwin dragonfly freebsd linux netbsd openbsd solaris 6 | 7 | package unix 8 | 9 | const ( 10 | R_OK = 0x4 11 | W_OK = 0x2 12 | X_OK = 0x1 13 | ) 14 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/env_unix.go: -------------------------------------------------------------------------------- 1 | // Copyright 2010 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build darwin dragonfly freebsd linux netbsd openbsd solaris 6 | 7 | // Unix environment variables. 8 | 9 | package unix 10 | 11 | import "syscall" 12 | 13 | func Getenv(key string) (value string, found bool) { 14 | return syscall.Getenv(key) 15 | } 16 | 17 | func Setenv(key, value string) error { 18 | return syscall.Setenv(key, value) 19 | } 20 | 21 | func Clearenv() { 22 | syscall.Clearenv() 23 | } 24 | 25 | func Environ() []string { 26 | return syscall.Environ() 27 | } 28 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/env_unset.go: -------------------------------------------------------------------------------- 1 | // Copyright 2014 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build go1.4 6 | 7 | package unix 8 | 9 | import "syscall" 10 | 11 | func Unsetenv(key string) error { 12 | // This was added in Go 1.4. 13 | return syscall.Unsetenv(key) 14 | } 15 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/flock.go: -------------------------------------------------------------------------------- 1 | // +build linux darwin freebsd openbsd netbsd dragonfly 2 | 3 | // Copyright 2014 The Go Authors. All rights reserved. 4 | // Use of this source code is governed by a BSD-style 5 | // license that can be found in the LICENSE file. 6 | 7 | // +build darwin dragonfly freebsd linux netbsd openbsd 8 | 9 | package unix 10 | 11 | import "unsafe" 12 | 13 | // fcntl64Syscall is usually SYS_FCNTL, but is overridden on 32-bit Linux 14 | // systems by flock_linux_32bit.go to be SYS_FCNTL64. 15 | var fcntl64Syscall uintptr = SYS_FCNTL 16 | 17 | // FcntlFlock performs a fcntl syscall for the F_GETLK, F_SETLK or F_SETLKW command. 18 | func FcntlFlock(fd uintptr, cmd int, lk *Flock_t) error { 19 | _, _, errno := Syscall(fcntl64Syscall, fd, uintptr(cmd), uintptr(unsafe.Pointer(lk))) 20 | if errno == 0 { 21 | return nil 22 | } 23 | return errno 24 | } 25 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/flock_linux_32bit.go: -------------------------------------------------------------------------------- 1 | // +build linux,386 linux,arm 2 | 3 | // Copyright 2014 The Go Authors. All rights reserved. 4 | // Use of this source code is governed by a BSD-style 5 | // license that can be found in the LICENSE file. 6 | 7 | package unix 8 | 9 | func init() { 10 | // On 32-bit Linux systems, the fcntl syscall that matches Go's 11 | // Flock_t type is SYS_FCNTL64, not SYS_FCNTL. 12 | fcntl64Syscall = SYS_FCNTL64 13 | } 14 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/gccgo_c.c: -------------------------------------------------------------------------------- 1 | // Copyright 2015 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build gccgo 6 | 7 | #include 8 | #include 9 | #include 10 | 11 | #define _STRINGIFY2_(x) #x 12 | #define _STRINGIFY_(x) _STRINGIFY2_(x) 13 | #define GOSYM_PREFIX _STRINGIFY_(__USER_LABEL_PREFIX__) 14 | 15 | // Call syscall from C code because the gccgo support for calling from 16 | // Go to C does not support varargs functions. 17 | 18 | struct ret { 19 | uintptr_t r; 20 | uintptr_t err; 21 | }; 22 | 23 | struct ret 24 | gccgoRealSyscall(uintptr_t trap, uintptr_t a1, uintptr_t a2, uintptr_t a3, uintptr_t a4, uintptr_t a5, uintptr_t a6, uintptr_t a7, uintptr_t a8, uintptr_t a9) 25 | { 26 | struct ret r; 27 | 28 | errno = 0; 29 | r.r = syscall(trap, a1, a2, a3, a4, a5, a6, a7, a8, a9); 30 | r.err = errno; 31 | return r; 32 | } 33 | 34 | // Define the use function in C so that it is not inlined. 35 | 36 | extern void use(void *) __asm__ (GOSYM_PREFIX GOPKGPATH ".use") __attribute__((noinline)); 37 | 38 | void 39 | use(void *p __attribute__ ((unused))) 40 | { 41 | } 42 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/gccgo_linux_amd64.go: -------------------------------------------------------------------------------- 1 | // Copyright 2015 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build gccgo,linux,amd64 6 | 7 | package unix 8 | 9 | import "syscall" 10 | 11 | //extern gettimeofday 12 | func realGettimeofday(*Timeval, *byte) int32 13 | 14 | func gettimeofday(tv *Timeval) (err syscall.Errno) { 15 | r := realGettimeofday(tv, nil) 16 | if r < 0 { 17 | return syscall.GetErrno() 18 | } 19 | return 0 20 | } 21 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/gccgo_linux_sparc64.go: -------------------------------------------------------------------------------- 1 | // Copyright 2016 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build gccgo,linux,sparc64 6 | 7 | package unix 8 | 9 | import "syscall" 10 | 11 | //extern sysconf 12 | func realSysconf(name int) int64 13 | 14 | func sysconf(name int) (n int64, err syscall.Errno) { 15 | r := realSysconf(name) 16 | if r < 0 { 17 | return 0, syscall.GetErrno() 18 | } 19 | return r, 0 20 | } 21 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/mksysnum_darwin.pl: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env perl 2 | # Copyright 2009 The Go Authors. All rights reserved. 3 | # Use of this source code is governed by a BSD-style 4 | # license that can be found in the LICENSE file. 5 | # 6 | # Generate system call table for Darwin from sys/syscall.h 7 | 8 | use strict; 9 | 10 | if($ENV{'GOARCH'} eq "" || $ENV{'GOOS'} eq "") { 11 | print STDERR "GOARCH or GOOS not defined in environment\n"; 12 | exit 1; 13 | } 14 | 15 | my $command = "mksysnum_darwin.pl " . join(' ', @ARGV); 16 | 17 | print <){ 29 | if(/^#define\s+SYS_(\w+)\s+([0-9]+)/){ 30 | my $name = $1; 31 | my $num = $2; 32 | $name =~ y/a-z/A-Z/; 33 | print " SYS_$name = $num;" 34 | } 35 | } 36 | 37 | print <){ 30 | if(/^([0-9]+)\s+STD\s+({ \S+\s+(\w+).*)$/){ 31 | my $num = $1; 32 | my $proto = $2; 33 | my $name = "SYS_$3"; 34 | $name =~ y/a-z/A-Z/; 35 | 36 | # There are multiple entries for enosys and nosys, so comment them out. 37 | if($name =~ /^SYS_E?NOSYS$/){ 38 | $name = "// $name"; 39 | } 40 | if($name eq 'SYS_SYS_EXIT'){ 41 | $name = 'SYS_EXIT'; 42 | } 43 | 44 | print " $name = $num; // $proto\n"; 45 | } 46 | } 47 | 48 | print <){ 31 | if($line =~ /^(.*)\\$/) { 32 | # Handle continuation 33 | $line = $1; 34 | $_ =~ s/^\s+//; 35 | $line .= $_; 36 | } else { 37 | # New line 38 | $line = $_; 39 | } 40 | next if $line =~ /\\$/; 41 | if($line =~ /^([0-9]+)\s+((STD)|(NOERR))\s+(RUMP\s+)?({\s+\S+\s*\*?\s*\|(\S+)\|(\S*)\|(\w+).*\s+})(\s+(\S+))?$/) { 42 | my $num = $1; 43 | my $proto = $6; 44 | my $compat = $8; 45 | my $name = "$7_$9"; 46 | 47 | $name = "$7_$11" if $11 ne ''; 48 | $name =~ y/a-z/A-Z/; 49 | 50 | if($compat eq '' || $compat eq '30' || $compat eq '50') { 51 | print " $name = $num; // $proto\n"; 52 | } 53 | } 54 | } 55 | 56 | print <){ 30 | if(/^([0-9]+)\s+STD\s+(NOLOCK\s+)?({ \S+\s+\*?(\w+).*)$/){ 31 | my $num = $1; 32 | my $proto = $3; 33 | my $name = $4; 34 | $name =~ y/a-z/A-Z/; 35 | 36 | # There are multiple entries for enosys and nosys, so comment them out. 37 | if($name =~ /^SYS_E?NOSYS$/){ 38 | $name = "// $name"; 39 | } 40 | if($name eq 'SYS_SYS_EXIT'){ 41 | $name = 'SYS_EXIT'; 42 | } 43 | 44 | print " $name = $num; // $proto\n"; 45 | } 46 | } 47 | 48 | print <= 10 { 20 | buf[i] = byte(val%10 + '0') 21 | i-- 22 | val /= 10 23 | } 24 | buf[i] = byte(val + '0') 25 | return string(buf[i:]) 26 | } 27 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/syscall_netbsd_386.go: -------------------------------------------------------------------------------- 1 | // Copyright 2009 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build 386,netbsd 6 | 7 | package unix 8 | 9 | func Getpagesize() int { return 4096 } 10 | 11 | func TimespecToNsec(ts Timespec) int64 { return int64(ts.Sec)*1e9 + int64(ts.Nsec) } 12 | 13 | func NsecToTimespec(nsec int64) (ts Timespec) { 14 | ts.Sec = int64(nsec / 1e9) 15 | ts.Nsec = int32(nsec % 1e9) 16 | return 17 | } 18 | 19 | func NsecToTimeval(nsec int64) (tv Timeval) { 20 | nsec += 999 // round up to microsecond 21 | tv.Usec = int32(nsec % 1e9 / 1e3) 22 | tv.Sec = int64(nsec / 1e9) 23 | return 24 | } 25 | 26 | func SetKevent(k *Kevent_t, fd, mode, flags int) { 27 | k.Ident = uint32(fd) 28 | k.Filter = uint32(mode) 29 | k.Flags = uint32(flags) 30 | } 31 | 32 | func (iov *Iovec) SetLen(length int) { 33 | iov.Len = uint32(length) 34 | } 35 | 36 | func (msghdr *Msghdr) SetControllen(length int) { 37 | msghdr.Controllen = uint32(length) 38 | } 39 | 40 | func (cmsg *Cmsghdr) SetLen(length int) { 41 | cmsg.Len = uint32(length) 42 | } 43 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/syscall_netbsd_amd64.go: -------------------------------------------------------------------------------- 1 | // Copyright 2009 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build amd64,netbsd 6 | 7 | package unix 8 | 9 | func Getpagesize() int { return 4096 } 10 | 11 | func TimespecToNsec(ts Timespec) int64 { return int64(ts.Sec)*1e9 + int64(ts.Nsec) } 12 | 13 | func NsecToTimespec(nsec int64) (ts Timespec) { 14 | ts.Sec = int64(nsec / 1e9) 15 | ts.Nsec = int64(nsec % 1e9) 16 | return 17 | } 18 | 19 | func NsecToTimeval(nsec int64) (tv Timeval) { 20 | nsec += 999 // round up to microsecond 21 | tv.Usec = int32(nsec % 1e9 / 1e3) 22 | tv.Sec = int64(nsec / 1e9) 23 | return 24 | } 25 | 26 | func SetKevent(k *Kevent_t, fd, mode, flags int) { 27 | k.Ident = uint64(fd) 28 | k.Filter = uint32(mode) 29 | k.Flags = uint32(flags) 30 | } 31 | 32 | func (iov *Iovec) SetLen(length int) { 33 | iov.Len = uint64(length) 34 | } 35 | 36 | func (msghdr *Msghdr) SetControllen(length int) { 37 | msghdr.Controllen = uint32(length) 38 | } 39 | 40 | func (cmsg *Cmsghdr) SetLen(length int) { 41 | cmsg.Len = uint32(length) 42 | } 43 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/syscall_netbsd_arm.go: -------------------------------------------------------------------------------- 1 | // Copyright 2013 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build arm,netbsd 6 | 7 | package unix 8 | 9 | func Getpagesize() int { return 4096 } 10 | 11 | func TimespecToNsec(ts Timespec) int64 { return int64(ts.Sec)*1e9 + int64(ts.Nsec) } 12 | 13 | func NsecToTimespec(nsec int64) (ts Timespec) { 14 | ts.Sec = int64(nsec / 1e9) 15 | ts.Nsec = int32(nsec % 1e9) 16 | return 17 | } 18 | 19 | func NsecToTimeval(nsec int64) (tv Timeval) { 20 | nsec += 999 // round up to microsecond 21 | tv.Usec = int32(nsec % 1e9 / 1e3) 22 | tv.Sec = int64(nsec / 1e9) 23 | return 24 | } 25 | 26 | func SetKevent(k *Kevent_t, fd, mode, flags int) { 27 | k.Ident = uint32(fd) 28 | k.Filter = uint32(mode) 29 | k.Flags = uint32(flags) 30 | } 31 | 32 | func (iov *Iovec) SetLen(length int) { 33 | iov.Len = uint32(length) 34 | } 35 | 36 | func (msghdr *Msghdr) SetControllen(length int) { 37 | msghdr.Controllen = uint32(length) 38 | } 39 | 40 | func (cmsg *Cmsghdr) SetLen(length int) { 41 | cmsg.Len = uint32(length) 42 | } 43 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/syscall_no_getwd.go: -------------------------------------------------------------------------------- 1 | // Copyright 2013 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build dragonfly freebsd netbsd openbsd 6 | 7 | package unix 8 | 9 | const ImplementsGetwd = false 10 | 11 | func Getwd() (string, error) { return "", ENOTSUP } 12 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/syscall_openbsd_386.go: -------------------------------------------------------------------------------- 1 | // Copyright 2009 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build 386,openbsd 6 | 7 | package unix 8 | 9 | func Getpagesize() int { return 4096 } 10 | 11 | func TimespecToNsec(ts Timespec) int64 { return int64(ts.Sec)*1e9 + int64(ts.Nsec) } 12 | 13 | func NsecToTimespec(nsec int64) (ts Timespec) { 14 | ts.Sec = int64(nsec / 1e9) 15 | ts.Nsec = int32(nsec % 1e9) 16 | return 17 | } 18 | 19 | func NsecToTimeval(nsec int64) (tv Timeval) { 20 | nsec += 999 // round up to microsecond 21 | tv.Usec = int32(nsec % 1e9 / 1e3) 22 | tv.Sec = int64(nsec / 1e9) 23 | return 24 | } 25 | 26 | func SetKevent(k *Kevent_t, fd, mode, flags int) { 27 | k.Ident = uint32(fd) 28 | k.Filter = int16(mode) 29 | k.Flags = uint16(flags) 30 | } 31 | 32 | func (iov *Iovec) SetLen(length int) { 33 | iov.Len = uint32(length) 34 | } 35 | 36 | func (msghdr *Msghdr) SetControllen(length int) { 37 | msghdr.Controllen = uint32(length) 38 | } 39 | 40 | func (cmsg *Cmsghdr) SetLen(length int) { 41 | cmsg.Len = uint32(length) 42 | } 43 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/syscall_openbsd_amd64.go: -------------------------------------------------------------------------------- 1 | // Copyright 2009 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build amd64,openbsd 6 | 7 | package unix 8 | 9 | func Getpagesize() int { return 4096 } 10 | 11 | func TimespecToNsec(ts Timespec) int64 { return int64(ts.Sec)*1e9 + int64(ts.Nsec) } 12 | 13 | func NsecToTimespec(nsec int64) (ts Timespec) { 14 | ts.Sec = nsec / 1e9 15 | ts.Nsec = nsec % 1e9 16 | return 17 | } 18 | 19 | func NsecToTimeval(nsec int64) (tv Timeval) { 20 | nsec += 999 // round up to microsecond 21 | tv.Usec = nsec % 1e9 / 1e3 22 | tv.Sec = nsec / 1e9 23 | return 24 | } 25 | 26 | func SetKevent(k *Kevent_t, fd, mode, flags int) { 27 | k.Ident = uint64(fd) 28 | k.Filter = int16(mode) 29 | k.Flags = uint16(flags) 30 | } 31 | 32 | func (iov *Iovec) SetLen(length int) { 33 | iov.Len = uint64(length) 34 | } 35 | 36 | func (msghdr *Msghdr) SetControllen(length int) { 37 | msghdr.Controllen = uint32(length) 38 | } 39 | 40 | func (cmsg *Cmsghdr) SetLen(length int) { 41 | cmsg.Len = uint32(length) 42 | } 43 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/syscall_solaris_amd64.go: -------------------------------------------------------------------------------- 1 | // Copyright 2009 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build amd64,solaris 6 | 7 | package unix 8 | 9 | func TimespecToNsec(ts Timespec) int64 { return int64(ts.Sec)*1e9 + int64(ts.Nsec) } 10 | 11 | func NsecToTimespec(nsec int64) (ts Timespec) { 12 | ts.Sec = nsec / 1e9 13 | ts.Nsec = nsec % 1e9 14 | return 15 | } 16 | 17 | func NsecToTimeval(nsec int64) (tv Timeval) { 18 | nsec += 999 // round up to microsecond 19 | tv.Usec = nsec % 1e9 / 1e3 20 | tv.Sec = int64(nsec / 1e9) 21 | return 22 | } 23 | 24 | func (iov *Iovec) SetLen(length int) { 25 | iov.Len = uint64(length) 26 | } 27 | 28 | func (cmsg *Cmsghdr) SetLen(length int) { 29 | cmsg.Len = uint32(length) 30 | } 31 | 32 | func sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) { 33 | // TODO(aram): implement this, see issue 5847. 34 | panic("unimplemented") 35 | } 36 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/zsysnum_solaris_amd64.go: -------------------------------------------------------------------------------- 1 | // Copyright 2014 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build amd64,solaris 6 | 7 | package unix 8 | 9 | // TODO(aram): remove these before Go 1.3. 10 | const ( 11 | SYS_EXECVE = 59 12 | SYS_FCNTL = 62 13 | ) 14 | -------------------------------------------------------------------------------- /vendor/golang.org/x/text/PATENTS: -------------------------------------------------------------------------------- 1 | Additional IP Rights Grant (Patents) 2 | 3 | "This implementation" means the copyrightable works distributed by 4 | Google as part of the Go project. 5 | 6 | Google hereby grants to You a perpetual, worldwide, non-exclusive, 7 | no-charge, royalty-free, irrevocable (except as stated in this section) 8 | patent license to make, have made, use, offer to sell, sell, import, 9 | transfer and otherwise run, modify and propagate the contents of this 10 | implementation of Go, where such license applies only to those patent 11 | claims, both currently owned or controlled by Google and acquired in 12 | the future, licensable by Google that are necessarily infringed by this 13 | implementation of Go. This grant does not include claims that would be 14 | infringed only as a consequence of further modification of this 15 | implementation. If you or your agent or exclusive licensee institute or 16 | order or agree to the institution of patent litigation against any 17 | entity (including a cross-claim or counterclaim in a lawsuit) alleging 18 | that this implementation of Go or any code incorporated within this 19 | implementation of Go constitutes direct or contributory patent 20 | infringement, or inducement of patent infringement, then any patent 21 | rights granted to you under this License for this implementation of Go 22 | shall terminate as of the date such litigation is filed. 23 | -------------------------------------------------------------------------------- /vendor/golang.org/x/text/cases/fold.go: -------------------------------------------------------------------------------- 1 | // Copyright 2016 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package cases 6 | 7 | import "golang.org/x/text/transform" 8 | 9 | type caseFolder struct{ transform.NopResetter } 10 | 11 | // caseFolder implements the Transformer interface for doing case folding. 12 | func (t *caseFolder) Transform(dst, src []byte, atEOF bool) (nDst, nSrc int, err error) { 13 | c := context{dst: dst, src: src, atEOF: atEOF} 14 | for c.next() { 15 | foldFull(&c) 16 | c.checkpoint() 17 | } 18 | return c.ret() 19 | } 20 | 21 | func (t *caseFolder) Span(src []byte, atEOF bool) (n int, err error) { 22 | c := context{src: src, atEOF: atEOF} 23 | for c.next() && isFoldFull(&c) { 24 | c.checkpoint() 25 | } 26 | return c.retSpan() 27 | } 28 | 29 | func makeFold(o options) transform.SpanningTransformer { 30 | // TODO: Special case folding, through option Language, Special/Turkic, or 31 | // both. 32 | // TODO: Implement Compact options. 33 | return &caseFolder{} 34 | } 35 | -------------------------------------------------------------------------------- /vendor/golang.org/x/text/internal/gen.go: -------------------------------------------------------------------------------- 1 | // Copyright 2015 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build ignore 6 | 7 | package main 8 | 9 | import ( 10 | "log" 11 | 12 | "golang.org/x/text/internal/gen" 13 | "golang.org/x/text/language" 14 | "golang.org/x/text/unicode/cldr" 15 | ) 16 | 17 | func main() { 18 | r := gen.OpenCLDRCoreZip() 19 | defer r.Close() 20 | 21 | d := &cldr.Decoder{} 22 | data, err := d.DecodeZip(r) 23 | if err != nil { 24 | log.Fatalf("DecodeZip: %v", err) 25 | } 26 | 27 | w := gen.NewCodeWriter() 28 | defer w.WriteGoFile("tables.go", "internal") 29 | 30 | // Create parents table. 31 | parents := make([]uint16, language.NumCompactTags) 32 | for _, loc := range data.Locales() { 33 | tag := language.MustParse(loc) 34 | index, ok := language.CompactIndex(tag) 35 | if !ok { 36 | continue 37 | } 38 | parentIndex := 0 // und 39 | for p := tag.Parent(); p != language.Und; p = p.Parent() { 40 | if x, ok := language.CompactIndex(p); ok { 41 | parentIndex = x 42 | break 43 | } 44 | } 45 | parents[index] = uint16(parentIndex) 46 | } 47 | 48 | w.WriteComment(` 49 | Parent maps a compact index of a tag to the compact index of the parent of 50 | this tag.`) 51 | w.WriteVar("Parent", parents) 52 | } 53 | -------------------------------------------------------------------------------- /vendor/golang.org/x/text/internal/internal.go: -------------------------------------------------------------------------------- 1 | // Copyright 2015 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:generate go run gen.go 6 | 7 | // Package internal contains non-exported functionality that are used by 8 | // packages in the text repository. 9 | package internal // import "golang.org/x/text/internal" 10 | 11 | import ( 12 | "sort" 13 | 14 | "golang.org/x/text/language" 15 | ) 16 | 17 | // SortTags sorts tags in place. 18 | func SortTags(tags []language.Tag) { 19 | sort.Sort(sorter(tags)) 20 | } 21 | 22 | type sorter []language.Tag 23 | 24 | func (s sorter) Len() int { 25 | return len(s) 26 | } 27 | 28 | func (s sorter) Swap(i, j int) { 29 | s[i], s[j] = s[j], s[i] 30 | } 31 | 32 | func (s sorter) Less(i, j int) bool { 33 | return s[i].String() < s[j].String() 34 | } 35 | 36 | // UniqueTags sorts and filters duplicate tags in place and returns a slice with 37 | // only unique tags. 38 | func UniqueTags(tags []language.Tag) []language.Tag { 39 | if len(tags) <= 1 { 40 | return tags 41 | } 42 | SortTags(tags) 43 | k := 0 44 | for i := 1; i < len(tags); i++ { 45 | if tags[k].String() < tags[i].String() { 46 | k++ 47 | tags[k] = tags[i] 48 | } 49 | } 50 | return tags[:k+1] 51 | } 52 | -------------------------------------------------------------------------------- /vendor/golang.org/x/text/language/Makefile: -------------------------------------------------------------------------------- 1 | # Copyright 2013 The Go Authors. All rights reserved. 2 | # Use of this source code is governed by a BSD-style 3 | # license that can be found in the LICENSE file. 4 | 5 | CLEANFILES+=maketables 6 | 7 | maketables: maketables.go 8 | go build $^ 9 | 10 | tables: maketables 11 | ./maketables > tables.go 12 | gofmt -w -s tables.go 13 | 14 | # Build (but do not run) maketables during testing, 15 | # just to make sure it still compiles. 16 | testshort: maketables 17 | -------------------------------------------------------------------------------- /vendor/golang.org/x/text/language/common.go: -------------------------------------------------------------------------------- 1 | // This file was generated by go generate; DO NOT EDIT 2 | 3 | package language 4 | 5 | // This file contains code common to the maketables.go and the package code. 6 | 7 | // langAliasType is the type of an alias in langAliasMap. 8 | type langAliasType int8 9 | 10 | const ( 11 | langDeprecated langAliasType = iota 12 | langMacro 13 | langLegacy 14 | 15 | langAliasTypeUnknown langAliasType = -1 16 | ) 17 | -------------------------------------------------------------------------------- /vendor/golang.org/x/text/language/gen_common.go: -------------------------------------------------------------------------------- 1 | // Copyright 2014 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build ignore 6 | 7 | package main 8 | 9 | // This file contains code common to the maketables.go and the package code. 10 | 11 | // langAliasType is the type of an alias in langAliasMap. 12 | type langAliasType int8 13 | 14 | const ( 15 | langDeprecated langAliasType = iota 16 | langMacro 17 | langLegacy 18 | 19 | langAliasTypeUnknown langAliasType = -1 20 | ) 21 | -------------------------------------------------------------------------------- /vendor/golang.org/x/text/language/go1_1.go: -------------------------------------------------------------------------------- 1 | // Copyright 2013 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build !go1.2 6 | 7 | package language 8 | 9 | import "sort" 10 | 11 | func sortStable(s sort.Interface) { 12 | ss := stableSort{ 13 | s: s, 14 | pos: make([]int, s.Len()), 15 | } 16 | for i := range ss.pos { 17 | ss.pos[i] = i 18 | } 19 | sort.Sort(&ss) 20 | } 21 | 22 | type stableSort struct { 23 | s sort.Interface 24 | pos []int 25 | } 26 | 27 | func (s *stableSort) Len() int { 28 | return len(s.pos) 29 | } 30 | 31 | func (s *stableSort) Less(i, j int) bool { 32 | return s.s.Less(i, j) || !s.s.Less(j, i) && s.pos[i] < s.pos[j] 33 | } 34 | 35 | func (s *stableSort) Swap(i, j int) { 36 | s.s.Swap(i, j) 37 | s.pos[i], s.pos[j] = s.pos[j], s.pos[i] 38 | } 39 | -------------------------------------------------------------------------------- /vendor/golang.org/x/text/language/go1_2.go: -------------------------------------------------------------------------------- 1 | // Copyright 2013 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build go1.2 6 | 7 | package language 8 | 9 | import "sort" 10 | 11 | var sortStable = sort.Stable 12 | -------------------------------------------------------------------------------- /vendor/golang.org/x/text/secure/precis/class.go: -------------------------------------------------------------------------------- 1 | // Copyright 2015 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package precis 6 | 7 | import ( 8 | "unicode/utf8" 9 | ) 10 | 11 | // TODO: Add contextual character rules from Appendix A of RFC5892. 12 | 13 | // A class is a set of characters that match certain derived properties. The 14 | // PRECIS framework defines two classes: The Freeform class and the Identifier 15 | // class. The freeform class should be used for profiles where expressiveness is 16 | // prioritized over safety such as nicknames or passwords. The identifier class 17 | // should be used for profiles where safety is the first priority such as 18 | // addressable network labels and usernames. 19 | type class struct { 20 | validFrom property 21 | } 22 | 23 | // Contains satisfies the runes.Set interface and returns whether the given rune 24 | // is a member of the class. 25 | func (c class) Contains(r rune) bool { 26 | b := make([]byte, 4) 27 | n := utf8.EncodeRune(b, r) 28 | 29 | trieval, _ := dpTrie.lookup(b[:n]) 30 | return c.validFrom <= property(trieval) 31 | } 32 | 33 | var ( 34 | identifier = &class{validFrom: pValid} 35 | freeform = &class{validFrom: idDisOrFreePVal} 36 | ) 37 | -------------------------------------------------------------------------------- /vendor/golang.org/x/text/secure/precis/doc.go: -------------------------------------------------------------------------------- 1 | // Copyright 2015 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // Package precis contains types and functions for the preparation, 6 | // enforcement, and comparison of internationalized strings ("PRECIS") as 7 | // defined in RFC 7564. It also contains several pre-defined profiles for 8 | // passwords, nicknames, and usernames as defined in RFC 7613 and RFC 7700. 9 | // 10 | // BE ADVISED: This package is under construction and the API may change in 11 | // backwards incompatible ways and without notice. 12 | package precis // import "golang.org/x/text/secure/precis" 13 | 14 | //go:generate go run gen.go gen_trieval.go 15 | -------------------------------------------------------------------------------- /vendor/golang.org/x/text/secure/precis/transformer.go: -------------------------------------------------------------------------------- 1 | // Copyright 2015 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package precis 6 | 7 | import "golang.org/x/text/transform" 8 | 9 | // Transformer implements the transform.Transformer interface. 10 | type Transformer struct { 11 | t transform.Transformer 12 | } 13 | 14 | // Reset implements the transform.Transformer interface. 15 | func (t Transformer) Reset() { t.t.Reset() } 16 | 17 | // Transform implements the transform.Transformer interface. 18 | func (t Transformer) Transform(dst, src []byte, atEOF bool) (nDst, nSrc int, err error) { 19 | return t.t.Transform(dst, src, atEOF) 20 | } 21 | 22 | // Bytes returns a new byte slice with the result of applying t to b. 23 | func (t Transformer) Bytes(b []byte) []byte { 24 | b, _, _ = transform.Bytes(t, b) 25 | return b 26 | } 27 | 28 | // String returns a string with the result of applying t to s. 29 | func (t Transformer) String(s string) string { 30 | s, _, _ = transform.String(t, s) 31 | return s 32 | } 33 | -------------------------------------------------------------------------------- /vendor/golang.org/x/text/unicode/norm/trie.go: -------------------------------------------------------------------------------- 1 | // Copyright 2011 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package norm 6 | 7 | type valueRange struct { 8 | value uint16 // header: value:stride 9 | lo, hi byte // header: lo:n 10 | } 11 | 12 | type sparseBlocks struct { 13 | values []valueRange 14 | offset []uint16 15 | } 16 | 17 | var nfcSparse = sparseBlocks{ 18 | values: nfcSparseValues[:], 19 | offset: nfcSparseOffset[:], 20 | } 21 | 22 | var nfkcSparse = sparseBlocks{ 23 | values: nfkcSparseValues[:], 24 | offset: nfkcSparseOffset[:], 25 | } 26 | 27 | var ( 28 | nfcData = newNfcTrie(0) 29 | nfkcData = newNfkcTrie(0) 30 | ) 31 | 32 | // lookupValue determines the type of block n and looks up the value for b. 33 | // For n < t.cutoff, the block is a simple lookup table. Otherwise, the block 34 | // is a list of ranges with an accompanying value. Given a matching range r, 35 | // the value for b is by r.value + (b - r.lo) * stride. 36 | func (t *sparseBlocks) lookup(n uint32, b byte) uint16 { 37 | offset := t.offset[n] 38 | header := t.values[offset] 39 | lo := offset + 1 40 | hi := lo + uint16(header.lo) 41 | for lo < hi { 42 | m := lo + (hi-lo)/2 43 | r := t.values[m] 44 | if r.lo <= b && b <= r.hi { 45 | return r.value + uint16(b-r.lo)*header.value 46 | } 47 | if b < r.lo { 48 | hi = m 49 | } else { 50 | lo = m + 1 51 | } 52 | } 53 | return 0 54 | } 55 | -------------------------------------------------------------------------------- /vendor/golang.org/x/text/width/gen_trieval.go: -------------------------------------------------------------------------------- 1 | // Copyright 2015 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build ignore 6 | 7 | package main 8 | 9 | // elem is an entry of the width trie. The high byte is used to encode the type 10 | // of the rune. The low byte is used to store the index to a mapping entry in 11 | // the inverseData array. 12 | type elem uint16 13 | 14 | const ( 15 | tagNeutral elem = iota << typeShift 16 | tagAmbiguous 17 | tagWide 18 | tagNarrow 19 | tagFullwidth 20 | tagHalfwidth 21 | ) 22 | 23 | const ( 24 | numTypeBits = 3 25 | typeShift = 16 - numTypeBits 26 | 27 | // tagNeedsFold is true for all fullwidth and halfwidth runes except for 28 | // the Won sign U+20A9. 29 | tagNeedsFold = 0x1000 30 | 31 | // The Korean Won sign is halfwidth, but SHOULD NOT be mapped to a wide 32 | // variant. 33 | wonSign rune = 0x20A9 34 | ) 35 | -------------------------------------------------------------------------------- /vendor/golang.org/x/text/width/kind_string.go: -------------------------------------------------------------------------------- 1 | // Code generated by "stringer -type=Kind"; DO NOT EDIT 2 | 3 | package width 4 | 5 | import "fmt" 6 | 7 | const _Kind_name = "NeutralEastAsianAmbiguousEastAsianWideEastAsianNarrowEastAsianFullwidthEastAsianHalfwidth" 8 | 9 | var _Kind_index = [...]uint8{0, 7, 25, 38, 53, 71, 89} 10 | 11 | func (i Kind) String() string { 12 | if i < 0 || i >= Kind(len(_Kind_index)-1) { 13 | return fmt.Sprintf("Kind(%d)", i) 14 | } 15 | return _Kind_name[_Kind_index[i]:_Kind_index[i+1]] 16 | } 17 | -------------------------------------------------------------------------------- /vendor/golang.org/x/text/width/trieval.go: -------------------------------------------------------------------------------- 1 | // This file was generated by go generate; DO NOT EDIT 2 | 3 | package width 4 | 5 | // elem is an entry of the width trie. The high byte is used to encode the type 6 | // of the rune. The low byte is used to store the index to a mapping entry in 7 | // the inverseData array. 8 | type elem uint16 9 | 10 | const ( 11 | tagNeutral elem = iota << typeShift 12 | tagAmbiguous 13 | tagWide 14 | tagNarrow 15 | tagFullwidth 16 | tagHalfwidth 17 | ) 18 | 19 | const ( 20 | numTypeBits = 3 21 | typeShift = 16 - numTypeBits 22 | 23 | // tagNeedsFold is true for all fullwidth and halfwidth runes except for 24 | // the Won sign U+20A9. 25 | tagNeedsFold = 0x1000 26 | 27 | // The Korean Won sign is halfwidth, but SHOULD NOT be mapped to a wide 28 | // variant. 29 | wonSign rune = 0x20A9 30 | ) 31 | -------------------------------------------------------------------------------- /vendor/k8s.io/kubernetes/pkg/conversion/OWNERS: -------------------------------------------------------------------------------- 1 | assignees: 2 | - derekwaynecarr 3 | - lavalamp 4 | - smarterclayton 5 | - wojtek-t 6 | -------------------------------------------------------------------------------- /vendor/k8s.io/kubernetes/pkg/conversion/deep_equal.go: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2015 The Kubernetes Authors. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | 17 | package conversion 18 | 19 | import ( 20 | "k8s.io/kubernetes/third_party/forked/golang/reflect" 21 | ) 22 | 23 | // The code for this type must be located in third_party, since it forks from 24 | // go std lib. But for convenience, we expose the type here, too. 25 | type Equalities struct { 26 | reflect.Equalities 27 | } 28 | 29 | // For convenience, panics on errors 30 | func EqualitiesOrDie(funcs ...interface{}) Equalities { 31 | e := Equalities{reflect.Equalities{}} 32 | if err := e.AddFuncs(funcs...); err != nil { 33 | panic(err) 34 | } 35 | return e 36 | } 37 | -------------------------------------------------------------------------------- /vendor/k8s.io/kubernetes/pkg/conversion/doc.go: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2014 The Kubernetes Authors. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | 17 | // Package conversion provides go object versioning. 18 | // 19 | // Specifically, conversion provides a way for you to define multiple versions 20 | // of the same object. You may write functions which implement conversion logic, 21 | // but for the fields which did not change, copying is automated. This makes it 22 | // easy to modify the structures you use in memory without affecting the format 23 | // you store on disk or respond to in your external API calls. 24 | package conversion // import "k8s.io/kubernetes/pkg/conversion" 25 | -------------------------------------------------------------------------------- /vendor/k8s.io/kubernetes/pkg/conversion/helper.go: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2014 The Kubernetes Authors. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | 17 | package conversion 18 | 19 | import ( 20 | "fmt" 21 | "reflect" 22 | ) 23 | 24 | // EnforcePtr ensures that obj is a pointer of some sort. Returns a reflect.Value 25 | // of the dereferenced pointer, ensuring that it is settable/addressable. 26 | // Returns an error if this is not possible. 27 | func EnforcePtr(obj interface{}) (reflect.Value, error) { 28 | v := reflect.ValueOf(obj) 29 | if v.Kind() != reflect.Ptr { 30 | if v.Kind() == reflect.Invalid { 31 | return reflect.Value{}, fmt.Errorf("expected pointer, but got invalid kind") 32 | } 33 | return reflect.Value{}, fmt.Errorf("expected pointer, but got %v type", v.Type()) 34 | } 35 | if v.IsNil() { 36 | return reflect.Value{}, fmt.Errorf("expected pointer, but got nil") 37 | } 38 | return v.Elem(), nil 39 | } 40 | -------------------------------------------------------------------------------- /vendor/k8s.io/kubernetes/pkg/genericapiserver/openapi/common/doc.go: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2016 The Kubernetes Authors. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | 17 | // package common holds shared codes and types between open API code generator and spec generator. 18 | package common 19 | -------------------------------------------------------------------------------- /vendor/k8s.io/kubernetes/third_party/forked/golang/PATENTS: -------------------------------------------------------------------------------- 1 | Additional IP Rights Grant (Patents) 2 | 3 | "This implementation" means the copyrightable works distributed by 4 | Google as part of the Go project. 5 | 6 | Google hereby grants to You a perpetual, worldwide, non-exclusive, 7 | no-charge, royalty-free, irrevocable (except as stated in this section) 8 | patent license to make, have made, use, offer to sell, sell, import, 9 | transfer and otherwise run, modify and propagate the contents of this 10 | implementation of Go, where such license applies only to those patent 11 | claims, both currently owned or controlled by Google and acquired in 12 | the future, licensable by Google that are necessarily infringed by this 13 | implementation of Go. This grant does not include claims that would be 14 | infringed only as a consequence of further modification of this 15 | implementation. If you or your agent or exclusive licensee institute or 16 | order or agree to the institution of patent litigation against any 17 | entity (including a cross-claim or counterclaim in a lawsuit) alleging 18 | that this implementation of Go or any code incorporated within this 19 | implementation of Go constitutes direct or contributory patent 20 | infringement, or inducement of patent infringement, then any patent 21 | rights granted to you under this License for this implementation of Go 22 | shall terminate as of the date such litigation is filed. 23 | --------------------------------------------------------------------------------