It has example of using middleware in beego: getting user info form token, checking verified email and role "admin"
git clone git@github.com:Artyem-Y/beego-crud-api.gitsudo apt-get update
sudo apt-get install postgresqlsudo -u postgres createdb crud-apisudo -u postgres psql -d crud-apiCREATE USER admin WITH PASSWORD '111';
\qDB_SERVER = 127.0.0.1
DB_PORT = 5432
DB_NAME = crud-api
DB_USER = admin
DB_USER_PASS = 111
REFRESH_SECRET=
ACCESS_SECRET=
# add app url for local version
APP_URL=http://localhost:8080
# it's necessary to register mailgun account, get api key and create domain for getting mails
MAILGUN_API_KEY=
MAILGUN_DOMAIN=
# email for users notification
NOTIFICATION_EMAIL=development:
driver: postgres
open: user=admin dbname=crud-api password=111 host=127.0.0.1 port=5432 sslmode=disablehttps://bitbucket.org/liamstask/goose/src/master/
go get bitbucket.org/liamstask/goose/cmd/goose#### To install all dependencies of a Golang project or golang projects recursively with
#### the go get command, change directory into the project root and simply run::
```bash
go get .goose upgoose downgoose -env local upbee run -downdoc=true -gendoc=true
or
bee run