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
3
votes
1 answer

Send JSON request to test Endpoint API in beego is failing with empty body

I am trying to test the endpoint of my REST API's using beego framework. My test function is below that I am using to send JSON request: func testHTTPJsonResp(url string) string { var jsonStr = []byte(`{"title":"Buy cheese and bread for…
lionelmessi
  • 1,116
  • 2
  • 10
  • 17
3
votes
0 answers

Beego Raw.QueryRows, template

I try to make board paging used beego. So i did like this, In controller var articles []*models.Board board.Data["startCount"] = startCount board.Data["endCount"] = endCount /* Template Test Query num, err := o.QueryTable("board").Filter("Idx",…
GeoLyu
  • 31
  • 2
3
votes
1 answer

Switch from HTTP to HTTPS in Beego

I try to switch from HTTP to HTTPS: func handler(w http.ResponseWriter, req *http.Request) { w.Header().Set("Content-Type", "text/plain") w.Write([]byte("This is an example server.\n")) } func main() { http.HandleFunc("/", handler) …
Iranna Pattar
  • 67
  • 1
  • 7
3
votes
1 answer

Beego: How to redirect to other page on session time out

i am handling session variable by setting time out using globalSessions, _ = session.NewManager("memory", `{"cookieName":"gosessionid", "enableSetCookie,omitempty": true, "gclifetime":5, "maxLifetime": 5, "secure": false, "sessionIDHashFunc":…
Vijay Kumar
  • 597
  • 2
  • 8
  • 27
3
votes
3 answers

Is there any way to create migrations in beego?

I haven't found in documentation anything except "syncdb" command which create database tables from scratch. Is there any command to create and run migrations based on ORM model? Like in django? Add field, change type, etc.
Hepri
  • 217
  • 5
  • 15
3
votes
1 answer

How to make API test files with Beego

I have below test file: package tests import ( "net/http" "net/http/httptest" "testing" "runtime" "path/filepath" _ "hello/routers" _ "github.com/lib/pq" "github.com/astaxie/beego" .…
Passionate Engineer
  • 10,034
  • 26
  • 96
  • 168
3
votes
2 answers

Multiple file upload with beego

How to upload multiple files with beego? The GetFile method returns only first file name. html:
in controller: file,…
Denis K
  • 43
  • 1
  • 5
2
votes
1 answer

Integrating Qor with Beego, getting invalid memory address or nil pointer dereference error

I have a simple web app that is using the Beego framework. I have recently discovered and want to play around with using it along side Beego. I have followed this documentation to integrate Qor with my Beego web app. When deploying, everything goes…
2
votes
1 answer

Beego - I need "context.Context" and not the Beego context

I am trying to write a function that will validate a Google id token. The oauth2 package requires me to pass in the context when creating a new service, like this: package services import ( "context" …
Andy
  • 2,095
  • 1
  • 29
  • 59
2
votes
1 answer

Unable to install Beego framwork with GoLang on mac system

I am new in Go Lang and I am trying to install Beego framework on my mac system. But I am not sure how to install Beego and bee tools. I referred couple of sites but unable to find/resolve actual issue. I am using below version of GO. go version…
Aks 1316
  • 372
  • 5
  • 19
2
votes
1 answer

go get github.com/beego/bee Error install

Using the advised install command go get github.com/beego/bee Results in the below error: github.com/gadelkareem/delve/service/rpc2 go/src/github.com/gadelkareem/delve/service/rpc2/client.go:23:5: cannot use &RPCClient literal (type *RPCClient) as…
2
votes
1 answer

Problems with Beego and Newrelic integration

I'm in the process of creating a web application in Go using Beego (https://beego.me). I have a requirement to capture application monitoring and metering metrics in Newrelic and to be able to view all transactions in Newrelic. I have followed this…
saarthak gupta
  • 173
  • 1
  • 11
2
votes
1 answer

elogrus no active connection found

I'm using elasticsearch, kibana on docker, and Go. time="2019-09-17T09:52:02+08:00" level=panic msg="no active connection found: no Elasticsearch node available" panic: (*logrus.Entry) (0x736fe0,0xc000136150) import…
Elliot
  • 598
  • 6
  • 25
2
votes
1 answer

How to avoid "too many connections"

2019-04-24 15:52:26.526 9818 ERROR oslo_messaging.rpc.server [req-857fec8a-7196-4425-85e4-389e2655a2c3 - - - - -] Exception during message handling: OperationalError: (pymysql.err.OperationalError) (1040, u'Too many connections') (Background on…
Elliot
  • 598
  • 6
  • 25
2
votes
3 answers

missing Location in call to Time.In

When I ues beego/orm to operate postgresql database,there is an error like this "missing Location in call to Time.In". code example type dataTest struct { Id int `pk:"auto"` Data time.Time …
fangtao
  • 31
  • 1
  • 4
1 2
3
18 19