goal

package module
v0.0.0-...-b8b4108 Latest Latest
Warning

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

Go to latest
Published: May 5, 2023 License: MIT Imports: 13 Imported by: 0

README

Goal

Goal is a lightweight web framework like Django written in Golang.

GoalGenerator can auto-generate golang models from yaml file.

GoalUI is front of Goal.

Install Goal

  • Go 1.20+

  • Repository

$ git clone git@github.com:huoyijie/Goal.git
  • Tidy
$ cd Goal
$ go mod tidy

Run example

  • Create Superuser
$ cd Goal
$ go run ./goalcli -email huoyijie@huoyijie.cn -username huoyijie
  • Default Database (sqlite)
$ ls -l ~/.goal/goal.db
  • Run example goal-web
$ cd Goal/examples
$ go run goal-web.go

Install GoalGenerator

  • Repository
$ go install github.com/huoyijie/GoalGenerator/goalgen@v0.0.29
  • Generate models from yaml files
$ cd Goal
$ goalgen -d yamls

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	AllowOrigins, TrustedProxies []string
	Cookie
}
type Cookie struct {
	Domain string
	Secure bool
}

type Goal

type Goal interface {
	CreateSuper(*auth.User)
	Router() *gin.Engine
}

func New

func New(config Config, db *gorm.DB, models ...any) Goal

Directories

Path Synopsis
auto generated by https://github.com/huoyijie/GoalGenerator/releases/tag/v0.0.37 Please do not change anything in this file.
auto generated by https://github.com/huoyijie/GoalGenerator/releases/tag/v0.0.37 Please do not change anything in this file.
auto generated by https://github.com/huoyijie/GoalGenerator/releases/tag/v0.0.37 Please do not change anything in this file.
auto generated by https://github.com/huoyijie/GoalGenerator/releases/tag/v0.0.37 Please do not change anything in this file.
cdn
auto generated by https://github.com/huoyijie/GoalGenerator/releases/tag/v0.0.37 Please do not change anything in this file.
auto generated by https://github.com/huoyijie/GoalGenerator/releases/tag/v0.0.37 Please do not change anything in this file.
class
auto generated by https://github.com/huoyijie/GoalGenerator/releases/tag/v0.0.37 Please do not change anything in this file.
auto generated by https://github.com/huoyijie/GoalGenerator/releases/tag/v0.0.37 Please do not change anything in this file.
country
auto generated by https://github.com/huoyijie/GoalGenerator/releases/tag/v0.0.37 Please do not change anything in this file.
auto generated by https://github.com/huoyijie/GoalGenerator/releases/tag/v0.0.37 Please do not change anything in this file.
paper
auto generated by https://github.com/huoyijie/GoalGenerator/releases/tag/v0.0.37 Please do not change anything in this file.
auto generated by https://github.com/huoyijie/GoalGenerator/releases/tag/v0.0.37 Please do not change anything in this file.
web
tag

Jump to

Keyboard shortcuts

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