├── front ├── styles │ ├── style.less │ ├── semantic │ │ ├── src │ │ │ ├── site │ │ │ │ ├── modules │ │ │ │ │ ├── embed.variables │ │ │ │ │ ├── nag.overrides │ │ │ │ │ ├── tab.overrides │ │ │ │ │ ├── chatroom.overrides │ │ │ │ │ ├── dimmer.overrides │ │ │ │ │ ├── dropdown.overrides │ │ │ │ │ ├── embed.overrides │ │ │ │ │ ├── modal.overrides │ │ │ │ │ ├── modal.variables │ │ │ │ │ ├── nag.variables │ │ │ │ │ ├── popup.overrides │ │ │ │ │ ├── rating.overrides │ │ │ │ │ ├── rating.variables │ │ │ │ │ ├── search.overrides │ │ │ │ │ ├── search.variables │ │ │ │ │ ├── shape.overrides │ │ │ │ │ ├── sidebar.overrides │ │ │ │ │ ├── sidebar.variables │ │ │ │ │ ├── sticky.overrides │ │ │ │ │ ├── sticky.variables │ │ │ │ │ ├── tab.variables │ │ │ │ │ ├── accordion.overrides │ │ │ │ │ ├── chatroom.variables │ │ │ │ │ ├── checkbox.overrides │ │ │ │ │ ├── checkbox.variables │ │ │ │ │ ├── dimmer.variables │ │ │ │ │ ├── dropdown.variables │ │ │ │ │ ├── popup.variables │ │ │ │ │ ├── progress.overrides │ │ │ │ │ ├── progress.variables │ │ │ │ │ ├── shape.variables │ │ │ │ │ ├── transition.overrides │ │ │ │ │ ├── accordion.variables │ │ │ │ │ └── transition.variables │ │ │ │ ├── elements │ │ │ │ │ ├── flag.variables │ │ │ │ │ ├── button.overrides │ │ │ │ │ ├── flag.overrides │ │ │ │ │ ├── header.overrides │ │ │ │ │ ├── icon.overrides │ │ │ │ │ ├── image.overrides │ │ │ │ │ ├── input.overrides │ │ │ │ │ ├── label.overrides │ │ │ │ │ ├── loader.overrides │ │ │ │ │ ├── rail.overrides │ │ │ │ │ ├── reveal.overrides │ │ │ │ │ ├── step.overrides │ │ │ │ │ ├── button.variables │ │ │ │ │ ├── container.overrides │ │ │ │ │ ├── divider.overrides │ │ │ │ │ ├── divider.variables │ │ │ │ │ ├── header.variables │ │ │ │ │ ├── icon.variables │ │ │ │ │ ├── image.variables │ │ │ │ │ ├── input.variables │ │ │ │ │ ├── label.variables │ │ │ │ │ ├── list.overrides │ │ │ │ │ ├── list.variables │ │ │ │ │ ├── loader.variables │ │ │ │ │ ├── rail.variables │ │ │ │ │ ├── reveal.variables │ │ │ │ │ ├── segment.overrides │ │ │ │ │ ├── segment.variables │ │ │ │ │ ├── step.variables │ │ │ │ │ └── container.variables │ │ │ │ ├── globals │ │ │ │ │ ├── site.variables │ │ │ │ │ ├── reset.overrides │ │ │ │ │ ├── site.overrides │ │ │ │ │ └── reset.variables │ │ │ │ ├── views │ │ │ │ │ ├── ad.overrides │ │ │ │ │ ├── ad.variables │ │ │ │ │ ├── card.overrides │ │ │ │ │ ├── card.variables │ │ │ │ │ ├── feed.overrides │ │ │ │ │ ├── feed.variables │ │ │ │ │ ├── item.overrides │ │ │ │ │ ├── item.variables │ │ │ │ │ ├── comment.overrides │ │ │ │ │ ├── comment.variables │ │ │ │ │ ├── statistic.overrides │ │ │ │ │ └── statistic.variables │ │ │ │ └── collections │ │ │ │ │ ├── form.overrides │ │ │ │ │ ├── form.variables │ │ │ │ │ ├── grid.overrides │ │ │ │ │ ├── grid.variables │ │ │ │ │ ├── menu.overrides │ │ │ │ │ ├── menu.variables │ │ │ │ │ ├── table.overrides │ │ │ │ │ ├── breadcrumb.overrides │ │ │ │ │ ├── breadcrumb.variables │ │ │ │ │ ├── message.overrides │ │ │ │ │ ├── message.variables │ │ │ │ │ └── table.variables │ │ │ ├── themes │ │ │ │ ├── chubby │ │ │ │ │ ├── collections │ │ │ │ │ │ ├── menu.overrides │ │ │ │ │ │ ├── form.variables │ │ │ │ │ │ └── form.overrides │ │ │ │ │ ├── elements │ │ │ │ │ │ ├── header.overrides │ │ │ │ │ │ ├── header.variables │ │ │ │ │ │ └── button.overrides │ │ │ │ │ ├── modules │ │ │ │ │ │ ├── accordion.overrides │ │ │ │ │ │ └── accordion.variables │ │ │ │ │ └── views │ │ │ │ │ │ └── comment.overrides │ │ │ │ ├── colored │ │ │ │ │ └── modules │ │ │ │ │ │ ├── checkbox.overrides │ │ │ │ │ │ └── checkbox.variables │ │ │ │ ├── default │ │ │ │ │ ├── collections │ │ │ │ │ │ ├── table.overrides │ │ │ │ │ │ ├── form.overrides │ │ │ │ │ │ ├── menu.overrides │ │ │ │ │ │ ├── message.overrides │ │ │ │ │ │ ├── breadcrumb.overrides │ │ │ │ │ │ ├── grid.overrides │ │ │ │ │ │ └── breadcrumb.variables │ │ │ │ │ ├── globals │ │ │ │ │ │ ├── reset.variables │ │ │ │ │ │ └── site.overrides │ │ │ │ │ ├── modules │ │ │ │ │ │ ├── chatroom.variables │ │ │ │ │ │ ├── tab.overrides │ │ │ │ │ │ ├── dimmer.overrides │ │ │ │ │ │ ├── embed.overrides │ │ │ │ │ │ ├── modal.overrides │ │ │ │ │ │ ├── nag.overrides │ │ │ │ │ │ ├── popup.overrides │ │ │ │ │ │ ├── progress.overrides │ │ │ │ │ │ ├── search.overrides │ │ │ │ │ │ ├── shape.overrides │ │ │ │ │ │ ├── sticky.overrides │ │ │ │ │ │ ├── chatroom.overrides │ │ │ │ │ │ ├── sidebar.overrides │ │ │ │ │ │ ├── sticky.variables │ │ │ │ │ │ ├── tab.variables │ │ │ │ │ │ ├── transition.variables │ │ │ │ │ │ ├── shape.variables │ │ │ │ │ │ └── sidebar.variables │ │ │ │ │ ├── views │ │ │ │ │ │ ├── ad.overrides │ │ │ │ │ │ ├── card.overrides │ │ │ │ │ │ ├── comment.overrides │ │ │ │ │ │ ├── feed.overrides │ │ │ │ │ │ ├── item.overrides │ │ │ │ │ │ ├── statistic.overrides │ │ │ │ │ │ └── ad.variables │ │ │ │ │ ├── elements │ │ │ │ │ │ ├── image.overrides │ │ │ │ │ │ ├── input.overrides │ │ │ │ │ │ ├── label.overrides │ │ │ │ │ │ ├── list.overrides │ │ │ │ │ │ ├── rail.overrides │ │ │ │ │ │ ├── button.overrides │ │ │ │ │ │ ├── container.overrides │ │ │ │ │ │ ├── loader.overrides │ │ │ │ │ │ ├── reveal.overrides │ │ │ │ │ │ ├── segment.overrides │ │ │ │ │ │ ├── header.overrides │ │ │ │ │ │ ├── flag.variables │ │ │ │ │ │ ├── reveal.variables │ │ │ │ │ │ ├── rail.variables │ │ │ │ │ │ └── image.variables │ │ │ │ │ └── assets │ │ │ │ │ │ ├── fonts │ │ │ │ │ │ ├── icons.eot │ │ │ │ │ │ ├── icons.ttf │ │ │ │ │ │ ├── icons.woff │ │ │ │ │ │ └── icons.woff2 │ │ │ │ │ │ └── images │ │ │ │ │ │ └── flags.png │ │ │ │ ├── gmail │ │ │ │ │ └── collections │ │ │ │ │ │ ├── message.overrides │ │ │ │ │ │ └── message.variables │ │ │ │ ├── material │ │ │ │ │ ├── globals │ │ │ │ │ │ └── site.overrides │ │ │ │ │ ├── collections │ │ │ │ │ │ ├── menu.overrides │ │ │ │ │ │ └── menu.variables │ │ │ │ │ ├── modules │ │ │ │ │ │ ├── dropdown.overrides │ │ │ │ │ │ ├── modal.overrides │ │ │ │ │ │ ├── modal.variables │ │ │ │ │ │ └── dropdown.variables │ │ │ │ │ └── elements │ │ │ │ │ │ ├── header.overrides │ │ │ │ │ │ ├── header.variables │ │ │ │ │ │ └── button.overrides │ │ │ │ ├── round │ │ │ │ │ └── elements │ │ │ │ │ │ └── button.overrides │ │ │ │ ├── bootstrap3 │ │ │ │ │ └── elements │ │ │ │ │ │ └── button.overrides │ │ │ │ ├── basic │ │ │ │ │ ├── globals │ │ │ │ │ │ ├── reset.variables │ │ │ │ │ │ └── reset.overrides │ │ │ │ │ ├── views │ │ │ │ │ │ ├── card.overrides │ │ │ │ │ │ └── card.variables │ │ │ │ │ ├── elements │ │ │ │ │ │ ├── button.overrides │ │ │ │ │ │ ├── step.overrides │ │ │ │ │ │ ├── icon.variables │ │ │ │ │ │ ├── step.variables │ │ │ │ │ │ └── button.variables │ │ │ │ │ ├── modules │ │ │ │ │ │ ├── progress.overrides │ │ │ │ │ │ └── progress.variables │ │ │ │ │ ├── collections │ │ │ │ │ │ ├── table.overrides │ │ │ │ │ │ └── table.variables │ │ │ │ │ └── assets │ │ │ │ │ │ └── fonts │ │ │ │ │ │ ├── icons.eot │ │ │ │ │ │ ├── icons.ttf │ │ │ │ │ │ └── icons.woff │ │ │ │ ├── resetcss │ │ │ │ │ └── globals │ │ │ │ │ │ └── reset.variables │ │ │ │ ├── flat │ │ │ │ │ ├── globals │ │ │ │ │ │ └── site.overrides │ │ │ │ │ └── collections │ │ │ │ │ │ └── form.overrides │ │ │ │ ├── classic │ │ │ │ │ ├── collections │ │ │ │ │ │ ├── table.overrides │ │ │ │ │ │ └── table.variables │ │ │ │ │ ├── elements │ │ │ │ │ │ ├── button.overrides │ │ │ │ │ │ ├── header.overrides │ │ │ │ │ │ └── header.variables │ │ │ │ │ ├── modules │ │ │ │ │ │ ├── progress.overrides │ │ │ │ │ │ └── progress.variables │ │ │ │ │ └── views │ │ │ │ │ │ └── card.variables │ │ │ │ ├── duo │ │ │ │ │ └── elements │ │ │ │ │ │ ├── loader.overrides │ │ │ │ │ │ └── loader.variables │ │ │ │ ├── fixed-width │ │ │ │ │ ├── modules │ │ │ │ │ │ └── modal.overrides │ │ │ │ │ └── collections │ │ │ │ │ │ ├── grid.overrides │ │ │ │ │ │ └── grid.variables │ │ │ │ ├── github │ │ │ │ │ ├── elements │ │ │ │ │ │ ├── segment.overrides │ │ │ │ │ │ ├── button.overrides │ │ │ │ │ │ ├── step.overrides │ │ │ │ │ │ ├── step.variables │ │ │ │ │ │ └── segment.variables │ │ │ │ │ └── collections │ │ │ │ │ │ ├── menu.overrides │ │ │ │ │ │ ├── message.overrides │ │ │ │ │ │ ├── form.overrides │ │ │ │ │ │ ├── message.variables │ │ │ │ │ │ └── form.variables │ │ │ │ ├── raised │ │ │ │ │ └── elements │ │ │ │ │ │ ├── button.overrides │ │ │ │ │ │ └── button.variables │ │ │ │ ├── striped │ │ │ │ │ └── modules │ │ │ │ │ │ ├── progress.variables │ │ │ │ │ │ └── progress.overrides │ │ │ │ ├── pulsar │ │ │ │ │ └── elements │ │ │ │ │ │ └── loader.variables │ │ │ │ ├── rtl │ │ │ │ │ └── globals │ │ │ │ │ │ ├── site.overrides │ │ │ │ │ │ └── site.variables │ │ │ │ ├── instagram │ │ │ │ │ └── views │ │ │ │ │ │ ├── card.overrides │ │ │ │ │ │ └── card.variables │ │ │ │ ├── twitter │ │ │ │ │ └── elements │ │ │ │ │ │ └── button.overrides │ │ │ │ ├── bookish │ │ │ │ │ └── elements │ │ │ │ │ │ ├── header.overrides │ │ │ │ │ │ └── header.variables │ │ │ │ ├── timeline │ │ │ │ │ └── views │ │ │ │ │ │ ├── feed.overrides │ │ │ │ │ │ └── feed.variables │ │ │ │ └── amazon │ │ │ │ │ └── elements │ │ │ │ │ └── button.overrides │ │ │ └── definitions │ │ │ │ ├── globals │ │ │ │ └── reset.less │ │ │ │ └── elements │ │ │ │ └── flag.less │ │ └── tasks │ │ │ ├── config │ │ │ ├── admin │ │ │ │ ├── oauth.example.js │ │ │ │ ├── templates │ │ │ │ │ ├── component-package.js │ │ │ │ │ ├── less-package.js │ │ │ │ │ ├── composer.json │ │ │ │ │ ├── package.json │ │ │ │ │ ├── bower.json │ │ │ │ │ ├── css-package.js │ │ │ │ │ └── README.md │ │ │ │ └── github.js │ │ │ └── docs.js │ │ │ ├── version.js │ │ │ ├── clean.js │ │ │ ├── collections │ │ │ ├── README.md │ │ │ ├── rtl.js │ │ │ └── build.js │ │ │ ├── README.md │ │ │ ├── admin │ │ │ ├── publish.js │ │ │ └── release.js │ │ │ ├── check-install.js │ │ │ ├── build │ │ │ └── assets.js │ │ │ └── build.js │ └── main.less ├── utils │ └── index.js ├── .babelrc ├── fonts │ └── README.md ├── reducers │ ├── index.js │ ├── counter.js │ └── info.js ├── images │ └── go.png ├── actions │ ├── actionTypes.js │ ├── counterActions.js │ └── infoActions.js ├── views │ ├── About.js │ ├── NotFound.js │ ├── Home.js │ ├── Redirect.js │ └── routes.js ├── babel.server.js ├── config.js ├── redux │ ├── clientMiddleware.js │ └── create.js ├── webpack │ ├── utils │ │ ├── notifyStats.js │ │ └── writeStats.js │ └── webpack-dev-server.js └── .eslintrc ├── Godeps ├── _workspace │ ├── .gitignore │ └── src │ │ ├── github.com │ │ ├── Sirupsen │ │ │ └── logrus │ │ │ │ ├── .gitignore │ │ │ │ ├── .travis.yml │ │ │ │ ├── terminal_openbsd.go │ │ │ │ ├── terminal_linux.go │ │ │ │ ├── terminal_darwin.go │ │ │ │ ├── terminal_freebsd.go │ │ │ │ ├── CHANGELOG.md │ │ │ │ ├── hooks │ │ │ │ ├── syslog │ │ │ │ │ ├── README.md │ │ │ │ │ └── syslog_test.go │ │ │ │ └── papertrail │ │ │ │ │ └── papertrail_test.go │ │ │ │ ├── terminal_notwindows.go │ │ │ │ ├── writer.go │ │ │ │ ├── terminal_windows.go │ │ │ │ ├── examples │ │ │ │ ├── hook │ │ │ │ │ └── hook.go │ │ │ │ └── basic │ │ │ │ │ └── basic.go │ │ │ │ ├── json_formatter.go │ │ │ │ └── LICENSE │ │ ├── gin-gonic │ │ │ └── gin │ │ │ │ ├── wercker.yml │ │ │ │ ├── .gitignore │ │ │ │ ├── examples │ │ │ │ ├── app-engine │ │ │ │ │ ├── app.yaml │ │ │ │ │ ├── README.md │ │ │ │ │ └── hello.go │ │ │ │ ├── realtime-advanced │ │ │ │ │ ├── rooms.go │ │ │ │ │ └── main.go │ │ │ │ └── realtime-chat │ │ │ │ │ └── rooms.go │ │ │ │ ├── deprecated.go │ │ │ │ ├── render │ │ │ │ ├── data.go │ │ │ │ ├── xml.go │ │ │ │ ├── redirect.go │ │ │ │ ├── text.go │ │ │ │ ├── render.go │ │ │ │ └── json.go │ │ │ │ ├── binding │ │ │ │ ├── xml.go │ │ │ │ ├── json.go │ │ │ │ ├── form.go │ │ │ │ └── default_validator.go │ │ │ │ ├── .travis.yml │ │ │ │ ├── mode_test.go │ │ │ │ ├── Godeps │ │ │ │ └── Godeps.json │ │ │ │ ├── fs.go │ │ │ │ ├── LICENSE │ │ │ │ └── debug.go │ │ ├── dgrijalva │ │ │ └── jwt-go │ │ │ │ ├── .gitignore │ │ │ │ ├── .travis.yml │ │ │ │ ├── test │ │ │ │ ├── hmacTestKey │ │ │ │ └── sample_key.pub │ │ │ │ ├── doc.go │ │ │ │ ├── signing_method.go │ │ │ │ └── LICENSE │ │ ├── manucorporat │ │ │ └── sse │ │ │ │ ├── .travis.yml │ │ │ │ ├── writer.go │ │ │ │ └── LICENSE │ │ ├── pravj │ │ │ └── geopattern │ │ │ │ ├── examples │ │ │ │ ├── pattern.png │ │ │ │ ├── patterns │ │ │ │ │ ├── xes.png │ │ │ │ │ ├── plaid.png │ │ │ │ │ ├── chevrons.png │ │ │ │ │ ├── diamonds.png │ │ │ │ │ ├── hexagons.png │ │ │ │ │ ├── octagons.png │ │ │ │ │ ├── pattern.png │ │ │ │ │ ├── squares.png │ │ │ │ │ ├── triangles.png │ │ │ │ │ ├── plus-signs.png │ │ │ │ │ ├── sine-waves.png │ │ │ │ │ ├── mosaic-squares.png │ │ │ │ │ ├── nested-squares.png │ │ │ │ │ ├── tessellation.png │ │ │ │ │ ├── concentric-circles.png │ │ │ │ │ ├── overlapping-circles.png │ │ │ │ │ └── overlapping-rings.png │ │ │ │ ├── uri_image.go │ │ │ │ ├── base64.go │ │ │ │ ├── default.go │ │ │ │ ├── phrase.go │ │ │ │ ├── pattern.go │ │ │ │ ├── background_color.go │ │ │ │ └── base_color.go │ │ │ │ └── geopattern.go │ │ ├── lucasb-eyer │ │ │ └── go-colorful │ │ │ │ ├── doc │ │ │ │ ├── colorblend │ │ │ │ │ ├── clamped.png │ │ │ │ │ ├── clamped.xcf │ │ │ │ │ ├── invalid.png │ │ │ │ │ ├── invalid.xcf │ │ │ │ │ ├── colorblend.png │ │ │ │ │ └── colorblend.xcf │ │ │ │ ├── colordist │ │ │ │ │ ├── colordist.png │ │ │ │ │ ├── colordist.xcf │ │ │ │ │ └── colordist.go │ │ │ │ ├── colorgens │ │ │ │ │ └── colorgens.png │ │ │ │ ├── gradientgen │ │ │ │ │ └── gradientgen.png │ │ │ │ └── palettegens │ │ │ │ │ └── palettegens.png │ │ │ │ ├── .gitignore │ │ │ │ ├── happy_palettegen.go │ │ │ │ ├── warm_palettegen.go │ │ │ │ └── colorgens_test.go │ │ └── mattn │ │ │ └── go-colorable │ │ │ ├── colorable_others.go │ │ │ └── README.md │ │ ├── gopkg.in │ │ ├── mgo.v2 │ │ │ ├── raceon.go │ │ │ ├── raceoff.go │ │ │ ├── Makefile │ │ │ ├── README.md │ │ │ ├── dbtest │ │ │ │ └── export_test.go │ │ │ ├── testserver │ │ │ │ └── export_test.go │ │ │ ├── syscall_windows_test.go │ │ │ ├── saslstub.go │ │ │ ├── saslimpl.go │ │ │ ├── syscall_test.go │ │ │ ├── internal │ │ │ │ └── sasl │ │ │ │ │ └── sasl_windows.h │ │ │ ├── export_test.go │ │ │ └── txn │ │ │ │ └── tarjan_test.go │ │ ├── natefinch │ │ │ └── lumberjack.v2 │ │ │ │ ├── chown.go │ │ │ │ ├── .gitignore │ │ │ │ ├── example_test.go │ │ │ │ ├── chown_linux.go │ │ │ │ ├── rotate_test.go │ │ │ │ └── LICENSE │ │ ├── yaml.v2 │ │ │ └── suite_test.go │ │ └── bluesuncorp │ │ │ └── validator.v5 │ │ │ ├── .travis.yml │ │ │ ├── .gitignore │ │ │ └── LICENSE │ │ └── golang.org │ │ └── x │ │ ├── net │ │ └── context │ │ │ └── withtimeout_test.go │ │ └── crypto │ │ └── bcrypt │ │ └── base64.go └── Readme ├── logo.jpg ├── favicon.ico ├── isomorphic_code_share.png ├── contributors.txt ├── resources ├── init.go └── auth.go ├── middleware ├── init.go └── loads.go ├── bower.json ├── helpers ├── log │ ├── logger.go │ └── log_template.go ├── apiErrors │ ├── auth.go │ ├── error.go │ ├── category.go │ └── common.go └── utils │ └── mustLoad.go ├── handlers ├── init.go ├── home.go └── error.go ├── .gitignore ├── config.yml ├── models ├── category.go ├── post.go └── user.go ├── Makefile ├── cmd └── server.go └── forum.go /front/styles/style.less: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /front/utils/index.js: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /Godeps/_workspace/.gitignore: -------------------------------------------------------------------------------- 1 | /pkg 2 | /bin 3 | -------------------------------------------------------------------------------- /front/styles/semantic/src/site/modules/embed.variables: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /front/.babelrc: -------------------------------------------------------------------------------- 1 | { 2 | "stage": 0, 3 | "loose": "all" 4 | } 5 | -------------------------------------------------------------------------------- /front/styles/semantic/src/themes/chubby/collections/menu.overrides: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /front/styles/semantic/src/themes/colored/modules/checkbox.overrides: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /front/styles/semantic/src/themes/default/collections/table.overrides: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /front/styles/semantic/src/themes/gmail/collections/message.overrides: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /front/styles/semantic/src/themes/material/globals/site.overrides: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /front/styles/semantic/src/themes/round/elements/button.overrides: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/Sirupsen/logrus/.gitignore: -------------------------------------------------------------------------------- 1 | logrus 2 | -------------------------------------------------------------------------------- /front/fonts/README.md: -------------------------------------------------------------------------------- 1 | Put custom fonts here and use in CSS @font-face 2 | -------------------------------------------------------------------------------- /front/styles/semantic/src/themes/bootstrap3/elements/button.overrides: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /logo.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/golang-vietnam/forum/HEAD/logo.jpg -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/gin-gonic/gin/wercker.yml: -------------------------------------------------------------------------------- 1 | box: wercker/default -------------------------------------------------------------------------------- /favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/golang-vietnam/forum/HEAD/favicon.ico -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/dgrijalva/jwt-go/.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | bin 3 | 4 | 5 | -------------------------------------------------------------------------------- /front/reducers/index.js: -------------------------------------------------------------------------------- 1 | export info from './info'; 2 | export counter from './counter'; 3 | -------------------------------------------------------------------------------- /front/images/go.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/golang-vietnam/forum/HEAD/front/images/go.png -------------------------------------------------------------------------------- /isomorphic_code_share.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/golang-vietnam/forum/HEAD/isomorphic_code_share.png -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/dgrijalva/jwt-go/.travis.yml: -------------------------------------------------------------------------------- 1 | language: go 2 | 3 | go: 4 | - 1.3.3 5 | - 1.4.2 6 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/gopkg.in/mgo.v2/raceon.go: -------------------------------------------------------------------------------- 1 | // +build race 2 | 3 | package mgo 4 | 5 | const raceDetector = true 6 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/gin-gonic/gin/.gitignore: -------------------------------------------------------------------------------- 1 | Godeps/* 2 | !Godeps/Godeps.json 3 | coverage.out 4 | count.out 5 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/gopkg.in/mgo.v2/raceoff.go: -------------------------------------------------------------------------------- 1 | // +build !race 2 | 3 | package mgo 4 | 5 | const raceDetector = false 6 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/gopkg.in/mgo.v2/Makefile: -------------------------------------------------------------------------------- 1 | startdb: 2 | @testdb/setup.sh start 3 | 4 | stopdb: 5 | @testdb/setup.sh stop 6 | -------------------------------------------------------------------------------- /front/styles/semantic/src/site/elements/flag.variables: -------------------------------------------------------------------------------- 1 | /*------------------- 2 | Flag Variables 3 | --------------------*/ 4 | -------------------------------------------------------------------------------- /front/styles/semantic/src/themes/material/collections/menu.overrides: -------------------------------------------------------------------------------- 1 | @import url(http://fonts.googleapis.com/css?family=Roboto); 2 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/manucorporat/sse/.travis.yml: -------------------------------------------------------------------------------- 1 | language: go 2 | sudo: false 3 | go: 4 | - 1.3 5 | - 1.4 6 | - tip 7 | -------------------------------------------------------------------------------- /front/styles/semantic/src/site/globals/site.variables: -------------------------------------------------------------------------------- 1 | /******************************* 2 | User Global Variables 3 | *******************************/ -------------------------------------------------------------------------------- /front/styles/semantic/src/site/modules/nag.overrides: -------------------------------------------------------------------------------- 1 | /******************************* 2 | User Overrides 3 | *******************************/ 4 | -------------------------------------------------------------------------------- /front/styles/semantic/src/site/modules/tab.overrides: -------------------------------------------------------------------------------- 1 | /******************************* 2 | User Overrides 3 | *******************************/ 4 | -------------------------------------------------------------------------------- /front/styles/semantic/src/site/elements/button.overrides: -------------------------------------------------------------------------------- 1 | /******************************* 2 | Site Overrides 3 | *******************************/ 4 | -------------------------------------------------------------------------------- /front/styles/semantic/src/site/elements/flag.overrides: -------------------------------------------------------------------------------- 1 | /******************************* 2 | Site Overrides 3 | *******************************/ 4 | -------------------------------------------------------------------------------- /front/styles/semantic/src/site/elements/header.overrides: -------------------------------------------------------------------------------- 1 | /******************************* 2 | Site Overrides 3 | *******************************/ 4 | -------------------------------------------------------------------------------- /front/styles/semantic/src/site/elements/icon.overrides: -------------------------------------------------------------------------------- 1 | /******************************* 2 | Site Overrides 3 | *******************************/ 4 | -------------------------------------------------------------------------------- /front/styles/semantic/src/site/elements/image.overrides: -------------------------------------------------------------------------------- 1 | /******************************* 2 | Site Overrides 3 | *******************************/ 4 | -------------------------------------------------------------------------------- /front/styles/semantic/src/site/elements/input.overrides: -------------------------------------------------------------------------------- 1 | /******************************* 2 | Site Overrides 3 | *******************************/ 4 | -------------------------------------------------------------------------------- /front/styles/semantic/src/site/elements/label.overrides: -------------------------------------------------------------------------------- 1 | /******************************* 2 | Site Overrides 3 | *******************************/ 4 | -------------------------------------------------------------------------------- /front/styles/semantic/src/site/elements/loader.overrides: -------------------------------------------------------------------------------- 1 | /******************************* 2 | Site Overrides 3 | *******************************/ 4 | -------------------------------------------------------------------------------- /front/styles/semantic/src/site/elements/rail.overrides: -------------------------------------------------------------------------------- 1 | /******************************* 2 | Site Overrides 3 | *******************************/ 4 | -------------------------------------------------------------------------------- /front/styles/semantic/src/site/elements/reveal.overrides: -------------------------------------------------------------------------------- 1 | /******************************* 2 | Site Overrides 3 | *******************************/ 4 | -------------------------------------------------------------------------------- /front/styles/semantic/src/site/elements/step.overrides: -------------------------------------------------------------------------------- 1 | /******************************* 2 | Site Overrides 3 | *******************************/ 4 | -------------------------------------------------------------------------------- /front/styles/semantic/src/site/globals/reset.overrides: -------------------------------------------------------------------------------- 1 | /******************************* 2 | Site Overrides 3 | *******************************/ 4 | -------------------------------------------------------------------------------- /front/styles/semantic/src/site/globals/site.overrides: -------------------------------------------------------------------------------- 1 | /******************************* 2 | Site Overrides 3 | *******************************/ 4 | -------------------------------------------------------------------------------- /front/styles/semantic/src/site/modules/chatroom.overrides: -------------------------------------------------------------------------------- 1 | /******************************* 2 | User Overrides 3 | *******************************/ 4 | -------------------------------------------------------------------------------- /front/styles/semantic/src/site/modules/dimmer.overrides: -------------------------------------------------------------------------------- 1 | /******************************* 2 | User Overrides 3 | *******************************/ 4 | -------------------------------------------------------------------------------- /front/styles/semantic/src/site/modules/dropdown.overrides: -------------------------------------------------------------------------------- 1 | /******************************* 2 | User Overrides 3 | *******************************/ 4 | -------------------------------------------------------------------------------- /front/styles/semantic/src/site/modules/embed.overrides: -------------------------------------------------------------------------------- 1 | /******************************* 2 | Site Overrides 3 | *******************************/ 4 | -------------------------------------------------------------------------------- /front/styles/semantic/src/site/modules/modal.overrides: -------------------------------------------------------------------------------- 1 | /******************************* 2 | Site Overrides 3 | *******************************/ 4 | -------------------------------------------------------------------------------- /front/styles/semantic/src/site/modules/modal.variables: -------------------------------------------------------------------------------- 1 | /******************************* 2 | Site Overrides 3 | *******************************/ 4 | -------------------------------------------------------------------------------- /front/styles/semantic/src/site/modules/nag.variables: -------------------------------------------------------------------------------- 1 | /******************************* 2 | User Variable Overrides 3 | *******************************/ 4 | -------------------------------------------------------------------------------- /front/styles/semantic/src/site/modules/popup.overrides: -------------------------------------------------------------------------------- 1 | /******************************* 2 | User Overrides 3 | *******************************/ 4 | -------------------------------------------------------------------------------- /front/styles/semantic/src/site/modules/rating.overrides: -------------------------------------------------------------------------------- 1 | /******************************* 2 | Site Overrides 3 | *******************************/ 4 | -------------------------------------------------------------------------------- /front/styles/semantic/src/site/modules/rating.variables: -------------------------------------------------------------------------------- 1 | /******************************* 2 | Site Overrides 3 | *******************************/ 4 | -------------------------------------------------------------------------------- /front/styles/semantic/src/site/modules/search.overrides: -------------------------------------------------------------------------------- 1 | /******************************* 2 | Site Overrides 3 | *******************************/ 4 | -------------------------------------------------------------------------------- /front/styles/semantic/src/site/modules/search.variables: -------------------------------------------------------------------------------- 1 | /******************************* 2 | Site Overrides 3 | *******************************/ 4 | -------------------------------------------------------------------------------- /front/styles/semantic/src/site/modules/shape.overrides: -------------------------------------------------------------------------------- 1 | /******************************* 2 | User Overrides 3 | *******************************/ 4 | -------------------------------------------------------------------------------- /front/styles/semantic/src/site/modules/sidebar.overrides: -------------------------------------------------------------------------------- 1 | /******************************* 2 | Site Overrides 3 | *******************************/ 4 | -------------------------------------------------------------------------------- /front/styles/semantic/src/site/modules/sidebar.variables: -------------------------------------------------------------------------------- 1 | /******************************* 2 | Site Overrides 3 | *******************************/ 4 | -------------------------------------------------------------------------------- /front/styles/semantic/src/site/modules/sticky.overrides: -------------------------------------------------------------------------------- 1 | /******************************* 2 | Site Overrides 3 | *******************************/ 4 | -------------------------------------------------------------------------------- /front/styles/semantic/src/site/modules/sticky.variables: -------------------------------------------------------------------------------- 1 | /******************************* 2 | Site Overrides 3 | *******************************/ 4 | -------------------------------------------------------------------------------- /front/styles/semantic/src/site/modules/tab.variables: -------------------------------------------------------------------------------- 1 | /******************************* 2 | User Variable Overrides 3 | *******************************/ 4 | -------------------------------------------------------------------------------- /front/styles/semantic/src/site/views/ad.overrides: -------------------------------------------------------------------------------- 1 | /******************************* 2 | User Variable Overrides 3 | *******************************/ 4 | -------------------------------------------------------------------------------- /front/styles/semantic/src/site/views/ad.variables: -------------------------------------------------------------------------------- 1 | /******************************* 2 | User Variable Overrides 3 | *******************************/ 4 | -------------------------------------------------------------------------------- /front/styles/semantic/src/site/views/card.overrides: -------------------------------------------------------------------------------- 1 | /******************************* 2 | User Variable Overrides 3 | *******************************/ 4 | -------------------------------------------------------------------------------- /front/styles/semantic/src/site/views/card.variables: -------------------------------------------------------------------------------- 1 | /******************************* 2 | User Variable Overrides 3 | *******************************/ 4 | -------------------------------------------------------------------------------- /front/styles/semantic/src/site/views/feed.overrides: -------------------------------------------------------------------------------- 1 | /******************************* 2 | User Variable Overrides 3 | *******************************/ 4 | -------------------------------------------------------------------------------- /front/styles/semantic/src/site/views/feed.variables: -------------------------------------------------------------------------------- 1 | /******************************* 2 | User Variable Overrides 3 | *******************************/ 4 | -------------------------------------------------------------------------------- /front/styles/semantic/src/site/views/item.overrides: -------------------------------------------------------------------------------- 1 | /******************************* 2 | User Variable Overrides 3 | *******************************/ 4 | -------------------------------------------------------------------------------- /front/styles/semantic/src/site/views/item.variables: -------------------------------------------------------------------------------- 1 | /******************************* 2 | User Variable Overrides 3 | *******************************/ 4 | -------------------------------------------------------------------------------- /front/styles/semantic/src/themes/basic/globals/reset.variables: -------------------------------------------------------------------------------- 1 | /******************************* 2 | Reset 3 | *******************************/ -------------------------------------------------------------------------------- /front/styles/semantic/src/themes/default/globals/reset.variables: -------------------------------------------------------------------------------- 1 | /******************************* 2 | Reset 3 | *******************************/ -------------------------------------------------------------------------------- /front/styles/semantic/src/themes/resetcss/globals/reset.variables: -------------------------------------------------------------------------------- 1 | /******************************* 2 | Reset 3 | *******************************/ -------------------------------------------------------------------------------- /front/styles/semantic/src/site/collections/form.overrides: -------------------------------------------------------------------------------- 1 | /******************************* 2 | Site Overrides 3 | *******************************/ 4 | -------------------------------------------------------------------------------- /front/styles/semantic/src/site/collections/form.variables: -------------------------------------------------------------------------------- 1 | /******************************* 2 | User Variable Overrides 3 | *******************************/ 4 | -------------------------------------------------------------------------------- /front/styles/semantic/src/site/collections/grid.overrides: -------------------------------------------------------------------------------- 1 | /******************************* 2 | Site Overrides 3 | *******************************/ 4 | -------------------------------------------------------------------------------- /front/styles/semantic/src/site/collections/grid.variables: -------------------------------------------------------------------------------- 1 | /******************************* 2 | User Variable Overrides 3 | *******************************/ 4 | -------------------------------------------------------------------------------- /front/styles/semantic/src/site/collections/menu.overrides: -------------------------------------------------------------------------------- 1 | /******************************* 2 | Site Overrides 3 | *******************************/ 4 | -------------------------------------------------------------------------------- /front/styles/semantic/src/site/collections/menu.variables: -------------------------------------------------------------------------------- 1 | /******************************* 2 | User Variable Overrides 3 | *******************************/ 4 | -------------------------------------------------------------------------------- /front/styles/semantic/src/site/collections/table.overrides: -------------------------------------------------------------------------------- 1 | /******************************* 2 | Site Overrides 3 | *******************************/ 4 | -------------------------------------------------------------------------------- /front/styles/semantic/src/site/elements/button.variables: -------------------------------------------------------------------------------- 1 | /******************************* 2 | User Variable Overrides 3 | *******************************/ 4 | -------------------------------------------------------------------------------- /front/styles/semantic/src/site/elements/container.overrides: -------------------------------------------------------------------------------- 1 | /******************************* 2 | Site Overrides 3 | *******************************/ 4 | -------------------------------------------------------------------------------- /front/styles/semantic/src/site/elements/divider.overrides: -------------------------------------------------------------------------------- 1 | /******************************* 2 | Site Overrides 3 | *******************************/ 4 | -------------------------------------------------------------------------------- /front/styles/semantic/src/site/elements/divider.variables: -------------------------------------------------------------------------------- 1 | /******************************* 2 | User Variable Overrides 3 | *******************************/ 4 | -------------------------------------------------------------------------------- /front/styles/semantic/src/site/elements/header.variables: -------------------------------------------------------------------------------- 1 | /******************************* 2 | User Variable Overrides 3 | *******************************/ 4 | -------------------------------------------------------------------------------- /front/styles/semantic/src/site/elements/icon.variables: -------------------------------------------------------------------------------- 1 | /******************************* 2 | User Variable Overrides 3 | *******************************/ 4 | -------------------------------------------------------------------------------- /front/styles/semantic/src/site/elements/image.variables: -------------------------------------------------------------------------------- 1 | /******************************* 2 | User Variable Overrides 3 | *******************************/ 4 | -------------------------------------------------------------------------------- /front/styles/semantic/src/site/elements/input.variables: -------------------------------------------------------------------------------- 1 | /******************************* 2 | User Variable Overrides 3 | *******************************/ 4 | -------------------------------------------------------------------------------- /front/styles/semantic/src/site/elements/label.variables: -------------------------------------------------------------------------------- 1 | /******************************* 2 | User Variable Overrides 3 | *******************************/ 4 | -------------------------------------------------------------------------------- /front/styles/semantic/src/site/elements/list.overrides: -------------------------------------------------------------------------------- 1 | /******************************* 2 | User Variable Overrides 3 | *******************************/ 4 | -------------------------------------------------------------------------------- /front/styles/semantic/src/site/elements/list.variables: -------------------------------------------------------------------------------- 1 | /******************************* 2 | User Variable Overrides 3 | *******************************/ 4 | -------------------------------------------------------------------------------- /front/styles/semantic/src/site/elements/loader.variables: -------------------------------------------------------------------------------- 1 | /******************************* 2 | User Variable Overrides 3 | *******************************/ 4 | -------------------------------------------------------------------------------- /front/styles/semantic/src/site/elements/rail.variables: -------------------------------------------------------------------------------- 1 | /******************************* 2 | User Variable Overrides 3 | *******************************/ 4 | -------------------------------------------------------------------------------- /front/styles/semantic/src/site/elements/reveal.variables: -------------------------------------------------------------------------------- 1 | /******************************* 2 | User Variable Overrides 3 | *******************************/ 4 | -------------------------------------------------------------------------------- /front/styles/semantic/src/site/elements/segment.overrides: -------------------------------------------------------------------------------- 1 | /******************************* 2 | Site Overrides 3 | *******************************/ 4 | -------------------------------------------------------------------------------- /front/styles/semantic/src/site/elements/segment.variables: -------------------------------------------------------------------------------- 1 | /******************************* 2 | User Variable Overrides 3 | *******************************/ 4 | -------------------------------------------------------------------------------- /front/styles/semantic/src/site/elements/step.variables: -------------------------------------------------------------------------------- 1 | /******************************* 2 | User Variable Overrides 3 | *******************************/ 4 | -------------------------------------------------------------------------------- /front/styles/semantic/src/site/globals/reset.variables: -------------------------------------------------------------------------------- 1 | /******************************* 2 | User Global Variables 3 | *******************************/ 4 | -------------------------------------------------------------------------------- /front/styles/semantic/src/site/modules/accordion.overrides: -------------------------------------------------------------------------------- 1 | /******************************* 2 | User Overrides 3 | *******************************/ 4 | -------------------------------------------------------------------------------- /front/styles/semantic/src/site/modules/chatroom.variables: -------------------------------------------------------------------------------- 1 | /******************************* 2 | User Variable Overrides 3 | *******************************/ 4 | -------------------------------------------------------------------------------- /front/styles/semantic/src/site/modules/checkbox.overrides: -------------------------------------------------------------------------------- 1 | /******************************* 2 | Site Overrides 3 | *******************************/ 4 | -------------------------------------------------------------------------------- /front/styles/semantic/src/site/modules/checkbox.variables: -------------------------------------------------------------------------------- 1 | /******************************* 2 | User Variable Overrides 3 | *******************************/ 4 | -------------------------------------------------------------------------------- /front/styles/semantic/src/site/modules/dimmer.variables: -------------------------------------------------------------------------------- 1 | /******************************* 2 | User Variable Overrides 3 | *******************************/ 4 | -------------------------------------------------------------------------------- /front/styles/semantic/src/site/modules/dropdown.variables: -------------------------------------------------------------------------------- 1 | /******************************* 2 | User Variable Overrides 3 | *******************************/ 4 | -------------------------------------------------------------------------------- /front/styles/semantic/src/site/modules/popup.variables: -------------------------------------------------------------------------------- 1 | /******************************* 2 | User Variable Overrides 3 | *******************************/ 4 | -------------------------------------------------------------------------------- /front/styles/semantic/src/site/modules/progress.overrides: -------------------------------------------------------------------------------- 1 | /******************************* 2 | Site Overrides 3 | *******************************/ 4 | -------------------------------------------------------------------------------- /front/styles/semantic/src/site/modules/progress.variables: -------------------------------------------------------------------------------- 1 | /******************************* 2 | User Variable Overrides 3 | *******************************/ 4 | -------------------------------------------------------------------------------- /front/styles/semantic/src/site/modules/shape.variables: -------------------------------------------------------------------------------- 1 | /******************************* 2 | User Variable Overrides 3 | *******************************/ 4 | -------------------------------------------------------------------------------- /front/styles/semantic/src/site/modules/transition.overrides: -------------------------------------------------------------------------------- 1 | /******************************* 2 | Site Overrides 3 | *******************************/ 4 | -------------------------------------------------------------------------------- /front/styles/semantic/src/site/views/comment.overrides: -------------------------------------------------------------------------------- 1 | /******************************* 2 | User Variable Overrides 3 | *******************************/ 4 | -------------------------------------------------------------------------------- /front/styles/semantic/src/site/views/comment.variables: -------------------------------------------------------------------------------- 1 | /******************************* 2 | User Variable Overrides 3 | *******************************/ 4 | -------------------------------------------------------------------------------- /front/styles/semantic/src/site/views/statistic.overrides: -------------------------------------------------------------------------------- 1 | /******************************* 2 | User Variable Overrides 3 | *******************************/ 4 | -------------------------------------------------------------------------------- /front/styles/semantic/src/site/views/statistic.variables: -------------------------------------------------------------------------------- 1 | /******************************* 2 | User Variable Overrides 3 | *******************************/ 4 | -------------------------------------------------------------------------------- /front/styles/semantic/src/themes/basic/views/card.overrides: -------------------------------------------------------------------------------- 1 | /******************************* 2 | Overrides 3 | *******************************/ 4 | 5 | -------------------------------------------------------------------------------- /front/styles/semantic/src/themes/default/modules/chatroom.variables: -------------------------------------------------------------------------------- 1 | /******************************* 2 | Chatroom 3 | *******************************/ -------------------------------------------------------------------------------- /front/styles/semantic/src/themes/default/modules/tab.overrides: -------------------------------------------------------------------------------- 1 | /******************************* 2 | Tab Overrides 3 | *******************************/ 4 | -------------------------------------------------------------------------------- /front/styles/semantic/src/themes/default/views/ad.overrides: -------------------------------------------------------------------------------- 1 | /******************************* 2 | Theme Overrides 3 | *******************************/ 4 | -------------------------------------------------------------------------------- /front/styles/semantic/src/themes/flat/globals/site.overrides: -------------------------------------------------------------------------------- 1 | /******************************* 2 | Overrides 3 | *******************************/ 4 | -------------------------------------------------------------------------------- /front/styles/main.less: -------------------------------------------------------------------------------- 1 | @import './semantic/src/semantic.less'; 2 | @import '../../node_modules/font-awesome/less/font-awesome.less'; 3 | @import './style.less'; 4 | -------------------------------------------------------------------------------- /front/styles/semantic/src/site/collections/breadcrumb.overrides: -------------------------------------------------------------------------------- 1 | /******************************* 2 | Site Overrides 3 | *******************************/ 4 | -------------------------------------------------------------------------------- /front/styles/semantic/src/site/collections/breadcrumb.variables: -------------------------------------------------------------------------------- 1 | /******************************* 2 | Site Overrides 3 | *******************************/ 4 | -------------------------------------------------------------------------------- /front/styles/semantic/src/site/collections/message.overrides: -------------------------------------------------------------------------------- 1 | /******************************* 2 | User Variable Overrides 3 | *******************************/ 4 | -------------------------------------------------------------------------------- /front/styles/semantic/src/site/collections/message.variables: -------------------------------------------------------------------------------- 1 | /******************************* 2 | User Variable Overrides 3 | *******************************/ 4 | -------------------------------------------------------------------------------- /front/styles/semantic/src/site/collections/table.variables: -------------------------------------------------------------------------------- 1 | /******************************* 2 | User Variable Overrides 3 | *******************************/ 4 | -------------------------------------------------------------------------------- /front/styles/semantic/src/site/elements/container.variables: -------------------------------------------------------------------------------- 1 | /******************************* 2 | User Variable Overrides 3 | *******************************/ 4 | -------------------------------------------------------------------------------- /front/styles/semantic/src/site/modules/accordion.variables: -------------------------------------------------------------------------------- 1 | /******************************* 2 | User Variable Overrides 3 | *******************************/ 4 | -------------------------------------------------------------------------------- /front/styles/semantic/src/site/modules/transition.variables: -------------------------------------------------------------------------------- 1 | /******************************* 2 | User Variable Overrides 3 | *******************************/ 4 | -------------------------------------------------------------------------------- /front/styles/semantic/src/themes/basic/elements/button.overrides: -------------------------------------------------------------------------------- 1 | /******************************* 2 | Overrides 3 | *******************************/ 4 | 5 | -------------------------------------------------------------------------------- /front/styles/semantic/src/themes/basic/modules/progress.overrides: -------------------------------------------------------------------------------- 1 | /******************************* 2 | Progress 3 | *******************************/ 4 | -------------------------------------------------------------------------------- /front/styles/semantic/src/themes/classic/collections/table.overrides: -------------------------------------------------------------------------------- 1 | /******************************* 2 | Overrides 3 | *******************************/ 4 | -------------------------------------------------------------------------------- /front/styles/semantic/src/themes/classic/elements/button.overrides: -------------------------------------------------------------------------------- 1 | /******************************* 2 | Overrides 3 | *******************************/ 4 | -------------------------------------------------------------------------------- /front/styles/semantic/src/themes/classic/elements/header.overrides: -------------------------------------------------------------------------------- 1 | /******************************* 2 | Overrides 3 | *******************************/ 4 | -------------------------------------------------------------------------------- /front/styles/semantic/src/themes/classic/modules/progress.overrides: -------------------------------------------------------------------------------- 1 | /******************************* 2 | Progress 3 | *******************************/ 4 | -------------------------------------------------------------------------------- /front/styles/semantic/src/themes/default/elements/image.overrides: -------------------------------------------------------------------------------- 1 | /******************************* 2 | Theme Overrides 3 | *******************************/ 4 | -------------------------------------------------------------------------------- /front/styles/semantic/src/themes/default/elements/input.overrides: -------------------------------------------------------------------------------- 1 | /******************************* 2 | Theme Overrides 3 | *******************************/ 4 | -------------------------------------------------------------------------------- /front/styles/semantic/src/themes/default/elements/label.overrides: -------------------------------------------------------------------------------- 1 | /******************************* 2 | Theme Overrides 3 | *******************************/ 4 | -------------------------------------------------------------------------------- /front/styles/semantic/src/themes/default/elements/list.overrides: -------------------------------------------------------------------------------- 1 | /******************************* 2 | Theme Overrides 3 | *******************************/ 4 | -------------------------------------------------------------------------------- /front/styles/semantic/src/themes/default/elements/rail.overrides: -------------------------------------------------------------------------------- 1 | /******************************* 2 | Theme Overrides 3 | *******************************/ 4 | -------------------------------------------------------------------------------- /front/styles/semantic/src/themes/default/globals/site.overrides: -------------------------------------------------------------------------------- 1 | /******************************* 2 | Global Overrides 3 | *******************************/ 4 | -------------------------------------------------------------------------------- /front/styles/semantic/src/themes/default/modules/dimmer.overrides: -------------------------------------------------------------------------------- 1 | /******************************* 2 | Theme Overrides 3 | *******************************/ 4 | -------------------------------------------------------------------------------- /front/styles/semantic/src/themes/default/modules/embed.overrides: -------------------------------------------------------------------------------- 1 | /******************************* 2 | Video Overrides 3 | *******************************/ 4 | -------------------------------------------------------------------------------- /front/styles/semantic/src/themes/default/modules/modal.overrides: -------------------------------------------------------------------------------- 1 | /******************************* 2 | Theme Overrides 3 | *******************************/ 4 | -------------------------------------------------------------------------------- /front/styles/semantic/src/themes/default/modules/nag.overrides: -------------------------------------------------------------------------------- 1 | /******************************* 2 | Theme Overrides 3 | *******************************/ 4 | -------------------------------------------------------------------------------- /front/styles/semantic/src/themes/default/modules/popup.overrides: -------------------------------------------------------------------------------- 1 | /******************************* 2 | Theme Overrides 3 | *******************************/ 4 | -------------------------------------------------------------------------------- /front/styles/semantic/src/themes/default/modules/progress.overrides: -------------------------------------------------------------------------------- 1 | /******************************* 2 | Progress 3 | *******************************/ 4 | -------------------------------------------------------------------------------- /front/styles/semantic/src/themes/default/modules/search.overrides: -------------------------------------------------------------------------------- 1 | /******************************* 2 | Theme Overrides 3 | *******************************/ 4 | -------------------------------------------------------------------------------- /front/styles/semantic/src/themes/default/modules/shape.overrides: -------------------------------------------------------------------------------- 1 | /******************************* 2 | Theme Overrides 3 | *******************************/ 4 | -------------------------------------------------------------------------------- /front/styles/semantic/src/themes/default/modules/sticky.overrides: -------------------------------------------------------------------------------- 1 | /******************************* 2 | Theme Overrides 3 | *******************************/ 4 | -------------------------------------------------------------------------------- /front/styles/semantic/src/themes/default/views/card.overrides: -------------------------------------------------------------------------------- 1 | /******************************* 2 | Theme Overrides 3 | *******************************/ 4 | -------------------------------------------------------------------------------- /front/styles/semantic/src/themes/default/views/comment.overrides: -------------------------------------------------------------------------------- 1 | /******************************* 2 | Theme Overrides 3 | *******************************/ 4 | -------------------------------------------------------------------------------- /front/styles/semantic/src/themes/default/views/feed.overrides: -------------------------------------------------------------------------------- 1 | /******************************* 2 | Theme Overrides 3 | *******************************/ 4 | -------------------------------------------------------------------------------- /front/styles/semantic/src/themes/default/views/item.overrides: -------------------------------------------------------------------------------- 1 | /******************************* 2 | Theme Overrides 3 | *******************************/ 4 | -------------------------------------------------------------------------------- /front/styles/semantic/src/themes/duo/elements/loader.overrides: -------------------------------------------------------------------------------- 1 | /******************************* 2 | Theme Overrides 3 | *******************************/ 4 | -------------------------------------------------------------------------------- /front/styles/semantic/src/themes/fixed-width/modules/modal.overrides: -------------------------------------------------------------------------------- 1 | /******************************* 2 | Overrides 3 | *******************************/ 4 | -------------------------------------------------------------------------------- /front/styles/semantic/src/themes/github/elements/segment.overrides: -------------------------------------------------------------------------------- 1 | /******************************* 2 | Overrides 3 | *******************************/ 4 | -------------------------------------------------------------------------------- /front/styles/semantic/src/themes/raised/elements/button.overrides: -------------------------------------------------------------------------------- 1 | /******************************* 2 | Overrides 3 | *******************************/ 4 | -------------------------------------------------------------------------------- /front/styles/semantic/src/themes/striped/modules/progress.variables: -------------------------------------------------------------------------------- 1 | /******************************* 2 | Progress 3 | *******************************/ 4 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/Sirupsen/logrus/.travis.yml: -------------------------------------------------------------------------------- 1 | language: go 2 | go: 3 | - 1.2 4 | - 1.3 5 | - 1.4 6 | - tip 7 | install: 8 | - go get -t ./... 9 | -------------------------------------------------------------------------------- /front/styles/semantic/src/themes/basic/collections/table.overrides: -------------------------------------------------------------------------------- 1 | /******************************* 2 | Overrides 3 | *******************************/ 4 | 5 | -------------------------------------------------------------------------------- /front/styles/semantic/src/themes/default/collections/form.overrides: -------------------------------------------------------------------------------- 1 | /******************************* 2 | Theme Overrides 3 | *******************************/ 4 | -------------------------------------------------------------------------------- /front/styles/semantic/src/themes/default/collections/menu.overrides: -------------------------------------------------------------------------------- 1 | /******************************* 2 | Theme Overrides 3 | *******************************/ 4 | -------------------------------------------------------------------------------- /front/styles/semantic/src/themes/default/collections/message.overrides: -------------------------------------------------------------------------------- 1 | /******************************* 2 | Theme Overrides 3 | *******************************/ 4 | -------------------------------------------------------------------------------- /front/styles/semantic/src/themes/default/elements/button.overrides: -------------------------------------------------------------------------------- 1 | /******************************* 2 | Theme Overrides 3 | *******************************/ 4 | -------------------------------------------------------------------------------- /front/styles/semantic/src/themes/default/elements/container.overrides: -------------------------------------------------------------------------------- 1 | /******************************* 2 | Theme Overrides 3 | *******************************/ 4 | -------------------------------------------------------------------------------- /front/styles/semantic/src/themes/default/elements/loader.overrides: -------------------------------------------------------------------------------- 1 | /******************************* 2 | Theme Overrides 3 | *******************************/ 4 | -------------------------------------------------------------------------------- /front/styles/semantic/src/themes/default/elements/reveal.overrides: -------------------------------------------------------------------------------- 1 | /******************************* 2 | Theme Overrides 3 | *******************************/ 4 | -------------------------------------------------------------------------------- /front/styles/semantic/src/themes/default/elements/segment.overrides: -------------------------------------------------------------------------------- 1 | /******************************* 2 | Theme Overrides 3 | *******************************/ 4 | -------------------------------------------------------------------------------- /front/styles/semantic/src/themes/default/modules/chatroom.overrides: -------------------------------------------------------------------------------- 1 | /******************************* 2 | Theme Overrides 3 | *******************************/ 4 | -------------------------------------------------------------------------------- /front/styles/semantic/src/themes/default/modules/sidebar.overrides: -------------------------------------------------------------------------------- 1 | /******************************* 2 | Theme Overrides 3 | *******************************/ 4 | -------------------------------------------------------------------------------- /front/styles/semantic/src/themes/default/views/statistic.overrides: -------------------------------------------------------------------------------- 1 | /******************************* 2 | Theme Overrides 3 | *******************************/ 4 | -------------------------------------------------------------------------------- /front/styles/semantic/src/themes/fixed-width/collections/grid.overrides: -------------------------------------------------------------------------------- 1 | /******************************* 2 | Overrides 3 | *******************************/ 4 | -------------------------------------------------------------------------------- /front/styles/semantic/src/themes/github/elements/button.overrides: -------------------------------------------------------------------------------- 1 | /******************************* 2 | Overrides 3 | *******************************/ 4 | 5 | -------------------------------------------------------------------------------- /front/styles/semantic/src/themes/basic/assets/fonts/icons.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/golang-vietnam/forum/HEAD/front/styles/semantic/src/themes/basic/assets/fonts/icons.eot -------------------------------------------------------------------------------- /front/styles/semantic/src/themes/basic/assets/fonts/icons.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/golang-vietnam/forum/HEAD/front/styles/semantic/src/themes/basic/assets/fonts/icons.ttf -------------------------------------------------------------------------------- /front/styles/semantic/src/themes/default/collections/breadcrumb.overrides: -------------------------------------------------------------------------------- 1 | /******************************* 2 | Theme Overrides 3 | *******************************/ 4 | -------------------------------------------------------------------------------- /front/styles/semantic/src/themes/default/collections/grid.overrides: -------------------------------------------------------------------------------- 1 | /******************************* 2 | Theme Overrides 3 | *******************************/ 4 | 5 | -------------------------------------------------------------------------------- /front/styles/semantic/src/themes/default/elements/header.overrides: -------------------------------------------------------------------------------- 1 | /******************************* 2 | Theme Overrides 3 | *******************************/ 4 | 5 | -------------------------------------------------------------------------------- /front/actions/actionTypes.js: -------------------------------------------------------------------------------- 1 | export const INFO_LOAD = 'INFO_LOAD'; 2 | export const INFO_LOAD_SUCCESS = 'INFO_LOAD_SUCCESS'; 3 | export const INFO_LOAD_FAIL = 'INFO_LOAD_FAIL'; 4 | -------------------------------------------------------------------------------- /front/styles/semantic/src/themes/basic/assets/fonts/icons.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/golang-vietnam/forum/HEAD/front/styles/semantic/src/themes/basic/assets/fonts/icons.woff -------------------------------------------------------------------------------- /front/styles/semantic/src/themes/default/assets/fonts/icons.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/golang-vietnam/forum/HEAD/front/styles/semantic/src/themes/default/assets/fonts/icons.eot -------------------------------------------------------------------------------- /front/styles/semantic/src/themes/default/assets/fonts/icons.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/golang-vietnam/forum/HEAD/front/styles/semantic/src/themes/default/assets/fonts/icons.ttf -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/dgrijalva/jwt-go/test/hmacTestKey: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/golang-vietnam/forum/HEAD/Godeps/_workspace/src/github.com/dgrijalva/jwt-go/test/hmacTestKey -------------------------------------------------------------------------------- /front/styles/semantic/src/themes/default/assets/fonts/icons.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/golang-vietnam/forum/HEAD/front/styles/semantic/src/themes/default/assets/fonts/icons.woff -------------------------------------------------------------------------------- /front/styles/semantic/src/themes/default/assets/fonts/icons.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/golang-vietnam/forum/HEAD/front/styles/semantic/src/themes/default/assets/fonts/icons.woff2 -------------------------------------------------------------------------------- /front/styles/semantic/src/themes/default/assets/images/flags.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/golang-vietnam/forum/HEAD/front/styles/semantic/src/themes/default/assets/images/flags.png -------------------------------------------------------------------------------- /front/styles/semantic/src/themes/basic/globals/reset.overrides: -------------------------------------------------------------------------------- 1 | /******************************* 2 | Overrides 3 | *******************************/ 4 | 5 | /* No Additonal Resets */ -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/pravj/geopattern/examples/pattern.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/golang-vietnam/forum/HEAD/Godeps/_workspace/src/github.com/pravj/geopattern/examples/pattern.png -------------------------------------------------------------------------------- /front/styles/semantic/src/themes/material/modules/dropdown.overrides: -------------------------------------------------------------------------------- 1 | @import url(http://fonts.googleapis.com/css?family=Roboto:400,700); 2 | 3 | .ui.dropdown { 4 | font-family: 'Roboto'; 5 | } -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/Sirupsen/logrus/terminal_openbsd.go: -------------------------------------------------------------------------------- 1 | package logrus 2 | 3 | import "syscall" 4 | 5 | const ioctlReadTermios = syscall.TIOCGETA 6 | 7 | type Termios syscall.Termios 8 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/gin-gonic/gin/examples/app-engine/app.yaml: -------------------------------------------------------------------------------- 1 | application: hello 2 | version: 1 3 | runtime: go 4 | api_version: go1 5 | 6 | handlers: 7 | - url: /.* 8 | script: _go_app -------------------------------------------------------------------------------- /Godeps/_workspace/src/gopkg.in/mgo.v2/README.md: -------------------------------------------------------------------------------- 1 | The MongoDB driver for Go 2 | ------------------------- 3 | 4 | Please go to [http://labix.org/mgo](http://labix.org/mgo) for all project details. 5 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/pravj/geopattern/examples/patterns/xes.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/golang-vietnam/forum/HEAD/Godeps/_workspace/src/github.com/pravj/geopattern/examples/patterns/xes.png -------------------------------------------------------------------------------- /front/actions/counterActions.js: -------------------------------------------------------------------------------- 1 | import { 2 | COUNTER_INCREMENT 3 | } from './actionTypes'; 4 | 5 | export function increment() { 6 | return { 7 | type: COUNTER_INCREMENT 8 | }; 9 | } 10 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/pravj/geopattern/examples/patterns/plaid.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/golang-vietnam/forum/HEAD/Godeps/_workspace/src/github.com/pravj/geopattern/examples/patterns/plaid.png -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/pravj/geopattern/examples/patterns/chevrons.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/golang-vietnam/forum/HEAD/Godeps/_workspace/src/github.com/pravj/geopattern/examples/patterns/chevrons.png -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/pravj/geopattern/examples/patterns/diamonds.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/golang-vietnam/forum/HEAD/Godeps/_workspace/src/github.com/pravj/geopattern/examples/patterns/diamonds.png -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/pravj/geopattern/examples/patterns/hexagons.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/golang-vietnam/forum/HEAD/Godeps/_workspace/src/github.com/pravj/geopattern/examples/patterns/hexagons.png -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/pravj/geopattern/examples/patterns/octagons.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/golang-vietnam/forum/HEAD/Godeps/_workspace/src/github.com/pravj/geopattern/examples/patterns/octagons.png -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/pravj/geopattern/examples/patterns/pattern.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/golang-vietnam/forum/HEAD/Godeps/_workspace/src/github.com/pravj/geopattern/examples/patterns/pattern.png -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/pravj/geopattern/examples/patterns/squares.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/golang-vietnam/forum/HEAD/Godeps/_workspace/src/github.com/pravj/geopattern/examples/patterns/squares.png -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/pravj/geopattern/examples/patterns/triangles.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/golang-vietnam/forum/HEAD/Godeps/_workspace/src/github.com/pravj/geopattern/examples/patterns/triangles.png -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/lucasb-eyer/go-colorful/doc/colorblend/clamped.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/golang-vietnam/forum/HEAD/Godeps/_workspace/src/github.com/lucasb-eyer/go-colorful/doc/colorblend/clamped.png -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/lucasb-eyer/go-colorful/doc/colorblend/clamped.xcf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/golang-vietnam/forum/HEAD/Godeps/_workspace/src/github.com/lucasb-eyer/go-colorful/doc/colorblend/clamped.xcf -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/lucasb-eyer/go-colorful/doc/colorblend/invalid.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/golang-vietnam/forum/HEAD/Godeps/_workspace/src/github.com/lucasb-eyer/go-colorful/doc/colorblend/invalid.png -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/lucasb-eyer/go-colorful/doc/colorblend/invalid.xcf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/golang-vietnam/forum/HEAD/Godeps/_workspace/src/github.com/lucasb-eyer/go-colorful/doc/colorblend/invalid.xcf -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/pravj/geopattern/examples/patterns/plus-signs.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/golang-vietnam/forum/HEAD/Godeps/_workspace/src/github.com/pravj/geopattern/examples/patterns/plus-signs.png -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/pravj/geopattern/examples/patterns/sine-waves.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/golang-vietnam/forum/HEAD/Godeps/_workspace/src/github.com/pravj/geopattern/examples/patterns/sine-waves.png -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/lucasb-eyer/go-colorful/doc/colorblend/colorblend.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/golang-vietnam/forum/HEAD/Godeps/_workspace/src/github.com/lucasb-eyer/go-colorful/doc/colorblend/colorblend.png -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/lucasb-eyer/go-colorful/doc/colorblend/colorblend.xcf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/golang-vietnam/forum/HEAD/Godeps/_workspace/src/github.com/lucasb-eyer/go-colorful/doc/colorblend/colorblend.xcf -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/lucasb-eyer/go-colorful/doc/colordist/colordist.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/golang-vietnam/forum/HEAD/Godeps/_workspace/src/github.com/lucasb-eyer/go-colorful/doc/colordist/colordist.png -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/lucasb-eyer/go-colorful/doc/colordist/colordist.xcf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/golang-vietnam/forum/HEAD/Godeps/_workspace/src/github.com/lucasb-eyer/go-colorful/doc/colordist/colordist.xcf -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/lucasb-eyer/go-colorful/doc/colorgens/colorgens.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/golang-vietnam/forum/HEAD/Godeps/_workspace/src/github.com/lucasb-eyer/go-colorful/doc/colorgens/colorgens.png -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/pravj/geopattern/examples/patterns/mosaic-squares.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/golang-vietnam/forum/HEAD/Godeps/_workspace/src/github.com/pravj/geopattern/examples/patterns/mosaic-squares.png -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/pravj/geopattern/examples/patterns/nested-squares.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/golang-vietnam/forum/HEAD/Godeps/_workspace/src/github.com/pravj/geopattern/examples/patterns/nested-squares.png -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/pravj/geopattern/examples/patterns/tessellation.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/golang-vietnam/forum/HEAD/Godeps/_workspace/src/github.com/pravj/geopattern/examples/patterns/tessellation.png -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/lucasb-eyer/go-colorful/doc/gradientgen/gradientgen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/golang-vietnam/forum/HEAD/Godeps/_workspace/src/github.com/lucasb-eyer/go-colorful/doc/gradientgen/gradientgen.png -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/lucasb-eyer/go-colorful/doc/palettegens/palettegens.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/golang-vietnam/forum/HEAD/Godeps/_workspace/src/github.com/lucasb-eyer/go-colorful/doc/palettegens/palettegens.png -------------------------------------------------------------------------------- /Godeps/_workspace/src/gopkg.in/natefinch/lumberjack.v2/chown.go: -------------------------------------------------------------------------------- 1 | // +build !linux 2 | 3 | package lumberjack 4 | 5 | import ( 6 | "os" 7 | ) 8 | 9 | func chown(_ string, _ os.FileInfo) error { 10 | return nil 11 | } 12 | -------------------------------------------------------------------------------- /contributors.txt: -------------------------------------------------------------------------------- 1 | This file contains a list of people who have made large contributions 2 | to the private version of Golang VN forum. 3 | 4 | Original Forum design and implementation: 5 | Nguyen The Nguyen -------------------------------------------------------------------------------- /Godeps/_workspace/src/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 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/pravj/geopattern/examples/patterns/concentric-circles.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/golang-vietnam/forum/HEAD/Godeps/_workspace/src/github.com/pravj/geopattern/examples/patterns/concentric-circles.png -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/pravj/geopattern/examples/patterns/overlapping-circles.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/golang-vietnam/forum/HEAD/Godeps/_workspace/src/github.com/pravj/geopattern/examples/patterns/overlapping-circles.png -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/pravj/geopattern/examples/patterns/overlapping-rings.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/golang-vietnam/forum/HEAD/Godeps/_workspace/src/github.com/pravj/geopattern/examples/patterns/overlapping-rings.png -------------------------------------------------------------------------------- /front/styles/semantic/src/themes/chubby/elements/header.overrides: -------------------------------------------------------------------------------- 1 | /******************************* 2 | Overrides 3 | *******************************/ 4 | 5 | @import url(http://fonts.googleapis.com/css?family=Source+Sans+Pro); 6 | -------------------------------------------------------------------------------- /front/styles/semantic/src/themes/default/modules/sticky.variables: -------------------------------------------------------------------------------- 1 | /******************************* 2 | Sticky 3 | *******************************/ 4 | 5 | @transsssitionDuration: @defaultDuration; 6 | @transition: none; 7 | @zIndex: 800; -------------------------------------------------------------------------------- /front/styles/semantic/src/themes/material/modules/modal.overrides: -------------------------------------------------------------------------------- 1 | @import url(http://fonts.googleapis.com/css?family=Roboto); 2 | 3 | .ui.modal .header { 4 | font-family: "Roboto", Arial, Sans-serif !important; 5 | font-weight: 400 !important; 6 | } -------------------------------------------------------------------------------- /Godeps/_workspace/src/gopkg.in/yaml.v2/suite_test.go: -------------------------------------------------------------------------------- 1 | package yaml_test 2 | 3 | import ( 4 | . "gopkg.in/check.v1" 5 | "testing" 6 | ) 7 | 8 | func Test(t *testing.T) { TestingT(t) } 9 | 10 | type S struct{} 11 | 12 | var _ = Suite(&S{}) 13 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/gin-gonic/gin/deprecated.go: -------------------------------------------------------------------------------- 1 | // Copyright 2014 Manu Martinez-Almeida. All rights reserved. 2 | // Use of this source code is governed by a MIT style 3 | // license that can be found in the LICENSE file. 4 | 5 | package gin 6 | -------------------------------------------------------------------------------- /front/styles/semantic/src/themes/github/collections/menu.overrides: -------------------------------------------------------------------------------- 1 | /******************************* 2 | Overrides 3 | *******************************/ 4 | 5 | .ui.menu .item > .label { 6 | box-shadow: 0px 0px 0px 1px rgba(0, 0, 0, 0.1) inset; 7 | } -------------------------------------------------------------------------------- /Godeps/_workspace/src/gopkg.in/mgo.v2/dbtest/export_test.go: -------------------------------------------------------------------------------- 1 | package dbtest 2 | 3 | import ( 4 | "os" 5 | ) 6 | 7 | func (dbs *DBServer) ProcessTest() *os.Process { 8 | if dbs.server == nil { 9 | return nil 10 | } 11 | return dbs.server.Process 12 | } 13 | -------------------------------------------------------------------------------- /front/styles/semantic/tasks/config/admin/oauth.example.js: -------------------------------------------------------------------------------- 1 | /* 2 | Used to import GitHub Auth Token 3 | To Automate GitHub Updates 4 | */ 5 | 6 | module.exports = { 7 | token : 'AN-OAUTH2-TOKEN', 8 | name : 'Your Name', 9 | email : 'user@email.com' 10 | }; -------------------------------------------------------------------------------- /front/styles/semantic/src/themes/chubby/modules/accordion.overrides: -------------------------------------------------------------------------------- 1 | /******************************* 2 | Overrides 3 | *******************************/ 4 | 5 | .ui.styled.accordion .accordion .active.title { 6 | border-bottom: 1px solid rgba(0, 0, 0, 0.1); 7 | } -------------------------------------------------------------------------------- /front/styles/semantic/src/themes/pulsar/elements/loader.variables: -------------------------------------------------------------------------------- 1 | /******************************* 2 | Loader 3 | *******************************/ 4 | 5 | @loaderSpeed: 2s; 6 | @loaderLineColor: @primaryColor; 7 | @invertedLoaderLineColor: @lightPrimaryColor; 8 | -------------------------------------------------------------------------------- /front/styles/semantic/src/themes/rtl/globals/site.overrides: -------------------------------------------------------------------------------- 1 | /******************************* 2 | Global Overrides 3 | *******************************/ 4 | 5 | /* Import Droid Arabic Kufi */ 6 | @import 'http://fonts.googleapis.com/earlyaccess/droidarabickufi.css'; 7 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/gopkg.in/mgo.v2/testserver/export_test.go: -------------------------------------------------------------------------------- 1 | package testserver 2 | 3 | import ( 4 | "os" 5 | ) 6 | 7 | func (ts *TestServer) ProcessTest() *os.Process { 8 | if ts.server == nil { 9 | return nil 10 | } 11 | return ts.server.Process 12 | } 13 | -------------------------------------------------------------------------------- /front/styles/semantic/src/themes/chubby/collections/form.variables: -------------------------------------------------------------------------------- 1 | /*------------------- 2 | Form Variables 3 | --------------------*/ 4 | 5 | @labelTextTransform: uppercase; 6 | @labelFontSize: 0.8em; 7 | 8 | @inputPadding: 1em 1.2em; 9 | @inputBorder: 2px solid @borderColor; -------------------------------------------------------------------------------- /Godeps/_workspace/src/gopkg.in/bluesuncorp/validator.v5/.travis.yml: -------------------------------------------------------------------------------- 1 | language: go 2 | 3 | notificaitons: 4 | email: 5 | recipients: bluesuncorp01@gmail.com 6 | on_success: change 7 | on_failure: always 8 | 9 | go: 10 | - 1.2 11 | - 1.3 12 | - 1.4 13 | - tip -------------------------------------------------------------------------------- /Godeps/_workspace/src/gopkg.in/mgo.v2/syscall_windows_test.go: -------------------------------------------------------------------------------- 1 | package mgo_test 2 | 3 | func stop(pid int) (err error) { 4 | panicOnWindows() // Always does. 5 | return nil 6 | } 7 | 8 | func cont(pid int) (err error) { 9 | panicOnWindows() // Always does. 10 | return nil 11 | } 12 | -------------------------------------------------------------------------------- /front/views/About.js: -------------------------------------------------------------------------------- 1 | import React, {Component} from 'react'; 2 | 3 | export default class SignUp extends Component { 4 | render() { 5 | return ( 6 |
7 |

About Us

8 | 9 |
We write Go!
10 |
11 | ); 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/gopkg.in/mgo.v2/saslstub.go: -------------------------------------------------------------------------------- 1 | //+build !sasl 2 | 3 | package mgo 4 | 5 | import ( 6 | "fmt" 7 | ) 8 | 9 | func saslNew(cred Credential, host string) (saslStepper, error) { 10 | return nil, fmt.Errorf("SASL support not enabled during build (-tags sasl)") 11 | } 12 | -------------------------------------------------------------------------------- /front/views/NotFound.js: -------------------------------------------------------------------------------- 1 | import React, {Component} from 'react'; 2 | 3 | export default class NotFound extends Component { 4 | render() { 5 | return ( 6 |
7 |

404

8 |

This page does not exist!

9 |
10 | ); 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /front/styles/semantic/src/themes/basic/elements/step.overrides: -------------------------------------------------------------------------------- 1 | /******************************* 2 | Overrides 3 | *******************************/ 4 | 5 | .ui.steps .step:after { 6 | display: none !important; 7 | } 8 | .ui.steps .step { 9 | border-radius: 500px !important; 10 | } -------------------------------------------------------------------------------- /resources/init.go: -------------------------------------------------------------------------------- 1 | package resources 2 | 3 | import ( 4 | "github.com/golang-vietnam/forum/helpers/database" 5 | "gopkg.in/mgo.v2" 6 | ) 7 | 8 | var ( 9 | newResourceUser = NewResourceUser() 10 | ) 11 | 12 | func collection(c string) *mgo.Collection { 13 | return database.Collection(c) 14 | } 15 | -------------------------------------------------------------------------------- /front/styles/semantic/src/themes/basic/collections/table.variables: -------------------------------------------------------------------------------- 1 | /*------------------- 2 | Table Variables 3 | --------------------*/ 4 | 5 | @headerBackground: @white; 6 | @footerBackground: @white; 7 | 8 | @cellVerticalPadding: 1em; 9 | @cellHorizontalPadding: 1em; 10 | 11 | @stateMarkerWidth: 1px; -------------------------------------------------------------------------------- /front/actions/infoActions.js: -------------------------------------------------------------------------------- 1 | import { 2 | INFO_LOAD, 3 | INFO_LOAD_SUCCESS, 4 | INFO_LOAD_FAIL 5 | } from './actionTypes'; 6 | 7 | export function load() { 8 | return { 9 | types: [INFO_LOAD, INFO_LOAD_SUCCESS, INFO_LOAD_FAIL], 10 | promise: (client) => client.get('/hello') 11 | }; 12 | } 13 | -------------------------------------------------------------------------------- /front/styles/semantic/tasks/version.js: -------------------------------------------------------------------------------- 1 | /******************************* 2 | Version Task 3 | *******************************/ 4 | 5 | var 6 | release = require('./config/project/release') 7 | ; 8 | 9 | module.exports = function(callback) { 10 | console.log(release.title + ' ' + release.version); 11 | }; -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/mattn/go-colorable/colorable_others.go: -------------------------------------------------------------------------------- 1 | // +build !windows 2 | 3 | package colorable 4 | 5 | import ( 6 | "io" 7 | "os" 8 | ) 9 | 10 | func NewColorableStdout() io.Writer { 11 | return os.Stdout 12 | } 13 | 14 | func NewColorableStderr() io.Writer { 15 | return os.Stderr 16 | } 17 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/pravj/geopattern/examples/uri_image.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "fmt" 5 | "github.com/pravj/geopattern" 6 | ) 7 | 8 | // Prints pattern's uri image string 9 | func main() { 10 | args := map[string]string{} 11 | gp := geopattern.URIimage(args) 12 | fmt.Println(gp) 13 | } 14 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/gopkg.in/mgo.v2/saslimpl.go: -------------------------------------------------------------------------------- 1 | //+build sasl 2 | 3 | package mgo 4 | 5 | import ( 6 | "gopkg.in/mgo.v2/internal/sasl" 7 | ) 8 | 9 | func saslNew(cred Credential, host string) (saslStepper, error) { 10 | return sasl.New(cred.Username, cred.Password, cred.Mechanism, cred.Service, host) 11 | } 12 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/pravj/geopattern/examples/base64.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "fmt" 5 | "github.com/pravj/geopattern" 6 | ) 7 | 8 | // Prints pattern's Base64 encoded string 9 | func main() { 10 | args := map[string]string{} 11 | gp := geopattern.Base64String(args) 12 | fmt.Println(gp) 13 | } 14 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/pravj/geopattern/examples/default.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "fmt" 5 | "github.com/pravj/geopattern" 6 | ) 7 | 8 | // Prints pattern's SVG string without any argument 9 | func main() { 10 | args := map[string]string{} 11 | gp := geopattern.Generate(args) 12 | fmt.Println(gp) 13 | } 14 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/gopkg.in/mgo.v2/syscall_test.go: -------------------------------------------------------------------------------- 1 | // +build !windows 2 | 3 | package mgo_test 4 | 5 | import ( 6 | "syscall" 7 | ) 8 | 9 | func stop(pid int) (err error) { 10 | return syscall.Kill(pid, syscall.SIGSTOP) 11 | } 12 | 13 | func cont(pid int) (err error) { 14 | return syscall.Kill(pid, syscall.SIGCONT) 15 | } 16 | -------------------------------------------------------------------------------- /front/styles/semantic/src/themes/default/modules/tab.variables: -------------------------------------------------------------------------------- 1 | /******************************* 2 | Tab 3 | *******************************/ 4 | 5 | /* Loading */ 6 | @loadingMinHeight: 250px; 7 | @loadingContentPosition: relative; 8 | @loadingContentOffset: -10000px; 9 | 10 | @loaderDistanceFromTop: 100px; 11 | @loaderSize: 2.5em; -------------------------------------------------------------------------------- /front/styles/semantic/src/themes/duo/elements/loader.variables: -------------------------------------------------------------------------------- 1 | /******************************* 2 | Loader 3 | *******************************/ 4 | 5 | @shapeBorderColor: @primaryColor @primaryColor @secondaryColor @secondaryColor; 6 | @invertedShapeBorderColor: @lightPrimaryColor @lightPrimaryColor @lightSecondaryColor @lightSecondaryColor; -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/pravj/geopattern/examples/phrase.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "fmt" 5 | "github.com/pravj/geopattern" 6 | ) 7 | 8 | // Prints pattern's SVG string for a phrase argument 9 | func main() { 10 | args := map[string]string{"phrase": "O"} 11 | gp := geopattern.Generate(args) 12 | fmt.Println(gp) 13 | } 14 | -------------------------------------------------------------------------------- /front/styles/semantic/src/themes/github/collections/message.overrides: -------------------------------------------------------------------------------- 1 | .ui.info.message { 2 | background: linear-gradient(#D8EBF8, #D0E3EF); 3 | } 4 | .ui.error.message { 5 | background: linear-gradient(#F8D8D8, #EFD0D0); 6 | } 7 | .ui.warning.message { 8 | background: linear-gradient(#FFE3C8, #F5DAC0); 9 | } 10 | .ui.success.message { 11 | } 12 | -------------------------------------------------------------------------------- /middleware/init.go: -------------------------------------------------------------------------------- 1 | package middleware 2 | 3 | import ( 4 | "github.com/golang-vietnam/forum/resources" 5 | ) 6 | 7 | var ( 8 | userResource = resources.NewResourceUser() 9 | postResource = resources.NewResourcePost() 10 | authResource = resources.NewResourceAuth() 11 | categoryResource = resources.NewResourceCategory() 12 | ) 13 | -------------------------------------------------------------------------------- /front/styles/semantic/src/themes/classic/modules/progress.variables: -------------------------------------------------------------------------------- 1 | /******************************* 2 | Progress 3 | *******************************/ 4 | 5 | @background: rgba(0, 0, 0, 0.05); 6 | @boxShadow: 0px 0px 4px rgba(0, 0, 0, 0.1) inset; 7 | @barBackground: @subtleGradient #888888; 8 | @border: 1px solid @borderColor; 9 | @padding: @relative3px; -------------------------------------------------------------------------------- /front/styles/semantic/src/themes/instagram/views/card.overrides: -------------------------------------------------------------------------------- 1 | /******************************* 2 | Overrides 3 | *******************************/ 4 | 5 | 6 | @import url(http://fonts.googleapis.com/css?family=Montserrat:700,400); 7 | 8 | .ui.cards > .card, 9 | .ui.card { 10 | font-family: 'Montserrat'; 11 | font-size-adjust: 0.5; 12 | } -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/pravj/geopattern/examples/pattern.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "fmt" 5 | "github.com/pravj/geopattern" 6 | ) 7 | 8 | // Prints pattern's SVG string for a specific pattern 9 | func main() { 10 | args := map[string]string{"generator": "squares"} 11 | gp := geopattern.Generate(args) 12 | fmt.Println(gp) 13 | } 14 | -------------------------------------------------------------------------------- /front/views/Home.js: -------------------------------------------------------------------------------- 1 | import React, {Component} from 'react'; 2 | import CounterButton from '../components/CounterButton'; 3 | 4 | export default class Home extends Component { 5 | render() { 6 | return ( 7 |
8 |

Home

9 | 10 | 11 |
12 | ); 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /front/styles/semantic/src/themes/default/modules/transition.variables: -------------------------------------------------------------------------------- 1 | /******************************* 2 | Transition 3 | *******************************/ 4 | 5 | @transitionDefaultEasing: @defaultEasing; 6 | @transitionDefaultFill: both; 7 | @transitionDefaultDuration: 300ms; 8 | 9 | @use3DAcceleration: translateZ(0); 10 | @backfaceVisibility: hidden; -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/pravj/geopattern/examples/background_color.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "fmt" 5 | "github.com/pravj/geopattern" 6 | ) 7 | 8 | // Prints pattern's SVG string with a specific background color 9 | func main() { 10 | args := map[string]string{"color": "#f9b"} 11 | gp := geopattern.Generate(args) 12 | fmt.Println(gp) 13 | } 14 | -------------------------------------------------------------------------------- /front/styles/semantic/src/themes/default/elements/flag.variables: -------------------------------------------------------------------------------- 1 | /******************************* 2 | Flag 3 | *******************************/ 4 | 5 | /*------------------- 6 | Element 7 | --------------------*/ 8 | 9 | @spritePath: "@{imagePath}/flags.png"; 10 | @width: 16px; 11 | @height: 11px; 12 | @verticalAlign: baseline; 13 | @margin: 0.5em; -------------------------------------------------------------------------------- /front/styles/semantic/src/themes/material/collections/menu.variables: -------------------------------------------------------------------------------- 1 | /******************************* 2 | Menu 3 | *******************************/ 4 | 5 | @fontFamily: 'Roboto', Arial, sans-serif; 6 | @boxShadow: 0px 1px 6px rgba(0, 0, 0, 0.2); 7 | @dividerSize: 0px; 8 | 9 | @itemVerticalPadding: @relativeLarge; 10 | @itemHorizontaPadding: @relativeLarge; -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/pravj/geopattern/examples/base_color.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "fmt" 5 | "github.com/pravj/geopattern" 6 | ) 7 | 8 | // Prints pattern's SVG string with a specific base background color 9 | func main() { 10 | args := map[string]string{"baseColor": "#e2b"} 11 | gp := geopattern.Generate(args) 12 | fmt.Println(gp) 13 | } 14 | -------------------------------------------------------------------------------- /front/styles/semantic/src/themes/classic/elements/header.variables: -------------------------------------------------------------------------------- 1 | /******************************* 2 | Button 3 | *******************************/ 4 | 5 | /*------------------- 6 | Element 7 | --------------------*/ 8 | 9 | @headerFont: 'Open Sans', Arial, sans-serif; 10 | 11 | @blockBackground: @offWhite @subtleGradient; 12 | @blockBoxShadow: @subtleShadow; -------------------------------------------------------------------------------- /front/styles/semantic/src/themes/twitter/elements/button.overrides: -------------------------------------------------------------------------------- 1 | /******************************* 2 | Overrides 3 | *******************************/ 4 | 5 | .ui.primary.button { 6 | box-shadow: 7 | 0px 0px 0px 1px #3B88C3 inset, 8 | 0 2px 0 rgba(255, 255, 255, 0.15) inset 9 | ; 10 | } 11 | .ui.primary.button > .icon { 12 | color: #FFFFFF; 13 | } 14 | -------------------------------------------------------------------------------- /front/views/Redirect.js: -------------------------------------------------------------------------------- 1 | import React, {Component} from 'react'; 2 | 3 | export default class Redirect extends Component { 4 | static onEnter(nextState, transition) { 5 | transition.to('/', null, {nextPathname: nextState.location.pathname}); 6 | } 7 | render() { 8 | return ( 9 |
This shouldn't render in the browser
10 | ); 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /front/styles/semantic/src/themes/bookish/elements/header.overrides: -------------------------------------------------------------------------------- 1 | /******************************* 2 | Overrides 3 | *******************************/ 4 | 5 | @import url(http://fonts.googleapis.com/css?family=Karma); 6 | 7 | h1.ui.header, 8 | .ui.huge.header { 9 | font-weight: bold; 10 | } 11 | 12 | h2.ui.header, 13 | .ui.large.header { 14 | font-weight: bold; 15 | } -------------------------------------------------------------------------------- /front/styles/semantic/src/themes/material/elements/header.overrides: -------------------------------------------------------------------------------- 1 | /******************************* 2 | Overrides 3 | *******************************/ 4 | 5 | @import url(http://fonts.googleapis.com/css?family=Roboto); 6 | 7 | h1.ui.header, 8 | .ui.huge.header { 9 | font-weight: normal; 10 | } 11 | 12 | h2.ui.header, 13 | .ui.large.header { 14 | font-weight: normal; 15 | } -------------------------------------------------------------------------------- /front/styles/semantic/src/themes/default/views/ad.variables: -------------------------------------------------------------------------------- 1 | /******************************* 2 | Advertisement 3 | *******************************/ 4 | 5 | @margin: 1em 0em; 6 | @overflow: hidden; 7 | 8 | @testBackground: @lightBlack; 9 | @testColor: @white; 10 | @testFontWeight: bold; 11 | @testText: 'Ad'; 12 | @testFontSize: @relativeMedium; 13 | @testMobileFontSize: @relativeTiny; -------------------------------------------------------------------------------- /front/styles/semantic/src/themes/chubby/views/comment.overrides: -------------------------------------------------------------------------------- 1 | /******************************* 2 | Overrides 3 | *******************************/ 4 | 5 | .ui.comments .comment { 6 | border-radius: 0.5em; 7 | box-shadow: 0px 1px 1px 1px rgba(0, 0, 0, 0.1); 8 | } 9 | .ui.comments .comment .comments .comment { 10 | border: 1px solid rgba(0, 0, 0, 0.1); 11 | box-shadow: none; 12 | } -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/Sirupsen/logrus/terminal_linux.go: -------------------------------------------------------------------------------- 1 | // Based on ssh/terminal: 2 | // Copyright 2013 The Go Authors. All rights reserved. 3 | // Use of this source code is governed by a BSD-style 4 | // license that can be found in the LICENSE file. 5 | 6 | package logrus 7 | 8 | import "syscall" 9 | 10 | const ioctlReadTermios = syscall.TCGETS 11 | 12 | type Termios syscall.Termios 13 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/Sirupsen/logrus/terminal_darwin.go: -------------------------------------------------------------------------------- 1 | // Based on ssh/terminal: 2 | // Copyright 2013 The Go Authors. All rights reserved. 3 | // Use of this source code is governed by a BSD-style 4 | // license that can be found in the LICENSE file. 5 | 6 | package logrus 7 | 8 | import "syscall" 9 | 10 | const ioctlReadTermios = syscall.TIOCGETA 11 | 12 | type Termios syscall.Termios 13 | -------------------------------------------------------------------------------- /front/styles/semantic/src/themes/basic/modules/progress.variables: -------------------------------------------------------------------------------- 1 | /******************************* 2 | Progress 3 | *******************************/ 4 | 5 | @background: transparent; 6 | @border: none; 7 | @padding: 0em; 8 | 9 | @progressLeft: 0em; 10 | @progressWidth: 100%; 11 | @progressTextAlign: center; 12 | 13 | @labelFontWeight: normal; 14 | @labelTextAlign: left; 15 | @labelHeight: 1.5em; -------------------------------------------------------------------------------- /front/styles/semantic/tasks/clean.js: -------------------------------------------------------------------------------- 1 | /******************************* 2 | Clean Task 3 | *******************************/ 4 | 5 | var 6 | del = require('del'), 7 | config = require('./config/user'), 8 | tasks = require('./config/tasks') 9 | ; 10 | 11 | // cleans distribution files 12 | module.exports = function(callback) { 13 | return del([config.paths.clean], tasks.settings.del, callback); 14 | }; -------------------------------------------------------------------------------- /Godeps/_workspace/src/gopkg.in/natefinch/lumberjack.v2/.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 | -------------------------------------------------------------------------------- /front/styles/semantic/src/themes/gmail/collections/message.variables: -------------------------------------------------------------------------------- 1 | @background: #F3F3F3; 2 | 3 | @boxShadow: 0px 0px 0px 1px rgba(0, 0, 0, 0.1) inset; 4 | @borderRadius: 4px; 5 | @verticalPadding: 7px; 6 | @horizontalPadding: 15px; 7 | 8 | @headerFontSize: 1em; 9 | 10 | @floatingBoxShadow: 0px 2px 4px rgba(0, 0, 0, 0.2); 11 | 12 | @iconSize: 1.5em; 13 | @iconDistance: 1em; 14 | 15 | @warningBackgroundColor: #F9EDBE; 16 | -------------------------------------------------------------------------------- /front/styles/semantic/src/themes/chubby/collections/form.overrides: -------------------------------------------------------------------------------- 1 | /*------------------- 2 | Form Variables 3 | --------------------*/ 4 | 5 | .ui.form .selection.dropdown { 6 | padding: 1.1em 1.2em; 7 | border-width: 2px; 8 | } 9 | .ui.form .selection.dropdown .menu { 10 | min-width: calc(100% + 4px); 11 | margin: 0 -2px; 12 | border-width: 2px; 13 | } 14 | .ui.form .selection.dropdown input { 15 | padding: inherit; 16 | } -------------------------------------------------------------------------------- /front/styles/semantic/tasks/collections/README.md: -------------------------------------------------------------------------------- 1 | ## How to use 2 | 3 | These are collections of tasks that are imported together. 4 | 5 | To import them into gulp: 6 | ```javascript 7 | var 8 | gulp = require('gulp'), 9 | // modified to point to semantic folder 10 | install = require('tasks/collections/install') 11 | ; 12 | gulp = install(gulp); 13 | 14 | // tasks are now injected and ready to be used 15 | gulp.start('install'); 16 | ``` -------------------------------------------------------------------------------- /front/reducers/counter.js: -------------------------------------------------------------------------------- 1 | import { 2 | COUNTER_INCREMENT 3 | } from '../actions/actionTypes'; 4 | 5 | const initialState = { 6 | count: 0 7 | }; 8 | 9 | export default 10 | function counter(state = initialState, action = {}) { 11 | switch (action.type) { 12 | case COUNTER_INCREMENT: 13 | let {count} = state; 14 | return { 15 | count: count + 1 16 | }; 17 | default: 18 | return state; 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /front/styles/semantic/tasks/config/admin/templates/component-package.js: -------------------------------------------------------------------------------- 1 | 2 | Package.describe({ 3 | name : 'semantic:ui-{component}', 4 | summary : 'Semantic UI - {Component}: Single component release', 5 | version : '{version}', 6 | git : 'git://github.com/Semantic-Org/UI-{Component}.git', 7 | }); 8 | 9 | Package.onUse(function(api) { 10 | api.versionsFrom('1.0'); 11 | api.addFiles([ 12 | {files} 13 | ], 'client'); 14 | }); 15 | -------------------------------------------------------------------------------- /front/views/routes.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import {Route} from 'react-router'; 3 | import App from 'views/App'; 4 | import Home from 'views/Home'; 5 | import About from 'views/About'; 6 | import NotFound from 'views/NotFound'; 7 | import Redirect from 'views/Redirect'; 8 | 9 | export default ( 10 | 11 | 12 | 13 | 14 | ); 15 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/lucasb-eyer/go-colorful/.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 | # Vim swap files 11 | .*.sw? 12 | 13 | # Architecture specific extensions/prefixes 14 | *.[568vq] 15 | [568vq].out 16 | 17 | *.cgo1.go 18 | *.cgo2.c 19 | _cgo_defun.c 20 | _cgo_gotypes.go 21 | _cgo_export.* 22 | 23 | _testmain.go 24 | 25 | *.exe 26 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/gopkg.in/bluesuncorp/validator.v5/.gitignore: -------------------------------------------------------------------------------- 1 | # Compiled Object files, Static and Dynamic libs (Shared Objects) 2 | *.o 3 | *.a 4 | *.so 5 | 6 | # Folders 7 | _obj 8 | _test 9 | 10 | # Architecture specific extensions/prefixes 11 | *.[568vq] 12 | [568vq].out 13 | 14 | *.cgo1.go 15 | *.cgo2.c 16 | _cgo_defun.c 17 | _cgo_gotypes.go 18 | _cgo_export.* 19 | 20 | _testmain.go 21 | 22 | *.exe 23 | *.test 24 | *.prof 25 | *.test 26 | *.out -------------------------------------------------------------------------------- /bower.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "golang.vn", 3 | "version": "0.0.0", 4 | "homepage": "http://golang.vn/", 5 | "authors": [ 6 | "Nguyễn Thế Nguyên " 7 | ], 8 | "description": "golang programing language forum in VietNam", 9 | "main": "main.go", 10 | "keywords": [ 11 | "golang" 12 | ], 13 | "license": "MIT", 14 | "ignore": [ 15 | "**/.*", 16 | "public/vendor", 17 | "test", 18 | "tests" 19 | ] 20 | } 21 | -------------------------------------------------------------------------------- /front/styles/semantic/src/themes/basic/elements/icon.variables: -------------------------------------------------------------------------------- 1 | /*------------------- 2 | Icon Variables 3 | --------------------*/ 4 | 5 | @fontPath : "../../basic/assets/fonts"; 6 | 7 | @src: 8 | url("@{fontPath}/@{fontName}.eot?#iefix") format('embedded-opentype'), 9 | url("@{fontPath}/@{fontName}.woff") format('woff'), 10 | url("@{fontPath}/@{fontName}.ttf") format('truetype'), 11 | url("@{fontPath}/@{fontName}.svg#icons") format('svg') 12 | ; 13 | -------------------------------------------------------------------------------- /front/styles/semantic/src/themes/material/elements/header.variables: -------------------------------------------------------------------------------- 1 | /*------------------- 2 | Header 3 | --------------------*/ 4 | 5 | @headerFont : 'Roboto', Arial, sans-serif; 6 | @fontWeight: normal; 7 | 8 | @iconSize: 2em; 9 | @iconOffset: 0.2em; 10 | @iconAlignment: top; 11 | 12 | @subHeaderFontSize: 1rem; 13 | 14 | 15 | /* HTML Headings */ 16 | @h1 : 2.25rem; 17 | @h2 : 2rem; 18 | @h3 : 1.75rem; 19 | @h4 : 1.5rem; 20 | @h5 : 1.25rem; 21 | 22 | -------------------------------------------------------------------------------- /front/styles/semantic/src/themes/classic/collections/table.variables: -------------------------------------------------------------------------------- 1 | /******************************* 2 | Table 3 | *******************************/ 4 | 5 | /*------------------- 6 | Element 7 | --------------------*/ 8 | 9 | @boxShadow: @subtleGradient; 10 | 11 | @headerBackground: @subtleGradient; 12 | @headerBoxShadow: @subtleShadow; 13 | @footerBoxShadow: 0px -1px 1px 0px rgba(0, 0, 0, 0.05); 14 | @footerBackground: rgba(0, 0, 0, 0.05); 15 | -------------------------------------------------------------------------------- /helpers/log/logger.go: -------------------------------------------------------------------------------- 1 | package log 2 | 3 | import ( 4 | "github.com/Sirupsen/logrus" 5 | "gopkg.in/natefinch/lumberjack.v2" 6 | ) 7 | 8 | func NewLogger() *logrus.Logger { 9 | return &logrus.Logger{ 10 | Out: &lumberjack.Logger{ 11 | Filename: "log/foo.log", 12 | MaxSize: 500, // megabytes 13 | MaxBackups: 3, 14 | MaxAge: 28, // days 15 | }, 16 | Formatter: new(logrus.JSONFormatter), 17 | Level: logrus.DebugLevel, 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /front/styles/semantic/src/themes/basic/elements/step.variables: -------------------------------------------------------------------------------- 1 | /*------------------- 2 | Step Variables 3 | --------------------*/ 4 | 5 | /* Stepss */ 6 | @stepsBorder: none; 7 | @stepsBorderRadius: @circularRadius; 8 | 9 | /* Step */ 10 | @border: none; 11 | @divider: none; 12 | @background: transparent; 13 | @borderRadius: @circularRadius; 14 | @iconDistance: 0.8em; 15 | @arrowDisplay: none; 16 | 17 | @activeBackground: @midWhite; 18 | @activeArrowDisplay: none; 19 | -------------------------------------------------------------------------------- /front/styles/semantic/tasks/collections/rtl.js: -------------------------------------------------------------------------------- 1 | /******************************* 2 | Define Sub-Tasks 3 | *******************************/ 4 | 5 | module.exports = function(gulp) { 6 | 7 | var 8 | // rtl 9 | buildRTL = require('./../rtl/build'), 10 | watchRTL = require('./../rtl/watch') 11 | ; 12 | 13 | gulp.task('watch-rtl', 'Build all files as RTL', watchRTL); 14 | gulp.task('build-rtl', 'Watch files as RTL ', buildRTL); 15 | 16 | }; 17 | -------------------------------------------------------------------------------- /helpers/apiErrors/auth.go: -------------------------------------------------------------------------------- 1 | package apiErrors 2 | 3 | const ( 4 | AuthEmailInvalid = "AUTH_EMAIL_INVALID" 5 | AuthPasswordInValid = "AUTH_PASSWORD_INVALID" 6 | ) 7 | 8 | var ( 9 | authErrors = []apiError{ 10 | apiError{ 11 | Id: AuthEmailInvalid, 12 | Message: "Email login invalid", 13 | Status: 401, 14 | }, 15 | apiError{ 16 | Id: AuthPasswordInValid, 17 | Message: "Password login invalid", 18 | Status: 401, 19 | }, 20 | } 21 | ) 22 | -------------------------------------------------------------------------------- /helpers/apiErrors/error.go: -------------------------------------------------------------------------------- 1 | package apiErrors 2 | 3 | const ( 4 | ApiErrorNotFound = "API_ERROR_NOT_FOUND" 5 | ApiErrorIdRequied = "API_ERROR_ID_REQUIRED" 6 | ) 7 | 8 | var ( 9 | apiErrorErrors = []apiError{ 10 | apiError{ 11 | Id: ApiErrorNotFound, 12 | Message: "API error not found", 13 | Status: 404, 14 | }, 15 | apiError{ 16 | Id: ApiErrorIdRequied, 17 | Message: "API error Id required ", 18 | Status: 400, 19 | }, 20 | } 21 | ) 22 | -------------------------------------------------------------------------------- /front/styles/semantic/src/themes/github/collections/form.overrides: -------------------------------------------------------------------------------- 1 | /******************************* 2 | Overrides 3 | *******************************/ 4 | 5 | .ui.selection.dropdown { 6 | background-color: #FAFAFA; 7 | box-shadow: 0 1px 2px rgba(0, 0, 0, 0.075) inset; 8 | border-color: #CCCCCC; 9 | } 10 | 11 | .ui.selection.dropdown:focus { 12 | box-shadow: 13 | 0px 1px 2px rgba(0, 0, 0, 0.075) inset, 14 | 0px 0px 5px rgba(81, 167, 232, 0.5) 15 | ; 16 | } -------------------------------------------------------------------------------- /front/styles/semantic/src/themes/material/modules/modal.variables: -------------------------------------------------------------------------------- 1 | @boxShadow: 0px 10px 18px rgba(0, 0, 0, 0.22); 2 | @borderRadius: 0em; 3 | 4 | 5 | @headerBackground: @white; 6 | @headerVerticalPadding: 1.7142rem; 7 | @headerHorizontalPadding: 1.7142rem; 8 | @headerFontWeight: 400; 9 | @headerFontFamily: 'Roboto', "Helvetica Neue", Arial, sans-serif; 10 | @headerBorder: none; 11 | 12 | @contentPadding: 1rem 2rem 2rem; 13 | 14 | @actionBorder: none; 15 | @actionBackground: @white; -------------------------------------------------------------------------------- /handlers/init.go: -------------------------------------------------------------------------------- 1 | package handlers 2 | 3 | import ( 4 | "github.com/golang-vietnam/forum/helpers/log" 5 | "github.com/golang-vietnam/forum/resources" 6 | ) 7 | 8 | const ( 9 | ITEMS_PER_PAGE = 15 10 | ) 11 | 12 | var ( 13 | userResource = resources.NewResourceUser() 14 | categoryResource = resources.NewResourceCategory() 15 | postResource = resources.NewResourcePost() 16 | authResource = resources.NewResourceAuth() 17 | logger = log.NewLogger() 18 | ) 19 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/Sirupsen/logrus/terminal_freebsd.go: -------------------------------------------------------------------------------- 1 | /* 2 | Go 1.2 doesn't include Termios for FreeBSD. This should be added in 1.3 and this could be merged with terminal_darwin. 3 | */ 4 | package logrus 5 | 6 | import ( 7 | "syscall" 8 | ) 9 | 10 | const ioctlReadTermios = syscall.TIOCGETA 11 | 12 | type Termios struct { 13 | Iflag uint32 14 | Oflag uint32 15 | Cflag uint32 16 | Lflag uint32 17 | Cc [20]uint8 18 | Ispeed uint32 19 | Ospeed uint32 20 | } 21 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/gopkg.in/mgo.v2/internal/sasl/sasl_windows.h: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | #include "sspi_windows.h" 4 | 5 | SECURITY_STATUS SEC_ENTRY sspi_acquire_credentials_handle(CredHandle* cred_handle, char* username, char* password, char* domain); 6 | int sspi_step(CredHandle* cred_handle, int has_context, CtxtHandle* context, PVOID* buffer, ULONG* buffer_length, char* target); 7 | int sspi_send_client_authz_id(CtxtHandle* context, PVOID* buffer, ULONG* buffer_length, char* user_plus_realm); 8 | -------------------------------------------------------------------------------- /front/styles/semantic/src/themes/chubby/elements/header.variables: -------------------------------------------------------------------------------- 1 | /*------------------- 2 | Header 3 | --------------------*/ 4 | 5 | @headerFont : 'Source Sans Pro', Helvetica Neue, Helvetica, Arial, sans-serif; 6 | @fontWeight: bold; 7 | @textTransform: none; 8 | 9 | /* HTML Headings */ 10 | @h1: 1.33rem; 11 | @h2: 1.2rem; 12 | @h3: 1rem; 13 | @h4: 0.9rem; 14 | @h5: 0.8rem; 15 | 16 | /* Sizing */ 17 | @huge: 1.33em; 18 | @large: 1.2em; 19 | @medium: 1em; 20 | @small: 0.9em; 21 | @tiny: 0.8em; -------------------------------------------------------------------------------- /front/styles/semantic/src/themes/chubby/modules/accordion.variables: -------------------------------------------------------------------------------- 1 | /*------------------- 2 | Accordion Variables 3 | --------------------*/ 4 | 5 | @iconMargin: 0em 0.5em 0em 0em; 6 | 7 | @styledActiveTitleBackground: @subtleGradient; 8 | @styledActiveTitleColor: @primaryColor; 9 | 10 | @styledActiveChildTitleBackground: transparent; 11 | 12 | @styledTitlePadding: 1.25em; 13 | @styledTitleFontWeight: bold; 14 | @styledContentPadding: 1.5em 3.25em; 15 | @styledChildContentPadding: @styledContentPadding; -------------------------------------------------------------------------------- /front/styles/semantic/tasks/README.md: -------------------------------------------------------------------------------- 1 | ## Tasks 2 | 3 | * Watch - Compile only changed files from source 4 | * Build - Build all files from source 5 | * Version - Output version number 6 | * Install - Run Installer to Set-up Paths 7 | 8 | ## How to use 9 | 10 | These tasks can be imported into your own gulpfile allowing you to avoid using Semantic's build tools 11 | 12 | ```javascript 13 | var 14 | watch = require('path/to/semantic/tasks/watch') 15 | ; 16 | gulp.task('watch ui', watch); 17 | ``` 18 | -------------------------------------------------------------------------------- /front/babel.server.js: -------------------------------------------------------------------------------- 1 | require('babel/register')({ 2 | stage: 0, 3 | plugins: ['typecheck'] 4 | }); 5 | 6 | /** 7 | * Define isomorphic constants. 8 | */ 9 | global.__CLIENT__ = false; 10 | global.__SERVER__ = true; 11 | global.__DEVELOPMENT__ = process.env.NODE_ENV !== 'production'; 12 | delete global.__BROWSER__; 13 | 14 | if (__DEVELOPMENT__) { 15 | if (!require('piping')({ 16 | hook: true, 17 | ignore: /(\/\.|~$|\.json$)/i 18 | })) { 19 | return; 20 | } 21 | } 22 | 23 | require('./server'); 24 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/gopkg.in/natefinch/lumberjack.v2/example_test.go: -------------------------------------------------------------------------------- 1 | package lumberjack_test 2 | 3 | import ( 4 | "log" 5 | 6 | "gopkg.in/natefinch/lumberjack.v2" 7 | ) 8 | 9 | // To use lumberjack with the standard library's log package, just pass it into 10 | // the SetOutput function when your application starts. 11 | func Example() { 12 | log.SetOutput(&lumberjack.Logger{ 13 | Filename: "/var/log/myapp/foo.log", 14 | MaxSize: 500, // megabytes 15 | MaxBackups: 3, 16 | MaxAge: 28, // days 17 | }) 18 | } 19 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/Sirupsen/logrus/CHANGELOG.md: -------------------------------------------------------------------------------- 1 | # 0.8.2 2 | 3 | logrus: fix more Fatal family functions 4 | 5 | # 0.8.1 6 | 7 | logrus: fix not exiting on `Fatalf` and `Fatalln` 8 | 9 | # 0.8.0 10 | 11 | logrus: defaults to stderr instead of stdout 12 | hooks/sentry: add special field for `*http.Request` 13 | formatter/text: ignore Windows for colors 14 | 15 | # 0.7.3 16 | 17 | formatter/\*: allow configuration of timestamp layout 18 | 19 | # 0.7.2 20 | 21 | formatter/text: Add configuration option for time format (#158) 22 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/gopkg.in/natefinch/lumberjack.v2/chown_linux.go: -------------------------------------------------------------------------------- 1 | package lumberjack 2 | 3 | import ( 4 | "os" 5 | "syscall" 6 | ) 7 | 8 | // os_Chown is a var so we can mock it out during tests. 9 | var os_Chown = os.Chown 10 | 11 | func chown(name string, info os.FileInfo) error { 12 | f, err := os.OpenFile(name, os.O_CREATE|os.O_WRONLY|os.O_TRUNC, info.Mode()) 13 | if err != nil { 14 | return err 15 | } 16 | f.Close() 17 | stat := info.Sys().(*syscall.Stat_t) 18 | return os_Chown(name, int(stat.Uid), int(stat.Gid)) 19 | } 20 | -------------------------------------------------------------------------------- /front/styles/semantic/src/themes/rtl/globals/site.variables: -------------------------------------------------------------------------------- 1 | /******************************* 2 | Site Settings 3 | *******************************/ 4 | 5 | /*------------------- 6 | Fonts 7 | --------------------*/ 8 | 9 | @googleFontName : 'Droid Sans'; 10 | 11 | /* Kufi imported in site.overrides */ 12 | @headerFont : 'Droid Arabic Kufi', 'Droid Sans', 'Helvetica Neue', Arial, Helvetica, sans-serif; 13 | @pageFont : 'Droid Arabic Kufi', 'Droid Sans', 'Helvetica Neue', Arial, Helvetica, sans-serif; 14 | 15 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/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 | -------------------------------------------------------------------------------- /front/styles/semantic/tasks/config/admin/templates/less-package.js: -------------------------------------------------------------------------------- 1 | var 2 | where = 'client' // Adds files only to the client 3 | ; 4 | 5 | Package.describe({ 6 | name : 'semantic:ui', 7 | summary : 'Semantic UI - LESS Release of Semantic UI', 8 | version : '{version}', 9 | git : 'git://github.com/Semantic-Org/Semantic-UI-LESS.git', 10 | }); 11 | 12 | Package.onUse(function(api) { 13 | 14 | api.versionsFrom('1.0'); 15 | api.use('less', 'client'); 16 | 17 | api.addFiles([ 18 | {files} 19 | ], 'client'); 20 | 21 | }); 22 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/manucorporat/sse/writer.go: -------------------------------------------------------------------------------- 1 | package sse 2 | 3 | import "io" 4 | 5 | type stringWriter interface { 6 | io.Writer 7 | WriteString(string) (int, error) 8 | } 9 | 10 | type stringWrapper struct { 11 | io.Writer 12 | } 13 | 14 | func (w stringWrapper) WriteString(str string) (int, error) { 15 | return w.Writer.Write([]byte(str)) 16 | } 17 | 18 | func checkWriter(writer io.Writer) stringWriter { 19 | if w, ok := writer.(stringWriter); ok { 20 | return w 21 | } else { 22 | return stringWrapper{writer} 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/gopkg.in/natefinch/lumberjack.v2/rotate_test.go: -------------------------------------------------------------------------------- 1 | // +build linux 2 | 3 | package lumberjack_test 4 | 5 | import ( 6 | "log" 7 | "os" 8 | "os/signal" 9 | "syscall" 10 | 11 | "github.com/natefinch/lumberjack" 12 | ) 13 | 14 | // Example of how to rotate in response to SIGHUP. 15 | func ExampleLogger_Rotate() { 16 | l := &lumberjack.Logger{} 17 | log.SetOutput(l) 18 | c := make(chan os.Signal, 1) 19 | signal.Notify(c, syscall.SIGHUP) 20 | 21 | go func() { 22 | for { 23 | <-c 24 | l.Rotate() 25 | } 26 | }() 27 | } 28 | -------------------------------------------------------------------------------- /front/styles/semantic/src/themes/fixed-width/collections/grid.variables: -------------------------------------------------------------------------------- 1 | /* Fixed Page Grid */ 2 | 3 | @mobileWidth: auto; 4 | @mobileMargin: 0em; 5 | @mobileGutter: 0em; 6 | 7 | @tabletWidth: auto; 8 | @tabletMargin: 0em; 9 | @tabletGutter: 8%; 10 | 11 | @computerWidth: 960px; 12 | @computerMargin: auto; 13 | @computerGutter: 0; 14 | 15 | @largeMonitorWidth: 1180px; 16 | @largeMonitorMargin: auto; 17 | @largeMonitorGutter: 0; 18 | 19 | @widescreenMonitorWidth: 1300px; 20 | @widescreenMargin: auto; 21 | @widescreenMonitorGutter: 0; 22 | 23 | @tableWidth: ''; -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | # Compiled Object files, Static and Dynamic libs (Shared Objects) 3 | *.o 4 | *.a 5 | *.so 6 | 7 | # Folders 8 | _obj 9 | _test 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 | *.test 25 | *.prof 26 | gin-bin 27 | bin 28 | *.log 29 | 30 | # Temporaty files 31 | __* 32 | 33 | # Client 34 | *.log 35 | *.out 36 | dist/ 37 | node_modules/ 38 | webpack-stats.json 39 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/gin-gonic/gin/examples/app-engine/README.md: -------------------------------------------------------------------------------- 1 | # Guide to run Gin under App Engine LOCAL Development Server 2 | 3 | 1. Download, install and setup Go in your computer. (That includes setting your `$GOPATH`.) 4 | 2. Download SDK for your platform from here: `https://developers.google.com/appengine/downloads?hl=es#Google_App_Engine_SDK_for_Go` 5 | 3. Download Gin source code using: `$ go get github.com/gin-gonic/gin` 6 | 4. Navigate to examples folder: `$ cd $GOPATH/src/github.com/gin-gonic/gin/examples/` 7 | 5. Run it: `$ goapp serve app-engine/` -------------------------------------------------------------------------------- /front/config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | development: { 3 | isProduction: false, 4 | port: process.env.FRONT_PORT || 9000, 5 | apiPort: process.env.API_PORT || 8080, 6 | apiPath: '/v1', 7 | app: { 8 | name: 'GolangVN (development)' 9 | } 10 | }, 11 | production: { 12 | isProduction: true, 13 | port: process.env.FRONT_PORT || 9000, 14 | apiPort: process.env.API_PORT || 8080, 15 | apiPath: '/v1', 16 | app: { 17 | name: 'GolangVN (production)' 18 | } 19 | } 20 | }[process.env.NODE_ENV || 'development']; 21 | -------------------------------------------------------------------------------- /front/styles/semantic/src/themes/instagram/views/card.variables: -------------------------------------------------------------------------------- 1 | /******************************* 2 | Card 3 | *******************************/ 4 | 5 | /*------------------- 6 | View 7 | --------------------*/ 8 | 9 | @borderBoxShadow: none; 10 | @shadowBoxShadow: none; 11 | @boxShadow: none; 12 | 13 | 14 | @internalBorderColor: #EDEDEE; 15 | @border: 1px solid #EDEDEE; 16 | 17 | @contentPadding: 14px 20px; 18 | 19 | @metaColor: #A5A7AA; 20 | 21 | @linkHoverRaiseDistance: 0px; 22 | @linkHoverBoxShadow: none; 23 | @linkHoverBorder: 1px solid #D0D0D8; -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/gin-gonic/gin/render/data.go: -------------------------------------------------------------------------------- 1 | // Copyright 2014 Manu Martinez-Almeida. All rights reserved. 2 | // Use of this source code is governed by a MIT style 3 | // license that can be found in the LICENSE file. 4 | 5 | package render 6 | 7 | import "net/http" 8 | 9 | type Data struct { 10 | ContentType string 11 | Data []byte 12 | } 13 | 14 | func (r Data) Render(w http.ResponseWriter) error { 15 | if len(r.ContentType) > 0 { 16 | w.Header()["Content-Type"] = []string{r.ContentType} 17 | } 18 | w.Write(r.Data) 19 | return nil 20 | } 21 | -------------------------------------------------------------------------------- /front/styles/semantic/tasks/config/admin/templates/composer.json: -------------------------------------------------------------------------------- 1 | { 2 | "name" : "semantic/ui", 3 | "description" : "Semantic empowers designers and developers by creating a shared vocabulary for UI.", 4 | "homepage" : "http://www.semantic-ui.com", 5 | "authors": [ 6 | { 7 | "name" : "Jack Lukic", 8 | "email": "jacklukic@gmail.com", 9 | "web" : "http://www.jacklukic.com", 10 | "role" : "Creator" 11 | } 12 | ], 13 | "keywords": [ 14 | "semantic", 15 | "ui", 16 | "css", 17 | "framework" 18 | ], 19 | "license" : "MIT" 20 | } -------------------------------------------------------------------------------- /front/redux/clientMiddleware.js: -------------------------------------------------------------------------------- 1 | export default function clientMiddleware(client) { 2 | return ({/* dispatch, getState */}) => { 3 | return (next) => (action) => { 4 | const { promise, types, ...rest } = action; 5 | if (!promise) { 6 | return next(action); 7 | } 8 | 9 | const [REQUEST, SUCCESS, FAILURE] = types; 10 | next({...rest, type: REQUEST}); 11 | return promise(client).then( 12 | (result) => next({...rest, result, type: SUCCESS}), 13 | (error) => next({...rest, error, type: FAILURE}) 14 | ); 15 | }; 16 | }; 17 | } 18 | -------------------------------------------------------------------------------- /front/styles/semantic/src/themes/material/modules/dropdown.variables: -------------------------------------------------------------------------------- 1 | /******************************* 2 | Menu 3 | *******************************/ 4 | 5 | @menuBorderRadius: @borderRadius; 6 | @menuBorderColor: #DADADA; 7 | @menuBoxShadow: 0px 2px 4px rgba(0, 0, 0, 0.2); 8 | 9 | @menuPadding: @relative8px 0em; 10 | @itemVerticalPadding: 1em; 11 | @itemHorizontalPadding: 1.5em; 12 | 13 | @menuHeaderFontSize: @small; 14 | @menuHeaderFontWeight: bold; 15 | @menuHeaderTextTransform: none; 16 | 17 | @selectionBorderEmWidth: 0em; 18 | @selectionItemDivider: none; 19 | 20 | @labelBoxShadow: none; -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/Sirupsen/logrus/hooks/syslog/README.md: -------------------------------------------------------------------------------- 1 | # Syslog Hooks for Logrus :walrus: 2 | 3 | ## Usage 4 | 5 | ```go 6 | import ( 7 | "log/syslog" 8 | "github.com/Sirupsen/logrus" 9 | logrus_syslog "github.com/Sirupsen/logrus/hooks/syslog" 10 | ) 11 | 12 | func main() { 13 | log := logrus.New() 14 | hook, err := logrus_syslog.NewSyslogHook("udp", "localhost:514", syslog.LOG_INFO, "") 15 | 16 | if err == nil { 17 | log.Hooks.Add(hook) 18 | } 19 | } 20 | ``` 21 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/gin-gonic/gin/render/xml.go: -------------------------------------------------------------------------------- 1 | // Copyright 2014 Manu Martinez-Almeida. All rights reserved. 2 | // Use of this source code is governed by a MIT style 3 | // license that can be found in the LICENSE file. 4 | 5 | package render 6 | 7 | import ( 8 | "encoding/xml" 9 | "net/http" 10 | ) 11 | 12 | type XML struct { 13 | Data interface{} 14 | } 15 | 16 | var xmlContentType = []string{"application/xml; charset=utf-8"} 17 | 18 | func (r XML) Render(w http.ResponseWriter) error { 19 | writeContentType(w, xmlContentType) 20 | return xml.NewEncoder(w).Encode(r.Data) 21 | } 22 | -------------------------------------------------------------------------------- /front/styles/semantic/src/themes/material/elements/button.overrides: -------------------------------------------------------------------------------- 1 | @import url(http://fonts.googleapis.com/css?family=Roboto); 2 | 3 | .ui.button { 4 | min-width: 72px; 5 | } 6 | .ui.circular.button, 7 | .ui.buttons .button { 8 | min-width: 0px; 9 | } 10 | 11 | .ui.primary.button:hover { 12 | box-shadow: 13 | 0px 0px 0px 1px rgba(0, 0, 0, 0.3) inset, 14 | 0px 2px 3px 0px rgba(0, 0, 0, 0.35) !important 15 | ; 16 | } 17 | 18 | .ui.secondary.button:hover { 19 | box-shadow: 20 | 0px 0px 0px 1px rgba(0, 0, 0, 0.2) inset, 21 | 0px 2px 3px 0px rgba(0, 0, 0, 0.3) !important 22 | ; 23 | } -------------------------------------------------------------------------------- /front/webpack/utils/notifyStats.js: -------------------------------------------------------------------------------- 1 | function notifyError(error) { 2 | // BELLs when something goes wrong! 3 | console.log("\x07" + error); 4 | } 5 | 6 | function notifyWarning(warning) { 7 | console.log(warning); 8 | } 9 | 10 | module.exports = function notifyStats(stats) { 11 | var json = stats.toJson(); 12 | if (json.errors.length > 0) { 13 | json.errors.forEach(notifyError); 14 | } else if (json.warnings.length > 0) { 15 | json.warnings.forEach(notifyWarning); 16 | } else { 17 | console.log(stats.toString({ 18 | chunks: false, 19 | colors: true 20 | })); 21 | } 22 | }; 23 | -------------------------------------------------------------------------------- /front/styles/semantic/src/themes/classic/views/card.variables: -------------------------------------------------------------------------------- 1 | /******************************* 2 | Card 3 | *******************************/ 4 | 5 | /*------------------- 6 | View 7 | --------------------*/ 8 | 9 | /* Shadow */ 10 | @shadowDistance: 0em; 11 | @padding: 0em; 12 | 13 | /*------------------- 14 | Content 15 | --------------------*/ 16 | 17 | /* Additional Content */ 18 | @extraDivider: 1px solid rgba(0, 0, 0, 0.05); 19 | @extraBackground: #FAFAFA @subtleGradient; 20 | @extraPadding: 0.75em 1em; 21 | @extraBoxShadow: 0 1px 1px rgba(0, 0, 0, 0.15); 22 | @extraColor: @lightTextColor; 23 | -------------------------------------------------------------------------------- /front/styles/semantic/tasks/config/admin/templates/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "semantic", 3 | "version": "1.0.0", 4 | "title": "Semantic UI", 5 | "description": "Semantic empowers designers and developers by creating a shared vocabulary for UI.", 6 | "homepage": "http://www.semantic-ui.com", 7 | "author": "Jack Lukic ", 8 | "license": "MIT", 9 | "repository": { 10 | "type": "git", 11 | "url": "git://github.com/Semantic-Org/Semantic-UI.git" 12 | }, 13 | "bugs": { 14 | "url": "https://github.com/Semantic-Org/Semantic-UI/issues" 15 | }, 16 | "devDependencies": {} 17 | } 18 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/gin-gonic/gin/examples/app-engine/hello.go: -------------------------------------------------------------------------------- 1 | package hello 2 | 3 | import ( 4 | "net/http" 5 | "github.com/gin-gonic/gin" 6 | ) 7 | 8 | // This function's name is a must. App Engine uses it to drive the requests properly. 9 | func init() { 10 | // Starts a new Gin instance with no middle-ware 11 | r := gin.New() 12 | 13 | // Define your handlers 14 | r.GET("/", func(c *gin.Context){ 15 | c.String(200, "Hello World!") 16 | }) 17 | r.GET("/ping", func(c *gin.Context){ 18 | c.String(200, "pong") 19 | }) 20 | 21 | // Handle all requests using net/http 22 | http.Handle("/", r) 23 | } 24 | -------------------------------------------------------------------------------- /front/styles/semantic/src/themes/default/elements/reveal.variables: -------------------------------------------------------------------------------- 1 | /******************************* 2 | Reveal 3 | *******************************/ 4 | 5 | @transitionDelay: 0.1s; 6 | @transitionDuration: 0.5s; 7 | @transitionEasing: cubic-bezier(0.175, 0.885, 0.320, 1); 8 | @transition: all @transitionDuration @defaultEasing @transitionDelay; 9 | 10 | @bottomZIndex: 2; 11 | @topZIndex: 3; 12 | @activeZIndex: 4; 13 | 14 | /* Types */ 15 | @rotateDegrees: 110deg; 16 | @moveTransition: transform @transitionDuration @transitionEasing @transitionDelay; 17 | @slideTransition: transform @transitionDuration @defaultEasing @transitionDelay; -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/Sirupsen/logrus/hooks/papertrail/papertrail_test.go: -------------------------------------------------------------------------------- 1 | package logrus_papertrail 2 | 3 | import ( 4 | "fmt" 5 | "testing" 6 | 7 | "github.com/Sirupsen/logrus" 8 | "github.com/stvp/go-udp-testing" 9 | ) 10 | 11 | func TestWritingToUDP(t *testing.T) { 12 | port := 16661 13 | udp.SetAddr(fmt.Sprintf(":%d", port)) 14 | 15 | hook, err := NewPapertrailHook("localhost", port, "test") 16 | if err != nil { 17 | t.Errorf("Unable to connect to local UDP server.") 18 | } 19 | 20 | log := logrus.New() 21 | log.Hooks.Add(hook) 22 | 23 | udp.ShouldReceive(t, "foo", func() { 24 | log.Info("foo") 25 | }) 26 | } 27 | -------------------------------------------------------------------------------- /handlers/home.go: -------------------------------------------------------------------------------- 1 | package handlers 2 | 3 | import ( 4 | // "github.com/flosch/pongo2" 5 | "github.com/gin-gonic/gin" 6 | ) 7 | 8 | type homeHandlerInterface interface { 9 | Index(c *gin.Context) 10 | } 11 | 12 | func NewHomeHandler() homeHandlerInterface { 13 | return &home{} 14 | } 15 | 16 | type home struct{} 17 | 18 | func (h *home) Index(c *gin.Context) { 19 | c.JSON(200, "Hello forum API") 20 | } 21 | 22 | //Use for admin 23 | // func (h *home) AdminDashboard(c *gin.Context) { 24 | 25 | // ctx := pongo2.Context{ 26 | // "hello": "Hello Admin", 27 | // } 28 | // c.HTML(200, "views/admins/dashboard/index.html", ctx) 29 | // } 30 | -------------------------------------------------------------------------------- /front/styles/semantic/tasks/admin/publish.js: -------------------------------------------------------------------------------- 1 | /******************************* 2 | Release All 3 | *******************************/ 4 | 5 | /* 6 | This task update all SUI individual component repos with new versions of components 7 | 8 | * Commits changes from create components to GitHub and Tags 9 | 10 | */ 11 | 12 | var 13 | runSequence = require('run-sequence') 14 | ; 15 | 16 | /* Release All */ 17 | module.exports = function(callback) { 18 | 19 | runSequence( 20 | 'update distributions', // commit less/css versions to github 21 | 'update components', // commit components to github 22 | callback 23 | ); 24 | 25 | }; -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/gin-gonic/gin/binding/xml.go: -------------------------------------------------------------------------------- 1 | // Copyright 2014 Manu Martinez-Almeida. All rights reserved. 2 | // Use of this source code is governed by a MIT style 3 | // license that can be found in the LICENSE file. 4 | 5 | package binding 6 | 7 | import ( 8 | "encoding/xml" 9 | "net/http" 10 | ) 11 | 12 | type xmlBinding struct{} 13 | 14 | func (_ xmlBinding) Name() string { 15 | return "xml" 16 | } 17 | 18 | func (_ xmlBinding) Bind(req *http.Request, obj interface{}) error { 19 | decoder := xml.NewDecoder(req.Body) 20 | if err := decoder.Decode(obj); err != nil { 21 | return err 22 | } 23 | return validate(obj) 24 | } 25 | -------------------------------------------------------------------------------- /config.yml: -------------------------------------------------------------------------------- 1 | env: 2 | development: 3 | database: 4 | name: golangvietnam_develop 5 | host: 127.0.0.1 6 | port: 27017 7 | user: "" 8 | password: "" 9 | server: 10 | host: localhost 11 | port: 8080 12 | production: 13 | database: 14 | name: golangvietnam_production 15 | host: 127.0.0.1 16 | port: 27017 17 | user: "" 18 | password: "" 19 | server: 20 | host: 127.0.0.1 21 | port: 8080 22 | testing: 23 | database: 24 | name: golangvietnam_test 25 | host: 127.0.0.1 26 | port: 27017 27 | user: "" 28 | password: "" 29 | server: 30 | host: 127.0.0.1 31 | port: 5000 32 | secret: co_chi_mo_ma_coi -------------------------------------------------------------------------------- /front/styles/semantic/tasks/config/admin/templates/bower.json: -------------------------------------------------------------------------------- 1 | { 2 | "name" : "Component", 3 | "description" : "Component distribution", 4 | "homepage" : "http://www.semantic-ui.com", 5 | "author": { 6 | "name" : "Jack Lukic", 7 | "web" : "http://www.jacklukic.com" 8 | }, 9 | "ignore": [ 10 | "./index.js" 11 | ], 12 | "keywords": [ 13 | "semantic", 14 | "ui", 15 | "css3", 16 | "framework" 17 | ], 18 | "license" : [ 19 | "http://semantic-ui.mit-license.org/" 20 | ], 21 | "ignore": [ 22 | "docs", 23 | "node", 24 | "server", 25 | "spec", 26 | "src", 27 | "test" 28 | ] 29 | } 30 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/gin-gonic/gin/binding/json.go: -------------------------------------------------------------------------------- 1 | // Copyright 2014 Manu Martinez-Almeida. All rights reserved. 2 | // Use of this source code is governed by a MIT style 3 | // license that can be found in the LICENSE file. 4 | 5 | package binding 6 | 7 | import ( 8 | "encoding/json" 9 | 10 | "net/http" 11 | ) 12 | 13 | type jsonBinding struct{} 14 | 15 | func (_ jsonBinding) Name() string { 16 | return "json" 17 | } 18 | 19 | func (_ jsonBinding) Bind(req *http.Request, obj interface{}) error { 20 | decoder := json.NewDecoder(req.Body) 21 | if err := decoder.Decode(obj); err != nil { 22 | return err 23 | } 24 | return validate(obj) 25 | } 26 | -------------------------------------------------------------------------------- /models/category.go: -------------------------------------------------------------------------------- 1 | package models 2 | 3 | import ( 4 | "gopkg.in/mgo.v2/bson" 5 | "time" 6 | ) 7 | 8 | const ( 9 | CategoryColName = "categories" 10 | ) 11 | 12 | type Category struct { 13 | Id bson.ObjectId `bson:"_id,omitempty" json:"_id"` 14 | Name string `bson:"name" json:"name" binding:"required"` 15 | Slug string `bson:"slug" json:"slug" binding:"required"` 16 | Description string `bson:"description" json:"description"` 17 | Image string `bson:"image" json:"image"` 18 | CreateAt *time.Time `bson:"create_at" json:"create_at"` 19 | UpdateAt *time.Time `bson:"update_at" json:"update_at"` 20 | } 21 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/gin-gonic/gin/render/redirect.go: -------------------------------------------------------------------------------- 1 | // Copyright 2014 Manu Martinez-Almeida. All rights reserved. 2 | // Use of this source code is governed by a MIT style 3 | // license that can be found in the LICENSE file. 4 | 5 | package render 6 | 7 | import ( 8 | "fmt" 9 | "net/http" 10 | ) 11 | 12 | type Redirect struct { 13 | Code int 14 | Request *http.Request 15 | Location string 16 | } 17 | 18 | func (r Redirect) Render(w http.ResponseWriter) error { 19 | if r.Code < 300 || r.Code > 308 { 20 | panic(fmt.Sprintf("Cannot redirect with status code %d", r.Code)) 21 | } 22 | http.Redirect(w, r.Request, r.Location, r.Code) 23 | return nil 24 | } 25 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/gin-gonic/gin/binding/form.go: -------------------------------------------------------------------------------- 1 | // Copyright 2014 Manu Martinez-Almeida. All rights reserved. 2 | // Use of this source code is governed by a MIT style 3 | // license that can be found in the LICENSE file. 4 | 5 | package binding 6 | 7 | import "net/http" 8 | 9 | type formBinding struct{} 10 | 11 | func (_ formBinding) Name() string { 12 | return "form" 13 | } 14 | 15 | func (_ formBinding) Bind(req *http.Request, obj interface{}) error { 16 | if err := req.ParseForm(); err != nil { 17 | return err 18 | } 19 | req.ParseMultipartForm(32 << 10) // 32 MB 20 | if err := mapForm(obj, req.Form); err != nil { 21 | return err 22 | } 23 | return validate(obj) 24 | } 25 | -------------------------------------------------------------------------------- /front/styles/semantic/src/themes/chubby/elements/button.overrides: -------------------------------------------------------------------------------- 1 | /******************************* 2 | Overrides 3 | *******************************/ 4 | 5 | @import url(http://fonts.googleapis.com/css?family=Source+Sans+Pro); 6 | 7 | .ui.labeled.icon.buttons > .button > .icon, 8 | .ui.labeled.icon.button > .icon { 9 | box-shadow: 10 | -1px 0px 0px 0px rgba(255, 255, 255, 0.2) inset, 11 | -1px 0px 0px 0px rgba(0, 0, 0, 0.05) inset 12 | ; 13 | } 14 | 15 | .ui.right.labeled.icon.buttons .button .icon, 16 | .ui.right.labeled.icon.button .icon { 17 | box-shadow: 18 | 1px 0px 0px 0px rgba(255, 255, 255, 0.2) inset, 19 | 1px 0px 0px 0px rgba(0, 0, 0, 0.05) inset 20 | ; 21 | } -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/Sirupsen/logrus/terminal_notwindows.go: -------------------------------------------------------------------------------- 1 | // Based on ssh/terminal: 2 | // Copyright 2011 The Go Authors. All rights reserved. 3 | // Use of this source code is governed by a BSD-style 4 | // license that can be found in the LICENSE file. 5 | 6 | // +build linux darwin freebsd openbsd 7 | 8 | package logrus 9 | 10 | import ( 11 | "syscall" 12 | "unsafe" 13 | ) 14 | 15 | // IsTerminal returns true if the given file descriptor is a terminal. 16 | func IsTerminal() bool { 17 | fd := syscall.Stdout 18 | var termios Termios 19 | _, _, err := syscall.Syscall6(syscall.SYS_IOCTL, uintptr(fd), ioctlReadTermios, uintptr(unsafe.Pointer(&termios)), 0, 0, 0) 20 | return err == 0 21 | } 22 | -------------------------------------------------------------------------------- /front/styles/semantic/src/themes/timeline/views/feed.overrides: -------------------------------------------------------------------------------- 1 | /******************************* 2 | User Variable Overrides 3 | *******************************/ 4 | 5 | .ui.feed > .event .label { 6 | border-left: 3px solid #DDDDDD; 7 | } 8 | .ui.feed > .event:last-child .label { 9 | border-left-color: transparent; 10 | } 11 | 12 | .ui.feed > .event > .label { 13 | margin-left: 1.6em; 14 | } 15 | 16 | .ui.feed > .event > .label > img, 17 | .ui.feed > .event > .label > .icon { 18 | background-color: #009FDA; 19 | border-radius: 500rem; 20 | color: #FFFFFF; 21 | width: 3rem; 22 | height: 3rem; 23 | line-height: 1.5; 24 | left: -1.6rem; 25 | opacity: 1; 26 | position: relative; 27 | } 28 | -------------------------------------------------------------------------------- /front/.eslintrc: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "eslint-config-airbnb", 3 | "env": { 4 | "browser": true, 5 | "node": true 6 | }, 7 | "rules": { 8 | "react/jsx-uses-react": 2, 9 | "react/jsx-uses-vars": 2, 10 | "react/react-in-jsx-scope": 2, 11 | // Temporarirly disabled due to a possible bug in babel-eslint (todomvc example) 12 | "block-scoped-var": 0, 13 | // Temporarily disabled for test/* until babel/babel-eslint#33 is resolved 14 | "padded-blocks": 0, 15 | "no-console": 0 16 | }, 17 | "plugins": [ 18 | "react" 19 | ], 20 | "globals": { 21 | "__DEVELOPMENT__": true, 22 | "__CLIENT__": true, 23 | "__SERVER__": true, 24 | "__DEVTOOLS__": true 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/Sirupsen/logrus/hooks/syslog/syslog_test.go: -------------------------------------------------------------------------------- 1 | package logrus_syslog 2 | 3 | import ( 4 | "github.com/Sirupsen/logrus" 5 | "log/syslog" 6 | "testing" 7 | ) 8 | 9 | func TestLocalhostAddAndPrint(t *testing.T) { 10 | log := logrus.New() 11 | hook, err := NewSyslogHook("udp", "localhost:514", syslog.LOG_INFO, "") 12 | 13 | if err != nil { 14 | t.Errorf("Unable to connect to local syslog.") 15 | } 16 | 17 | log.Hooks.Add(hook) 18 | 19 | for _, level := range hook.Levels() { 20 | if len(log.Hooks[level]) != 1 { 21 | t.Errorf("SyslogHook was not added. The length of log.Hooks[%v]: %v", level, len(log.Hooks[level])) 22 | } 23 | } 24 | 25 | log.Info("Congratulations!") 26 | } 27 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/gin-gonic/gin/examples/realtime-advanced/rooms.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import "github.com/dustin/go-broadcast" 4 | 5 | var roomChannels = make(map[string]broadcast.Broadcaster) 6 | 7 | func openListener(roomid string) chan interface{} { 8 | listener := make(chan interface{}) 9 | room(roomid).Register(listener) 10 | return listener 11 | } 12 | 13 | func closeListener(roomid string, listener chan interface{}) { 14 | room(roomid).Unregister(listener) 15 | close(listener) 16 | } 17 | 18 | func room(roomid string) broadcast.Broadcaster { 19 | b, ok := roomChannels[roomid] 20 | if !ok { 21 | b = broadcast.NewBroadcaster(10) 22 | roomChannels[roomid] = b 23 | } 24 | return b 25 | } 26 | -------------------------------------------------------------------------------- /front/styles/semantic/src/themes/github/elements/step.overrides: -------------------------------------------------------------------------------- 1 | /******************************* 2 | Overrides 3 | *******************************/ 4 | 5 | .ui.steps .step:after { 6 | display: none; 7 | } 8 | .ui.steps .completed.step:before { 9 | opacity: 0.5; 10 | } 11 | 12 | .ui.steps .step.active:after { 13 | display: block; 14 | border: none; 15 | border-bottom: 1px solid rgba(0, 0, 0, 0.2); 16 | border-left: 1px solid rgba(0, 0, 0, 0.2); 17 | } 18 | .ui.vertical.steps .step.active:after { 19 | display: block; 20 | border: none; 21 | top: 50%; 22 | right: 0%; 23 | border-left: none; 24 | border-bottom: 1px solid rgba(0, 0, 0, 0.2); 25 | border-right: 1px solid rgba(0, 0, 0, 0.2); 26 | } -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/gin-gonic/gin/.travis.yml: -------------------------------------------------------------------------------- 1 | language: go 2 | sudo: false 3 | go: 4 | - 1.4 5 | - 1.4.2 6 | - tip 7 | 8 | script: 9 | - go get golang.org/x/tools/cmd/cover 10 | - go get github.com/mattn/goveralls 11 | - go test -v -covermode=count -coverprofile=coverage.out 12 | 13 | after_success: 14 | - goveralls -coverprofile=coverage.out -service=travis-ci -repotoken yFj7FrCeddvBzUaaCyG33jCLfWXeb93eA 15 | 16 | notifications: 17 | webhooks: 18 | urls: 19 | - https://webhooks.gitter.im/e/acc2c57482e94b44f557 20 | on_success: change # options: [always|never|change] default: always 21 | on_failure: always # options: [always|never|change] default: always 22 | on_start: false # default: false 23 | -------------------------------------------------------------------------------- /front/styles/semantic/tasks/collections/build.js: -------------------------------------------------------------------------------- 1 | /******************************* 2 | Define Sub-Tasks 3 | *******************************/ 4 | 5 | module.exports = function(gulp) { 6 | 7 | var 8 | // build sub-tasks 9 | buildJS = require('./../build/javascript'), 10 | buildCSS = require('./../build/css'), 11 | buildAssets = require('./../build/assets') 12 | ; 13 | 14 | // in case these tasks are undefined during import, less make sure these are available in scope 15 | gulp.task('build-javascript', 'Builds all javascript from source', buildJS); 16 | gulp.task('build-css', 'Builds all css from source', buildCSS); 17 | gulp.task('build-assets', 'Copies all assets from source', buildAssets); 18 | 19 | }; 20 | -------------------------------------------------------------------------------- /front/styles/semantic/tasks/check-install.js: -------------------------------------------------------------------------------- 1 | /******************************* 2 | Check Install 3 | *******************************/ 4 | 5 | var 6 | // node dependencies 7 | gulp = require('gulp'), 8 | fs = require('fs'), 9 | console = require('better-console'), 10 | install = require('./config/project/install') 11 | ; 12 | 13 | // export task 14 | module.exports = function() { 15 | 16 | setTimeout(function() { 17 | if( !install.isSetup() ) { 18 | console.log('Starting install...'); 19 | gulp.start('install'); 20 | return; 21 | } 22 | else { 23 | gulp.start('watch'); 24 | } 25 | }, 50); // Delay to allow console.clear to remove messages from check event 26 | 27 | 28 | }; -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/Sirupsen/logrus/writer.go: -------------------------------------------------------------------------------- 1 | package logrus 2 | 3 | import ( 4 | "bufio" 5 | "io" 6 | "runtime" 7 | ) 8 | 9 | func (logger *Logger) Writer() *io.PipeWriter { 10 | reader, writer := io.Pipe() 11 | 12 | go logger.writerScanner(reader) 13 | runtime.SetFinalizer(writer, writerFinalizer) 14 | 15 | return writer 16 | } 17 | 18 | func (logger *Logger) writerScanner(reader *io.PipeReader) { 19 | scanner := bufio.NewScanner(reader) 20 | for scanner.Scan() { 21 | logger.Print(scanner.Text()) 22 | } 23 | if err := scanner.Err(); err != nil { 24 | logger.Errorf("Error while reading from Writer: %s", err) 25 | } 26 | reader.Close() 27 | } 28 | 29 | func writerFinalizer(writer *io.PipeWriter) { 30 | writer.Close() 31 | } 32 | -------------------------------------------------------------------------------- /front/styles/semantic/src/themes/github/elements/step.variables: -------------------------------------------------------------------------------- 1 | /*------------------- 2 | Step Variables 3 | --------------------*/ 4 | 5 | /* Step */ 6 | @background: transparent linear-gradient(transparent, rgba(0, 0, 0, 0.07)); 7 | @verticalPadding: 1em; 8 | 9 | @arrowDisplay: none; 10 | @lastArrowDisplay: none; 11 | @activeArrowDisplay: block; 12 | @activeLastArrowDisplay: block; 13 | 14 | /* Group */ 15 | @stepsBackground: #FFFFFF; 16 | @stepsBoxShadow: 0px 0px 1px 0px rgba(0, 0, 0, 0.15); 17 | 18 | /* States */ 19 | @activeBackground: #FFFFFF; 20 | @activeIconColor: @darkTextColor; 21 | 22 | /* Arrow */ 23 | @arrowTopOffset: 100%; 24 | @arrowRightOffset: 50%; 25 | @arrowBorderColor: rgba(0, 0, 0, 0.2); 26 | @arrowBorderWidth: 0px 0px @borderWidth @borderWidth; 27 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/gopkg.in/mgo.v2/export_test.go: -------------------------------------------------------------------------------- 1 | package mgo 2 | 3 | import ( 4 | "time" 5 | ) 6 | 7 | func HackPingDelay(newDelay time.Duration) (restore func()) { 8 | globalMutex.Lock() 9 | defer globalMutex.Unlock() 10 | 11 | oldDelay := pingDelay 12 | restore = func() { 13 | globalMutex.Lock() 14 | pingDelay = oldDelay 15 | globalMutex.Unlock() 16 | } 17 | pingDelay = newDelay 18 | return 19 | } 20 | 21 | func HackSyncSocketTimeout(newTimeout time.Duration) (restore func()) { 22 | globalMutex.Lock() 23 | defer globalMutex.Unlock() 24 | 25 | oldTimeout := syncSocketTimeout 26 | restore = func() { 27 | globalMutex.Lock() 28 | syncSocketTimeout = oldTimeout 29 | globalMutex.Unlock() 30 | } 31 | syncSocketTimeout = newTimeout 32 | return 33 | } 34 | -------------------------------------------------------------------------------- /helpers/apiErrors/category.go: -------------------------------------------------------------------------------- 1 | package apiErrors 2 | 3 | const ( 4 | CategoryNotFound = "CATEGORY_NOT_FOUND" 5 | CategoryNameRequired = "CATEGORY_NAME_REQUIRED" 6 | CategorySlugRequired = "CATEGORY_SLUG_REQUIRED" 7 | CategoryExist = "CATEGORY_EXIST" 8 | ) 9 | 10 | var categoryErrors = []apiError{ 11 | apiError{ 12 | Id: CategoryNotFound, 13 | Message: "Category not found", 14 | Status: 404, 15 | }, 16 | apiError{ 17 | Id: CategorySlugRequired, 18 | Message: "Category slug required", 19 | Status: 400, 20 | }, 21 | apiError{ 22 | Id: CategoryNameRequired, 23 | Message: "Category name required", 24 | Status: 400, 25 | }, 26 | apiError{ 27 | Id: CategoryExist, 28 | Message: "Category exist", 29 | Status: 400, 30 | }, 31 | } 32 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/Sirupsen/logrus/terminal_windows.go: -------------------------------------------------------------------------------- 1 | // Based on ssh/terminal: 2 | // Copyright 2011 The Go Authors. All rights reserved. 3 | // Use of this source code is governed by a BSD-style 4 | // license that can be found in the LICENSE file. 5 | 6 | // +build windows 7 | 8 | package logrus 9 | 10 | import ( 11 | "syscall" 12 | "unsafe" 13 | ) 14 | 15 | var kernel32 = syscall.NewLazyDLL("kernel32.dll") 16 | 17 | var ( 18 | procGetConsoleMode = kernel32.NewProc("GetConsoleMode") 19 | ) 20 | 21 | // IsTerminal returns true if the given file descriptor is a terminal. 22 | func IsTerminal() bool { 23 | fd := syscall.Stdout 24 | var st uint32 25 | r, _, e := syscall.Syscall(procGetConsoleMode.Addr(), 2, uintptr(fd), uintptr(unsafe.Pointer(&st)), 0) 26 | return r != 0 && e == 0 27 | } 28 | -------------------------------------------------------------------------------- /front/styles/semantic/src/themes/striped/modules/progress.overrides: -------------------------------------------------------------------------------- 1 | /******************************* 2 | Progress 3 | *******************************/ 4 | 5 | .ui.progress .bar { 6 | background-size: 30px 30px; 7 | background-image: 8 | linear-gradient( 9 | 135deg, rgba(255, 255, 255, 0.08) 25%, transparent 25%, 10 | transparent 50%, rgba(255, 255, 255, 0.08) 50%, rgba(255, 255, 255, 0.08) 75%, 11 | transparent 75%, transparent 12 | ) 13 | ; 14 | } 15 | 16 | .ui.progress.active .bar:after { 17 | animation: none; 18 | } 19 | .ui.progress.active .bar { 20 | animation: progress-striped 3s linear infinite; 21 | } 22 | @keyframes progress-striped { 23 | 0% { 24 | background-position: 0px 0; 25 | } 26 | 100% { 27 | background-position: 60px 0; 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/Sirupsen/logrus/examples/hook/hook.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "github.com/Sirupsen/logrus" 5 | "github.com/Sirupsen/logrus/hooks/airbrake" 6 | ) 7 | 8 | var log = logrus.New() 9 | 10 | func init() { 11 | log.Formatter = new(logrus.TextFormatter) // default 12 | log.Hooks.Add(airbrake.NewHook("https://example.com", "xyz", "development")) 13 | } 14 | 15 | func main() { 16 | log.WithFields(logrus.Fields{ 17 | "animal": "walrus", 18 | "size": 10, 19 | }).Info("A group of walrus emerges from the ocean") 20 | 21 | log.WithFields(logrus.Fields{ 22 | "omg": true, 23 | "number": 122, 24 | }).Warn("The group's number increased tremendously!") 25 | 26 | log.WithFields(logrus.Fields{ 27 | "omg": true, 28 | "number": 100, 29 | }).Fatal("The ice breaks!") 30 | } 31 | -------------------------------------------------------------------------------- /resources/auth.go: -------------------------------------------------------------------------------- 1 | package resources 2 | 3 | import ( 4 | "github.com/golang-vietnam/forum/helpers/apiErrors" 5 | "github.com/golang-vietnam/forum/models" 6 | ) 7 | 8 | type resourceAuthInterface interface { 9 | Login(email string, password string) (*models.User, error) 10 | } 11 | 12 | type resourceAuth struct { 13 | } 14 | 15 | func NewResourceAuth() resourceAuthInterface { 16 | return &resourceAuth{} 17 | } 18 | 19 | func (r *resourceAuth) Login(email string, password string) (*models.User, error) { 20 | user, err := newResourceUser.GetByEmail(email) 21 | if err != nil { 22 | return nil, apiErrors.ThrowError(apiErrors.AuthEmailInvalid) 23 | } 24 | if !newResourceUser.IsMatchPassword(user.Password, password) { 25 | return nil, apiErrors.ThrowError(apiErrors.AuthPasswordInValid) 26 | } 27 | return user, nil 28 | } 29 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/gin-gonic/gin/mode_test.go: -------------------------------------------------------------------------------- 1 | // Copyright 2014 Manu Martinez-Almeida. All rights reserved. 2 | // Use of this source code is governed by a MIT style 3 | // license that can be found in the LICENSE file. 4 | 5 | package gin 6 | 7 | import ( 8 | "testing" 9 | 10 | "github.com/stretchr/testify/assert" 11 | ) 12 | 13 | func init() { 14 | SetMode(TestMode) 15 | } 16 | 17 | func TestSetMode(t *testing.T) { 18 | SetMode(DebugMode) 19 | assert.Equal(t, ginMode, debugCode) 20 | assert.Equal(t, Mode(), DebugMode) 21 | 22 | SetMode(ReleaseMode) 23 | assert.Equal(t, ginMode, releaseCode) 24 | assert.Equal(t, Mode(), ReleaseMode) 25 | 26 | SetMode(TestMode) 27 | assert.Equal(t, ginMode, testCode) 28 | assert.Equal(t, Mode(), TestMode) 29 | 30 | assert.Panics(t, func() { SetMode("unknown") }) 31 | } 32 | -------------------------------------------------------------------------------- /front/styles/semantic/src/themes/default/collections/breadcrumb.variables: -------------------------------------------------------------------------------- 1 | /******************************* 2 | Breadcrumb 3 | *******************************/ 4 | 5 | /*------------------- 6 | Breadcrumb 7 | --------------------*/ 8 | 9 | @verticalMargin: 1em; 10 | @display: inline-block; 11 | @verticalAlign: middle; 12 | 13 | @dividerSpacing: @3px; 14 | @dividerOpacity: 0.7; 15 | @dividerColor: @lightTextColor; 16 | 17 | @dividerSize: @relativeSmall; 18 | @dividerVerticalAlign: baseline; 19 | 20 | @iconDividerSize: @relativeTiny; 21 | @iconDividerVerticalAlign: baseline; 22 | 23 | @sectionMargin: 0em; 24 | @sectionPadding: 0em; 25 | 26 | /* Coupling */ 27 | @segmentPadding: @relativeMini @relativeMedium; 28 | 29 | /*------------------- 30 | States 31 | --------------------*/ 32 | 33 | @activeFontWeight: bold; -------------------------------------------------------------------------------- /front/styles/semantic/src/themes/flat/collections/form.overrides: -------------------------------------------------------------------------------- 1 | /******************************* 2 | Overrides 3 | *******************************/ 4 | 5 | .ui.form input[type="text"], 6 | .ui.form input[type="email"], 7 | .ui.form input[type="date"], 8 | .ui.form input[type="password"], 9 | .ui.form input[type="number"], 10 | .ui.form input[type="url"], 11 | .ui.form input[type="tel"] { 12 | border-bottom: 1px solid #DDDDDD; 13 | } 14 | 15 | .ui.form .selection.dropdown { 16 | border: none; 17 | box-shadow: none !important; 18 | border-bottom: 1px solid #DDDDDD; 19 | border-radius: 0em !important; 20 | } 21 | .ui.form .selection.dropdown > .menu { 22 | border-top-width: 1px !important; 23 | border-radius: @defaultBorderRadius !important; 24 | } 25 | 26 | .ui.form .ui.icon.input > .icon { 27 | width: 1em; 28 | } -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/dgrijalva/jwt-go/signing_method.go: -------------------------------------------------------------------------------- 1 | package jwt 2 | 3 | var signingMethods = map[string]func() SigningMethod{} 4 | 5 | // Signing method 6 | type SigningMethod interface { 7 | Verify(signingString, signature string, key interface{}) error 8 | Sign(signingString string, key interface{}) (string, error) 9 | Alg() string 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 | -------------------------------------------------------------------------------- /front/styles/semantic/src/themes/github/collections/message.variables: -------------------------------------------------------------------------------- 1 | @background: linear-gradient(rgba(255, 255, 255, 0.1), rgba(0, 0, 0, 0.05)) #FEFEFE; 2 | @boxShadow: 3 | 0px 0px 0px 1px rgba(255, 255, 255, 0.3) inset, 4 | 0px 0px 0px 1px rgba(0, 0, 0, 0.2) inset 5 | ; 6 | @verticalPadding: 15px; 7 | @horizontalPadding: 15px; 8 | 9 | @headerFontSize: 1.15em; 10 | 11 | @infoTextColor: #264C72; 12 | @warningTextColor: #613A00; 13 | @errorTextColor: #991111; 14 | 15 | @floatingBoxShadow: 16 | 0px 0px 0px 1px rgba(0, 0, 0, 0.1) inset, 17 | 0px 2px 3px 0px rgba(0, 0, 0, 0.1), 18 | 0px 0px 0px 1px rgba(0, 0, 0, 0.05) inset 19 | ; 20 | 21 | @infoBorderColor: #97C1DA; 22 | @errorBorderColor: #DA9797; 23 | @warningBorderColor: #DCA874; 24 | 25 | @small: 12px; 26 | @medium: 13px; 27 | @large: 14px; 28 | @huge: 16px; 29 | @massive: 18px; 30 | -------------------------------------------------------------------------------- /front/webpack/webpack-dev-server.js: -------------------------------------------------------------------------------- 1 | var WebpackDevServer = require('webpack-dev-server'), 2 | webpack = require('webpack'), 3 | config = require('./dev.config'), 4 | host = process.env.HOST || 'localhost', 5 | port = parseInt(process.env.PORT) + 1 || 3001, 6 | serverOptions = { 7 | contentBase: 'http://' + host + ':' + port, 8 | quiet: true, 9 | noInfo: true, 10 | hot: true, 11 | inline: true, 12 | lazy: false, 13 | publicPath: config.output.publicPath, 14 | headers: {"Access-Control-Allow-Origin": "*"}, 15 | stats: {colors: true} 16 | }, 17 | compiler = webpack(config), 18 | webpackDevServer = new WebpackDevServer(compiler, serverOptions); 19 | 20 | webpackDevServer.listen(port, host, function() { 21 | console.info('==> Webpack development server listening on %s:%s', host, port); 22 | }); 23 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/golang.org/x/net/context/withtimeout_test.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 context_test 6 | 7 | import ( 8 | "fmt" 9 | "time" 10 | 11 | "golang.org/x/net/context" 12 | ) 13 | 14 | func ExampleWithTimeout() { 15 | // Pass a context with a timeout to tell a blocking function that it 16 | // should abandon its work after the timeout elapses. 17 | ctx, _ := context.WithTimeout(context.Background(), 100*time.Millisecond) 18 | select { 19 | case <-time.After(200 * time.Millisecond): 20 | fmt.Println("overslept") 21 | case <-ctx.Done(): 22 | fmt.Println(ctx.Err()) // prints "context deadline exceeded" 23 | } 24 | // Output: 25 | // context deadline exceeded 26 | } 27 | -------------------------------------------------------------------------------- /helpers/utils/mustLoad.go: -------------------------------------------------------------------------------- 1 | package utils 2 | 3 | import ( 4 | "github.com/gin-gonic/gin" 5 | "github.com/golang-vietnam/forum/models" 6 | ) 7 | 8 | func MustGetCurrentUser(c *gin.Context) *models.User { 9 | var user *models.User 10 | var ok bool 11 | if data, err := c.Get("currentUser"); !err { 12 | panic("Must use RequireLogin before") 13 | } else { 14 | if user, ok = data.(*models.User); !ok { 15 | panic("currentUser must *models.User type") 16 | } 17 | } 18 | return user 19 | } 20 | 21 | func MustGetUserData(c *gin.Context) *models.User { 22 | var user *models.User 23 | var ok bool 24 | if data, err := c.Get("userData"); !err { 25 | panic("Must use LoadUserById before") 26 | } else { 27 | if user, ok = data.(*models.User); !ok { 28 | panic("currentUser must *models.User type") 29 | } 30 | } 31 | return user 32 | } 33 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/gin-gonic/gin/render/text.go: -------------------------------------------------------------------------------- 1 | // Copyright 2014 Manu Martinez-Almeida. All rights reserved. 2 | // Use of this source code is governed by a MIT style 3 | // license that can be found in the LICENSE file. 4 | 5 | package render 6 | 7 | import ( 8 | "fmt" 9 | "io" 10 | "net/http" 11 | ) 12 | 13 | type String struct { 14 | Format string 15 | Data []interface{} 16 | } 17 | 18 | var plainContentType = []string{"text/plain; charset=utf-8"} 19 | 20 | func (r String) Render(w http.ResponseWriter) error { 21 | WriteString(w, r.Format, r.Data) 22 | return nil 23 | } 24 | 25 | func WriteString(w http.ResponseWriter, format string, data []interface{}) { 26 | writeContentType(w, plainContentType) 27 | 28 | if len(data) > 0 { 29 | fmt.Fprintf(w, format, data...) 30 | } else { 31 | io.WriteString(w, format) 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /front/styles/semantic/src/themes/raised/elements/button.variables: -------------------------------------------------------------------------------- 1 | /******************************* 2 | Button 3 | *******************************/ 4 | 5 | /*------------------- 6 | Element 7 | --------------------*/ 8 | 9 | @backgroundColor: #F8F8F8; 10 | @backgroundImage: linear-gradient(transparent, rgba(0, 0, 0, 0.05)); 11 | @verticalAlign: middle; 12 | @borderRadius: 0.4em; 13 | @borderBoxShadowColor: @borderColor; 14 | 15 | /* Shadow */ 16 | @shadowDistance: 0.3em; 17 | @verticalPadding: 1em; 18 | @horizontalPadding: 2em; 19 | 20 | /* transition box shadow as well */ 21 | @transition: 22 | opacity @defaultDuration @defaultEasing, 23 | background-color @defaultDuration @defaultEasing, 24 | box-shadow @defaultDuration @defaultEasing, 25 | color @defaultDuration @defaultEasing, 26 | background @defaultDuration @defaultEasing 27 | ; -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/gin-gonic/gin/render/render.go: -------------------------------------------------------------------------------- 1 | // Copyright 2014 Manu Martinez-Almeida. All rights reserved. 2 | // Use of this source code is governed by a MIT style 3 | // license that can be found in the LICENSE file. 4 | 5 | package render 6 | 7 | import "net/http" 8 | 9 | type Render interface { 10 | Render(http.ResponseWriter) error 11 | } 12 | 13 | var ( 14 | _ Render = JSON{} 15 | _ Render = IndentedJSON{} 16 | _ Render = XML{} 17 | _ Render = String{} 18 | _ Render = Redirect{} 19 | _ Render = Data{} 20 | _ Render = HTML{} 21 | _ HTMLRender = HTMLDebug{} 22 | _ HTMLRender = HTMLProduction{} 23 | ) 24 | 25 | func writeContentType(w http.ResponseWriter, value []string) { 26 | header := w.Header() 27 | if val := header["Content-Type"]; len(val) == 0 { 28 | header["Content-Type"] = value 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /front/styles/semantic/tasks/admin/release.js: -------------------------------------------------------------------------------- 1 | /******************************* 2 | Release 3 | *******************************/ 4 | 5 | /* 6 | This task update all SUI individual component repos with new versions of components 7 | 8 | * Initializes repositories with current versions 9 | * Creates local files at ../distributions/ with each repo for release 10 | 11 | */ 12 | 13 | var 14 | runSequence = require('run-sequence') 15 | ; 16 | 17 | /* Release All */ 18 | module.exports = function(callback) { 19 | 20 | runSequence( 21 | //'build', // build Semantic 22 | 'init distributions', // sync with current github version 23 | 'create distributions', // update each repo with changes from master repo 24 | 'init components', // sync with current github version 25 | 'create components', // update each repo 26 | callback 27 | ); 28 | 29 | }; -------------------------------------------------------------------------------- /helpers/apiErrors/common.go: -------------------------------------------------------------------------------- 1 | package apiErrors 2 | 3 | const ( 4 | ServerError = "SERVER_ERROR" 5 | ServerTemporarilyUnavailble = "SERVER_TEMPORARILY_UNAVAILBLE" 6 | AccessDenied = "ACCESS_DENIED" 7 | IdInvalid = "ID_INVALID" 8 | ) 9 | 10 | var commonErrors = []apiError{ 11 | apiError{ 12 | Id: ServerError, 13 | Message: "The server encountered an unexpected condition that prevented it from fulfilling the request.", 14 | Status: 500, 15 | }, 16 | apiError{ 17 | Id: ServerTemporarilyUnavailble, 18 | Message: "The server is temporarily unavailable.", 19 | Status: 500, 20 | }, 21 | apiError{ 22 | Id: AccessDenied, 23 | Message: "Access Denied", 24 | Status: 403, 25 | }, 26 | apiError{ 27 | Id: IdInvalid, 28 | Message: "ID must objectId type", 29 | Status: 400, 30 | }, 31 | } 32 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/gin-gonic/gin/examples/realtime-chat/rooms.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import "github.com/dustin/go-broadcast" 4 | 5 | var roomChannels = make(map[string]broadcast.Broadcaster) 6 | 7 | func openListener(roomid string) chan interface{} { 8 | listener := make(chan interface{}) 9 | room(roomid).Register(listener) 10 | return listener 11 | } 12 | 13 | func closeListener(roomid string, listener chan interface{}) { 14 | room(roomid).Unregister(listener) 15 | close(listener) 16 | } 17 | 18 | func deleteBroadcast(roomid string) { 19 | b, ok := roomChannels[roomid] 20 | if ok { 21 | b.Close() 22 | delete(roomChannels, roomid) 23 | } 24 | } 25 | 26 | func room(roomid string) broadcast.Broadcaster { 27 | b, ok := roomChannels[roomid] 28 | if !ok { 29 | b = broadcast.NewBroadcaster(10) 30 | roomChannels[roomid] = b 31 | } 32 | return b 33 | } 34 | -------------------------------------------------------------------------------- /Makefile: -------------------------------------------------------------------------------- 1 | default: autoReload 2 | 3 | autoReload: 4 | @export PATH=$(PATH):$(GOPATH)/bin;gin -a 8080 run 5 | 6 | run: 7 | @go run forum.go start 8 | 9 | testOnWeb: 10 | @cd $(GOPATH)/src/github.com/golang-vietnam/forum/tests;$(GOPATH)/bin/goconvey 11 | 12 | test: 13 | @echo "Begin test on console!" 14 | @cd $(GOPATH)/src/github.com/golang-vietnam/forum/tests;go test -v 15 | @echo "End test!" 16 | 17 | runOnTest: 18 | @go run forum.go test 19 | 20 | install: 21 | @echo "Installing..." 22 | @go get github.com/kr/godep 23 | @go get github.com/codegangsta/gin 24 | @go get github.com/smartystreets/goconvey 25 | @export PATH=$(PATH):$(GOPATH)/bin;godep restore 26 | @echo "Install dependencies successful!" 27 | 28 | save: 29 | @echo "Saving..." 30 | @go get 31 | @go get github.com/kr/godep 32 | @export PATH=$(PATH):$(GOPATH)/bin;godep save 33 | @echo "Save new dependencies successful!" 34 | 35 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/pravj/geopattern/geopattern.go: -------------------------------------------------------------------------------- 1 | // Package geopattern creates beautiful generative image patterns from a string. 2 | package geopattern 3 | 4 | import ( 5 | "encoding/base64" 6 | "fmt" 7 | "github.com/pravj/geopattern/pattern" 8 | ) 9 | 10 | // Generate returns pattern's SVG string 11 | func Generate(args map[string]string) string { 12 | p := pattern.New(args) 13 | 14 | return p.SvgStr() 15 | } 16 | 17 | // Base64String returns pattern's Base64 encoded string 18 | func Base64String(args map[string]string) string { 19 | svgStr := Generate(args) 20 | base64Str := base64.StdEncoding.EncodeToString([]byte(svgStr)) 21 | 22 | return base64Str 23 | } 24 | 25 | // URIimage returns pattern's uri image string 26 | func URIimage(args map[string]string) string { 27 | base64Str := Base64String(args) 28 | 29 | return fmt.Sprintf("url(data:image/svg+xml;base64,%s);", base64Str) 30 | } 31 | -------------------------------------------------------------------------------- /front/reducers/info.js: -------------------------------------------------------------------------------- 1 | import { 2 | INFO_LOAD, 3 | INFO_LOAD_SUCCESS, 4 | INFO_LOAD_FAIL 5 | } from '../actions/actionTypes'; 6 | 7 | const initialState = { 8 | loaded: false 9 | }; 10 | 11 | export default function info(state = initialState, action = {}) { 12 | switch (action.type) { 13 | case INFO_LOAD: 14 | return { 15 | ...state, 16 | loading: true 17 | }; 18 | case INFO_LOAD_SUCCESS: 19 | return { 20 | ...state, 21 | loading: false, 22 | loaded: true, 23 | data: action.result 24 | }; 25 | case INFO_LOAD_FAIL: 26 | return { 27 | ...state, 28 | loading: false, 29 | loaded: false, 30 | error: action.error 31 | }; 32 | default: 33 | return state; 34 | } 35 | } 36 | 37 | export function isLoaded(globalState) { 38 | return globalState.info && globalState.info.loaded; 39 | } 40 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/gin-gonic/gin/examples/realtime-advanced/main.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "fmt" 5 | "runtime" 6 | 7 | "github.com/gin-gonic/gin" 8 | ) 9 | 10 | func main() { 11 | ConfigRuntime() 12 | StartWorkers() 13 | StartGin() 14 | } 15 | 16 | func ConfigRuntime() { 17 | nuCPU := runtime.NumCPU() 18 | runtime.GOMAXPROCS(nuCPU) 19 | fmt.Printf("Running with %d CPUs\n", nuCPU) 20 | } 21 | 22 | func StartWorkers() { 23 | go statsWorker() 24 | } 25 | 26 | func StartGin() { 27 | gin.SetMode(gin.ReleaseMode) 28 | 29 | router := gin.New() 30 | router.Use(rateLimit, gin.Recovery()) 31 | router.LoadHTMLGlob("resources/*.templ.html") 32 | router.Static("/static", "resources/static") 33 | router.GET("/", index) 34 | router.GET("/room/:roomid", roomGET) 35 | router.POST("/room-post/:roomid", roomPOST) 36 | router.GET("/stream/:roomid", streamRoom) 37 | 38 | router.Run(":80") 39 | } 40 | -------------------------------------------------------------------------------- /front/styles/semantic/src/themes/bookish/elements/header.variables: -------------------------------------------------------------------------------- 1 | /*------------------- 2 | Header 3 | --------------------*/ 4 | 5 | @headerFont : 'Karma', 'Times New Roman', serif; 6 | @fontWeight: normal; 7 | 8 | @iconSize: 1.5em; 9 | @iconOffset: 0.2em; 10 | @iconAlignment: top; 11 | 12 | @subHeaderFontSize: 0.85rem; 13 | 14 | @dividedBorder: 1px dotted rgba(0, 0, 0, 0.2); 15 | 16 | /* Block Header */ 17 | @blockVerticalPadding: 1.3em; 18 | @blockHorizontalPadding: 1em; 19 | 20 | /* Attached */ 21 | @attachedBackground: linear-gradient(rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.03)) repeat scroll 0 0 #F8F8F8; 22 | @attachedVerticalPadding: 1.3; 23 | @attachedHorizontalPadding: 1em; 24 | 25 | /* HTML Headings */ 26 | @h1: 1.75rem; 27 | @h2: 1.33rem; 28 | @h3: 1.33rem; 29 | @h4: 1rem; 30 | @h5: 0.9rem; 31 | 32 | /* Sizing */ 33 | @huge: 1.75em; 34 | @large: 1.33em; 35 | @medium: 1.33em; 36 | @small: 1em; 37 | @tiny: 0.9em; -------------------------------------------------------------------------------- /front/styles/semantic/src/themes/default/elements/rail.variables: -------------------------------------------------------------------------------- 1 | /******************************* 2 | Rail 3 | *******************************/ 4 | 5 | /*------------------- 6 | Element 7 | --------------------*/ 8 | 9 | @width: 300px; 10 | @height: 100%; 11 | 12 | @distance: 4rem; 13 | @splitDistance: (@distance / 2); 14 | 15 | /*------------------- 16 | Variations 17 | --------------------*/ 18 | 19 | /* Close */ 20 | @closeDistance: 2em; 21 | @veryCloseDistance: 1em; 22 | 23 | @splitCloseDistance: (@closeDistance / 2); 24 | @splitVeryCloseDistance: (@veryCloseDistance / 2); 25 | 26 | @closeWidth: @width + @splitCloseDistance; 27 | @veryCloseWidth: @width + @splitVeryCloseDistance; 28 | 29 | /* Dividing */ 30 | @dividingBorder: 1px solid @borderColor; 31 | @dividingDistance: 5rem; 32 | @splitDividingDistance: (@dividingDistance / 2); 33 | @dividingWidth: @width + @splitDividingDistance; 34 | 35 | -------------------------------------------------------------------------------- /front/redux/create.js: -------------------------------------------------------------------------------- 1 | /* global __DEVELOPMENT__, __CLIENT__, __DEVTOOLS__ */ 2 | import { createStore, combineReducers, applyMiddleware, compose } from 'redux'; 3 | import createMiddleware from './clientMiddleware'; 4 | import * as reducers from '../reducers/index'; 5 | const reducer = combineReducers(reducers); 6 | 7 | export default function(client, data) { 8 | const middleware = createMiddleware(client); 9 | let finalCreateStore; 10 | if (__DEVELOPMENT__ && __CLIENT__ && __DEVTOOLS__) { 11 | const { devTools, persistState } = require('redux-devtools'); 12 | finalCreateStore = compose( 13 | applyMiddleware(middleware), 14 | devTools(), 15 | persistState(window.location.href.match(/[?&]debug_session=([^&]+)\b/)), 16 | createStore 17 | ); 18 | } else { 19 | finalCreateStore = applyMiddleware(middleware)(createStore); 20 | } 21 | return finalCreateStore(reducer, data); 22 | } 23 | 24 | -------------------------------------------------------------------------------- /front/styles/semantic/src/themes/basic/views/card.variables: -------------------------------------------------------------------------------- 1 | /******************************* 2 | Card 3 | *******************************/ 4 | 5 | /*------------------- 6 | View 7 | --------------------*/ 8 | 9 | @width: 250px; 10 | @background: transparent; 11 | @border: none; 12 | @boxShadow: none; 13 | 14 | @contentPadding: 1em 0em; 15 | 16 | @rowSpacing: 1.5em; 17 | @groupCardMargin: 0em @horizontalSpacing @rowSpacing; 18 | 19 | @extraBackground: transparent; 20 | @extraDivider: none; 21 | @extraBoxShadow: none; 22 | @extraPadding: 0.5em 0em; 23 | 24 | @extraLinkColor: @textColor; 25 | @extraLinkHoverColor: @linkHoverColor; 26 | 27 | @headerFontSize: @relativeLarge; 28 | @headerLinkColor: @textColor; 29 | @headerLinkHoverColor: @linkHoverColor; 30 | 31 | @imageBorderRadius: @borderRadius; 32 | @imageBorder: 1px solid @borderColor; 33 | 34 | @linkHoverBackground: transparent; 35 | @linkHoverBoxShadow: none; -------------------------------------------------------------------------------- /front/styles/semantic/src/themes/default/modules/shape.variables: -------------------------------------------------------------------------------- 1 | /******************************* 2 | Shape 3 | *******************************/ 4 | 5 | @display: inline-block; 6 | 7 | /* Animating */ 8 | @perspective: 2000px; 9 | 10 | @duration: 0.6s; 11 | @easing: ease-in-out; 12 | 13 | @hiddenSideOpacity: 0.6; 14 | @animatingZIndex: 100; 15 | 16 | @transition: 17 | transform @duration @easing, 18 | left @duration @easing, 19 | width @duration @easing, 20 | height @duration @easing 21 | ; 22 | @sideTransition: opacity @duration @easing; 23 | @backfaceVisibility: hidden; 24 | 25 | /* Side */ 26 | @sideMargin: 0em; 27 | 28 | /*-------------- 29 | Types 30 | ---------------*/ 31 | 32 | /* Cube */ 33 | @cubeSize: 15em; 34 | @cubeBackground: #E6E6E6; 35 | @cubePadding: 2em; 36 | @cubeTextColor: @textColor; 37 | @cubeBoxShadow: 0px 0px 2px rgba(0, 0, 0, 0.3); 38 | 39 | @cubeTextAlign: center; 40 | @cubeFontSize: 2em; 41 | -------------------------------------------------------------------------------- /front/styles/semantic/tasks/config/admin/github.js: -------------------------------------------------------------------------------- 1 | /******************************* 2 | GitHub Login 3 | *******************************/ 4 | /* 5 | Logs into GitHub using OAuth 6 | */ 7 | 8 | var 9 | fs = require('fs'), 10 | path = require('path'), 11 | githubAPI = require('github'), 12 | 13 | // stores oauth info for GitHub API 14 | oAuthConfig = path.join(__dirname, 'oauth.js'), 15 | oAuth = fs.existsSync(oAuthConfig) 16 | ? require(oAuthConfig) 17 | : false, 18 | github 19 | ; 20 | 21 | if(!oAuth) { 22 | console.log('here'); 23 | console.error('Must add oauth token for GitHub in tasks/config/admin/oauth.js'); 24 | } 25 | 26 | github = new githubAPI({ 27 | version : '3.0.0', 28 | debug : true, 29 | protocol : 'https', 30 | timeout : 5000 31 | }); 32 | 33 | github.authenticate({ 34 | type: 'oauth', 35 | token: oAuth.token 36 | }); 37 | 38 | module.exports = github; -------------------------------------------------------------------------------- /front/styles/semantic/tasks/config/admin/templates/css-package.js: -------------------------------------------------------------------------------- 1 | var 2 | where = 'client' // Adds files only to the client 3 | ; 4 | 5 | Package.describe({ 6 | name : 'semantic:ui-css', 7 | summary : 'Semantic UI - CSS Release of Semantic UI', 8 | version : '{version}', 9 | git : 'git://github.com/Semantic-Org/Semantic-UI-CSS.git', 10 | }); 11 | 12 | Package.onUse(function(api) { 13 | 14 | api.versionsFrom('1.0'); 15 | 16 | api.use('jquery', 'client'); 17 | 18 | api.addFiles([ 19 | // icons 20 | 'themes/default/assets/fonts/icons.eot', 21 | 'themes/default/assets/fonts/icons.svg', 22 | 'themes/default/assets/fonts/icons.ttf', 23 | 'themes/default/assets/fonts/icons.woff', 24 | 'themes/default/assets/fonts/icons.woff2', 25 | 26 | // flags 27 | 'themes/default/assets/images/flags.png', 28 | 29 | // release 30 | 'semantic.css', 31 | 'semantic.js' 32 | ], 'client'); 33 | 34 | }); 35 | -------------------------------------------------------------------------------- /front/styles/semantic/tasks/build/assets.js: -------------------------------------------------------------------------------- 1 | /******************************* 2 | Build Task 3 | *******************************/ 4 | 5 | var 6 | gulp = require('gulp'), 7 | 8 | // gulp dependencies 9 | chmod = require('gulp-chmod'), 10 | gulpif = require('gulp-if'), 11 | 12 | // config 13 | config = require('../config/user'), 14 | tasks = require('../config/tasks'), 15 | 16 | // shorthand 17 | globs = config.globs, 18 | assets = config.paths.assets, 19 | output = config.paths.output, 20 | source = config.paths.source, 21 | 22 | log = tasks.log 23 | ; 24 | 25 | module.exports = function(callback) { 26 | 27 | console.info('Building assets'); 28 | 29 | // copy assets 30 | return gulp.src(source.themes + '/**/assets/**/*.*') 31 | .pipe(gulpif(config.hasPermission, chmod(config.permission))) 32 | .pipe(gulp.dest(output.themes)) 33 | ; 34 | 35 | }; -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/lucasb-eyer/go-colorful/happy_palettegen.go: -------------------------------------------------------------------------------- 1 | package colorful 2 | 3 | import ( 4 | "math/rand" 5 | ) 6 | 7 | // Uses the HSV color space to generate colors with similar S,V but distributed 8 | // evenly along their Hue. This is fast but not always pretty. 9 | // If you've got time to spare, use Lab (the non-fast below). 10 | func FastHappyPalette(colorsCount int) (colors []Color) { 11 | colors = make([]Color, colorsCount) 12 | 13 | for i := 0 ; i < colorsCount ; i++ { 14 | colors[i] = Hsv(float64(i)*(360.0/float64(colorsCount)), 0.8 + rand.Float64()*0.2, 0.65 + rand.Float64()*0.2) 15 | } 16 | return 17 | } 18 | 19 | func HappyPalette(colorsCount int) ([]Color, error) { 20 | pimpy := func(l, a, b float64) bool { 21 | _, c, _ := LabToHcl(l, a, b) 22 | return 0.3 <= c && 0.4 <= l && l <= 0.8 23 | } 24 | return SoftPaletteEx(colorsCount, SoftPaletteSettings{pimpy, 50, true}) 25 | } 26 | 27 | -------------------------------------------------------------------------------- /front/styles/semantic/src/themes/colored/modules/checkbox.variables: -------------------------------------------------------------------------------- 1 | /* Checkbox */ 2 | @checkboxActiveBackground: @primaryColor; 3 | @checkboxActiveBorderColor: @primaryColor; 4 | @checkboxActiveCheckColor: @white; 5 | 6 | @checkboxActiveFocusBackground: @primaryColorFocus; 7 | @checkboxActiveFocusBorderColor: @primaryColorFocus; 8 | @checkboxActiveFocusCheckColor: @white; 9 | 10 | @checkboxTransition: none; 11 | 12 | /* Radio */ 13 | @radioActiveBackground: @white; 14 | @radioActiveBorderColor: @primaryColor; 15 | @radioActiveBulletColor: @primaryColor; 16 | 17 | @radioActiveFocusBackground: @white; 18 | @radioActiveFocusBorderColor: @primaryColorFocus; 19 | @radioActiveFocusBulletColor: @primaryColorFocus; 20 | 21 | /* Slider */ 22 | @sliderOnLineColor: @primaryColor; 23 | @sliderOnFocusLineColor: @primaryColorFocus; 24 | 25 | /* Handle */ 26 | @handleBackground: @white @subtleGradient; 27 | @handleBoxShadow: 28 | 0px 0px 0px 1px @selectedBorderColor inset 29 | ; 30 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/lucasb-eyer/go-colorful/doc/colordist/colordist.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import "fmt" 4 | import "github.com/lucasb-eyer/go-colorful" 5 | 6 | func main() { 7 | c1a := colorful.Color{150.0/255.0, 10.0/255.0, 150.0/255.0} 8 | c1b := colorful.Color{ 53.0/255.0, 10.0/255.0, 150.0/255.0} 9 | c2a := colorful.Color{10.0/255.0, 150.0/255.0, 50.0/255.0} 10 | c2b := colorful.Color{99.9/255.0, 150.0/255.0, 10.0/255.0} 11 | 12 | fmt.Printf("DistanceRgb: c1: %v\tand c2: %v\n", c1a.DistanceRgb(c1b), c2a.DistanceRgb(c2b)) 13 | fmt.Printf("DistanceLab: c1: %v\tand c2: %v\n", c1a.DistanceLab(c1b), c2a.DistanceLab(c2b)) 14 | fmt.Printf("DistanceLuv: c1: %v\tand c2: %v\n", c1a.DistanceLuv(c1b), c2a.DistanceLuv(c2b)) 15 | fmt.Printf("DistanceCIE76: c1: %v\tand c2: %v\n", c1a.DistanceCIE76(c1b), c2a.DistanceCIE76(c2b)) 16 | fmt.Printf("DistanceCIE94: c1: %v\tand c2: %v\n", c1a.DistanceCIE94(c1b), c2a.DistanceCIE94(c2b)) 17 | } 18 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/lucasb-eyer/go-colorful/warm_palettegen.go: -------------------------------------------------------------------------------- 1 | package colorful 2 | 3 | import ( 4 | "math/rand" 5 | ) 6 | 7 | // Uses the HSV color space to generate colors with similar S,V but distributed 8 | // evenly along their Hue. This is fast but not always pretty. 9 | // If you've got time to spare, use Lab (the non-fast below). 10 | func FastWarmPalette(colorsCount int) (colors []Color) { 11 | colors = make([]Color, colorsCount) 12 | 13 | for i := 0 ; i < colorsCount ; i++ { 14 | colors[i] = Hsv(float64(i)*(360.0/float64(colorsCount)), 0.55 + rand.Float64()*0.2, 0.35 + rand.Float64()*0.2) 15 | } 16 | return 17 | } 18 | 19 | func WarmPalette(colorsCount int) ([]Color, error) { 20 | warmy := func(l, a, b float64) bool { 21 | _, c, _ := LabToHcl(l, a, b) 22 | return 0.1 <= c && c <= 0.4 && 0.2 <= l && l <= 0.5 23 | } 24 | return SoftPaletteEx(colorsCount, SoftPaletteSettings{warmy, 50, true}) 25 | } 26 | 27 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/gopkg.in/mgo.v2/txn/tarjan_test.go: -------------------------------------------------------------------------------- 1 | package txn 2 | 3 | import ( 4 | "fmt" 5 | "gopkg.in/mgo.v2/bson" 6 | . "gopkg.in/check.v1" 7 | ) 8 | 9 | type TarjanSuite struct{} 10 | 11 | var _ = Suite(TarjanSuite{}) 12 | 13 | func bid(n int) bson.ObjectId { 14 | return bson.ObjectId(fmt.Sprintf("%024d", n)) 15 | } 16 | 17 | func bids(ns ...int) (ids []bson.ObjectId) { 18 | for _, n := range ns { 19 | ids = append(ids, bid(n)) 20 | } 21 | return 22 | } 23 | 24 | func (TarjanSuite) TestExample(c *C) { 25 | successors := map[bson.ObjectId][]bson.ObjectId{ 26 | bid(1): bids(2, 3), 27 | bid(2): bids(1, 5), 28 | bid(3): bids(4), 29 | bid(4): bids(3, 5), 30 | bid(5): bids(6), 31 | bid(6): bids(7), 32 | bid(7): bids(8), 33 | bid(8): bids(6, 9), 34 | bid(9): bids(), 35 | } 36 | 37 | c.Assert(tarjanSort(successors), DeepEquals, [][]bson.ObjectId{ 38 | bids(9), 39 | bids(6, 7, 8), 40 | bids(5), 41 | bids(3, 4), 42 | bids(1, 2), 43 | }) 44 | } 45 | -------------------------------------------------------------------------------- /front/styles/semantic/src/definitions/globals/reset.less: -------------------------------------------------------------------------------- 1 | /*! 2 | * # Semantic UI - Reset 3 | * http://github.com/semantic-org/semantic-ui/ 4 | * 5 | * 6 | * Copyright 2015 Contributors 7 | * Released under the MIT license 8 | * http://opensource.org/licenses/MIT 9 | * 10 | */ 11 | 12 | /******************************* 13 | Theme 14 | *******************************/ 15 | 16 | @type : 'global'; 17 | @element : 'reset'; 18 | 19 | @import (multiple) '../../theme.config'; 20 | 21 | /******************************* 22 | Reset 23 | *******************************/ 24 | 25 | /* Border-Box */ 26 | *, 27 | *:before, 28 | *:after { 29 | box-sizing: inherit; 30 | } 31 | html { 32 | box-sizing: border-box; 33 | } 34 | 35 | /* iPad Input Shadows */ 36 | input[type="text"], input[type="email"], input[type="search"], input[type="password"] { 37 | -webkit-appearance: none; 38 | -moz-appearance: none; /* mobile firefox too! */ 39 | } 40 | 41 | .loadUIOverrides(); -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/gin-gonic/gin/binding/default_validator.go: -------------------------------------------------------------------------------- 1 | package binding 2 | 3 | import ( 4 | "reflect" 5 | "sync" 6 | 7 | "gopkg.in/bluesuncorp/validator.v5" 8 | ) 9 | 10 | type defaultValidator struct { 11 | once sync.Once 12 | validate *validator.Validate 13 | } 14 | 15 | var _ StructValidator = &defaultValidator{} 16 | 17 | func (v *defaultValidator) ValidateStruct(obj interface{}) error { 18 | if kindOfData(obj) == reflect.Struct { 19 | v.lazyinit() 20 | if err := v.validate.Struct(obj); err != nil { 21 | return error(err) 22 | } 23 | } 24 | return nil 25 | } 26 | 27 | func (v *defaultValidator) lazyinit() { 28 | v.once.Do(func() { 29 | v.validate = validator.New("binding", validator.BakedInValidators) 30 | }) 31 | } 32 | 33 | func kindOfData(data interface{}) reflect.Kind { 34 | value := reflect.ValueOf(data) 35 | valueType := value.Kind() 36 | if valueType == reflect.Ptr { 37 | valueType = value.Elem().Kind() 38 | } 39 | return valueType 40 | } 41 | -------------------------------------------------------------------------------- /front/styles/semantic/tasks/config/docs.js: -------------------------------------------------------------------------------- 1 | /******************************* 2 | Docs 3 | *******************************/ 4 | 5 | /* Paths used for "serve-docs" and "build-docs" tasks */ 6 | module.exports = { 7 | base: '', 8 | globs: { 9 | eco: '**/*.html.eco' 10 | }, 11 | paths: { 12 | clean: '../docs/out/dist/', 13 | source: { 14 | config : 'src/theme.config', 15 | definitions : 'src/definitions/', 16 | site : 'src/site/', 17 | themes : 'src/themes/' 18 | }, 19 | output: { 20 | examples : '../docs/out/examples/', 21 | less : '../docs/out/src/', 22 | metadata : '../docs/out/', 23 | packaged : '../docs/out/dist/', 24 | uncompressed : '../docs/out/dist/components/', 25 | compressed : '../docs/out/dist/components/', 26 | themes : '../docs/out/dist/themes/' 27 | }, 28 | template: { 29 | eco: '../docs/server/documents/' 30 | }, 31 | } 32 | }; 33 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/mattn/go-colorable/README.md: -------------------------------------------------------------------------------- 1 | # go-colorable 2 | 3 | Colorable writer for windows. 4 | 5 | For example, most of logger packages doesn't show colors on windows. (I know we can do it with ansicon. But I don't want.) 6 | This package is possible to handle escape sequence for ansi color on windows. 7 | 8 | ## Too Bad! 9 | 10 | ![](https://raw.githubusercontent.com/mattn/go-colorable/gh-pages/bad.png) 11 | 12 | 13 | ## So Good! 14 | 15 | ![](https://raw.githubusercontent.com/mattn/go-colorable/gh-pages/good.png) 16 | 17 | ## Usage 18 | 19 | ```go 20 | logrus.SetOutput(colorable.NewColorableStdout()) 21 | 22 | logrus.Info("succeeded") 23 | logrus.Warn("not correct") 24 | logrus.Error("something error") 25 | logrus.Fatal("panic") 26 | ``` 27 | 28 | You can compile above code on non-windows OSs. 29 | 30 | ## Installation 31 | 32 | ``` 33 | $ go get github.com/mattn/go-colorable 34 | ``` 35 | 36 | # License 37 | 38 | MIT 39 | 40 | # Author 41 | 42 | Yasuhiro Matsumoto (a.k.a mattn) 43 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/golang.org/x/crypto/bcrypt/base64.go: -------------------------------------------------------------------------------- 1 | // Copyright 2011 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package bcrypt 6 | 7 | import "encoding/base64" 8 | 9 | const alphabet = "./ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789" 10 | 11 | var bcEncoding = base64.NewEncoding(alphabet) 12 | 13 | func base64Encode(src []byte) []byte { 14 | n := bcEncoding.EncodedLen(len(src)) 15 | dst := make([]byte, n) 16 | bcEncoding.Encode(dst, src) 17 | for dst[n-1] == '=' { 18 | n-- 19 | } 20 | return dst[:n] 21 | } 22 | 23 | func base64Decode(src []byte) ([]byte, error) { 24 | numOfEquals := 4 - (len(src) % 4) 25 | for i := 0; i < numOfEquals; i++ { 26 | src = append(src, '=') 27 | } 28 | 29 | dst := make([]byte, bcEncoding.DecodedLen(len(src))) 30 | n, err := bcEncoding.Decode(dst, src) 31 | if err != nil { 32 | return nil, err 33 | } 34 | return dst[:n], nil 35 | } 36 | -------------------------------------------------------------------------------- /front/styles/semantic/src/themes/timeline/views/feed.variables: -------------------------------------------------------------------------------- 1 | /******************************* 2 | Feed 3 | *******************************/ 4 | 5 | /*------------------- 6 | Elements 7 | --------------------*/ 8 | 9 | @eventMargin: 0em; 10 | @eventDivider: none; 11 | @eventPadding: 0em; 12 | 13 | /* Event Label */ 14 | @labelWidth: 3em; 15 | @labelHeight: auto; 16 | 17 | @labeledContentMargin: 0.75em 0em 2em 0.75em; 18 | 19 | /* Icon */ 20 | @iconLabelBackground: @primaryColor; 21 | @iconLabelBorderRadius: @circularRadius; 22 | @iconLabelColor: @white; 23 | 24 | /* Metadata Group */ 25 | @metadataDisplay: inline-block; 26 | @metadataMargin: 1em 0em 0em; 27 | @metadataBackground: @white @subtleGradient; 28 | @metadataBorder: 1px solid @solidBorderColor; 29 | @metadataBorderRadius: 0.25em; 30 | @metadataBoxShadow: 0 1px 1px rgba(0, 0, 0, 0.05); 31 | @metadataPadding: 0.5em 1em; 32 | @metadataColor: rgba(0, 0, 0, 0.6); 33 | 34 | /*------------------- 35 | Variations 36 | --------------------*/ 37 | -------------------------------------------------------------------------------- /front/styles/semantic/src/themes/github/collections/form.variables: -------------------------------------------------------------------------------- 1 | /******************************* 2 | Form 3 | *******************************/ 4 | 5 | /*------------------- 6 | Elements 7 | --------------------*/ 8 | 9 | @inputBackground: #FAFAFA; 10 | @inputBorder: 1px solid #CCCCCC; 11 | @inputBoxShadow: 0 1px 2px rgba(0, 0, 0, 0.075) inset; 12 | @inputBorderRadius: 3px; 13 | 14 | @labelFontWeight: bold; 15 | @labelDistance: 6px; 16 | 17 | /*------------------- 18 | States 19 | --------------------*/ 20 | 21 | @inputFocusBackground: #FFFFFF; 22 | @inputFocusBoxShadow: 23 | 0px 1px 2px rgba(0, 0, 0, 0.075) inset, 24 | 0px 0px 5px rgba(81, 167, 232, 0.5) 25 | ; 26 | @inputFocusBorderColor: #51A7E8; 27 | @inputFocusBorderRadius: @inputBorderRadius; 28 | 29 | /*------------------- 30 | Types 31 | --------------------*/ 32 | 33 | 34 | /*------------------- 35 | Variations 36 | --------------------*/ 37 | 38 | /*------------------- 39 | Groups 40 | --------------------*/ 41 | -------------------------------------------------------------------------------- /front/styles/semantic/src/themes/basic/elements/button.variables: -------------------------------------------------------------------------------- 1 | /*------------------- 2 | Button Variables 3 | --------------------*/ 4 | 5 | /* Button Variables */ 6 | @textTransform: none; 7 | @fontWeight: normal; 8 | @textColor: #333333; 9 | 10 | @primaryColor: #333333; 11 | 12 | @borderRadius: 0.25em; 13 | 14 | @backgroundColor: #EEEEEE; 15 | @backgroundImage: none; 16 | @boxShadow: none; 17 | 18 | @hoverBackgroundColor: #DDDDDD; 19 | @hoverBackgroundImage: none; 20 | @hoverBoxShadow: none; 21 | 22 | @downBackgroundColor: #D0D0D0; 23 | @downBackgroundImage: none; 24 | @downBoxShadow: none; 25 | 26 | @activeBackgroundColor: #CCCCCC; 27 | @activeBackgroundImage: none; 28 | @activeBoxShadow: none; 29 | 30 | @verticalBoxShadow: none; 31 | 32 | @loadingBackgroundColor: #F0F0F0; 33 | 34 | @labeledIconLeftShadow: none; 35 | @labeledIconRightShadow: none; 36 | 37 | @mini: 0.6rem; 38 | @tiny: 0.7rem; 39 | @small: 0.85rem; 40 | @medium: 0.92rem; 41 | @large: 1rem; 42 | @big: 1.125rem; 43 | @huge: 1.25rem; 44 | @massive: 1.3rem; 45 | -------------------------------------------------------------------------------- /front/styles/semantic/src/themes/default/elements/image.variables: -------------------------------------------------------------------------------- 1 | /******************************* 2 | Image 3 | *******************************/ 4 | 5 | /*------------------- 6 | Element 7 | --------------------*/ 8 | 9 | @placeholderColor: transparent; 10 | @roundedBorderRadius: 0.3125em; 11 | 12 | @imageHorizontalMargin: 0.25rem; 13 | @imageVerticalMargin: 0.5rem; 14 | @imageBorder: 1px solid rgba(0, 0, 0, 0.1); 15 | 16 | /*------------------- 17 | Types 18 | --------------------*/ 19 | 20 | /* Avatar */ 21 | @avatarSize: 2em; 22 | @avatarMargin: 0.25em; 23 | 24 | 25 | /*------------------- 26 | Variations 27 | --------------------*/ 28 | 29 | /* Spaced */ 30 | @spacedDistance: 0.5em; 31 | 32 | /* Floated */ 33 | @floatedHorizontalMargin: 1em; 34 | @floatedVerticalMargin: 1em; 35 | 36 | /* Size */ 37 | @miniWidth: 35px; 38 | @tinyWidth: 80px; 39 | @smallWidth: 150px; 40 | @mediumWidth: 300px; 41 | @largeWidth: 450px; 42 | @bigWidth: 600px; 43 | @hugeWidth: 800px; 44 | @massiveWidth: 960px; 45 | -------------------------------------------------------------------------------- /front/styles/semantic/src/themes/github/elements/segment.variables: -------------------------------------------------------------------------------- 1 | /******************************* 2 | Standard 3 | *******************************/ 4 | 5 | /*------------------- 6 | Segment 7 | --------------------*/ 8 | 9 | @segmentBorderWidth: 1px; 10 | @border: 1px solid #D8DEE2; 11 | @boxShadow: 0px 1px 3px rgba(0, 0, 0, 0.075); 12 | 13 | @verticalPadding: 20px; 14 | @horizontalPadding: 20px; 15 | 16 | @borderRadius: 4px; 17 | 18 | /******************************* 19 | Variations 20 | *******************************/ 21 | 22 | 23 | /* Raised */ 24 | @raisedBoxShadow: 0px 1px 3px rgba(0, 0, 0, 0.075); 25 | 26 | /* Colors */ 27 | @coloredBorderSize: 0.5em; 28 | 29 | /* Ordinality */ 30 | @secondaryBackground: #F9F9F9; 31 | @secondaryColor: @textColor; 32 | 33 | @tertiaryBackground: #F0F0F0; 34 | @tertiaryColor: @textColor; 35 | 36 | @secondaryInvertedBackground: #555555; 37 | @secondaryInvertedColor: @textColor; 38 | 39 | @tertiaryInvertedBackground: #333333; 40 | @tertiaryInvertedColor: @textColor; 41 | -------------------------------------------------------------------------------- /front/styles/semantic/src/themes/default/modules/sidebar.variables: -------------------------------------------------------------------------------- 1 | /******************************* 2 | Sidebar 3 | *******************************/ 4 | 5 | /*------------------- 6 | Content 7 | --------------------*/ 8 | 9 | /* Animation */ 10 | @perspective: 1500px; 11 | @duration: 500ms; 12 | @easing: @defaultEasing; 13 | 14 | /* Dimmer */ 15 | @dimmerColor: rgba(0, 0, 0, 0.4); 16 | @dimmerTransition: opacity @duration; 17 | 18 | /* Color below page */ 19 | @canvasBackground: @lightBlack; 20 | 21 | /* Shadow */ 22 | @boxShadow: 0px 0px 20px @borderColor; 23 | @horizontalBoxShadow: @boxShadow; 24 | @verticalBoxShadow: @boxShadow; 25 | 26 | /* Layering */ 27 | @bottomLayer: 1; 28 | @middleLayer: 2; 29 | @fixedLayer: 101; 30 | @topLayer: 102; 31 | @dimmerLayer: 1000; 32 | 33 | /*------------------- 34 | Variations 35 | --------------------*/ 36 | 37 | /* Width */ 38 | @veryThinWidth: 60px; 39 | @thinWidth: 150px; 40 | @width: 260px; 41 | @wideWidth: 350px; 42 | @veryWideWidth: 475px; 43 | 44 | /* Height */ 45 | @height: 36px; 46 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/gin-gonic/gin/render/json.go: -------------------------------------------------------------------------------- 1 | // Copyright 2014 Manu Martinez-Almeida. All rights reserved. 2 | // Use of this source code is governed by a MIT style 3 | // license that can be found in the LICENSE file. 4 | 5 | package render 6 | 7 | import ( 8 | "encoding/json" 9 | "net/http" 10 | ) 11 | 12 | type ( 13 | JSON struct { 14 | Data interface{} 15 | } 16 | 17 | IndentedJSON struct { 18 | Data interface{} 19 | } 20 | ) 21 | 22 | var jsonContentType = []string{"application/json; charset=utf-8"} 23 | 24 | func (r JSON) Render(w http.ResponseWriter) error { 25 | return WriteJSON(w, r.Data) 26 | } 27 | 28 | func (r IndentedJSON) Render(w http.ResponseWriter) error { 29 | writeContentType(w, jsonContentType) 30 | jsonBytes, err := json.MarshalIndent(r.Data, "", " ") 31 | if err != nil { 32 | return err 33 | } 34 | w.Write(jsonBytes) 35 | return nil 36 | } 37 | 38 | func WriteJSON(w http.ResponseWriter, obj interface{}) error { 39 | writeContentType(w, jsonContentType) 40 | return json.NewEncoder(w).Encode(obj) 41 | } 42 | -------------------------------------------------------------------------------- /front/styles/semantic/tasks/build.js: -------------------------------------------------------------------------------- 1 | /******************************* 2 | Build Task 3 | *******************************/ 4 | 5 | var 6 | gulp = require('gulp-help')(require('gulp')), 7 | 8 | // config 9 | config = require('./config/user'), 10 | install = require('./config/project/install') 11 | ; 12 | 13 | // add sub-tasks 14 | if(config.rtl) { 15 | require('./collections/rtl')(gulp); 16 | } 17 | require('./collections/build')(gulp); 18 | 19 | module.exports = function(callback) { 20 | 21 | console.info('Building Semantic'); 22 | 23 | if( !install.isSetup() ) { 24 | console.error('Cannot find semantic.json. Run "gulp install" to set-up Semantic'); 25 | return; 26 | } 27 | 28 | // check for right-to-left (RTL) language 29 | if(config.rtl == 'both') { 30 | gulp.start('build-rtl'); 31 | } 32 | if(config.rtl === true || config.rtl === 'Yes') { 33 | gulp.start('build-rtl'); 34 | return; 35 | } 36 | 37 | gulp.start('build-javascript'); 38 | gulp.start('build-css'); 39 | gulp.start('build-assets'); 40 | 41 | 42 | }; 43 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/lucasb-eyer/go-colorful/colorgens_test.go: -------------------------------------------------------------------------------- 1 | package colorful 2 | 3 | import ( 4 | "math/rand" 5 | "testing" 6 | "time" 7 | ) 8 | 9 | // This is really difficult to test, if you've got a good idea, pull request! 10 | 11 | // Check if it returns all valid colors. 12 | func TestColorValidity(t *testing.T) { 13 | seed := time.Now().UTC().UnixNano() 14 | rand.Seed(seed) 15 | 16 | for i := 0 ; i < 100 ; i++ { 17 | if col := WarmColor() ; !col.IsValid() { 18 | t.Errorf("Warm color %v is not valid! Seed was: %v", col, seed) 19 | } 20 | 21 | if col := FastWarmColor() ; !col.IsValid() { 22 | t.Errorf("Fast warm color %v is not valid! Seed was: %v", col, seed) 23 | } 24 | 25 | if col := HappyColor() ; !col.IsValid() { 26 | t.Errorf("Happy color %v is not valid! Seed was: %v", col, seed) 27 | } 28 | 29 | if col := FastHappyColor() ; !col.IsValid() { 30 | t.Errorf("Fast happy color %v is not valid! Seed was: %v", col, seed) 31 | } 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/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 | -------------------------------------------------------------------------------- /models/post.go: -------------------------------------------------------------------------------- 1 | package models 2 | 3 | import ( 4 | "gopkg.in/mgo.v2/bson" 5 | "time" 6 | ) 7 | 8 | const ( 9 | PostColName = "posts" 10 | ) 11 | 12 | type Post struct { 13 | Id bson.ObjectId `bson:"_id,omitempty" json:"_id"` 14 | Category Category `bson:"category" json:"category"` 15 | Parent *Post `bson:"parent" json:"parent"` 16 | User User `bson:"user" json:"user" binding:"required"` 17 | Title string `bson:"title" json:"title" binding:"required"` 18 | Content string `bson:"content" json:"content" binding:"required"` 19 | Quote string `bson:"quote" json:"quote"` 20 | Image string `bson:"image" json:"image"` 21 | View int `bson:"view" json:"view"` 22 | Reply int `bson:"reply" json:"reply"` 23 | Status int `bson:"status" json:"status"` 24 | LastPost *Post `bson:"last_post" json:"last_post"` 25 | Sticky int `bson:"sticky" json:"sticky"` 26 | CreateAt *time.Time `bson:"create_at" json:"create_at"` 27 | UpdateAt *time.Time `bson:"update_at" json:"update_at"` 28 | } 29 | -------------------------------------------------------------------------------- /cmd/server.go: -------------------------------------------------------------------------------- 1 | package cmd 2 | 3 | import ( 4 | "github.com/gin-gonic/gin" 5 | "github.com/golang-vietnam/forum/helpers/config" 6 | "github.com/golang-vietnam/forum/helpers/database" 7 | "github.com/golang-vietnam/forum/middleware" 8 | "runtime" 9 | "strconv" 10 | ) 11 | 12 | func Start() error { 13 | app := setup() 14 | env := config.GetEnvValue() 15 | return app.Run(env.Server.Host + ":" + strconv.Itoa(env.Server.Port)) 16 | } 17 | 18 | func setup() *gin.Engine { 19 | 20 | runtime.GOMAXPROCS(runtime.NumCPU()) 21 | if _, err := database.InitDb(); err != nil { 22 | panic(err) 23 | } 24 | app := gin.New() 25 | 26 | app.Use(func(c *gin.Context) { 27 | c.Set(config.SecretKey, config.GetSecret()) 28 | c.Next() 29 | }) 30 | 31 | if config.GetEnv() == config.EnvProduction { 32 | app.Use(middleware.Recovery()) 33 | } else { 34 | app.Use(gin.Recovery()) 35 | } 36 | 37 | if config.GetEnv() == config.EnvTesting { 38 | gin.SetMode(gin.TestMode) 39 | } else { 40 | app.Use(gin.Logger()) 41 | } 42 | 43 | app.Use(middleware.ErrorHandler()) 44 | //Set up api v1 45 | routeV1(app) 46 | return app 47 | } 48 | -------------------------------------------------------------------------------- /forum.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "fmt" 5 | "github.com/golang-vietnam/forum/cmd" 6 | "github.com/golang-vietnam/forum/helpers/config" 7 | "os" 8 | ) 9 | 10 | func showUsage() { 11 | fmt.Println("Usage: forum ") 12 | fmt.Println("=============================\n") 13 | fmt.Println("Avaialable commands:") 14 | fmt.Println("'forum' or 'forum start' # run server on develop mode") 15 | fmt.Println("'forum test' # run server on test mode") 16 | fmt.Println("'forum deploy' # run server on production mode") 17 | } 18 | 19 | func main() { 20 | if len(os.Args) != 2 && len(os.Args) != 1 { 21 | fmt.Println("Invalid command usage\n") 22 | showUsage() 23 | os.Exit(1) 24 | } 25 | arg := "start" 26 | if len(os.Args) == 2 { 27 | arg = os.Args[1] 28 | } 29 | config.Loads("./config.yml") 30 | switch arg { 31 | case "start": 32 | config.SetEnv(config.EnvDevelopment) 33 | case "deploy": 34 | config.SetEnv(config.EnvProduction) 35 | case "test": 36 | config.SetEnv(config.EnvTesting) 37 | default: 38 | fmt.Println("Invalid command:", arg) 39 | showUsage() 40 | os.Exit(1) 41 | } 42 | cmd.Start() 43 | } 44 | -------------------------------------------------------------------------------- /handlers/error.go: -------------------------------------------------------------------------------- 1 | package handlers 2 | 3 | import ( 4 | "github.com/gin-gonic/gin" 5 | "github.com/golang-vietnam/forum/helpers/apiErrors" 6 | ) 7 | 8 | type errorHandlerInterface interface { 9 | Error404(c *gin.Context) 10 | List(c *gin.Context) 11 | GetById(c *gin.Context) 12 | } 13 | 14 | type errorHandler struct { 15 | } 16 | 17 | func NewErrorHandler() errorHandlerInterface { 18 | return &errorHandler{} 19 | } 20 | 21 | func (e *errorHandler) Error404(c *gin.Context) { 22 | c.String(404, "Page not found") 23 | } 24 | 25 | func (e *errorHandler) List(c *gin.Context) { 26 | c.JSON(200, gin.H{"errors": apiErrors.ApiErrors}) 27 | } 28 | 29 | func (e *errorHandler) GetById(c *gin.Context) { 30 | var errorId string 31 | if errorId = c.Param("errorId"); errorId == "" { 32 | if errorId = c.Request.URL.Query().Get("errorId"); errorId == "" { 33 | c.Error(apiErrors.ThrowError(apiErrors.ApiErrorIdRequied)) 34 | return 35 | } 36 | } 37 | apiError := apiErrors.FindErrorById(errorId) 38 | if apiError == nil { 39 | c.Error(apiErrors.ThrowError(apiErrors.ApiErrorNotFound)) 40 | return 41 | } 42 | c.JSON(200, apiError) 43 | } 44 | -------------------------------------------------------------------------------- /models/user.go: -------------------------------------------------------------------------------- 1 | package models 2 | 3 | import ( 4 | "gopkg.in/mgo.v2/bson" 5 | "time" 6 | ) 7 | 8 | const ( 9 | NormalUser = 0 10 | EditorUser = 1 11 | Admin = 2 12 | UserColName = "users" 13 | ) 14 | 15 | type User struct { 16 | Id bson.ObjectId `json:"_id" bson:"_id,omitempty"` 17 | Name string `bson:"name" json:"name"` 18 | Email string `bson:"email" json:"email" binding:"required,max=50,min=3,email"` 19 | Password string `bson:"password" json:"password" binding:"required"` 20 | LastActivate *time.Time `bson:"last_activate" json:"last_activate"` 21 | Image string `bson:"image" json:"image"` 22 | Status string `bson:"status" json:"status"` 23 | Role int `bson:"role" json:"role" binding:"max=2,min=0"` 24 | CreateAt *time.Time `bson:"create_at" json:"create_at"` 25 | UpdateAt *time.Time `bson:"update_at" json:"update_at"` 26 | DeleteAt *time.Time `bson:"delete_at" json:"delete_at"` 27 | } 28 | 29 | type UserLogin struct { 30 | Email string `json:"email"` 31 | Password string `json:"password"` 32 | } 33 | -------------------------------------------------------------------------------- /front/webpack/utils/writeStats.js: -------------------------------------------------------------------------------- 1 | var fs = require('fs'), 2 | path = require('path'), 3 | filepath = path.resolve(__dirname, '../../webpack-stats.json'); 4 | 5 | module.exports = function writeStats(stats) { 6 | 7 | var publicPath = this.options.output.publicPath; 8 | 9 | var json = stats.toJson(); 10 | 11 | // get chunks by name and extensions 12 | function getChunks(name, ext) { 13 | ext = ext || 'js'; 14 | var chunk = json.assetsByChunkName[name]; 15 | 16 | // a chunk could be a string or an array, so make sure it is an array 17 | if (!(Array.isArray(chunk))) { 18 | chunk = [chunk]; 19 | } 20 | 21 | return chunk 22 | // filter by extension 23 | .filter(function (chunkName) { 24 | return path.extname(chunkName) === '.' + ext; 25 | }) 26 | .map(function (chunkName) { 27 | return publicPath + chunkName; 28 | }); 29 | } 30 | 31 | var script = getChunks('main', 'js'); 32 | var css = getChunks('main', 'css'); 33 | 34 | var content = { 35 | script: script, 36 | css: css 37 | }; 38 | 39 | fs.writeFileSync(filepath, JSON.stringify(content)); 40 | 41 | }; 42 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/gin-gonic/gin/Godeps/Godeps.json: -------------------------------------------------------------------------------- 1 | { 2 | "ImportPath": "github.com/gin-gonic/gin", 3 | "GoVersion": "go1.4.2", 4 | "Packages": [ 5 | "./..." 6 | ], 7 | "Deps": [ 8 | { 9 | "ImportPath": "github.com/dustin/go-broadcast", 10 | "Rev": "3bdf6d4a7164a50bc19d5f230e2981d87d2584f1" 11 | }, 12 | { 13 | "ImportPath": "github.com/manucorporat/sse", 14 | "Rev": "c142f0f1baea5cef7f98a8a6c222f6134368c1f5" 15 | }, 16 | { 17 | "ImportPath": "github.com/manucorporat/stats", 18 | "Rev": "8f2d6ace262eba462e9beb552382c98be51d807b" 19 | }, 20 | { 21 | "ImportPath": "github.com/mattn/go-colorable", 22 | "Rev": "d67e0b7d1797975196499f79bcc322c08b9f218b" 23 | }, 24 | { 25 | "ImportPath": "github.com/stretchr/testify/assert", 26 | "Comment": "v1.0", 27 | "Rev": "232e8563676cd15c3a36ba5e675ad4312ac4cb11" 28 | }, 29 | { 30 | "ImportPath": "golang.org/x/net/context", 31 | "Rev": "621fff363a1d9ad7fdd0bfa9d80a42881267deb4" 32 | }, 33 | { 34 | "ImportPath": "gopkg.in/bluesuncorp/validator.v5", 35 | "Comment": "v5.4", 36 | "Rev": "07cbdd2e6dfd947b002e83c13b775c7580fab2d5" 37 | } 38 | ] 39 | } 40 | -------------------------------------------------------------------------------- /middleware/loads.go: -------------------------------------------------------------------------------- 1 | package middleware 2 | 3 | import ( 4 | "github.com/gin-gonic/gin" 5 | ) 6 | 7 | type loads struct { 8 | } 9 | 10 | type loadsInterface interface { 11 | LoadUserById() gin.HandlerFunc 12 | LoadCategoryById() gin.HandlerFunc 13 | } 14 | 15 | func NewLoads() loadsInterface { 16 | return &loads{} 17 | } 18 | 19 | func (l *loads) LoadUserById() gin.HandlerFunc { 20 | return func(c *gin.Context) { 21 | userId := c.Param("userId") 22 | if userId == "" { 23 | panic("userId parameter required") 24 | } 25 | user, err := userResource.GetById(userId) 26 | if err != nil { 27 | c.Error(err) 28 | c.Abort() 29 | return 30 | } 31 | 32 | c.Set("userData", user) 33 | c.Next() 34 | } 35 | } 36 | 37 | func (l *loads) LoadCategoryById() gin.HandlerFunc { 38 | return func(c *gin.Context) { 39 | categoryId := c.Param("categoryId") 40 | if categoryId == "" { 41 | panic("categoryId parameter required") 42 | } 43 | category, err := categoryResource.GetById(categoryId) 44 | if err != nil { 45 | c.Error(err) 46 | c.Abort() 47 | return 48 | } 49 | 50 | c.Set("categoryData", category) 51 | c.Next() 52 | } 53 | } 54 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/Sirupsen/logrus/json_formatter.go: -------------------------------------------------------------------------------- 1 | package logrus 2 | 3 | import ( 4 | "encoding/json" 5 | "fmt" 6 | ) 7 | 8 | type JSONFormatter struct { 9 | // TimestampFormat sets the format used for marshaling timestamps. 10 | TimestampFormat string 11 | } 12 | 13 | func (f *JSONFormatter) Format(entry *Entry) ([]byte, error) { 14 | data := make(Fields, len(entry.Data)+3) 15 | for k, v := range entry.Data { 16 | switch v := v.(type) { 17 | case error: 18 | // Otherwise errors are ignored by `encoding/json` 19 | // https://github.com/Sirupsen/logrus/issues/137 20 | data[k] = v.Error() 21 | default: 22 | data[k] = v 23 | } 24 | } 25 | prefixFieldClashes(data) 26 | 27 | timestampFormat := f.TimestampFormat 28 | if timestampFormat == "" { 29 | timestampFormat = DefaultTimestampFormat 30 | } 31 | 32 | data["time"] = entry.Time.Format(timestampFormat) 33 | data["msg"] = entry.Message 34 | data["level"] = entry.Level.String() 35 | 36 | serialized, err := json.Marshal(data) 37 | if err != nil { 38 | return nil, fmt.Errorf("Failed to marshal fields to JSON, %v", err) 39 | } 40 | return append(serialized, '\n'), nil 41 | } 42 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/gin-gonic/gin/fs.go: -------------------------------------------------------------------------------- 1 | package gin 2 | 3 | import ( 4 | "net/http" 5 | "os" 6 | ) 7 | 8 | type ( 9 | onlyfilesFS struct { 10 | fs http.FileSystem 11 | } 12 | neuteredReaddirFile struct { 13 | http.File 14 | } 15 | ) 16 | 17 | // It returns a http.Filesystem that can be used by http.FileServer(). It is used interally 18 | // in router.Static(). 19 | // if listDirectory == true, then it works the same as http.Dir() otherwise it returns 20 | // a filesystem that prevents http.FileServer() to list the directory files. 21 | func Dir(root string, listDirectory bool) http.FileSystem { 22 | fs := http.Dir(root) 23 | if listDirectory { 24 | return fs 25 | } else { 26 | return &onlyfilesFS{fs} 27 | } 28 | } 29 | 30 | // Conforms to http.Filesystem 31 | func (fs onlyfilesFS) Open(name string) (http.File, error) { 32 | f, err := fs.fs.Open(name) 33 | if err != nil { 34 | return nil, err 35 | } 36 | return neuteredReaddirFile{f}, nil 37 | } 38 | 39 | // Overrides the http.File default implementation 40 | func (f neuteredReaddirFile) Readdir(count int) ([]os.FileInfo, error) { 41 | // this disables directory listing 42 | return nil, nil 43 | } 44 | -------------------------------------------------------------------------------- /front/styles/semantic/src/definitions/elements/flag.less: -------------------------------------------------------------------------------- 1 | /*! 2 | * # Semantic UI - Flag 3 | * http://github.com/semantic-org/semantic-ui/ 4 | * 5 | * 6 | * Copyright 2015 Contributors 7 | * Released under the MIT license 8 | * http://opensource.org/licenses/MIT 9 | * 10 | */ 11 | 12 | 13 | /******************************* 14 | Theme 15 | *******************************/ 16 | 17 | @type : 'element'; 18 | @element : 'flag'; 19 | 20 | @import (multiple) '../../theme.config'; 21 | 22 | 23 | /******************************* 24 | Flag 25 | *******************************/ 26 | 27 | i.flag:not(.icon) { 28 | display: inline-block; 29 | 30 | width: @width; 31 | height: @height; 32 | 33 | line-height: @height; 34 | vertical-align: @verticalAlign; 35 | margin: 0em @margin 0em 0em; 36 | 37 | text-decoration: inherit; 38 | 39 | speak: none; 40 | font-smoothing: antialiased; 41 | backface-visibility: hidden; 42 | } 43 | 44 | /* Sprite */ 45 | i.flag:not(.icon):before { 46 | display: inline-block; 47 | content: ''; 48 | background: url(@spritePath) no-repeat 0px 0px; 49 | width: @width; 50 | height: @height; 51 | } 52 | 53 | .loadUIOverrides(); -------------------------------------------------------------------------------- /Godeps/_workspace/src/gopkg.in/natefinch/lumberjack.v2/LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2014 Nate Finch 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. -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/Sirupsen/logrus/LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2014 Simon Eskildsen 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in 13 | all copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | THE SOFTWARE. 22 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/gin-gonic/gin/LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2014 Manuel Martínez-Almeida 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 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/manucorporat/sse/LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2014 Manuel Martínez-Almeida 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 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/gopkg.in/bluesuncorp/validator.v5/LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2015 Dean Karn 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 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/gin-gonic/gin/debug.go: -------------------------------------------------------------------------------- 1 | // Copyright 2014 Manu Martinez-Almeida. All rights reserved. 2 | // Use of this source code is governed by a MIT style 3 | // license that can be found in the LICENSE file. 4 | 5 | package gin 6 | 7 | import "log" 8 | 9 | func init() { 10 | log.SetFlags(0) 11 | } 12 | func IsDebugging() bool { 13 | return ginMode == debugCode 14 | } 15 | 16 | func debugPrintRoute(httpMethod, absolutePath string, handlers HandlersChain) { 17 | if IsDebugging() { 18 | nuHandlers := len(handlers) 19 | handlerName := nameOfFunction(handlers.Last()) 20 | debugPrint("%-5s %-25s --> %s (%d handlers)\n", httpMethod, absolutePath, handlerName, nuHandlers) 21 | } 22 | } 23 | 24 | func debugPrint(format string, values ...interface{}) { 25 | if IsDebugging() { 26 | log.Printf("[GIN-debug] "+format, values...) 27 | } 28 | } 29 | 30 | func debugPrintWARNING() { 31 | debugPrint(`[WARNING] Running in "debug" mode. Switch to "release" mode in production. 32 | - using env: export GIN_MODE=release 33 | - using code: gin.SetMode(gin.ReleaseMode) 34 | 35 | `) 36 | } 37 | 38 | func debugPrintError(err error) { 39 | if err != nil { 40 | debugPrint("[ERROR] %v\n", err) 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /helpers/log/log_template.go: -------------------------------------------------------------------------------- 1 | package log 2 | 3 | //More log example 4 | //https://github.com/Sirupsen/logrus#example 5 | 6 | import ( 7 | log "github.com/Sirupsen/logrus" 8 | "net/http" 9 | ) 10 | 11 | func LogError(r *http.Request, err error, info string, logger *log.Logger) { 12 | logger.WithFields(log.Fields{ 13 | "error": err.Error(), 14 | "method": r.Method, 15 | "url": r.URL.String(), 16 | }).Error(info) 17 | } 18 | 19 | // logger.WithFields(log.MySQLError(err.Error(), eatery.ToString())).Error("Error in Creating Eatery") 20 | func Error(msg string) map[string]interface{} { 21 | return log.Fields{"error": msg} 22 | } 23 | 24 | func Debug(msg string) map[string]interface{} { 25 | return log.Fields{"debug": msg} 26 | } 27 | 28 | func Info(msg string) map[string]interface{} { 29 | return log.Fields{"info": msg} 30 | } 31 | 32 | func Warn(msg string) map[string]interface{} { 33 | return log.Fields{"warn": msg} 34 | } 35 | 36 | //Warning: this will call os.Exit(1) after logged 37 | func Fatal(msg string) map[string]interface{} { 38 | return log.Fields{"fatal": msg} 39 | } 40 | 41 | // Calls panic() after logged 42 | func Panic(msg string) map[string]interface{} { 43 | return log.Fields{"panic": msg} 44 | } 45 | -------------------------------------------------------------------------------- /front/styles/semantic/tasks/config/admin/templates/README.md: -------------------------------------------------------------------------------- 1 | # Semantic {Component} 2 | 3 | This repository contains pre-compiled {component} files using the default themes. This is intended for use in projects that do not need all the bells and whistles of Semantic UI, and want to keep file size to a minimum. 4 | 5 | For the latest changes please see the [Release Notes](https://github.com/Semantic-Org/UI-{Component}/blob/master/RELEASE-NOTES.md) 6 | 7 | If you're looking for the full version of Semantic including all components and build tools [check out the main project repository](https://github.com/Semantic-Org/Semantic-UI/tree/1.0) 8 | 9 | #### To install with Bower 10 | ``` 11 | bower install semantic-ui-{component} 12 | ``` 13 | 14 | #### To install with NPM 15 | ``` 16 | npm install semantic-ui-{component} 17 | ``` 18 | 19 | #### To install with Meteor 20 | ``` 21 | meteor add semantic:ui-{component} 22 | ``` 23 | 24 | 25 | ## Addendum 26 | 27 | This element's definitions (required class names, html structures) are available in the [UI Docs](http://www.semantic-ui.com) 28 | 29 | Please consider checking out [all the benefits to theming](http://www.learnsemantic.com/guide/expert.html) before using these stand-alone releases. 30 | -------------------------------------------------------------------------------- /front/styles/semantic/src/themes/amazon/elements/button.overrides: -------------------------------------------------------------------------------- 1 | .ui.button { 2 | background-image: linear-gradient(center top , #F7F8FA, #E7E9EC) repeat scroll 0 0 rgba(0, 0, 0, 0); 3 | } 4 | 5 | .ui.primary.button { 6 | color: #111111; 7 | border: 1px solid; 8 | border-color: #C59F43 #AA8326 #957321; 9 | } 10 | .ui.primary.button:hover { 11 | border-color: #C59F43 #AA8326 #957321; 12 | color: #111111; 13 | } 14 | 15 | .ui.secondary.button { 16 | border: 1px solid; 17 | border-color: #3D444C #2F353B #2C3137; 18 | } 19 | .ui.secondary.button:hover { 20 | border-color: #32373E #24282D #212429; 21 | } 22 | 23 | 24 | .ui.labeled.icon.buttons .button > .icon, 25 | .ui.labeled.icon.button > .icon { 26 | padding-bottom: 0.48em; 27 | padding-top: 0.48em; 28 | position: absolute; 29 | text-align: center; 30 | width: 2em; 31 | height: 2em; 32 | top: 0.35em; 33 | left: 0.4em; 34 | border-radius: 3px; 35 | } 36 | .ui.right.labeled.icon.buttons .button > .icon, 37 | .ui.right.labeled.icon.button > .icon { 38 | left: auto; 39 | right: 0.4em; 40 | border-radius: 3px; 41 | } 42 | 43 | .ui.basic.labeled.icon.buttons .button > .icon, 44 | .ui.basic.labeled.icon.button > .icon { 45 | padding-top: 0.4em !important; 46 | } -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/Sirupsen/logrus/examples/basic/basic.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "github.com/Sirupsen/logrus" 5 | ) 6 | 7 | var log = logrus.New() 8 | 9 | func init() { 10 | log.Formatter = new(logrus.JSONFormatter) 11 | log.Formatter = new(logrus.TextFormatter) // default 12 | log.Level = logrus.DebugLevel 13 | } 14 | 15 | func main() { 16 | defer func() { 17 | err := recover() 18 | if err != nil { 19 | log.WithFields(logrus.Fields{ 20 | "omg": true, 21 | "err": err, 22 | "number": 100, 23 | }).Fatal("The ice breaks!") 24 | } 25 | }() 26 | 27 | log.WithFields(logrus.Fields{ 28 | "animal": "walrus", 29 | "number": 8, 30 | }).Debug("Started observing beach") 31 | 32 | log.WithFields(logrus.Fields{ 33 | "animal": "walrus", 34 | "size": 10, 35 | }).Info("A group of walrus emerges from the ocean") 36 | 37 | log.WithFields(logrus.Fields{ 38 | "omg": true, 39 | "number": 122, 40 | }).Warn("The group's number increased tremendously!") 41 | 42 | log.WithFields(logrus.Fields{ 43 | "temperature": -4, 44 | }).Debug("Temperature changes") 45 | 46 | log.WithFields(logrus.Fields{ 47 | "animal": "orca", 48 | "size": 9009, 49 | }).Panic("It's over 9000!") 50 | } 51 | --------------------------------------------------------------------------------