Code Monkey home page Code Monkey logo

bee's Introduction

Hi there 👋. You're probably interested in my open source work, so here is a quick summary.

📫 Please open a GitHub issue if you want to discuss something related to an open source project of mine.

Otherwise you can reach me at [email protected]

Last Update: 2022-04-22

Open Source

visitor badge

bee's People

Contributors

astaxie avatar codeskyblue avatar eryx avatar fanngyuan avatar miraclesu avatar odiel avatar pnelson avatar slene avatar unknwon avatar wangxian avatar xuyuanp avatar zackshen avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

bee's Issues

关于beego框架的orm问题

@astaxie
关于beego框架中数据表的一对多关系有个问题想请教一下,具体如下:

我现在有两张表,policy和rule,policy和rule时间是一对多的关系,model的定义如下:

type Policy struct {
Id int orm:"pk;auto"
Rules []*Rule orm:"reverse(many)"
ServiceInstanceId string orm:"size(64)"
Name string orm:"size(64)"
MinInstance int
MaxInstance int
StatisticWin int
BreachDur int
CooldownOut int
CooldownIn int
LastScaleoutTime time.Time
LastScaleinTime time.Time
}

type Rule struct {
Id int orm:"pk;auto"
Policy *Policy orm:"rel(fk)"
MetricType string orm:"size(16);"
ScaleOutThreshold int
ScaleOutUnit int
ScaleInThreshold int
ScaleInUnit int
}

现在http请求的body体的格式如下:

​{
"Rules": [
{
"MtricType": "CPU",
"ScaleOutThreshold": 80,
"ScaleOutUnit": 1,
"ScaleInThreshold": 30,
"ScaleInUnit": 5
},
{
"MtricType": "Memory",
"ScaleOutThreshold": 80,
"ScaleOutUnit": 1,
"ScaleInThreshold": 30,
"ScaleInUnit": 1
}
],
"ServiceInstanceId": "fb41bf4a-89c6-4a73-9f3b-1f8957215a52",
"Name": "policy_1",
"MinInstance": 1,
"MaxInstance": 5,
"StatisticWin": 120,
"BreachDur": 300,
"CooldownOut": 300,
"CooldownIn": 300
}

现在我要解析body体,​err := json.Unmarshal(this.Ctx.Input.RequestBody, &policy),最后执行policy的save,但是rule却没有更新,我看到policy和rule之间定义一对多的关系时,使用的是结构体指针的数组和结构体的指针,与body的格式不一样,请问如果我想解析出的policy带有rule的指针数组,并且save policy的时候不仅更新policy表,还更新相应的rule表,请问这样可以实现吗?​

Can't create application outside of GOPATH

I would like to create an api application based on beego, but the bee reports the following error:

$ bee api westfoto
can't create application outside of GOPATH /Users/Red/Projects/gocode
you first should cd $GOPATH/src then use create

I'm sure i'm in the $GOPATH/src dictionary. so please look into the code please.

请问liteide和go eclipse提示找不到包,为什么?

我的GOROOT C:\GO

GOPATH : C:\Go\src\itfanr C:\Go\src\itfanr\pro1

C:\Go\src\github.com\astaxie\beego

C:\Go\src\itfanr\pro1 我的main.go在这个目录

在main.go中 "github.com/astaxie/beego" liteide和goeclipse都提示错误,根本无法编译,但是直接go run是可以的。。。

Option to pack all dependencies

Hello,

just an idea:

maybe you can add option to pack all/most dependencies (folders: static and views) into one executable file.
bee pack [appname]

Some packages to check:

There also could be option to additionally pack app.conf file
or
if beego could gain ability to have two config files (app.conf and dev.conf) it could pack app.conf file by default.

Best regards,
Dobrosław Żybort

执行main.go时出错

刚接触golang,如果是比较2B的问题,还请见谅!

cd到代码目录,执行

go run main.go

得到以下错误:

# command-line-arguments
./main.go:59: undefined: cmdCreate
./main.go:60: undefined: cmdStart

请问有哪个步骤遗漏了?谢谢~

建议增加数据库相关工具

有时候测试环境,mysql用户名密码太复杂了,每次进入mysql命令行都要看到密码输入,可以增加一个像django 中在项目目录执行python manage.py dbshell命令即可直接进入mysql等sql终端。

bee Windows环境下路径错误

go get github.com/astaxie/bee

之后应该是路径原因创建了

C:\go\bin; 目录,并将 bee.exe拷贝到了该目录

应该是在处理环境变量时有点问题

bee install error

github.com/astaxie/bee

/usr/lib/go/src/pkg/github.com/astaxie/bee/pack.go:264: undefined: tar.FileInfoHeader
/usr/lib/go/src/pkg/github.com/astaxie/bee/pack.go:362: cw.Flush undefined (type *gzip.Writer has no field or method Flush)

why?

Can't create project in $GOPATH/src sub-folder

Hello,

I would like to create new project in $GOPATH/src/bitbucket.org/matrixik sub-folder so that I could import controllers folder with
"bitbucket.org/matrixik/beehello/controllers"
instead of
"beehello/controllers"

Now I see error:

D:\Golibs\my\src\bitbucket.org\matrixik>bee create beehello
can't create application outside of GOPATH
you first should `cd $GOPATH/src` then use create

It's not not very high priority, after all I can create app in $GOPATH/src, copy it to desired folder and update imports by hand.

Best regards,
Dobrosław Żybort

bee not doing hot updates

I'm having no trouble getting my first project up and running with beego, and I just started to test bee for the hot update feature. But I seem to be having problems, where it does not restart the process, or auto rebuild. Maybe I am not doing correctly...

Platform: OSX

$ cd /path/to/my/src/myProject
$ ~/bin/bee start /path/to/my/src/myProject/myProject
/path/to/my/src/myProject/controllers
/path/to/my/src/myProject/models
start autobuild
build success
start /path/to/my/src/myProject/myProject

That launches the process and I can successfully use the exposed GET endpoints. But when I change any source code, I don't see it say it is rebuilding and restarting the process. And when I send it a SIGHUP, like in your README example, it simply kills the myProject process, leaving bee still running. I can no longer hit the GET endpoints anymore.

Am I running bee start correctly? Should it be run from within the project directory, and passed the full path to the executable?

bee 在win下的使用

1.需要添加环境变量 gopath —— D:\Go\bin(安装完bee之后,bee.exe所在目录),不添加这个环境变量,就算是cd到当前目录也不可用。
2.需要新建目录:D:\Go\bin\src
然后就可以用了

bee test/go test时beego.AppConfig失效

运行bee test app/go test时发现beego.AppConfig.String()无法加载参数(conf/app.conf中已存在该节点和值),而运行bee run app时程序又能正常加载运行,不知是怎么回事.
qq20131128162649

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.