├── .dockerignore ├── .editorconfig ├── .gitignore ├── CHANGELOG.md ├── CONTRIBUTING.md ├── Dockerfile ├── Godeps ├── Godeps.json └── Readme ├── Gruntfile.js ├── LICENSE ├── Makefile ├── README.md ├── build ├── certs │ └── .gitkeep ├── conf.d │ └── upstream.conf └── sites-enabled │ └── kanban.conf ├── cmd └── daemon.go ├── conf └── config.toml ├── datasource ├── datasource.go └── gitlab │ ├── board.go │ ├── card.go │ ├── comment.go │ ├── datasource.go │ ├── file.go │ ├── labels.go │ ├── milestone.go │ └── user.go ├── docker-compose.yml ├── docs ├── README.md ├── configuration │ ├── README.md │ └── webserver │ │ ├── README.md │ │ ├── apache │ │ ├── README.md │ │ └── apache.conf │ │ └── nginx │ │ ├── README.md │ │ └── nginx.conf ├── contributing │ └── README.md ├── installation │ ├── README.md │ ├── binary.md │ ├── docker.md │ └── gitlab_oauth │ │ ├── applications.jpg │ │ ├── create_desc.jpg │ │ ├── create_success_alt.jpg │ │ └── login_with_oauth_alt.jpg └── usage │ ├── README.md │ └── customize-columns.md ├── main.go ├── models ├── board.go ├── card.go ├── comment.go ├── error.go ├── event.go ├── file.go ├── label.go ├── login.go ├── milestone.go ├── models.go ├── oauth2.go └── user.go ├── modules ├── auth │ ├── auth.go │ ├── auth_form.go │ └── user_form.go ├── gitlab │ ├── client.go │ ├── comment.go │ ├── file.go │ ├── issue.go │ ├── label.go │ ├── milestone.go │ ├── project.go │ ├── request.go │ └── user.go ├── middleware │ ├── auth.go │ ├── context.go │ └── datasource.go └── setting │ └── settings.go ├── package.json ├── routers ├── board │ ├── board.go │ ├── card.go │ ├── comment.go │ ├── file.go │ ├── label.go │ ├── milestone.go │ └── user.go ├── home.go └── user │ └── auth.go ├── src ├── board │ ├── board.module.js │ ├── components │ │ ├── action_bar.cmp.js │ │ ├── backlog.cmp.js │ │ ├── ll_label.cmp.js │ │ ├── md_editor.cmp.js │ │ └── user_avatar.cmp.js │ ├── controllers │ │ ├── board.ctrl.js │ │ ├── board.list.ctrl.js │ │ ├── card.create.ctrl.js │ │ ├── card.view.ctrl.js │ │ ├── configuration.ctrl.js │ │ ├── filter.ctrl.js │ │ ├── milestone.create.ctrl.js │ │ ├── settings.ctrl.js │ │ └── top_bar.ctrl.js │ ├── directives │ │ └── filter.drc.js │ ├── filters │ │ ├── color_luminance.filter.js │ │ ├── priority_name.filter.js │ │ ├── stagename.filter.js │ │ ├── text_color_for_bg.filter.js │ │ └── wiplimit.filter.js │ ├── models │ │ ├── board.model.js │ │ ├── card.model.js │ │ ├── card_priority.model.js │ │ ├── stage.model.js │ │ └── state.model.js │ ├── services │ │ ├── board.service.js │ │ ├── comment.service.js │ │ ├── label.service.js │ │ └── milestone.service.js │ └── views │ │ ├── action_bar.html │ │ ├── avatar.html │ │ ├── backlog.html │ │ ├── board │ │ ├── boards.html │ │ ├── cards.html │ │ └── configuration.html │ │ ├── card │ │ ├── create.html │ │ └── view.html │ │ ├── filter.html │ │ ├── index.html │ │ ├── label.html │ │ ├── md-editor.html │ │ ├── milestone │ │ └── create.html │ │ ├── settings.html │ │ ├── title.html │ │ └── top_bar.html ├── gitlabKBApp.module.js ├── markdown │ ├── directives │ │ └── markdown.drc.js │ ├── markdown.module.js │ ├── plugins │ │ ├── card-link.plugin.js │ │ ├── emoji.plugin.js │ │ ├── image.plugin.js │ │ ├── label.plugin.js │ │ ├── link-target-blank.plugin.js │ │ ├── merge-request.plugin.js │ │ ├── milestone-link.plugin.js │ │ └── user-link.plugin.js │ └── services │ │ └── markdown.service.js ├── modal │ ├── directives │ │ └── modal.drc.js │ ├── modal.module.js │ └── views │ │ └── modal.html ├── scss │ ├── _avatars.scss │ ├── _boards.scss │ ├── _card.scss │ ├── _datepicker.scss │ ├── _emoji.scss │ ├── _mdeditor.scss │ ├── _modal.scss │ ├── _settings.scss │ ├── _top-bar.scss │ └── app.scss ├── select │ ├── components │ │ ├── ll-select-clear.cmp.js │ │ ├── ll-select-option.js │ │ ├── ll-select-options.js │ │ ├── ll-select-search.cml.js │ │ ├── ll-select-selected.cmp.js │ │ ├── ll-select-title.cmp.js │ │ ├── ll-select.cmp.js │ │ └── ll-unselected.cmp.js │ ├── select.module.js │ └── views │ │ ├── clear.html │ │ ├── option.html │ │ ├── options.html │ │ ├── search.html │ │ ├── select.html │ │ ├── selected.html │ │ ├── title.html │ │ └── unselected.html ├── static │ └── images │ │ ├── favicons │ │ ├── android-chrome-144x144.png │ │ ├── android-chrome-192x192.png │ │ ├── android-chrome-36x36.png │ │ ├── android-chrome-48x48.png │ │ ├── android-chrome-72x72.png │ │ ├── android-chrome-96x96.png │ │ ├── apple-touch-icon-114x114.png │ │ ├── apple-touch-icon-120x120.png │ │ ├── apple-touch-icon-144x144.png │ │ ├── apple-touch-icon-152x152.png │ │ ├── apple-touch-icon-180x180.png │ │ ├── apple-touch-icon-57x57.png │ │ ├── apple-touch-icon-60x60.png │ │ ├── apple-touch-icon-72x72.png │ │ ├── apple-touch-icon-76x76.png │ │ ├── apple-touch-icon-precomposed.png │ │ ├── apple-touch-icon.png │ │ ├── favicon-16x16.png │ │ ├── favicon-194x194.png │ │ ├── favicon-32x32.png │ │ ├── favicon-96x96.png │ │ ├── favicon.ico │ │ ├── mstile-144x144.png │ │ ├── mstile-150x150.png │ │ ├── mstile-310x150.png │ │ ├── mstile-310x310.png │ │ ├── mstile-70x70.png │ │ └── safari-pinned-tab.svg │ │ └── gitlab-logo.svg ├── user │ ├── controllers │ │ ├── signin.ctrl.js │ │ └── signup.ctrl.js │ ├── services │ │ ├── auth.service.js │ │ └── user.service.js │ ├── user.module.js │ └── views │ │ ├── oauth.html │ │ ├── signin.html │ │ └── signup.html └── websocket │ ├── services │ └── websocket.service.js │ └── websocket.module.js ├── templates ├── index.html └── oauth.html ├── vendor ├── github.com │ ├── BurntSushi │ │ └── toml │ │ │ ├── .gitignore │ │ │ ├── .travis.yml │ │ │ ├── COMPATIBLE │ │ │ ├── COPYING │ │ │ ├── Makefile │ │ │ ├── README.md │ │ │ ├── cmd │ │ │ ├── toml-test-decoder │ │ │ │ ├── COPYING │ │ │ │ ├── README.md │ │ │ │ └── main.go │ │ │ ├── toml-test-encoder │ │ │ │ ├── COPYING │ │ │ │ ├── README.md │ │ │ │ └── main.go │ │ │ └── tomlv │ │ │ │ ├── COPYING │ │ │ │ ├── README.md │ │ │ │ └── main.go │ │ │ ├── decode.go │ │ │ ├── decode_meta.go │ │ │ ├── doc.go │ │ │ ├── encode.go │ │ │ ├── encoding_types.go │ │ │ ├── encoding_types_1.1.go │ │ │ ├── lex.go │ │ │ ├── parse.go │ │ │ ├── session.vim │ │ │ ├── type_check.go │ │ │ └── type_fields.go │ ├── Unknwon │ │ └── com │ │ │ ├── .gitignore │ │ │ ├── .travis.yml │ │ │ ├── LICENSE │ │ │ ├── README.md │ │ │ ├── cmd.go │ │ │ ├── convert.go │ │ │ ├── dir.go │ │ │ ├── file.go │ │ │ ├── html.go │ │ │ ├── http.go │ │ │ ├── math.go │ │ │ ├── path.go │ │ │ ├── regex.go │ │ │ ├── slice.go │ │ │ ├── string.go │ │ │ ├── time.go │ │ │ └── url.go │ ├── dgrijalva │ │ └── jwt-go │ │ │ ├── .gitignore │ │ │ ├── .travis.yml │ │ │ ├── LICENSE │ │ │ ├── README.md │ │ │ ├── VERSION_HISTORY.md │ │ │ ├── cmd │ │ │ └── jwt │ │ │ │ └── app.go │ │ │ ├── doc.go │ │ │ ├── ecdsa.go │ │ │ ├── ecdsa_utils.go │ │ │ ├── errors.go │ │ │ ├── hmac.go │ │ │ ├── parser.go │ │ │ ├── rsa.go │ │ │ ├── rsa_pss.go │ │ │ ├── rsa_utils.go │ │ │ ├── signing_method.go │ │ │ ├── test │ │ │ ├── ec256-private.pem │ │ │ ├── ec256-public.pem │ │ │ ├── ec384-private.pem │ │ │ ├── ec384-public.pem │ │ │ ├── ec512-private.pem │ │ │ ├── ec512-public.pem │ │ │ ├── hmacTestKey │ │ │ ├── sample_key │ │ │ └── sample_key.pub │ │ │ └── token.go │ ├── elazarl │ │ └── go-bindata-assetfs │ │ │ ├── LICENSE │ │ │ ├── README.md │ │ │ ├── assetfs.go │ │ │ ├── doc.go │ │ │ └── go-bindata-assetfs │ │ │ └── main.go │ ├── go-macaron │ │ ├── bindata │ │ │ ├── .travis.yml │ │ │ ├── LICENSE │ │ │ ├── README.md │ │ │ └── bindata.go │ │ ├── binding │ │ │ ├── .travis.yml │ │ │ ├── LICENSE │ │ │ ├── README.md │ │ │ ├── binding.go │ │ │ └── errors.go │ │ └── inject │ │ │ ├── .travis.yml │ │ │ ├── LICENSE │ │ │ ├── README.md │ │ │ └── inject.go │ ├── google │ │ └── go-querystring │ │ │ ├── LICENSE │ │ │ └── query │ │ │ └── encode.go │ ├── gorilla │ │ └── websocket │ │ │ ├── .gitignore │ │ │ ├── .travis.yml │ │ │ ├── AUTHORS │ │ │ ├── LICENSE │ │ │ ├── README.md │ │ │ ├── client.go │ │ │ ├── conn.go │ │ │ ├── doc.go │ │ │ ├── examples │ │ │ ├── autobahn │ │ │ │ ├── README.md │ │ │ │ ├── fuzzingclient.json │ │ │ │ └── server.go │ │ │ ├── chat │ │ │ │ ├── README.md │ │ │ │ ├── conn.go │ │ │ │ ├── home.html │ │ │ │ ├── hub.go │ │ │ │ └── main.go │ │ │ ├── command │ │ │ │ ├── README.md │ │ │ │ ├── home.html │ │ │ │ └── main.go │ │ │ ├── echo │ │ │ │ ├── README.md │ │ │ │ ├── client.go │ │ │ │ └── server.go │ │ │ └── filewatch │ │ │ │ ├── README.md │ │ │ │ └── main.go │ │ │ ├── json.go │ │ │ ├── server.go │ │ │ └── util.go │ ├── hashicorp │ │ └── hcl │ │ │ ├── .gitignore │ │ │ ├── .travis.yml │ │ │ ├── LICENSE │ │ │ ├── Makefile │ │ │ ├── README.md │ │ │ ├── decoder.go │ │ │ ├── hcl.go │ │ │ ├── hcl │ │ │ ├── ast │ │ │ │ ├── ast.go │ │ │ │ └── walk.go │ │ │ ├── parser │ │ │ │ ├── error.go │ │ │ │ ├── parser.go │ │ │ │ └── test-fixtures │ │ │ │ │ ├── array_comment.hcl │ │ │ │ │ ├── array_comment_2.hcl │ │ │ │ │ ├── assign_colon.hcl │ │ │ │ │ ├── assign_deep.hcl │ │ │ │ │ ├── comment.hcl │ │ │ │ │ ├── comment_lastline.hcl │ │ │ │ │ ├── comment_single.hcl │ │ │ │ │ ├── complex.hcl │ │ │ │ │ ├── complex_key.hcl │ │ │ │ │ ├── empty.hcl │ │ │ │ │ ├── list.hcl │ │ │ │ │ ├── list_comma.hcl │ │ │ │ │ ├── missing_braces.hcl │ │ │ │ │ ├── multiple.hcl │ │ │ │ │ ├── old.hcl │ │ │ │ │ ├── structure.hcl │ │ │ │ │ ├── structure_basic.hcl │ │ │ │ │ ├── structure_empty.hcl │ │ │ │ │ └── types.hcl │ │ │ ├── printer │ │ │ │ ├── nodes.go │ │ │ │ └── printer.go │ │ │ ├── scanner │ │ │ │ └── scanner.go │ │ │ ├── strconv │ │ │ │ └── quote.go │ │ │ ├── test-fixtures │ │ │ │ ├── array_comment.hcl │ │ │ │ ├── assign_colon.hcl │ │ │ │ ├── assign_deep.hcl │ │ │ │ ├── comment.hcl │ │ │ │ ├── comment_single.hcl │ │ │ │ ├── complex.hcl │ │ │ │ ├── complex_key.hcl │ │ │ │ ├── empty.hcl │ │ │ │ ├── list.hcl │ │ │ │ ├── list_comma.hcl │ │ │ │ ├── multiple.hcl │ │ │ │ ├── old.hcl │ │ │ │ ├── structure.hcl │ │ │ │ ├── structure_basic.hcl │ │ │ │ ├── structure_empty.hcl │ │ │ │ └── types.hcl │ │ │ └── token │ │ │ │ ├── position.go │ │ │ │ └── token.go │ │ │ ├── json │ │ │ ├── parser │ │ │ │ ├── flatten.go │ │ │ │ ├── parser.go │ │ │ │ └── test-fixtures │ │ │ │ │ ├── array.json │ │ │ │ │ ├── basic.json │ │ │ │ │ ├── object.json │ │ │ │ │ └── types.json │ │ │ ├── scanner │ │ │ │ └── scanner.go │ │ │ ├── test-fixtures │ │ │ │ ├── array.json │ │ │ │ ├── basic.json │ │ │ │ ├── object.json │ │ │ │ └── types.json │ │ │ └── token │ │ │ │ ├── position.go │ │ │ │ └── token.go │ │ │ ├── lex.go │ │ │ ├── parse.go │ │ │ └── test-fixtures │ │ │ ├── basic.hcl │ │ │ ├── basic.json │ │ │ ├── basic_int_string.hcl │ │ │ ├── basic_squish.hcl │ │ │ ├── decode_policy.hcl │ │ │ ├── decode_policy.json │ │ │ ├── decode_tf_variable.hcl │ │ │ ├── decode_tf_variable.json │ │ │ ├── empty.hcl │ │ │ ├── escape.hcl │ │ │ ├── flat.hcl │ │ │ ├── float.hcl │ │ │ ├── float.json │ │ │ ├── interpolate_escape.hcl │ │ │ ├── multiline.hcl │ │ │ ├── multiline.json │ │ │ ├── multiline_bad.hcl │ │ │ ├── multiline_no_eof.hcl │ │ │ ├── multiline_no_marker.hcl │ │ │ ├── nested_block_comment.hcl │ │ │ ├── object_list.json │ │ │ ├── scientific.hcl │ │ │ ├── scientific.json │ │ │ ├── slice_expand.hcl │ │ │ ├── structure.hcl │ │ │ ├── structure.json │ │ │ ├── structure2.hcl │ │ │ ├── structure2.json │ │ │ ├── structure_flat.json │ │ │ ├── structure_flatmap.hcl │ │ │ ├── structure_list.hcl │ │ │ ├── structure_list.json │ │ │ ├── structure_list_deep.json │ │ │ ├── structure_multi.hcl │ │ │ ├── structure_multi.json │ │ │ ├── terraform_heroku.hcl │ │ │ ├── terraform_heroku.json │ │ │ ├── tfvars.hcl │ │ │ └── unterminated_block_comment.hcl │ ├── inconshreveable │ │ └── mousetrap │ │ │ ├── LICENSE │ │ │ ├── README.md │ │ │ ├── trap_others.go │ │ │ ├── trap_windows.go │ │ │ └── trap_windows_1.4.go │ ├── kr │ │ ├── pretty │ │ │ ├── .gitignore │ │ │ ├── License │ │ │ ├── Readme │ │ │ ├── diff.go │ │ │ ├── formatter.go │ │ │ ├── pretty.go │ │ │ └── zero.go │ │ └── text │ │ │ ├── License │ │ │ ├── Readme │ │ │ ├── colwriter │ │ │ ├── Readme │ │ │ └── column.go │ │ │ ├── doc.go │ │ │ ├── indent.go │ │ │ ├── mc │ │ │ ├── Readme │ │ │ └── mc.go │ │ │ └── wrap.go │ ├── leanlabsio │ │ └── sockets │ │ │ ├── LICENSE │ │ │ ├── README.md │ │ │ └── sockets.go │ ├── magiconair │ │ └── properties │ │ │ ├── .gitignore │ │ │ ├── .travis.yml │ │ │ ├── CHANGELOG.md │ │ │ ├── LICENSE │ │ │ ├── README.md │ │ │ ├── decode.go │ │ │ ├── doc.go │ │ │ ├── lex.go │ │ │ ├── load.go │ │ │ ├── parser.go │ │ │ ├── properties.go │ │ │ └── rangecheck.go │ ├── mitchellh │ │ └── mapstructure │ │ │ ├── .travis.yml │ │ │ ├── LICENSE │ │ │ ├── README.md │ │ │ ├── decode_hooks.go │ │ │ ├── error.go │ │ │ └── mapstructure.go │ └── spf13 │ │ ├── cast │ │ ├── .gitignore │ │ ├── LICENSE │ │ ├── README.md │ │ ├── cast.go │ │ └── caste.go │ │ ├── cobra │ │ ├── .gitignore │ │ ├── .mailmap │ │ ├── .travis.yml │ │ ├── LICENSE.txt │ │ ├── README.md │ │ ├── bash_completions.go │ │ ├── bash_completions.md │ │ ├── cobra.go │ │ ├── cobra │ │ │ ├── cmd │ │ │ │ ├── add.go │ │ │ │ ├── helpers.go │ │ │ │ ├── init.go │ │ │ │ ├── licenses.go │ │ │ │ └── root.go │ │ │ └── main.go │ │ ├── command.go │ │ ├── command_notwin.go │ │ ├── command_win.go │ │ └── doc │ │ │ ├── man_docs.go │ │ │ ├── man_docs.md │ │ │ ├── md_docs.go │ │ │ ├── md_docs.md │ │ │ └── util.go │ │ ├── jwalterweatherman │ │ ├── .gitignore │ │ ├── LICENSE │ │ ├── README.md │ │ └── thatswhyyoualwaysleaveanote.go │ │ ├── pflag │ │ ├── .travis.yml │ │ ├── LICENSE │ │ ├── README.md │ │ ├── bool.go │ │ ├── count.go │ │ ├── duration.go │ │ ├── flag.go │ │ ├── float32.go │ │ ├── float64.go │ │ ├── golangflag.go │ │ ├── int.go │ │ ├── int32.go │ │ ├── int64.go │ │ ├── int8.go │ │ ├── int_slice.go │ │ ├── ip.go │ │ ├── ipmask.go │ │ ├── ipnet.go │ │ ├── string.go │ │ ├── string_slice.go │ │ ├── uint.go │ │ ├── uint16.go │ │ ├── uint32.go │ │ ├── uint64.go │ │ ├── uint8.go │ │ └── verify │ │ │ ├── all.sh │ │ │ ├── gofmt.sh │ │ │ └── golint.sh │ │ └── viper │ │ ├── .gitignore │ │ ├── .travis.yml │ │ ├── LICENSE │ │ ├── README.md │ │ ├── flags.go │ │ ├── remote │ │ └── remote.go │ │ ├── util.go │ │ └── viper.go ├── golang.org │ └── x │ │ ├── net │ │ ├── LICENSE │ │ ├── PATENTS │ │ └── context │ │ │ ├── context.go │ │ │ └── ctxhttp │ │ │ ├── cancelreq.go │ │ │ ├── cancelreq_go14.go │ │ │ └── ctxhttp.go │ │ └── oauth2 │ │ ├── .travis.yml │ │ ├── AUTHORS │ │ ├── CONTRIBUTING.md │ │ ├── CONTRIBUTORS │ │ ├── LICENSE │ │ ├── README.md │ │ ├── bitbucket │ │ └── bitbucket.go │ │ ├── client_appengine.go │ │ ├── clientcredentials │ │ └── clientcredentials.go │ │ ├── facebook │ │ └── facebook.go │ │ ├── github │ │ └── github.go │ │ ├── google │ │ ├── appengine.go │ │ ├── appengine_hook.go │ │ ├── appenginevm_hook.go │ │ ├── default.go │ │ ├── google.go │ │ ├── jwt.go │ │ └── sdk.go │ │ ├── internal │ │ ├── oauth2.go │ │ ├── token.go │ │ └── transport.go │ │ ├── jws │ │ └── jws.go │ │ ├── jwt │ │ └── jwt.go │ │ ├── linkedin │ │ └── linkedin.go │ │ ├── oauth2.go │ │ ├── odnoklassniki │ │ └── odnoklassniki.go │ │ ├── paypal │ │ └── paypal.go │ │ ├── token.go │ │ ├── transport.go │ │ └── vk │ │ └── vk.go └── gopkg.in │ ├── bsm │ └── ratelimit.v1 │ │ ├── .travis.yml │ │ ├── Makefile │ │ ├── README.md │ │ └── ratelimit.go │ ├── fsnotify.v1 │ ├── .gitignore │ ├── .travis.yml │ ├── AUTHORS │ ├── CHANGELOG.md │ ├── CONTRIBUTING.md │ ├── LICENSE │ ├── README.md │ ├── fsnotify.go │ ├── inotify.go │ ├── inotify_poller.go │ ├── kqueue.go │ ├── open_mode_bsd.go │ ├── open_mode_darwin.go │ └── windows.go │ ├── ini.v1 │ ├── .gitignore │ ├── LICENSE │ ├── README.md │ ├── README_ZH.md │ ├── ini.go │ ├── parser.go │ └── struct.go │ ├── macaron.v1 │ ├── .gitignore │ ├── .travis.yml │ ├── LICENSE │ ├── README.md │ ├── context.go │ ├── fixtures │ │ ├── basic │ │ │ ├── admin │ │ │ │ └── index.tmpl │ │ │ ├── another_layout.tmpl │ │ │ ├── content.tmpl │ │ │ ├── current_layout.tmpl │ │ │ ├── delims.tmpl │ │ │ ├── hello.tmpl │ │ │ ├── hypertext.html │ │ │ └── layout.tmpl │ │ ├── basic2 │ │ │ ├── hello.tmpl │ │ │ └── hello2.tmpl │ │ ├── custom_funcs │ │ │ └── index.tmpl │ │ └── symlink │ ├── logger.go │ ├── macaron.go │ ├── macaronlogo.png │ ├── recovery.go │ ├── render.go │ ├── response_writer.go │ ├── return_handler.go │ ├── router.go │ ├── static.go │ └── tree.go │ ├── redis.v3 │ ├── .gitignore │ ├── .travis.yml │ ├── LICENSE │ ├── Makefile │ ├── README.md │ ├── cluster.go │ ├── cluster_pipeline.go │ ├── command.go │ ├── commands.go │ ├── conn.go │ ├── doc.go │ ├── error.go │ ├── internal │ │ ├── consistenthash │ │ │ └── consistenthash.go │ │ └── hashtag │ │ │ └── hashtag.go │ ├── multi.go │ ├── parser.go │ ├── pipeline.go │ ├── pool.go │ ├── pubsub.go │ ├── redis.go │ ├── ring.go │ ├── safe.go │ ├── script.go │ ├── sentinel.go │ └── unsafe.go │ └── yaml.v2 │ ├── LICENSE │ ├── LICENSE.libyaml │ ├── README.md │ ├── apic.go │ ├── decode.go │ ├── emitterc.go │ ├── encode.go │ ├── parserc.go │ ├── readerc.go │ ├── resolve.go │ ├── scannerc.go │ ├── sorter.go │ ├── writerc.go │ ├── yaml.go │ ├── yamlh.go │ └── yamlprivateh.go └── ws ├── client.go ├── msg.go └── ws.go /.dockerignore: -------------------------------------------------------------------------------- 1 | build 2 | cache 3 | CHANGELOG.md 4 | cmd 5 | conf 6 | CONTRIBUTING.md 7 | docker-compose.yml 8 | docs 9 | .git 10 | .gitignore 11 | Godeps 12 | Gruntfile.js 13 | LICENSE 14 | main.go 15 | Makefile 16 | models 17 | modules 18 | node_modules 19 | package.json 20 | README.md 21 | routers 22 | src 23 | templates 24 | vendor 25 | VERSION 26 | web 27 | ws 28 | -------------------------------------------------------------------------------- /.editorconfig: -------------------------------------------------------------------------------- 1 | root = true 2 | 3 | [*] 4 | end_of_line = lf 5 | insert_final_newline = true 6 | charset = utf-8 7 | trim_trailing_whitespace = true 8 | 9 | [*.{js,html}] 10 | indent_style = space 11 | indent_size = 4 12 | 13 | [*.scss] 14 | indent_style = space 15 | indent_size = 2 16 | 17 | [*.json] 18 | indent_style = space 19 | indent_size = 4 20 | 21 | [Makefile] 22 | indent_style = tab 23 | 24 | [*.go] 25 | indent_style = tab 26 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | node_modules/ 2 | web/ 3 | .idea 4 | *.swp 5 | *.swo 6 | .DS_Store 7 | \#*\# 8 | templates/templates.go 9 | web/web.go 10 | *~ 11 | kanban 12 | kanban.iml 13 | rel/ 14 | .tern-port 15 | -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # Contributing to LeanLabs Kanban 2 | 3 | Want to hack on Kanban? Awesome! This page contains information about reporting issues and some tips and guidelines useful for contributors. 4 | 5 | ## Reporting issues 6 | 7 | When reporting issues, please first check that our [issues database](https://gitlab.com/leanlabsio/kanban/issues) doesn't already include that problem or suggestion before submitting an issue. 8 | 9 | ## More information 10 | 11 | [How start development environment](/docs/contributing) 12 | -------------------------------------------------------------------------------- /Dockerfile: -------------------------------------------------------------------------------- 1 | FROM scratch 2 | 3 | EXPOSE 80 4 | 5 | COPY rel/kanban_x86_64_linux /kanban 6 | 7 | CMD ["/kanban", "server"] 8 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2015 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | 23 | -------------------------------------------------------------------------------- /build/certs/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/leanlabsio/kanban/0a2a8809c10c5594be08838c48e1518dc70718d4/build/certs/.gitkeep -------------------------------------------------------------------------------- /build/conf.d/upstream.conf: -------------------------------------------------------------------------------- 1 | upstream kanban { 2 | server kanban:80; 3 | } 4 | -------------------------------------------------------------------------------- /build/sites-enabled/kanban.conf: -------------------------------------------------------------------------------- 1 | #Uncomment next lines in order for to work https 2 | # 3 | #server { 4 | # listen 80; 5 | # return 301 https://$host$request_uri; 6 | #} 7 | 8 | server { 9 | # Locate nginx.crt and nginx.key in build/certs directory 10 | # and uncomment next lines in order for to work https 11 | # 12 | # listen 443 ssl; 13 | # ssl_certificate /etc/nginx/certs/nginx.crt; 14 | # ssl_certificate_key /etc/nginx/certs/nginx.key; 15 | 16 | listen 80; 17 | 18 | location / { 19 | proxy_pass http://kanban; 20 | } 21 | 22 | location /ws { 23 | proxy_http_version 1.1; 24 | proxy_set_header Host $host; 25 | proxy_set_header Upgrade $http_upgrade; 26 | proxy_set_header Connection "upgrade"; 27 | proxy_set_header Origin ""; 28 | proxy_pass http://kanban; 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /conf/config.toml: -------------------------------------------------------------------------------- 1 | [server] 2 | listen = "0.0.0.0:80" 3 | hostname = "http://localhost" 4 | 5 | [security] 6 | secret = "qwerty" 7 | 8 | [gitlab] 9 | url = "https://gitlab.com" 10 | client = "qwerty" 11 | secret = "qwerty" 12 | 13 | [redis] 14 | addr = "127.0.0.1:6379" 15 | password = "" 16 | db = 0 17 | -------------------------------------------------------------------------------- /datasource/gitlab/datasource.go: -------------------------------------------------------------------------------- 1 | package gitlab 2 | 3 | import ( 4 | gitlabclient "gitlab.com/leanlabsio/kanban/modules/gitlab" 5 | "golang.org/x/oauth2" 6 | "gopkg.in/redis.v3" 7 | ) 8 | 9 | type GitLabDataSource struct { 10 | client *gitlabclient.GitlabContext 11 | db *redis.Client 12 | } 13 | 14 | // New create new gitlab datasource instance 15 | func New(t *oauth2.Token, pt string, r *redis.Client) GitLabDataSource { 16 | c := gitlabclient.NewContext(t, pt) 17 | 18 | return GitLabDataSource{client: c, db: r} 19 | } 20 | -------------------------------------------------------------------------------- /datasource/gitlab/file.go: -------------------------------------------------------------------------------- 1 | package gitlab 2 | 3 | import ( 4 | "gitlab.com/leanlabsio/kanban/models" 5 | "gitlab.com/leanlabsio/kanban/modules/gitlab" 6 | ) 7 | 8 | // UploadFile uploads file to gitlab 9 | func (ds GitLabDataSource) UploadFile(boardID string, file models.UploadForm) (*models.File, error) { 10 | body, err := file.File.Open() 11 | res, err := ds.client.UploadFile(boardID, file.File.Filename, body) 12 | 13 | return newFileFromGitlab(res), err 14 | } 15 | 16 | // newFileFromGitlab creates new local file from gitlab file 17 | func newFileFromGitlab(f *gitlab.File) *models.File { 18 | return &models.File{ 19 | Alt: f.Alt, 20 | URL: f.URL, 21 | Markdown: f.Markdown, 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /datasource/gitlab/user.go: -------------------------------------------------------------------------------- 1 | package gitlab 2 | 3 | import ( 4 | "fmt" 5 | "gitlab.com/leanlabsio/kanban/models" 6 | "gitlab.com/leanlabsio/kanban/modules/gitlab" 7 | ) 8 | 9 | // ListMembers is 10 | func (ds GitLabDataSource) ListMembers(board_id string) ([]*models.User, error) { 11 | var mem []*models.User 12 | r, err := ds.client.ListProjectMembers(board_id, &gitlab.ListOptions{ 13 | Page: "1", 14 | PerPage: "100", 15 | }) 16 | 17 | if err != nil { 18 | return nil, err 19 | } 20 | 21 | b, err := ds.ItemBoard(board_id) 22 | fmt.Printf("%+v", b) 23 | 24 | if err != nil { 25 | return nil, err 26 | } 27 | 28 | exist := make(map[string]bool) 29 | 30 | if b.Owner == nil { 31 | u, _ := ds.client.ListGroupMembers(fmt.Sprintf("%d", b.Namespace.Id), &gitlab.ListOptions{}) 32 | 33 | for _, item := range u { 34 | exist[item.Username] = true 35 | mem = append(mem, mapUserFromGitlab(item)) 36 | } 37 | } 38 | 39 | for _, item := range r { 40 | if !exist[item.Username] { 41 | mem = append(mem, mapUserFromGitlab(item)) 42 | } 43 | } 44 | 45 | return mem, nil 46 | } 47 | 48 | // mapUserFromGitlab mapped data from gitlab user to kanban user 49 | func mapUserFromGitlab(u *gitlab.User) *models.User { 50 | if u == nil { 51 | return nil 52 | } 53 | return &models.User{ 54 | Id: u.Id, 55 | Name: u.Name, 56 | Username: u.Username, 57 | AvatarUrl: u.AvatarUrl, 58 | State: u.State, 59 | } 60 | } 61 | -------------------------------------------------------------------------------- /docker-compose.yml: -------------------------------------------------------------------------------- 1 | proxy: 2 | image: leanlabs/nginx:1.0.1 3 | volumes: 4 | - "./build/conf.d:/etc/nginx/conf.d" 5 | - "./build/certs:/etc/nginx/certs" 6 | - "./build/sites-enabled:/etc/nginx/sites-enabled" 7 | links: 8 | - kanban:kanban 9 | ports: 10 | - "443:443" 11 | - "80:80" 12 | 13 | kanban: 14 | image: leanlabs/kanban:1.7.1 15 | environment: 16 | # URL on which Leanlabs Kanban will be reachable 17 | - KANBAN_SERVER_HOSTNAME=http://kanban.gitlab.com 18 | # This string is used to generate user auth tokens 19 | - KANBAN_SECURITY_SECRET=qwerty 20 | # Your GitLab host URL 21 | - KANBAN_GITLAB_URL=https://gitlab.com 22 | # Your GitLab OAuth client ID 23 | - KANBAN_GITLAB_CLIENT=qwerty 24 | # Your GitLab OAuth client secret key 25 | - KANBAN_GITLAB_SECRET=qwerty 26 | # Wheter to enable sign up with user API token 27 | - KANBAN_ENABLE_SIGNUP=true 28 | # Redis server address - IP:PORT 29 | - KANBAN_REDIS_ADDR=redis:6379 30 | links: 31 | - redis:redis 32 | command: ./kanban server 33 | 34 | redis: 35 | image: leanlabs/redis:1.0.0 36 | volumes: 37 | - "/data:/data" 38 | 39 | -------------------------------------------------------------------------------- /docs/README.md: -------------------------------------------------------------------------------- 1 | --- 2 | permalink: /newdocs/ 3 | layout: docs 4 | --- 5 | 6 | # LeanLabs Kanban Documentation 7 | 8 | The source for LeanLabs Kanban documentation is in this directory. 9 | 10 | This is a work in progress, feel free to [submit issues](https://gitlab.com/leanlabsio/kanban/issues) or contribute to help improve the documentation. 11 | 12 | ### Installation 13 | 14 | [Installation instructions](/docs/installation) 15 | 16 | ### Configuration 17 | 18 | [Configuration guides](/docs/configuration) 19 | -------------------------------------------------------------------------------- /docs/configuration/README.md: -------------------------------------------------------------------------------- 1 | # Kanban configuration tips 2 | 3 | Here you will find guides for using kanban board with different software, 4 | including various operating systems and web servers. 5 | 6 | [Web servers configuration](/docs/configuration/webserver) 7 | -------------------------------------------------------------------------------- /docs/configuration/webserver/README.md: -------------------------------------------------------------------------------- 1 | # Web server configuration 2 | 3 | In this section you will find configuration files to setup kanban behind different web servers. 4 | 5 | [Setting up behind Apache](/docs/configuration/webserver/apache) 6 | 7 | [Setting up behind nginx](/docs/configuration/webserver/nginx) 8 | -------------------------------------------------------------------------------- /docs/configuration/webserver/apache/apache.conf: -------------------------------------------------------------------------------- 1 | 2 | ProxyPreserveHost On 3 | 4 | 5 | ProxyPass http://127.0.0.1:9000/ 6 | ProxyPassReverse http://127.0.0.1:9000/ 7 | 8 | 9 | 10 | ProxyPass ws://127.0.0.1:9000/ws/ 11 | ProxyPassReverse ws://127.0.0.1:9000/ws/ 12 | 13 | 14 | -------------------------------------------------------------------------------- /docs/configuration/webserver/nginx/README.md: -------------------------------------------------------------------------------- 1 | # Nginx web server configuration guide 2 | 3 | The configuration files in this directory have been tested with nginx 1.8+. 4 | 5 | ### Config example 6 | 7 | ```nginx 8 | server { 9 | listen 80; 10 | 11 | location / { 12 | proxy_pass http://127.0.0.1:9000; 13 | } 14 | 15 | location /ws { 16 | proxy_http_version 1.1; 17 | proxy_set_header Host $host; 18 | proxy_set_header Upgrade $http_upgrade; 19 | proxy_set_header Connection "upgrade"; 20 | proxy_set_header Origin ""; 21 | proxy_pass http://127.0.0.1:9000; 22 | } 23 | } 24 | 25 | ``` 26 | 27 | [view on github](https://github.com/leanlabsio/kanban/blob/master/docs/configuration/webserver/nginx/nginx.conf) 28 | -------------------------------------------------------------------------------- /docs/configuration/webserver/nginx/nginx.conf: -------------------------------------------------------------------------------- 1 | server { 2 | listen 80; 3 | 4 | location / { 5 | proxy_pass http://127.0.0.1:9000; 6 | } 7 | 8 | location /ws { 9 | proxy_http_version 1.1; 10 | proxy_set_header Host $host; 11 | proxy_set_header Upgrade $http_upgrade; 12 | proxy_set_header Connection "upgrade"; 13 | proxy_set_header Origin ""; 14 | proxy_pass http://127.0.0.1:9000; 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /docs/installation/README.md: -------------------------------------------------------------------------------- 1 | # Installation 2 | 3 | Here you will find guides for installing the kanban board. 4 | 5 | For now we officially support two installation types: 6 | 7 | - [Installation from binary](/docs/installation/binary.md) 8 | 9 | - [Installation with docker](/docs/installation/docker.md) 10 | -------------------------------------------------------------------------------- /docs/installation/gitlab_oauth/applications.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/leanlabsio/kanban/0a2a8809c10c5594be08838c48e1518dc70718d4/docs/installation/gitlab_oauth/applications.jpg -------------------------------------------------------------------------------- /docs/installation/gitlab_oauth/create_desc.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/leanlabsio/kanban/0a2a8809c10c5594be08838c48e1518dc70718d4/docs/installation/gitlab_oauth/create_desc.jpg -------------------------------------------------------------------------------- /docs/installation/gitlab_oauth/create_success_alt.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/leanlabsio/kanban/0a2a8809c10c5594be08838c48e1518dc70718d4/docs/installation/gitlab_oauth/create_success_alt.jpg -------------------------------------------------------------------------------- /docs/installation/gitlab_oauth/login_with_oauth_alt.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/leanlabsio/kanban/0a2a8809c10c5594be08838c48e1518dc70718d4/docs/installation/gitlab_oauth/login_with_oauth_alt.jpg -------------------------------------------------------------------------------- /docs/usage/README.md: -------------------------------------------------------------------------------- 1 | # Usage tips 2 | 3 | Here we will provide some tips and tricks on kanban usage. 4 | 5 | [How to customize columns](/docs/usage/customize-columns.md) 6 | 7 | -------------------------------------------------------------------------------- /docs/usage/customize-columns.md: -------------------------------------------------------------------------------- 1 | # Customizing columns 2 | 3 | Kanban relies on specially formatted labels in your project for its work. Kanban LeanLabs labels use the following pattern. 4 | 5 | > KB[stage][0][Backlog] 6 | 7 | **Where:** 8 | 9 | > KB[stage] - reserved column prefix 10 | > 11 | > [0] - column position 12 | > 13 | > [Backlog] - column title 14 | 15 | LeanLabs board configuration by default creates labels 16 | 17 | > KB[stage][0][Backlog] 18 | > 19 | > KB[stage][1][Analysis] 20 | > 21 | > KB[stage][2][Development] 22 | > 23 | > KB[stage][3][Testing] 24 | > 25 | > KB[stage][4][Production] 26 | > 27 | > KB[stage][5][Ready] 28 | -------------------------------------------------------------------------------- /main.go: -------------------------------------------------------------------------------- 1 | package main // import "gitlab.com/leanlabsio/kanban" 2 | 3 | import ( 4 | "github.com/spf13/cobra" 5 | "github.com/spf13/viper" 6 | "gitlab.com/leanlabsio/kanban/cmd" 7 | ) 8 | 9 | // AppVer defines application version 10 | var AppVer string = "dev" 11 | 12 | func main() { 13 | kbCmd := &cobra.Command{ 14 | Use: "kanban", 15 | Long: `Free OpenSource self hosted Kanban board for GitLab issues. 16 | 17 | Full documentation is available on http://kanban.leanlabs.io/. 18 | 19 | Report issues to or https://gitter.im/leanlabsio/kanban. 20 | `, 21 | } 22 | viper.SetDefault("version", AppVer) 23 | 24 | kbCmd.AddCommand(&cmd.DaemonCmd) 25 | kbCmd.Execute() 26 | } 27 | -------------------------------------------------------------------------------- /models/board.go: -------------------------------------------------------------------------------- 1 | package models 2 | 3 | // Board represents a kanban board. 4 | type Board struct { 5 | Id int64 `json:"id"` 6 | Name string `json:"name"` 7 | NamespaceWithName string `json:"name_with_namespace"` 8 | PathWithNamespace string `json:"path_with_namespace"` 9 | Namespace *Namespace `json:"namespace,nil,omitempty"` 10 | Description string `json:"description"` 11 | LastModified string `json:"last_modified"` 12 | CreatedAt string `json:"created_at"` 13 | Owner *User `json:"owner,nil,omitempty"` 14 | AvatarUrl string `json:"avatar_url,nil,omitempty"` 15 | } 16 | 17 | type BoardRequest struct { 18 | BoardId string `json:"project_id"` 19 | } 20 | 21 | // Board represents a namespace kanban board. 22 | type Namespace struct { 23 | Id int64 `json:"id"` 24 | Name string `json:"name,omitempty"` 25 | Avatar *Avatar `json:"avatar,nil,omitempty"` 26 | } 27 | 28 | // Avatar represent a Avatar url. 29 | type Avatar struct { 30 | Url string `json:"url"` 31 | } 32 | -------------------------------------------------------------------------------- /models/comment.go: -------------------------------------------------------------------------------- 1 | package models 2 | 3 | import ( 4 | "encoding/json" 5 | "time" 6 | ) 7 | 8 | // Comment represents a card comment 9 | type Comment struct { 10 | Id int64 `json:"id"` 11 | Author *User `json:"author"` 12 | Body string `json:"body"` 13 | CreatedAt time.Time `json:"created_at"` 14 | IsInfo bool `json:"is_info"` 15 | } 16 | 17 | // CommentRequest represents a request for create or update comment on card 18 | type CommentRequest struct { 19 | CardId int64 `json:"issue_id"` 20 | ProjectId int64 `json:"project_id"` 21 | Body string `json:"body"` 22 | } 23 | 24 | // Marshal returns the JSON encoding of comment 25 | func (c *Comment) MarshalJSON() ([]byte, error) { 26 | type Alias Comment 27 | return json.Marshal(struct { 28 | CreatedAt int64 `json:"created_at"` 29 | *Alias 30 | }{ 31 | CreatedAt: c.CreatedAt.Unix(), 32 | Alias: (*Alias)(c), 33 | }) 34 | } 35 | -------------------------------------------------------------------------------- /models/error.go: -------------------------------------------------------------------------------- 1 | package models 2 | 3 | type ResponseError struct { 4 | Success bool `json:"success"` 5 | Message string `json:"message"` 6 | } 7 | 8 | // ReceivedDataError represents get data from storage or other api 9 | type ReceivedDataErr struct { 10 | Message string 11 | StatusCode int 12 | } 13 | 14 | // Error realised error type ReceivedDataErr interface 15 | func (r ReceivedDataErr) Error() string { 16 | return r.Message 17 | } 18 | -------------------------------------------------------------------------------- /models/event.go: -------------------------------------------------------------------------------- 1 | package models 2 | 3 | type Response struct { 4 | Data interface{} `json:"data"` 5 | Event string `json:"event"` 6 | } 7 | -------------------------------------------------------------------------------- /models/file.go: -------------------------------------------------------------------------------- 1 | package models 2 | 3 | import "mime/multipart" 4 | 5 | // File represents uploaded file 6 | type File struct { 7 | Alt string `json:"alt"` 8 | URL string `json:"url"` 9 | Markdown string `json:"markdown"` 10 | } 11 | 12 | // UploadForm represents file uploaded 13 | type UploadForm struct { 14 | File *multipart.FileHeader `form:"file"` 15 | } 16 | -------------------------------------------------------------------------------- /models/label.go: -------------------------------------------------------------------------------- 1 | package models 2 | 3 | import ( 4 | "regexp" 5 | "strconv" 6 | ) 7 | 8 | // Label represent label 9 | type Label struct { 10 | ID int64 `json:"id"` 11 | Color string `json:"color"` 12 | Name string `json:"name"` 13 | Description string `json:"description"` 14 | OpenCardCount int `json:"open_card_count"` 15 | ClosedCardCount int `json:"closed_card_count"` 16 | OpenMergeRequestCount int `json:"open_merge_requests_count"` 17 | Subscribed bool `json:"subscribed"` 18 | Priority int `json:"priority"` 19 | } 20 | 21 | // Stage represent board stage 22 | type Stage struct { 23 | Name string 24 | Position int 25 | } 26 | 27 | // LabelRequest represent request for update label 28 | type LabelRequest struct { 29 | Name string `json:"name"` 30 | Color string `json:"color"` 31 | NewName string `json:"new_name"` 32 | } 33 | 34 | var ( 35 | stageReg = regexp.MustCompile(`KB\[stage\]\[(\d+)\]\[(.*)\]`) 36 | ) 37 | 38 | // ParseLabelToStage transform label to stage 39 | func ParseLabelToStage(l string) *Stage { 40 | m := stageReg.MatchString(l) 41 | 42 | var s Stage 43 | if m { 44 | an := stageReg.FindStringSubmatch(l) 45 | s.Position, _ = strconv.Atoi(an[1]) 46 | s.Name = an[2] 47 | } 48 | 49 | return &s 50 | } 51 | -------------------------------------------------------------------------------- /models/login.go: -------------------------------------------------------------------------------- 1 | package models 2 | 3 | import ( 4 | "errors" 5 | ) 6 | 7 | // UserSignIn is 8 | func UserSignIn(uname, pass string) (*User, error) { 9 | u, err := LoadUserByUsername(uname) 10 | 11 | if err != nil { 12 | return nil, err 13 | } 14 | 15 | if !u.ValidatePassword(pass) { 16 | return nil, errors.New("Invalid username or password") 17 | } 18 | 19 | return u, nil 20 | } 21 | 22 | // UserSignUp is 23 | func UserSignUp(uname, email, pass, token, provider string) (*User, error) { 24 | cr := map[string]*Credential{ 25 | provider: &Credential{ 26 | Token: nil, 27 | PrivateToken: token, 28 | }, 29 | } 30 | 31 | u := &User{ 32 | Name: uname, 33 | Username: uname, 34 | Email: email, 35 | Passwd: pass, 36 | Credential: cr, 37 | } 38 | 39 | return CreateUser(u) 40 | } 41 | -------------------------------------------------------------------------------- /models/milestone.go: -------------------------------------------------------------------------------- 1 | package models 2 | 3 | // Milestone represents a kanban milestone 4 | type Milestone struct { 5 | ID int64 `json:"id"` 6 | IID int64 `json:"iid"` 7 | State string `json:"state,omitempty"` 8 | Title string `json:"title,omitempty"` 9 | DueDate string `json:"due_date,omitempty"` 10 | Description string `json:"description"` 11 | UpdatedAt string `json:"updated_at"` 12 | CreatedAt string `json:"created_at"` 13 | } 14 | 15 | // MilestoneRequest represents a milestone request for create, update, delete milestone on kanban 16 | type MilestoneRequest struct { 17 | MilestoneID int64 `json:"milestone_id"` 18 | ProjectID int64 `json:"project_id"` 19 | Title string `json:"title"` 20 | Description string `json:"description"` 21 | DueDate string `json:"due_date"` 22 | } 23 | -------------------------------------------------------------------------------- /models/models.go: -------------------------------------------------------------------------------- 1 | package models 2 | 3 | import ( 4 | "strings" 5 | 6 | "github.com/spf13/viper" 7 | "gitlab.com/leanlabsio/kanban/modules/gitlab" 8 | "golang.org/x/oauth2" 9 | "gopkg.in/redis.v3" 10 | ) 11 | 12 | var ( 13 | c *redis.Client 14 | ) 15 | 16 | // NewEngine creates new services for data from config settings 17 | func NewEngine(r *redis.Client) error { 18 | gh := strings.TrimSuffix(viper.GetString("gitlab.url"), "/") 19 | d := strings.TrimSuffix(viper.GetString("server.hostname"), "/") 20 | c = r 21 | 22 | gitlab.NewEngine(&gitlab.Config{ 23 | BasePath: gh + "/api/v3", 24 | Domain: d, 25 | Oauth2: &oauth2.Config{ 26 | ClientID: viper.GetString("gitlab.client"), 27 | ClientSecret: viper.GetString("gitlab.secret"), 28 | Endpoint: oauth2.Endpoint{ 29 | AuthURL: gh + "/oauth/authorize", 30 | TokenURL: gh + "/oauth/token", 31 | }, 32 | RedirectURL: d + "/assets/html/user/views/oauth.html", 33 | }, 34 | }) 35 | 36 | return nil 37 | } 38 | -------------------------------------------------------------------------------- /models/oauth2.go: -------------------------------------------------------------------------------- 1 | package models 2 | 3 | import ( 4 | "gitlab.com/leanlabsio/kanban/modules/gitlab" 5 | "golang.org/x/oauth2" 6 | ) 7 | 8 | //AuthCodeUrl return url for redirect user for oauth. 9 | func AuthCodeURL(p string) string { 10 | switch p { 11 | case "gitlab": 12 | return gitlab.AuthCodeURL() 13 | } 14 | 15 | return "" 16 | } 17 | 18 | // Exchange converts an authorization code into a token. 19 | func Exchange(p string, c string) (*oauth2.Token, error) { 20 | switch p { 21 | case "gitlab": 22 | return gitlab.Exchange(c) 23 | } 24 | 25 | return &oauth2.Token{}, nil 26 | } 27 | 28 | // UserOauthSignIn is 29 | func UserOauthSignIn(provider string, tok *oauth2.Token) (*User, error) { 30 | 31 | m := map[string]*Credential{ 32 | provider: &Credential{ 33 | Token: tok, 34 | PrivateToken: "", 35 | }, 36 | } 37 | 38 | user := &User{ 39 | Credential: m, 40 | } 41 | 42 | return LoadByToken(user, provider) 43 | } 44 | -------------------------------------------------------------------------------- /modules/auth/auth.go: -------------------------------------------------------------------------------- 1 | package auth 2 | 3 | import ( 4 | "errors" 5 | "github.com/dgrijalva/jwt-go" 6 | "github.com/spf13/viper" 7 | "gitlab.com/leanlabsio/kanban/models" 8 | "gopkg.in/macaron.v1" 9 | ) 10 | 11 | // SignedInUser returns models.User instance if user exists 12 | func SignedInUser(ctx *macaron.Context) (*models.User, error) { 13 | h := ctx.Req.Header.Get("X-KB-Access-Token") 14 | if len(h) == 0 { 15 | return nil, errors.New("X-KB-Access-Token header missed") 16 | } 17 | 18 | jwtToken, err := jwt.Parse(h, func(token *jwt.Token) (interface{}, error) { 19 | return []byte(viper.GetString("security.secret_key")), nil 20 | }) 21 | 22 | if err != nil { 23 | return nil, err 24 | } 25 | 26 | if !jwtToken.Valid { 27 | return nil, errors.New("Invalid jwt token") 28 | } 29 | 30 | uname, _ := jwtToken.Claims["name"].(string) 31 | user, err := models.LoadUserByUsername(uname) 32 | 33 | if err != nil { 34 | return nil, err 35 | } 36 | 37 | user.Token = jwtToken 38 | 39 | return user, nil 40 | } 41 | -------------------------------------------------------------------------------- /modules/auth/auth_form.go: -------------------------------------------------------------------------------- 1 | package auth 2 | 3 | type Oauth2 struct { 4 | Code string `json:"code"` 5 | Provider string `json:"provider"` 6 | } 7 | -------------------------------------------------------------------------------- /modules/auth/user_form.go: -------------------------------------------------------------------------------- 1 | package auth 2 | 3 | type SignIn struct { 4 | Uname string `json:"_username"` 5 | Pass string `json:"_password"` 6 | } 7 | 8 | type SignUp struct { 9 | Email string `json:"_email"` 10 | Pass string `json:"_password"` 11 | Token string `json:"_token"` 12 | Uname string `json:"_username"` 13 | } 14 | 15 | type ResponseAuth struct { 16 | Success bool `json:"success"` 17 | Token string `json:"token"` 18 | } 19 | -------------------------------------------------------------------------------- /modules/gitlab/file.go: -------------------------------------------------------------------------------- 1 | package gitlab 2 | 3 | import ( 4 | "bytes" 5 | "io" 6 | "mime/multipart" 7 | "net/http" 8 | ) 9 | 10 | // File represents uploaded file to gitlab 11 | // 12 | // Gitlab API docs: http://docs.gitlab.com/ee/api/projects.html#upload-a-file 13 | type File struct { 14 | Alt string `json:"alt"` 15 | URL string `json:"url"` 16 | Markdown string `json:"markdown"` 17 | } 18 | 19 | // UploadFile uploads file to gitlab project 20 | // 21 | // Gitlab API docs: http://docs.gitlab.com/ee/api/projects.html#upload-a-file 22 | func (g *GitlabContext) UploadFile(projectID, name string, file io.Reader) (*File, error) { 23 | path := getUrl([]string{"projects", projectID, "uploads"}) 24 | 25 | body := new(bytes.Buffer) 26 | writer := multipart.NewWriter(body) 27 | part, err := writer.CreateFormFile("file", name) 28 | if err != nil { 29 | return nil, err 30 | } 31 | _, err = io.Copy(part, file) 32 | 33 | err = writer.Close() 34 | if err != nil { 35 | return nil, err 36 | } 37 | 38 | req, _ := http.NewRequest("POST", path, body) 39 | req.Header.Set("Content-Type", writer.FormDataContentType()) 40 | 41 | var ret File 42 | if _, err := g.Do(req, &ret); err != nil { 43 | return nil, err 44 | } 45 | 46 | return &ret, nil 47 | } 48 | -------------------------------------------------------------------------------- /modules/middleware/auth.go: -------------------------------------------------------------------------------- 1 | package middleware 2 | 3 | import ( 4 | "gitlab.com/leanlabsio/kanban/models" 5 | "gitlab.com/leanlabsio/kanban/modules/auth" 6 | "gopkg.in/macaron.v1" 7 | ) 8 | 9 | // Auther checks jwt authentication 10 | func Auther() macaron.Handler { 11 | return func(ctx *macaron.Context, c *Context) { 12 | u, err := auth.SignedInUser(ctx) 13 | 14 | if err != nil { 15 | unauthorized(ctx) 16 | } 17 | 18 | c.User = u 19 | c.IsSigned = true 20 | ctx.Map(u) 21 | } 22 | } 23 | 24 | // unauthorized is a helper method to respond with HTTP 401 25 | func unauthorized(ctx *macaron.Context) { 26 | ctx.JSON(401, models.ResponseError{Success: false, Message: "Unauthorized"}) 27 | } 28 | -------------------------------------------------------------------------------- /modules/middleware/context.go: -------------------------------------------------------------------------------- 1 | package middleware 2 | 3 | import ( 4 | "encoding/json" 5 | "gitlab.com/leanlabsio/kanban/models" 6 | "gitlab.com/leanlabsio/kanban/ws" 7 | "gitlab.com/leanlabsio/kanban/datasource" 8 | "gopkg.in/macaron.v1" 9 | ) 10 | 11 | type Context struct { 12 | *macaron.Context 13 | User *models.User 14 | IsAdmin bool 15 | IsSigned bool 16 | IsBasicAuth bool 17 | 18 | DataSource datasource.DataSource 19 | 20 | Provider string 21 | } 22 | 23 | // Contexter initializes a classic context for a request. 24 | func Contexter() macaron.Handler { 25 | return func(c *macaron.Context) { 26 | ctx := &Context{ 27 | Context: c, 28 | } 29 | 30 | ctx.Provider = "gitlab" 31 | 32 | c.Map(ctx) 33 | } 34 | } 35 | 36 | // Broadcast sends message via WebSocket to all subscribed to r users 37 | func (*Context) Broadcast(r string, d interface{}) { 38 | res, _ := json.Marshal(d) 39 | go ws.Server(r).Broadcast(string(res)) 40 | } 41 | -------------------------------------------------------------------------------- /modules/middleware/datasource.go: -------------------------------------------------------------------------------- 1 | package middleware 2 | 3 | import ( 4 | "gitlab.com/leanlabsio/kanban/datasource/gitlab" 5 | "gitlab.com/leanlabsio/kanban/models" 6 | "gopkg.in/macaron.v1" 7 | "gopkg.in/redis.v3" 8 | ) 9 | 10 | func Datasource() macaron.Handler { 11 | return func(ctx *Context, u *models.User, r *redis.Client) { 12 | gds := gitlab.New(u.Credential["gitlab"].Token, 13 | u.Credential["gitlab"].PrivateToken, 14 | r) 15 | ctx.DataSource = gds 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "kanban", 3 | "version": "0.0.1", 4 | "repository": "gitlab.com/leanlabsio/kanban", 5 | "scripts": { 6 | "install": "npm install", 7 | "build": "grunt build", 8 | "watch": "grunt watch" 9 | }, 10 | "devDependencies": { 11 | "grunt": "~0.4.1", 12 | "grunt-cli": "~0.1.13", 13 | "grunt-contrib-copy": "^0.5.0", 14 | "grunt-contrib-concat": "~0.5.0", 15 | "grunt-contrib-watch": "~0.5.3", 16 | "grunt-contrib-uglify": "~0.7.0", 17 | "grunt-sass": "1.0.0", 18 | "grunt-contrib-connect": "~0.8.0", 19 | "grunt-connect-proxy": "~0.1.11" 20 | }, 21 | "dependencies": { 22 | "angular": "=1.5.6", 23 | "angular-lodash": "https://github.com/EMSSConsulting/angular-lodash.git#68a726c", 24 | "foundation-sites": "5.5.2", 25 | "angular-foundation": "https://github.com/pineconellc/angular-foundation.git#8f3f260", 26 | "angular-loading-bar": "=0.5.2", 27 | "angular-storage": "=0.0.6", 28 | "angular-ui-router": "=0.3.0", 29 | "angularjs-datepicker": "=0.2.15", 30 | "font-awesome": "=4.6.3", 31 | "markdown-it": "=5.0.2", 32 | "markdown-it-emoji": "=1.1.0", 33 | "ng-sortable": "=1.3.6", 34 | "sass-flex-mixin": "=1.0.3", 35 | "lodash": "=4.13.1", 36 | "twemoji": "=2.1.0", 37 | "angular-file-upload": "=2.3.4" 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /routers/board/comment.go: -------------------------------------------------------------------------------- 1 | package board 2 | 3 | import ( 4 | "gitlab.com/leanlabsio/kanban/models" 5 | "gitlab.com/leanlabsio/kanban/modules/middleware" 6 | "net/http" 7 | ) 8 | 9 | // ListComments gets a list of comment on board and card 10 | // accessible by the authenticated user. 11 | func ListComments(ctx *middleware.Context) { 12 | boards, err := ctx.DataSource.ListComments(ctx.Query("project_id"), ctx.Query("issue_id")) 13 | 14 | if err != nil { 15 | ctx.JSON(http.StatusUnauthorized, &models.ResponseError{ 16 | Success: false, 17 | Message: err.Error(), 18 | }) 19 | return 20 | } 21 | 22 | ctx.JSON(http.StatusOK, &models.Response{ 23 | Data: boards, 24 | }) 25 | } 26 | 27 | // CreateComment creates new kanban comment 28 | func CreateComment(ctx *middleware.Context, form models.CommentRequest) { 29 | com, code, err := ctx.DataSource.CreateComment(&form) 30 | 31 | if err != nil { 32 | ctx.JSON(code, &models.ResponseError{ 33 | Success: false, 34 | Message: err.Error(), 35 | }) 36 | return 37 | } 38 | 39 | ctx.JSON(http.StatusOK, &models.Response{ 40 | Data: com, 41 | }) 42 | } 43 | -------------------------------------------------------------------------------- /routers/board/file.go: -------------------------------------------------------------------------------- 1 | package board 2 | 3 | import ( 4 | "net/http" 5 | 6 | "gitlab.com/leanlabsio/kanban/models" 7 | "gitlab.com/leanlabsio/kanban/modules/middleware" 8 | ) 9 | 10 | // UploadFile uploads file to datasource provider 11 | func UploadFile(ctx *middleware.Context, f models.UploadForm) { 12 | res, err := ctx.DataSource.UploadFile(ctx.Params(":board"), f) 13 | 14 | if err != nil { 15 | ctx.JSON(http.StatusUnauthorized, &models.ResponseError{ 16 | Success: false, 17 | Message: err.Error(), 18 | }) 19 | return 20 | } 21 | 22 | ctx.JSON(http.StatusOK, &models.Response{ 23 | Data: res, 24 | }) 25 | } 26 | -------------------------------------------------------------------------------- /routers/board/milestone.go: -------------------------------------------------------------------------------- 1 | package board 2 | 3 | import ( 4 | "gitlab.com/leanlabsio/kanban/models" 5 | "gitlab.com/leanlabsio/kanban/modules/middleware" 6 | "net/http" 7 | ) 8 | 9 | // ListMilestones gets a list of milestone on board accessible by the authenticated user. 10 | func ListMilestones(ctx *middleware.Context) { 11 | labels, err := ctx.DataSource.ListMilestones(ctx.Query("project_id")) 12 | 13 | if err != nil { 14 | ctx.JSON(http.StatusUnauthorized, &models.ResponseError{ 15 | Success: false, 16 | Message: err.Error(), 17 | }) 18 | return 19 | } 20 | 21 | ctx.JSON(http.StatusOK, &models.Response{ 22 | Data: labels, 23 | }) 24 | } 25 | 26 | // CreateMilestone creates a new board milestone. 27 | func CreateMilestone(ctx *middleware.Context, form models.MilestoneRequest) { 28 | milestone, code, err := ctx.DataSource.CreateMilestone(&form) 29 | 30 | if err != nil { 31 | ctx.JSON(code, &models.ResponseError{ 32 | Success: false, 33 | Message: err.Error(), 34 | }) 35 | return 36 | } 37 | 38 | ctx.JSON(http.StatusOK, &models.Response{ 39 | Data: milestone, 40 | }) 41 | } 42 | -------------------------------------------------------------------------------- /routers/board/user.go: -------------------------------------------------------------------------------- 1 | package board 2 | 3 | import ( 4 | "gitlab.com/leanlabsio/kanban/models" 5 | "gitlab.com/leanlabsio/kanban/modules/middleware" 6 | "net/http" 7 | ) 8 | 9 | // ListMembers gets a list of member on board accessible by the authenticated user. 10 | func ListMembers(ctx *middleware.Context) { 11 | members, err := ctx.DataSource.ListMembers(ctx.Query("project_id")) 12 | 13 | if err != nil { 14 | ctx.JSON(http.StatusUnauthorized, &models.ResponseError{ 15 | Success: false, 16 | Message: err.Error(), 17 | }) 18 | return 19 | } 20 | 21 | ctx.JSON(http.StatusOK, members) 22 | } 23 | -------------------------------------------------------------------------------- /routers/home.go: -------------------------------------------------------------------------------- 1 | package routers 2 | 3 | import ( 4 | "github.com/spf13/viper" 5 | "gopkg.in/macaron.v1" 6 | ) 7 | 8 | // Home returns main page 9 | func Home(ctx *macaron.Context) { 10 | ctx.Data["Version"] = viper.GetString("version") 11 | ctx.Data["GitlabHost"] = viper.GetString("gitlab.url") 12 | ctx.Data["EnableSignup"] = viper.GetBool("enable.signup") 13 | ctx.HTML(200, "templates/index") 14 | } 15 | -------------------------------------------------------------------------------- /src/board/components/action_bar.cmp.js: -------------------------------------------------------------------------------- 1 | (function(angular){ 2 | 'use strict'; 3 | 4 | angular.module("gitlabKBApp").component("actionBar",{ 5 | templateUrl: CLIENT_VERSION + "/assets/html/board/views/action_bar.html" 6 | }); 7 | }(window.angular)); 8 | -------------------------------------------------------------------------------- /src/board/components/backlog.cmp.js: -------------------------------------------------------------------------------- 1 | (function(angular) { 2 | 'use strict'; 3 | 4 | angular.module("gitlabKBApp.board").component('boardBacklog', { 5 | templateUrl: CLIENT_VERSION + "/assets/html/board/views/backlog.html", 6 | controller: 'BacklogController' 7 | }).controller("BacklogController", [ 8 | 'BoardService', 9 | '$state', 10 | '$rootScope', 11 | function(BoardService, $state, $rootScope) { 12 | var ctrl = this; 13 | ctrl.project_path = $state.params.project_path; 14 | var grouped = $state.params.group; 15 | 16 | var filter = function(item) { 17 | return item.stage == ''; 18 | }; 19 | 20 | BoardService.get($state.params.project_path).then(function(board) { 21 | ctrl.cards = board.listCard(filter); 22 | 23 | $rootScope.$on('board.change', function() { 24 | ctrl.cards = board.listCard(filter); 25 | }); 26 | 27 | ctrl.dragControlListeners = BoardService.dragControlListeners(grouped, board); 28 | }); 29 | } 30 | ]); 31 | }(window.angular)); 32 | -------------------------------------------------------------------------------- /src/board/components/ll_label.cmp.js: -------------------------------------------------------------------------------- 1 | (function(angular){ 2 | 'use strict'; 3 | 4 | angular.module("gitlabKBApp").component("llLabel", { 5 | bindings: { 6 | label: '=', 7 | }, 8 | templateUrl: CLIENT_VERSION + "/assets/html/board/views/label.html" 9 | }); 10 | }(window.angular)); 11 | -------------------------------------------------------------------------------- /src/board/components/user_avatar.cmp.js: -------------------------------------------------------------------------------- 1 | (function(angular){ 2 | 'use strict'; 3 | 4 | angular.module("gitlabKBApp").component("userAvatar", { 5 | bindings: { 6 | user: '=', 7 | }, 8 | templateUrl: CLIENT_VERSION + "/assets/html/board/views/avatar.html" 9 | }); 10 | }(window.angular)); 11 | -------------------------------------------------------------------------------- /src/board/controllers/board.list.ctrl.js: -------------------------------------------------------------------------------- 1 | (function(angular) { 2 | 'use strict'; 3 | 4 | angular.module('gitlabKBApp.board').controller('BoardListController', 5 | [ 6 | '$scope', 7 | 'host_url', 8 | 'BoardService', function($scope, host_url, BoardService) { 9 | 10 | $scope.host_url = host_url; 11 | 12 | BoardService.getBoards().then(function(result) { 13 | $scope.boards = _.groupBy(result, function(val) { 14 | return val.namespace.name; 15 | }); 16 | }); 17 | 18 | BoardService.getStarredBoards().then(function(boards) { 19 | $scope.stared_boards = boards; 20 | }); 21 | 22 | $scope.setVisible = function(key) { 23 | $scope.boards[key].visible = ($scope.boards[key].visible == undefined || $scope.boards[key].visible != true); 24 | }; 25 | } 26 | ] 27 | ); 28 | })(window.angular); 29 | 30 | -------------------------------------------------------------------------------- /src/board/controllers/milestone.create.ctrl.js: -------------------------------------------------------------------------------- 1 | (function (angular) { 2 | 'use strict'; 3 | angular.module('gitlabKBApp.board').controller('NewMilestoneController', 4 | [ 5 | '$scope', 6 | '$http', 7 | '$stateParams', 8 | '$location', 9 | 'BoardService', 10 | 'MilestoneService', 11 | '$modal', function ($scope, $http, $stateParams, $location, BoardService, MilestoneService, $modal) { 12 | $scope.isSaving = false; 13 | $scope.modal = $modal; 14 | 15 | BoardService.get($stateParams.project_path).then(function (board) { 16 | $scope.milestone = { 17 | project_id: board.project.id 18 | }; 19 | }); 20 | 21 | $scope.createMilestone = function () { 22 | $scope.isSaving = true; 23 | 24 | var data = { 25 | project_id: $scope.milestone.project_id, 26 | title: $scope.milestone.title, 27 | description: $scope.milestone.description 28 | }; 29 | 30 | if (!_.isEmpty($scope.milestone.due_date)) { 31 | data.due_date = $scope.milestone.due_date; 32 | } 33 | 34 | MilestoneService.create(data).then(function () { 35 | $modal.close(); 36 | }); 37 | 38 | }; 39 | } 40 | ] 41 | ); 42 | }(window.angular)); 43 | 44 | -------------------------------------------------------------------------------- /src/board/directives/filter.drc.js: -------------------------------------------------------------------------------- 1 | (function(angular) { 2 | 'use strict'; 3 | 4 | angular.module('gitlabKBApp.board').directive('boardfilter', [ 5 | function() { 6 | var ddo = { 7 | templateUrl: CLIENT_VERSION + "/assets/html/board/views/filter.html", 8 | restrict: "AE", 9 | controller: 'FilterController', 10 | controllerAs: "filter", 11 | bindToController: true 12 | }; 13 | 14 | return ddo; 15 | } 16 | ]); 17 | }(window.angular)); 18 | -------------------------------------------------------------------------------- /src/board/filters/color_luminance.filter.js: -------------------------------------------------------------------------------- 1 | (function(){ 2 | 'use strict'; 3 | 4 | angular.module('gitlabKBApp.board').filter('colorLuminance', [ 5 | function(){ 6 | // taken from http://www.sitepoint.com/javascript-generate-lighter-darker-color/ 7 | // modify to use `alpha` 8 | return function(hex, lum) { 9 | 10 | // validate hex string 11 | hex = String(hex).replace(/[^0-9a-f]/gi, ''); 12 | if (hex.length < 6) { 13 | hex = hex[0]+hex[0]+hex[1]+hex[1]+hex[2]+hex[2]; 14 | } 15 | lum = lum || 0; 16 | 17 | // convert to decimal and change luminosity 18 | var rgb = "rgba(", c, i; 19 | for (i = 0; i < 3; i++) { 20 | c = parseInt(hex.substr(i*2,2), 16); 21 | rgb += c + ','; 22 | } 23 | rgb += lum + ')'; 24 | return rgb; 25 | } 26 | } 27 | ]); 28 | }(window.angular)); 29 | -------------------------------------------------------------------------------- /src/board/filters/priority_name.filter.js: -------------------------------------------------------------------------------- 1 | (function (angular) { 2 | 'use strict'; 3 | 4 | angular.module('gitlabKBApp.board').filter('priorityName', [ 5 | 'priority_regexp', 6 | function (priority_regexp) { 7 | return function (input) { 8 | var priority = input.match(priority_regexp); 9 | if (_.isEmpty(priority)) { 10 | return input; 11 | } 12 | return priority[2]; 13 | }; 14 | }]); 15 | }(window.angular)); 16 | -------------------------------------------------------------------------------- /src/board/filters/stagename.filter.js: -------------------------------------------------------------------------------- 1 | (function (angular) { 2 | 'use strict'; 3 | 4 | angular.module('gitlabKBApp.board').filter('stagename', [ 5 | 'stage_regexp', 6 | function (stage_regexp) { 7 | return function (input) { 8 | return input.match(stage_regexp)[2]; 9 | }; 10 | }]); 11 | }(window.angular)); 12 | -------------------------------------------------------------------------------- /src/board/filters/text_color_for_bg.filter.js: -------------------------------------------------------------------------------- 1 | (function(){ 2 | 'use strict'; 3 | 4 | angular.module('gitlabKBApp.board').filter('textColorForBg', [ 5 | function(){ 6 | return function(hex) { 7 | 8 | var rgb = [], i, brightness = 0; 9 | 10 | hex = String(hex).replace(/[^0-9a-f]/gi, ''); 11 | if (hex.length < 6) { 12 | hex = hex[0]+hex[0]+hex[1]+hex[1]+hex[2]+hex[2]; 13 | } 14 | 15 | for (i = 0; i < 3; i++) { 16 | brightness += parseInt(hex.substr(i*2,2), 16); 17 | } 18 | 19 | return (brightness > 500) ? '#333' : '#fff'; 20 | } 21 | } 22 | ]); 23 | }(window.angular)); 24 | -------------------------------------------------------------------------------- /src/board/filters/wiplimit.filter.js: -------------------------------------------------------------------------------- 1 | (function(angular) { 2 | 'use strict'; 3 | 4 | angular.module('gitlabKBApp.board').filter('wiplimit', [ 5 | 'stage_regexp', 6 | function(stage_regexp) { 7 | return function(input) { 8 | return input.match(stage_regexp)[3]; 9 | }; 10 | } 11 | ]); 12 | }(window.angular)); 13 | -------------------------------------------------------------------------------- /src/board/models/card.model.js: -------------------------------------------------------------------------------- 1 | (function(angular) { 2 | 'use strict'; 3 | 4 | angular.module('gitlabKBApp.board').factory('Card', 5 | [function() { 6 | function Card() { 7 | } 8 | 9 | return Card; 10 | } 11 | ] 12 | ); 13 | })(window.angular); 14 | -------------------------------------------------------------------------------- /src/board/models/card_priority.model.js: -------------------------------------------------------------------------------- 1 | (function(angular){ 2 | 'use strict'; 3 | 4 | angular.module('gitlabKBApp.board').factory('CardPriority', [ 5 | 'priority_regexp', 6 | function(priority_regexp) { 7 | function CardPriority(label) { 8 | if (_.isEmpty(label)) { 9 | return { 10 | index: 0, 11 | color: '#fffff' 12 | } 13 | } 14 | var priority = priority_regexp.exec(label.name); 15 | return { 16 | id: label.name, 17 | name: label.name, 18 | index: parseInt(priority[1]), 19 | color: label.color, 20 | viewName: priority[2] 21 | }; 22 | } 23 | 24 | return CardPriority; 25 | } 26 | ]); 27 | 28 | }(window.angular)); 29 | -------------------------------------------------------------------------------- /src/board/models/stage.model.js: -------------------------------------------------------------------------------- 1 | (function(angular) { 2 | 'use strict'; 3 | 4 | angular.module('gitlabKBApp.board').factory('Stage',[ 5 | 'stage_regexp', function(stage_regexp) { 6 | function Stage(label) { 7 | if (_.isEmpty(label)) { 8 | return { 9 | index: 0, 10 | color: '#fffff' 11 | } 12 | } 13 | var stage = stage_regexp.exec(label.name); 14 | return { 15 | id: label.name, 16 | name: label.name, 17 | index: parseInt(stage[1]), 18 | color: label.color, 19 | viewName: stage[2], 20 | wip: stage[3] 21 | }; 22 | } 23 | 24 | return Stage; 25 | }] 26 | ); 27 | })(window.angular); 28 | -------------------------------------------------------------------------------- /src/board/models/state.model.js: -------------------------------------------------------------------------------- 1 | (function(angular) { 2 | 'use strict'; 3 | 4 | angular.module('gitlabKBApp.board').factory('State',[ 5 | function() { 6 | function State() { 7 | this.showActionBar = false; 8 | } 9 | 10 | return State; 11 | } 12 | ]); 13 | }(window.angular)); 14 | -------------------------------------------------------------------------------- /src/board/services/comment.service.js: -------------------------------------------------------------------------------- 1 | (function(angular) { 2 | 'use strict'; 3 | 4 | angular.module('gitlabKBApp.board').factory('CommentService', 5 | [ 6 | '$http', function($http) { 7 | return { 8 | list: function(boardId, cardId) { 9 | return $http.get('/api/comments', { 10 | params: { 11 | project_id: boardId, 12 | issue_id: cardId 13 | } 14 | }).then(function(result) { 15 | return result.data.data; 16 | }); 17 | }, 18 | create: function(boardId, cardId, comment) { 19 | return $http.post('/api/comments', { 20 | project_id: boardId, 21 | issue_id: cardId, 22 | body: comment 23 | }).then(function(result) { 24 | return result.data.data; 25 | }); 26 | } 27 | }; 28 | } 29 | ] 30 | ); 31 | })(window.angular); 32 | 33 | -------------------------------------------------------------------------------- /src/board/views/action_bar.html: -------------------------------------------------------------------------------- 1 | 30 |
31 | 32 | 33 | 34 |   Filters 35 | 36 | 37 | 38 | 39 |
40 | -------------------------------------------------------------------------------- /src/board/views/avatar.html: -------------------------------------------------------------------------------- 1 | 2 | {{ $ctrl.user.name }}  3 | 4 | 5 | {{ $ctrl.user.username| lowercase| limitTo : 1}} 6 | 7 | -------------------------------------------------------------------------------- /src/board/views/index.html: -------------------------------------------------------------------------------- 1 |
2 |
3 |
4 |
5 |
6 | -------------------------------------------------------------------------------- /src/board/views/label.html: -------------------------------------------------------------------------------- 1 | 3 | {{ $ctrl.label.name }} 4 | 5 | -------------------------------------------------------------------------------- /src/board/views/title.html: -------------------------------------------------------------------------------- 1 | {{project.name_with_namespace}} 2 | -------------------------------------------------------------------------------- /src/markdown/markdown.module.js: -------------------------------------------------------------------------------- 1 | (function (angular) { 2 | 'use strict'; 3 | 4 | angular.module('ll.markdown', []); 5 | })(window.angular); 6 | -------------------------------------------------------------------------------- /src/markdown/plugins/emoji.plugin.js: -------------------------------------------------------------------------------- 1 | (function(twemoji) { 2 | window.md_twemoji_plugin = function(md) { 3 | md.renderer.rules.emoji = function(token, idx) { 4 | return twemoji.parse(token[idx].content, {folder: "svg", ext: ".svg"}); 5 | }; 6 | }; 7 | }(window.twemoji)); 8 | -------------------------------------------------------------------------------- /src/markdown/plugins/image.plugin.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Markdown-it extension 3 | * 4 | * Wraps default image renderer to provide additional 5 | * src attribute checks. 6 | * 7 | * GitLab returns relative images paths, but to display images 8 | * correctly we need absolute paths including path to repo. 9 | * 10 | * This plugin checks if path is relative and prefixes src 11 | * with GITLAB_HOST / GITLAB_REPO_URL if so. 12 | */ 13 | (function() { 14 | window.md_image_plugin = function(md) { 15 | var defaultRenderer = md.renderer.rules.image; 16 | 17 | function imageRenderer(tokens, idx, options, env, self) { 18 | var token = tokens[idx], 19 | srcIndex = token.attrIndex('src'), 20 | srcAttr = token.attrs[srcIndex][1]; 21 | 22 | if (srcAttr.indexOf("http://") !== 0 && srcAttr.indexOf("https://") !== 0) { 23 | token.attrs[srcIndex][1] = env.host_url + '/' + env.board_url + srcAttr; 24 | } 25 | 26 | return defaultRenderer(tokens, idx, options, env, self); 27 | } 28 | 29 | md.renderer.rules.image = imageRenderer; 30 | }; 31 | }()); 32 | -------------------------------------------------------------------------------- /src/markdown/plugins/link-target-blank.plugin.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Markdown-it extension 3 | * 4 | * Replaces default link_open renderer to add target=_blank 5 | * attribute to every link generated by markdown-it 6 | */ 7 | (function() { 8 | window.md_link_target_blank_plugin = function(md) { 9 | var defaultRenderer = md.renderer.rules.link_open || function(token, idx, options, env, self) { 10 | return self.renderToken(token, idx, options); 11 | }; 12 | 13 | function linkOpenRenderer(tokens, idx, options, env, self) { 14 | // If you are sure other plugins can't add `target` - drop check below 15 | var aIndex = tokens[idx].attrIndex('target'); 16 | var local = tokens[idx].attrIndex('data-link-local'); 17 | 18 | if (local < 0){ 19 | if (aIndex < 0) { 20 | tokens[idx].attrPush(['target', '_blank']); // add new attribute 21 | } else { 22 | tokens[idx].attrs[aIndex][1] = '_blank'; // replace value of existing attr 23 | } 24 | } 25 | 26 | // pass token to default renderer. 27 | return defaultRenderer(tokens, idx, options, env, self); 28 | } 29 | 30 | md.renderer.rules.link_open = linkOpenRenderer; 31 | }; 32 | }()); 33 | -------------------------------------------------------------------------------- /src/markdown/plugins/user-link.plugin.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Card link plugin for generate link to other card 3 | */ 4 | (function(){ 5 | window.md_user_link_plugin = function(md) { 6 | user_rule = function(state, silent){ 7 | var start = state.pos, 8 | regex = /@([a-z0-9\._-]+)/, 9 | max = state.posMax; 10 | 11 | if (state.src.charCodeAt(start) !== 0x40 || silent) { 12 | return false; 13 | } 14 | 15 | var matches = state.src.match(regex); 16 | 17 | if (! matches) { 18 | return false; 19 | } 20 | 21 | var login = matches[1]; 22 | var title = matches[0]; 23 | var board_name = state.env.host_url + '/' + state.env.board_url; 24 | 25 | token = state.push('link_open', 'a'); 26 | token.attrPush(['title', title]); 27 | token.attrPush(['href', state.env.host_url + '/' + login]); 28 | token.nesting = 1; 29 | 30 | token = state.push('text'); 31 | token.content = title; 32 | token.nesting = 0; 33 | 34 | token = state.push('link_close', 'a'); 35 | token.nesting = -1; 36 | state.pos = start + title.length; 37 | return true; 38 | }; 39 | 40 | md.inline.ruler.push('user_rule', user_rule); 41 | }; 42 | }()); 43 | -------------------------------------------------------------------------------- /src/markdown/services/markdown.service.js: -------------------------------------------------------------------------------- 1 | (function(angular, markdownit) { 2 | 'use strict'; 3 | 4 | angular.module('ll.markdown').provider('$markdown', [function() { 5 | return { 6 | opts: {}, 7 | plugins: [], 8 | config: function(options) { 9 | this.opts = options; 10 | }, 11 | registerPlugin: function(plugin) { 12 | this.plugins.push(plugin); 13 | }, 14 | $get: function() { 15 | var md = markdownit(this.opts); 16 | 17 | if (this.plugins.length !== 0) { 18 | for (var i = 0; i < this.plugins.length; i++) { 19 | md.use(this.plugins[i]); 20 | } 21 | } 22 | 23 | return md; 24 | } 25 | }; 26 | 27 | }]); 28 | })(window.angular, window.markdownit); 29 | -------------------------------------------------------------------------------- /src/modal/modal.module.js: -------------------------------------------------------------------------------- 1 | (function(angular) { 2 | angular.module('ll.modal', []); 3 | })(window.angular); 4 | -------------------------------------------------------------------------------- /src/modal/views/modal.html: -------------------------------------------------------------------------------- 1 |
2 |
7 |
8 |
16 |
17 |
18 |
19 | 20 | -------------------------------------------------------------------------------- /src/scss/_avatars.scss: -------------------------------------------------------------------------------- 1 | @each $key in a, c, d { 2 | .#{$key}-ava { 3 | background-color: $key-color-1 !important; 4 | } 5 | } 6 | 7 | @each $key in e, g, h { 8 | .#{$key}-ava { 9 | background-color: $key-color-2 !important; 10 | } 11 | } 12 | 13 | @each $key in i, k, l { 14 | .#{$key}-ava { 15 | background-color: $key-color-3 !important; 16 | } 17 | } 18 | 19 | @each $key in m, o, p { 20 | .#{$key}-ava { 21 | background-color: $key-color-4 !important; 22 | } 23 | } 24 | 25 | @each $key in q, s, t { 26 | .#{$key}-ava { 27 | background-color: $key-color-5 !important; 28 | } 29 | } 30 | 31 | @each $key in u, v, w { 32 | .#{$key}-ava { 33 | background-color: $key-color-6 !important; 34 | } 35 | } 36 | 37 | @each $key in x, y, z { 38 | .#{$key}-ava { 39 | background-color: $key-color-7 !important; 40 | } 41 | } 42 | 43 | @each $key in f, b, g { 44 | .#{$key}-ava { 45 | background-color: $key-color-8 !important; 46 | } 47 | } 48 | 49 | @each $key in n, r { 50 | .#{$key}-ava { 51 | background-color: $key-color-9 !important; 52 | } 53 | } 54 | -------------------------------------------------------------------------------- /src/scss/_datepicker.scss: -------------------------------------------------------------------------------- 1 | @import "angular-datepicker"; 2 | 3 | .create-milestone{ 4 | ._720kb-datepicker-calendar{ 5 | visibility: visible; 6 | min-width: 205px; 7 | ._720kb-datepicker-calendar-day:hover, 8 | ._720kb-datepicker-calendar-day{ 9 | &._720kb-datepicker-active{ 10 | background: rgba(0,0,0,0.1); 11 | } 12 | } 13 | } 14 | 15 | ._720kb-datepicker-calendar-header:nth-child(odd) { 16 | background: #008CBA; 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /src/scss/_emoji.scss: -------------------------------------------------------------------------------- 1 | .emoji { 2 | height: 1.3rem; 3 | } 4 | -------------------------------------------------------------------------------- /src/scss/_mdeditor.scss: -------------------------------------------------------------------------------- 1 | .mdeditor{ 2 | position: relative; 3 | .mdeditor-panel{ 4 | position: absolute; 5 | bottom: 0px; 6 | right: 10px; 7 | display: none; 8 | a.icon-edit{ 9 | font-size: 24px; 10 | color: #ccc; 11 | &:hover{ 12 | color: #999; 13 | } 14 | } 15 | 16 | } 17 | &:hover{ 18 | .mdeditor-panel{ 19 | display: block; 20 | } 21 | } 22 | .preview{ 23 | margin-bottom: 16px; 24 | padding: 9px; 25 | overflow: auto; 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /src/scss/_modal.scss: -------------------------------------------------------------------------------- 1 | body{ 2 | &.modal-open{ 3 | overflow: hidden; 4 | } 5 | .reveal-modal{ 6 | background: $reveal-overlay-bg; 7 | overflow-y: scroll; 8 | padding: 0; 9 | .reveal-modal-bg{ 10 | z-index: -1; 11 | display: block; 12 | background-color: transparent; 13 | } 14 | @media only screen and (max-width: $row-width) { 15 | .body-modal{ 16 | background-color: $white; 17 | padding: 0 0 10px 0; 18 | max-width: $row-width; 19 | margin: 0; 20 | min-height: 100%; 21 | position: relative; 22 | z-index: 101; 23 | h6 { 24 | color: #666; 25 | font-weight: 300; 26 | } 27 | } 28 | } 29 | 30 | @media only screen and (min-width: $row-width) { 31 | .body-modal{ 32 | background-color: $white; 33 | padding: 30px; 34 | max-width: $row-width; 35 | margin: 100px auto 50px auto; 36 | position: relative; 37 | z-index: 101; 38 | h6 { 39 | color: #666; 40 | font-weight: 300; 41 | } 42 | } 43 | 44 | } 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /src/scss/_top-bar.scss: -------------------------------------------------------------------------------- 1 | .top-bar{ 2 | .top-bar-section { 3 | ul{ 4 | width: auto; 5 | li { 6 | background-color: $topbar-bg-color; 7 | & > a{ 8 | display: inline-block; 9 | } 10 | } 11 | } 12 | 13 | .has-dropdown { 14 | &.moved > .dropdown{ 15 | margin-bottom: -45px; 16 | } 17 | } 18 | } 19 | 20 | @media #{$medium-only} { 21 | .top-bar-section { 22 | ul li > a { 23 | font-size: 1rem; 24 | padding-right: 15px 25 | } 26 | } 27 | } 28 | 29 | @media #{$small-only} { 30 | .top-bar-section{ 31 | ul{ 32 | display: inline-block; 33 | width: auto; 34 | li:not(.name) > a{ 35 | font-size: 1rem; 36 | padding-right: 0.9375rem; 37 | } 38 | li { 39 | display: inline-block; 40 | } 41 | } 42 | .has-dropdown > a{ 43 | &:after{ 44 | display: none; 45 | } 46 | } 47 | } 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /src/select/components/ll-select-clear.cmp.js: -------------------------------------------------------------------------------- 1 | (function(angular){ 2 | 'use strict'; 3 | 4 | angular.module("ll.select").component("llSelectClear",{ 5 | transclude: true, 6 | require: { 7 | selectCtrlOptions: '^llSelectOptions' 8 | }, 9 | bindings: { 10 | model: '=' 11 | }, 12 | templateUrl: CLIENT_VERSION + "/assets/html/select/views/clear.html", 13 | controller: function(){ 14 | var ctrl = this; 15 | 16 | ctrl.onClear = function(){ 17 | ctrl.selectCtrlOptions.selectCtrl.toggle(); 18 | if (ctrl.model) { 19 | ctrl.selectCtrlOptions.selectCtrl.onSelect(ctrl.model); 20 | } else { 21 | ctrl.selectCtrlOptions.selectCtrl.onSelect(null); 22 | } 23 | } 24 | } 25 | }); 26 | }(window.angular)); 27 | -------------------------------------------------------------------------------- /src/select/components/ll-select-option.js: -------------------------------------------------------------------------------- 1 | (function(angular){ 2 | 'use strict'; 3 | 4 | angular.module("ll.select").component("llSelectOption",{ 5 | transclude: true, 6 | bindings: { 7 | model: '=', 8 | onUpdate : '&' 9 | }, 10 | require: { 11 | selectCtrlOptions: '^llSelectOptions' 12 | }, 13 | templateUrl: CLIENT_VERSION + "/assets/html/select/views/option.html", 14 | controller: function() { 15 | var ctrl = this; 16 | this.$onInit = function() { 17 | ctrl.selectCtrlOptions.selectCtrl.addOption(this.model); 18 | }; 19 | 20 | ctrl.onSelect = function() { 21 | if (!ctrl.selectCtrlOptions.selectCtrl.multiply) { 22 | ctrl.selectCtrlOptions.selectCtrl.toggle(); 23 | } 24 | ctrl.selectCtrlOptions.selectCtrl.onSelect(this.model); 25 | }; 26 | 27 | ctrl.isChecked = function(){ 28 | return ctrl.selectCtrlOptions.selectCtrl.selected.indexOf(ctrl.model) !== -1 29 | }; 30 | }, 31 | }); 32 | }(window.angular)); 33 | -------------------------------------------------------------------------------- /src/select/components/ll-select-options.js: -------------------------------------------------------------------------------- 1 | (function(angular){ 2 | 'use strict'; 3 | 4 | angular.module("ll.select").component("llSelectOptions",{ 5 | transclude: true, 6 | bindings: { 7 | model: '=', 8 | onUpdate : '&' 9 | }, 10 | require: { 11 | selectCtrl: '^llSelect' 12 | }, 13 | templateUrl: CLIENT_VERSION + "/assets/html/select/views/options.html", 14 | }); 15 | }(window.angular)); 16 | -------------------------------------------------------------------------------- /src/select/components/ll-select-search.cml.js: -------------------------------------------------------------------------------- 1 | (function(angular){ 2 | 'use strict'; 3 | 4 | angular.module("ll.select").component("llSelectSearch",{ 5 | transclude: true, 6 | bindings: { 7 | model: '=', 8 | placeholder: '@' 9 | }, 10 | require: { 11 | selectCtrlOptions: '^llSelectOptions' 12 | }, 13 | templateUrl: CLIENT_VERSION + "/assets/html/select/views/search.html", 14 | controller: function(){ 15 | var ctrl = this; 16 | ctrl.$onInit = function(){ 17 | ctrl.model = ''; 18 | } 19 | } 20 | }); 21 | }(window.angular)); 22 | -------------------------------------------------------------------------------- /src/select/components/ll-select-selected.cmp.js: -------------------------------------------------------------------------------- 1 | (function(angular){ 2 | 'use strict'; 3 | 4 | angular.module("ll.select").component("llSelectSelected",{ 5 | transclude: true, 6 | bindings: { 7 | model: '=' 8 | }, 9 | require: { 10 | selectCtrl: '^llSelect' 11 | }, 12 | templateUrl: CLIENT_VERSION + "/assets/html/select/views/selected.html", 13 | controller: function(){ 14 | var ctrl = this; 15 | } 16 | }); 17 | 18 | }(window.angular)); 19 | -------------------------------------------------------------------------------- /src/select/components/ll-select-title.cmp.js: -------------------------------------------------------------------------------- 1 | (function(angular){ 2 | 'use strict'; 3 | 4 | angular.module("ll.select").component("llSelectTitle",{ 5 | transclude: true, 6 | require: { 7 | selectCtrl: '^llSelect' 8 | }, 9 | templateUrl: CLIENT_VERSION + "/assets/html/select/views/title.html", 10 | controller: function() { 11 | var ctrl = this; 12 | 13 | 14 | ctrl.toggle = function() { 15 | ctrl.selectCtrl.toggle(); 16 | }; 17 | }, 18 | }); 19 | 20 | }(window.angular)); 21 | -------------------------------------------------------------------------------- /src/select/components/ll-unselected.cmp.js: -------------------------------------------------------------------------------- 1 | (function(angular){ 2 | 'use strict'; 3 | 4 | angular.module("ll.select").component("llUnselected",{ 5 | transclude: true, 6 | require: { 7 | selectCtrl: '^llSelect' 8 | }, 9 | templateUrl: CLIENT_VERSION + "/assets/html/select/views/unselected.html" 10 | }); 11 | }(window.angular)); 12 | -------------------------------------------------------------------------------- /src/select/select.module.js: -------------------------------------------------------------------------------- 1 | (function (angular) { 2 | 'use strict'; 3 | 4 | angular.module('ll.select', []); 5 | })(window.angular); 6 | -------------------------------------------------------------------------------- /src/select/views/clear.html: -------------------------------------------------------------------------------- 1 | 7 |
8 |
9 |
10 | -------------------------------------------------------------------------------- /src/select/views/option.html: -------------------------------------------------------------------------------- 1 | 25 |
26 | 28 |   30 | 31 |
32 |
33 | -------------------------------------------------------------------------------- /src/select/views/options.html: -------------------------------------------------------------------------------- 1 | 13 |
15 |
16 |
17 | -------------------------------------------------------------------------------- /src/select/views/search.html: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /src/select/views/select.html: -------------------------------------------------------------------------------- 1 | 6 |
7 |
8 | -------------------------------------------------------------------------------- /src/select/views/selected.html: -------------------------------------------------------------------------------- 1 |
2 | -------------------------------------------------------------------------------- /src/select/views/title.html: -------------------------------------------------------------------------------- 1 |
2 |
3 |
4 |
5 | 6 |
7 |
  8 | 9 |   10 | 11 |
12 |
13 |
14 | -------------------------------------------------------------------------------- /src/select/views/unselected.html: -------------------------------------------------------------------------------- 1 |
2 | -------------------------------------------------------------------------------- /src/static/images/favicons/android-chrome-144x144.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/leanlabsio/kanban/0a2a8809c10c5594be08838c48e1518dc70718d4/src/static/images/favicons/android-chrome-144x144.png -------------------------------------------------------------------------------- /src/static/images/favicons/android-chrome-192x192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/leanlabsio/kanban/0a2a8809c10c5594be08838c48e1518dc70718d4/src/static/images/favicons/android-chrome-192x192.png -------------------------------------------------------------------------------- /src/static/images/favicons/android-chrome-36x36.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/leanlabsio/kanban/0a2a8809c10c5594be08838c48e1518dc70718d4/src/static/images/favicons/android-chrome-36x36.png -------------------------------------------------------------------------------- /src/static/images/favicons/android-chrome-48x48.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/leanlabsio/kanban/0a2a8809c10c5594be08838c48e1518dc70718d4/src/static/images/favicons/android-chrome-48x48.png -------------------------------------------------------------------------------- /src/static/images/favicons/android-chrome-72x72.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/leanlabsio/kanban/0a2a8809c10c5594be08838c48e1518dc70718d4/src/static/images/favicons/android-chrome-72x72.png -------------------------------------------------------------------------------- /src/static/images/favicons/android-chrome-96x96.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/leanlabsio/kanban/0a2a8809c10c5594be08838c48e1518dc70718d4/src/static/images/favicons/android-chrome-96x96.png -------------------------------------------------------------------------------- /src/static/images/favicons/apple-touch-icon-114x114.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/leanlabsio/kanban/0a2a8809c10c5594be08838c48e1518dc70718d4/src/static/images/favicons/apple-touch-icon-114x114.png -------------------------------------------------------------------------------- /src/static/images/favicons/apple-touch-icon-120x120.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/leanlabsio/kanban/0a2a8809c10c5594be08838c48e1518dc70718d4/src/static/images/favicons/apple-touch-icon-120x120.png -------------------------------------------------------------------------------- /src/static/images/favicons/apple-touch-icon-144x144.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/leanlabsio/kanban/0a2a8809c10c5594be08838c48e1518dc70718d4/src/static/images/favicons/apple-touch-icon-144x144.png -------------------------------------------------------------------------------- /src/static/images/favicons/apple-touch-icon-152x152.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/leanlabsio/kanban/0a2a8809c10c5594be08838c48e1518dc70718d4/src/static/images/favicons/apple-touch-icon-152x152.png -------------------------------------------------------------------------------- /src/static/images/favicons/apple-touch-icon-180x180.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/leanlabsio/kanban/0a2a8809c10c5594be08838c48e1518dc70718d4/src/static/images/favicons/apple-touch-icon-180x180.png -------------------------------------------------------------------------------- /src/static/images/favicons/apple-touch-icon-57x57.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/leanlabsio/kanban/0a2a8809c10c5594be08838c48e1518dc70718d4/src/static/images/favicons/apple-touch-icon-57x57.png -------------------------------------------------------------------------------- /src/static/images/favicons/apple-touch-icon-60x60.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/leanlabsio/kanban/0a2a8809c10c5594be08838c48e1518dc70718d4/src/static/images/favicons/apple-touch-icon-60x60.png -------------------------------------------------------------------------------- /src/static/images/favicons/apple-touch-icon-72x72.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/leanlabsio/kanban/0a2a8809c10c5594be08838c48e1518dc70718d4/src/static/images/favicons/apple-touch-icon-72x72.png -------------------------------------------------------------------------------- /src/static/images/favicons/apple-touch-icon-76x76.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/leanlabsio/kanban/0a2a8809c10c5594be08838c48e1518dc70718d4/src/static/images/favicons/apple-touch-icon-76x76.png -------------------------------------------------------------------------------- /src/static/images/favicons/apple-touch-icon-precomposed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/leanlabsio/kanban/0a2a8809c10c5594be08838c48e1518dc70718d4/src/static/images/favicons/apple-touch-icon-precomposed.png -------------------------------------------------------------------------------- /src/static/images/favicons/apple-touch-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/leanlabsio/kanban/0a2a8809c10c5594be08838c48e1518dc70718d4/src/static/images/favicons/apple-touch-icon.png -------------------------------------------------------------------------------- /src/static/images/favicons/favicon-16x16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/leanlabsio/kanban/0a2a8809c10c5594be08838c48e1518dc70718d4/src/static/images/favicons/favicon-16x16.png -------------------------------------------------------------------------------- /src/static/images/favicons/favicon-194x194.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/leanlabsio/kanban/0a2a8809c10c5594be08838c48e1518dc70718d4/src/static/images/favicons/favicon-194x194.png -------------------------------------------------------------------------------- /src/static/images/favicons/favicon-32x32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/leanlabsio/kanban/0a2a8809c10c5594be08838c48e1518dc70718d4/src/static/images/favicons/favicon-32x32.png -------------------------------------------------------------------------------- /src/static/images/favicons/favicon-96x96.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/leanlabsio/kanban/0a2a8809c10c5594be08838c48e1518dc70718d4/src/static/images/favicons/favicon-96x96.png -------------------------------------------------------------------------------- /src/static/images/favicons/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/leanlabsio/kanban/0a2a8809c10c5594be08838c48e1518dc70718d4/src/static/images/favicons/favicon.ico -------------------------------------------------------------------------------- /src/static/images/favicons/mstile-144x144.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/leanlabsio/kanban/0a2a8809c10c5594be08838c48e1518dc70718d4/src/static/images/favicons/mstile-144x144.png -------------------------------------------------------------------------------- /src/static/images/favicons/mstile-150x150.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/leanlabsio/kanban/0a2a8809c10c5594be08838c48e1518dc70718d4/src/static/images/favicons/mstile-150x150.png -------------------------------------------------------------------------------- /src/static/images/favicons/mstile-310x150.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/leanlabsio/kanban/0a2a8809c10c5594be08838c48e1518dc70718d4/src/static/images/favicons/mstile-310x150.png -------------------------------------------------------------------------------- /src/static/images/favicons/mstile-310x310.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/leanlabsio/kanban/0a2a8809c10c5594be08838c48e1518dc70718d4/src/static/images/favicons/mstile-310x310.png -------------------------------------------------------------------------------- /src/static/images/favicons/mstile-70x70.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/leanlabsio/kanban/0a2a8809c10c5594be08838c48e1518dc70718d4/src/static/images/favicons/mstile-70x70.png -------------------------------------------------------------------------------- /src/user/controllers/signup.ctrl.js: -------------------------------------------------------------------------------- 1 | (function(angular) { 2 | 'use strict'; 3 | 4 | angular.module('gitlabKBApp.user').controller('SignupController', [ 5 | '$scope', 6 | '$http', 7 | '$state', 8 | 'AuthService', 9 | 'host_url', 10 | 'store', 11 | function($scope, $http, $state, AuthService, host_url, store) { 12 | $scope.user = {}; 13 | $scope.data = { 14 | errors: [] 15 | }; 16 | $scope.isSaving = false; 17 | $scope.host_url = host_url; 18 | 19 | $scope.signup = function() { 20 | $scope.isSaving = true; 21 | AuthService.register($scope.user).then(function(result) { 22 | $http.defaults.headers.common['X-KB-Access-Token'] = result; 23 | var state = store.get('state'); 24 | if (state) { 25 | $state.go(state.name, state.params); 26 | store.remove('state'); 27 | } else { 28 | $state.go('board.boards'); 29 | } 30 | }, function(result) { 31 | $scope.data.errors.push(result.data.message); 32 | $scope.isSaving = false; 33 | }); 34 | }; 35 | } 36 | ]); 37 | })(window.angular); 38 | -------------------------------------------------------------------------------- /src/user/views/oauth.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /src/websocket/websocket.module.js: -------------------------------------------------------------------------------- 1 | (function(angular) { 2 | 'use strict'; 3 | 4 | angular.module('gitlabKBApp.websocket', []); 5 | 6 | })(window.angular); 7 | -------------------------------------------------------------------------------- /templates/oauth.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /vendor/github.com/BurntSushi/toml/.gitignore: -------------------------------------------------------------------------------- 1 | TAGS 2 | tags 3 | .*.swp 4 | tomlcheck/tomlcheck 5 | toml.test 6 | -------------------------------------------------------------------------------- /vendor/github.com/BurntSushi/toml/.travis.yml: -------------------------------------------------------------------------------- 1 | language: go 2 | go: 3 | - 1.1 4 | - 1.2 5 | - tip 6 | install: 7 | - go install ./... 8 | - go get github.com/BurntSushi/toml-test 9 | script: 10 | - export PATH="$PATH:$HOME/gopath/bin" 11 | - make test 12 | 13 | -------------------------------------------------------------------------------- /vendor/github.com/BurntSushi/toml/COMPATIBLE: -------------------------------------------------------------------------------- 1 | Compatible with TOML version 2 | [v0.2.0](https://github.com/mojombo/toml/blob/master/versions/toml-v0.2.0.md) 3 | 4 | -------------------------------------------------------------------------------- /vendor/github.com/BurntSushi/toml/COPYING: -------------------------------------------------------------------------------- 1 | DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE 2 | Version 2, December 2004 3 | 4 | Copyright (C) 2004 Sam Hocevar 5 | 6 | Everyone is permitted to copy and distribute verbatim or modified 7 | copies of this license document, and changing it is allowed as long 8 | as the name is changed. 9 | 10 | DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE 11 | TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 12 | 13 | 0. You just DO WHAT THE FUCK YOU WANT TO. 14 | 15 | -------------------------------------------------------------------------------- /vendor/github.com/BurntSushi/toml/Makefile: -------------------------------------------------------------------------------- 1 | install: 2 | go install ./... 3 | 4 | test: install 5 | go test -v 6 | toml-test toml-test-decoder 7 | toml-test -encoder toml-test-encoder 8 | 9 | fmt: 10 | gofmt -w *.go */*.go 11 | colcheck *.go */*.go 12 | 13 | tags: 14 | find ./ -name '*.go' -print0 | xargs -0 gotags > TAGS 15 | 16 | push: 17 | git push origin master 18 | git push github master 19 | 20 | -------------------------------------------------------------------------------- /vendor/github.com/BurntSushi/toml/cmd/toml-test-decoder/COPYING: -------------------------------------------------------------------------------- 1 | DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE 2 | Version 2, December 2004 3 | 4 | Copyright (C) 2004 Sam Hocevar 5 | 6 | Everyone is permitted to copy and distribute verbatim or modified 7 | copies of this license document, and changing it is allowed as long 8 | as the name is changed. 9 | 10 | DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE 11 | TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 12 | 13 | 0. You just DO WHAT THE FUCK YOU WANT TO. 14 | 15 | -------------------------------------------------------------------------------- /vendor/github.com/BurntSushi/toml/cmd/toml-test-decoder/README.md: -------------------------------------------------------------------------------- 1 | # Implements the TOML test suite interface 2 | 3 | This is an implementation of the interface expected by 4 | [toml-test](https://github.com/BurntSushi/toml-test) for my 5 | [toml parser written in Go](https://github.com/BurntSushi/toml). 6 | In particular, it maps TOML data on `stdin` to a JSON format on `stdout`. 7 | 8 | 9 | Compatible with TOML version 10 | [v0.2.0](https://github.com/mojombo/toml/blob/master/versions/toml-v0.2.0.md) 11 | 12 | Compatible with `toml-test` version 13 | [v0.2.0](https://github.com/BurntSushi/toml-test/tree/v0.2.0) 14 | 15 | -------------------------------------------------------------------------------- /vendor/github.com/BurntSushi/toml/cmd/toml-test-encoder/COPYING: -------------------------------------------------------------------------------- 1 | DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE 2 | Version 2, December 2004 3 | 4 | Copyright (C) 2004 Sam Hocevar 5 | 6 | Everyone is permitted to copy and distribute verbatim or modified 7 | copies of this license document, and changing it is allowed as long 8 | as the name is changed. 9 | 10 | DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE 11 | TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 12 | 13 | 0. You just DO WHAT THE FUCK YOU WANT TO. 14 | 15 | -------------------------------------------------------------------------------- /vendor/github.com/BurntSushi/toml/cmd/toml-test-encoder/README.md: -------------------------------------------------------------------------------- 1 | # Implements the TOML test suite interface for TOML encoders 2 | 3 | This is an implementation of the interface expected by 4 | [toml-test](https://github.com/BurntSushi/toml-test) for the 5 | [TOML encoder](https://github.com/BurntSushi/toml). 6 | In particular, it maps JSON data on `stdin` to a TOML format on `stdout`. 7 | 8 | 9 | Compatible with TOML version 10 | [v0.2.0](https://github.com/mojombo/toml/blob/master/versions/toml-v0.2.0.md) 11 | 12 | Compatible with `toml-test` version 13 | [v0.2.0](https://github.com/BurntSushi/toml-test/tree/v0.2.0) 14 | 15 | -------------------------------------------------------------------------------- /vendor/github.com/BurntSushi/toml/cmd/tomlv/COPYING: -------------------------------------------------------------------------------- 1 | DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE 2 | Version 2, December 2004 3 | 4 | Copyright (C) 2004 Sam Hocevar 5 | 6 | Everyone is permitted to copy and distribute verbatim or modified 7 | copies of this license document, and changing it is allowed as long 8 | as the name is changed. 9 | 10 | DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE 11 | TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 12 | 13 | 0. You just DO WHAT THE FUCK YOU WANT TO. 14 | 15 | -------------------------------------------------------------------------------- /vendor/github.com/BurntSushi/toml/cmd/tomlv/README.md: -------------------------------------------------------------------------------- 1 | # TOML Validator 2 | 3 | If Go is installed, it's simple to try it out: 4 | 5 | ```bash 6 | go get github.com/BurntSushi/toml/cmd/tomlv 7 | tomlv some-toml-file.toml 8 | ``` 9 | 10 | You can see the types of every key in a TOML file with: 11 | 12 | ```bash 13 | tomlv -types some-toml-file.toml 14 | ``` 15 | 16 | At the moment, only one error message is reported at a time. Error messages 17 | include line numbers. No output means that the files given are valid TOML, or 18 | there is a bug in `tomlv`. 19 | 20 | Compatible with TOML version 21 | [v0.1.0](https://github.com/mojombo/toml/blob/master/versions/toml-v0.1.0.md) 22 | 23 | -------------------------------------------------------------------------------- /vendor/github.com/BurntSushi/toml/cmd/tomlv/main.go: -------------------------------------------------------------------------------- 1 | // Command tomlv validates TOML documents and prints each key's type. 2 | package main 3 | 4 | import ( 5 | "flag" 6 | "fmt" 7 | "log" 8 | "os" 9 | "path" 10 | "strings" 11 | "text/tabwriter" 12 | 13 | "github.com/BurntSushi/toml" 14 | ) 15 | 16 | var ( 17 | flagTypes = false 18 | ) 19 | 20 | func init() { 21 | log.SetFlags(0) 22 | 23 | flag.BoolVar(&flagTypes, "types", flagTypes, 24 | "When set, the types of every defined key will be shown.") 25 | 26 | flag.Usage = usage 27 | flag.Parse() 28 | } 29 | 30 | func usage() { 31 | log.Printf("Usage: %s toml-file [ toml-file ... ]\n", 32 | path.Base(os.Args[0])) 33 | flag.PrintDefaults() 34 | 35 | os.Exit(1) 36 | } 37 | 38 | func main() { 39 | if flag.NArg() < 1 { 40 | flag.Usage() 41 | } 42 | for _, f := range flag.Args() { 43 | var tmp interface{} 44 | md, err := toml.DecodeFile(f, &tmp) 45 | if err != nil { 46 | log.Fatalf("Error in '%s': %s", f, err) 47 | } 48 | if flagTypes { 49 | printTypes(md) 50 | } 51 | } 52 | } 53 | 54 | func printTypes(md toml.MetaData) { 55 | tabw := tabwriter.NewWriter(os.Stdout, 0, 0, 2, ' ', 0) 56 | for _, key := range md.Keys() { 57 | fmt.Fprintf(tabw, "%s%s\t%s\n", 58 | strings.Repeat(" ", len(key)-1), key, md.Type(key...)) 59 | } 60 | tabw.Flush() 61 | } 62 | -------------------------------------------------------------------------------- /vendor/github.com/BurntSushi/toml/doc.go: -------------------------------------------------------------------------------- 1 | /* 2 | Package toml provides facilities for decoding and encoding TOML configuration 3 | files via reflection. There is also support for delaying decoding with 4 | the Primitive type, and querying the set of keys in a TOML document with the 5 | MetaData type. 6 | 7 | The specification implemented: https://github.com/mojombo/toml 8 | 9 | The sub-command github.com/BurntSushi/toml/cmd/tomlv can be used to verify 10 | whether a file is a valid TOML document. It can also be used to print the 11 | type of each key in a TOML document. 12 | 13 | Testing 14 | 15 | There are two important types of tests used for this package. The first is 16 | contained inside '*_test.go' files and uses the standard Go unit testing 17 | framework. These tests are primarily devoted to holistically testing the 18 | decoder and encoder. 19 | 20 | The second type of testing is used to verify the implementation's adherence 21 | to the TOML specification. These tests have been factored into their own 22 | project: https://github.com/BurntSushi/toml-test 23 | 24 | The reason the tests are in a separate project is so that they can be used by 25 | any implementation of TOML. Namely, it is language agnostic. 26 | */ 27 | package toml 28 | -------------------------------------------------------------------------------- /vendor/github.com/BurntSushi/toml/encoding_types.go: -------------------------------------------------------------------------------- 1 | // +build go1.2 2 | 3 | package toml 4 | 5 | // In order to support Go 1.1, we define our own TextMarshaler and 6 | // TextUnmarshaler types. For Go 1.2+, we just alias them with the 7 | // standard library interfaces. 8 | 9 | import ( 10 | "encoding" 11 | ) 12 | 13 | // TextMarshaler is a synonym for encoding.TextMarshaler. It is defined here 14 | // so that Go 1.1 can be supported. 15 | type TextMarshaler encoding.TextMarshaler 16 | 17 | // TextUnmarshaler is a synonym for encoding.TextUnmarshaler. It is defined 18 | // here so that Go 1.1 can be supported. 19 | type TextUnmarshaler encoding.TextUnmarshaler 20 | -------------------------------------------------------------------------------- /vendor/github.com/BurntSushi/toml/encoding_types_1.1.go: -------------------------------------------------------------------------------- 1 | // +build !go1.2 2 | 3 | package toml 4 | 5 | // These interfaces were introduced in Go 1.2, so we add them manually when 6 | // compiling for Go 1.1. 7 | 8 | // TextMarshaler is a synonym for encoding.TextMarshaler. It is defined here 9 | // so that Go 1.1 can be supported. 10 | type TextMarshaler interface { 11 | MarshalText() (text []byte, err error) 12 | } 13 | 14 | // TextUnmarshaler is a synonym for encoding.TextUnmarshaler. It is defined 15 | // here so that Go 1.1 can be supported. 16 | type TextUnmarshaler interface { 17 | UnmarshalText(text []byte) error 18 | } 19 | -------------------------------------------------------------------------------- /vendor/github.com/BurntSushi/toml/session.vim: -------------------------------------------------------------------------------- 1 | au BufWritePost *.go silent!make tags > /dev/null 2>&1 2 | -------------------------------------------------------------------------------- /vendor/github.com/Unknwon/com/.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 | .idea 10 | 11 | # Architecture specific extensions/prefixes 12 | *.[568vq] 13 | [568vq].out 14 | 15 | *.cgo1.go 16 | *.cgo2.c 17 | _cgo_defun.c 18 | _cgo_gotypes.go 19 | _cgo_export.* 20 | 21 | _testmain.go 22 | 23 | *.exe 24 | *.iml 25 | -------------------------------------------------------------------------------- /vendor/github.com/Unknwon/com/.travis.yml: -------------------------------------------------------------------------------- 1 | language: go 2 | 3 | go: 4 | - 1.2 5 | - 1.3 6 | - 1.4 7 | - tip 8 | 9 | install: go get -v -t 10 | 11 | notifications: 12 | email: 13 | - u@gogs.io -------------------------------------------------------------------------------- /vendor/github.com/Unknwon/com/README.md: -------------------------------------------------------------------------------- 1 | Common Functions 2 | ================ 3 | 4 | [![Build Status](https://travis-ci.org/Unknwon/com.svg)](https://travis-ci.org/Unknwon/com) [![Go Walker](http://gowalker.org/api/v1/badge)](http://gowalker.org/github.com/Unknwon/com) 5 | 6 | This is an open source project for commonly used functions for the Go programming language. 7 | 8 | This package need >= **go 1.2** 9 | 10 | Code Convention: based on [Go Code Convention](https://github.com/Unknwon/go-code-convention). 11 | 12 | ## Contribute 13 | 14 | Your contribute is welcome, but you have to check following steps after you added some functions and commit them: 15 | 16 | 1. Make sure you wrote user-friendly comments for **all functions** . 17 | 2. Make sure you wrote test cases with any possible condition for **all functions** in file `*_test.go`. 18 | 3. Make sure you wrote benchmarks for **all functions** in file `*_test.go`. 19 | 4. Make sure you wrote useful examples for **all functions** in file `example_test.go`. 20 | 5. Make sure you ran `go test` and got **PASS** . 21 | -------------------------------------------------------------------------------- /vendor/github.com/Unknwon/com/math.go: -------------------------------------------------------------------------------- 1 | // Copyright 2014 com authors 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"): you may 4 | // not use this file except in compliance with the License. You may obtain 5 | // a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 11 | // WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 12 | // License for the specific language governing permissions and limitations 13 | // under the License. 14 | 15 | package com 16 | 17 | // PowInt is int type of math.Pow function. 18 | func PowInt(x int, y int) int { 19 | if y <= 0 { 20 | return 1 21 | } else { 22 | if y % 2 == 0 { 23 | sqrt := PowInt(x, y/2) 24 | return sqrt * sqrt 25 | } else { 26 | return PowInt(x, y-1) * x 27 | } 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /vendor/github.com/Unknwon/com/url.go: -------------------------------------------------------------------------------- 1 | // Copyright 2013 com authors 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"): you may 4 | // not use this file except in compliance with the License. You may obtain 5 | // a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 11 | // WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 12 | // License for the specific language governing permissions and limitations 13 | // under the License. 14 | 15 | package com 16 | 17 | import ( 18 | "encoding/base64" 19 | "net/url" 20 | ) 21 | 22 | // url encode string, is + not %20 23 | func UrlEncode(str string) string { 24 | return url.QueryEscape(str) 25 | } 26 | 27 | // url decode string 28 | func UrlDecode(str string) (string, error) { 29 | return url.QueryUnescape(str) 30 | } 31 | 32 | // base64 encode 33 | func Base64Encode(str string) string { 34 | return base64.StdEncoding.EncodeToString([]byte(str)) 35 | } 36 | 37 | // base64 decode 38 | func Base64Decode(str string) (string, error) { 39 | s, e := base64.StdEncoding.DecodeString(str) 40 | return string(s), e 41 | } 42 | -------------------------------------------------------------------------------- /vendor/github.com/dgrijalva/jwt-go/.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | bin 3 | 4 | 5 | -------------------------------------------------------------------------------- /vendor/github.com/dgrijalva/jwt-go/.travis.yml: -------------------------------------------------------------------------------- 1 | language: go 2 | 3 | go: 4 | - 1.3.3 5 | - 1.4.2 6 | - 1.5 7 | - tip 8 | -------------------------------------------------------------------------------- /vendor/github.com/dgrijalva/jwt-go/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2012 Dave Grijalva 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 4 | 5 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 6 | 7 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 8 | 9 | -------------------------------------------------------------------------------- /vendor/github.com/dgrijalva/jwt-go/doc.go: -------------------------------------------------------------------------------- 1 | // Package jwt is a Go implementation of JSON Web Tokens: http://self-issued.info/docs/draft-jones-json-web-token.html 2 | // 3 | // See README.md for more info. 4 | package jwt 5 | -------------------------------------------------------------------------------- /vendor/github.com/dgrijalva/jwt-go/errors.go: -------------------------------------------------------------------------------- 1 | package jwt 2 | 3 | import ( 4 | "errors" 5 | ) 6 | 7 | // Error constants 8 | var ( 9 | ErrInvalidKey = errors.New("key is invalid or of invalid type") 10 | ErrHashUnavailable = errors.New("the requested hash function is unavailable") 11 | ErrNoTokenInRequest = errors.New("no token present in request") 12 | ) 13 | 14 | // The errors that might occur when parsing and validating a token 15 | const ( 16 | ValidationErrorMalformed uint32 = 1 << iota // Token is malformed 17 | ValidationErrorUnverifiable // Token could not be verified because of signing problems 18 | ValidationErrorSignatureInvalid // Signature validation failed 19 | ValidationErrorExpired // Exp validation failed 20 | ValidationErrorNotValidYet // NBF validation failed 21 | ) 22 | 23 | // The error from Parse if token is not valid 24 | type ValidationError struct { 25 | err string 26 | Errors uint32 // bitfield. see ValidationError... constants 27 | } 28 | 29 | // Validation error is an error type 30 | func (e ValidationError) Error() string { 31 | if e.err == "" { 32 | return "token is invalid" 33 | } 34 | return e.err 35 | } 36 | 37 | // No errors 38 | func (e *ValidationError) valid() bool { 39 | if e.Errors > 0 { 40 | return false 41 | } 42 | return true 43 | } 44 | -------------------------------------------------------------------------------- /vendor/github.com/dgrijalva/jwt-go/signing_method.go: -------------------------------------------------------------------------------- 1 | package jwt 2 | 3 | var signingMethods = map[string]func() SigningMethod{} 4 | 5 | // Implement SigningMethod to add new methods for signing or verifying tokens. 6 | type SigningMethod interface { 7 | Verify(signingString, signature string, key interface{}) error // Returns nil if signature is valid 8 | Sign(signingString string, key interface{}) (string, error) // Returns encoded signature or error 9 | Alg() string // returns the alg identifier for this method (example: 'HS256') 10 | } 11 | 12 | // Register the "alg" name and a factory function for signing method. 13 | // This is typically done during init() in the method's implementation 14 | func RegisterSigningMethod(alg string, f func() SigningMethod) { 15 | signingMethods[alg] = f 16 | } 17 | 18 | // Get a signing method from an "alg" string 19 | func GetSigningMethod(alg string) (method SigningMethod) { 20 | if methodF, ok := signingMethods[alg]; ok { 21 | method = methodF() 22 | } 23 | return 24 | } 25 | -------------------------------------------------------------------------------- /vendor/github.com/dgrijalva/jwt-go/test/ec256-private.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN EC PRIVATE KEY----- 2 | MHcCAQEEIAh5qA3rmqQQuu0vbKV/+zouz/y/Iy2pLpIcWUSyImSwoAoGCCqGSM49 3 | AwEHoUQDQgAEYD54V/vp+54P9DXarYqx4MPcm+HKRIQzNasYSoRQHQ/6S6Ps8tpM 4 | cT+KvIIC8W/e9k0W7Cm72M1P9jU7SLf/vg== 5 | -----END EC PRIVATE KEY----- 6 | -------------------------------------------------------------------------------- /vendor/github.com/dgrijalva/jwt-go/test/ec256-public.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN PUBLIC KEY----- 2 | MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEYD54V/vp+54P9DXarYqx4MPcm+HK 3 | RIQzNasYSoRQHQ/6S6Ps8tpMcT+KvIIC8W/e9k0W7Cm72M1P9jU7SLf/vg== 4 | -----END PUBLIC KEY----- 5 | -------------------------------------------------------------------------------- /vendor/github.com/dgrijalva/jwt-go/test/ec384-private.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN EC PRIVATE KEY----- 2 | MIGkAgEBBDCaCvMHKhcG/qT7xsNLYnDT7sE/D+TtWIol1ROdaK1a564vx5pHbsRy 3 | SEKcIxISi1igBwYFK4EEACKhZANiAATYa7rJaU7feLMqrAx6adZFNQOpaUH/Uylb 4 | ZLriOLON5YFVwtVUpO1FfEXZUIQpptRPtc5ixIPY658yhBSb6irfIJUSP9aYTflJ 5 | GKk/mDkK4t8mWBzhiD5B6jg9cEGhGgA= 6 | -----END EC PRIVATE KEY----- 7 | -------------------------------------------------------------------------------- /vendor/github.com/dgrijalva/jwt-go/test/ec384-public.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN PUBLIC KEY----- 2 | MHYwEAYHKoZIzj0CAQYFK4EEACIDYgAE2Gu6yWlO33izKqwMemnWRTUDqWlB/1Mp 3 | W2S64jizjeWBVcLVVKTtRXxF2VCEKabUT7XOYsSD2OufMoQUm+oq3yCVEj/WmE35 4 | SRipP5g5CuLfJlgc4Yg+Qeo4PXBBoRoA 5 | -----END PUBLIC KEY----- 6 | -------------------------------------------------------------------------------- /vendor/github.com/dgrijalva/jwt-go/test/ec512-private.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN EC PRIVATE KEY----- 2 | MIHcAgEBBEIB0pE4uFaWRx7t03BsYlYvF1YvKaBGyvoakxnodm9ou0R9wC+sJAjH 3 | QZZJikOg4SwNqgQ/hyrOuDK2oAVHhgVGcYmgBwYFK4EEACOhgYkDgYYABAAJXIuw 4 | 12MUzpHggia9POBFYXSxaOGKGbMjIyDI+6q7wi7LMw3HgbaOmgIqFG72o8JBQwYN 5 | 4IbXHf+f86CRY1AA2wHzbHvt6IhkCXTNxBEffa1yMUgu8n9cKKF2iLgyQKcKqW33 6 | 8fGOw/n3Rm2Yd/EB56u2rnD29qS+nOM9eGS+gy39OQ== 7 | -----END EC PRIVATE KEY----- 8 | -------------------------------------------------------------------------------- /vendor/github.com/dgrijalva/jwt-go/test/ec512-public.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN PUBLIC KEY----- 2 | MIGbMBAGByqGSM49AgEGBSuBBAAjA4GGAAQACVyLsNdjFM6R4IImvTzgRWF0sWjh 3 | ihmzIyMgyPuqu8IuyzMNx4G2jpoCKhRu9qPCQUMGDeCG1x3/n/OgkWNQANsB82x7 4 | 7eiIZAl0zcQRH32tcjFILvJ/XCihdoi4MkCnCqlt9/HxjsP590ZtmHfxAeertq5w 5 | 9vakvpzjPXhkvoMt/Tk= 6 | -----END PUBLIC KEY----- 7 | -------------------------------------------------------------------------------- /vendor/github.com/dgrijalva/jwt-go/test/hmacTestKey: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/leanlabsio/kanban/0a2a8809c10c5594be08838c48e1518dc70718d4/vendor/github.com/dgrijalva/jwt-go/test/hmacTestKey -------------------------------------------------------------------------------- /vendor/github.com/dgrijalva/jwt-go/test/sample_key.pub: -------------------------------------------------------------------------------- 1 | -----BEGIN PUBLIC KEY----- 2 | MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA4f5wg5l2hKsTeNem/V41 3 | fGnJm6gOdrj8ym3rFkEU/wT8RDtnSgFEZOQpHEgQ7JL38xUfU0Y3g6aYw9QT0hJ7 4 | mCpz9Er5qLaMXJwZxzHzAahlfA0icqabvJOMvQtzD6uQv6wPEyZtDTWiQi9AXwBp 5 | HssPnpYGIn20ZZuNlX2BrClciHhCPUIIZOQn/MmqTD31jSyjoQoV7MhhMTATKJx2 6 | XrHhR+1DcKJzQBSTAGnpYVaqpsARap+nwRipr3nUTuxyGohBTSmjJ2usSeQXHI3b 7 | ODIRe1AuTyHceAbewn8b462yEWKARdpd9AjQW5SIVPfdsz5B6GlYQ5LdYKtznTuy 8 | 7wIDAQAB 9 | -----END PUBLIC KEY----- 10 | -------------------------------------------------------------------------------- /vendor/github.com/elazarl/go-bindata-assetfs/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2014, Elazar Leibovich 2 | All rights reserved. 3 | 4 | Redistribution and use in source and binary forms, with or without 5 | modification, are permitted provided that the following conditions are met: 6 | 7 | * Redistributions of source code must retain the above copyright notice, this 8 | list of conditions and the following disclaimer. 9 | 10 | * Redistributions in binary form must reproduce the above copyright notice, 11 | this list of conditions and the following disclaimer in the documentation 12 | and/or other materials provided with the distribution. 13 | 14 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 15 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 16 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 17 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 18 | FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 19 | DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 20 | SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 21 | CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 22 | OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 23 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 24 | -------------------------------------------------------------------------------- /vendor/github.com/elazarl/go-bindata-assetfs/README.md: -------------------------------------------------------------------------------- 1 | # go-bindata-assetfs 2 | 3 | Serve embedded files from [jteeuwen/go-bindata](https://github.com/jteeuwen/go-bindata) with `net/http`. 4 | 5 | [GoDoc](http://godoc.org/github.com/elazarl/go-bindata-assetfs) 6 | 7 | ### Installation 8 | 9 | Install with 10 | 11 | $ go get github.com/jteeuwen/go-bindata/... 12 | $ go get github.com/elazarl/go-bindata-assetfs/... 13 | 14 | ### Creating embedded data 15 | 16 | Usage is identical to [jteeuwen/go-bindata](https://github.com/jteeuwen/go-bindata) usage, 17 | instead of running `go-bindata` run `go-bindata-assetfs`. 18 | 19 | The tool will create a `bindata_assetfs.go` file, which contains the embedded data. 20 | 21 | A typical use case is 22 | 23 | $ go-bindata-assetfs data/... 24 | 25 | ### Using assetFS in your code 26 | 27 | The generated file provides an `assetFS()` function that returns a `http.Filesystem` 28 | wrapping the embedded files. What you usually want to do is: 29 | 30 | http.Handle("/", http.FileServer(assetFS())) 31 | 32 | This would run an HTTP server serving the embedded files. 33 | 34 | ## Without running binary tool 35 | 36 | You can always just run the `go-bindata` tool, and then 37 | 38 | use 39 | 40 | import "github.com/elazarl/go-bindata-assetfs" 41 | ... 42 | http.Handle("/", 43 | http.FileServer( 44 | &assetfs.AssetFS{Asset: Asset, AssetDir: AssetDir, AssetInfo: AssetInfo, Prefix: "data"})) 45 | 46 | to serve files embedded from the `data` directory. 47 | -------------------------------------------------------------------------------- /vendor/github.com/elazarl/go-bindata-assetfs/doc.go: -------------------------------------------------------------------------------- 1 | // assetfs allows packages to serve static content embedded 2 | // with the go-bindata tool with the standard net/http package. 3 | // 4 | // See https://github.com/jteeuwen/go-bindata for more information 5 | // about embedding binary data with go-bindata. 6 | // 7 | // Usage example, after running 8 | // $ go-bindata data/... 9 | // use: 10 | // http.Handle("/", 11 | // http.FileServer( 12 | // &assetfs.AssetFS{Asset: Asset, AssetDir: AssetDir, Prefix: "data"})) 13 | package assetfs 14 | -------------------------------------------------------------------------------- /vendor/github.com/go-macaron/bindata/.travis.yml: -------------------------------------------------------------------------------- 1 | sudo: false 2 | language: go 3 | 4 | go: 5 | - 1.3 6 | - 1.4 7 | - 1.5 8 | - tip 9 | 10 | script: go test -v -cover -race 11 | 12 | notifications: 13 | email: 14 | - u@gogs.io 15 | -------------------------------------------------------------------------------- /vendor/github.com/go-macaron/bindata/README.md: -------------------------------------------------------------------------------- 1 | # bindata [![Build Status](https://travis-ci.org/go-macaron/bindata.svg?branch=master)](https://travis-ci.org/go-macaron/bindata) [![](http://gocover.io/_badge/github.com/go-macaron/bindata)](http://gocover.io/github.com/go-macaron/bindata) 2 | 3 | Package bindata is a helper module that allows to use in-memory static and template files for Macaron via [go-bindata](https://github.com/jteeuwen/go-bindata). 4 | 5 | ### Installation 6 | 7 | go get github.com/go-macaron/bindata 8 | 9 | ## Getting Help 10 | 11 | - [API Reference](https://gowalker.org/github.com/go-macaron/bindata) 12 | - [Documentation](http://go-macaron.com/docs/middlewares/bindata) 13 | 14 | ## License 15 | 16 | This project is under the Apache License, Version 2.0. See the [LICENSE](LICENSE) file for the full license text. -------------------------------------------------------------------------------- /vendor/github.com/go-macaron/binding/.travis.yml: -------------------------------------------------------------------------------- 1 | sudo: false 2 | language: go 3 | 4 | go: 5 | - 1.3 6 | - 1.4 7 | - 1.5 8 | - tip 9 | 10 | script: go test -v -cover -race 11 | 12 | notifications: 13 | email: 14 | - u@gogs.io 15 | -------------------------------------------------------------------------------- /vendor/github.com/go-macaron/binding/README.md: -------------------------------------------------------------------------------- 1 | # binding [![Build Status](https://travis-ci.org/go-macaron/binding.svg?branch=master)](https://travis-ci.org/go-macaron/binding) [![](http://gocover.io/_badge/github.com/go-macaron/binding)](http://gocover.io/github.com/go-macaron/binding) 2 | 3 | Middleware binding provides request data binding and validation for [Macaron](https://github.com/go-macaron/macaron). 4 | 5 | ### Installation 6 | 7 | go get github.com/go-macaron/binding 8 | 9 | ## Getting Help 10 | 11 | - [API Reference](https://gowalker.org/github.com/go-macaron/binding) 12 | - [Documentation](http://go-macaron.com/docs/middlewares/binding) 13 | 14 | ## Credits 15 | 16 | This package is a modified version of [martini-contrib/binding](https://github.com/martini-contrib/binding). 17 | 18 | ## License 19 | 20 | This project is under the Apache License, Version 2.0. See the [LICENSE](LICENSE) file for the full license text. -------------------------------------------------------------------------------- /vendor/github.com/go-macaron/inject/.travis.yml: -------------------------------------------------------------------------------- 1 | sudo: false 2 | language: go 3 | 4 | go: 5 | - 1.3 6 | - 1.4 7 | - 1.5 8 | - tip 9 | 10 | script: go test -v -cover -race 11 | 12 | notifications: 13 | email: 14 | - u@gogs.io 15 | -------------------------------------------------------------------------------- /vendor/github.com/go-macaron/inject/README.md: -------------------------------------------------------------------------------- 1 | # inject [![Build Status](https://travis-ci.org/go-macaron/inject.svg?branch=master)](https://travis-ci.org/go-macaron/inject) [![](http://gocover.io/_badge/github.com/go-macaron/inject)](http://gocover.io/github.com/go-macaron/inject) 2 | 3 | Package inject provides utilities for mapping and injecting dependencies in various ways. 4 | 5 | **This a modified version of [codegangsta/inject](https://github.com/codegangsta/inject) for special purpose of Macaron** 6 | 7 | **Please use the original version if you need dependency injection feature** 8 | 9 | ## License 10 | 11 | This project is under the Apache License, Version 2.0. See the [LICENSE](LICENSE) file for the full license text. -------------------------------------------------------------------------------- /vendor/github.com/gorilla/websocket/.gitignore: -------------------------------------------------------------------------------- 1 | # Compiled Object files, Static and Dynamic libs (Shared Objects) 2 | *.o 3 | *.a 4 | *.so 5 | 6 | # Folders 7 | _obj 8 | _test 9 | 10 | # Architecture specific extensions/prefixes 11 | *.[568vq] 12 | [568vq].out 13 | 14 | *.cgo1.go 15 | *.cgo2.c 16 | _cgo_defun.c 17 | _cgo_gotypes.go 18 | _cgo_export.* 19 | 20 | _testmain.go 21 | 22 | *.exe 23 | -------------------------------------------------------------------------------- /vendor/github.com/gorilla/websocket/.travis.yml: -------------------------------------------------------------------------------- 1 | language: go 2 | 3 | go: 4 | - 1.1 5 | - 1.2 6 | - tip 7 | -------------------------------------------------------------------------------- /vendor/github.com/gorilla/websocket/AUTHORS: -------------------------------------------------------------------------------- 1 | # This is the official list of Gorilla WebSocket authors for copyright 2 | # purposes. 3 | # 4 | # Please keep the list sorted. 5 | 6 | Gary Burd 7 | Joachim Bauch 8 | 9 | -------------------------------------------------------------------------------- /vendor/github.com/gorilla/websocket/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2013 The Gorilla WebSocket Authors. All rights reserved. 2 | 3 | Redistribution and use in source and binary forms, with or without 4 | modification, are permitted provided that the following conditions are met: 5 | 6 | Redistributions of source code must retain the above copyright notice, this 7 | list of conditions and the following disclaimer. 8 | 9 | Redistributions in binary form must reproduce the above copyright notice, 10 | this list of conditions and the following disclaimer in the documentation 11 | and/or other materials provided with the distribution. 12 | 13 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 14 | ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 15 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 16 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 17 | FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 18 | DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 19 | SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 20 | CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 21 | OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 22 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 23 | -------------------------------------------------------------------------------- /vendor/github.com/gorilla/websocket/examples/autobahn/README.md: -------------------------------------------------------------------------------- 1 | # Test Server 2 | 3 | This package contains a server for the [Autobahn WebSockets Test Suite](http://autobahn.ws/testsuite). 4 | 5 | To test the server, run 6 | 7 | go run server.go 8 | 9 | and start the client test driver 10 | 11 | wstest -m fuzzingclient -s fuzzingclient.json 12 | 13 | When the client completes, it writes a report to reports/clients/index.html. 14 | -------------------------------------------------------------------------------- /vendor/github.com/gorilla/websocket/examples/autobahn/fuzzingclient.json: -------------------------------------------------------------------------------- 1 | 2 | { 3 | "options": {"failByDrop": false}, 4 | "outdir": "./reports/clients", 5 | "servers": [ 6 | {"agent": "ReadAllWriteMessage", "url": "ws://localhost:9000/m", "options": {"version": 18}}, 7 | {"agent": "ReadAllWrite", "url": "ws://localhost:9000/r", "options": {"version": 18}}, 8 | {"agent": "CopyFull", "url": "ws://localhost:9000/f", "options": {"version": 18}}, 9 | {"agent": "CopyWriterOnly", "url": "ws://localhost:9000/c", "options": {"version": 18}} 10 | ], 11 | "cases": ["*"], 12 | "exclude-cases": [], 13 | "exclude-agent-cases": {} 14 | } 15 | -------------------------------------------------------------------------------- /vendor/github.com/gorilla/websocket/examples/chat/README.md: -------------------------------------------------------------------------------- 1 | # Chat Example 2 | 3 | This application shows how to use use the 4 | [websocket](https://github.com/gorilla/websocket) package and 5 | [jQuery](http://jquery.com) to implement a simple web chat application. 6 | 7 | ## Running the example 8 | 9 | The example requires a working Go development environment. The [Getting 10 | Started](http://golang.org/doc/install) page describes how to install the 11 | development environment. 12 | 13 | Once you have Go up and running, you can download, build and run the example 14 | using the following commands. 15 | 16 | $ go get github.com/gorilla/websocket 17 | $ cd `go list -f '{{.Dir}}' github.com/gorilla/websocket/examples/chat` 18 | $ go run *.go 19 | 20 | To use the chat example, open http://localhost:8080/ in your browser. 21 | -------------------------------------------------------------------------------- /vendor/github.com/gorilla/websocket/examples/chat/hub.go: -------------------------------------------------------------------------------- 1 | // Copyright 2013 The Gorilla WebSocket 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 main 6 | 7 | // hub maintains the set of active connections and broadcasts messages to the 8 | // connections. 9 | type hub struct { 10 | // Registered connections. 11 | connections map[*connection]bool 12 | 13 | // Inbound messages from the connections. 14 | broadcast chan []byte 15 | 16 | // Register requests from the connections. 17 | register chan *connection 18 | 19 | // Unregister requests from connections. 20 | unregister chan *connection 21 | } 22 | 23 | var h = hub{ 24 | broadcast: make(chan []byte), 25 | register: make(chan *connection), 26 | unregister: make(chan *connection), 27 | connections: make(map[*connection]bool), 28 | } 29 | 30 | func (h *hub) run() { 31 | for { 32 | select { 33 | case c := <-h.register: 34 | h.connections[c] = true 35 | case c := <-h.unregister: 36 | if _, ok := h.connections[c]; ok { 37 | delete(h.connections, c) 38 | close(c.send) 39 | } 40 | case m := <-h.broadcast: 41 | for c := range h.connections { 42 | select { 43 | case c.send <- m: 44 | default: 45 | close(c.send) 46 | delete(h.connections, c) 47 | } 48 | } 49 | } 50 | } 51 | } 52 | -------------------------------------------------------------------------------- /vendor/github.com/gorilla/websocket/examples/chat/main.go: -------------------------------------------------------------------------------- 1 | // Copyright 2013 The Gorilla WebSocket 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 main 6 | 7 | import ( 8 | "flag" 9 | "log" 10 | "net/http" 11 | "text/template" 12 | ) 13 | 14 | var addr = flag.String("addr", ":8080", "http service address") 15 | var homeTempl = template.Must(template.ParseFiles("home.html")) 16 | 17 | func serveHome(w http.ResponseWriter, r *http.Request) { 18 | if r.URL.Path != "/" { 19 | http.Error(w, "Not found", 404) 20 | return 21 | } 22 | if r.Method != "GET" { 23 | http.Error(w, "Method not allowed", 405) 24 | return 25 | } 26 | w.Header().Set("Content-Type", "text/html; charset=utf-8") 27 | homeTempl.Execute(w, r.Host) 28 | } 29 | 30 | func main() { 31 | flag.Parse() 32 | go h.run() 33 | http.HandleFunc("/", serveHome) 34 | http.HandleFunc("/ws", serveWs) 35 | err := http.ListenAndServe(*addr, nil) 36 | if err != nil { 37 | log.Fatal("ListenAndServe: ", err) 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /vendor/github.com/gorilla/websocket/examples/command/README.md: -------------------------------------------------------------------------------- 1 | # Command example 2 | 3 | This example connects a websocket connection to stdin and stdout of a command. 4 | Received messages are written to stdin followed by a `\n`. Each line read from 5 | from standard out is sent as a message to the client. 6 | 7 | $ go get github.com/gorilla/websocket 8 | $ cd `go list -f '{{.Dir}}' github.com/gorilla/websocket/examples/command` 9 | $ go run main.go 10 | # Open http://localhost:8080/ . 11 | 12 | Try the following commands. 13 | 14 | # Echo sent messages to the output area. 15 | $ go run main.go cat 16 | 17 | # Run a shell.Try sending "ls" and "cat main.go". 18 | $ go run main.go sh 19 | 20 | -------------------------------------------------------------------------------- /vendor/github.com/gorilla/websocket/examples/echo/README.md: -------------------------------------------------------------------------------- 1 | # Client and server example 2 | 3 | This example shows a simple client and server. 4 | 5 | The server echoes messages sent to it. The client sends a message every second 6 | and prints all messages received. 7 | 8 | To run the example, start the server: 9 | 10 | $ go run server.go 11 | 12 | Next, start the client: 13 | 14 | $ go run client.go 15 | 16 | The server includes a simple web client. To use the client, open 17 | http://127.0.0.1:8080 in the browser and follow the instructions on the page. 18 | -------------------------------------------------------------------------------- /vendor/github.com/gorilla/websocket/examples/filewatch/README.md: -------------------------------------------------------------------------------- 1 | # File Watch example. 2 | 3 | This example sends a file to the browser client for display whenever the file is modified. 4 | 5 | $ go get github.com/gorilla/websocket 6 | $ cd `go list -f '{{.Dir}}' github.com/gorilla/websocket/examples/filewatch` 7 | $ go run main.go 8 | # Open http://localhost:8080/ . 9 | # Modify the file to see it update in the browser. 10 | -------------------------------------------------------------------------------- /vendor/github.com/gorilla/websocket/util.go: -------------------------------------------------------------------------------- 1 | // Copyright 2013 The Gorilla WebSocket 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 websocket 6 | 7 | import ( 8 | "crypto/rand" 9 | "crypto/sha1" 10 | "encoding/base64" 11 | "io" 12 | "net/http" 13 | "strings" 14 | ) 15 | 16 | // tokenListContainsValue returns true if the 1#token header with the given 17 | // name contains token. 18 | func tokenListContainsValue(header http.Header, name string, value string) bool { 19 | for _, v := range header[name] { 20 | for _, s := range strings.Split(v, ",") { 21 | if strings.EqualFold(value, strings.TrimSpace(s)) { 22 | return true 23 | } 24 | } 25 | } 26 | return false 27 | } 28 | 29 | var keyGUID = []byte("258EAFA5-E914-47DA-95CA-C5AB0DC85B11") 30 | 31 | func computeAcceptKey(challengeKey string) string { 32 | h := sha1.New() 33 | h.Write([]byte(challengeKey)) 34 | h.Write(keyGUID) 35 | return base64.StdEncoding.EncodeToString(h.Sum(nil)) 36 | } 37 | 38 | func generateChallengeKey() (string, error) { 39 | p := make([]byte, 16) 40 | if _, err := io.ReadFull(rand.Reader, p); err != nil { 41 | return "", err 42 | } 43 | return base64.StdEncoding.EncodeToString(p), nil 44 | } 45 | -------------------------------------------------------------------------------- /vendor/github.com/hashicorp/hcl/.gitignore: -------------------------------------------------------------------------------- 1 | y.output 2 | 3 | # ignore intellij files 4 | .idea 5 | *.iml 6 | *.ipr 7 | *.iws 8 | -------------------------------------------------------------------------------- /vendor/github.com/hashicorp/hcl/.travis.yml: -------------------------------------------------------------------------------- 1 | sudo: false 2 | language: go 3 | go: 1.5 4 | -------------------------------------------------------------------------------- /vendor/github.com/hashicorp/hcl/Makefile: -------------------------------------------------------------------------------- 1 | TEST?=./... 2 | 3 | default: test 4 | 5 | fmt: generate 6 | go fmt ./... 7 | 8 | test: generate 9 | go test $(TEST) $(TESTARGS) 10 | 11 | generate: 12 | go generate ./... 13 | 14 | updatedeps: 15 | go get -u golang.org/x/tools/cmd/stringer 16 | 17 | .PHONY: default generate test updatedeps 18 | -------------------------------------------------------------------------------- /vendor/github.com/hashicorp/hcl/hcl.go: -------------------------------------------------------------------------------- 1 | // Package hcl decodes HCL into usable Go structures. 2 | // 3 | // hcl input can come in either pure HCL format or JSON format. 4 | // It can be parsed into an AST, and then decoded into a structure, 5 | // or it can be decoded directly from a string into a structure. 6 | // 7 | // If you choose to parse HCL into a raw AST, the benefit is that you 8 | // can write custom visitor implementations to implement custom 9 | // semantic checks. By default, HCL does not perform any semantic 10 | // checks. 11 | package hcl 12 | -------------------------------------------------------------------------------- /vendor/github.com/hashicorp/hcl/hcl/ast/walk.go: -------------------------------------------------------------------------------- 1 | package ast 2 | 3 | import "fmt" 4 | 5 | // WalkFunc describes a function to be called for each node during a Walk. The 6 | // returned node can be used to rewrite the AST. Walking stops the returned 7 | // bool is false. 8 | type WalkFunc func(Node) (Node, bool) 9 | 10 | // Walk traverses an AST in depth-first order: It starts by calling fn(node); 11 | // node must not be nil. If fn returns true, Walk invokes fn recursively for 12 | // each of the non-nil children of node, followed by a call of fn(nil). The 13 | // returned node of fn can be used to rewrite the passed node to fn. 14 | func Walk(node Node, fn WalkFunc) Node { 15 | rewritten, ok := fn(node) 16 | if !ok { 17 | return rewritten 18 | } 19 | 20 | switch n := node.(type) { 21 | case *File: 22 | n.Node = Walk(n.Node, fn) 23 | case *ObjectList: 24 | for i, item := range n.Items { 25 | n.Items[i] = Walk(item, fn).(*ObjectItem) 26 | } 27 | case *ObjectKey: 28 | // nothing to do 29 | case *ObjectItem: 30 | for i, k := range n.Keys { 31 | n.Keys[i] = Walk(k, fn).(*ObjectKey) 32 | } 33 | 34 | if n.Val != nil { 35 | n.Val = Walk(n.Val, fn) 36 | } 37 | case *LiteralType: 38 | // nothing to do 39 | case *ListType: 40 | for i, l := range n.List { 41 | n.List[i] = Walk(l, fn) 42 | } 43 | case *ObjectType: 44 | n.List = Walk(n.List, fn).(*ObjectList) 45 | default: 46 | // should we panic here? 47 | fmt.Printf("unknown type: %T\n", n) 48 | } 49 | 50 | fn(nil) 51 | return rewritten 52 | } 53 | -------------------------------------------------------------------------------- /vendor/github.com/hashicorp/hcl/hcl/parser/error.go: -------------------------------------------------------------------------------- 1 | package parser 2 | 3 | import ( 4 | "fmt" 5 | 6 | "github.com/hashicorp/hcl/hcl/token" 7 | ) 8 | 9 | // PosError is a parse error that contains a position. 10 | type PosError struct { 11 | Pos token.Pos 12 | Err error 13 | } 14 | 15 | func (e *PosError) Error() string { 16 | return fmt.Sprintf("At %s: %s", e.Pos, e.Err) 17 | } 18 | -------------------------------------------------------------------------------- /vendor/github.com/hashicorp/hcl/hcl/parser/test-fixtures/array_comment.hcl: -------------------------------------------------------------------------------- 1 | foo = [ 2 | "1", 3 | "2", # comment 4 | ] 5 | -------------------------------------------------------------------------------- /vendor/github.com/hashicorp/hcl/hcl/parser/test-fixtures/array_comment_2.hcl: -------------------------------------------------------------------------------- 1 | provisioner "remote-exec" { 2 | scripts = [ 3 | "${path.module}/scripts/install-consul.sh" // missing comma 4 | "${path.module}/scripts/install-haproxy.sh" 5 | ] 6 | } 7 | -------------------------------------------------------------------------------- /vendor/github.com/hashicorp/hcl/hcl/parser/test-fixtures/assign_colon.hcl: -------------------------------------------------------------------------------- 1 | resource = [{ 2 | "foo": { 3 | "bar": {}, 4 | "baz": [1, 2, "foo"], 5 | } 6 | }] 7 | -------------------------------------------------------------------------------- /vendor/github.com/hashicorp/hcl/hcl/parser/test-fixtures/assign_deep.hcl: -------------------------------------------------------------------------------- 1 | resource = [{ 2 | foo = [{ 3 | bar = {} 4 | }] 5 | }] 6 | -------------------------------------------------------------------------------- /vendor/github.com/hashicorp/hcl/hcl/parser/test-fixtures/comment.hcl: -------------------------------------------------------------------------------- 1 | // Foo 2 | 3 | /* Bar */ 4 | 5 | /* 6 | /* 7 | Baz 8 | */ 9 | 10 | # Another 11 | 12 | # Multiple 13 | # Lines 14 | 15 | foo = "bar" 16 | -------------------------------------------------------------------------------- /vendor/github.com/hashicorp/hcl/hcl/parser/test-fixtures/comment_lastline.hcl: -------------------------------------------------------------------------------- 1 | #foo -------------------------------------------------------------------------------- /vendor/github.com/hashicorp/hcl/hcl/parser/test-fixtures/comment_single.hcl: -------------------------------------------------------------------------------- 1 | # Hello 2 | -------------------------------------------------------------------------------- /vendor/github.com/hashicorp/hcl/hcl/parser/test-fixtures/complex.hcl: -------------------------------------------------------------------------------- 1 | variable "foo" { 2 | default = "bar" 3 | description = "bar" 4 | } 5 | 6 | variable "groups" { } 7 | 8 | provider "aws" { 9 | access_key = "foo" 10 | secret_key = "bar" 11 | } 12 | 13 | provider "do" { 14 | api_key = "${var.foo}" 15 | } 16 | 17 | resource "aws_security_group" "firewall" { 18 | count = 5 19 | } 20 | 21 | resource aws_instance "web" { 22 | ami = "${var.foo}" 23 | security_groups = [ 24 | "foo", 25 | "${aws_security_group.firewall.foo}", 26 | "${element(split(\",\", var.groups)}", 27 | ] 28 | network_interface = { 29 | device_index = 0 30 | description = "Main network interface" 31 | } 32 | } 33 | 34 | resource "aws_instance" "db" { 35 | security_groups = "${aws_security_group.firewall.*.id}" 36 | VPC = "foo" 37 | depends_on = ["aws_instance.web"] 38 | } 39 | 40 | output "web_ip" { 41 | value = "${aws_instance.web.private_ip}" 42 | } 43 | -------------------------------------------------------------------------------- /vendor/github.com/hashicorp/hcl/hcl/parser/test-fixtures/complex_key.hcl: -------------------------------------------------------------------------------- 1 | foo.bar = "baz" 2 | -------------------------------------------------------------------------------- /vendor/github.com/hashicorp/hcl/hcl/parser/test-fixtures/empty.hcl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/leanlabsio/kanban/0a2a8809c10c5594be08838c48e1518dc70718d4/vendor/github.com/hashicorp/hcl/hcl/parser/test-fixtures/empty.hcl -------------------------------------------------------------------------------- /vendor/github.com/hashicorp/hcl/hcl/parser/test-fixtures/list.hcl: -------------------------------------------------------------------------------- 1 | foo = [1, 2, "foo"] 2 | -------------------------------------------------------------------------------- /vendor/github.com/hashicorp/hcl/hcl/parser/test-fixtures/list_comma.hcl: -------------------------------------------------------------------------------- 1 | foo = [1, 2, "foo",] 2 | -------------------------------------------------------------------------------- /vendor/github.com/hashicorp/hcl/hcl/parser/test-fixtures/missing_braces.hcl: -------------------------------------------------------------------------------- 1 | # should error, but not crash 2 | resource "template_file" "cloud_config" { 3 | template = "$file("${path.module}/some/path")" 4 | } 5 | -------------------------------------------------------------------------------- /vendor/github.com/hashicorp/hcl/hcl/parser/test-fixtures/multiple.hcl: -------------------------------------------------------------------------------- 1 | foo = "bar" 2 | key = 7 3 | -------------------------------------------------------------------------------- /vendor/github.com/hashicorp/hcl/hcl/parser/test-fixtures/old.hcl: -------------------------------------------------------------------------------- 1 | default = { 2 | "eu-west-1": "ami-b1cf19c6", 3 | } 4 | -------------------------------------------------------------------------------- /vendor/github.com/hashicorp/hcl/hcl/parser/test-fixtures/structure.hcl: -------------------------------------------------------------------------------- 1 | // This is a test structure for the lexer 2 | foo bar "baz" { 3 | key = 7 4 | foo = "bar" 5 | } 6 | -------------------------------------------------------------------------------- /vendor/github.com/hashicorp/hcl/hcl/parser/test-fixtures/structure_basic.hcl: -------------------------------------------------------------------------------- 1 | foo { 2 | value = 7 3 | "value" = 8 4 | "complex::value" = 9 5 | } 6 | -------------------------------------------------------------------------------- /vendor/github.com/hashicorp/hcl/hcl/parser/test-fixtures/structure_empty.hcl: -------------------------------------------------------------------------------- 1 | resource "foo" "bar" {} 2 | -------------------------------------------------------------------------------- /vendor/github.com/hashicorp/hcl/hcl/parser/test-fixtures/types.hcl: -------------------------------------------------------------------------------- 1 | foo = "bar" 2 | bar = 7 3 | baz = [1,2,3] 4 | foo = -12 5 | bar = 3.14159 6 | foo = true 7 | bar = false 8 | -------------------------------------------------------------------------------- /vendor/github.com/hashicorp/hcl/hcl/test-fixtures/array_comment.hcl: -------------------------------------------------------------------------------- 1 | foo = [ 2 | "1", 3 | "2", # comment 4 | ] 5 | -------------------------------------------------------------------------------- /vendor/github.com/hashicorp/hcl/hcl/test-fixtures/assign_colon.hcl: -------------------------------------------------------------------------------- 1 | resource = [{ 2 | "foo": { 3 | "bar": {}, 4 | "baz": [1, 2, "foo"], 5 | } 6 | }] 7 | -------------------------------------------------------------------------------- /vendor/github.com/hashicorp/hcl/hcl/test-fixtures/assign_deep.hcl: -------------------------------------------------------------------------------- 1 | resource = [{ 2 | foo = [{ 3 | bar = {} 4 | }] 5 | }] 6 | -------------------------------------------------------------------------------- /vendor/github.com/hashicorp/hcl/hcl/test-fixtures/comment.hcl: -------------------------------------------------------------------------------- 1 | // Foo 2 | 3 | /* Bar */ 4 | 5 | /* 6 | /* 7 | Baz 8 | */ 9 | 10 | # Another 11 | 12 | # Multiple 13 | # Lines 14 | 15 | foo = "bar" 16 | -------------------------------------------------------------------------------- /vendor/github.com/hashicorp/hcl/hcl/test-fixtures/comment_single.hcl: -------------------------------------------------------------------------------- 1 | # Hello 2 | -------------------------------------------------------------------------------- /vendor/github.com/hashicorp/hcl/hcl/test-fixtures/complex.hcl: -------------------------------------------------------------------------------- 1 | // This comes from Terraform, as a test 2 | variable "foo" { 3 | default = "bar" 4 | description = "bar" 5 | } 6 | 7 | provider "aws" { 8 | access_key = "foo" 9 | secret_key = "bar" 10 | } 11 | 12 | provider "do" { 13 | api_key = "${var.foo}" 14 | } 15 | 16 | resource "aws_security_group" "firewall" { 17 | count = 5 18 | } 19 | 20 | resource aws_instance "web" { 21 | ami = "${var.foo}" 22 | security_groups = [ 23 | "foo", 24 | "${aws_security_group.firewall.foo}" 25 | ] 26 | 27 | network_interface { 28 | device_index = 0 29 | description = "Main network interface" 30 | } 31 | } 32 | 33 | resource "aws_instance" "db" { 34 | security_groups = "${aws_security_group.firewall.*.id}" 35 | VPC = "foo" 36 | 37 | depends_on = ["aws_instance.web"] 38 | } 39 | 40 | output "web_ip" { 41 | value = "${aws_instance.web.private_ip}" 42 | } 43 | -------------------------------------------------------------------------------- /vendor/github.com/hashicorp/hcl/hcl/test-fixtures/complex_key.hcl: -------------------------------------------------------------------------------- 1 | foo.bar = "baz" 2 | -------------------------------------------------------------------------------- /vendor/github.com/hashicorp/hcl/hcl/test-fixtures/empty.hcl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/leanlabsio/kanban/0a2a8809c10c5594be08838c48e1518dc70718d4/vendor/github.com/hashicorp/hcl/hcl/test-fixtures/empty.hcl -------------------------------------------------------------------------------- /vendor/github.com/hashicorp/hcl/hcl/test-fixtures/list.hcl: -------------------------------------------------------------------------------- 1 | foo = [1, 2, "foo"] 2 | -------------------------------------------------------------------------------- /vendor/github.com/hashicorp/hcl/hcl/test-fixtures/list_comma.hcl: -------------------------------------------------------------------------------- 1 | foo = [1, 2, "foo",] 2 | -------------------------------------------------------------------------------- /vendor/github.com/hashicorp/hcl/hcl/test-fixtures/multiple.hcl: -------------------------------------------------------------------------------- 1 | foo = "bar" 2 | key = 7 3 | -------------------------------------------------------------------------------- /vendor/github.com/hashicorp/hcl/hcl/test-fixtures/old.hcl: -------------------------------------------------------------------------------- 1 | default = { 2 | "eu-west-1": "ami-b1cf19c6", 3 | } 4 | -------------------------------------------------------------------------------- /vendor/github.com/hashicorp/hcl/hcl/test-fixtures/structure.hcl: -------------------------------------------------------------------------------- 1 | // This is a test structure for the lexer 2 | foo bar "baz" { 3 | key = 7 4 | foo = "bar" 5 | } 6 | -------------------------------------------------------------------------------- /vendor/github.com/hashicorp/hcl/hcl/test-fixtures/structure_basic.hcl: -------------------------------------------------------------------------------- 1 | foo { 2 | value = 7 3 | "value" = 8 4 | "complex::value" = 9 5 | } 6 | -------------------------------------------------------------------------------- /vendor/github.com/hashicorp/hcl/hcl/test-fixtures/structure_empty.hcl: -------------------------------------------------------------------------------- 1 | resource "foo" "bar" {} 2 | -------------------------------------------------------------------------------- /vendor/github.com/hashicorp/hcl/hcl/test-fixtures/types.hcl: -------------------------------------------------------------------------------- 1 | foo = "bar" 2 | bar = 7 3 | baz = [1,2,3] 4 | foo = -12 5 | bar = 3.14159 6 | foo = true 7 | bar = false 8 | -------------------------------------------------------------------------------- /vendor/github.com/hashicorp/hcl/hcl/token/position.go: -------------------------------------------------------------------------------- 1 | package token 2 | 3 | import "fmt" 4 | 5 | // Pos describes an arbitrary source position 6 | // including the file, line, and column location. 7 | // A Position is valid if the line number is > 0. 8 | type Pos struct { 9 | Filename string // filename, if any 10 | Offset int // offset, starting at 0 11 | Line int // line number, starting at 1 12 | Column int // column number, starting at 1 (character count) 13 | } 14 | 15 | // IsValid returns true if the position is valid. 16 | func (p *Pos) IsValid() bool { return p.Line > 0 } 17 | 18 | // String returns a string in one of several forms: 19 | // 20 | // file:line:column valid position with file name 21 | // line:column valid position without file name 22 | // file invalid position with file name 23 | // - invalid position without file name 24 | func (p Pos) String() string { 25 | s := p.Filename 26 | if p.IsValid() { 27 | if s != "" { 28 | s += ":" 29 | } 30 | s += fmt.Sprintf("%d:%d", p.Line, p.Column) 31 | } 32 | if s == "" { 33 | s = "-" 34 | } 35 | return s 36 | } 37 | 38 | // Before reports whether the position p is before u. 39 | func (p Pos) Before(u Pos) bool { 40 | return u.Offset > p.Offset || u.Line > p.Line 41 | } 42 | 43 | // After reports whether the position p is after u. 44 | func (p Pos) After(u Pos) bool { 45 | return u.Offset < p.Offset || u.Line < p.Line 46 | } 47 | -------------------------------------------------------------------------------- /vendor/github.com/hashicorp/hcl/json/parser/test-fixtures/array.json: -------------------------------------------------------------------------------- 1 | { 2 | "foo": [1, 2, "bar"], 3 | "bar": "baz" 4 | } 5 | -------------------------------------------------------------------------------- /vendor/github.com/hashicorp/hcl/json/parser/test-fixtures/basic.json: -------------------------------------------------------------------------------- 1 | { 2 | "foo": "bar" 3 | } 4 | -------------------------------------------------------------------------------- /vendor/github.com/hashicorp/hcl/json/parser/test-fixtures/object.json: -------------------------------------------------------------------------------- 1 | { 2 | "foo": { 3 | "bar": [1,2] 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /vendor/github.com/hashicorp/hcl/json/parser/test-fixtures/types.json: -------------------------------------------------------------------------------- 1 | { 2 | "foo": "bar", 3 | "bar": 7, 4 | "baz": [1,2,3], 5 | "foo": -12, 6 | "bar": 3.14159, 7 | "foo": true, 8 | "bar": false, 9 | "foo": null 10 | } 11 | -------------------------------------------------------------------------------- /vendor/github.com/hashicorp/hcl/json/test-fixtures/array.json: -------------------------------------------------------------------------------- 1 | { 2 | "foo": [1, 2, "bar"], 3 | "bar": "baz" 4 | } 5 | -------------------------------------------------------------------------------- /vendor/github.com/hashicorp/hcl/json/test-fixtures/basic.json: -------------------------------------------------------------------------------- 1 | { 2 | "foo": "bar" 3 | } 4 | -------------------------------------------------------------------------------- /vendor/github.com/hashicorp/hcl/json/test-fixtures/object.json: -------------------------------------------------------------------------------- 1 | { 2 | "foo": { 3 | "bar": [1,2] 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /vendor/github.com/hashicorp/hcl/json/test-fixtures/types.json: -------------------------------------------------------------------------------- 1 | { 2 | "foo": "bar", 3 | "bar": 7, 4 | "baz": [1,2,3], 5 | "foo": -12, 6 | "bar": 3.14159, 7 | "foo": true, 8 | "bar": false, 9 | "foo": null 10 | } 11 | -------------------------------------------------------------------------------- /vendor/github.com/hashicorp/hcl/json/token/position.go: -------------------------------------------------------------------------------- 1 | package token 2 | 3 | import "fmt" 4 | 5 | // Pos describes an arbitrary source position 6 | // including the file, line, and column location. 7 | // A Position is valid if the line number is > 0. 8 | type Pos struct { 9 | Filename string // filename, if any 10 | Offset int // offset, starting at 0 11 | Line int // line number, starting at 1 12 | Column int // column number, starting at 1 (character count) 13 | } 14 | 15 | // IsValid returns true if the position is valid. 16 | func (p *Pos) IsValid() bool { return p.Line > 0 } 17 | 18 | // String returns a string in one of several forms: 19 | // 20 | // file:line:column valid position with file name 21 | // line:column valid position without file name 22 | // file invalid position with file name 23 | // - invalid position without file name 24 | func (p Pos) String() string { 25 | s := p.Filename 26 | if p.IsValid() { 27 | if s != "" { 28 | s += ":" 29 | } 30 | s += fmt.Sprintf("%d:%d", p.Line, p.Column) 31 | } 32 | if s == "" { 33 | s = "-" 34 | } 35 | return s 36 | } 37 | 38 | // Before reports whether the position p is before u. 39 | func (p Pos) Before(u Pos) bool { 40 | return u.Offset > p.Offset || u.Line > p.Line 41 | } 42 | 43 | // After reports whether the position p is after u. 44 | func (p Pos) After(u Pos) bool { 45 | return u.Offset < p.Offset || u.Line < p.Line 46 | } 47 | -------------------------------------------------------------------------------- /vendor/github.com/hashicorp/hcl/lex.go: -------------------------------------------------------------------------------- 1 | package hcl 2 | 3 | import ( 4 | "unicode" 5 | ) 6 | 7 | type lexModeValue byte 8 | 9 | const ( 10 | lexModeUnknown lexModeValue = iota 11 | lexModeHcl 12 | lexModeJson 13 | ) 14 | 15 | // lexMode returns whether we're going to be parsing in JSON 16 | // mode or HCL mode. 17 | func lexMode(v string) lexModeValue { 18 | for _, r := range v { 19 | if unicode.IsSpace(r) { 20 | continue 21 | } 22 | 23 | if r == '{' { 24 | return lexModeJson 25 | } else { 26 | return lexModeHcl 27 | } 28 | } 29 | 30 | return lexModeHcl 31 | } 32 | -------------------------------------------------------------------------------- /vendor/github.com/hashicorp/hcl/parse.go: -------------------------------------------------------------------------------- 1 | package hcl 2 | 3 | import ( 4 | "fmt" 5 | 6 | "github.com/hashicorp/hcl/hcl/ast" 7 | hclParser "github.com/hashicorp/hcl/hcl/parser" 8 | jsonParser "github.com/hashicorp/hcl/json/parser" 9 | ) 10 | 11 | // Parse parses the given input and returns the root object. 12 | // 13 | // The input format can be either HCL or JSON. 14 | func Parse(input string) (*ast.File, error) { 15 | switch lexMode(input) { 16 | case lexModeHcl: 17 | return hclParser.Parse([]byte(input)) 18 | case lexModeJson: 19 | return jsonParser.Parse([]byte(input)) 20 | } 21 | 22 | return nil, fmt.Errorf("unknown config format") 23 | } 24 | -------------------------------------------------------------------------------- /vendor/github.com/hashicorp/hcl/test-fixtures/basic.hcl: -------------------------------------------------------------------------------- 1 | foo = "bar" 2 | bar = "${file("bing/bong.txt")}" 3 | -------------------------------------------------------------------------------- /vendor/github.com/hashicorp/hcl/test-fixtures/basic.json: -------------------------------------------------------------------------------- 1 | { 2 | "foo": "bar", 3 | "bar": "${file(\"bing/bong.txt\")}" 4 | } 5 | -------------------------------------------------------------------------------- /vendor/github.com/hashicorp/hcl/test-fixtures/basic_int_string.hcl: -------------------------------------------------------------------------------- 1 | count = "3" 2 | -------------------------------------------------------------------------------- /vendor/github.com/hashicorp/hcl/test-fixtures/basic_squish.hcl: -------------------------------------------------------------------------------- 1 | foo="bar" 2 | bar="${file("bing/bong.txt")}" 3 | foo-bar="baz" 4 | -------------------------------------------------------------------------------- /vendor/github.com/hashicorp/hcl/test-fixtures/decode_policy.hcl: -------------------------------------------------------------------------------- 1 | key "" { 2 | policy = "read" 3 | } 4 | 5 | key "foo/" { 6 | policy = "write" 7 | } 8 | 9 | key "foo/bar/" { 10 | policy = "read" 11 | } 12 | 13 | key "foo/bar/baz" { 14 | policy = "deny" 15 | } 16 | -------------------------------------------------------------------------------- /vendor/github.com/hashicorp/hcl/test-fixtures/decode_policy.json: -------------------------------------------------------------------------------- 1 | { 2 | "key": { 3 | "": { 4 | "policy": "read" 5 | }, 6 | 7 | "foo/": { 8 | "policy": "write" 9 | }, 10 | 11 | "foo/bar/": { 12 | "policy": "read" 13 | }, 14 | 15 | "foo/bar/baz": { 16 | "policy": "deny" 17 | } 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /vendor/github.com/hashicorp/hcl/test-fixtures/decode_tf_variable.hcl: -------------------------------------------------------------------------------- 1 | variable "foo" { 2 | default = "bar" 3 | description = "bar" 4 | } 5 | 6 | variable "amis" { 7 | default = { 8 | east = "foo" 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /vendor/github.com/hashicorp/hcl/test-fixtures/decode_tf_variable.json: -------------------------------------------------------------------------------- 1 | { 2 | "variable": { 3 | "foo": { 4 | "default": "bar", 5 | "description": "bar" 6 | }, 7 | 8 | "amis": { 9 | "default": { 10 | "east": "foo" 11 | } 12 | } 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /vendor/github.com/hashicorp/hcl/test-fixtures/empty.hcl: -------------------------------------------------------------------------------- 1 | resource "foo" {} 2 | -------------------------------------------------------------------------------- /vendor/github.com/hashicorp/hcl/test-fixtures/escape.hcl: -------------------------------------------------------------------------------- 1 | foo = "bar\"baz\\n" 2 | -------------------------------------------------------------------------------- /vendor/github.com/hashicorp/hcl/test-fixtures/flat.hcl: -------------------------------------------------------------------------------- 1 | foo = "bar" 2 | Key = 7 3 | -------------------------------------------------------------------------------- /vendor/github.com/hashicorp/hcl/test-fixtures/float.hcl: -------------------------------------------------------------------------------- 1 | a = 1.02 2 | -------------------------------------------------------------------------------- /vendor/github.com/hashicorp/hcl/test-fixtures/float.json: -------------------------------------------------------------------------------- 1 | { 2 | "a": 1.02 3 | } 4 | -------------------------------------------------------------------------------- /vendor/github.com/hashicorp/hcl/test-fixtures/interpolate_escape.hcl: -------------------------------------------------------------------------------- 1 | foo="${file(\"bing/bong.txt\")}" 2 | -------------------------------------------------------------------------------- /vendor/github.com/hashicorp/hcl/test-fixtures/multiline.hcl: -------------------------------------------------------------------------------- 1 | foo = < math.MaxInt32) { 19 | panic(fmt.Sprintf("Value %d for key %s out of range", v, key)) 20 | } 21 | return int(v) 22 | } 23 | 24 | // uintRangeCheck checks if the value fits into the uint type and 25 | // panics if it does not. 26 | func uintRangeCheck(key string, v uint64) uint { 27 | if is32Bit && v > math.MaxUint32 { 28 | panic(fmt.Sprintf("Value %d for key %s out of range", v, key)) 29 | } 30 | return uint(v) 31 | } 32 | -------------------------------------------------------------------------------- /vendor/github.com/mitchellh/mapstructure/.travis.yml: -------------------------------------------------------------------------------- 1 | language: go 2 | 3 | go: 4 | - 1.4 5 | 6 | script: 7 | - go test 8 | -------------------------------------------------------------------------------- /vendor/github.com/mitchellh/mapstructure/LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2013 Mitchell Hashimoto 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in 13 | all copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | THE SOFTWARE. 22 | -------------------------------------------------------------------------------- /vendor/github.com/mitchellh/mapstructure/error.go: -------------------------------------------------------------------------------- 1 | package mapstructure 2 | 3 | import ( 4 | "errors" 5 | "fmt" 6 | "sort" 7 | "strings" 8 | ) 9 | 10 | // Error implements the error interface and can represents multiple 11 | // errors that occur in the course of a single decode. 12 | type Error struct { 13 | Errors []string 14 | } 15 | 16 | func (e *Error) Error() string { 17 | points := make([]string, len(e.Errors)) 18 | for i, err := range e.Errors { 19 | points[i] = fmt.Sprintf("* %s", err) 20 | } 21 | 22 | sort.Strings(points) 23 | return fmt.Sprintf( 24 | "%d error(s) decoding:\n\n%s", 25 | len(e.Errors), strings.Join(points, "\n")) 26 | } 27 | 28 | // WrappedErrors implements the errwrap.Wrapper interface to make this 29 | // return value more useful with the errwrap and go-multierror libraries. 30 | func (e *Error) WrappedErrors() []error { 31 | if e == nil { 32 | return nil 33 | } 34 | 35 | result := make([]error, len(e.Errors)) 36 | for i, e := range e.Errors { 37 | result[i] = errors.New(e) 38 | } 39 | 40 | return result 41 | } 42 | 43 | func appendErrors(errors []string, err error) []string { 44 | switch e := err.(type) { 45 | case *Error: 46 | return append(errors, e.Errors...) 47 | default: 48 | return append(errors, e.Error()) 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /vendor/github.com/spf13/cast/.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 | -------------------------------------------------------------------------------- /vendor/github.com/spf13/cast/LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2014 Steve Francia 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. -------------------------------------------------------------------------------- /vendor/github.com/spf13/cobra/.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 | 24 | cobra.test 25 | -------------------------------------------------------------------------------- /vendor/github.com/spf13/cobra/.mailmap: -------------------------------------------------------------------------------- 1 | Steve Francia 2 | Bjørn Erik Pedersen 3 | Fabiano Franz 4 | -------------------------------------------------------------------------------- /vendor/github.com/spf13/cobra/.travis.yml: -------------------------------------------------------------------------------- 1 | language: go 2 | go: 3 | - 1.3.3 4 | - 1.4.2 5 | - 1.5.1 6 | - tip 7 | script: 8 | - go test -v ./... 9 | - go build 10 | -------------------------------------------------------------------------------- /vendor/github.com/spf13/cobra/cobra/main.go: -------------------------------------------------------------------------------- 1 | // Copyright © 2015 Steve Francia . 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 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 | package main 15 | 16 | import "github.com/spf13/cobra/cobra/cmd" 17 | 18 | func main() { 19 | cmd.Execute() 20 | } 21 | -------------------------------------------------------------------------------- /vendor/github.com/spf13/cobra/command_notwin.go: -------------------------------------------------------------------------------- 1 | // +build !windows 2 | 3 | package cobra 4 | 5 | var preExecHookFn func(*Command) = nil 6 | -------------------------------------------------------------------------------- /vendor/github.com/spf13/cobra/command_win.go: -------------------------------------------------------------------------------- 1 | // +build windows 2 | 3 | package cobra 4 | 5 | import ( 6 | "os" 7 | "time" 8 | 9 | "github.com/inconshreveable/mousetrap" 10 | ) 11 | 12 | var preExecHookFn = preExecHook 13 | 14 | // enables an information splash screen on Windows if the CLI is started from explorer.exe. 15 | var MousetrapHelpText string = `This is a command line tool 16 | 17 | You need to open cmd.exe and run it from there. 18 | ` 19 | 20 | func preExecHook(c *Command) { 21 | if mousetrap.StartedByExplorer() { 22 | c.Print(MousetrapHelpText) 23 | time.Sleep(5 * time.Second) 24 | os.Exit(1) 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /vendor/github.com/spf13/cobra/doc/man_docs.md: -------------------------------------------------------------------------------- 1 | # Generating Man Pages For Your Own cobra.Command 2 | 3 | Generating man pages from a cobra command is incredibly easy. An example is as follows: 4 | 5 | ```go 6 | package main 7 | 8 | import ( 9 | "github.com/spf13/cobra" 10 | "github.com/spf13/cobra/doc" 11 | ) 12 | 13 | func main() { 14 | cmd := &cobra.Command{ 15 | Use: "test", 16 | Short: "my test program", 17 | } 18 | header := &cobra.GenManHeader{ 19 | Title: "MINE", 20 | Section: "3", 21 | } 22 | doc.GenManTree(cmd, header, "/tmp") 23 | } 24 | ``` 25 | 26 | That will get you a man page `/tmp/test.1` 27 | -------------------------------------------------------------------------------- /vendor/github.com/spf13/cobra/doc/util.go: -------------------------------------------------------------------------------- 1 | // Copyright 2015 Red Hat Inc. All rights reserved. 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 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 | package doc 15 | 16 | import "github.com/spf13/cobra" 17 | 18 | // Test to see if we have a reason to print See Also information in docs 19 | // Basically this is a test for a parent commend or a subcommand which is 20 | // both not deprecated and not the autogenerated help command. 21 | func hasSeeAlso(cmd *cobra.Command) bool { 22 | if cmd.HasParent() { 23 | return true 24 | } 25 | for _, c := range cmd.Commands() { 26 | if !c.IsAvailableCommand() || c.IsHelpCommand() { 27 | continue 28 | } 29 | return true 30 | } 31 | return false 32 | } 33 | 34 | type byName []*cobra.Command 35 | 36 | func (s byName) Len() int { return len(s) } 37 | func (s byName) Swap(i, j int) { s[i], s[j] = s[j], s[i] } 38 | func (s byName) Less(i, j int) bool { return s[i].Name() < s[j].Name() } 39 | -------------------------------------------------------------------------------- /vendor/github.com/spf13/jwalterweatherman/.gitignore: -------------------------------------------------------------------------------- 1 | # Compiled Object files, Static and Dynamic libs (Shared Objects) 2 | *.o 3 | *.a 4 | *.so 5 | 6 | # Folders 7 | _obj 8 | _test 9 | 10 | # Architecture specific extensions/prefixes 11 | *.[568vq] 12 | [568vq].out 13 | 14 | *.cgo1.go 15 | *.cgo2.c 16 | _cgo_defun.c 17 | _cgo_gotypes.go 18 | _cgo_export.* 19 | 20 | _testmain.go 21 | 22 | *.exe 23 | -------------------------------------------------------------------------------- /vendor/github.com/spf13/jwalterweatherman/LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2014 Steve Francia 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. -------------------------------------------------------------------------------- /vendor/github.com/spf13/pflag/.travis.yml: -------------------------------------------------------------------------------- 1 | sudo: false 2 | 3 | language: go 4 | 5 | go: 6 | - 1.3 7 | - 1.4 8 | - 1.5 9 | - tip 10 | 11 | install: 12 | - go get github.com/golang/lint/golint 13 | - export PATH=$GOPATH/bin:$PATH 14 | - go install ./... 15 | 16 | script: 17 | - verify/all.sh -v 18 | - go test ./... 19 | -------------------------------------------------------------------------------- /vendor/github.com/spf13/pflag/verify/gofmt.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -o errexit 4 | set -o nounset 5 | set -o pipefail 6 | 7 | ROOT=$(dirname "${BASH_SOURCE}")/.. 8 | 9 | pushd "${ROOT}" > /dev/null 10 | 11 | GOFMT=${GOFMT:-"gofmt"} 12 | bad_files=$(find . -name '*.go' | xargs $GOFMT -s -l) 13 | if [[ -n "${bad_files}" ]]; then 14 | echo "!!! '$GOFMT' needs to be run on the following files: " 15 | echo "${bad_files}" 16 | exit 1 17 | fi 18 | 19 | # ex: ts=2 sw=2 et filetype=sh 20 | -------------------------------------------------------------------------------- /vendor/github.com/spf13/pflag/verify/golint.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | ROOT=$(dirname "${BASH_SOURCE}")/.. 4 | GOLINT=${GOLINT:-"golint"} 5 | 6 | pushd "${ROOT}" > /dev/null 7 | bad_files=$($GOLINT -min_confidence=0.9 ./...) 8 | if [[ -n "${bad_files}" ]]; then 9 | echo "!!! '$GOLINT' problems: " 10 | echo "${bad_files}" 11 | exit 1 12 | fi 13 | popd > /dev/null 14 | 15 | # ex: ts=2 sw=2 et filetype=sh 16 | -------------------------------------------------------------------------------- /vendor/github.com/spf13/viper/.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 | -------------------------------------------------------------------------------- /vendor/github.com/spf13/viper/.travis.yml: -------------------------------------------------------------------------------- 1 | language: go 2 | go: 3 | - 1.3 4 | - release 5 | - tip 6 | 7 | script: 8 | - go test -v ./... 9 | sudo: false 10 | -------------------------------------------------------------------------------- /vendor/github.com/spf13/viper/LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2014 Steve Francia 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. -------------------------------------------------------------------------------- /vendor/golang.org/x/net/PATENTS: -------------------------------------------------------------------------------- 1 | Additional IP Rights Grant (Patents) 2 | 3 | "This implementation" means the copyrightable works distributed by 4 | Google as part of the Go project. 5 | 6 | Google hereby grants to You a perpetual, worldwide, non-exclusive, 7 | no-charge, royalty-free, irrevocable (except as stated in this section) 8 | patent license to make, have made, use, offer to sell, sell, import, 9 | transfer and otherwise run, modify and propagate the contents of this 10 | implementation of Go, where such license applies only to those patent 11 | claims, both currently owned or controlled by Google and acquired in 12 | the future, licensable by Google that are necessarily infringed by this 13 | implementation of Go. This grant does not include claims that would be 14 | infringed only as a consequence of further modification of this 15 | implementation. If you or your agent or exclusive licensee institute or 16 | order or agree to the institution of patent litigation against any 17 | entity (including a cross-claim or counterclaim in a lawsuit) alleging 18 | that this implementation of Go or any code incorporated within this 19 | implementation of Go constitutes direct or contributory patent 20 | infringement, or inducement of patent infringement, then any patent 21 | rights granted to you under this License for this implementation of Go 22 | shall terminate as of the date such litigation is filed. 23 | -------------------------------------------------------------------------------- /vendor/golang.org/x/net/context/ctxhttp/cancelreq.go: -------------------------------------------------------------------------------- 1 | // Copyright 2015 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build go1.5 6 | 7 | package ctxhttp 8 | 9 | import "net/http" 10 | 11 | func canceler(client *http.Client, req *http.Request) func() { 12 | // TODO(djd): Respect any existing value of req.Cancel. 13 | ch := make(chan struct{}) 14 | req.Cancel = ch 15 | 16 | return func() { 17 | close(ch) 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /vendor/golang.org/x/net/context/ctxhttp/cancelreq_go14.go: -------------------------------------------------------------------------------- 1 | // Copyright 2015 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build !go1.5 6 | 7 | package ctxhttp 8 | 9 | import "net/http" 10 | 11 | type requestCanceler interface { 12 | CancelRequest(*http.Request) 13 | } 14 | 15 | func canceler(client *http.Client, req *http.Request) func() { 16 | rc, ok := client.Transport.(requestCanceler) 17 | if !ok { 18 | return func() {} 19 | } 20 | return func() { 21 | rc.CancelRequest(req) 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /vendor/golang.org/x/oauth2/.travis.yml: -------------------------------------------------------------------------------- 1 | language: go 2 | 3 | go: 4 | - 1.3 5 | - 1.4 6 | 7 | install: 8 | - export GOPATH="$HOME/gopath" 9 | - mkdir -p "$GOPATH/src/golang.org/x" 10 | - mv "$TRAVIS_BUILD_DIR" "$GOPATH/src/golang.org/x/oauth2" 11 | - go get -v -t -d golang.org/x/oauth2/... 12 | 13 | script: 14 | - go test -v golang.org/x/oauth2/... 15 | -------------------------------------------------------------------------------- /vendor/golang.org/x/oauth2/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/oauth2/CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # Contributing to Go 2 | 3 | Go is an open source project. 4 | 5 | It is the work of hundreds of contributors. We appreciate your help! 6 | 7 | 8 | ## Filing issues 9 | 10 | When [filing an issue](https://github.com/golang/oauth2/issues), make sure to answer these five questions: 11 | 12 | 1. What version of Go are you using (`go version`)? 13 | 2. What operating system and processor architecture are you using? 14 | 3. What did you do? 15 | 4. What did you expect to see? 16 | 5. What did you see instead? 17 | 18 | General questions should go to the [golang-nuts mailing list](https://groups.google.com/group/golang-nuts) instead of the issue tracker. 19 | The gophers there will answer or ask you to file an issue if you've tripped over a bug. 20 | 21 | ## Contributing code 22 | 23 | Please read the [Contribution Guidelines](https://golang.org/doc/contribute.html) 24 | before sending patches. 25 | 26 | **We do not accept GitHub pull requests** 27 | (we use [Gerrit](https://code.google.com/p/gerrit/) instead for code review). 28 | 29 | Unless otherwise noted, the Go source files are distributed under 30 | the BSD-style license found in the LICENSE file. 31 | 32 | -------------------------------------------------------------------------------- /vendor/golang.org/x/oauth2/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/oauth2/bitbucket/bitbucket.go: -------------------------------------------------------------------------------- 1 | // Copyright 2015 The oauth2 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 bitbucket provides constants for using OAuth2 to access Bitbucket. 6 | package bitbucket 7 | 8 | import ( 9 | "golang.org/x/oauth2" 10 | ) 11 | 12 | // Endpoint is Bitbucket's OAuth 2.0 endpoint. 13 | var Endpoint = oauth2.Endpoint{ 14 | AuthURL: "https://bitbucket.org/site/oauth2/authorize", 15 | TokenURL: "https://bitbucket.org/site/oauth2/access_token", 16 | } 17 | -------------------------------------------------------------------------------- /vendor/golang.org/x/oauth2/client_appengine.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 appengine 6 | 7 | // App Engine hooks. 8 | 9 | package oauth2 10 | 11 | import ( 12 | "net/http" 13 | 14 | "golang.org/x/net/context" 15 | "golang.org/x/oauth2/internal" 16 | "google.golang.org/appengine/urlfetch" 17 | ) 18 | 19 | func init() { 20 | internal.RegisterContextClientFunc(contextClientAppEngine) 21 | } 22 | 23 | func contextClientAppEngine(ctx context.Context) (*http.Client, error) { 24 | return urlfetch.Client(ctx), nil 25 | } 26 | -------------------------------------------------------------------------------- /vendor/golang.org/x/oauth2/facebook/facebook.go: -------------------------------------------------------------------------------- 1 | // Copyright 2015 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // Package facebook provides constants for using OAuth2 to access Facebook. 6 | package facebook 7 | 8 | import ( 9 | "golang.org/x/oauth2" 10 | ) 11 | 12 | // Endpoint is Facebook's OAuth 2.0 endpoint. 13 | var Endpoint = oauth2.Endpoint{ 14 | AuthURL: "https://www.facebook.com/dialog/oauth", 15 | TokenURL: "https://graph.facebook.com/oauth/access_token", 16 | } 17 | -------------------------------------------------------------------------------- /vendor/golang.org/x/oauth2/github/github.go: -------------------------------------------------------------------------------- 1 | // Copyright 2014 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // Package github provides constants for using OAuth2 to access Github. 6 | package github 7 | 8 | import ( 9 | "golang.org/x/oauth2" 10 | ) 11 | 12 | // Endpoint is Github's OAuth 2.0 endpoint. 13 | var Endpoint = oauth2.Endpoint{ 14 | AuthURL: "https://github.com/login/oauth/authorize", 15 | TokenURL: "https://github.com/login/oauth/access_token", 16 | } 17 | -------------------------------------------------------------------------------- /vendor/golang.org/x/oauth2/google/appengine_hook.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 appengine 6 | 7 | package google 8 | 9 | import "google.golang.org/appengine" 10 | 11 | func init() { 12 | appengineTokenFunc = appengine.AccessToken 13 | } 14 | -------------------------------------------------------------------------------- /vendor/golang.org/x/oauth2/google/appenginevm_hook.go: -------------------------------------------------------------------------------- 1 | // Copyright 2015 The oauth2 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 appenginevm 6 | 7 | package google 8 | 9 | import "google.golang.org/appengine" 10 | 11 | func init() { 12 | appengineVM = true 13 | appengineTokenFunc = appengine.AccessToken 14 | } 15 | -------------------------------------------------------------------------------- /vendor/golang.org/x/oauth2/linkedin/linkedin.go: -------------------------------------------------------------------------------- 1 | // Copyright 2015 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // Package linkedin provides constants for using OAuth2 to access LinkedIn. 6 | package linkedin 7 | 8 | import ( 9 | "golang.org/x/oauth2" 10 | ) 11 | 12 | // Endpoint is LinkedIn's OAuth 2.0 endpoint. 13 | var Endpoint = oauth2.Endpoint{ 14 | AuthURL: "https://www.linkedin.com/uas/oauth2/authorization", 15 | TokenURL: "https://www.linkedin.com/uas/oauth2/accessToken", 16 | } 17 | -------------------------------------------------------------------------------- /vendor/golang.org/x/oauth2/odnoklassniki/odnoklassniki.go: -------------------------------------------------------------------------------- 1 | // Copyright 2015 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // Package odnoklassniki provides constants for using OAuth2 to access Odnoklassniki. 6 | package odnoklassniki 7 | 8 | import ( 9 | "golang.org/x/oauth2" 10 | ) 11 | 12 | // Endpoint is Odnoklassniki's OAuth 2.0 endpoint. 13 | var Endpoint = oauth2.Endpoint{ 14 | AuthURL: "https://www.odnoklassniki.ru/oauth/authorize", 15 | TokenURL: "https://api.odnoklassniki.ru/oauth/token.do", 16 | } 17 | -------------------------------------------------------------------------------- /vendor/golang.org/x/oauth2/paypal/paypal.go: -------------------------------------------------------------------------------- 1 | // Copyright 2015 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // Package paypal provides constants for using OAuth2 to access PayPal. 6 | package paypal 7 | 8 | import ( 9 | "golang.org/x/oauth2" 10 | ) 11 | 12 | // Endpoint is PayPal's OAuth 2.0 endpoint in live (production) environment. 13 | var Endpoint = oauth2.Endpoint{ 14 | AuthURL: "https://www.paypal.com/webapps/auth/protocol/openidconnect/v1/authorize", 15 | TokenURL: "https://api.paypal.com/v1/identity/openidconnect/tokenservice", 16 | } 17 | 18 | // SandboxEndpoint is PayPal's OAuth 2.0 endpoint in sandbox (testing) environment. 19 | var SandboxEndpoint = oauth2.Endpoint{ 20 | AuthURL: "https://www.sandbox.paypal.com/webapps/auth/protocol/openidconnect/v1/authorize", 21 | TokenURL: "https://api.sandbox.paypal.com/v1/identity/openidconnect/tokenservice", 22 | } 23 | -------------------------------------------------------------------------------- /vendor/golang.org/x/oauth2/vk/vk.go: -------------------------------------------------------------------------------- 1 | // Copyright 2015 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // Package vk provides constants for using OAuth2 to access VK.com. 6 | package vk 7 | 8 | import ( 9 | "golang.org/x/oauth2" 10 | ) 11 | 12 | // Endpoint is VK's OAuth 2.0 endpoint. 13 | var Endpoint = oauth2.Endpoint{ 14 | AuthURL: "https://oauth.vk.com/authorize", 15 | TokenURL: "https://oauth.vk.com/access_token", 16 | } 17 | -------------------------------------------------------------------------------- /vendor/gopkg.in/bsm/ratelimit.v1/.travis.yml: -------------------------------------------------------------------------------- 1 | language: go 2 | script: make testall 3 | go: 4 | - 1.4 5 | - 1.3 6 | - 1.2 7 | - tip 8 | -------------------------------------------------------------------------------- /vendor/gopkg.in/bsm/ratelimit.v1/Makefile: -------------------------------------------------------------------------------- 1 | default: test 2 | 3 | testdeps: 4 | @go get github.com/onsi/ginkgo 5 | @go get github.com/onsi/gomega 6 | 7 | test: testdeps 8 | @go test ./... 9 | 10 | testrace: testdeps 11 | @go test ./... -race 12 | 13 | testall: test testrace 14 | -------------------------------------------------------------------------------- /vendor/gopkg.in/fsnotify.v1/.gitignore: -------------------------------------------------------------------------------- 1 | # Setup a Global .gitignore for OS and editor generated files: 2 | # https://help.github.com/articles/ignoring-files 3 | # git config --global core.excludesfile ~/.gitignore_global 4 | 5 | .vagrant 6 | *.sublime-project 7 | -------------------------------------------------------------------------------- /vendor/gopkg.in/fsnotify.v1/.travis.yml: -------------------------------------------------------------------------------- 1 | sudo: false 2 | language: go 3 | 4 | go: 5 | - 1.5.2 6 | 7 | before_script: 8 | - go get -u github.com/golang/lint/golint 9 | 10 | script: 11 | - go test -v --race ./... 12 | 13 | after_script: 14 | - test -z "$(gofmt -s -l -w . | tee /dev/stderr)" 15 | - test -z "$(golint ./... | tee /dev/stderr)" 16 | - go vet ./... 17 | 18 | os: 19 | - linux 20 | - osx 21 | 22 | notifications: 23 | email: false 24 | -------------------------------------------------------------------------------- /vendor/gopkg.in/fsnotify.v1/AUTHORS: -------------------------------------------------------------------------------- 1 | # Names should be added to this file as 2 | # Name or Organization 3 | # The email address is not required for organizations. 4 | 5 | # You can update this list using the following command: 6 | # 7 | # $ git shortlog -se | awk '{print $2 " " $3 " " $4}' 8 | 9 | # Please keep the list sorted. 10 | 11 | Adrien Bustany 12 | Caleb Spare 13 | Case Nelson 14 | Chris Howey 15 | Christoffer Buchholz 16 | Daniel Wagner-Hall 17 | Dave Cheney 18 | Evan Phoenix 19 | Francisco Souza 20 | Hari haran 21 | John C Barstow 22 | Kelvin Fo 23 | Ken-ichirou MATSUZAWA 24 | Matt Layher 25 | Nathan Youngman 26 | Paul Hammond 27 | Pawel Knap 28 | Pieter Droogendijk 29 | Pursuit92 30 | Riku Voipio 31 | Rob Figueiredo 32 | Soge Zhang 33 | Tilak Sharma 34 | Travis Cline 35 | Tudor Golubenco 36 | Yukang 37 | bronze1man 38 | debrando 39 | henrikedwards 40 | 铁哥 41 | -------------------------------------------------------------------------------- /vendor/gopkg.in/fsnotify.v1/open_mode_bsd.go: -------------------------------------------------------------------------------- 1 | // Copyright 2013 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build freebsd openbsd netbsd dragonfly 6 | 7 | package fsnotify 8 | 9 | import "syscall" 10 | 11 | const openMode = syscall.O_NONBLOCK | syscall.O_RDONLY 12 | -------------------------------------------------------------------------------- /vendor/gopkg.in/fsnotify.v1/open_mode_darwin.go: -------------------------------------------------------------------------------- 1 | // Copyright 2013 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build darwin 6 | 7 | package fsnotify 8 | 9 | import "syscall" 10 | 11 | // note: this constant is not defined on BSD 12 | const openMode = syscall.O_EVTONLY 13 | -------------------------------------------------------------------------------- /vendor/gopkg.in/ini.v1/.gitignore: -------------------------------------------------------------------------------- 1 | testdata/conf_out.ini 2 | ini.sublime-project 3 | ini.sublime-workspace 4 | testdata/conf_reflect.ini 5 | -------------------------------------------------------------------------------- /vendor/gopkg.in/macaron.v1/.gitignore: -------------------------------------------------------------------------------- 1 | macaron.sublime-project 2 | macaron.sublime-workspace -------------------------------------------------------------------------------- /vendor/gopkg.in/macaron.v1/.travis.yml: -------------------------------------------------------------------------------- 1 | sudo: false 2 | language: go 3 | 4 | go: 5 | - 1.3 6 | - 1.4 7 | - 1.5 8 | 9 | script: go test -v -cover -race 10 | 11 | notifications: 12 | email: 13 | - u@gogs.io 14 | -------------------------------------------------------------------------------- /vendor/gopkg.in/macaron.v1/fixtures/basic/admin/index.tmpl: -------------------------------------------------------------------------------- 1 |

Admin {{.}}

-------------------------------------------------------------------------------- /vendor/gopkg.in/macaron.v1/fixtures/basic/another_layout.tmpl: -------------------------------------------------------------------------------- 1 | another head{{ yield }}another foot -------------------------------------------------------------------------------- /vendor/gopkg.in/macaron.v1/fixtures/basic/content.tmpl: -------------------------------------------------------------------------------- 1 |

{{ . }}

-------------------------------------------------------------------------------- /vendor/gopkg.in/macaron.v1/fixtures/basic/current_layout.tmpl: -------------------------------------------------------------------------------- 1 | {{ current }} head{{ yield }}{{ current }} foot -------------------------------------------------------------------------------- /vendor/gopkg.in/macaron.v1/fixtures/basic/delims.tmpl: -------------------------------------------------------------------------------- 1 |

Hello {[{.}]}

-------------------------------------------------------------------------------- /vendor/gopkg.in/macaron.v1/fixtures/basic/hello.tmpl: -------------------------------------------------------------------------------- 1 |

Hello {{.}}

-------------------------------------------------------------------------------- /vendor/gopkg.in/macaron.v1/fixtures/basic/hypertext.html: -------------------------------------------------------------------------------- 1 | Hypertext! -------------------------------------------------------------------------------- /vendor/gopkg.in/macaron.v1/fixtures/basic/layout.tmpl: -------------------------------------------------------------------------------- 1 | head{{ yield }}foot -------------------------------------------------------------------------------- /vendor/gopkg.in/macaron.v1/fixtures/basic2/hello.tmpl: -------------------------------------------------------------------------------- 1 |

What's up, {{.}}

-------------------------------------------------------------------------------- /vendor/gopkg.in/macaron.v1/fixtures/basic2/hello2.tmpl: -------------------------------------------------------------------------------- 1 |

Hello {{.Name}}

-------------------------------------------------------------------------------- /vendor/gopkg.in/macaron.v1/fixtures/custom_funcs/index.tmpl: -------------------------------------------------------------------------------- 1 | {{ myCustomFunc }} -------------------------------------------------------------------------------- /vendor/gopkg.in/macaron.v1/fixtures/symlink: -------------------------------------------------------------------------------- 1 | basic -------------------------------------------------------------------------------- /vendor/gopkg.in/macaron.v1/macaronlogo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/leanlabsio/kanban/0a2a8809c10c5594be08838c48e1518dc70718d4/vendor/gopkg.in/macaron.v1/macaronlogo.png -------------------------------------------------------------------------------- /vendor/gopkg.in/redis.v3/.gitignore: -------------------------------------------------------------------------------- 1 | *.rdb 2 | .test/ 3 | -------------------------------------------------------------------------------- /vendor/gopkg.in/redis.v3/.travis.yml: -------------------------------------------------------------------------------- 1 | sudo: false 2 | language: go 3 | 4 | services: 5 | - redis-server 6 | 7 | go: 8 | - 1.4 9 | - 1.5 10 | - tip 11 | 12 | matrix: 13 | allow_failures: 14 | - go: tip 15 | 16 | install: 17 | - go get gopkg.in/bsm/ratelimit.v1 18 | - go get github.com/onsi/ginkgo 19 | - go get github.com/onsi/gomega 20 | - mkdir -p $HOME/gopath/src/gopkg.in 21 | - mv $HOME/gopath/src/github.com/go-redis/redis $HOME/gopath/src/gopkg.in/redis.v3 22 | - cd $HOME/gopath/src/gopkg.in/redis.v3 23 | -------------------------------------------------------------------------------- /vendor/gopkg.in/redis.v3/Makefile: -------------------------------------------------------------------------------- 1 | all: testdeps 2 | go test ./... -test.v -test.cpu=1,2,4 3 | go test ./... -test.v -test.short -test.race 4 | 5 | testdeps: .test/redis/src/redis-server 6 | 7 | .PHONY: all test testdeps 8 | 9 | .test/redis: 10 | mkdir -p $@ 11 | wget -qO- https://github.com/antirez/redis/archive/unstable.tar.gz | tar xvz --strip-components=1 -C $@ 12 | 13 | .test/redis/src/redis-server: .test/redis 14 | cd $< && make all 15 | -------------------------------------------------------------------------------- /vendor/gopkg.in/redis.v3/doc.go: -------------------------------------------------------------------------------- 1 | /* 2 | Package redis implements a Redis client. 3 | */ 4 | package redis 5 | -------------------------------------------------------------------------------- /vendor/gopkg.in/redis.v3/safe.go: -------------------------------------------------------------------------------- 1 | // +build appengine 2 | 3 | package redis 4 | 5 | func bytesToString(b []byte) string { 6 | return string(b) 7 | } 8 | -------------------------------------------------------------------------------- /vendor/gopkg.in/redis.v3/script.go: -------------------------------------------------------------------------------- 1 | package redis 2 | 3 | import ( 4 | "crypto/sha1" 5 | "encoding/hex" 6 | "io" 7 | "strings" 8 | ) 9 | 10 | type scripter interface { 11 | Eval(script string, keys []string, args []string) *Cmd 12 | EvalSha(sha1 string, keys []string, args []string) *Cmd 13 | ScriptExists(scripts ...string) *BoolSliceCmd 14 | ScriptLoad(script string) *StringCmd 15 | } 16 | 17 | type Script struct { 18 | src, hash string 19 | } 20 | 21 | func NewScript(src string) *Script { 22 | h := sha1.New() 23 | io.WriteString(h, src) 24 | return &Script{ 25 | src: src, 26 | hash: hex.EncodeToString(h.Sum(nil)), 27 | } 28 | } 29 | 30 | func (s *Script) Load(c scripter) *StringCmd { 31 | return c.ScriptLoad(s.src) 32 | } 33 | 34 | func (s *Script) Exists(c scripter) *BoolSliceCmd { 35 | return c.ScriptExists(s.src) 36 | } 37 | 38 | func (s *Script) Eval(c scripter, keys []string, args []string) *Cmd { 39 | return c.Eval(s.src, keys, args) 40 | } 41 | 42 | func (s *Script) EvalSha(c scripter, keys []string, args []string) *Cmd { 43 | return c.EvalSha(s.hash, keys, args) 44 | } 45 | 46 | func (s *Script) Run(c scripter, keys []string, args []string) *Cmd { 47 | r := s.EvalSha(c, keys, args) 48 | if err := r.Err(); err != nil && strings.HasPrefix(err.Error(), "NOSCRIPT ") { 49 | return s.Eval(c, keys, args) 50 | } 51 | return r 52 | } 53 | -------------------------------------------------------------------------------- /vendor/gopkg.in/redis.v3/unsafe.go: -------------------------------------------------------------------------------- 1 | // +build !appengine 2 | 3 | package redis 4 | 5 | import ( 6 | "reflect" 7 | "unsafe" 8 | ) 9 | 10 | func bytesToString(b []byte) string { 11 | bytesHeader := (*reflect.SliceHeader)(unsafe.Pointer(&b)) 12 | strHeader := reflect.StringHeader{bytesHeader.Data, bytesHeader.Len} 13 | return *(*string)(unsafe.Pointer(&strHeader)) 14 | } 15 | -------------------------------------------------------------------------------- /vendor/gopkg.in/yaml.v2/LICENSE.libyaml: -------------------------------------------------------------------------------- 1 | The following files were ported to Go from C files of libyaml, and thus 2 | are still covered by their original copyright and license: 3 | 4 | apic.go 5 | emitterc.go 6 | parserc.go 7 | readerc.go 8 | scannerc.go 9 | writerc.go 10 | yamlh.go 11 | yamlprivateh.go 12 | 13 | Copyright (c) 2006 Kirill Simonov 14 | 15 | Permission is hereby granted, free of charge, to any person obtaining a copy of 16 | this software and associated documentation files (the "Software"), to deal in 17 | the Software without restriction, including without limitation the rights to 18 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies 19 | of the Software, and to permit persons to whom the Software is furnished to do 20 | so, subject to the following conditions: 21 | 22 | The above copyright notice and this permission notice shall be included in all 23 | copies or substantial portions of the Software. 24 | 25 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 26 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 27 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 28 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 29 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 30 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 31 | SOFTWARE. 32 | -------------------------------------------------------------------------------- /ws/client.go: -------------------------------------------------------------------------------- 1 | package ws 2 | 3 | import ( 4 | "encoding/json" 5 | "log" 6 | ) 7 | 8 | //Client struct represents user connected via websocket 9 | type client struct { 10 | ReceivingChan <-chan string 11 | SendingChan chan<- string 12 | DoneChan <-chan bool 13 | DisconnectChan chan<- int 14 | ErrChan <-chan error 15 | subscriptions []string 16 | } 17 | 18 | //Handle starts client message handling loop 19 | func (c *client) Handle() { 20 | for { 21 | select { 22 | case msg := <-c.ReceivingChan: 23 | var m message 24 | err := json.Unmarshal([]byte(msg), &m) 25 | if nil != err { 26 | log.Printf("%s", err) 27 | } 28 | p, err := m.resolve() 29 | c.process(p) 30 | log.Printf("%s, %+v", err, p) 31 | log.Printf("%s: %+v", "Received message", msg) 32 | case msg := <-c.DoneChan: 33 | for _, r := range c.subscriptions { 34 | s := Server(r) 35 | s.unsubscribe(c) 36 | } 37 | log.Printf("%+v", msg) 38 | return 39 | } 40 | } 41 | } 42 | 43 | // process handles different message types with appropriate method 44 | func (c *client) process(m interface{}) { 45 | switch m.(type) { 46 | case *subscribe: 47 | m := m.(*subscribe) 48 | c.subscribe(m.RoutingKey) 49 | } 50 | } 51 | 52 | // subscribe binds client to listen for messages sent with routing key r 53 | func (c *client) subscribe(r string) { 54 | h := Server(r) 55 | c.subscriptions = append(c.subscriptions, r) 56 | h.subscribe(c) 57 | } 58 | -------------------------------------------------------------------------------- /ws/msg.go: -------------------------------------------------------------------------------- 1 | package ws 2 | 3 | import ( 4 | "encoding/json" 5 | ) 6 | 7 | // message represents general client-server communication unit 8 | type message struct { 9 | Event string `json:"event"` 10 | Data json.RawMessage 11 | } 12 | 13 | // subscribe represents subscribe message payload 14 | type subscribe struct { 15 | RoutingKey string `json:"routing_key"` 16 | } 17 | 18 | // resolve unserializes message.Data to an appropriate event stuct 19 | func (m *message) resolve() (interface{}, error) { 20 | var d interface{} 21 | switch m.Event { 22 | case "subscribe": 23 | d = new(subscribe) 24 | } 25 | 26 | err := json.Unmarshal([]byte(m.Data), &d) 27 | if nil != err { 28 | return nil, err 29 | } 30 | 31 | return d, nil 32 | } 33 | -------------------------------------------------------------------------------- /ws/ws.go: -------------------------------------------------------------------------------- 1 | package ws 2 | 3 | import ( 4 | "sync" 5 | ) 6 | 7 | // Server is generic type describing WebSocket server 8 | type server struct { 9 | name string 10 | sync.Mutex 11 | clients map[*client]int 12 | } 13 | 14 | var servers = make(map[string]*server) 15 | 16 | // Server returns existing named Server or creates new one 17 | func Server(name string) *server { 18 | _, ok := servers[name] 19 | if !ok { 20 | servers[name] = &server{ 21 | name: name, 22 | clients: make(map[*client]int), 23 | } 24 | } 25 | 26 | return servers[name] 27 | } 28 | 29 | // subscribe adds client to current server instance 30 | func (serv *server) subscribe(c *client) { 31 | serv.clients[c] = 0 32 | } 33 | 34 | // unsubscribe removes client from specified server instance 35 | func (serv *server) unsubscribe(c *client) { 36 | delete(serv.clients, c) 37 | } 38 | 39 | //Broadcast sends message to all subscribed clients 40 | func (serv *server) Broadcast(m string) { 41 | for c := range serv.clients { 42 | c.SendingChan <- m 43 | } 44 | } 45 | 46 | // ListenAndServe start ws 47 | func ListenAndServe(r <-chan string, s chan<- string, d <-chan bool, disc chan<- int, e <-chan error) { 48 | c := &client{ 49 | ReceivingChan: r, 50 | SendingChan: s, 51 | DoneChan: d, 52 | DisconnectChan: disc, 53 | ErrChan: e, 54 | } 55 | go c.Handle() 56 | } 57 | --------------------------------------------------------------------------------