Questions tagged [beego]

Beego is an open-source, high-performance, modular, full-stack web framework for the Go programming language.

Beego is a Web framework for rapid development of Go applications. It can be used to develop APIs, web apps and backend services quickly. It is a RESTful framework. It is inspired by Tornado, Sinatra and Flask and has integrated some of Go-specific features such as interfaces and struct embedding.

Features

  • RESTful support
  • MVC architecture
  • Modularity
  • Auto API documents
  • Annotation router
  • Namespace
  • Powerful development tools
  • Full stack for Web & API

Useful links

Official documentation

Github repo

Beego community

Beego Books

285 questions
1
vote
1 answer

How to select sum of specific id in select query MySQL, Beego

I want to get a result like result ------------------------------------------------------- id | uuid | user_id |created_date | amount | name ------------------------------------------------------- 1 | ABC | 1 | 2019/5/1 | 5 …
Elliot
  • 598
  • 6
  • 25
1
vote
1 answer

How to use filter with filterRaw instead raw beego

How to use FilterRaw with Filter instead Raw() This is my query _, err := o.QueryTable("BillDetail").Filter("OriginalID", id).Filter("Date", xxx).Filter("Date", yyy).All(&bills) I want to use filter like rawSeter = o.Raw("SELECT bill_detail FROM…
Elliot
  • 598
  • 6
  • 25
1
vote
1 answer

How to convert string to time.Time

When I try to convert this json to time I gets the error output: HERE------------------------------------ 0001-01-01 00:00:00 +0000 UTC 0001-01-01 00:00:00 +0000 UTC raw: { "tenantID": "9e266e1a750e45f8862e83341a5d0970", "startTime":…
Elliot
  • 598
  • 6
  • 25
1
vote
1 answer

How to read error from HTTP response body

This is how error looks like, I just need "Body" when I try fmt.Println(err) Console Expected HTTP response code [200] when accessing [POST http://controller:8774/v2.1/os-keypairs], but got 409 instead {"conflictingRequest": {"message": "Key pair…
Elliot
  • 598
  • 6
  • 25
1
vote
1 answer

Slice by value of array

How to slice array by id { "id": 1 "status": "available" "snapshot_id" : 1 ... }, { "id": 2 "status" "non available" "snapshot_id" : 0 ... } I didn't take it from Database or something. Need to slice by value like this but…
Elliot
  • 598
  • 6
  • 25
1
vote
1 answer

Beego update & get 1 by ID

I'm absolutely stuck at Beego, update & get. I already done getall, delete, Problem is my ID is the primary key. I convert into a string to equal at the model. How to search from Ticket table by using ID and in model how to take as []array and…
Elliot
  • 598
  • 6
  • 25
1
vote
2 answers

Beego commentsRouter

I'm new at Beego framework. I have experience at Laravel PHP framework and I think Beego is a little bit different I guess. How these commentsRouter generated and what is this for? Is this automatically generates or just have to add by my hand and…
Elliot
  • 598
  • 6
  • 25
1
vote
1 answer

beego api post insert data

First of all. I use postman to POST data. How to take data from the postman key. It works by using this way (in my code I set it by myself). I want to get firstname, lastname, email in form-data. I want to use as below. func InsertOneUser(user…
Elliot
  • 598
  • 6
  • 25
1
vote
0 answers

How can i intergrate Beego Framework with MongoDB

I'm going to build a website with Beego Framework (Golang) , however it works with ORM database by default. I hope that someone can help me intergrate MongoDB with Beego. thank you
1
vote
0 answers

beego binary is installed an absurd path and 'bee new' command doesn't work

I installed almost 10 days ago golang in my Ubuntu 18.04.01 Server Edition: go version go version go1.10.4 linux/amd64 The GOPATH set in .bashrc is this: export GOPATH=$HOME/go export PATH=${PATH}:${GOPATH}/bin and I've been using golang since…
user2315094
  • 759
  • 3
  • 16
  • 29
1
vote
1 answer

How to support HTTPS in Beego

I want my beego website to support https. There are another post Beego and Https. I try that method enable chrome setting chrome://flags/#allow-insecure-localhost or open url with Microsoft Edge. It's still show This site can’t be…
Zhihau Shiu
  • 455
  • 6
  • 19
1
vote
2 answers

Namespace routing

I'm new with Go/Beego framework and I'm trying to understand how namespace routing works. I have the following: func init() { ns := beego.NewNamespace("/v1", beego.NSNamespace("/weather", …
1
vote
1 answer

How to use Casbin to setup dynamic RBAC with Beego?

How do I setup dynamic RBAC using Casbin with Beego? I am using MySQL database via Beego ORM and able to login. However, I want to setup roles and permissions. I also explored gorbac but I am interested to use Casbin.
Prashant
  • 2,005
  • 3
  • 17
  • 24
1
vote
0 answers

Integrated terminal: update environment variable

This is my first day using vscode with beego. I used IntelliJ otherwise, which has a setting to specify custom paths for GOPATH. Vscode does not seem to have this option of allowing multiple GOPATHs, and I thought I could try to append GOPATH…
user1619524
  • 1,484
  • 4
  • 16
  • 26
1
vote
1 answer

Beego - Make use of port number from docker-compose implementaion instead using port number from app.conf

I am trying to run the beego application using docker with the help of docker-compose. I am able access the demo application in http://localhost:8081 URL after running docker-compose up. docker-compose.yml version: "2" services: app: build:…
Sathishkumar Rakkiyasamy
  • 3,509
  • 2
  • 30
  • 34