ardan

command module
v0.2.7 Latest Latest
Warning

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

Go to latest
Published: Jun 2, 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
Usages
Init Project
mkdir myproject
cd myproject
go mod init <name>
ardan -s -dc <db-conn> init  
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 -all 
// 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
ardan gen 

TODO

  • new command (controller/middleware/module...)

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

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