github.com/teamlint/ardan
go get github.com/teamlint/ardan

github.com/teamlint/ardan

web development framework

by teamlint

v0.3.5 (see all)License:MIT
go get github.com/teamlint/ardan
Readme

ardan

web rapid development framework

Deps

  • Gin HTTP web framework
  • XORM ORM Framework
  • Container Dependency injection container

CLI

ardan cli tools

Install

Go get

go get github.com/teamlint/ardan

OR Git

git clone git@github.com:teamlint/ardan.git
cd ardan
go install # OR: task install

Usages

Init Project

initial application project layout & infrastructure codes

ardan [global options] init [all|query|repository|service|controller]

mkdir myproject
cd myproject
go mod init <name>
ardan -s -dc <db-conn> init all

Project layout

Run

task run

OR

cd cmd/server
go run main.go

Model Sync

Create model file.

Write model file in app/model/tom.go

package model

import (
    "time"
)

//ardan:sync
//ardan:gen 
// Tom test model
type Tom struct{
    ID         string     `xorm:"not null pk unique CHAR(20) 'id'" json:"id"`
    Username   string     `xorm:"not null index VARCHAR(100)" json:"username"`
    CreatedAt  time.Time  `xorm:"not null created TIMESTAMPZ" json:"created_at"`
}
ardan -dc <db-conn> sync 

view database

have fun!.

Generate Tools

genrate model query/repository/service/controller codes.

ardan gen [all|query|repository|service|controller]

ardan gen all

TODO

GitHub Stars

12

LAST COMMIT

7mos ago

MAINTAINERS

0

CONTRIBUTORS

3

OPEN ISSUES

0

OPEN PRs

0
VersionTagPublished
v0.3.6-0.20211014090413-5fd45a51215d
6mos ago
v0.2.7
1yr ago
v0.2.1
1yr ago
v0.2.4
1yr ago
No alternatives found
No tutorials found
Add a tutorial