Skip to content

Commit

Permalink
first commit
Browse files Browse the repository at this point in the history
  • Loading branch information
tangtanglove committed Jan 18, 2023
0 parents commit 5244508
Show file tree
Hide file tree
Showing 297 changed files with 24,922 additions and 0 deletions.
22 changes: 22 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
root = true

[*]
charset = utf-8
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true

[{*.go,Makefile,.gitmodules,go.mod,go.sum}]
indent_style = tab

[*.md]
indent_style = tab
trim_trailing_whitespace = false

[*.{yml,yaml,json}]
indent_style = space
indent_size = 2

[*.{js,jsx,ts,tsx,css,less,sass,scss,vue,py}]
indent_style = space
indent_size = 4
30 changes: 30 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# Mac OS X files
.DS_Store

# Binaries for programs and plugins
*.exe
*.exe~
*.dll
*.so
*.dylib

# Test binary, build with `go test -c`
*.test

# Output of the go coverage tool, specifically when used with LiteIDE
*.out

# Project-local glide cache, RE: https://github.com/Masterminds/glide/issues/736
.glide/

# Dependency directories (remove the comment below to include it)
vendor/

# Air tool tmp file
tmp/

# Install lock file
install.lock

# examples web site static files
examples/*/website/
1 change: 1 addition & 0 deletions LICENSE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Hacker license!
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# note: call scripts from /scripts
31 changes: 31 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
## 介绍
QuarkGO 是一个基于golang的低代码工具;它提供的丰富组件,能帮助您使用很少的代码就能搭建出功能完善的应用系统。

## 系统特性

**内置功能**
* 管理员管理
* 用户管理
* 权限系统
* 菜单管理
* 系统配置
* 操作日志
* 附件管理

**内置组件**
* Layout组件
* Container组件
* Card组件
* Table组件
* Form组件
* Show组件
* TabForm组件
* ...

## 技术支持
为了避免打扰作者日常工作,你可以在Github上提交 [Issues](https://github.com/quarkcms/quark-go/issues)

相关教程,你可以查看 [在线文档](http://www.quarkcms.com/quark-go/)

## License
QuarkGo is licensed under The MIT License (MIT).
Empty file added cmd/quark/.keep
Empty file.
9 changes: 9 additions & 0 deletions examples/fiberadmin/.air.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Config file for [Air](https://github.com/cosmtrek/air) in TOML format

# Working directory
# . or absolute path, please note that the directories following must be under root.
root = "."
tmp_dir = "tmp"

[build]
exclude_dir = ["assets", "tmp", "vendor", "website"]
35 changes: 35 additions & 0 deletions examples/fiberadmin/main.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
package main

import (
"github.com/gofiber/fiber/v2"
"github.com/quarkcms/quark-go/pkg/adapter/fiberadapter"
"github.com/quarkcms/quark-go/pkg/app/handler/admin"
"github.com/quarkcms/quark-go/pkg/builder"
"gorm.io/driver/mysql"
"gorm.io/gorm"
)

func main() {
app := fiber.New()

// 数据库配置信息
dsn := "root:Bc5HQFJc4bLjZCcC@tcp(127.0.0.1:3306)/quarkgo?charset=utf8&parseTime=True&loc=Local"

// 配置资源
config := &builder.Config{
AppKey: "123456",
Providers: admin.Providers,
DBConfig: &builder.DBConfig{
Dialector: mysql.Open(dsn),
Opts: &gorm.Config{},
},
}

// 创建对象
b := builder.New(config)

// 适配fiber
fiberadapter.Adapter(b, app)

app.Listen(":3000")
}
9 changes: 9 additions & 0 deletions examples/ginadmin/.air.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Config file for [Air](https://github.com/cosmtrek/air) in TOML format

# Working directory
# . or absolute path, please note that the directories following must be under root.
root = "."
tmp_dir = "tmp"

[build]
exclude_dir = ["assets", "tmp", "vendor", "website"]
9 changes: 9 additions & 0 deletions examples/hertzadmin/.air.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Config file for [Air](https://github.com/cosmtrek/air) in TOML format

# Working directory
# . or absolute path, please note that the directories following must be under root.
root = "."
tmp_dir = "tmp"

[build]
exclude_dir = ["assets", "tmp", "vendor", "website"]
37 changes: 37 additions & 0 deletions examples/hertzadmin/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
*.o
*.a
*.so
_obj
_test
*.[568vq]
[568vq].out
*.cgo1.go
*.cgo2.c
_cgo_defun.c
_cgo_gotypes.go
_cgo_export.*
_testmain.go
*.exe
*.exe~
*.test
*.prof
*.rar
*.zip
*.gz
*.psd
*.bmd
*.cfg
*.pptx
*.log
*nohup.out
*settings.pyc
*.sublime-project
*.sublime-workspace
!.gitkeep
.DS_Store
/.idea
/.vscode
/output
*.local.yml
dumped_hertz_remote_config.json

3 changes: 3 additions & 0 deletions examples/hertzadmin/.hz
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
// Code generated by hz. DO NOT EDIT.

hz version: v0.4.0
10 changes: 10 additions & 0 deletions examples/hertzadmin/biz/handler/providers.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
package handler

import (
"github.com/quarkcms/quark-go/examples/hertzadmin/biz/handler/resources"
)

// 注册服务
var Providers = []interface{}{
&resources.Demo{},
}
37 changes: 37 additions & 0 deletions examples/hertzadmin/biz/handler/resources/demo.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
package resources

import (
"github.com/quarkcms/quark-go/pkg/builder"
"github.com/quarkcms/quark-go/pkg/builder/template/adminresource"
)

type Demo struct {
adminresource.Template
}

// 初始化
func (p *Demo) Init() interface{} {

// 初始化模板
p.TemplateInit()

return p
}

// 字段
func (p *Demo) Fields(request *builder.Request) []interface{} {

return []interface{}{}
}

// 搜索
func (p *Demo) Searches(request *builder.Request) []interface{} {

return []interface{}{}
}

// 行为
func (p *Demo) Actions(request *builder.Request) []interface{} {

return []interface{}{}
}
12 changes: 12 additions & 0 deletions examples/hertzadmin/biz/router/register.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

22 changes: 22 additions & 0 deletions examples/hertzadmin/main.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

44 changes: 44 additions & 0 deletions examples/hertzadmin/router.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 16 additions & 0 deletions examples/hertzadmin/router_gen.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 5244508

Please sign in to comment.