ardan

command module
v0.3.5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 12, 2020 License: MIT Imports: 2 Imported by: 0

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

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
cli
cmd
ardan Module
pkg

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL