├── .gitignore
├── .gitlab-ci.yml
├── CHANGELOG.md
├── Godeps
├── Godeps.json
└── Readme
├── LICENSE
├── README.md
├── bin
├── build
└── install-bcd
├── cmd
├── bcd-generate
│ ├── main.go
│ └── templates
│ │ ├── manifest.yml.templ
│ │ ├── plugin.go.templ
│ │ └── rpc.go.templ
└── bcd-proxy
│ ├── README.md
│ ├── main.go
│ ├── proxy_handler.go
│ └── ssl_server.go
├── contrib
├── bcd-proxy.conf
├── bcd-proxy.service
├── bcd.conf
└── bcd.service
├── core
├── config.go
└── helpers.go
├── engines
├── rpc_engine.go
├── rpc_methods.go
└── rpc_test.go
├── jobs
└── jobs.go
├── main.go
├── plugins
├── base.go
├── base_rpc.go
├── base_test.go
├── cardigann
│ ├── cardigann.go
│ ├── data
│ │ ├── config.json
│ │ └── manifest.yml
│ └── rpc_proxy.go
├── couchpotato
│ ├── couchpotato.go
│ ├── data
│ │ ├── manifest.yml
│ │ └── settings.conf
│ └── rpc_proxy.go
├── deluge
│ ├── data
│ │ ├── auth
│ │ ├── core.conf
│ │ ├── hostlist.conf.1.2
│ │ ├── manifest.yml
│ │ └── web.conf
│ ├── deluge.go
│ └── rpc_proxy.go
├── filebot
│ ├── data
│ │ ├── filebot.conf
│ │ ├── filebot.sh
│ │ └── manifest.yml
│ ├── filebot.go
│ └── rpc_proxy.go
├── headphones
│ ├── data
│ │ ├── config.ini
│ │ └── manifest.yml
│ ├── headphones.go
│ └── rpc_proxy.go
├── jackett
│ ├── data
│ │ ├── ServerConfig.json
│ │ └── manifest.yml
│ ├── jackett.go
│ └── rpc_proxy.go
├── jobs
│ └── rpc.go
├── murmur
│ ├── data
│ │ ├── manifest.yml
│ │ └── murmur.ini
│ ├── murmur.go
│ └── rpc_proxy.go
├── nzbget
│ ├── data
│ │ ├── manifest.yml
│ │ └── nzbget.conf
│ ├── nzbget.go
│ └── rpc_proxy.go
├── plex
│ ├── data
│ │ └── manifest.yml
│ ├── plex.go
│ └── rpc_proxy.go
├── plexpy
│ ├── data
│ │ ├── config.ini
│ │ └── manifest.yml
│ ├── plexpy.go
│ └── rpc_proxy.go
├── plexrequests
│ ├── data
│ │ └── manifest.yml
│ ├── plexrequests.go
│ └── rpc_proxy.go
├── plugin_data.go
├── portainer
│ ├── data
│ │ └── manifest.yml
│ ├── portainer.go
│ └── rpc_proxy.go
├── proxy
│ ├── proxy.go
│ └── rpc.go
├── radarr
│ ├── data
│ │ └── manifest.yml
│ ├── radarr.go
│ └── rpc_proxy.go
├── resilio
│ ├── data
│ │ ├── manifest.yml
│ │ └── sync.conf
│ ├── resilio.go
│ └── rpc_proxy.go
├── rocketchat
│ ├── data
│ │ └── manifest.yml
│ ├── rocketchat.go
│ └── rpc_proxy.go
├── rtorrent
│ ├── data
│ │ ├── manifest.yml
│ │ ├── nginx.conf
│ │ └── rtorrent.rc
│ ├── rpc_proxy.go
│ └── rtorrent.go
├── sickrage
│ ├── data
│ │ ├── config.ini
│ │ └── manifest.yml
│ ├── rpc_proxy.go
│ └── sickrage.go
├── sonarr
│ ├── data
│ │ └── manifest.yml
│ ├── rpc_proxy.go
│ └── sonarr.go
├── stats
│ └── stats.go
├── subsonic
│ ├── data
│ │ └── manifest.yml
│ ├── rpc_proxy.go
│ └── subsonic.go
├── syncthing
│ ├── data
│ │ ├── config.xml
│ │ └── manifest.yml
│ ├── rpc_proxy.go
│ └── syncthing.go
├── vnc
│ ├── data
│ │ └── manifest.yml
│ ├── rpc_proxy.go
│ └── vnc.go
└── znc
│ ├── data
│ ├── manifest.yml
│ └── znc.conf
│ ├── rpc_proxy.go
│ └── znc.go
└── vendor
├── github.com
├── Sirupsen
│ └── logrus
│ │ ├── .gitignore
│ │ ├── .travis.yml
│ │ ├── CHANGELOG.md
│ │ ├── LICENSE
│ │ ├── README.md
│ │ ├── alt_exit.go
│ │ ├── doc.go
│ │ ├── entry.go
│ │ ├── exported.go
│ │ ├── formatter.go
│ │ ├── hooks.go
│ │ ├── json_formatter.go
│ │ ├── logger.go
│ │ ├── logrus.go
│ │ ├── terminal_appengine.go
│ │ ├── terminal_bsd.go
│ │ ├── terminal_linux.go
│ │ ├── terminal_notwindows.go
│ │ ├── terminal_solaris.go
│ │ ├── terminal_windows.go
│ │ ├── text_formatter.go
│ │ └── writer.go
├── StackExchange
│ └── wmi
│ │ ├── LICENSE
│ │ ├── README.md
│ │ └── wmi.go
├── alecthomas
│ ├── template
│ │ ├── LICENSE
│ │ ├── README.md
│ │ ├── doc.go
│ │ ├── exec.go
│ │ ├── funcs.go
│ │ ├── helper.go
│ │ ├── parse
│ │ │ ├── lex.go
│ │ │ ├── node.go
│ │ │ └── parse.go
│ │ └── template.go
│ └── units
│ │ ├── COPYING
│ │ ├── README.md
│ │ ├── bytes.go
│ │ ├── doc.go
│ │ ├── si.go
│ │ └── util.go
├── cloudfoundry-incubator
│ └── candiedyaml
│ │ ├── .gitignore
│ │ ├── .travis.yml
│ │ ├── LICENSE
│ │ ├── README.md
│ │ ├── api.go
│ │ ├── decode.go
│ │ ├── emitter.go
│ │ ├── encode.go
│ │ ├── libyaml-LICENSE
│ │ ├── parser.go
│ │ ├── reader.go
│ │ ├── resolver.go
│ │ ├── run_parser.go
│ │ ├── scanner.go
│ │ ├── tags.go
│ │ ├── writer.go
│ │ ├── yaml_definesh.go
│ │ ├── yaml_privateh.go
│ │ └── yamlh.go
├── docker
│ ├── docker
│ │ ├── LICENSE
│ │ ├── NOTICE
│ │ ├── api
│ │ │ └── types
│ │ │ │ ├── filters
│ │ │ │ └── parse.go
│ │ │ │ └── versions
│ │ │ │ ├── README.md
│ │ │ │ └── compare.go
│ │ ├── opts
│ │ │ ├── hosts.go
│ │ │ ├── hosts_unix.go
│ │ │ ├── hosts_windows.go
│ │ │ ├── ip.go
│ │ │ ├── opts.go
│ │ │ ├── opts_unix.go
│ │ │ └── opts_windows.go
│ │ └── pkg
│ │ │ ├── archive
│ │ │ ├── README.md
│ │ │ ├── archive.go
│ │ │ ├── archive_linux.go
│ │ │ ├── archive_other.go
│ │ │ ├── archive_unix.go
│ │ │ ├── archive_windows.go
│ │ │ ├── changes.go
│ │ │ ├── changes_linux.go
│ │ │ ├── changes_other.go
│ │ │ ├── changes_unix.go
│ │ │ ├── changes_windows.go
│ │ │ ├── copy.go
│ │ │ ├── copy_unix.go
│ │ │ ├── copy_windows.go
│ │ │ ├── diff.go
│ │ │ ├── example_changes.go
│ │ │ ├── time_linux.go
│ │ │ ├── time_unsupported.go
│ │ │ ├── whiteouts.go
│ │ │ └── wrap.go
│ │ │ ├── fileutils
│ │ │ ├── fileutils.go
│ │ │ ├── fileutils_darwin.go
│ │ │ ├── fileutils_solaris.go
│ │ │ ├── fileutils_unix.go
│ │ │ └── fileutils_windows.go
│ │ │ ├── homedir
│ │ │ └── homedir.go
│ │ │ ├── idtools
│ │ │ ├── idtools.go
│ │ │ ├── idtools_unix.go
│ │ │ ├── idtools_windows.go
│ │ │ ├── usergroupadd_linux.go
│ │ │ └── usergroupadd_unsupported.go
│ │ │ ├── ioutils
│ │ │ ├── buffer.go
│ │ │ ├── bytespipe.go
│ │ │ ├── fmt.go
│ │ │ ├── fswriters.go
│ │ │ ├── multireader.go
│ │ │ ├── readers.go
│ │ │ ├── temp_unix.go
│ │ │ ├── temp_windows.go
│ │ │ ├── writeflusher.go
│ │ │ └── writers.go
│ │ │ ├── longpath
│ │ │ └── longpath.go
│ │ │ ├── pools
│ │ │ └── pools.go
│ │ │ ├── promise
│ │ │ └── promise.go
│ │ │ ├── stdcopy
│ │ │ └── stdcopy.go
│ │ │ └── system
│ │ │ ├── chtimes.go
│ │ │ ├── chtimes_unix.go
│ │ │ ├── chtimes_windows.go
│ │ │ ├── errors.go
│ │ │ ├── events_windows.go
│ │ │ ├── filesys.go
│ │ │ ├── filesys_windows.go
│ │ │ ├── lstat.go
│ │ │ ├── lstat_windows.go
│ │ │ ├── meminfo.go
│ │ │ ├── meminfo_linux.go
│ │ │ ├── meminfo_solaris.go
│ │ │ ├── meminfo_unsupported.go
│ │ │ ├── meminfo_windows.go
│ │ │ ├── mknod.go
│ │ │ ├── mknod_windows.go
│ │ │ ├── path_unix.go
│ │ │ ├── path_windows.go
│ │ │ ├── stat.go
│ │ │ ├── stat_darwin.go
│ │ │ ├── stat_freebsd.go
│ │ │ ├── stat_linux.go
│ │ │ ├── stat_openbsd.go
│ │ │ ├── stat_solaris.go
│ │ │ ├── stat_unsupported.go
│ │ │ ├── stat_windows.go
│ │ │ ├── syscall_unix.go
│ │ │ ├── syscall_windows.go
│ │ │ ├── umask.go
│ │ │ ├── umask_windows.go
│ │ │ ├── utimes_freebsd.go
│ │ │ ├── utimes_linux.go
│ │ │ ├── utimes_unsupported.go
│ │ │ ├── xattrs_linux.go
│ │ │ └── xattrs_unsupported.go
│ ├── engine-api
│ │ ├── LICENSE
│ │ └── types
│ │ │ ├── mount
│ │ │ └── mount.go
│ │ │ └── swarm
│ │ │ ├── common.go
│ │ │ ├── container.go
│ │ │ ├── network.go
│ │ │ ├── node.go
│ │ │ ├── service.go
│ │ │ ├── swarm.go
│ │ │ └── task.go
│ └── go-units
│ │ ├── CONTRIBUTING.md
│ │ ├── LICENSE
│ │ ├── MAINTAINERS
│ │ ├── README.md
│ │ ├── circle.yml
│ │ ├── duration.go
│ │ ├── size.go
│ │ └── ulimit.go
├── foomo
│ └── htpasswd
│ │ ├── .gitignore
│ │ ├── .travis.yml
│ │ ├── LICENSE.txt
│ │ ├── README.md
│ │ ├── hashing.go
│ │ └── htpasswd.go
├── fsouza
│ └── go-dockerclient
│ │ ├── .gitignore
│ │ ├── .travis.yml
│ │ ├── AUTHORS
│ │ ├── DOCKER-LICENSE
│ │ ├── LICENSE
│ │ ├── Makefile
│ │ ├── README.markdown
│ │ ├── auth.go
│ │ ├── change.go
│ │ ├── client.go
│ │ ├── container.go
│ │ ├── env.go
│ │ ├── event.go
│ │ ├── exec.go
│ │ ├── image.go
│ │ ├── misc.go
│ │ ├── network.go
│ │ ├── node.go
│ │ ├── service.go
│ │ ├── signal.go
│ │ ├── swarm.go
│ │ ├── tar.go
│ │ ├── task.go
│ │ ├── tls.go
│ │ └── volume.go
├── ghodss
│ └── yaml
│ │ ├── .gitignore
│ │ ├── .travis.yml
│ │ ├── LICENSE
│ │ ├── README.md
│ │ ├── fields.go
│ │ └── yaml.go
├── go-ole
│ └── go-ole
│ │ ├── .travis.yml
│ │ ├── ChangeLog.md
│ │ ├── README.md
│ │ ├── appveyor.yml
│ │ ├── com.go
│ │ ├── com_func.go
│ │ ├── connect.go
│ │ ├── constants.go
│ │ ├── error.go
│ │ ├── error_func.go
│ │ ├── error_windows.go
│ │ ├── guid.go
│ │ ├── iconnectionpoint.go
│ │ ├── iconnectionpoint_func.go
│ │ ├── iconnectionpoint_windows.go
│ │ ├── iconnectionpointcontainer.go
│ │ ├── iconnectionpointcontainer_func.go
│ │ ├── iconnectionpointcontainer_windows.go
│ │ ├── idispatch.go
│ │ ├── idispatch_func.go
│ │ ├── idispatch_windows.go
│ │ ├── ienumvariant.go
│ │ ├── ienumvariant_func.go
│ │ ├── ienumvariant_windows.go
│ │ ├── iinspectable.go
│ │ ├── iinspectable_func.go
│ │ ├── iinspectable_windows.go
│ │ ├── iprovideclassinfo.go
│ │ ├── iprovideclassinfo_func.go
│ │ ├── iprovideclassinfo_windows.go
│ │ ├── itypeinfo.go
│ │ ├── itypeinfo_func.go
│ │ ├── itypeinfo_windows.go
│ │ ├── iunknown.go
│ │ ├── iunknown_func.go
│ │ ├── iunknown_windows.go
│ │ ├── ole.go
│ │ ├── oleutil
│ │ ├── connection.go
│ │ ├── connection_func.go
│ │ ├── connection_windows.go
│ │ ├── go-get.go
│ │ └── oleutil.go
│ │ ├── safearray.go
│ │ ├── safearray_func.go
│ │ ├── safearray_windows.go
│ │ ├── safearrayconversion.go
│ │ ├── safearrayslices.go
│ │ ├── utility.go
│ │ ├── variables.go
│ │ ├── variant.go
│ │ ├── variant_386.go
│ │ ├── variant_amd64.go
│ │ ├── vt_string.go
│ │ ├── winrt.go
│ │ └── winrt_doc.go
├── hashicorp
│ └── go-cleanhttp
│ │ ├── LICENSE
│ │ ├── README.md
│ │ ├── cleanhttp.go
│ │ └── doc.go
├── opencontainers
│ └── runc
│ │ ├── LICENSE
│ │ ├── NOTICE
│ │ └── libcontainer
│ │ ├── system
│ │ ├── linux.go
│ │ ├── proc.go
│ │ ├── setns_linux.go
│ │ ├── syscall_linux_386.go
│ │ ├── syscall_linux_64.go
│ │ ├── syscall_linux_arm.go
│ │ ├── sysconfig.go
│ │ ├── sysconfig_notcgo.go
│ │ ├── unsupported.go
│ │ └── xattrs_linux.go
│ │ └── user
│ │ ├── MAINTAINERS
│ │ ├── lookup.go
│ │ ├── lookup_unix.go
│ │ ├── lookup_unsupported.go
│ │ └── user.go
├── ricochet2200
│ └── go-disk-usage
│ │ ├── LICENSE
│ │ └── du
│ │ ├── diskusage.go
│ │ └── diskusage_windows.go
└── shirou
│ ├── gopsutil
│ ├── LICENSE
│ ├── cpu
│ │ ├── cpu.go
│ │ ├── cpu_darwin.go
│ │ ├── cpu_darwin_cgo.go
│ │ ├── cpu_darwin_nocgo.go
│ │ ├── cpu_fallback.go
│ │ ├── cpu_freebsd.go
│ │ ├── cpu_linux.go
│ │ ├── cpu_unix.go
│ │ └── cpu_windows.go
│ ├── host
│ │ ├── host.go
│ │ ├── host_darwin.go
│ │ ├── host_darwin_amd64.go
│ │ ├── host_fallback.go
│ │ ├── host_freebsd.go
│ │ ├── host_freebsd_386.go
│ │ ├── host_freebsd_amd64.go
│ │ ├── host_linux.go
│ │ ├── host_linux_386.go
│ │ ├── host_linux_amd64.go
│ │ ├── host_linux_arm.go
│ │ ├── host_linux_arm64.go
│ │ ├── host_linux_ppc64le.go
│ │ ├── host_windows.go
│ │ ├── types_darwin.go
│ │ ├── types_freebsd.go
│ │ └── types_linux.go
│ ├── internal
│ │ └── common
│ │ │ ├── binary.go
│ │ │ ├── common.go
│ │ │ ├── common_darwin.go
│ │ │ ├── common_freebsd.go
│ │ │ ├── common_linux.go
│ │ │ ├── common_unix.go
│ │ │ └── common_windows.go
│ ├── load
│ │ ├── load.go
│ │ ├── load_darwin.go
│ │ ├── load_fallback.go
│ │ ├── load_freebsd.go
│ │ ├── load_linux.go
│ │ └── load_windows.go
│ ├── mem
│ │ ├── mem.go
│ │ ├── mem_darwin.go
│ │ ├── mem_darwin_cgo.go
│ │ ├── mem_darwin_nocgo.go
│ │ ├── mem_fallback.go
│ │ ├── mem_freebsd.go
│ │ ├── mem_linux.go
│ │ └── mem_windows.go
│ ├── net
│ │ ├── net.go
│ │ ├── net_darwin.go
│ │ ├── net_fallback.go
│ │ ├── net_freebsd.go
│ │ ├── net_linux.go
│ │ ├── net_unix.go
│ │ └── net_windows.go
│ └── process
│ │ ├── process.go
│ │ ├── process_darwin.go
│ │ ├── process_darwin_amd64.go
│ │ ├── process_fallback.go
│ │ ├── process_freebsd.go
│ │ ├── process_freebsd_386.go
│ │ ├── process_freebsd_amd64.go
│ │ ├── process_linux.go
│ │ ├── process_linux_386.go
│ │ ├── process_linux_amd64.go
│ │ ├── process_linux_arm.go
│ │ ├── process_linux_arm64.go
│ │ ├── process_posix.go
│ │ ├── process_windows.go
│ │ ├── process_windows_386.go
│ │ ├── process_windows_amd64.go
│ │ ├── types_darwin.go
│ │ └── types_freebsd.go
│ └── w32
│ ├── AUTHORS
│ ├── LICENSE
│ ├── README.md
│ ├── advapi32.go
│ ├── comctl32.go
│ ├── comdlg32.go
│ ├── constants.go
│ ├── dwmapi.go
│ ├── gdi32.go
│ ├── gdiplus.go
│ ├── idispatch.go
│ ├── istream.go
│ ├── iunknown.go
│ ├── kernel32.go
│ ├── ole32.go
│ ├── oleaut32.go
│ ├── opengl32.go
│ ├── psapi.go
│ ├── shell32.go
│ ├── typedef.go
│ ├── user32.go
│ ├── utils.go
│ └── vars.go
├── golang.org
└── x
│ ├── crypto
│ ├── AUTHORS
│ ├── CONTRIBUTORS
│ ├── LICENSE
│ ├── PATENTS
│ ├── acme
│ │ ├── acme.go
│ │ ├── autocert
│ │ │ ├── autocert.go
│ │ │ ├── cache.go
│ │ │ ├── listener.go
│ │ │ └── renewal.go
│ │ ├── http.go
│ │ ├── jws.go
│ │ ├── rfc8555.go
│ │ ├── types.go
│ │ └── version_go112.go
│ ├── bcrypt
│ │ ├── base64.go
│ │ └── bcrypt.go
│ └── blowfish
│ │ ├── block.go
│ │ ├── cipher.go
│ │ └── const.go
│ ├── net
│ ├── AUTHORS
│ ├── CONTRIBUTORS
│ ├── LICENSE
│ ├── PATENTS
│ ├── context
│ │ ├── context.go
│ │ ├── ctxhttp
│ │ │ ├── ctxhttp.go
│ │ │ └── ctxhttp_pre17.go
│ │ ├── go17.go
│ │ ├── go19.go
│ │ ├── pre_go17.go
│ │ └── pre_go19.go
│ └── idna
│ │ ├── example_test.go
│ │ ├── foo.txt
│ │ ├── idna10.0.0.go
│ │ ├── idna9.0.0.go
│ │ ├── idna_test.go
│ │ ├── punycode.go
│ │ ├── punycode_test.go
│ │ ├── tables10.0.0.go
│ │ ├── tables11.0.0.go
│ │ ├── tables12.00.go
│ │ ├── tables9.0.0.go
│ │ ├── trie.go
│ │ └── trieval.go
│ └── sys
│ ├── LICENSE
│ ├── PATENTS
│ └── unix
│ ├── .gitignore
│ ├── 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
│ ├── 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_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_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_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_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_netbsd_386.go
│ ├── ztypes_netbsd_amd64.go
│ ├── ztypes_netbsd_arm.go
│ ├── ztypes_openbsd_386.go
│ ├── ztypes_openbsd_amd64.go
│ └── ztypes_solaris_amd64.go
└── gopkg.in
└── alecthomas
└── kingpin.v2
├── .travis.yml
├── COPYING
├── README.md
├── actions.go
├── app.go
├── args.go
├── cmd.go
├── completions.go
├── doc.go
├── envar.go
├── flags.go
├── global.go
├── guesswidth.go
├── guesswidth_unix.go
├── model.go
├── parser.go
├── parsers.go
├── templates.go
├── usage.go
├── values.go
├── values.json
└── values_generated.go
/.gitignore:
--------------------------------------------------------------------------------
1 | bcd-proxy
2 | shared
3 | bcd
4 | .DS_Store
5 |
--------------------------------------------------------------------------------
/.gitlab-ci.yml:
--------------------------------------------------------------------------------
1 | image: docker:latest
2 |
3 | services:
4 | - docker:dind
5 |
6 | before_script:
7 | - docker info
8 |
9 | test:
10 | stage: test
11 | script:
12 | - docker run --rm -v "$PWD":/go/src/gitlab.com/bytesized/bcd/ -w /go/src/gitlab.com/bytesized/bcd/ golang:1.7.1 go test $(go list ./... | grep -v /vendor/)
13 | tags:
14 | - docker
15 |
16 | build:
17 | artifacts:
18 | name: "bcd_${CI_BUILD_REF_NAME}"
19 | paths:
20 | - bcd
21 | stage: build
22 | script:
23 | - docker run --rm -v "$PWD":/go/src/gitlab.com/bytesized/bcd/ -w /go/src/gitlab.com/bytesized/bcd/ golang:1.7.1 sh bin/build
24 | tags:
25 | - docker
26 |
--------------------------------------------------------------------------------
/Godeps/Readme:
--------------------------------------------------------------------------------
1 | This directory tree is generated automatically by godep.
2 |
3 | Please do not edit.
4 |
5 | See https://github.com/tools/godep for more information.
6 |
--------------------------------------------------------------------------------
/bin/build:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 | set -e
3 |
4 | echo "* Grabbing bindata"
5 | go get -u github.com/jteeuwen/go-bindata/...
6 |
7 | echo "* Building assets"
8 |
9 | go-bindata -nomemcopy -pkg plugins -o plugins/plugin_data.go plugins/*/data/*
10 |
11 | echo "* Building bcd-generate"
12 | go install -v github.com/bytesizedhosting/bcd/cmd/bcd-generate
13 |
14 | echo "* Generating RPC proxy wrappers"
15 | go generate
16 |
17 | echo "* Building bcd"
18 | go install -v github.com/bytesizedhosting/bcd
19 | go build -v github.com/bytesizedhosting/bcd
20 |
21 | echo "* Building bcd-proxy"
22 | go install -v github.com/bytesizedhosting/bcd/cmd/bcd-proxy
23 | go build -v github.com/bytesizedhosting/bcd/cmd/bcd-proxy
24 |
--------------------------------------------------------------------------------
/cmd/bcd-generate/templates/manifest.yml.templ:
--------------------------------------------------------------------------------
1 | exposed_methods:
2 | - Install
3 | - Restart
4 | - Stop
5 | - Start
6 | method_options:
7 | Install:
8 | - default_value: /home/bytesized/config/{{ .LowerName }}
9 | name: config_folder
10 | type: string
11 | allow_deletion: true
12 | - default_value:
13 | hint: ""
14 | name: username
15 | type: string
16 | hint: ""
17 | - default_value:
18 | hint: ""
19 | name: password
20 | type: string
21 | hint: "If you leave this empty a random password will be selected for you"
22 | - default_value:
23 | hint: Select a free port to run this on, leave empty to have a port picked for you.
24 | name: web_port
25 | type: string
26 | Restart:
27 | - default_value: ""
28 | hint: ""
29 | name: container_id
30 | type: string
31 | Start:
32 | - default_value: ""
33 | hint: ""
34 | name: container_id
35 | type: string
36 | Stop:
37 | - default_value: ""
38 | hint: ""
39 | name: container_id
40 | type: string
41 | name: {{ .LowerName }}
42 | rpc_name: {{ .Name}}RPC
43 | show_options:
44 | - username
45 | - password
46 | - web_port
47 | - config_folder
48 | version: 1
49 | web_url_format: http://##ip##:##web_port##/
50 | description: "Your app description here."
51 |
--------------------------------------------------------------------------------
/contrib/bcd-proxy.conf:
--------------------------------------------------------------------------------
1 | # Bytesized Proxy
2 | description "Bytesized Connect Proxy"
3 | start on startup
4 |
5 | exec /usr/local/bin/bcd-proxy
6 |
7 | respawn
8 | respawn limit 5 60
9 |
--------------------------------------------------------------------------------
/contrib/bcd-proxy.service:
--------------------------------------------------------------------------------
1 | [Unit]
2 | Description=Bytesized Connect Proxy
3 |
4 | [Service]
5 | Type=simple
6 | Restart=always
7 | RestartSec=3
8 | ExecStart=/usr/local/bin/bcd-proxy
9 |
10 | [Install]
11 | WantedBy=multi-user.target
12 |
--------------------------------------------------------------------------------
/contrib/bcd.conf:
--------------------------------------------------------------------------------
1 | # Bytesized Engine
2 | description "Bytesized Connect Daemon"
3 | start on startup
4 |
5 | exec /usr/local/bin/bcd start
6 | setuid bytesized
7 |
8 | respawn
9 | respawn limit 5 60
10 |
--------------------------------------------------------------------------------
/contrib/bcd.service:
--------------------------------------------------------------------------------
1 | [Unit]
2 | Description=Bytesized Connect Daemon
3 |
4 | [Service]
5 | Type=simple
6 | User=bytesized
7 | Restart=always
8 | RestartSec=3
9 | ExecStart=/usr/local/bin/bcd start
10 |
11 | [Install]
12 | WantedBy=multi-user.target
13 |
--------------------------------------------------------------------------------
/engines/rpc_methods.go:
--------------------------------------------------------------------------------
1 | package engine
2 |
3 | import (
4 | "github.com/bytesizedhosting/bcd/core"
5 | )
6 |
7 | type CoreRPC struct {
8 | engine *RpcEngine
9 | }
10 |
11 | func (self *CoreRPC) GetManifests(nothing *PluginResponse, res *ManifestResponse) error {
12 | for _, plugin := range self.engine.plugins {
13 | p := *plugin
14 | manifest := p.GetManifest()
15 | if manifest != nil {
16 | res.Manifests = append(res.Manifests, manifest)
17 | }
18 | }
19 | return nil
20 | }
21 |
22 | func (self *CoreRPC) GetVersion(_ int, res *string) error {
23 | *res = core.VerString
24 | return nil
25 | }
26 |
27 | func (self *CoreRPC) GetPlugins(nothing *PluginResponse, res *PluginResponse) error {
28 | for _, plugin := range self.engine.plugins {
29 | p := *plugin
30 | res.Plugins = append(res.Plugins, &SimplePluginRes{Name: p.GetName(), Version: p.GetVersion()})
31 | }
32 |
33 | return nil
34 | }
35 |
--------------------------------------------------------------------------------
/plugins/cardigann/data/config.json:
--------------------------------------------------------------------------------
1 | {
2 | "global": {
3 | "passphrase": "{{ .Password }}"
4 | }
5 | }
6 |
--------------------------------------------------------------------------------
/plugins/cardigann/data/manifest.yml:
--------------------------------------------------------------------------------
1 | exposed_methods:
2 | - Install
3 | - Restart
4 | - Stop
5 | - Start
6 | method_options:
7 | Install:
8 | - default_value: /home/bytesized/config/cardigann
9 | name: config_folder
10 | type: string
11 | allow_deletion: true
12 | - default_value:
13 | hint: ""
14 | name: password
15 | type: string
16 | hint: "If you leave this empty a random password will be selected for you"
17 | - default_value:
18 | hint: Select a free port to run this on, leave empty to have a port picked for you.
19 | name: web_port
20 | type: string
21 | Restart:
22 | - default_value: ""
23 | hint: ""
24 | name: container_id
25 | type: string
26 | Start:
27 | - default_value: ""
28 | hint: ""
29 | name: container_id
30 | type: string
31 | Stop:
32 | - default_value: ""
33 | hint: ""
34 | name: container_id
35 | type: string
36 | name: cardigann
37 | rpc_name: CardigannRPC
38 | show_options:
39 | - username
40 | - password
41 | - web_port
42 | - config_folder
43 | version: 1
44 | web_url_format: http://##ip##:##web_port##/
45 | description: "Cardigann is a better Jackett"
46 |
--------------------------------------------------------------------------------
/plugins/deluge/data/auth:
--------------------------------------------------------------------------------
1 | localclient:{{ .EncPassword }}:10
2 | {{ .Username }}:{{ .Password}}:10
3 |
--------------------------------------------------------------------------------
/plugins/deluge/data/hostlist.conf.1.2:
--------------------------------------------------------------------------------
1 | {
2 | "file": 1,
3 | "format": 1
4 | }{
5 | "hosts": [
6 | [
7 | "{{ .EncPassword }}",
8 | "127.0.0.1",
9 | {{ .DaemonPort }},
10 | "",
11 | ""
12 | ]
13 | ]
14 | }
15 |
--------------------------------------------------------------------------------
/plugins/deluge/data/web.conf:
--------------------------------------------------------------------------------
1 | {
2 | "file": 1,
3 | "format": 1
4 | }{
5 | "sidebar_show_zero": false,
6 | "show_session_speed": true,
7 | "pwd_sha1": "{{ .EncPassword }}",
8 | "show_sidebar": true,
9 | "sessions": {},
10 | "enabled_plugins": [],
11 | "base": "/",
12 | "first_login": false,
13 | "theme": "gray",
14 | "pkey": "ssl/daemon.pkey",
15 | "cert": "ssl/daemon.cert",
16 | "session_timeout": 3600,
17 | "https": false,
18 | "default_daemon": "",
19 | "sidebar_multiple_filters": true,
20 | "pwd_salt": "{{ .Salt }}",
21 | "port": {{ .WebPort }}
22 | }
23 |
--------------------------------------------------------------------------------
/plugins/deluge/rpc_proxy.go:
--------------------------------------------------------------------------------
1 | // THIS FILE IS AUTO-GENERATED DO NOT EDIT
2 |
3 | package deluge
4 |
5 | import (
6 | log "github.com/Sirupsen/logrus"
7 | "github.com/bytesizedhosting/bcd/jobs"
8 | "github.com/bytesizedhosting/bcd/plugins"
9 | )
10 |
11 | type DelugeRPC struct {
12 | base *Deluge
13 | plugins.BaseRPC
14 | }
15 | func (self *DelugeRPC) Reinstall(opts *DelugeOpts, job *jobs.Job) error {
16 | err := self.base.Uninstall(&plugins.AppConfig{ContainerId: opts.ContainerId})
17 | if err != nil {
18 | log.Infoln("Could not remove Docker container but since this is a reinstall we don't care.")
19 | }
20 | self.Install(opts, job)
21 | return nil
22 | }
23 |
24 | func (self *DelugeRPC) Install(opts *DelugeOpts, job *jobs.Job) error {
25 | *job = *jobs.New(opts)
26 | log.Debugln("Deluge options:", opts)
27 | go func() {
28 | err := self.base.Install(opts)
29 | job.Options = *opts
30 |
31 | if err != nil {
32 | log.Debugln("Deluge installation received an error:", err)
33 | job.ErrorString = err.Error()
34 | job.Error = err
35 | job.Status = jobs.FAILED
36 | } else {
37 | log.Infoln("Deluge installation completed")
38 | job.Status = jobs.FINISHED
39 | }
40 |
41 | jobs.Storage.Set(job.Id, job)
42 | }()
43 |
44 | return nil
45 | }
46 |
--------------------------------------------------------------------------------
/plugins/filebot/rpc_proxy.go:
--------------------------------------------------------------------------------
1 | // THIS FILE IS AUTO-GENERATED DO NOT EDIT
2 |
3 | package filebot
4 |
5 | import (
6 | log "github.com/Sirupsen/logrus"
7 | "github.com/bytesizedhosting/bcd/jobs"
8 | "github.com/bytesizedhosting/bcd/plugins"
9 | )
10 |
11 | type FilebotRPC struct {
12 | base *Filebot
13 | plugins.BaseRPC
14 | }
15 | func (self *FilebotRPC) Reinstall(opts *FilebotOpts, job *jobs.Job) error {
16 | err := self.base.Uninstall(&plugins.AppConfig{ContainerId: opts.ContainerId})
17 | if err != nil {
18 | log.Infoln("Could not remove Docker container but since this is a reinstall we don't care.")
19 | }
20 | self.Install(opts, job)
21 | return nil
22 | }
23 |
24 | func (self *FilebotRPC) Install(opts *FilebotOpts, job *jobs.Job) error {
25 | *job = *jobs.New(opts)
26 | log.Debugln("Filebot options:", opts)
27 | go func() {
28 | err := self.base.Install(opts)
29 | job.Options = *opts
30 |
31 | if err != nil {
32 | log.Debugln("Filebot installation received an error:", err)
33 | job.ErrorString = err.Error()
34 | job.Error = err
35 | job.Status = jobs.FAILED
36 | } else {
37 | log.Infoln("Filebot installation completed")
38 | job.Status = jobs.FINISHED
39 | }
40 |
41 | jobs.Storage.Set(job.Id, job)
42 | }()
43 |
44 | return nil
45 | }
46 |
--------------------------------------------------------------------------------
/plugins/jackett/data/ServerConfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "Port": 9117,
3 | "AllowExternal": true,
4 | "APIKey": "{{ .ApiKey }}",
5 | "AdminPassword": "{{ .EncPassword }}",
6 | "BlackholeDir": "",
7 | "UpdateDisabled": false,
8 | "UpdatePrerelease": false
9 | }
10 |
11 |
--------------------------------------------------------------------------------
/plugins/jackett/data/manifest.yml:
--------------------------------------------------------------------------------
1 | exposed_methods:
2 | - Install
3 | - Restart
4 | - Stop
5 | - Start
6 | method_options:
7 | Install:
8 | - default_value: /home/bytesized/config/jackett
9 | name: config_folder
10 | type: string
11 | allow_deletion: true
12 | - default_value:
13 | hint: ""
14 | name: password
15 | type: string
16 | hint: "If you leave this empty a random password will be selected for you"
17 | - default_value:
18 | hint: Select a free port to run this on, leave empty to have a port picked for you.
19 | name: web_port
20 | type: string
21 | Restart:
22 | - default_value: ""
23 | hint: ""
24 | name: container_id
25 | type: string
26 | Start:
27 | - default_value: ""
28 | hint: ""
29 | name: container_id
30 | type: string
31 | Stop:
32 | - default_value: ""
33 | hint: ""
34 | name: container_id
35 | type: string
36 | name: jackett
37 | rpc_name: JackettRPC
38 | show_options:
39 | - password
40 | - web_port
41 | - config_folder
42 | version: 1
43 | web_url_format: http://##ip##:##web_port##/
44 | description: "Torznab and TorrentPotato APIs for Sonarr and the likes"
45 |
--------------------------------------------------------------------------------
/plugins/jackett/rpc_proxy.go:
--------------------------------------------------------------------------------
1 | // THIS FILE IS AUTO-GENERATED DO NOT EDIT
2 |
3 | package jackett
4 |
5 | import (
6 | log "github.com/Sirupsen/logrus"
7 | "github.com/bytesizedhosting/bcd/jobs"
8 | "github.com/bytesizedhosting/bcd/plugins"
9 | )
10 |
11 | type JackettRPC struct {
12 | base *Jackett
13 | plugins.BaseRPC
14 | }
15 | func (self *JackettRPC) Reinstall(opts *JackettOpts, job *jobs.Job) error {
16 | err := self.base.Uninstall(&plugins.AppConfig{ContainerId: opts.ContainerId})
17 | if err != nil {
18 | log.Infoln("Could not remove Docker container but since this is a reinstall we don't care.")
19 | }
20 | self.Install(opts, job)
21 | return nil
22 | }
23 |
24 | func (self *JackettRPC) Install(opts *JackettOpts, job *jobs.Job) error {
25 | *job = *jobs.New(opts)
26 | log.Debugln("Jackett options:", opts)
27 | go func() {
28 | err := self.base.Install(opts)
29 | job.Options = *opts
30 |
31 | if err != nil {
32 | log.Debugln("Jackett installation received an error:", err)
33 | job.ErrorString = err.Error()
34 | job.Error = err
35 | job.Status = jobs.FAILED
36 | } else {
37 | log.Infoln("Jackett installation completed")
38 | job.Status = jobs.FINISHED
39 | }
40 |
41 | jobs.Storage.Set(job.Id, job)
42 | }()
43 |
44 | return nil
45 | }
46 |
--------------------------------------------------------------------------------
/plugins/jobs/rpc.go:
--------------------------------------------------------------------------------
1 | package jobrpc
2 |
3 | import (
4 | "fmt"
5 | "github.com/bytesizedhosting/bcd/jobs"
6 | "github.com/bytesizedhosting/bcd/plugins"
7 | "net/rpc"
8 | )
9 |
10 | type JobRPC struct {
11 | plugins.Base
12 | }
13 |
14 | func New() *JobRPC {
15 | return &JobRPC{plugins.Base{Name: "jobs", Version: 1}}
16 | }
17 |
18 | func (self *JobRPC) RegisterRPC(server *rpc.Server) {
19 | server.Register(self)
20 | }
21 | func (self *JobRPC) Get(jobId string, job *jobs.Job) error {
22 | njob := jobs.Storage.Get(jobId)
23 |
24 | if (*njob == jobs.Job{}) {
25 | return fmt.Errorf("Job status got lost, most likely during a reboot of the daemon")
26 | } else {
27 | *job = *njob
28 | }
29 | return nil
30 | }
31 |
--------------------------------------------------------------------------------
/plugins/murmur/data/manifest.yml:
--------------------------------------------------------------------------------
1 | exposed_methods:
2 | - Install
3 | - Restart
4 | - Stop
5 | - Start
6 | method_options:
7 | Install:
8 | - default_value: bytesized
9 | hint: ""
10 | name: username
11 | type: string
12 | - default_value: /home/bytesized/config/murmur
13 | name: config_folder
14 | type: string
15 | allow_deletion: true
16 | - default_value:
17 | hint: ""
18 | name: password
19 | type: string
20 | hint: "If you leave this empty a random password will be selected for you"
21 | - default_value:
22 | hint: Select a free port to run this on, leave empty to have a port picked for you.
23 | name: web_port
24 | type: string
25 | Restart:
26 | - default_value: ""
27 | hint: ""
28 | name: container_id
29 | type: string
30 | Start:
31 | - default_value: ""
32 | hint: ""
33 | name: container_id
34 | type: string
35 | Stop:
36 | - default_value: ""
37 | hint: ""
38 | name: container_id
39 | type: string
40 | name: Murmur
41 | rpc_name: MurmurRPC
42 | show_options:
43 | - username
44 | - password
45 | - web_port
46 | - config_folder
47 | version: 1
48 | description: "A server for Mumble Voice Chat"
49 |
--------------------------------------------------------------------------------
/plugins/murmur/rpc_proxy.go:
--------------------------------------------------------------------------------
1 | // THIS FILE IS AUTO-GENERATED DO NOT EDIT
2 |
3 | package murmur
4 |
5 | import (
6 | log "github.com/Sirupsen/logrus"
7 | "github.com/bytesizedhosting/bcd/jobs"
8 | "github.com/bytesizedhosting/bcd/plugins"
9 | )
10 |
11 | type MurmurRPC struct {
12 | base *Murmur
13 | plugins.BaseRPC
14 | }
15 | func (self *MurmurRPC) Reinstall(opts *MurmurOpts, job *jobs.Job) error {
16 | err := self.base.Uninstall(&plugins.AppConfig{ContainerId: opts.ContainerId})
17 | if err != nil {
18 | log.Infoln("Could not remove Docker container but since this is a reinstall we don't care.")
19 | }
20 | self.Install(opts, job)
21 | return nil
22 | }
23 |
24 | func (self *MurmurRPC) Install(opts *MurmurOpts, job *jobs.Job) error {
25 | *job = *jobs.New(opts)
26 | log.Debugln("Murmur options:", opts)
27 | go func() {
28 | err := self.base.Install(opts)
29 | job.Options = *opts
30 |
31 | if err != nil {
32 | log.Debugln("Murmur installation received an error:", err)
33 | job.ErrorString = err.Error()
34 | job.Error = err
35 | job.Status = jobs.FAILED
36 | } else {
37 | log.Infoln("Murmur installation completed")
38 | job.Status = jobs.FINISHED
39 | }
40 |
41 | jobs.Storage.Set(job.Id, job)
42 | }()
43 |
44 | return nil
45 | }
46 |
--------------------------------------------------------------------------------
/plugins/nzbget/rpc_proxy.go:
--------------------------------------------------------------------------------
1 | // THIS FILE IS AUTO-GENERATED DO NOT EDIT
2 |
3 | package nzbget
4 |
5 | import (
6 | log "github.com/Sirupsen/logrus"
7 | "github.com/bytesizedhosting/bcd/jobs"
8 | "github.com/bytesizedhosting/bcd/plugins"
9 | )
10 |
11 | type NzbgetRPC struct {
12 | base *Nzbget
13 | plugins.BaseRPC
14 | }
15 | func (self *NzbgetRPC) Reinstall(opts *NzbgetOpts, job *jobs.Job) error {
16 | err := self.base.Uninstall(&plugins.AppConfig{ContainerId: opts.ContainerId})
17 | if err != nil {
18 | log.Infoln("Could not remove Docker container but since this is a reinstall we don't care.")
19 | }
20 | self.Install(opts, job)
21 | return nil
22 | }
23 |
24 | func (self *NzbgetRPC) Install(opts *NzbgetOpts, job *jobs.Job) error {
25 | *job = *jobs.New(opts)
26 | log.Debugln("Nzbget options:", opts)
27 | go func() {
28 | err := self.base.Install(opts)
29 | job.Options = *opts
30 |
31 | if err != nil {
32 | log.Debugln("Nzbget installation received an error:", err)
33 | job.ErrorString = err.Error()
34 | job.Error = err
35 | job.Status = jobs.FAILED
36 | } else {
37 | log.Infoln("Nzbget installation completed")
38 | job.Status = jobs.FINISHED
39 | }
40 |
41 | jobs.Storage.Set(job.Id, job)
42 | }()
43 |
44 | return nil
45 | }
46 |
--------------------------------------------------------------------------------
/plugins/plex/data/manifest.yml:
--------------------------------------------------------------------------------
1 | exposed_methods:
2 | - Install
3 | - Restart
4 | - Stop
5 | - Start
6 | method_options:
7 | Install:
8 | - default_value: ""
9 | hint: "Claim token can be obtained here: https://www.plex.tv/claim/"
10 | name: plex_claim
11 | type: string
12 | - default_value: /home/bytesized/config/plex
13 | hint: ""
14 | name: config_folder
15 | type: string
16 | - default_value: /home/bytesized/media
17 | hint: "The folder that contains your media"
18 | name: media_folder
19 | type: string
20 | - default_value: /home/bytesized/data
21 | hint: ""
22 | name: data_folder
23 | type: string
24 | - default_value: ""
25 | hint: ""
26 | name: plex_pass
27 | type: boolean
28 | Restart:
29 | - default_value: ""
30 | hint: ""
31 | name: container_id
32 | type: string
33 | Start:
34 | - default_value: ""
35 | hint: ""
36 | name: container_id
37 | type: string
38 | Stop:
39 | - default_value: ""
40 | hint: ""
41 | name: container_id
42 | type: string
43 | name: Plex
44 | rpc_name: PlexRPC
45 | show_options:
46 | - config_folder
47 | - data_folder
48 | version: 1
49 | web_url_format: http://##ip##:32400
50 | description: "Latest Plex server based on the official Plex Docker image"
51 |
--------------------------------------------------------------------------------
/plugins/plex/rpc_proxy.go:
--------------------------------------------------------------------------------
1 | // THIS FILE IS AUTO-GENERATED DO NOT EDIT
2 |
3 | package plex
4 |
5 | import (
6 | log "github.com/Sirupsen/logrus"
7 | "github.com/bytesizedhosting/bcd/jobs"
8 | "github.com/bytesizedhosting/bcd/plugins"
9 | )
10 |
11 | type PlexRPC struct {
12 | base *Plex
13 | plugins.BaseRPC
14 | }
15 | func (self *PlexRPC) Reinstall(opts *PlexOpts, job *jobs.Job) error {
16 | err := self.base.Uninstall(&plugins.AppConfig{ContainerId: opts.ContainerId})
17 | if err != nil {
18 | log.Infoln("Could not remove Docker container but since this is a reinstall we don't care.")
19 | }
20 | self.Install(opts, job)
21 | return nil
22 | }
23 |
24 | func (self *PlexRPC) Install(opts *PlexOpts, job *jobs.Job) error {
25 | *job = *jobs.New(opts)
26 | log.Debugln("Plex options:", opts)
27 | go func() {
28 | err := self.base.Install(opts)
29 | job.Options = *opts
30 |
31 | if err != nil {
32 | log.Debugln("Plex installation received an error:", err)
33 | job.ErrorString = err.Error()
34 | job.Error = err
35 | job.Status = jobs.FAILED
36 | } else {
37 | log.Infoln("Plex installation completed")
38 | job.Status = jobs.FINISHED
39 | }
40 |
41 | jobs.Storage.Set(job.Id, job)
42 | }()
43 |
44 | return nil
45 | }
46 |
--------------------------------------------------------------------------------
/plugins/plexpy/data/manifest.yml:
--------------------------------------------------------------------------------
1 | exposed_methods:
2 | - Install
3 | - Restart
4 | - Stop
5 | - Start
6 | method_options:
7 | Install:
8 | - default_value: bytesized
9 | hint: ""
10 | name: username
11 | type: string
12 | - default_value:
13 | hint: ""
14 | name: password
15 | type: string
16 | hint: "If you leave this empty a random password will be selected for you"
17 | - default_value: /home/bytesized/config/plexpy
18 | name: config_folder
19 | type: string
20 | allow_deletion: true
21 | - default_value:
22 | hint: Select a free port to run this on, leave empty to have a port picked for you.
23 | name: web_port
24 | type: string
25 | Restart:
26 | - default_value: ""
27 | hint: ""
28 | name: container_id
29 | type: string
30 | Start:
31 | - default_value: ""
32 | hint: ""
33 | name: container_id
34 | type: string
35 | Stop:
36 | - default_value: ""
37 | hint: ""
38 | name: container_id
39 | type: string
40 | name: Plexpy
41 | rpc_name: PlexpyRPC
42 | show_options:
43 | - username
44 | - password
45 | - web_port
46 | - config_folder
47 | version: 1
48 | web_url_format: http://##ip##:##web_port##/
49 | description: "Plexpy is a Plex monitoring application"
50 |
--------------------------------------------------------------------------------
/plugins/plexpy/rpc_proxy.go:
--------------------------------------------------------------------------------
1 | // THIS FILE IS AUTO-GENERATED DO NOT EDIT
2 |
3 | package plexpy
4 |
5 | import (
6 | log "github.com/Sirupsen/logrus"
7 | "github.com/bytesizedhosting/bcd/jobs"
8 | "github.com/bytesizedhosting/bcd/plugins"
9 | )
10 |
11 | type PlexpyRPC struct {
12 | base *Plexpy
13 | plugins.BaseRPC
14 | }
15 | func (self *PlexpyRPC) Reinstall(opts *PlexpyOpts, job *jobs.Job) error {
16 | err := self.base.Uninstall(&plugins.AppConfig{ContainerId: opts.ContainerId})
17 | if err != nil {
18 | log.Infoln("Could not remove Docker container but since this is a reinstall we don't care.")
19 | }
20 | self.Install(opts, job)
21 | return nil
22 | }
23 |
24 | func (self *PlexpyRPC) Install(opts *PlexpyOpts, job *jobs.Job) error {
25 | *job = *jobs.New(opts)
26 | log.Debugln("Plexpy options:", opts)
27 | go func() {
28 | err := self.base.Install(opts)
29 | job.Options = *opts
30 |
31 | if err != nil {
32 | log.Debugln("Plexpy installation received an error:", err)
33 | job.ErrorString = err.Error()
34 | job.Error = err
35 | job.Status = jobs.FAILED
36 | } else {
37 | log.Infoln("Plexpy installation completed")
38 | job.Status = jobs.FINISHED
39 | }
40 |
41 | jobs.Storage.Set(job.Id, job)
42 | }()
43 |
44 | return nil
45 | }
46 |
--------------------------------------------------------------------------------
/plugins/plexrequests/data/manifest.yml:
--------------------------------------------------------------------------------
1 | exposed_methods:
2 | - Install
3 | - Restart
4 | - Stop
5 | - Start
6 | method_options:
7 | Install:
8 | - default_value: /home/bytesized/config/plexrequests
9 | name: config_folder
10 | type: string
11 | allow_deletion: true
12 | - default_value:
13 | hint: Select a free port to run this on, leave empty to have a port picked for you.
14 | name: web_port
15 | type: string
16 | Restart:
17 | - default_value: ""
18 | hint: ""
19 | name: container_id
20 | type: string
21 | Start:
22 | - default_value: ""
23 | hint: ""
24 | name: container_id
25 | type: string
26 | Stop:
27 | - default_value: ""
28 | hint: ""
29 | name: container_id
30 | type: string
31 | name: plexrequests
32 | rpc_name: PlexrequestsRPC
33 | show_options:
34 | - web_port
35 | - config_folder
36 | version: 1
37 | web_url_format: http://##ip##:##web_port##/
38 | description: "Simple automated way for users to request new content for Plex."
39 |
--------------------------------------------------------------------------------
/plugins/portainer/data/manifest.yml:
--------------------------------------------------------------------------------
1 | exposed_methods:
2 | - Install
3 | - Restart
4 | - Stop
5 | - Start
6 | method_options:
7 | Install:
8 | - default_value: /home/bytesized/config/portainer
9 | name: config_folder
10 | type: string
11 | allow_deletion: true
12 | - default_value: /var/run/docker.sock
13 | name: socket_path
14 | type: string
15 | allow_deletion: true
16 | - default_value:
17 | hint: Select a free port to run this on, leave empty to have a port picked for you.
18 | name: web_port
19 | type: string
20 | Restart:
21 | - default_value: ""
22 | hint: ""
23 | name: container_id
24 | type: string
25 | Start:
26 | - default_value: ""
27 | hint: ""
28 | name: container_id
29 | type: string
30 | Stop:
31 | - default_value: ""
32 | hint: ""
33 | name: container_id
34 | type: string
35 | name: portainer
36 | rpc_name: PortainerRPC
37 | show_options:
38 | - socket_path
39 | - web_port
40 | - config_folder
41 | version: 1
42 | web_url_format: http://##ip##:##web_port##/
43 | description: "Your app description here."
44 |
--------------------------------------------------------------------------------
/plugins/proxy/proxy.go:
--------------------------------------------------------------------------------
1 | package proxy
2 |
3 | import (
4 | log "github.com/Sirupsen/logrus"
5 | "github.com/bytesizedhosting/bcd/core"
6 | "net/url"
7 | )
8 |
9 | type ProxySlice []*Proxy
10 |
11 | type Proxy struct {
12 | Source string `json:"source"`
13 | Target string `json:"target"`
14 | ExternalId string `json:"external_id"`
15 | }
16 |
17 | type ProxyMap map[string]*url.URL
18 |
19 | func (self *ProxyMap) LoadFromConfig(path string) error {
20 | c := ProxyConfig{}
21 | err := core.LoadConfig(path, &c)
22 | if err != nil {
23 | return err
24 | }
25 | for _, p := range c.Proxies {
26 | self.Add(p.Source, p.Target)
27 | }
28 | return nil
29 | }
30 |
31 | func (self *ProxyMap) Add(sourceUrl string, targetUrl string) error {
32 | log.Infof("Adding %s as proxy to %s", sourceUrl, targetUrl)
33 | u, err := url.Parse(targetUrl)
34 |
35 | if err != nil {
36 | return err
37 | }
38 |
39 | pMap := *self
40 | pMap[sourceUrl] = u
41 | self = &pMap
42 |
43 | return nil
44 | }
45 |
--------------------------------------------------------------------------------
/plugins/radarr/data/manifest.yml:
--------------------------------------------------------------------------------
1 | exposed_methods:
2 | - Install
3 | - Restart
4 | - Stop
5 | - Start
6 | method_options:
7 | Install:
8 | - default_value: /home/bytesized/config/radarr
9 | name: config_folder
10 | type: string
11 | allow_deletion: true
12 | - default_value: /home/bytesized/data
13 | hint: Folder containing your data
14 | name: data_folder
15 | type: string
16 | - default_value: /home/bytesized/media
17 | hint: Folder with renamed media data
18 | name: media_folder
19 | type: string
20 | - default_value:
21 | hint: Select a free port to run this on, leave empty to have a port picked for you.
22 | name: web_port
23 | type: string
24 | Restart:
25 | - default_value: ""
26 | hint: ""
27 | name: container_id
28 | type: string
29 | Start:
30 | - default_value: ""
31 | hint: ""
32 | name: container_id
33 | type: string
34 | Stop:
35 | - default_value: ""
36 | hint: ""
37 | name: container_id
38 | type: string
39 | name: Radarr
40 | rpc_name: RadarrRPC
41 | show_options:
42 | - web_port
43 | - data_folder
44 | - config_folder
45 | - media_folder
46 | version: 1
47 | web_url_format: http://##ip##:##web_port##/
48 | description: "Sonarr for Movies"
49 |
--------------------------------------------------------------------------------
/plugins/radarr/rpc_proxy.go:
--------------------------------------------------------------------------------
1 | // THIS FILE IS AUTO-GENERATED DO NOT EDIT
2 |
3 | package radarr
4 |
5 | import (
6 | log "github.com/Sirupsen/logrus"
7 | "github.com/bytesizedhosting/bcd/jobs"
8 | "github.com/bytesizedhosting/bcd/plugins"
9 | )
10 |
11 | type RadarrRPC struct {
12 | base *Radarr
13 | plugins.BaseRPC
14 | }
15 | func (self *RadarrRPC) Reinstall(opts *RadarrOpts, job *jobs.Job) error {
16 | err := self.base.Uninstall(&plugins.AppConfig{ContainerId: opts.ContainerId})
17 | if err != nil {
18 | log.Infoln("Could not remove Docker container but since this is a reinstall we don't care.")
19 | }
20 | self.Install(opts, job)
21 | return nil
22 | }
23 |
24 | func (self *RadarrRPC) Install(opts *RadarrOpts, job *jobs.Job) error {
25 | *job = *jobs.New(opts)
26 | log.Debugln("Radarr options:", opts)
27 | go func() {
28 | err := self.base.Install(opts)
29 | job.Options = *opts
30 |
31 | if err != nil {
32 | log.Debugln("Radarr installation received an error:", err)
33 | job.ErrorString = err.Error()
34 | job.Error = err
35 | job.Status = jobs.FAILED
36 | } else {
37 | log.Infoln("Radarr installation completed")
38 | job.Status = jobs.FINISHED
39 | }
40 |
41 | jobs.Storage.Set(job.Id, job)
42 | }()
43 |
44 | return nil
45 | }
46 |
--------------------------------------------------------------------------------
/plugins/resilio/rpc_proxy.go:
--------------------------------------------------------------------------------
1 | // THIS FILE IS AUTO-GENERATED DO NOT EDIT
2 |
3 | package resilio
4 |
5 | import (
6 | log "github.com/Sirupsen/logrus"
7 | "github.com/bytesizedhosting/bcd/jobs"
8 | "github.com/bytesizedhosting/bcd/plugins"
9 | )
10 |
11 | type ResilioRPC struct {
12 | base *Resilio
13 | plugins.BaseRPC
14 | }
15 | func (self *ResilioRPC) Reinstall(opts *ResilioOpts, job *jobs.Job) error {
16 | err := self.base.Uninstall(&plugins.AppConfig{ContainerId: opts.ContainerId})
17 | if err != nil {
18 | log.Infoln("Could not remove Docker container but since this is a reinstall we don't care.")
19 | }
20 | self.Install(opts, job)
21 | return nil
22 | }
23 |
24 | func (self *ResilioRPC) Install(opts *ResilioOpts, job *jobs.Job) error {
25 | *job = *jobs.New(opts)
26 | log.Debugln("Resilio options:", opts)
27 | go func() {
28 | err := self.base.Install(opts)
29 | job.Options = *opts
30 |
31 | if err != nil {
32 | log.Debugln("Resilio installation received an error:", err)
33 | job.ErrorString = err.Error()
34 | job.Error = err
35 | job.Status = jobs.FAILED
36 | } else {
37 | log.Infoln("Resilio installation completed")
38 | job.Status = jobs.FINISHED
39 | }
40 |
41 | jobs.Storage.Set(job.Id, job)
42 | }()
43 |
44 | return nil
45 | }
46 |
--------------------------------------------------------------------------------
/plugins/rtorrent/data/rtorrent.rc:
--------------------------------------------------------------------------------
1 | execute = {sh,-c,/usr/bin/php7 /usr/share/webapps/rutorrent/php/initplugins.php bytesized &}
2 | execute.nothrow = rm,/run/php/.rtorrent.sock
3 | network.scgi.open_local = /run/php/.rtorrent.sock
4 | schedule = socket_chmod,0,0,"execute=chmod,0660,/run/php/.rtorrent.sock"
5 | schedule = socket_chgrp,0,0,"execute=chgrp,abc,/run/php/.rtorrent.sock"
6 | log.open_file = "rtorrent", /config/log/rtorrent/rtorrent.log
7 | log.add_output = "info", "rtorrent"
8 | min_peers = 40
9 | max_peers = 1200
10 | max_uploads = 50
11 | download_rate = 300000
12 | upload_rate = 300000
13 | # schedule = watch_directory_1,5,5,"load.start=/data/watch/*.torrent"
14 | directory = /data/completed
15 | session = /config/rtorrent/rtorrent_sess
16 | schedule = low_diskspace,5,60,close_low_diskspace=200M
17 | bind = 0.0.0.0
18 | port_range = {{ .InternalPort }}-{{ .InternalPort }}
19 | check_hash = yes
20 | use_udp_trackers = yes
21 | encryption = allow_incoming,try_outgoing,enable_retry
22 | dht = auto
23 | check_hash = no
24 | port_random = no
25 | dht_port = {{ .DhtPort }}
26 | peer_exchange = yes
27 | # scgi_port = 0.0.0.0:5000
28 | encoding_list = UTF-8
29 | system.umask.set = 002
30 |
--------------------------------------------------------------------------------
/plugins/rtorrent/rpc_proxy.go:
--------------------------------------------------------------------------------
1 | // THIS FILE IS AUTO-GENERATED DO NOT EDIT
2 |
3 | package rtorrent
4 |
5 | import (
6 | log "github.com/Sirupsen/logrus"
7 | "github.com/bytesizedhosting/bcd/jobs"
8 | "github.com/bytesizedhosting/bcd/plugins"
9 | )
10 |
11 | type RtorrentRPC struct {
12 | base *Rtorrent
13 | plugins.BaseRPC
14 | }
15 | func (self *RtorrentRPC) Reinstall(opts *RtorrentOpts, job *jobs.Job) error {
16 | err := self.base.Uninstall(&plugins.AppConfig{ContainerId: opts.ContainerId})
17 | if err != nil {
18 | log.Infoln("Could not remove Docker container but since this is a reinstall we don't care.")
19 | }
20 | self.Install(opts, job)
21 | return nil
22 | }
23 |
24 | func (self *RtorrentRPC) Install(opts *RtorrentOpts, job *jobs.Job) error {
25 | *job = *jobs.New(opts)
26 | log.Debugln("Rtorrent options:", opts)
27 | go func() {
28 | err := self.base.Install(opts)
29 | job.Options = *opts
30 |
31 | if err != nil {
32 | log.Debugln("Rtorrent installation received an error:", err)
33 | job.ErrorString = err.Error()
34 | job.Error = err
35 | job.Status = jobs.FAILED
36 | } else {
37 | log.Infoln("Rtorrent installation completed")
38 | job.Status = jobs.FINISHED
39 | }
40 |
41 | jobs.Storage.Set(job.Id, job)
42 | }()
43 |
44 | return nil
45 | }
46 |
--------------------------------------------------------------------------------
/plugins/sickrage/rpc_proxy.go:
--------------------------------------------------------------------------------
1 | // THIS FILE IS AUTO-GENERATED DO NOT EDIT
2 |
3 | package sickrage
4 |
5 | import (
6 | log "github.com/Sirupsen/logrus"
7 | "github.com/bytesizedhosting/bcd/jobs"
8 | "github.com/bytesizedhosting/bcd/plugins"
9 | )
10 |
11 | type SickrageRPC struct {
12 | base *Sickrage
13 | plugins.BaseRPC
14 | }
15 | func (self *SickrageRPC) Reinstall(opts *SickrageOpts, job *jobs.Job) error {
16 | err := self.base.Uninstall(&plugins.AppConfig{ContainerId: opts.ContainerId})
17 | if err != nil {
18 | log.Infoln("Could not remove Docker container but since this is a reinstall we don't care.")
19 | }
20 | self.Install(opts, job)
21 | return nil
22 | }
23 |
24 | func (self *SickrageRPC) Install(opts *SickrageOpts, job *jobs.Job) error {
25 | *job = *jobs.New(opts)
26 | log.Debugln("Sickrage options:", opts)
27 | go func() {
28 | err := self.base.Install(opts)
29 | job.Options = *opts
30 |
31 | if err != nil {
32 | log.Debugln("Sickrage installation received an error:", err)
33 | job.ErrorString = err.Error()
34 | job.Error = err
35 | job.Status = jobs.FAILED
36 | } else {
37 | log.Infoln("Sickrage installation completed")
38 | job.Status = jobs.FINISHED
39 | }
40 |
41 | jobs.Storage.Set(job.Id, job)
42 | }()
43 |
44 | return nil
45 | }
46 |
--------------------------------------------------------------------------------
/plugins/sonarr/data/manifest.yml:
--------------------------------------------------------------------------------
1 | exposed_methods:
2 | - Install
3 | - Restart
4 | - Stop
5 | - Start
6 | method_options:
7 | Install:
8 | - default_value: /home/bytesized/config/sonarr
9 | name: config_folder
10 | type: string
11 | allow_deletion: true
12 | - default_value: /home/bytesized/data
13 | hint: Folder containing your data
14 | name: data_folder
15 | type: string
16 | - default_value: /home/bytesized/media
17 | hint: Folder with renamed TV data
18 | name: media_folder
19 | type: string
20 | - default_value:
21 | hint: Select a free port to run this on, leave empty to have a port picked for you.
22 | name: web_port
23 | type: string
24 | Restart:
25 | - default_value: ""
26 | hint: ""
27 | name: container_id
28 | type: string
29 | Start:
30 | - default_value: ""
31 | hint: ""
32 | name: container_id
33 | type: string
34 | Stop:
35 | - default_value: ""
36 | hint: ""
37 | name: container_id
38 | type: string
39 | name: Sonarr
40 | rpc_name: SonarrRPC
41 | show_options:
42 | - web_port
43 | - data_folder
44 | - config_folder
45 | - media_folder
46 | version: 1
47 | web_url_format: http://##ip##:##web_port##/
48 | description: "A different automatic Video Library Manager for TV Shows"
49 |
--------------------------------------------------------------------------------
/plugins/sonarr/rpc_proxy.go:
--------------------------------------------------------------------------------
1 | // THIS FILE IS AUTO-GENERATED DO NOT EDIT
2 |
3 | package sonarr
4 |
5 | import (
6 | log "github.com/Sirupsen/logrus"
7 | "github.com/bytesizedhosting/bcd/jobs"
8 | "github.com/bytesizedhosting/bcd/plugins"
9 | )
10 |
11 | type SonarrRPC struct {
12 | base *Sonarr
13 | plugins.BaseRPC
14 | }
15 | func (self *SonarrRPC) Reinstall(opts *SonarrOpts, job *jobs.Job) error {
16 | err := self.base.Uninstall(&plugins.AppConfig{ContainerId: opts.ContainerId})
17 | if err != nil {
18 | log.Infoln("Could not remove Docker container but since this is a reinstall we don't care.")
19 | }
20 | self.Install(opts, job)
21 | return nil
22 | }
23 |
24 | func (self *SonarrRPC) Install(opts *SonarrOpts, job *jobs.Job) error {
25 | *job = *jobs.New(opts)
26 | log.Debugln("Sonarr options:", opts)
27 | go func() {
28 | err := self.base.Install(opts)
29 | job.Options = *opts
30 |
31 | if err != nil {
32 | log.Debugln("Sonarr installation received an error:", err)
33 | job.ErrorString = err.Error()
34 | job.Error = err
35 | job.Status = jobs.FAILED
36 | } else {
37 | log.Infoln("Sonarr installation completed")
38 | job.Status = jobs.FINISHED
39 | }
40 |
41 | jobs.Storage.Set(job.Id, job)
42 | }()
43 |
44 | return nil
45 | }
46 |
--------------------------------------------------------------------------------
/plugins/subsonic/rpc_proxy.go:
--------------------------------------------------------------------------------
1 | // THIS FILE IS AUTO-GENERATED DO NOT EDIT
2 |
3 | package subsonic
4 |
5 | import (
6 | log "github.com/Sirupsen/logrus"
7 | "github.com/bytesizedhosting/bcd/jobs"
8 | "github.com/bytesizedhosting/bcd/plugins"
9 | )
10 |
11 | type SubsonicRPC struct {
12 | base *Subsonic
13 | plugins.BaseRPC
14 | }
15 | func (self *SubsonicRPC) Reinstall(opts *SubsonicOpts, job *jobs.Job) error {
16 | err := self.base.Uninstall(&plugins.AppConfig{ContainerId: opts.ContainerId})
17 | if err != nil {
18 | log.Infoln("Could not remove Docker container but since this is a reinstall we don't care.")
19 | }
20 | self.Install(opts, job)
21 | return nil
22 | }
23 |
24 | func (self *SubsonicRPC) Install(opts *SubsonicOpts, job *jobs.Job) error {
25 | *job = *jobs.New(opts)
26 | log.Debugln("Subsonic options:", opts)
27 | go func() {
28 | err := self.base.Install(opts)
29 | job.Options = *opts
30 |
31 | if err != nil {
32 | log.Debugln("Subsonic installation received an error:", err)
33 | job.ErrorString = err.Error()
34 | job.Error = err
35 | job.Status = jobs.FAILED
36 | } else {
37 | log.Infoln("Subsonic installation completed")
38 | job.Status = jobs.FINISHED
39 | }
40 |
41 | jobs.Storage.Set(job.Id, job)
42 | }()
43 |
44 | return nil
45 | }
46 |
--------------------------------------------------------------------------------
/plugins/vnc/rpc_proxy.go:
--------------------------------------------------------------------------------
1 | // THIS FILE IS AUTO-GENERATED DO NOT EDIT
2 |
3 | package vnc
4 |
5 | import (
6 | log "github.com/Sirupsen/logrus"
7 | "github.com/bytesizedhosting/bcd/jobs"
8 | "github.com/bytesizedhosting/bcd/plugins"
9 | )
10 |
11 | type VncRPC struct {
12 | base *Vnc
13 | plugins.BaseRPC
14 | }
15 | func (self *VncRPC) Reinstall(opts *VncOpts, job *jobs.Job) error {
16 | err := self.base.Uninstall(&plugins.AppConfig{ContainerId: opts.ContainerId})
17 | if err != nil {
18 | log.Infoln("Could not remove Docker container but since this is a reinstall we don't care.")
19 | }
20 | self.Install(opts, job)
21 | return nil
22 | }
23 |
24 | func (self *VncRPC) Install(opts *VncOpts, job *jobs.Job) error {
25 | *job = *jobs.New(opts)
26 | log.Debugln("Vnc options:", opts)
27 | go func() {
28 | err := self.base.Install(opts)
29 | job.Options = *opts
30 |
31 | if err != nil {
32 | log.Debugln("Vnc installation received an error:", err)
33 | job.ErrorString = err.Error()
34 | job.Error = err
35 | job.Status = jobs.FAILED
36 | } else {
37 | log.Infoln("Vnc installation completed")
38 | job.Status = jobs.FINISHED
39 | }
40 |
41 | jobs.Storage.Set(job.Id, job)
42 | }()
43 |
44 | return nil
45 | }
46 |
--------------------------------------------------------------------------------
/plugins/znc/data/manifest.yml:
--------------------------------------------------------------------------------
1 | exposed_methods:
2 | - Install
3 | - Restart
4 | - Stop
5 | - Start
6 | method_options:
7 | Install:
8 | - default_value: /home/bytesized/config/znc
9 | name: config_folder
10 | type: string
11 | allow_deletion: true
12 | - default_value:
13 | hint: ""
14 | name: username
15 | type: string
16 | hint: ""
17 | - default_value:
18 | hint: ""
19 | name: password
20 | type: string
21 | hint: "If you leave this empty a random password will be selected for you"
22 | - default_value:
23 | hint: Select a free port to run this on, leave empty to have a port picked for you.
24 | name: web_port
25 | type: string
26 | Restart:
27 | - default_value: ""
28 | hint: ""
29 | name: container_id
30 | type: string
31 | Start:
32 | - default_value: ""
33 | hint: ""
34 | name: container_id
35 | type: string
36 | Stop:
37 | - default_value: ""
38 | hint: ""
39 | name: container_id
40 | type: string
41 | name: znc
42 | rpc_name: ZncRPC
43 | show_options:
44 | - username
45 | - password
46 | - web_port
47 | - config_folder
48 | version: 1
49 | web_url_format: http://##ip##:##web_port##/
50 | description: "An advanced IRC bouncer."
51 |
--------------------------------------------------------------------------------
/plugins/znc/data/znc.conf:
--------------------------------------------------------------------------------
1 | Version = 1.6.2
2 |
3 | Port = 6868
4 | IPv4 = true
5 | IPv6 = false
6 | SSL = false
7 |
8 |
9 | LoadModule = webadmin
10 |
11 |
12 | Pass = sha256#{{ .EncPassword }}
13 | Admin = true
14 | Nick = {{ .Username }}
15 | AltNick = {{ .Username }}
16 | Ident = {{ .Username }}
17 | RealName = bytesized-hosting.com
18 |
19 | LoadModule = chansaver
20 | LoadModule = controlpanel
21 | LoadModule = webadmin
22 |
23 |
24 |
--------------------------------------------------------------------------------
/plugins/znc/rpc_proxy.go:
--------------------------------------------------------------------------------
1 | // THIS FILE IS AUTO-GENERATED DO NOT EDIT
2 |
3 | package znc
4 |
5 | import (
6 | log "github.com/Sirupsen/logrus"
7 | "github.com/bytesizedhosting/bcd/jobs"
8 | "github.com/bytesizedhosting/bcd/plugins"
9 | )
10 |
11 | type ZncRPC struct {
12 | base *Znc
13 | plugins.BaseRPC
14 | }
15 | func (self *ZncRPC) Reinstall(opts *ZncOpts, job *jobs.Job) error {
16 | err := self.base.Uninstall(&plugins.AppConfig{ContainerId: opts.ContainerId})
17 | if err != nil {
18 | log.Infoln("Could not remove Docker container but since this is a reinstall we don't care.")
19 | }
20 | self.Install(opts, job)
21 | return nil
22 | }
23 |
24 | func (self *ZncRPC) Install(opts *ZncOpts, job *jobs.Job) error {
25 | *job = *jobs.New(opts)
26 | log.Debugln("Znc options:", opts)
27 | go func() {
28 | err := self.base.Install(opts)
29 | job.Options = *opts
30 |
31 | if err != nil {
32 | log.Debugln("Znc installation received an error:", err)
33 | job.ErrorString = err.Error()
34 | job.Error = err
35 | job.Status = jobs.FAILED
36 | } else {
37 | log.Infoln("Znc installation completed")
38 | job.Status = jobs.FINISHED
39 | }
40 |
41 | jobs.Storage.Set(job.Id, job)
42 | }()
43 |
44 | return nil
45 | }
46 |
--------------------------------------------------------------------------------
/vendor/github.com/Sirupsen/logrus/.gitignore:
--------------------------------------------------------------------------------
1 | logrus
2 |
--------------------------------------------------------------------------------
/vendor/github.com/Sirupsen/logrus/.travis.yml:
--------------------------------------------------------------------------------
1 | language: go
2 | go:
3 | - 1.3
4 | - 1.4
5 | - 1.5
6 | - 1.6
7 | - tip
8 | install:
9 | - go get -t ./...
10 | script: GOMAXPROCS=4 GORACE="halt_on_error=1" go test -race -v ./...
11 |
--------------------------------------------------------------------------------
/vendor/github.com/Sirupsen/logrus/LICENSE:
--------------------------------------------------------------------------------
1 | The MIT License (MIT)
2 |
3 | Copyright (c) 2014 Simon Eskildsen
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in
13 | all copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21 | THE SOFTWARE.
22 |
--------------------------------------------------------------------------------
/vendor/github.com/Sirupsen/logrus/doc.go:
--------------------------------------------------------------------------------
1 | /*
2 | Package logrus is a structured logger for Go, completely API compatible with the standard library logger.
3 |
4 |
5 | The simplest way to use Logrus is simply the package-level exported logger:
6 |
7 | package main
8 |
9 | import (
10 | log "github.com/Sirupsen/logrus"
11 | )
12 |
13 | func main() {
14 | log.WithFields(log.Fields{
15 | "animal": "walrus",
16 | "number": 1,
17 | "size": 10,
18 | }).Info("A walrus appears")
19 | }
20 |
21 | Output:
22 | time="2015-09-07T08:48:33Z" level=info msg="A walrus appears" animal=walrus number=1 size=10
23 |
24 | For a full guide visit https://github.com/Sirupsen/logrus
25 | */
26 | package logrus
27 |
--------------------------------------------------------------------------------
/vendor/github.com/Sirupsen/logrus/hooks.go:
--------------------------------------------------------------------------------
1 | package logrus
2 |
3 | // A hook to be fired when logging on the logging levels returned from
4 | // `Levels()` on your implementation of the interface. Note that this is not
5 | // fired in a goroutine or a channel with workers, you should handle such
6 | // functionality yourself if your call is non-blocking and you don't wish for
7 | // the logging calls for levels returned from `Levels()` to block.
8 | type Hook interface {
9 | Levels() []Level
10 | Fire(*Entry) error
11 | }
12 |
13 | // Internal type for storing the hooks on a logger instance.
14 | type LevelHooks map[Level][]Hook
15 |
16 | // Add a hook to an instance of logger. This is called with
17 | // `log.Hooks.Add(new(MyHook))` where `MyHook` implements the `Hook` interface.
18 | func (hooks LevelHooks) Add(hook Hook) {
19 | for _, level := range hook.Levels() {
20 | hooks[level] = append(hooks[level], hook)
21 | }
22 | }
23 |
24 | // Fire all the hooks for the passed level. Used by `entry.log` to fire
25 | // appropriate hooks for a log entry.
26 | func (hooks LevelHooks) Fire(level Level, entry *Entry) error {
27 | for _, hook := range hooks[level] {
28 | if err := hook.Fire(entry); err != nil {
29 | return err
30 | }
31 | }
32 |
33 | return nil
34 | }
35 |
--------------------------------------------------------------------------------
/vendor/github.com/Sirupsen/logrus/json_formatter.go:
--------------------------------------------------------------------------------
1 | package logrus
2 |
3 | import (
4 | "encoding/json"
5 | "fmt"
6 | )
7 |
8 | type JSONFormatter struct {
9 | // TimestampFormat sets the format used for marshaling timestamps.
10 | TimestampFormat string
11 | }
12 |
13 | func (f *JSONFormatter) Format(entry *Entry) ([]byte, error) {
14 | data := make(Fields, len(entry.Data)+3)
15 | for k, v := range entry.Data {
16 | switch v := v.(type) {
17 | case error:
18 | // Otherwise errors are ignored by `encoding/json`
19 | // https://github.com/Sirupsen/logrus/issues/137
20 | data[k] = v.Error()
21 | default:
22 | data[k] = v
23 | }
24 | }
25 | prefixFieldClashes(data)
26 |
27 | timestampFormat := f.TimestampFormat
28 | if timestampFormat == "" {
29 | timestampFormat = DefaultTimestampFormat
30 | }
31 |
32 | data["time"] = entry.Time.Format(timestampFormat)
33 | data["msg"] = entry.Message
34 | data["level"] = entry.Level.String()
35 |
36 | serialized, err := json.Marshal(data)
37 | if err != nil {
38 | return nil, fmt.Errorf("Failed to marshal fields to JSON, %v", err)
39 | }
40 | return append(serialized, '\n'), nil
41 | }
42 |
--------------------------------------------------------------------------------
/vendor/github.com/Sirupsen/logrus/terminal_appengine.go:
--------------------------------------------------------------------------------
1 | // +build appengine
2 |
3 | package logrus
4 |
5 | // IsTerminal returns true if stderr's file descriptor is a terminal.
6 | func IsTerminal() bool {
7 | return true
8 | }
9 |
--------------------------------------------------------------------------------
/vendor/github.com/Sirupsen/logrus/terminal_bsd.go:
--------------------------------------------------------------------------------
1 | // +build darwin freebsd openbsd netbsd dragonfly
2 | // +build !appengine
3 |
4 | package logrus
5 |
6 | import "syscall"
7 |
8 | const ioctlReadTermios = syscall.TIOCGETA
9 |
10 | type Termios syscall.Termios
11 |
--------------------------------------------------------------------------------
/vendor/github.com/Sirupsen/logrus/terminal_linux.go:
--------------------------------------------------------------------------------
1 | // Based on ssh/terminal:
2 | // Copyright 2013 The Go Authors. All rights reserved.
3 | // Use of this source code is governed by a BSD-style
4 | // license that can be found in the LICENSE file.
5 |
6 | // +build !appengine
7 |
8 | package logrus
9 |
10 | import "syscall"
11 |
12 | const ioctlReadTermios = syscall.TCGETS
13 |
14 | type Termios syscall.Termios
15 |
--------------------------------------------------------------------------------
/vendor/github.com/Sirupsen/logrus/terminal_notwindows.go:
--------------------------------------------------------------------------------
1 | // Based on ssh/terminal:
2 | // Copyright 2011 The Go Authors. All rights reserved.
3 | // Use of this source code is governed by a BSD-style
4 | // license that can be found in the LICENSE file.
5 |
6 | // +build linux darwin freebsd openbsd netbsd dragonfly
7 | // +build !appengine
8 |
9 | package logrus
10 |
11 | import (
12 | "syscall"
13 | "unsafe"
14 | )
15 |
16 | // IsTerminal returns true if stderr's file descriptor is a terminal.
17 | func IsTerminal() bool {
18 | fd := syscall.Stderr
19 | var termios Termios
20 | _, _, err := syscall.Syscall6(syscall.SYS_IOCTL, uintptr(fd), ioctlReadTermios, uintptr(unsafe.Pointer(&termios)), 0, 0, 0)
21 | return err == 0
22 | }
23 |
--------------------------------------------------------------------------------
/vendor/github.com/Sirupsen/logrus/terminal_solaris.go:
--------------------------------------------------------------------------------
1 | // +build solaris,!appengine
2 |
3 | package logrus
4 |
5 | import (
6 | "os"
7 |
8 | "golang.org/x/sys/unix"
9 | )
10 |
11 | // IsTerminal returns true if the given file descriptor is a terminal.
12 | func IsTerminal() bool {
13 | _, err := unix.IoctlGetTermios(int(os.Stdout.Fd()), unix.TCGETA)
14 | return err == nil
15 | }
16 |
--------------------------------------------------------------------------------
/vendor/github.com/Sirupsen/logrus/terminal_windows.go:
--------------------------------------------------------------------------------
1 | // Based on ssh/terminal:
2 | // Copyright 2011 The Go Authors. All rights reserved.
3 | // Use of this source code is governed by a BSD-style
4 | // license that can be found in the LICENSE file.
5 |
6 | // +build windows,!appengine
7 |
8 | package logrus
9 |
10 | import (
11 | "syscall"
12 | "unsafe"
13 | )
14 |
15 | var kernel32 = syscall.NewLazyDLL("kernel32.dll")
16 |
17 | var (
18 | procGetConsoleMode = kernel32.NewProc("GetConsoleMode")
19 | )
20 |
21 | // IsTerminal returns true if stderr's file descriptor is a terminal.
22 | func IsTerminal() bool {
23 | fd := syscall.Stderr
24 | var st uint32
25 | r, _, e := syscall.Syscall(procGetConsoleMode.Addr(), 2, uintptr(fd), uintptr(unsafe.Pointer(&st)), 0)
26 | return r != 0 && e == 0
27 | }
28 |
--------------------------------------------------------------------------------
/vendor/github.com/StackExchange/wmi/LICENSE:
--------------------------------------------------------------------------------
1 | The MIT License (MIT)
2 |
3 | Copyright (c) 2013 Stack Exchange
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy of
6 | this software and associated documentation files (the "Software"), to deal in
7 | the Software without restriction, including without limitation the rights to
8 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
9 | the Software, and to permit persons to whom the Software is furnished to do so,
10 | subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
17 | FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
18 | COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
19 | IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
20 | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
21 |
--------------------------------------------------------------------------------
/vendor/github.com/StackExchange/wmi/README.md:
--------------------------------------------------------------------------------
1 | wmi
2 | ===
3 |
4 | Package wmi provides a WQL interface for WMI on Windows.
5 |
--------------------------------------------------------------------------------
/vendor/github.com/alecthomas/template/README.md:
--------------------------------------------------------------------------------
1 | # Go's `text/template` package with newline elision
2 |
3 | This is a fork of Go 1.4's [text/template](http://golang.org/pkg/text/template/) package with one addition: a backslash immediately after a closing delimiter will delete all subsequent newlines until a non-newline.
4 |
5 | eg.
6 |
7 | ```
8 | {{if true}}\
9 | hello
10 | {{end}}\
11 | ```
12 |
13 | Will result in:
14 |
15 | ```
16 | hello\n
17 | ```
18 |
19 | Rather than:
20 |
21 | ```
22 | \n
23 | hello\n
24 | \n
25 | ```
26 |
--------------------------------------------------------------------------------
/vendor/github.com/alecthomas/units/COPYING:
--------------------------------------------------------------------------------
1 | Copyright (C) 2014 Alec Thomas
2 |
3 | Permission is hereby granted, free of charge, to any person obtaining a copy of
4 | this software and associated documentation files (the "Software"), to deal in
5 | the Software without restriction, including without limitation the rights to
6 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
7 | of the Software, and to permit persons to whom the Software is furnished to do
8 | so, subject to the following conditions:
9 |
10 | The above copyright notice and this permission notice shall be included in all
11 | copies or substantial portions of the Software.
12 |
13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
19 | SOFTWARE.
20 |
--------------------------------------------------------------------------------
/vendor/github.com/alecthomas/units/README.md:
--------------------------------------------------------------------------------
1 | # Units - Helpful unit multipliers and functions for Go
2 |
3 | The goal of this package is to have functionality similar to the [time](http://golang.org/pkg/time/) package.
4 |
5 | It allows for code like this:
6 |
7 | ```go
8 | n, err := ParseBase2Bytes("1KB")
9 | // n == 1024
10 | n = units.Mebibyte * 512
11 | ```
12 |
--------------------------------------------------------------------------------
/vendor/github.com/alecthomas/units/doc.go:
--------------------------------------------------------------------------------
1 | // Package units provides helpful unit multipliers and functions for Go.
2 | //
3 | // The goal of this package is to have functionality similar to the time [1] package.
4 | //
5 | //
6 | // [1] http://golang.org/pkg/time/
7 | //
8 | // It allows for code like this:
9 | //
10 | // n, err := ParseBase2Bytes("1KB")
11 | // // n == 1024
12 | // n = units.Mebibyte * 512
13 | package units
14 |
--------------------------------------------------------------------------------
/vendor/github.com/alecthomas/units/si.go:
--------------------------------------------------------------------------------
1 | package units
2 |
3 | // SI units.
4 | type SI int64
5 |
6 | // SI unit multiples.
7 | const (
8 | Kilo SI = 1000
9 | Mega = Kilo * 1000
10 | Giga = Mega * 1000
11 | Tera = Giga * 1000
12 | Peta = Tera * 1000
13 | Exa = Peta * 1000
14 | )
15 |
16 | func MakeUnitMap(suffix, shortSuffix string, scale int64) map[string]float64 {
17 | return map[string]float64{
18 | shortSuffix: 1,
19 | "K" + suffix: float64(scale),
20 | "M" + suffix: float64(scale * scale),
21 | "G" + suffix: float64(scale * scale * scale),
22 | "T" + suffix: float64(scale * scale * scale * scale),
23 | "P" + suffix: float64(scale * scale * scale * scale * scale),
24 | "E" + suffix: float64(scale * scale * scale * scale * scale * scale),
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/vendor/github.com/cloudfoundry-incubator/candiedyaml/.gitignore:
--------------------------------------------------------------------------------
1 | *.coverprofile
2 |
--------------------------------------------------------------------------------
/vendor/github.com/cloudfoundry-incubator/candiedyaml/.travis.yml:
--------------------------------------------------------------------------------
1 | language: go
2 |
3 | go:
4 | - 1.4.1
5 |
6 | install:
7 | - go get -t -v ./...
8 | - go install github.com/onsi/ginkgo/ginkgo
9 |
10 | script:
11 | - export PATH=$HOME/gopath/bin:$PATH
12 | - ginkgo -r -failOnPending -randomizeAllSpecs -race
13 |
--------------------------------------------------------------------------------
/vendor/github.com/cloudfoundry-incubator/candiedyaml/libyaml-LICENSE:
--------------------------------------------------------------------------------
1 | Copyright (c) 2006 Kirill Simonov
2 |
3 | Permission is hereby granted, free of charge, to any person obtaining a copy of
4 | this software and associated documentation files (the "Software"), to deal in
5 | the Software without restriction, including without limitation the rights to
6 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
7 | of the Software, and to permit persons to whom the Software is furnished to do
8 | so, subject to the following conditions:
9 |
10 | The above copyright notice and this permission notice shall be included in all
11 | copies or substantial portions of the Software.
12 |
13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
19 | SOFTWARE.
20 |
--------------------------------------------------------------------------------
/vendor/github.com/cloudfoundry-incubator/candiedyaml/yaml_definesh.go:
--------------------------------------------------------------------------------
1 | /*
2 | Licensed under the Apache License, Version 2.0 (the "License");
3 | you may not use this file except in compliance with the License.
4 | You may obtain a copy of the License at
5 |
6 | http://www.apache.org/licenses/LICENSE-2.0
7 |
8 | Unless required by applicable law or agreed to in writing, software
9 | distributed under the License is distributed on an "AS IS" BASIS,
10 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11 | See the License for the specific language governing permissions and
12 | limitations under the License.
13 | */
14 |
15 | package candiedyaml
16 |
17 | const (
18 | yaml_VERSION_MAJOR = 0
19 | yaml_VERSION_MINOR = 1
20 | yaml_VERSION_PATCH = 6
21 | yaml_VERSION_STRING = "0.1.6"
22 | )
23 |
--------------------------------------------------------------------------------
/vendor/github.com/docker/docker/NOTICE:
--------------------------------------------------------------------------------
1 | Docker
2 | Copyright 2012-2016 Docker, Inc.
3 |
4 | This product includes software developed at Docker, Inc. (https://www.docker.com).
5 |
6 | This product contains software (https://github.com/kr/pty) developed
7 | by Keith Rarick, licensed under the MIT License.
8 |
9 | The following is courtesy of our legal counsel:
10 |
11 |
12 | Use and transfer of Docker may be subject to certain restrictions by the
13 | United States and other governments.
14 | It is your responsibility to ensure that your use and/or transfer does not
15 | violate applicable laws.
16 |
17 | For more information, please see https://www.bis.doc.gov
18 |
19 | See also https://www.apache.org/dev/crypto.html and/or seek legal counsel.
20 |
--------------------------------------------------------------------------------
/vendor/github.com/docker/docker/opts/hosts_unix.go:
--------------------------------------------------------------------------------
1 | // +build !windows
2 |
3 | package opts
4 |
5 | import "fmt"
6 |
7 | // DefaultHost constant defines the default host string used by docker on other hosts than Windows
8 | var DefaultHost = fmt.Sprintf("unix://%s", DefaultUnixSocket)
9 |
--------------------------------------------------------------------------------
/vendor/github.com/docker/docker/opts/hosts_windows.go:
--------------------------------------------------------------------------------
1 | // +build windows
2 |
3 | package opts
4 |
5 | // DefaultHost constant defines the default host string used by docker on Windows
6 | var DefaultHost = "npipe://" + DefaultNamedPipe
7 |
--------------------------------------------------------------------------------
/vendor/github.com/docker/docker/opts/ip.go:
--------------------------------------------------------------------------------
1 | package opts
2 |
3 | import (
4 | "fmt"
5 | "net"
6 | )
7 |
8 | // IPOpt holds an IP. It is used to store values from CLI flags.
9 | type IPOpt struct {
10 | *net.IP
11 | }
12 |
13 | // NewIPOpt creates a new IPOpt from a reference net.IP and a
14 | // string representation of an IP. If the string is not a valid
15 | // IP it will fallback to the specified reference.
16 | func NewIPOpt(ref *net.IP, defaultVal string) *IPOpt {
17 | o := &IPOpt{
18 | IP: ref,
19 | }
20 | o.Set(defaultVal)
21 | return o
22 | }
23 |
24 | // Set sets an IPv4 or IPv6 address from a given string. If the given
25 | // string is not parseable as an IP address it returns an error.
26 | func (o *IPOpt) Set(val string) error {
27 | ip := net.ParseIP(val)
28 | if ip == nil {
29 | return fmt.Errorf("%s is not an ip address", val)
30 | }
31 | *o.IP = ip
32 | return nil
33 | }
34 |
35 | // String returns the IP address stored in the IPOpt. If stored IP is a
36 | // nil pointer, it returns an empty string.
37 | func (o *IPOpt) String() string {
38 | if *o.IP == nil {
39 | return ""
40 | }
41 | return o.IP.String()
42 | }
43 |
44 | // Type returns the type of the option
45 | func (o *IPOpt) Type() string {
46 | return "ip"
47 | }
48 |
--------------------------------------------------------------------------------
/vendor/github.com/docker/docker/opts/opts_unix.go:
--------------------------------------------------------------------------------
1 | // +build !windows
2 |
3 | package opts
4 |
5 | // DefaultHTTPHost Default HTTP Host used if only port is provided to -H flag e.g. docker daemon -H tcp://:8080
6 | const DefaultHTTPHost = "localhost"
7 |
--------------------------------------------------------------------------------
/vendor/github.com/docker/docker/pkg/archive/README.md:
--------------------------------------------------------------------------------
1 | This code provides helper functions for dealing with archive files.
2 |
--------------------------------------------------------------------------------
/vendor/github.com/docker/docker/pkg/archive/archive_other.go:
--------------------------------------------------------------------------------
1 | // +build !linux
2 |
3 | package archive
4 |
5 | func getWhiteoutConverter(format WhiteoutFormat) tarWhiteoutConverter {
6 | return nil
7 | }
8 |
--------------------------------------------------------------------------------
/vendor/github.com/docker/docker/pkg/archive/changes_unix.go:
--------------------------------------------------------------------------------
1 | // +build !windows
2 |
3 | package archive
4 |
5 | import (
6 | "os"
7 | "syscall"
8 |
9 | "github.com/docker/docker/pkg/system"
10 | )
11 |
12 | func statDifferent(oldStat *system.StatT, newStat *system.StatT) bool {
13 | // Don't look at size for dirs, its not a good measure of change
14 | if oldStat.Mode() != newStat.Mode() ||
15 | oldStat.UID() != newStat.UID() ||
16 | oldStat.GID() != newStat.GID() ||
17 | oldStat.Rdev() != newStat.Rdev() ||
18 | // Don't look at size for dirs, its not a good measure of change
19 | (oldStat.Mode()&syscall.S_IFDIR != syscall.S_IFDIR &&
20 | (!sameFsTimeSpec(oldStat.Mtim(), newStat.Mtim()) || (oldStat.Size() != newStat.Size()))) {
21 | return true
22 | }
23 | return false
24 | }
25 |
26 | func (info *FileInfo) isDir() bool {
27 | return info.parent == nil || info.stat.Mode()&syscall.S_IFDIR != 0
28 | }
29 |
30 | func getIno(fi os.FileInfo) uint64 {
31 | return uint64(fi.Sys().(*syscall.Stat_t).Ino)
32 | }
33 |
34 | func hasHardlinks(fi os.FileInfo) bool {
35 | return fi.Sys().(*syscall.Stat_t).Nlink > 1
36 | }
37 |
--------------------------------------------------------------------------------
/vendor/github.com/docker/docker/pkg/archive/changes_windows.go:
--------------------------------------------------------------------------------
1 | package archive
2 |
3 | import (
4 | "os"
5 |
6 | "github.com/docker/docker/pkg/system"
7 | )
8 |
9 | func statDifferent(oldStat *system.StatT, newStat *system.StatT) bool {
10 |
11 | // Don't look at size for dirs, its not a good measure of change
12 | if oldStat.ModTime() != newStat.ModTime() ||
13 | oldStat.Mode() != newStat.Mode() ||
14 | oldStat.Size() != newStat.Size() && !oldStat.IsDir() {
15 | return true
16 | }
17 | return false
18 | }
19 |
20 | func (info *FileInfo) isDir() bool {
21 | return info.parent == nil || info.stat.IsDir()
22 | }
23 |
24 | func getIno(fi os.FileInfo) (inode uint64) {
25 | return
26 | }
27 |
28 | func hasHardlinks(fi os.FileInfo) bool {
29 | return false
30 | }
31 |
--------------------------------------------------------------------------------
/vendor/github.com/docker/docker/pkg/archive/copy_unix.go:
--------------------------------------------------------------------------------
1 | // +build !windows
2 |
3 | package archive
4 |
5 | import (
6 | "path/filepath"
7 | )
8 |
9 | func normalizePath(path string) string {
10 | return filepath.ToSlash(path)
11 | }
12 |
--------------------------------------------------------------------------------
/vendor/github.com/docker/docker/pkg/archive/copy_windows.go:
--------------------------------------------------------------------------------
1 | package archive
2 |
3 | import (
4 | "path/filepath"
5 | )
6 |
7 | func normalizePath(path string) string {
8 | return filepath.FromSlash(path)
9 | }
10 |
--------------------------------------------------------------------------------
/vendor/github.com/docker/docker/pkg/archive/time_linux.go:
--------------------------------------------------------------------------------
1 | package archive
2 |
3 | import (
4 | "syscall"
5 | "time"
6 | )
7 |
8 | func timeToTimespec(time time.Time) (ts syscall.Timespec) {
9 | if time.IsZero() {
10 | // Return UTIME_OMIT special value
11 | ts.Sec = 0
12 | ts.Nsec = ((1 << 30) - 2)
13 | return
14 | }
15 | return syscall.NsecToTimespec(time.UnixNano())
16 | }
17 |
--------------------------------------------------------------------------------
/vendor/github.com/docker/docker/pkg/archive/time_unsupported.go:
--------------------------------------------------------------------------------
1 | // +build !linux
2 |
3 | package archive
4 |
5 | import (
6 | "syscall"
7 | "time"
8 | )
9 |
10 | func timeToTimespec(time time.Time) (ts syscall.Timespec) {
11 | nsec := int64(0)
12 | if !time.IsZero() {
13 | nsec = time.UnixNano()
14 | }
15 | return syscall.NsecToTimespec(nsec)
16 | }
17 |
--------------------------------------------------------------------------------
/vendor/github.com/docker/docker/pkg/archive/whiteouts.go:
--------------------------------------------------------------------------------
1 | package archive
2 |
3 | // Whiteouts are files with a special meaning for the layered filesystem.
4 | // Docker uses AUFS whiteout files inside exported archives. In other
5 | // filesystems these files are generated/handled on tar creation/extraction.
6 |
7 | // WhiteoutPrefix prefix means file is a whiteout. If this is followed by a
8 | // filename this means that file has been removed from the base layer.
9 | const WhiteoutPrefix = ".wh."
10 |
11 | // WhiteoutMetaPrefix prefix means whiteout has a special meaning and is not
12 | // for removing an actual file. Normally these files are excluded from exported
13 | // archives.
14 | const WhiteoutMetaPrefix = WhiteoutPrefix + WhiteoutPrefix
15 |
16 | // WhiteoutLinkDir is a directory AUFS uses for storing hardlink links to other
17 | // layers. Normally these should not go into exported archives and all changed
18 | // hardlinks should be copied to the top layer.
19 | const WhiteoutLinkDir = WhiteoutMetaPrefix + "plnk"
20 |
21 | // WhiteoutOpaqueDir file means directory has been made opaque - meaning
22 | // readdir calls to this directory do not follow to lower layers.
23 | const WhiteoutOpaqueDir = WhiteoutMetaPrefix + ".opq"
24 |
--------------------------------------------------------------------------------
/vendor/github.com/docker/docker/pkg/fileutils/fileutils_darwin.go:
--------------------------------------------------------------------------------
1 | package fileutils
2 |
3 | import (
4 | "os"
5 | "os/exec"
6 | "strconv"
7 | "strings"
8 | )
9 |
10 | // GetTotalUsedFds returns the number of used File Descriptors by
11 | // executing `lsof -p PID`
12 | func GetTotalUsedFds() int {
13 | pid := os.Getpid()
14 |
15 | cmd := exec.Command("lsof", "-p", strconv.Itoa(pid))
16 |
17 | output, err := cmd.CombinedOutput()
18 | if err != nil {
19 | return -1
20 | }
21 |
22 | outputStr := strings.TrimSpace(string(output))
23 |
24 | fds := strings.Split(outputStr, "\n")
25 |
26 | return len(fds) - 1
27 | }
28 |
--------------------------------------------------------------------------------
/vendor/github.com/docker/docker/pkg/fileutils/fileutils_solaris.go:
--------------------------------------------------------------------------------
1 | package fileutils
2 |
3 | // GetTotalUsedFds Returns the number of used File Descriptors.
4 | // On Solaris these limits are per process and not systemwide
5 | func GetTotalUsedFds() int {
6 | return -1
7 | }
8 |
--------------------------------------------------------------------------------
/vendor/github.com/docker/docker/pkg/fileutils/fileutils_unix.go:
--------------------------------------------------------------------------------
1 | // +build linux freebsd
2 |
3 | package fileutils
4 |
5 | import (
6 | "fmt"
7 | "io/ioutil"
8 | "os"
9 |
10 | "github.com/Sirupsen/logrus"
11 | )
12 |
13 | // GetTotalUsedFds Returns the number of used File Descriptors by
14 | // reading it via /proc filesystem.
15 | func GetTotalUsedFds() int {
16 | if fds, err := ioutil.ReadDir(fmt.Sprintf("/proc/%d/fd", os.Getpid())); err != nil {
17 | logrus.Errorf("Error opening /proc/%d/fd: %s", os.Getpid(), err)
18 | } else {
19 | return len(fds)
20 | }
21 | return -1
22 | }
23 |
--------------------------------------------------------------------------------
/vendor/github.com/docker/docker/pkg/fileutils/fileutils_windows.go:
--------------------------------------------------------------------------------
1 | package fileutils
2 |
3 | // GetTotalUsedFds Returns the number of used File Descriptors. Not supported
4 | // on Windows.
5 | func GetTotalUsedFds() int {
6 | return -1
7 | }
8 |
--------------------------------------------------------------------------------
/vendor/github.com/docker/docker/pkg/homedir/homedir.go:
--------------------------------------------------------------------------------
1 | package homedir
2 |
3 | import (
4 | "os"
5 | "runtime"
6 |
7 | "github.com/opencontainers/runc/libcontainer/user"
8 | )
9 |
10 | // Key returns the env var name for the user's home dir based on
11 | // the platform being run on
12 | func Key() string {
13 | if runtime.GOOS == "windows" {
14 | return "USERPROFILE"
15 | }
16 | return "HOME"
17 | }
18 |
19 | // Get returns the home directory of the current user with the help of
20 | // environment variables depending on the target operating system.
21 | // Returned path should be used with "path/filepath" to form new paths.
22 | func Get() string {
23 | home := os.Getenv(Key())
24 | if home == "" && runtime.GOOS != "windows" {
25 | if u, err := user.CurrentUser(); err == nil {
26 | return u.Home
27 | }
28 | }
29 | return home
30 | }
31 |
32 | // GetShortcutString returns the string that is shortcut to user's home directory
33 | // in the native shell of the platform running on.
34 | func GetShortcutString() string {
35 | if runtime.GOOS == "windows" {
36 | return "%USERPROFILE%" // be careful while using in format functions
37 | }
38 | return "~"
39 | }
40 |
--------------------------------------------------------------------------------
/vendor/github.com/docker/docker/pkg/idtools/idtools_windows.go:
--------------------------------------------------------------------------------
1 | // +build windows
2 |
3 | package idtools
4 |
5 | import (
6 | "os"
7 |
8 | "github.com/docker/docker/pkg/system"
9 | )
10 |
11 | // Platforms such as Windows do not support the UID/GID concept. So make this
12 | // just a wrapper around system.MkdirAll.
13 | func mkdirAs(path string, mode os.FileMode, ownerUID, ownerGID int, mkAll, chownExisting bool) error {
14 | if err := system.MkdirAll(path, mode); err != nil && !os.IsExist(err) {
15 | return err
16 | }
17 | return nil
18 | }
19 |
20 | // CanAccess takes a valid (existing) directory and a uid, gid pair and determines
21 | // if that uid, gid pair has access (execute bit) to the directory
22 | // Windows does not require/support this function, so always return true
23 | func CanAccess(path string, uid, gid int) bool {
24 | return true
25 | }
26 |
--------------------------------------------------------------------------------
/vendor/github.com/docker/docker/pkg/idtools/usergroupadd_unsupported.go:
--------------------------------------------------------------------------------
1 | // +build !linux
2 |
3 | package idtools
4 |
5 | import "fmt"
6 |
7 | // AddNamespaceRangesUser takes a name and finds an unused uid, gid pair
8 | // and calls the appropriate helper function to add the group and then
9 | // the user to the group in /etc/group and /etc/passwd respectively.
10 | func AddNamespaceRangesUser(name string) (int, int, error) {
11 | return -1, -1, fmt.Errorf("No support for adding users or groups on this OS")
12 | }
13 |
--------------------------------------------------------------------------------
/vendor/github.com/docker/docker/pkg/ioutils/buffer.go:
--------------------------------------------------------------------------------
1 | package ioutils
2 |
3 | import (
4 | "errors"
5 | "io"
6 | )
7 |
8 | var errBufferFull = errors.New("buffer is full")
9 |
10 | type fixedBuffer struct {
11 | buf []byte
12 | pos int
13 | lastRead int
14 | }
15 |
16 | func (b *fixedBuffer) Write(p []byte) (int, error) {
17 | n := copy(b.buf[b.pos:cap(b.buf)], p)
18 | b.pos += n
19 |
20 | if n < len(p) {
21 | if b.pos == cap(b.buf) {
22 | return n, errBufferFull
23 | }
24 | return n, io.ErrShortWrite
25 | }
26 | return n, nil
27 | }
28 |
29 | func (b *fixedBuffer) Read(p []byte) (int, error) {
30 | n := copy(p, b.buf[b.lastRead:b.pos])
31 | b.lastRead += n
32 | return n, nil
33 | }
34 |
35 | func (b *fixedBuffer) Len() int {
36 | return b.pos - b.lastRead
37 | }
38 |
39 | func (b *fixedBuffer) Cap() int {
40 | return cap(b.buf)
41 | }
42 |
43 | func (b *fixedBuffer) Reset() {
44 | b.pos = 0
45 | b.lastRead = 0
46 | b.buf = b.buf[:0]
47 | }
48 |
49 | func (b *fixedBuffer) String() string {
50 | return string(b.buf[b.lastRead:b.pos])
51 | }
52 |
--------------------------------------------------------------------------------
/vendor/github.com/docker/docker/pkg/ioutils/fmt.go:
--------------------------------------------------------------------------------
1 | package ioutils
2 |
3 | import (
4 | "fmt"
5 | "io"
6 | )
7 |
8 | // FprintfIfNotEmpty prints the string value if it's not empty
9 | func FprintfIfNotEmpty(w io.Writer, format, value string) (int, error) {
10 | if value != "" {
11 | return fmt.Fprintf(w, format, value)
12 | }
13 | return 0, nil
14 | }
15 |
16 | // FprintfIfTrue prints the boolean value if it's true
17 | func FprintfIfTrue(w io.Writer, format string, ok bool) (int, error) {
18 | if ok {
19 | return fmt.Fprintf(w, format, ok)
20 | }
21 | return 0, nil
22 | }
23 |
--------------------------------------------------------------------------------
/vendor/github.com/docker/docker/pkg/ioutils/temp_unix.go:
--------------------------------------------------------------------------------
1 | // +build !windows
2 |
3 | package ioutils
4 |
5 | import "io/ioutil"
6 |
7 | // TempDir on Unix systems is equivalent to ioutil.TempDir.
8 | func TempDir(dir, prefix string) (string, error) {
9 | return ioutil.TempDir(dir, prefix)
10 | }
11 |
--------------------------------------------------------------------------------
/vendor/github.com/docker/docker/pkg/ioutils/temp_windows.go:
--------------------------------------------------------------------------------
1 | // +build windows
2 |
3 | package ioutils
4 |
5 | import (
6 | "io/ioutil"
7 |
8 | "github.com/docker/docker/pkg/longpath"
9 | )
10 |
11 | // TempDir is the equivalent of ioutil.TempDir, except that the result is in Windows longpath format.
12 | func TempDir(dir, prefix string) (string, error) {
13 | tempDir, err := ioutil.TempDir(dir, prefix)
14 | if err != nil {
15 | return "", err
16 | }
17 | return longpath.AddPrefix(tempDir), nil
18 | }
19 |
--------------------------------------------------------------------------------
/vendor/github.com/docker/docker/pkg/longpath/longpath.go:
--------------------------------------------------------------------------------
1 | // longpath introduces some constants and helper functions for handling long paths
2 | // in Windows, which are expected to be prepended with `\\?\` and followed by either
3 | // a drive letter, a UNC server\share, or a volume identifier.
4 |
5 | package longpath
6 |
7 | import (
8 | "strings"
9 | )
10 |
11 | // Prefix is the longpath prefix for Windows file paths.
12 | const Prefix = `\\?\`
13 |
14 | // AddPrefix will add the Windows long path prefix to the path provided if
15 | // it does not already have it.
16 | func AddPrefix(path string) string {
17 | if !strings.HasPrefix(path, Prefix) {
18 | if strings.HasPrefix(path, `\\`) {
19 | // This is a UNC path, so we need to add 'UNC' to the path as well.
20 | path = Prefix + `UNC` + path[1:]
21 | } else {
22 | path = Prefix + path
23 | }
24 | }
25 | return path
26 | }
27 |
--------------------------------------------------------------------------------
/vendor/github.com/docker/docker/pkg/promise/promise.go:
--------------------------------------------------------------------------------
1 | package promise
2 |
3 | // Go is a basic promise implementation: it wraps calls a function in a goroutine,
4 | // and returns a channel which will later return the function's return value.
5 | func Go(f func() error) chan error {
6 | ch := make(chan error, 1)
7 | go func() {
8 | ch <- f()
9 | }()
10 | return ch
11 | }
12 |
--------------------------------------------------------------------------------
/vendor/github.com/docker/docker/pkg/system/chtimes_unix.go:
--------------------------------------------------------------------------------
1 | // +build !windows
2 |
3 | package system
4 |
5 | import (
6 | "time"
7 | )
8 |
9 | //setCTime will set the create time on a file. On Unix, the create
10 | //time is updated as a side effect of setting the modified time, so
11 | //no action is required.
12 | func setCTime(path string, ctime time.Time) error {
13 | return nil
14 | }
15 |
--------------------------------------------------------------------------------
/vendor/github.com/docker/docker/pkg/system/chtimes_windows.go:
--------------------------------------------------------------------------------
1 | // +build windows
2 |
3 | package system
4 |
5 | import (
6 | "syscall"
7 | "time"
8 | )
9 |
10 | //setCTime will set the create time on a file. On Windows, this requires
11 | //calling SetFileTime and explicitly including the create time.
12 | func setCTime(path string, ctime time.Time) error {
13 | ctimespec := syscall.NsecToTimespec(ctime.UnixNano())
14 | pathp, e := syscall.UTF16PtrFromString(path)
15 | if e != nil {
16 | return e
17 | }
18 | h, e := syscall.CreateFile(pathp,
19 | syscall.FILE_WRITE_ATTRIBUTES, syscall.FILE_SHARE_WRITE, nil,
20 | syscall.OPEN_EXISTING, syscall.FILE_FLAG_BACKUP_SEMANTICS, 0)
21 | if e != nil {
22 | return e
23 | }
24 | defer syscall.Close(h)
25 | c := syscall.NsecToFiletime(syscall.TimespecToNsec(ctimespec))
26 | return syscall.SetFileTime(h, &c, nil, nil)
27 | }
28 |
--------------------------------------------------------------------------------
/vendor/github.com/docker/docker/pkg/system/errors.go:
--------------------------------------------------------------------------------
1 | package system
2 |
3 | import (
4 | "errors"
5 | )
6 |
7 | var (
8 | // ErrNotSupportedPlatform means the platform is not supported.
9 | ErrNotSupportedPlatform = errors.New("platform and architecture is not supported")
10 | )
11 |
--------------------------------------------------------------------------------
/vendor/github.com/docker/docker/pkg/system/filesys.go:
--------------------------------------------------------------------------------
1 | // +build !windows
2 |
3 | package system
4 |
5 | import (
6 | "os"
7 | "path/filepath"
8 | )
9 |
10 | // MkdirAll creates a directory named path along with any necessary parents,
11 | // with permission specified by attribute perm for all dir created.
12 | func MkdirAll(path string, perm os.FileMode) error {
13 | return os.MkdirAll(path, perm)
14 | }
15 |
16 | // IsAbs is a platform-specific wrapper for filepath.IsAbs.
17 | func IsAbs(path string) bool {
18 | return filepath.IsAbs(path)
19 | }
20 |
--------------------------------------------------------------------------------
/vendor/github.com/docker/docker/pkg/system/lstat.go:
--------------------------------------------------------------------------------
1 | // +build !windows
2 |
3 | package system
4 |
5 | import (
6 | "syscall"
7 | )
8 |
9 | // Lstat takes a path to a file and returns
10 | // a system.StatT type pertaining to that file.
11 | //
12 | // Throws an error if the file does not exist
13 | func Lstat(path string) (*StatT, error) {
14 | s := &syscall.Stat_t{}
15 | if err := syscall.Lstat(path, s); err != nil {
16 | return nil, err
17 | }
18 | return fromStatT(s)
19 | }
20 |
--------------------------------------------------------------------------------
/vendor/github.com/docker/docker/pkg/system/lstat_windows.go:
--------------------------------------------------------------------------------
1 | // +build windows
2 |
3 | package system
4 |
5 | import (
6 | "os"
7 | )
8 |
9 | // Lstat calls os.Lstat to get a fileinfo interface back.
10 | // This is then copied into our own locally defined structure.
11 | // Note the Linux version uses fromStatT to do the copy back,
12 | // but that not strictly necessary when already in an OS specific module.
13 | func Lstat(path string) (*StatT, error) {
14 | fi, err := os.Lstat(path)
15 | if err != nil {
16 | return nil, err
17 | }
18 |
19 | return &StatT{
20 | name: fi.Name(),
21 | size: fi.Size(),
22 | mode: fi.Mode(),
23 | modTime: fi.ModTime(),
24 | isDir: fi.IsDir()}, nil
25 | }
26 |
--------------------------------------------------------------------------------
/vendor/github.com/docker/docker/pkg/system/meminfo.go:
--------------------------------------------------------------------------------
1 | package system
2 |
3 | // MemInfo contains memory statistics of the host system.
4 | type MemInfo struct {
5 | // Total usable RAM (i.e. physical RAM minus a few reserved bits and the
6 | // kernel binary code).
7 | MemTotal int64
8 |
9 | // Amount of free memory.
10 | MemFree int64
11 |
12 | // Total amount of swap space available.
13 | SwapTotal int64
14 |
15 | // Amount of swap space that is currently unused.
16 | SwapFree int64
17 | }
18 |
--------------------------------------------------------------------------------
/vendor/github.com/docker/docker/pkg/system/meminfo_unsupported.go:
--------------------------------------------------------------------------------
1 | // +build !linux,!windows,!solaris
2 |
3 | package system
4 |
5 | // ReadMemInfo is not supported on platforms other than linux and windows.
6 | func ReadMemInfo() (*MemInfo, error) {
7 | return nil, ErrNotSupportedPlatform
8 | }
9 |
--------------------------------------------------------------------------------
/vendor/github.com/docker/docker/pkg/system/mknod.go:
--------------------------------------------------------------------------------
1 | // +build !windows
2 |
3 | package system
4 |
5 | import (
6 | "syscall"
7 | )
8 |
9 | // Mknod creates a filesystem node (file, device special file or named pipe) named path
10 | // with attributes specified by mode and dev.
11 | func Mknod(path string, mode uint32, dev int) error {
12 | return syscall.Mknod(path, mode, dev)
13 | }
14 |
15 | // Mkdev is used to build the value of linux devices (in /dev/) which specifies major
16 | // and minor number of the newly created device special file.
17 | // Linux device nodes are a bit weird due to backwards compat with 16 bit device nodes.
18 | // They are, from low to high: the lower 8 bits of the minor, then 12 bits of the major,
19 | // then the top 12 bits of the minor.
20 | func Mkdev(major int64, minor int64) uint32 {
21 | return uint32(((minor & 0xfff00) << 12) | ((major & 0xfff) << 8) | (minor & 0xff))
22 | }
23 |
--------------------------------------------------------------------------------
/vendor/github.com/docker/docker/pkg/system/mknod_windows.go:
--------------------------------------------------------------------------------
1 | // +build windows
2 |
3 | package system
4 |
5 | // Mknod is not implemented on Windows.
6 | func Mknod(path string, mode uint32, dev int) error {
7 | return ErrNotSupportedPlatform
8 | }
9 |
10 | // Mkdev is not implemented on Windows.
11 | func Mkdev(major int64, minor int64) uint32 {
12 | panic("Mkdev not implemented on Windows.")
13 | }
14 |
--------------------------------------------------------------------------------
/vendor/github.com/docker/docker/pkg/system/path_unix.go:
--------------------------------------------------------------------------------
1 | // +build !windows
2 |
3 | package system
4 |
5 | // DefaultPathEnv is unix style list of directories to search for
6 | // executables. Each directory is separated from the next by a colon
7 | // ':' character .
8 | const DefaultPathEnv = "/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
9 |
10 | // CheckSystemDriveAndRemoveDriveLetter verifies that a path, if it includes a drive letter,
11 | // is the system drive. This is a no-op on Linux.
12 | func CheckSystemDriveAndRemoveDriveLetter(path string) (string, error) {
13 | return path, nil
14 | }
15 |
--------------------------------------------------------------------------------
/vendor/github.com/docker/docker/pkg/system/stat.go:
--------------------------------------------------------------------------------
1 | // +build !windows
2 |
3 | package system
4 |
5 | import (
6 | "syscall"
7 | )
8 |
9 | // StatT type contains status of a file. It contains metadata
10 | // like permission, owner, group, size, etc about a file.
11 | type StatT struct {
12 | mode uint32
13 | uid uint32
14 | gid uint32
15 | rdev uint64
16 | size int64
17 | mtim syscall.Timespec
18 | }
19 |
20 | // Mode returns file's permission mode.
21 | func (s StatT) Mode() uint32 {
22 | return s.mode
23 | }
24 |
25 | // UID returns file's user id of owner.
26 | func (s StatT) UID() uint32 {
27 | return s.uid
28 | }
29 |
30 | // GID returns file's group id of owner.
31 | func (s StatT) GID() uint32 {
32 | return s.gid
33 | }
34 |
35 | // Rdev returns file's device ID (if it's special file).
36 | func (s StatT) Rdev() uint64 {
37 | return s.rdev
38 | }
39 |
40 | // Size returns file's size.
41 | func (s StatT) Size() int64 {
42 | return s.size
43 | }
44 |
45 | // Mtim returns file's last modification time.
46 | func (s StatT) Mtim() syscall.Timespec {
47 | return s.mtim
48 | }
49 |
50 | // GetLastModification returns file's last modification time.
51 | func (s StatT) GetLastModification() syscall.Timespec {
52 | return s.Mtim()
53 | }
54 |
--------------------------------------------------------------------------------
/vendor/github.com/docker/docker/pkg/system/stat_darwin.go:
--------------------------------------------------------------------------------
1 | package system
2 |
3 | import (
4 | "syscall"
5 | )
6 |
7 | // fromStatT creates a system.StatT type from a syscall.Stat_t type
8 | func fromStatT(s *syscall.Stat_t) (*StatT, error) {
9 | return &StatT{size: s.Size,
10 | mode: uint32(s.Mode),
11 | uid: s.Uid,
12 | gid: s.Gid,
13 | rdev: uint64(s.Rdev),
14 | mtim: s.Mtimespec}, nil
15 | }
16 |
17 | // FromStatT loads a system.StatT from a syscall.Stat_t.
18 | func FromStatT(s *syscall.Stat_t) (*StatT, error) {
19 | return fromStatT(s)
20 | }
21 |
22 | // Stat takes a path to a file and returns
23 | // a system.StatT type pertaining to that file.
24 | //
25 | // Throws an error if the file does not exist
26 | func Stat(path string) (*StatT, error) {
27 | s := &syscall.Stat_t{}
28 | if err := syscall.Stat(path, s); err != nil {
29 | return nil, err
30 | }
31 | return fromStatT(s)
32 | }
33 |
--------------------------------------------------------------------------------
/vendor/github.com/docker/docker/pkg/system/stat_freebsd.go:
--------------------------------------------------------------------------------
1 | package system
2 |
3 | import (
4 | "syscall"
5 | )
6 |
7 | // fromStatT converts a syscall.Stat_t type to a system.Stat_t type
8 | func fromStatT(s *syscall.Stat_t) (*StatT, error) {
9 | return &StatT{size: s.Size,
10 | mode: uint32(s.Mode),
11 | uid: s.Uid,
12 | gid: s.Gid,
13 | rdev: uint64(s.Rdev),
14 | mtim: s.Mtimespec}, nil
15 | }
16 |
17 | // Stat takes a path to a file and returns
18 | // a system.Stat_t type pertaining to that file.
19 | //
20 | // Throws an error if the file does not exist
21 | func Stat(path string) (*StatT, error) {
22 | s := &syscall.Stat_t{}
23 | if err := syscall.Stat(path, s); err != nil {
24 | return nil, err
25 | }
26 | return fromStatT(s)
27 | }
28 |
--------------------------------------------------------------------------------
/vendor/github.com/docker/docker/pkg/system/stat_linux.go:
--------------------------------------------------------------------------------
1 | package system
2 |
3 | import (
4 | "syscall"
5 | )
6 |
7 | // fromStatT converts a syscall.Stat_t type to a system.Stat_t type
8 | func fromStatT(s *syscall.Stat_t) (*StatT, error) {
9 | return &StatT{size: s.Size,
10 | mode: s.Mode,
11 | uid: s.Uid,
12 | gid: s.Gid,
13 | rdev: s.Rdev,
14 | mtim: s.Mtim}, nil
15 | }
16 |
17 | // FromStatT exists only on linux, and loads a system.StatT from a
18 | // syscal.Stat_t.
19 | func FromStatT(s *syscall.Stat_t) (*StatT, error) {
20 | return fromStatT(s)
21 | }
22 |
23 | // Stat takes a path to a file and returns
24 | // a system.StatT type pertaining to that file.
25 | //
26 | // Throws an error if the file does not exist
27 | func Stat(path string) (*StatT, error) {
28 | s := &syscall.Stat_t{}
29 | if err := syscall.Stat(path, s); err != nil {
30 | return nil, err
31 | }
32 | return fromStatT(s)
33 | }
34 |
--------------------------------------------------------------------------------
/vendor/github.com/docker/docker/pkg/system/stat_openbsd.go:
--------------------------------------------------------------------------------
1 | package system
2 |
3 | import (
4 | "syscall"
5 | )
6 |
7 | // fromStatT creates a system.StatT type from a syscall.Stat_t type
8 | func fromStatT(s *syscall.Stat_t) (*StatT, error) {
9 | return &StatT{size: s.Size,
10 | mode: uint32(s.Mode),
11 | uid: s.Uid,
12 | gid: s.Gid,
13 | rdev: uint64(s.Rdev),
14 | mtim: s.Mtim}, nil
15 | }
16 |
--------------------------------------------------------------------------------
/vendor/github.com/docker/docker/pkg/system/stat_solaris.go:
--------------------------------------------------------------------------------
1 | // +build solaris
2 |
3 | package system
4 |
5 | import (
6 | "syscall"
7 | )
8 |
9 | // fromStatT creates a system.StatT type from a syscall.Stat_t type
10 | func fromStatT(s *syscall.Stat_t) (*StatT, error) {
11 | return &StatT{size: s.Size,
12 | mode: uint32(s.Mode),
13 | uid: s.Uid,
14 | gid: s.Gid,
15 | rdev: uint64(s.Rdev),
16 | mtim: s.Mtim}, nil
17 | }
18 |
19 | // FromStatT loads a system.StatT from a syscal.Stat_t.
20 | func FromStatT(s *syscall.Stat_t) (*StatT, error) {
21 | return fromStatT(s)
22 | }
23 |
24 | // Stat takes a path to a file and returns
25 | // a system.StatT type pertaining to that file.
26 | //
27 | // Throws an error if the file does not exist
28 | func Stat(path string) (*StatT, error) {
29 | s := &syscall.Stat_t{}
30 | if err := syscall.Stat(path, s); err != nil {
31 | return nil, err
32 | }
33 | return fromStatT(s)
34 | }
35 |
--------------------------------------------------------------------------------
/vendor/github.com/docker/docker/pkg/system/stat_unsupported.go:
--------------------------------------------------------------------------------
1 | // +build !linux,!windows,!freebsd,!solaris,!openbsd,!darwin
2 |
3 | package system
4 |
5 | import (
6 | "syscall"
7 | )
8 |
9 | // fromStatT creates a system.StatT type from a syscall.Stat_t type
10 | func fromStatT(s *syscall.Stat_t) (*StatT, error) {
11 | return &StatT{size: s.Size,
12 | mode: uint32(s.Mode),
13 | uid: s.Uid,
14 | gid: s.Gid,
15 | rdev: uint64(s.Rdev),
16 | mtim: s.Mtimespec}, nil
17 | }
18 |
--------------------------------------------------------------------------------
/vendor/github.com/docker/docker/pkg/system/stat_windows.go:
--------------------------------------------------------------------------------
1 | // +build windows
2 |
3 | package system
4 |
5 | import (
6 | "os"
7 | "time"
8 | )
9 |
10 | // StatT type contains status of a file. It contains metadata
11 | // like name, permission, size, etc about a file.
12 | type StatT struct {
13 | name string
14 | size int64
15 | mode os.FileMode
16 | modTime time.Time
17 | isDir bool
18 | }
19 |
20 | // Name returns file's name.
21 | func (s StatT) Name() string {
22 | return s.name
23 | }
24 |
25 | // Size returns file's size.
26 | func (s StatT) Size() int64 {
27 | return s.size
28 | }
29 |
30 | // Mode returns file's permission mode.
31 | func (s StatT) Mode() os.FileMode {
32 | return s.mode
33 | }
34 |
35 | // ModTime returns file's last modification time.
36 | func (s StatT) ModTime() time.Time {
37 | return s.modTime
38 | }
39 |
40 | // IsDir returns whether file is actually a directory.
41 | func (s StatT) IsDir() bool {
42 | return s.isDir
43 | }
44 |
--------------------------------------------------------------------------------
/vendor/github.com/docker/docker/pkg/system/syscall_unix.go:
--------------------------------------------------------------------------------
1 | // +build linux freebsd
2 |
3 | package system
4 |
5 | import "syscall"
6 |
7 | // Unmount is a platform-specific helper function to call
8 | // the unmount syscall.
9 | func Unmount(dest string) error {
10 | return syscall.Unmount(dest, 0)
11 | }
12 |
13 | // CommandLineToArgv should not be used on Unix.
14 | // It simply returns commandLine in the only element in the returned array.
15 | func CommandLineToArgv(commandLine string) ([]string, error) {
16 | return []string{commandLine}, nil
17 | }
18 |
--------------------------------------------------------------------------------
/vendor/github.com/docker/docker/pkg/system/umask.go:
--------------------------------------------------------------------------------
1 | // +build !windows
2 |
3 | package system
4 |
5 | import (
6 | "syscall"
7 | )
8 |
9 | // Umask sets current process's file mode creation mask to newmask
10 | // and returns oldmask.
11 | func Umask(newmask int) (oldmask int, err error) {
12 | return syscall.Umask(newmask), nil
13 | }
14 |
--------------------------------------------------------------------------------
/vendor/github.com/docker/docker/pkg/system/umask_windows.go:
--------------------------------------------------------------------------------
1 | // +build windows
2 |
3 | package system
4 |
5 | // Umask is not supported on the windows platform.
6 | func Umask(newmask int) (oldmask int, err error) {
7 | // should not be called on cli code path
8 | return 0, ErrNotSupportedPlatform
9 | }
10 |
--------------------------------------------------------------------------------
/vendor/github.com/docker/docker/pkg/system/utimes_freebsd.go:
--------------------------------------------------------------------------------
1 | package system
2 |
3 | import (
4 | "syscall"
5 | "unsafe"
6 | )
7 |
8 | // LUtimesNano is used to change access and modification time of the specified path.
9 | // It's used for symbol link file because syscall.UtimesNano doesn't support a NOFOLLOW flag atm.
10 | func LUtimesNano(path string, ts []syscall.Timespec) error {
11 | var _path *byte
12 | _path, err := syscall.BytePtrFromString(path)
13 | if err != nil {
14 | return err
15 | }
16 |
17 | if _, _, err := syscall.Syscall(syscall.SYS_LUTIMES, uintptr(unsafe.Pointer(_path)), uintptr(unsafe.Pointer(&ts[0])), 0); err != 0 && err != syscall.ENOSYS {
18 | return err
19 | }
20 |
21 | return nil
22 | }
23 |
--------------------------------------------------------------------------------
/vendor/github.com/docker/docker/pkg/system/utimes_linux.go:
--------------------------------------------------------------------------------
1 | package system
2 |
3 | import (
4 | "syscall"
5 | "unsafe"
6 | )
7 |
8 | // LUtimesNano is used to change access and modification time of the specified path.
9 | // It's used for symbol link file because syscall.UtimesNano doesn't support a NOFOLLOW flag atm.
10 | func LUtimesNano(path string, ts []syscall.Timespec) error {
11 | // These are not currently available in syscall
12 | atFdCwd := -100
13 | atSymLinkNoFollow := 0x100
14 |
15 | var _path *byte
16 | _path, err := syscall.BytePtrFromString(path)
17 | if err != nil {
18 | return err
19 | }
20 |
21 | if _, _, err := syscall.Syscall6(syscall.SYS_UTIMENSAT, uintptr(atFdCwd), uintptr(unsafe.Pointer(_path)), uintptr(unsafe.Pointer(&ts[0])), uintptr(atSymLinkNoFollow), 0, 0); err != 0 && err != syscall.ENOSYS {
22 | return err
23 | }
24 |
25 | return nil
26 | }
27 |
--------------------------------------------------------------------------------
/vendor/github.com/docker/docker/pkg/system/utimes_unsupported.go:
--------------------------------------------------------------------------------
1 | // +build !linux,!freebsd
2 |
3 | package system
4 |
5 | import "syscall"
6 |
7 | // LUtimesNano is only supported on linux and freebsd.
8 | func LUtimesNano(path string, ts []syscall.Timespec) error {
9 | return ErrNotSupportedPlatform
10 | }
11 |
--------------------------------------------------------------------------------
/vendor/github.com/docker/docker/pkg/system/xattrs_unsupported.go:
--------------------------------------------------------------------------------
1 | // +build !linux
2 |
3 | package system
4 |
5 | // Lgetxattr is not supported on platforms other than linux.
6 | func Lgetxattr(path string, attr string) ([]byte, error) {
7 | return nil, ErrNotSupportedPlatform
8 | }
9 |
10 | // Lsetxattr is not supported on platforms other than linux.
11 | func Lsetxattr(path string, attr string, data []byte, flags int) error {
12 | return ErrNotSupportedPlatform
13 | }
14 |
--------------------------------------------------------------------------------
/vendor/github.com/docker/engine-api/types/swarm/common.go:
--------------------------------------------------------------------------------
1 | package swarm
2 |
3 | import "time"
4 |
5 | // Version represent the internal object version.
6 | type Version struct {
7 | Index uint64 `json:",omitempty"`
8 | }
9 |
10 | // Meta is base object inherited by most of the other once.
11 | type Meta struct {
12 | Version Version `json:",omitempty"`
13 | CreatedAt time.Time `json:",omitempty"`
14 | UpdatedAt time.Time `json:",omitempty"`
15 | }
16 |
17 | // Annotations represents how to describe an object.
18 | type Annotations struct {
19 | Name string `json:",omitempty"`
20 | Labels map[string]string `json:",omitempty"`
21 | }
22 |
--------------------------------------------------------------------------------
/vendor/github.com/docker/engine-api/types/swarm/container.go:
--------------------------------------------------------------------------------
1 | package swarm
2 |
3 | import (
4 | "time"
5 |
6 | "github.com/docker/engine-api/types/mount"
7 | )
8 |
9 | // ContainerSpec represents the spec of a container.
10 | type ContainerSpec struct {
11 | Image string `json:",omitempty"`
12 | Labels map[string]string `json:",omitempty"`
13 | Command []string `json:",omitempty"`
14 | Args []string `json:",omitempty"`
15 | Env []string `json:",omitempty"`
16 | Dir string `json:",omitempty"`
17 | User string `json:",omitempty"`
18 | Groups []string `json:",omitempty"`
19 | TTY bool `json:",omitempty"`
20 | Mounts []mount.Mount `json:",omitempty"`
21 | StopGracePeriod *time.Duration `json:",omitempty"`
22 | }
23 |
--------------------------------------------------------------------------------
/vendor/github.com/docker/go-units/MAINTAINERS:
--------------------------------------------------------------------------------
1 | # go-connections maintainers file
2 | #
3 | # This file describes who runs the docker/go-connections project and how.
4 | # This is a living document - if you see something out of date or missing, speak up!
5 | #
6 | # It is structured to be consumable by both humans and programs.
7 | # To extract its contents programmatically, use any TOML-compliant parser.
8 | #
9 | # This file is compiled into the MAINTAINERS file in docker/opensource.
10 | #
11 | [Org]
12 | [Org."Core maintainers"]
13 | people = [
14 | "calavera",
15 | ]
16 |
17 | [people]
18 |
19 | # A reference list of all people associated with the project.
20 | # All other sections should refer to people by their canonical key
21 | # in the people section.
22 |
23 | # ADD YOURSELF HERE IN ALPHABETICAL ORDER
24 | [people.calavera]
25 | Name = "David Calavera"
26 | Email = "david.calavera@gmail.com"
27 | GitHub = "calavera"
28 |
--------------------------------------------------------------------------------
/vendor/github.com/docker/go-units/README.md:
--------------------------------------------------------------------------------
1 | [](https://godoc.org/github.com/docker/go-units)
2 |
3 | # Introduction
4 |
5 | go-units is a library to transform human friendly measurements into machine friendly values.
6 |
7 | ## Usage
8 |
9 | See the [docs in godoc](https://godoc.org/github.com/docker/go-units) for examples and documentation.
10 |
11 | ## Copyright and license
12 |
13 | Copyright © 2015 Docker, Inc.
14 |
15 | go-units is licensed under the Apache License, Version 2.0.
16 | See [LICENSE](LICENSE) for the full text of the license.
17 |
--------------------------------------------------------------------------------
/vendor/github.com/docker/go-units/circle.yml:
--------------------------------------------------------------------------------
1 | dependencies:
2 | post:
3 | # install golint
4 | - go get github.com/golang/lint/golint
5 |
6 | test:
7 | pre:
8 | # run analysis before tests
9 | - go vet ./...
10 | - test -z "$(golint ./... | tee /dev/stderr)"
11 | - test -z "$(gofmt -s -l . | tee /dev/stderr)"
12 |
--------------------------------------------------------------------------------
/vendor/github.com/docker/go-units/duration.go:
--------------------------------------------------------------------------------
1 | // Package units provides helper function to parse and print size and time units
2 | // in human-readable format.
3 | package units
4 |
5 | import (
6 | "fmt"
7 | "time"
8 | )
9 |
10 | // HumanDuration returns a human-readable approximation of a duration
11 | // (eg. "About a minute", "4 hours ago", etc.).
12 | func HumanDuration(d time.Duration) string {
13 | if seconds := int(d.Seconds()); seconds < 1 {
14 | return "Less than a second"
15 | } else if seconds == 1 {
16 | return "1 second"
17 | } else if seconds < 60 {
18 | return fmt.Sprintf("%d seconds", seconds)
19 | } else if minutes := int(d.Minutes()); minutes == 1 {
20 | return "About a minute"
21 | } else if minutes < 60 {
22 | return fmt.Sprintf("%d minutes", minutes)
23 | } else if hours := int(d.Hours()); hours == 1 {
24 | return "About an hour"
25 | } else if hours < 48 {
26 | return fmt.Sprintf("%d hours", hours)
27 | } else if hours < 24*7*2 {
28 | return fmt.Sprintf("%d days", hours/24)
29 | } else if hours < 24*30*3 {
30 | return fmt.Sprintf("%d weeks", hours/24/7)
31 | } else if hours < 24*365*2 {
32 | return fmt.Sprintf("%d months", hours/24/30)
33 | }
34 | return fmt.Sprintf("%d years", int(d.Hours())/24/365)
35 | }
36 |
--------------------------------------------------------------------------------
/vendor/github.com/foomo/htpasswd/.gitignore:
--------------------------------------------------------------------------------
1 | # Compiled Object files, Static and Dynamic libs (Shared Objects)
2 | *.o
3 | *.a
4 | *.so
5 |
6 | # Folders
7 | _obj
8 | _test
9 |
10 | # Architecture specific extensions/prefixes
11 | *.[568vq]
12 | [568vq].out
13 |
14 | *.cgo1.go
15 | *.cgo2.c
16 | _cgo_defun.c
17 | _cgo_gotypes.go
18 | _cgo_export.*
19 |
20 | _testmain.go
21 |
22 | *.exe
23 | *.test
24 | *.prof
25 |
--------------------------------------------------------------------------------
/vendor/github.com/foomo/htpasswd/.travis.yml:
--------------------------------------------------------------------------------
1 | language: go
2 | go:
3 | - 1.5
4 | - tip
5 |
--------------------------------------------------------------------------------
/vendor/github.com/foomo/htpasswd/LICENSE.txt:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2016 Jan Halfar
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/vendor/github.com/foomo/htpasswd/README.md:
--------------------------------------------------------------------------------
1 | 
2 |
3 | # This is a simple utility library to manipulate htpasswd files
4 |
5 | If you want to authenticate against a htpasswd file use something like https://github.com/abbot/go-http-auth .
6 |
7 | ## Supported hashing algorithms:
8 |
9 | - sha (do not use except for legacy support situations)
10 | - bcrypt
11 |
12 | ## This is what you can
13 |
14 | Set user credentials in a htpasswd file:
15 |
16 | ```Go
17 | file := "/tmp/demo.htpasswd"
18 | name := "joe"
19 | password := "secret"
20 | err := htpasswd.SetPassword(file, name, password, htpasswd.HashBCrypt)
21 | ```
22 |
23 | Remove a user:
24 |
25 | ```Go
26 | err := htpasswd.RemoveUser(file, name)
27 | ```
28 |
29 | Read user hash table:
30 |
31 | ```Go
32 | passwords, err := htpasswd.ParseHtpasswdFile(file)
33 | ```
34 |
35 | Have fun.
36 |
--------------------------------------------------------------------------------
/vendor/github.com/foomo/htpasswd/hashing.go:
--------------------------------------------------------------------------------
1 | package htpasswd
2 |
3 | import (
4 | "crypto/sha1"
5 | "encoding/base64"
6 |
7 | "golang.org/x/crypto/bcrypt"
8 | )
9 |
10 | func hashSha(password string) string {
11 | s := sha1.New()
12 | s.Write([]byte(password))
13 | passwordSum := []byte(s.Sum(nil))
14 | return base64.StdEncoding.EncodeToString(passwordSum)
15 | }
16 |
17 | func hashBcrypt(password string) (hash string, err error) {
18 | passwordBytes, err := bcrypt.GenerateFromPassword([]byte(password), bcrypt.DefaultCost)
19 | if err != nil {
20 | return
21 | }
22 | return string(passwordBytes), nil
23 | }
24 |
--------------------------------------------------------------------------------
/vendor/github.com/fsouza/go-dockerclient/.gitignore:
--------------------------------------------------------------------------------
1 | # temporary symlink for testing
2 | testing/data/symlink
3 |
--------------------------------------------------------------------------------
/vendor/github.com/fsouza/go-dockerclient/.travis.yml:
--------------------------------------------------------------------------------
1 | language: go
2 | sudo: required
3 | go:
4 | - 1.6.3
5 | - 1.7.1
6 | - tip
7 | os:
8 | - linux
9 | - osx
10 | env:
11 | matrix:
12 | - GOARCH=amd64 DOCKER_VERSION=1.10.3
13 | - GOARCH=386 DOCKER_VERSION=1.10.3
14 | - GOARCH=amd64 DOCKER_VERSION=1.11.2
15 | - GOARCH=386 DOCKER_VERSION=1.11.2
16 | - GOARCH=amd64 DOCKER_VERSION=1.12.1
17 | - GOARCH=386 DOCKER_VERSION=1.12.1
18 | global:
19 | - GO_TEST_FLAGS=-race
20 | - DOCKER_HOST=tcp://127.0.0.1:2375
21 | install:
22 | - make testdeps
23 | - travis_retry travis-scripts/install-docker.bash
24 | script:
25 | - travis-scripts/run-tests.bash
26 | services:
27 | - docker
28 | matrix:
29 | fast_finish: true
30 | exclude:
31 | - os: osx
32 | env: GOARCH=amd64 DOCKER_VERSION=1.10.3
33 | - os: osx
34 | env: GOARCH=386 DOCKER_VERSION=1.10.3
35 | - os: osx
36 | env: GOARCH=amd64 DOCKER_VERSION=1.11.2
37 | - os: osx
38 | env: GOARCH=386 DOCKER_VERSION=1.11.2
39 |
--------------------------------------------------------------------------------
/vendor/github.com/fsouza/go-dockerclient/DOCKER-LICENSE:
--------------------------------------------------------------------------------
1 | Apache License
2 | Version 2.0, January 2004
3 | http://www.apache.org/licenses/
4 |
5 | You can find the Docker license at the following link:
6 | https://raw.githubusercontent.com/docker/docker/master/LICENSE
7 |
--------------------------------------------------------------------------------
/vendor/github.com/fsouza/go-dockerclient/Makefile:
--------------------------------------------------------------------------------
1 | .PHONY: \
2 | all \
3 | lint \
4 | vet \
5 | fmt \
6 | fmtcheck \
7 | pretest \
8 | test \
9 | integration \
10 | clean
11 |
12 | all: test
13 |
14 | lint:
15 | @ go get -v github.com/golang/lint/golint
16 | @ export output="$$(golint . | grep -v 'type name will be used as docker.DockerInfo')"; \
17 | [ -n "$${output}" ] && echo "$${output}" && export status=1; \
18 | exit $${status:-0}
19 |
20 | vet:
21 | go vet ./...
22 |
23 | fmt:
24 | gofmt -s -w .
25 |
26 | fmtcheck:
27 | [ -z "$$(gofmt -s -d . | tee /dev/stderr)" ]
28 |
29 | testdeps:
30 | go get -d -t ./...
31 |
32 | pretest: testdeps lint vet fmtcheck
33 |
34 | gotest:
35 | go test $(GO_TEST_FLAGS) ./...
36 |
37 | test: pretest gotest
38 |
39 | integration:
40 | go test -tags docker_integration -run TestIntegration -v
41 |
42 | clean:
43 | go clean ./...
44 |
--------------------------------------------------------------------------------
/vendor/github.com/fsouza/go-dockerclient/change.go:
--------------------------------------------------------------------------------
1 | // Copyright 2014 go-dockerclient 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 docker
6 |
7 | import "fmt"
8 |
9 | // ChangeType is a type for constants indicating the type of change
10 | // in a container
11 | type ChangeType int
12 |
13 | const (
14 | // ChangeModify is the ChangeType for container modifications
15 | ChangeModify ChangeType = iota
16 |
17 | // ChangeAdd is the ChangeType for additions to a container
18 | ChangeAdd
19 |
20 | // ChangeDelete is the ChangeType for deletions from a container
21 | ChangeDelete
22 | )
23 |
24 | // Change represents a change in a container.
25 | //
26 | // See https://goo.gl/9GsTIF for more details.
27 | type Change struct {
28 | Path string
29 | Kind ChangeType
30 | }
31 |
32 | func (change *Change) String() string {
33 | var kind string
34 | switch change.Kind {
35 | case ChangeModify:
36 | kind = "C"
37 | case ChangeAdd:
38 | kind = "A"
39 | case ChangeDelete:
40 | kind = "D"
41 | }
42 | return fmt.Sprintf("%s %s", kind, change.Path)
43 | }
44 |
--------------------------------------------------------------------------------
/vendor/github.com/ghodss/yaml/.gitignore:
--------------------------------------------------------------------------------
1 | # OSX leaves these everywhere on SMB shares
2 | ._*
3 |
4 | # Eclipse files
5 | .classpath
6 | .project
7 | .settings/**
8 |
9 | # Emacs save files
10 | *~
11 |
12 | # Vim-related files
13 | [._]*.s[a-w][a-z]
14 | [._]s[a-w][a-z]
15 | *.un~
16 | Session.vim
17 | .netrwhist
18 |
19 | # Go test binaries
20 | *.test
21 |
--------------------------------------------------------------------------------
/vendor/github.com/ghodss/yaml/.travis.yml:
--------------------------------------------------------------------------------
1 | language: go
2 | go:
3 | - 1.3
4 | - 1.4
5 | script:
6 | - go test
7 | - go build
8 |
--------------------------------------------------------------------------------
/vendor/github.com/go-ole/go-ole/.travis.yml:
--------------------------------------------------------------------------------
1 | language: go
2 | sudo: false
3 |
4 | go:
5 | - 1.1
6 | - 1.2
7 | - 1.3
8 | - 1.4
9 | - tip
10 |
--------------------------------------------------------------------------------
/vendor/github.com/go-ole/go-ole/error_func.go:
--------------------------------------------------------------------------------
1 | // +build !windows
2 |
3 | package ole
4 |
5 | // errstr converts error code to string.
6 | func errstr(errno int) string {
7 | return ""
8 | }
9 |
--------------------------------------------------------------------------------
/vendor/github.com/go-ole/go-ole/error_windows.go:
--------------------------------------------------------------------------------
1 | // +build windows
2 |
3 | package ole
4 |
5 | import (
6 | "fmt"
7 | "syscall"
8 | "unicode/utf16"
9 | )
10 |
11 | // errstr converts error code to string.
12 | func errstr(errno int) string {
13 | // ask windows for the remaining errors
14 | var flags uint32 = syscall.FORMAT_MESSAGE_FROM_SYSTEM | syscall.FORMAT_MESSAGE_ARGUMENT_ARRAY | syscall.FORMAT_MESSAGE_IGNORE_INSERTS
15 | b := make([]uint16, 300)
16 | n, err := syscall.FormatMessage(flags, 0, uint32(errno), 0, b, nil)
17 | if err != nil {
18 | return fmt.Sprintf("error %d (FormatMessage failed with: %v)", errno, err)
19 | }
20 | // trim terminating \r and \n
21 | for ; n > 0 && (b[n-1] == '\n' || b[n-1] == '\r'); n-- {
22 | }
23 | return string(utf16.Decode(b[:n]))
24 | }
25 |
--------------------------------------------------------------------------------
/vendor/github.com/go-ole/go-ole/iconnectionpoint.go:
--------------------------------------------------------------------------------
1 | package ole
2 |
3 | import "unsafe"
4 |
5 | type IConnectionPoint struct {
6 | IUnknown
7 | }
8 |
9 | type IConnectionPointVtbl struct {
10 | IUnknownVtbl
11 | GetConnectionInterface uintptr
12 | GetConnectionPointContainer uintptr
13 | Advise uintptr
14 | Unadvise uintptr
15 | EnumConnections uintptr
16 | }
17 |
18 | func (v *IConnectionPoint) VTable() *IConnectionPointVtbl {
19 | return (*IConnectionPointVtbl)(unsafe.Pointer(v.RawVTable))
20 | }
21 |
--------------------------------------------------------------------------------
/vendor/github.com/go-ole/go-ole/iconnectionpoint_func.go:
--------------------------------------------------------------------------------
1 | // +build !windows
2 |
3 | package ole
4 |
5 | import "unsafe"
6 |
7 | func (v *IConnectionPoint) GetConnectionInterface(piid **GUID) int32 {
8 | return int32(0)
9 | }
10 |
11 | func (v *IConnectionPoint) Advise(unknown *IUnknown) (uint32, error) {
12 | return uint32(0), NewError(E_NOTIMPL)
13 | }
14 |
15 | func (v *IConnectionPoint) Unadvise(cookie uint32) error {
16 | return NewError(E_NOTIMPL)
17 | }
18 |
19 | func (v *IConnectionPoint) EnumConnections(p *unsafe.Pointer) (err error) {
20 | return NewError(E_NOTIMPL)
21 | }
22 |
--------------------------------------------------------------------------------
/vendor/github.com/go-ole/go-ole/iconnectionpoint_windows.go:
--------------------------------------------------------------------------------
1 | // +build windows
2 |
3 | package ole
4 |
5 | import (
6 | "syscall"
7 | "unsafe"
8 | )
9 |
10 | func (v *IConnectionPoint) GetConnectionInterface(piid **GUID) int32 {
11 | // XXX: This doesn't look like it does what it's supposed to
12 | return release((*IUnknown)(unsafe.Pointer(v)))
13 | }
14 |
15 | func (v *IConnectionPoint) Advise(unknown *IUnknown) (cookie uint32, err error) {
16 | hr, _, _ := syscall.Syscall(
17 | v.VTable().Advise,
18 | 3,
19 | uintptr(unsafe.Pointer(v)),
20 | uintptr(unsafe.Pointer(unknown)),
21 | uintptr(unsafe.Pointer(&cookie)))
22 | if hr != 0 {
23 | err = NewError(hr)
24 | }
25 | return
26 | }
27 |
28 | func (v *IConnectionPoint) Unadvise(cookie uint32) (err error) {
29 | hr, _, _ := syscall.Syscall(
30 | v.VTable().Unadvise,
31 | 2,
32 | uintptr(unsafe.Pointer(v)),
33 | uintptr(cookie),
34 | 0)
35 | if hr != 0 {
36 | err = NewError(hr)
37 | }
38 | return
39 | }
40 |
41 | func (v *IConnectionPoint) EnumConnections(p *unsafe.Pointer) error {
42 | return NewError(E_NOTIMPL)
43 | }
44 |
--------------------------------------------------------------------------------
/vendor/github.com/go-ole/go-ole/iconnectionpointcontainer.go:
--------------------------------------------------------------------------------
1 | package ole
2 |
3 | import "unsafe"
4 |
5 | type IConnectionPointContainer struct {
6 | IUnknown
7 | }
8 |
9 | type IConnectionPointContainerVtbl struct {
10 | IUnknownVtbl
11 | EnumConnectionPoints uintptr
12 | FindConnectionPoint uintptr
13 | }
14 |
15 | func (v *IConnectionPointContainer) VTable() *IConnectionPointContainerVtbl {
16 | return (*IConnectionPointContainerVtbl)(unsafe.Pointer(v.RawVTable))
17 | }
18 |
--------------------------------------------------------------------------------
/vendor/github.com/go-ole/go-ole/iconnectionpointcontainer_func.go:
--------------------------------------------------------------------------------
1 | // +build !windows
2 |
3 | package ole
4 |
5 | func (v *IConnectionPointContainer) EnumConnectionPoints(points interface{}) error {
6 | return NewError(E_NOTIMPL)
7 | }
8 |
9 | func (v *IConnectionPointContainer) FindConnectionPoint(iid *GUID, point **IConnectionPoint) error {
10 | return NewError(E_NOTIMPL)
11 | }
12 |
--------------------------------------------------------------------------------
/vendor/github.com/go-ole/go-ole/iconnectionpointcontainer_windows.go:
--------------------------------------------------------------------------------
1 | // +build windows
2 |
3 | package ole
4 |
5 | import (
6 | "syscall"
7 | "unsafe"
8 | )
9 |
10 | func (v *IConnectionPointContainer) EnumConnectionPoints(points interface{}) error {
11 | return NewError(E_NOTIMPL)
12 | }
13 |
14 | func (v *IConnectionPointContainer) FindConnectionPoint(iid *GUID, point **IConnectionPoint) (err error) {
15 | hr, _, _ := syscall.Syscall(
16 | v.VTable().FindConnectionPoint,
17 | 3,
18 | uintptr(unsafe.Pointer(v)),
19 | uintptr(unsafe.Pointer(iid)),
20 | uintptr(unsafe.Pointer(point)))
21 | if hr != 0 {
22 | err = NewError(hr)
23 | }
24 | return
25 | }
26 |
--------------------------------------------------------------------------------
/vendor/github.com/go-ole/go-ole/idispatch_func.go:
--------------------------------------------------------------------------------
1 | // +build !windows
2 |
3 | package ole
4 |
5 | func getIDsOfName(disp *IDispatch, names []string) ([]int32, error) {
6 | return []int32{}, NewError(E_NOTIMPL)
7 | }
8 |
9 | func getTypeInfoCount(disp *IDispatch) (uint32, error) {
10 | return uint32(0), NewError(E_NOTIMPL)
11 | }
12 |
13 | func getTypeInfo(disp *IDispatch) (*ITypeInfo, error) {
14 | return nil, NewError(E_NOTIMPL)
15 | }
16 |
17 | func invoke(disp *IDispatch, dispid int32, dispatch int16, params ...interface{}) (*VARIANT, error) {
18 | return nil, NewError(E_NOTIMPL)
19 | }
20 |
--------------------------------------------------------------------------------
/vendor/github.com/go-ole/go-ole/ienumvariant.go:
--------------------------------------------------------------------------------
1 | package ole
2 |
3 | import "unsafe"
4 |
5 | type IEnumVARIANT struct {
6 | IUnknown
7 | }
8 |
9 | type IEnumVARIANTVtbl struct {
10 | IUnknownVtbl
11 | Next uintptr
12 | Skip uintptr
13 | Reset uintptr
14 | Clone uintptr
15 | }
16 |
17 | func (v *IEnumVARIANT) VTable() *IEnumVARIANTVtbl {
18 | return (*IEnumVARIANTVtbl)(unsafe.Pointer(v.RawVTable))
19 | }
20 |
--------------------------------------------------------------------------------
/vendor/github.com/go-ole/go-ole/ienumvariant_func.go:
--------------------------------------------------------------------------------
1 | // +build !windows
2 |
3 | package ole
4 |
5 | func (enum *IEnumVARIANT) Clone() (*IEnumVARIANT, error) {
6 | return nil, NewError(E_NOTIMPL)
7 | }
8 |
9 | func (enum *IEnumVARIANT) Reset() error {
10 | return NewError(E_NOTIMPL)
11 | }
12 |
13 | func (enum *IEnumVARIANT) Skip(celt uint) error {
14 | return NewError(E_NOTIMPL)
15 | }
16 |
17 | func (enum *IEnumVARIANT) Next(celt uint) (VARIANT, uint, error) {
18 | return NewVariant(VT_NULL, int64(0)), 0, NewError(E_NOTIMPL)
19 | }
20 |
--------------------------------------------------------------------------------
/vendor/github.com/go-ole/go-ole/iinspectable.go:
--------------------------------------------------------------------------------
1 | package ole
2 |
3 | import "unsafe"
4 |
5 | type IInspectable struct {
6 | IUnknown
7 | }
8 |
9 | type IInspectableVtbl struct {
10 | IUnknownVtbl
11 | GetIIds uintptr
12 | GetRuntimeClassName uintptr
13 | GetTrustLevel uintptr
14 | }
15 |
16 | func (v *IInspectable) VTable() *IInspectableVtbl {
17 | return (*IInspectableVtbl)(unsafe.Pointer(v.RawVTable))
18 | }
19 |
--------------------------------------------------------------------------------
/vendor/github.com/go-ole/go-ole/iinspectable_func.go:
--------------------------------------------------------------------------------
1 | // +build !windows
2 |
3 | package ole
4 |
5 | func (v *IInspectable) GetIids() ([]*GUID, error) {
6 | return []*GUID{}, NewError(E_NOTIMPL)
7 | }
8 |
9 | func (v *IInspectable) GetRuntimeClassName() (string, error) {
10 | return "", NewError(E_NOTIMPL)
11 | }
12 |
13 | func (v *IInspectable) GetTrustLevel() (uint32, error) {
14 | return uint32(0), NewError(E_NOTIMPL)
15 | }
16 |
--------------------------------------------------------------------------------
/vendor/github.com/go-ole/go-ole/iprovideclassinfo.go:
--------------------------------------------------------------------------------
1 | package ole
2 |
3 | import "unsafe"
4 |
5 | type IProvideClassInfo struct {
6 | IUnknown
7 | }
8 |
9 | type IProvideClassInfoVtbl struct {
10 | IUnknownVtbl
11 | GetClassInfo uintptr
12 | }
13 |
14 | func (v *IProvideClassInfo) VTable() *IProvideClassInfoVtbl {
15 | return (*IProvideClassInfoVtbl)(unsafe.Pointer(v.RawVTable))
16 | }
17 |
18 | func (v *IProvideClassInfo) GetClassInfo() (cinfo *ITypeInfo, err error) {
19 | cinfo, err = getClassInfo(v)
20 | return
21 | }
22 |
--------------------------------------------------------------------------------
/vendor/github.com/go-ole/go-ole/iprovideclassinfo_func.go:
--------------------------------------------------------------------------------
1 | // +build !windows
2 |
3 | package ole
4 |
5 | func getClassInfo(disp *IProvideClassInfo) (tinfo *ITypeInfo, err error) {
6 | return nil, NewError(E_NOTIMPL)
7 | }
8 |
--------------------------------------------------------------------------------
/vendor/github.com/go-ole/go-ole/iprovideclassinfo_windows.go:
--------------------------------------------------------------------------------
1 | // +build windows
2 |
3 | package ole
4 |
5 | import (
6 | "syscall"
7 | "unsafe"
8 | )
9 |
10 | func getClassInfo(disp *IProvideClassInfo) (tinfo *ITypeInfo, err error) {
11 | hr, _, _ := syscall.Syscall(
12 | disp.VTable().GetClassInfo,
13 | 2,
14 | uintptr(unsafe.Pointer(disp)),
15 | uintptr(unsafe.Pointer(&tinfo)),
16 | 0)
17 | if hr != 0 {
18 | err = NewError(hr)
19 | }
20 | return
21 | }
22 |
--------------------------------------------------------------------------------
/vendor/github.com/go-ole/go-ole/itypeinfo.go:
--------------------------------------------------------------------------------
1 | package ole
2 |
3 | import "unsafe"
4 |
5 | type ITypeInfo struct {
6 | IUnknown
7 | }
8 |
9 | type ITypeInfoVtbl struct {
10 | IUnknownVtbl
11 | GetTypeAttr uintptr
12 | GetTypeComp uintptr
13 | GetFuncDesc uintptr
14 | GetVarDesc uintptr
15 | GetNames uintptr
16 | GetRefTypeOfImplType uintptr
17 | GetImplTypeFlags uintptr
18 | GetIDsOfNames uintptr
19 | Invoke uintptr
20 | GetDocumentation uintptr
21 | GetDllEntry uintptr
22 | GetRefTypeInfo uintptr
23 | AddressOfMember uintptr
24 | CreateInstance uintptr
25 | GetMops uintptr
26 | GetContainingTypeLib uintptr
27 | ReleaseTypeAttr uintptr
28 | ReleaseFuncDesc uintptr
29 | ReleaseVarDesc uintptr
30 | }
31 |
32 | func (v *ITypeInfo) VTable() *ITypeInfoVtbl {
33 | return (*ITypeInfoVtbl)(unsafe.Pointer(v.RawVTable))
34 | }
35 |
--------------------------------------------------------------------------------
/vendor/github.com/go-ole/go-ole/itypeinfo_func.go:
--------------------------------------------------------------------------------
1 | // +build !windows
2 |
3 | package ole
4 |
5 | func (v *ITypeInfo) GetTypeAttr() (*TYPEATTR, error) {
6 | return nil, NewError(E_NOTIMPL)
7 | }
8 |
--------------------------------------------------------------------------------
/vendor/github.com/go-ole/go-ole/itypeinfo_windows.go:
--------------------------------------------------------------------------------
1 | // +build windows
2 |
3 | package ole
4 |
5 | import (
6 | "syscall"
7 | "unsafe"
8 | )
9 |
10 | func (v *ITypeInfo) GetTypeAttr() (tattr *TYPEATTR, err error) {
11 | hr, _, _ := syscall.Syscall(
12 | uintptr(v.VTable().GetTypeAttr),
13 | 2,
14 | uintptr(unsafe.Pointer(v)),
15 | uintptr(unsafe.Pointer(&tattr)),
16 | 0)
17 | if hr != 0 {
18 | err = NewError(hr)
19 | }
20 | return
21 | }
22 |
--------------------------------------------------------------------------------
/vendor/github.com/go-ole/go-ole/iunknown_func.go:
--------------------------------------------------------------------------------
1 | // +build !windows
2 |
3 | package ole
4 |
5 | func reflectQueryInterface(self interface{}, method uintptr, interfaceID *GUID, obj interface{}) (err error) {
6 | return NewError(E_NOTIMPL)
7 | }
8 |
9 | func queryInterface(unk *IUnknown, iid *GUID) (disp *IDispatch, err error) {
10 | return nil, NewError(E_NOTIMPL)
11 | }
12 |
13 | func addRef(unk *IUnknown) int32 {
14 | return 0
15 | }
16 |
17 | func release(unk *IUnknown) int32 {
18 | return 0
19 | }
20 |
--------------------------------------------------------------------------------
/vendor/github.com/go-ole/go-ole/oleutil/connection_func.go:
--------------------------------------------------------------------------------
1 | // +build !windows
2 |
3 | package oleutil
4 |
5 | import ole "github.com/go-ole/go-ole"
6 |
7 | // ConnectObject creates a connection point between two services for communication.
8 | func ConnectObject(disp *ole.IDispatch, iid *ole.GUID, idisp interface{}) (uint32, error) {
9 | return 0, ole.NewError(ole.E_NOTIMPL)
10 | }
11 |
--------------------------------------------------------------------------------
/vendor/github.com/go-ole/go-ole/oleutil/go-get.go:
--------------------------------------------------------------------------------
1 | // This file is here so go get succeeds as without it errors with:
2 | // no buildable Go source files in ...
3 | //
4 | // +build !windows
5 |
6 | package oleutil
7 |
--------------------------------------------------------------------------------
/vendor/github.com/go-ole/go-ole/safearray.go:
--------------------------------------------------------------------------------
1 | // Package is meant to retrieve and process safe array data returned from COM.
2 |
3 | package ole
4 |
5 | // SafeArrayBound defines the SafeArray boundaries.
6 | type SafeArrayBound struct {
7 | Elements uint32
8 | LowerBound int32
9 | }
10 |
11 | // SafeArray is how COM handles arrays.
12 | type SafeArray struct {
13 | Dimensions uint16
14 | FeaturesFlag uint16
15 | ElementsSize uint32
16 | LocksAmount uint32
17 | Data uint32
18 | Bounds [16]byte
19 | }
20 |
21 | // SAFEARRAY is obsolete, exists for backwards compatibility.
22 | // Use SafeArray
23 | type SAFEARRAY SafeArray
24 |
25 | // SAFEARRAYBOUND is obsolete, exists for backwards compatibility.
26 | // Use SafeArrayBound
27 | type SAFEARRAYBOUND SafeArrayBound
28 |
--------------------------------------------------------------------------------
/vendor/github.com/go-ole/go-ole/safearrayslices.go:
--------------------------------------------------------------------------------
1 | // +build windows
2 |
3 | package ole
4 |
5 | import (
6 | "unsafe"
7 | )
8 |
9 | func safeArrayFromByteSlice(slice []byte) *SafeArray {
10 | array, _ := safeArrayCreateVector(VT_UI1, 0, uint32(len(slice)))
11 |
12 | if array == nil {
13 | panic("Could not convert []byte to SAFEARRAY")
14 | }
15 |
16 | for i, v := range slice {
17 | safeArrayPutElement(array, int64(i), uintptr(unsafe.Pointer(&v)))
18 | }
19 | return array
20 | }
21 |
22 | func safeArrayFromStringSlice(slice []string) *SafeArray {
23 | array, _ := safeArrayCreateVector(VT_BSTR, 0, uint32(len(slice)))
24 |
25 | if array == nil {
26 | panic("Could not convert []string to SAFEARRAY")
27 | }
28 | // SysAllocStringLen(s)
29 | for i, v := range slice {
30 | safeArrayPutElement(array, int64(i), uintptr(unsafe.Pointer(SysAllocStringLen(v))))
31 | }
32 | return array
33 | }
34 |
--------------------------------------------------------------------------------
/vendor/github.com/go-ole/go-ole/variables.go:
--------------------------------------------------------------------------------
1 | // +build windows
2 |
3 | package ole
4 |
5 | import (
6 | "syscall"
7 | )
8 |
9 | var (
10 | modcombase = syscall.NewLazyDLL("combase.dll")
11 | modkernel32, _ = syscall.LoadDLL("kernel32.dll")
12 | modole32, _ = syscall.LoadDLL("ole32.dll")
13 | modoleaut32, _ = syscall.LoadDLL("oleaut32.dll")
14 | modmsvcrt, _ = syscall.LoadDLL("msvcrt.dll")
15 | moduser32, _ = syscall.LoadDLL("user32.dll")
16 | )
17 |
--------------------------------------------------------------------------------
/vendor/github.com/go-ole/go-ole/variant_386.go:
--------------------------------------------------------------------------------
1 | // +build 386
2 |
3 | package ole
4 |
5 | type VARIANT struct {
6 | VT VT // 2
7 | wReserved1 uint16 // 4
8 | wReserved2 uint16 // 6
9 | wReserved3 uint16 // 8
10 | Val int64 // 16
11 | }
12 |
--------------------------------------------------------------------------------
/vendor/github.com/go-ole/go-ole/variant_amd64.go:
--------------------------------------------------------------------------------
1 | // +build amd64
2 |
3 | package ole
4 |
5 | type VARIANT struct {
6 | VT VT // 2
7 | wReserved1 uint16 // 4
8 | wReserved2 uint16 // 6
9 | wReserved3 uint16 // 8
10 | Val int64 // 16
11 | _ [8]byte // 24
12 | }
13 |
--------------------------------------------------------------------------------
/vendor/github.com/go-ole/go-ole/winrt_doc.go:
--------------------------------------------------------------------------------
1 | // +build !windows
2 |
3 | package ole
4 |
5 | // RoInitialize
6 | func RoInitialize(thread_type uint32) (err error) {
7 | return NewError(E_NOTIMPL)
8 | }
9 |
10 | // RoActivateInstance
11 | func RoActivateInstance(clsid string) (ins *IInspectable, err error) {
12 | return nil, NewError(E_NOTIMPL)
13 | }
14 |
15 | // RoGetActivationFactory
16 | func RoGetActivationFactory(clsid string, iid *GUID) (ins *IInspectable, err error) {
17 | return nil, NewError(E_NOTIMPL)
18 | }
19 |
20 | // HString is handle string for pointers.
21 | type HString uintptr
22 |
23 | // NewHString returns a new HString for Go string.
24 | func NewHString(s string) (hstring HString, err error) {
25 | return HString(uintptr(0)), NewError(E_NOTIMPL)
26 | }
27 |
28 | // DeleteHString deletes HString.
29 | func DeleteHString(hstring HString) (err error) {
30 | return NewError(E_NOTIMPL)
31 | }
32 |
33 | // String returns Go string value of HString.
34 | func (h HString) String() string {
35 | return ""
36 | }
37 |
--------------------------------------------------------------------------------
/vendor/github.com/hashicorp/go-cleanhttp/doc.go:
--------------------------------------------------------------------------------
1 | // Package cleanhttp offers convenience utilities for acquiring "clean"
2 | // http.Transport and http.Client structs.
3 | //
4 | // Values set on http.DefaultClient and http.DefaultTransport affect all
5 | // callers. This can have detrimental effects, esepcially in TLS contexts,
6 | // where client or root certificates set to talk to multiple endpoints can end
7 | // up displacing each other, leading to hard-to-debug issues. This package
8 | // provides non-shared http.Client and http.Transport structs to ensure that
9 | // the configuration will not be overwritten by other parts of the application
10 | // or dependencies.
11 | //
12 | // The DefaultClient and DefaultTransport functions disable idle connections
13 | // and keepalives. Without ensuring that idle connections are closed before
14 | // garbage collection, short-term clients/transports can leak file descriptors,
15 | // eventually leading to "too many open files" errors. If you will be
16 | // connecting to the same hosts repeatedly from the same client, you can use
17 | // DefaultPooledClient to receive a client that has connection pooling
18 | // semantics similar to http.DefaultClient.
19 | //
20 | package cleanhttp
21 |
--------------------------------------------------------------------------------
/vendor/github.com/opencontainers/runc/NOTICE:
--------------------------------------------------------------------------------
1 | runc
2 |
3 | Copyright 2012-2015 Docker, Inc.
4 |
5 | This product includes software developed at Docker, Inc. (http://www.docker.com).
6 |
7 | The following is courtesy of our legal counsel:
8 |
9 |
10 | Use and transfer of Docker may be subject to certain restrictions by the
11 | United States and other governments.
12 | It is your responsibility to ensure that your use and/or transfer does not
13 | violate applicable laws.
14 |
15 | For more information, please see http://www.bis.doc.gov
16 |
17 | See also http://www.apache.org/dev/crypto.html and/or seek legal counsel.
18 |
--------------------------------------------------------------------------------
/vendor/github.com/opencontainers/runc/libcontainer/system/proc.go:
--------------------------------------------------------------------------------
1 | package system
2 |
3 | import (
4 | "io/ioutil"
5 | "path/filepath"
6 | "strconv"
7 | "strings"
8 | )
9 |
10 | // look in /proc to find the process start time so that we can verify
11 | // that this pid has started after ourself
12 | func GetProcessStartTime(pid int) (string, error) {
13 | data, err := ioutil.ReadFile(filepath.Join("/proc", strconv.Itoa(pid), "stat"))
14 | if err != nil {
15 | return "", err
16 | }
17 |
18 | parts := strings.Split(string(data), " ")
19 | // the starttime is located at pos 22
20 | // from the man page
21 | //
22 | // starttime %llu (was %lu before Linux 2.6)
23 | // (22) The time the process started after system boot. In kernels before Linux 2.6, this
24 | // value was expressed in jiffies. Since Linux 2.6, the value is expressed in clock ticks
25 | // (divide by sysconf(_SC_CLK_TCK)).
26 | return parts[22-1], nil // starts at 1
27 | }
28 |
--------------------------------------------------------------------------------
/vendor/github.com/opencontainers/runc/libcontainer/system/setns_linux.go:
--------------------------------------------------------------------------------
1 | package system
2 |
3 | import (
4 | "fmt"
5 | "runtime"
6 | "syscall"
7 | )
8 |
9 | // Via http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=7b21fddd087678a70ad64afc0f632e0f1071b092
10 | //
11 | // We need different setns values for the different platforms and arch
12 | // We are declaring the macro here because the SETNS syscall does not exist in th stdlib
13 | var setNsMap = map[string]uintptr{
14 | "linux/386": 346,
15 | "linux/arm64": 268,
16 | "linux/amd64": 308,
17 | "linux/arm": 375,
18 | "linux/ppc": 350,
19 | "linux/ppc64": 350,
20 | "linux/ppc64le": 350,
21 | "linux/s390x": 339,
22 | }
23 |
24 | var sysSetns = setNsMap[fmt.Sprintf("%s/%s", runtime.GOOS, runtime.GOARCH)]
25 |
26 | func SysSetns() uint32 {
27 | return uint32(sysSetns)
28 | }
29 |
30 | func Setns(fd uintptr, flags uintptr) error {
31 | ns, exists := setNsMap[fmt.Sprintf("%s/%s", runtime.GOOS, runtime.GOARCH)]
32 | if !exists {
33 | return fmt.Errorf("unsupported platform %s/%s", runtime.GOOS, runtime.GOARCH)
34 | }
35 | _, _, err := syscall.RawSyscall(ns, fd, flags, 0)
36 | if err != 0 {
37 | return err
38 | }
39 | return nil
40 | }
41 |
--------------------------------------------------------------------------------
/vendor/github.com/opencontainers/runc/libcontainer/system/syscall_linux_386.go:
--------------------------------------------------------------------------------
1 | // +build linux,386
2 |
3 | package system
4 |
5 | import (
6 | "syscall"
7 | )
8 |
9 | // Setuid sets the uid of the calling thread to the specified uid.
10 | func Setuid(uid int) (err error) {
11 | _, _, e1 := syscall.RawSyscall(syscall.SYS_SETUID32, uintptr(uid), 0, 0)
12 | if e1 != 0 {
13 | err = e1
14 | }
15 | return
16 | }
17 |
18 | // Setgid sets the gid of the calling thread to the specified gid.
19 | func Setgid(gid int) (err error) {
20 | _, _, e1 := syscall.RawSyscall(syscall.SYS_SETGID32, uintptr(gid), 0, 0)
21 | if e1 != 0 {
22 | err = e1
23 | }
24 | return
25 | }
26 |
--------------------------------------------------------------------------------
/vendor/github.com/opencontainers/runc/libcontainer/system/syscall_linux_64.go:
--------------------------------------------------------------------------------
1 | // +build linux,arm64 linux,amd64 linux,ppc linux,ppc64 linux,ppc64le linux,s390x
2 |
3 | package system
4 |
5 | import (
6 | "syscall"
7 | )
8 |
9 | // Setuid sets the uid of the calling thread to the specified uid.
10 | func Setuid(uid int) (err error) {
11 | _, _, e1 := syscall.RawSyscall(syscall.SYS_SETUID, uintptr(uid), 0, 0)
12 | if e1 != 0 {
13 | err = e1
14 | }
15 | return
16 | }
17 |
18 | // Setgid sets the gid of the calling thread to the specified gid.
19 | func Setgid(gid int) (err error) {
20 | _, _, e1 := syscall.RawSyscall(syscall.SYS_SETGID, uintptr(gid), 0, 0)
21 | if e1 != 0 {
22 | err = e1
23 | }
24 | return
25 | }
26 |
--------------------------------------------------------------------------------
/vendor/github.com/opencontainers/runc/libcontainer/system/syscall_linux_arm.go:
--------------------------------------------------------------------------------
1 | // +build linux,arm
2 |
3 | package system
4 |
5 | import (
6 | "syscall"
7 | )
8 |
9 | // Setuid sets the uid of the calling thread to the specified uid.
10 | func Setuid(uid int) (err error) {
11 | _, _, e1 := syscall.RawSyscall(syscall.SYS_SETUID32, uintptr(uid), 0, 0)
12 | if e1 != 0 {
13 | err = e1
14 | }
15 | return
16 | }
17 |
18 | // Setgid sets the gid of the calling thread to the specified gid.
19 | func Setgid(gid int) (err error) {
20 | _, _, e1 := syscall.RawSyscall(syscall.SYS_SETGID32, uintptr(gid), 0, 0)
21 | if e1 != 0 {
22 | err = e1
23 | }
24 | return
25 | }
26 |
--------------------------------------------------------------------------------
/vendor/github.com/opencontainers/runc/libcontainer/system/sysconfig.go:
--------------------------------------------------------------------------------
1 | // +build cgo,linux cgo,freebsd
2 |
3 | package system
4 |
5 | /*
6 | #include
7 | */
8 | import "C"
9 |
10 | func GetClockTicks() int {
11 | return int(C.sysconf(C._SC_CLK_TCK))
12 | }
13 |
--------------------------------------------------------------------------------
/vendor/github.com/opencontainers/runc/libcontainer/system/sysconfig_notcgo.go:
--------------------------------------------------------------------------------
1 | // +build !cgo windows
2 |
3 | package system
4 |
5 | func GetClockTicks() int {
6 | // TODO figure out a better alternative for platforms where we're missing cgo
7 | //
8 | // TODO Windows. This could be implemented using Win32 QueryPerformanceFrequency().
9 | // https://msdn.microsoft.com/en-us/library/windows/desktop/ms644905(v=vs.85).aspx
10 | //
11 | // An example of its usage can be found here.
12 | // https://msdn.microsoft.com/en-us/library/windows/desktop/dn553408(v=vs.85).aspx
13 |
14 | return 100
15 | }
16 |
--------------------------------------------------------------------------------
/vendor/github.com/opencontainers/runc/libcontainer/system/unsupported.go:
--------------------------------------------------------------------------------
1 | // +build !linux
2 |
3 | package system
4 |
5 | // RunningInUserNS is a stub for non-Linux systems
6 | // Always returns false
7 | func RunningInUserNS() bool {
8 | return false
9 | }
10 |
--------------------------------------------------------------------------------
/vendor/github.com/opencontainers/runc/libcontainer/user/MAINTAINERS:
--------------------------------------------------------------------------------
1 | Tianon Gravi (@tianon)
2 | Aleksa Sarai (@cyphar)
3 |
--------------------------------------------------------------------------------
/vendor/github.com/opencontainers/runc/libcontainer/user/lookup_unix.go:
--------------------------------------------------------------------------------
1 | // +build darwin dragonfly freebsd linux netbsd openbsd solaris
2 |
3 | package user
4 |
5 | import (
6 | "io"
7 | "os"
8 | )
9 |
10 | // Unix-specific path to the passwd and group formatted files.
11 | const (
12 | unixPasswdPath = "/etc/passwd"
13 | unixGroupPath = "/etc/group"
14 | )
15 |
16 | func GetPasswdPath() (string, error) {
17 | return unixPasswdPath, nil
18 | }
19 |
20 | func GetPasswd() (io.ReadCloser, error) {
21 | return os.Open(unixPasswdPath)
22 | }
23 |
24 | func GetGroupPath() (string, error) {
25 | return unixGroupPath, nil
26 | }
27 |
28 | func GetGroup() (io.ReadCloser, error) {
29 | return os.Open(unixGroupPath)
30 | }
31 |
--------------------------------------------------------------------------------
/vendor/github.com/opencontainers/runc/libcontainer/user/lookup_unsupported.go:
--------------------------------------------------------------------------------
1 | // +build !darwin,!dragonfly,!freebsd,!linux,!netbsd,!openbsd,!solaris
2 |
3 | package user
4 |
5 | import "io"
6 |
7 | func GetPasswdPath() (string, error) {
8 | return "", ErrUnsupported
9 | }
10 |
11 | func GetPasswd() (io.ReadCloser, error) {
12 | return nil, ErrUnsupported
13 | }
14 |
15 | func GetGroupPath() (string, error) {
16 | return "", ErrUnsupported
17 | }
18 |
19 | func GetGroup() (io.ReadCloser, error) {
20 | return nil, ErrUnsupported
21 | }
22 |
--------------------------------------------------------------------------------
/vendor/github.com/ricochet2200/go-disk-usage/du/diskusage.go:
--------------------------------------------------------------------------------
1 | // +build !windows
2 |
3 | package du
4 |
5 | import "syscall"
6 |
7 | type DiskUsage struct {
8 | stat *syscall.Statfs_t
9 | }
10 |
11 | // Returns an object holding the disk usage of volumePath
12 | // This function assumes volumePath is a valid path
13 | func NewDiskUsage(volumePath string) *DiskUsage {
14 |
15 | var stat syscall.Statfs_t
16 | syscall.Statfs(volumePath, &stat)
17 | return &DiskUsage{&stat}
18 | }
19 |
20 | // Total free bytes on file system
21 | func (this *DiskUsage) Free() uint64 {
22 | return this.stat.Bfree * uint64(this.stat.Bsize)
23 | }
24 |
25 | // Total available bytes on file system to an unpriveleged user
26 | func (this *DiskUsage) Available() uint64 {
27 | return this.stat.Bavail * uint64(this.stat.Bsize)
28 | }
29 |
30 | // Total size of the file system
31 | func (this *DiskUsage) Size() uint64 {
32 | return this.stat.Blocks * uint64(this.stat.Bsize)
33 | }
34 |
35 | // Total bytes used in file system
36 | func (this *DiskUsage) Used() uint64 {
37 | return this.Size() - this.Free()
38 | }
39 |
40 | // Percentage of use on the file system
41 | func (this *DiskUsage) Usage() float32 {
42 | return float32(this.Used()) / float32(this.Size())
43 | }
44 |
--------------------------------------------------------------------------------
/vendor/github.com/shirou/gopsutil/cpu/cpu_darwin_nocgo.go:
--------------------------------------------------------------------------------
1 | // +build darwin
2 | // +build !cgo
3 |
4 | package cpu
5 |
6 | import "github.com/shirou/gopsutil/internal/common"
7 |
8 | func perCPUTimes() ([]TimesStat, error) {
9 | return []TimesStat{}, common.ErrNotImplementedError
10 | }
11 |
12 | func allCPUTimes() ([]TimesStat, error) {
13 | return []TimesStat{}, common.ErrNotImplementedError
14 | }
15 |
--------------------------------------------------------------------------------
/vendor/github.com/shirou/gopsutil/cpu/cpu_fallback.go:
--------------------------------------------------------------------------------
1 | // +build !darwin,!linux,!freebsd,!windows
2 |
3 | package cpu
4 |
5 | import (
6 | "time"
7 |
8 | "github.com/shirou/gopsutil/internal/common"
9 | )
10 |
11 | func Times(percpu bool) ([]TimesStat, error) {
12 | return []TimesStat{}, common.ErrNotImplementedError
13 | }
14 |
15 | func Info() ([]InfoStat, error) {
16 | return []InfoStat{}, common.ErrNotImplementedError
17 | }
18 |
19 | func Percent(interval time.Duration, percpu bool) ([]float64, error) {
20 | return []float64{}, common.ErrNotImplementedError
21 | }
22 |
--------------------------------------------------------------------------------
/vendor/github.com/shirou/gopsutil/host/host_darwin_amd64.go:
--------------------------------------------------------------------------------
1 | // Created by cgo -godefs - DO NOT EDIT
2 | // cgo -godefs types_darwin.go
3 |
4 | package host
5 |
6 | type Utmpx struct {
7 | User [256]int8
8 | ID [4]int8
9 | Line [32]int8
10 | Pid int32
11 | Type int16
12 | Pad_cgo_0 [6]byte
13 | Tv Timeval
14 | Host [256]int8
15 | Pad [16]uint32
16 | }
17 | type Timeval struct {
18 | Sec int32
19 | }
20 |
--------------------------------------------------------------------------------
/vendor/github.com/shirou/gopsutil/host/host_fallback.go:
--------------------------------------------------------------------------------
1 | // +build !darwin,!linux,!freebsd,!windows
2 |
3 | package host
4 |
5 | import "github.com/shirou/gopsutil/internal/common"
6 |
7 | func Info() (*InfoStat, error) {
8 | return nil, common.ErrNotImplementedError
9 | }
10 |
11 | func BootTime() (uint64, error) {
12 | return 0, common.ErrNotImplementedError
13 | }
14 |
15 | func Uptime() (uint64, error) {
16 | return 0, common.ErrNotImplementedError
17 | }
18 |
19 | func Users() ([]UserStat, error) {
20 | return []UserStat{}, common.ErrNotImplementedError
21 | }
22 |
--------------------------------------------------------------------------------
/vendor/github.com/shirou/gopsutil/host/host_freebsd_386.go:
--------------------------------------------------------------------------------
1 | // Created by cgo -godefs - DO NOT EDIT
2 | // cgo -godefs types_freebsd.go
3 |
4 | package host
5 |
6 | const (
7 | sizeofPtr = 0x4
8 | sizeofShort = 0x2
9 | sizeofInt = 0x4
10 | sizeofLong = 0x4
11 | sizeofLongLong = 0x8
12 | sizeOfUtmpx = 197 // TODO why should 197
13 | )
14 |
15 | type (
16 | _C_short int16
17 | _C_int int32
18 | _C_long int32
19 | _C_long_long int64
20 | )
21 |
22 | type Utmp struct {
23 | Line [8]int8
24 | Name [16]int8
25 | Host [16]int8
26 | Time int32
27 | }
28 |
29 | type Utmpx struct {
30 | Type int16
31 | Tv Timeval
32 | Id [8]int8
33 | Pid int32
34 | User [32]int8
35 | Line [16]int8
36 | Host [125]int8
37 | // X__ut_spare [64]int8
38 | }
39 |
40 | type Timeval struct {
41 | Sec [4]byte
42 | Usec [3]byte
43 | }
44 |
--------------------------------------------------------------------------------
/vendor/github.com/shirou/gopsutil/host/host_freebsd_amd64.go:
--------------------------------------------------------------------------------
1 | // Created by cgo -godefs - DO NOT EDIT
2 | // cgo -godefs types_freebsd.go
3 |
4 | package host
5 |
6 | const (
7 | sizeofPtr = 0x8
8 | sizeofShort = 0x2
9 | sizeofInt = 0x4
10 | sizeofLong = 0x8
11 | sizeofLongLong = 0x8
12 | sizeOfUtmpx = 197 // TODO: why should 197, not 0x118
13 | )
14 |
15 | type (
16 | _C_short int16
17 | _C_int int32
18 | _C_long int64
19 | _C_long_long int64
20 | )
21 |
22 | type Utmp struct {
23 | Line [8]int8
24 | Name [16]int8
25 | Host [16]int8
26 | Time int32
27 | }
28 |
29 | type Utmpx struct {
30 | Type int16
31 | Tv Timeval
32 | Id [8]int8
33 | Pid int32
34 | User [32]int8
35 | Line [16]int8
36 | Host [125]int8
37 | // Host [128]int8
38 | // X__ut_spare [64]int8
39 | }
40 |
41 | type Timeval struct {
42 | Sec [4]byte
43 | Usec [3]byte
44 | }
45 |
--------------------------------------------------------------------------------
/vendor/github.com/shirou/gopsutil/host/host_linux_386.go:
--------------------------------------------------------------------------------
1 | // ATTENTION - FILE MANUAL FIXED AFTER CGO.
2 | // Fixed line: Tv _Ctype_struct_timeval -> Tv UtTv
3 | // Created by cgo -godefs, MANUAL FIXED
4 | // cgo -godefs types_linux.go
5 |
6 | package host
7 |
8 | const (
9 | sizeofPtr = 0x4
10 | sizeofShort = 0x2
11 | sizeofInt = 0x4
12 | sizeofLong = 0x4
13 | sizeofLongLong = 0x8
14 | sizeOfUtmp = 0x180
15 | )
16 |
17 | type (
18 | _C_short int16
19 | _C_int int32
20 | _C_long int32
21 | _C_long_long int64
22 | )
23 |
24 | type utmp struct {
25 | Type int16
26 | Pad_cgo_0 [2]byte
27 | Pid int32
28 | Line [32]int8
29 | ID [4]int8
30 | User [32]int8
31 | Host [256]int8
32 | Exit exit_status
33 | Session int32
34 | Tv UtTv
35 | Addr_v6 [4]int32
36 | X__unused [20]int8
37 | }
38 | type exit_status struct {
39 | Termination int16
40 | Exit int16
41 | }
42 | type UtTv struct {
43 | Sec int32
44 | Usec int32
45 | }
46 |
--------------------------------------------------------------------------------
/vendor/github.com/shirou/gopsutil/host/host_linux_amd64.go:
--------------------------------------------------------------------------------
1 | // Created by cgo -godefs - DO NOT EDIT
2 | // cgo -godefs types_linux.go
3 |
4 | package host
5 |
6 | const (
7 | sizeofPtr = 0x8
8 | sizeofShort = 0x2
9 | sizeofInt = 0x4
10 | sizeofLong = 0x8
11 | sizeofLongLong = 0x8
12 | sizeOfUtmp = 0x180
13 | )
14 |
15 | type (
16 | _C_short int16
17 | _C_int int32
18 | _C_long int64
19 | _C_long_long int64
20 | )
21 |
22 | type utmp struct {
23 | Type int16
24 | Pad_cgo_0 [2]byte
25 | Pid int32
26 | Line [32]int8
27 | Id [4]int8
28 | User [32]int8
29 | Host [256]int8
30 | Exit exit_status
31 | Session int32
32 | Tv _Ctype_struct___0
33 | Addr_v6 [4]int32
34 | X__glibc_reserved [20]int8
35 | }
36 | type exit_status struct {
37 | Termination int16
38 | Exit int16
39 | }
40 | type timeval struct {
41 | Sec int64
42 | Usec int64
43 | }
44 |
45 | type _Ctype_struct___0 struct {
46 | Sec int32
47 | Usec int32
48 | }
49 |
--------------------------------------------------------------------------------
/vendor/github.com/shirou/gopsutil/host/host_linux_arm.go:
--------------------------------------------------------------------------------
1 | // Created by cgo -godefs - DO NOT EDIT
2 | // cgo -godefs types_linux.go | sed "s/uint8/int8/g"
3 |
4 | package host
5 |
6 | const (
7 | sizeofPtr = 0x4
8 | sizeofShort = 0x2
9 | sizeofInt = 0x4
10 | sizeofLong = 0x4
11 | sizeofLongLong = 0x8
12 | sizeOfUtmp = 0x180
13 | )
14 |
15 | type (
16 | _C_short int16
17 | _C_int int32
18 | _C_long int32
19 | _C_long_long int64
20 | )
21 |
22 | type utmp struct {
23 | Type int16
24 | Pad_cgo_0 [2]byte
25 | Pid int32
26 | Line [32]int8
27 | Id [4]int8
28 | User [32]int8
29 | Host [256]int8
30 | Exit exit_status
31 | Session int32
32 | Tv timeval
33 | Addr_v6 [4]int32
34 | X__glibc_reserved [20]int8
35 | }
36 | type exit_status struct {
37 | Termination int16
38 | Exit int16
39 | }
40 | type timeval struct {
41 | Sec int32
42 | Usec int32
43 | }
44 |
--------------------------------------------------------------------------------
/vendor/github.com/shirou/gopsutil/host/host_linux_arm64.go:
--------------------------------------------------------------------------------
1 | // Created by cgo -godefs - DO NOT EDIT
2 | // cgo -godefs types_linux.go
3 |
4 | package host
5 |
6 | const (
7 | sizeofPtr = 0x8
8 | sizeofShort = 0x2
9 | sizeofInt = 0x4
10 | sizeofLong = 0x8
11 | sizeofLongLong = 0x8
12 | sizeOfUtmp = 0x180
13 | )
14 |
15 | type (
16 | _C_short int16
17 | _C_int int32
18 | _C_long int64
19 | _C_long_long int64
20 | )
21 |
22 | type utmp struct {
23 | Type int16
24 | Pad_cgo_0 [2]byte
25 | Pid int32
26 | Line [32]int8
27 | Id [4]int8
28 | User [32]int8
29 | Host [256]int8
30 | Exit exit_status
31 | Session int32
32 | Tv timeval
33 | Addr_v6 [4]int32
34 | X__glibc_reserved [20]int8
35 | }
36 | type exit_status struct {
37 | Termination int16
38 | Exit int16
39 | }
40 | type timeval struct {
41 | Sec int64
42 | Usec int64
43 | }
44 |
--------------------------------------------------------------------------------
/vendor/github.com/shirou/gopsutil/host/host_linux_ppc64le.go:
--------------------------------------------------------------------------------
1 | // +build linux
2 | // +build ppc64le
3 | // Created by cgo -godefs - DO NOT EDIT
4 | // cgo -godefs types_linux.go
5 |
6 | package host
7 |
8 | const (
9 | sizeofPtr = 0x8
10 | sizeofShort = 0x2
11 | sizeofInt = 0x4
12 | sizeofLong = 0x8
13 | sizeofLongLong = 0x8
14 | sizeOfUtmp = 0x180
15 | )
16 |
17 | type (
18 | _C_short int16
19 | _C_int int32
20 | _C_long int64
21 | _C_long_long int64
22 | )
23 |
24 | type utmp struct {
25 | Type int16
26 | Pad_cgo_0 [2]byte
27 | Pid int32
28 | Line [32]int8
29 | Id [4]int8
30 | User [32]int8
31 | Host [256]int8
32 | Exit exit_status
33 | Session int32
34 | Tv timeval
35 | Addr_v6 [4]int32
36 | X__glibc_reserved [20]int8
37 | }
38 | type exit_status struct {
39 | Termination int16
40 | Exit int16
41 | }
42 | type timeval struct {
43 | Sec int64
44 | Usec int64
45 | }
46 |
--------------------------------------------------------------------------------
/vendor/github.com/shirou/gopsutil/host/types_darwin.go:
--------------------------------------------------------------------------------
1 | // +build ignore
2 | // plus hand editing about timeval
3 |
4 | /*
5 | Input to cgo -godefs.
6 | */
7 |
8 | package host
9 |
10 | /*
11 | #include
12 | #include
13 | */
14 | import "C"
15 |
16 | type Utmpx C.struct_utmpx
17 | type Timeval C.struct_timeval
18 |
--------------------------------------------------------------------------------
/vendor/github.com/shirou/gopsutil/host/types_freebsd.go:
--------------------------------------------------------------------------------
1 | // +build ignore
2 |
3 | /*
4 | Input to cgo -godefs.
5 | */
6 |
7 | package host
8 |
9 | /*
10 | #define KERNEL
11 | #include
12 | #include
13 | #include
14 |
15 | enum {
16 | sizeofPtr = sizeof(void*),
17 | };
18 |
19 | */
20 | import "C"
21 |
22 | // Machine characteristics; for internal use.
23 |
24 | const (
25 | sizeofPtr = C.sizeofPtr
26 | sizeofShort = C.sizeof_short
27 | sizeofInt = C.sizeof_int
28 | sizeofLong = C.sizeof_long
29 | sizeofLongLong = C.sizeof_longlong
30 | sizeOfUtmpx = C.sizeof_struct_utmpx
31 | )
32 |
33 | // Basic types
34 |
35 | type (
36 | _C_short C.short
37 | _C_int C.int
38 | _C_long C.long
39 | _C_long_long C.longlong
40 | )
41 |
42 | type Utmp C.struct_utmp
43 | type Utmpx C.struct_utmpx
44 | type Timeval C.struct_timeval
45 |
--------------------------------------------------------------------------------
/vendor/github.com/shirou/gopsutil/host/types_linux.go:
--------------------------------------------------------------------------------
1 | // +build ignore
2 |
3 | /*
4 | Input to cgo -godefs.
5 | */
6 |
7 | package host
8 |
9 | /*
10 | #include
11 | #include
12 |
13 | enum {
14 | sizeofPtr = sizeof(void*),
15 | };
16 |
17 | */
18 | import "C"
19 |
20 | // Machine characteristics; for internal use.
21 |
22 | const (
23 | sizeofPtr = C.sizeofPtr
24 | sizeofShort = C.sizeof_short
25 | sizeofInt = C.sizeof_int
26 | sizeofLong = C.sizeof_long
27 | sizeofLongLong = C.sizeof_longlong
28 | sizeOfUtmp = C.sizeof_struct_utmp
29 | )
30 |
31 | // Basic types
32 |
33 | type (
34 | _C_short C.short
35 | _C_int C.int
36 | _C_long C.long
37 | _C_long_long C.longlong
38 | )
39 |
40 | type utmp C.struct_utmp
41 | type exit_status C.struct_exit_status
42 | type timeval C.struct_timeval
43 |
--------------------------------------------------------------------------------
/vendor/github.com/shirou/gopsutil/internal/common/common_linux.go:
--------------------------------------------------------------------------------
1 | // +build linux
2 |
3 | package common
4 |
5 | import (
6 | "os"
7 | "os/exec"
8 | "strings"
9 | )
10 |
11 | func DoSysctrl(mib string) ([]string, error) {
12 | err := os.Setenv("LC_ALL", "C")
13 | if err != nil {
14 | return []string{}, err
15 | }
16 | sysctl, err := exec.LookPath("/sbin/sysctl")
17 | if err != nil {
18 | return []string{}, err
19 | }
20 | out, err := exec.Command(sysctl, "-n", mib).Output()
21 | if err != nil {
22 | return []string{}, err
23 | }
24 | v := strings.Replace(string(out), "{ ", "", 1)
25 | v = strings.Replace(string(v), " }", "", 1)
26 | values := strings.Fields(string(v))
27 |
28 | return values, nil
29 | }
30 |
31 | func NumProcs() (uint64, error) {
32 | f, err := os.Open(HostProc())
33 | if err != nil {
34 | return 0, err
35 | }
36 |
37 | list, err := f.Readdir(-1)
38 | defer f.Close()
39 | if err != nil {
40 | return 0, err
41 | }
42 | return uint64(len(list)), err
43 | }
44 |
--------------------------------------------------------------------------------
/vendor/github.com/shirou/gopsutil/load/load.go:
--------------------------------------------------------------------------------
1 | package load
2 |
3 | import (
4 | "encoding/json"
5 |
6 | "github.com/shirou/gopsutil/internal/common"
7 | )
8 |
9 | var invoke common.Invoker
10 |
11 | func init() {
12 | invoke = common.Invoke{}
13 | }
14 |
15 | type AvgStat struct {
16 | Load1 float64 `json:"load1"`
17 | Load5 float64 `json:"load5"`
18 | Load15 float64 `json:"load15"`
19 | }
20 |
21 | func (l AvgStat) String() string {
22 | s, _ := json.Marshal(l)
23 | return string(s)
24 | }
25 |
26 | type MiscStat struct {
27 | ProcsRunning int `json:"procsRunning"`
28 | ProcsBlocked int `json:"procsBlocked"`
29 | Ctxt int `json:"ctxt"`
30 | }
31 |
32 | func (m MiscStat) String() string {
33 | s, _ := json.Marshal(m)
34 | return string(s)
35 | }
36 |
--------------------------------------------------------------------------------
/vendor/github.com/shirou/gopsutil/load/load_fallback.go:
--------------------------------------------------------------------------------
1 | // +build !darwin,!linux,!freebsd,!windows
2 |
3 | package load
4 |
5 | import "github.com/shirou/gopsutil/internal/common"
6 |
7 | func Avg() (*AvgStat, error) {
8 | return nil, common.ErrNotImplementedError
9 | }
10 |
11 | func Misc() (*MiscStat, error) {
12 | return nil, common.ErrNotImplementedError
13 | }
14 |
--------------------------------------------------------------------------------
/vendor/github.com/shirou/gopsutil/load/load_windows.go:
--------------------------------------------------------------------------------
1 | // +build windows
2 |
3 | package load
4 |
5 | import (
6 | "github.com/shirou/gopsutil/internal/common"
7 | )
8 |
9 | func Avg() (*AvgStat, error) {
10 | ret := AvgStat{}
11 |
12 | return &ret, common.ErrNotImplementedError
13 | }
14 |
15 | func Misc() (*MiscStat, error) {
16 | ret := MiscStat{}
17 |
18 | return &ret, common.ErrNotImplementedError
19 | }
20 |
--------------------------------------------------------------------------------
/vendor/github.com/shirou/gopsutil/mem/mem_fallback.go:
--------------------------------------------------------------------------------
1 | // +build !darwin,!linux,!freebsd,!windows
2 |
3 | package mem
4 |
5 | import "github.com/shirou/gopsutil/internal/common"
6 |
7 | func VirtualMemory() (*VirtualMemoryStat, error) {
8 | return nil, common.ErrNotImplementedError
9 | }
10 |
11 | func SwapMemory() (*SwapMemoryStat, error) {
12 | return nil, common.ErrNotImplementedError
13 | }
14 |
--------------------------------------------------------------------------------
/vendor/github.com/shirou/gopsutil/net/net_fallback.go:
--------------------------------------------------------------------------------
1 | // +build !darwin,!linux,!freebsd,!windows
2 |
3 | package net
4 |
5 | import "github.com/shirou/gopsutil/internal/common"
6 |
7 | func IOCounters(pernic bool) ([]IOCountersStat, error) {
8 | return []IOCountersStat{}, common.ErrNotImplementedError
9 | }
10 |
11 | func FilterCounters() ([]FilterStat, error) {
12 | return []FilterStat{}, common.ErrNotImplementedError
13 | }
14 |
15 | func ProtoCounters(protocols []string) ([]ProtoCountersStat, error) {
16 | return []ProtoCountersStat{}, common.ErrNotImplementedError
17 | }
18 |
19 | func Connections(kind string) ([]ConnectionStat, error) {
20 | return []ConnectionStat{}, common.ErrNotImplementedError
21 | }
22 |
--------------------------------------------------------------------------------
/vendor/github.com/shirou/gopsutil/process/process_linux_386.go:
--------------------------------------------------------------------------------
1 | // +build linux
2 | // +build 386
3 |
4 | package process
5 |
6 | const (
7 | ClockTicks = 100 // C.sysconf(C._SC_CLK_TCK)
8 | )
9 |
--------------------------------------------------------------------------------
/vendor/github.com/shirou/gopsutil/process/process_linux_amd64.go:
--------------------------------------------------------------------------------
1 | // +build linux
2 | // +build amd64
3 |
4 | package process
5 |
6 | const (
7 | ClockTicks = 100 // C.sysconf(C._SC_CLK_TCK)
8 | )
9 |
--------------------------------------------------------------------------------
/vendor/github.com/shirou/gopsutil/process/process_linux_arm.go:
--------------------------------------------------------------------------------
1 | // +build linux
2 | // +build arm
3 |
4 | package process
5 |
6 | const (
7 | ClockTicks = 100 // C.sysconf(C._SC_CLK_TCK)
8 | )
9 |
--------------------------------------------------------------------------------
/vendor/github.com/shirou/gopsutil/process/process_linux_arm64.go:
--------------------------------------------------------------------------------
1 | // +build linux
2 | // +build arm64
3 |
4 | package process
5 |
6 | const (
7 | ClockTicks = 100 // C.sysconf(C._SC_CLK_TCK)
8 | )
9 |
--------------------------------------------------------------------------------
/vendor/github.com/shirou/gopsutil/process/process_windows_386.go:
--------------------------------------------------------------------------------
1 | // +build windows
2 |
3 | package process
4 |
5 | type PROCESS_MEMORY_COUNTERS struct {
6 | CB uint32
7 | PageFaultCount uint32
8 | PeakWorkingSetSize uint32
9 | WorkingSetSize uint32
10 | QuotaPeakPagedPoolUsage uint32
11 | QuotaPagedPoolUsage uint32
12 | QuotaPeakNonPagedPoolUsage uint32
13 | QuotaNonPagedPoolUsage uint32
14 | PagefileUsage uint32
15 | PeakPagefileUsage uint32
16 | }
17 |
--------------------------------------------------------------------------------
/vendor/github.com/shirou/gopsutil/process/process_windows_amd64.go:
--------------------------------------------------------------------------------
1 | // +build windows
2 |
3 | package process
4 |
5 | type PROCESS_MEMORY_COUNTERS struct {
6 | CB uint32
7 | PageFaultCount uint32
8 | PeakWorkingSetSize uint64
9 | WorkingSetSize uint64
10 | QuotaPeakPagedPoolUsage uint64
11 | QuotaPagedPoolUsage uint64
12 | QuotaPeakNonPagedPoolUsage uint64
13 | QuotaNonPagedPoolUsage uint64
14 | PagefileUsage uint64
15 | PeakPagefileUsage uint64
16 | }
17 |
--------------------------------------------------------------------------------
/vendor/github.com/shirou/w32/AUTHORS:
--------------------------------------------------------------------------------
1 | # This is the official list of 'w32' authors for copyright purposes.
2 |
3 | # Names should be added to this file as
4 | # Name or Organization
5 | # The email address is not required for organizations.
6 |
7 | # Please keep the list sorted.
8 |
9 | # Contributors
10 | # ============
11 |
12 | Allen Dang
13 | Benny Siegert
14 | Bruno Bigras
15 | Gerald Rosenberg
16 | Michael Henke
--------------------------------------------------------------------------------
/vendor/github.com/shirou/w32/README.md:
--------------------------------------------------------------------------------
1 | About w32
2 | ==========
3 |
4 | w32 is a wrapper of windows apis for the Go Programming Language.
5 |
6 | It wraps win32 apis to "Go style" to make them easier to use.
7 |
8 | Setup
9 | =====
10 |
11 | 1. Make sure you have a working Go installation and build environment,
12 | see this go-nuts post for details:
13 | http://groups.google.com/group/golang-nuts/msg/5c87630a84f4fd0c
14 |
15 | Updated versions of the Windows Go build are available here:
16 | http://code.google.com/p/gomingw/downloads/list
17 |
18 | 2. Create a "gopath" directory if you do not have one yet and set the
19 | GOPATH variable accordingly. For example:
20 | mkdir -p go-externals/src
21 | export GOPATH=${PWD}/go-externals
22 |
23 | 3. go get github.com/AllenDang/w32
24 |
25 | 4. go install github.com/AllenDang/w32...
26 |
27 | Contribute
28 | ==========
29 |
30 | Contributions in form of design, code, documentation, bug reporting or other
31 | ways you see fit are very welcome.
32 |
33 | Thank You!
34 |
--------------------------------------------------------------------------------
/vendor/github.com/shirou/w32/comdlg32.go:
--------------------------------------------------------------------------------
1 | // Copyright 2010-2012 The W32 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 w32
6 |
7 | import (
8 | "syscall"
9 | "unsafe"
10 | )
11 |
12 | var (
13 | modcomdlg32 = syscall.NewLazyDLL("comdlg32.dll")
14 |
15 | procGetSaveFileName = modcomdlg32.NewProc("GetSaveFileNameW")
16 | procGetOpenFileName = modcomdlg32.NewProc("GetOpenFileNameW")
17 | procCommDlgExtendedError = modcomdlg32.NewProc("CommDlgExtendedError")
18 | )
19 |
20 | func GetOpenFileName(ofn *OPENFILENAME) bool {
21 | ret, _, _ := procGetOpenFileName.Call(
22 | uintptr(unsafe.Pointer(ofn)))
23 |
24 | return ret != 0
25 | }
26 |
27 | func GetSaveFileName(ofn *OPENFILENAME) bool {
28 | ret, _, _ := procGetSaveFileName.Call(
29 | uintptr(unsafe.Pointer(ofn)))
30 |
31 | return ret != 0
32 | }
33 |
34 | func CommDlgExtendedError() uint {
35 | ret, _, _ := procCommDlgExtendedError.Call()
36 |
37 | return uint(ret)
38 | }
39 |
--------------------------------------------------------------------------------
/vendor/github.com/shirou/w32/idispatch.go:
--------------------------------------------------------------------------------
1 | // Copyright 2010-2012 The W32 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 w32
6 |
7 | import (
8 | "unsafe"
9 | )
10 |
11 | type pIDispatchVtbl struct {
12 | pQueryInterface uintptr
13 | pAddRef uintptr
14 | pRelease uintptr
15 | pGetTypeInfoCount uintptr
16 | pGetTypeInfo uintptr
17 | pGetIDsOfNames uintptr
18 | pInvoke uintptr
19 | }
20 |
21 | type IDispatch struct {
22 | lpVtbl *pIDispatchVtbl
23 | }
24 |
25 | func (this *IDispatch) QueryInterface(id *GUID) *IDispatch {
26 | return ComQueryInterface((*IUnknown)(unsafe.Pointer(this)), id)
27 | }
28 |
29 | func (this *IDispatch) AddRef() int32 {
30 | return ComAddRef((*IUnknown)(unsafe.Pointer(this)))
31 | }
32 |
33 | func (this *IDispatch) Release() int32 {
34 | return ComRelease((*IUnknown)(unsafe.Pointer(this)))
35 | }
36 |
37 | func (this *IDispatch) GetIDsOfName(names []string) []int32 {
38 | return ComGetIDsOfName(this, names)
39 | }
40 |
41 | func (this *IDispatch) Invoke(dispid int32, dispatch int16, params ...interface{}) *VARIANT {
42 | return ComInvoke(this, dispid, dispatch, params...)
43 | }
44 |
--------------------------------------------------------------------------------
/vendor/github.com/shirou/w32/istream.go:
--------------------------------------------------------------------------------
1 | // Copyright 2010-2012 The W32 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 w32
6 |
7 | import (
8 | "unsafe"
9 | )
10 |
11 | type pIStreamVtbl struct {
12 | pQueryInterface uintptr
13 | pAddRef uintptr
14 | pRelease uintptr
15 | }
16 |
17 | type IStream struct {
18 | lpVtbl *pIStreamVtbl
19 | }
20 |
21 | func (this *IStream) QueryInterface(id *GUID) *IDispatch {
22 | return ComQueryInterface((*IUnknown)(unsafe.Pointer(this)), id)
23 | }
24 |
25 | func (this *IStream) AddRef() int32 {
26 | return ComAddRef((*IUnknown)(unsafe.Pointer(this)))
27 | }
28 |
29 | func (this *IStream) Release() int32 {
30 | return ComRelease((*IUnknown)(unsafe.Pointer(this)))
31 | }
32 |
--------------------------------------------------------------------------------
/vendor/github.com/shirou/w32/iunknown.go:
--------------------------------------------------------------------------------
1 | // Copyright 2010-2012 The W32 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 w32
6 |
7 | type pIUnknownVtbl struct {
8 | pQueryInterface uintptr
9 | pAddRef uintptr
10 | pRelease uintptr
11 | }
12 |
13 | type IUnknown struct {
14 | lpVtbl *pIUnknownVtbl
15 | }
16 |
17 | func (this *IUnknown) QueryInterface(id *GUID) *IDispatch {
18 | return ComQueryInterface(this, id)
19 | }
20 |
21 | func (this *IUnknown) AddRef() int32 {
22 | return ComAddRef(this)
23 | }
24 |
25 | func (this *IUnknown) Release() int32 {
26 | return ComRelease(this)
27 | }
28 |
--------------------------------------------------------------------------------
/vendor/github.com/shirou/w32/psapi.go:
--------------------------------------------------------------------------------
1 | // Copyright 2010-2012 The W32 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 w32
6 |
7 | import (
8 | "syscall"
9 | "unsafe"
10 | )
11 |
12 | var (
13 | modpsapi = syscall.NewLazyDLL("psapi.dll")
14 |
15 | procEnumProcesses = modpsapi.NewProc("EnumProcesses")
16 | )
17 |
18 | func EnumProcesses(processIds []uint32, cb uint32, bytesReturned *uint32) bool {
19 | ret, _, _ := procEnumProcesses.Call(
20 | uintptr(unsafe.Pointer(&processIds[0])),
21 | uintptr(cb),
22 | uintptr(unsafe.Pointer(bytesReturned)))
23 |
24 | return ret != 0
25 | }
26 |
--------------------------------------------------------------------------------
/vendor/github.com/shirou/w32/vars.go:
--------------------------------------------------------------------------------
1 | // Copyright 2010-2012 The W32 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 w32
6 |
7 | var (
8 | IID_NULL = &GUID{0x00000000, 0x0000, 0x0000, [8]byte{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}}
9 | IID_IUnknown = &GUID{0x00000000, 0x0000, 0x0000, [8]byte{0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46}}
10 | IID_IDispatch = &GUID{0x00020400, 0x0000, 0x0000, [8]byte{0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46}}
11 | IID_IConnectionPointContainer = &GUID{0xB196B284, 0xBAB4, 0x101A, [8]byte{0xB6, 0x9C, 0x00, 0xAA, 0x00, 0x34, 0x1D, 0x07}}
12 | IID_IConnectionPoint = &GUID{0xB196B286, 0xBAB4, 0x101A, [8]byte{0xB6, 0x9C, 0x00, 0xAA, 0x00, 0x34, 0x1D, 0x07}}
13 | )
14 |
--------------------------------------------------------------------------------
/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 https://tip.golang.org/AUTHORS.
4 |
--------------------------------------------------------------------------------
/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 https://tip.golang.org/CONTRIBUTORS.
4 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/crypto/acme/version_go112.go:
--------------------------------------------------------------------------------
1 | // Copyright 2019 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.12
6 |
7 | package acme
8 |
9 | import "runtime/debug"
10 |
11 | func init() {
12 | // Set packageVersion if the binary was built in modules mode and x/crypto
13 | // was not replaced with a different module.
14 | info, ok := debug.ReadBuildInfo()
15 | if !ok {
16 | return
17 | }
18 | for _, m := range info.Deps {
19 | if m.Path != "golang.org/x/crypto" {
20 | continue
21 | }
22 | if m.Replace == nil {
23 | packageVersion = m.Version
24 | }
25 | break
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/crypto/bcrypt/base64.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 bcrypt
6 |
7 | import "encoding/base64"
8 |
9 | const alphabet = "./ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"
10 |
11 | var bcEncoding = base64.NewEncoding(alphabet)
12 |
13 | func base64Encode(src []byte) []byte {
14 | n := bcEncoding.EncodedLen(len(src))
15 | dst := make([]byte, n)
16 | bcEncoding.Encode(dst, src)
17 | for dst[n-1] == '=' {
18 | n--
19 | }
20 | return dst[:n]
21 | }
22 |
23 | func base64Decode(src []byte) ([]byte, error) {
24 | numOfEquals := 4 - (len(src) % 4)
25 | for i := 0; i < numOfEquals; i++ {
26 | src = append(src, '=')
27 | }
28 |
29 | dst := make([]byte, bcEncoding.DecodedLen(len(src)))
30 | n, err := bcEncoding.Decode(dst, src)
31 | if err != nil {
32 | return nil, err
33 | }
34 | return dst[:n], nil
35 | }
36 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/net/AUTHORS:
--------------------------------------------------------------------------------
1 | # This source code refers to The Go Authors for copyright purposes.
2 | # The master list of authors is in the main Go distribution,
3 | # visible at http://tip.golang.org/AUTHORS.
4 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/net/CONTRIBUTORS:
--------------------------------------------------------------------------------
1 | # This source code was written by the Go contributors.
2 | # The master list of contributors is in the main Go distribution,
3 | # visible at http://tip.golang.org/CONTRIBUTORS.
4 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/net/context/go19.go:
--------------------------------------------------------------------------------
1 | // Copyright 2017 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build go1.9
6 |
7 | package context
8 |
9 | import "context" // standard library's context, as of Go 1.7
10 |
11 | // A Context carries a deadline, a cancelation signal, and other values across
12 | // API boundaries.
13 | //
14 | // Context's methods may be called by multiple goroutines simultaneously.
15 | type Context = context.Context
16 |
17 | // A CancelFunc tells an operation to abandon its work.
18 | // A CancelFunc does not wait for the work to stop.
19 | // After the first call, subsequent calls to a CancelFunc do nothing.
20 | type CancelFunc = context.CancelFunc
21 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/net/idna/foo.txt:
--------------------------------------------------------------------------------
1 | Creating new dir.
2 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/.gitignore:
--------------------------------------------------------------------------------
1 | _obj/
2 |
--------------------------------------------------------------------------------
/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/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 <){
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/gopkg.in/alecthomas/kingpin.v2/.travis.yml:
--------------------------------------------------------------------------------
1 | sudo: false
2 | language: go
3 | install: go get -t -v ./...
4 | go: 1.2
5 |
--------------------------------------------------------------------------------
/vendor/gopkg.in/alecthomas/kingpin.v2/COPYING:
--------------------------------------------------------------------------------
1 | Copyright (C) 2014 Alec Thomas
2 |
3 | Permission is hereby granted, free of charge, to any person obtaining a copy of
4 | this software and associated documentation files (the "Software"), to deal in
5 | the Software without restriction, including without limitation the rights to
6 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
7 | of the Software, and to permit persons to whom the Software is furnished to do
8 | so, subject to the following conditions:
9 |
10 | The above copyright notice and this permission notice shall be included in all
11 | copies or substantial portions of the Software.
12 |
13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
19 | SOFTWARE.
20 |
--------------------------------------------------------------------------------
/vendor/gopkg.in/alecthomas/kingpin.v2/actions.go:
--------------------------------------------------------------------------------
1 | package kingpin
2 |
3 | // Action callback executed at various stages after all values are populated.
4 | // The application, commands, arguments and flags all have corresponding
5 | // actions.
6 | type Action func(*ParseContext) error
7 |
8 | type actionMixin struct {
9 | actions []Action
10 | preActions []Action
11 | }
12 |
13 | type actionApplier interface {
14 | applyActions(*ParseContext) error
15 | applyPreActions(*ParseContext) error
16 | }
17 |
18 | func (a *actionMixin) addAction(action Action) {
19 | a.actions = append(a.actions, action)
20 | }
21 |
22 | func (a *actionMixin) addPreAction(action Action) {
23 | a.preActions = append(a.preActions, action)
24 | }
25 |
26 | func (a *actionMixin) applyActions(context *ParseContext) error {
27 | for _, action := range a.actions {
28 | if err := action(context); err != nil {
29 | return err
30 | }
31 | }
32 | return nil
33 | }
34 |
35 | func (a *actionMixin) applyPreActions(context *ParseContext) error {
36 | for _, preAction := range a.preActions {
37 | if err := preAction(context); err != nil {
38 | return err
39 | }
40 | }
41 | return nil
42 | }
43 |
--------------------------------------------------------------------------------
/vendor/gopkg.in/alecthomas/kingpin.v2/completions.go:
--------------------------------------------------------------------------------
1 | package kingpin
2 |
3 | // HintAction is a function type who is expected to return a slice of possible
4 | // command line arguments.
5 | type HintAction func() []string
6 | type completionsMixin struct {
7 | hintActions []HintAction
8 | builtinHintActions []HintAction
9 | }
10 |
11 | func (a *completionsMixin) addHintAction(action HintAction) {
12 | a.hintActions = append(a.hintActions, action)
13 | }
14 |
15 | // Allow adding of HintActions which are added internally, ie, EnumVar
16 | func (a *completionsMixin) addHintActionBuiltin(action HintAction) {
17 | a.builtinHintActions = append(a.builtinHintActions, action)
18 | }
19 |
20 | func (a *completionsMixin) resolveCompletions() []string {
21 | var hints []string
22 |
23 | options := a.builtinHintActions
24 | if len(a.hintActions) > 0 {
25 | // User specified their own hintActions. Use those instead.
26 | options = a.hintActions
27 | }
28 |
29 | for _, hintAction := range options {
30 | hints = append(hints, hintAction()...)
31 | }
32 | return hints
33 | }
34 |
--------------------------------------------------------------------------------
/vendor/gopkg.in/alecthomas/kingpin.v2/envar.go:
--------------------------------------------------------------------------------
1 | package kingpin
2 |
3 | import (
4 | "os"
5 | "regexp"
6 | )
7 |
8 | var (
9 | envVarValuesSeparator = "\r?\n"
10 | envVarValuesTrimmer = regexp.MustCompile(envVarValuesSeparator + "$")
11 | envVarValuesSplitter = regexp.MustCompile(envVarValuesSeparator)
12 | )
13 |
14 | type envarMixin struct {
15 | envar string
16 | noEnvar bool
17 | }
18 |
19 | func (e *envarMixin) HasEnvarValue() bool {
20 | return e.GetEnvarValue() != ""
21 | }
22 |
23 | func (e *envarMixin) GetEnvarValue() string {
24 | if e.noEnvar || e.envar == "" {
25 | return ""
26 | }
27 | return os.Getenv(e.envar)
28 | }
29 |
30 | func (e *envarMixin) GetSplitEnvarValue() []string {
31 | values := make([]string, 0)
32 |
33 | envarValue := e.GetEnvarValue()
34 | if envarValue == "" {
35 | return values
36 | }
37 |
38 | // Split by new line to extract multiple values, if any.
39 | trimmed := envVarValuesTrimmer.ReplaceAllString(envarValue, "")
40 | for _, value := range envVarValuesSplitter.Split(trimmed, -1) {
41 | values = append(values, value)
42 | }
43 |
44 | return values
45 | }
46 |
--------------------------------------------------------------------------------
/vendor/gopkg.in/alecthomas/kingpin.v2/guesswidth.go:
--------------------------------------------------------------------------------
1 | // +build appengine !linux,!freebsd,!darwin,!dragonfly,!netbsd,!openbsd
2 |
3 | package kingpin
4 |
5 | import "io"
6 |
7 | func guessWidth(w io.Writer) int {
8 | return 80
9 | }
10 |
--------------------------------------------------------------------------------
/vendor/gopkg.in/alecthomas/kingpin.v2/guesswidth_unix.go:
--------------------------------------------------------------------------------
1 | // +build !appengine,linux freebsd darwin dragonfly netbsd openbsd
2 |
3 | package kingpin
4 |
5 | import (
6 | "io"
7 | "os"
8 | "strconv"
9 | "syscall"
10 | "unsafe"
11 | )
12 |
13 | func guessWidth(w io.Writer) int {
14 | // check if COLUMNS env is set to comply with
15 | // http://pubs.opengroup.org/onlinepubs/009604499/basedefs/xbd_chap08.html
16 | colsStr := os.Getenv("COLUMNS")
17 | if colsStr != "" {
18 | if cols, err := strconv.Atoi(colsStr); err == nil {
19 | return cols
20 | }
21 | }
22 |
23 | if t, ok := w.(*os.File); ok {
24 | fd := t.Fd()
25 | var dimensions [4]uint16
26 |
27 | if _, _, err := syscall.Syscall6(
28 | syscall.SYS_IOCTL,
29 | uintptr(fd),
30 | uintptr(syscall.TIOCGWINSZ),
31 | uintptr(unsafe.Pointer(&dimensions)),
32 | 0, 0, 0,
33 | ); err == 0 {
34 | return int(dimensions[1])
35 | }
36 | }
37 | return 80
38 | }
39 |
--------------------------------------------------------------------------------