gohan

package module
v1.8.6 Latest Latest
Warning

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

Go to latest
Published: Sep 19, 2026 License: MIT Imports: 7 Imported by: 0

README

Gohan Banner

LTS Npm Commit License Go Reference

About Gohan

Gohan is a web application framework with lightweight, fast, and structured Go fullstack ecosystem integrated with Vue 3, Tailwind CSS, and TanStack Query.

Getting Started

1. Install Go

Follow the official installation guide on the Go Website.

2. Install Node.js & NPM

Follow the official installation guide on the Node.

3. Install Gohan CLI

Install the latest LTS release:

go install github.com/farkhanisturkia/gohan/cmd/gohan@v1.8.6

A command-line tool gohan will be built into $GOPATH/bin/.

4. Basic CLI Usage

Check available commands and options:

gohan -h

Check installed Gohan CLI version:

gohan -v

Create a new Gohan project:

gohan init

Documentation

Index

Constants

View Source
const Version = "v1.8.6"

Framework Meta

Variables

View Source
var BindJSON = gohanHttp.BindJSON

HTTP Request & Response

View Source
var CORSMiddleware = gohanHttp.CORSMiddleware
View Source
var CheckPasswordHash = security.CheckPasswordHash
View Source
var FetchJSON = gohanHttp.FetchJSON
View Source
var GenerateJWT = security.GenerateJWT
View Source
var GenerateRandomToken = security.GenerateRandomToken
View Source
var GetClientIP = utils.GetClientIP

Utils

View Source
var GetConn = database.GetConn
View Source
var GetEnv = config.GetEnv
View Source
var HashPassword = security.HashPassword
View Source
var HashToken = security.HashToken
View Source
var InitEnv = config.InitEnv
View Source
var InitMailWorker = mail.InitMailWorker
View Source
var Marshal = gohanHttp.Marshal
View Source
var NewHTTPClient = gohanHttp.NewHTTPClient
View Source
var ParseTokenName = utils.ParseTokenName
View Source
var PostJSON = gohanHttp.PostJSON
View Source
var QueueEmail = mail.QueueEmail
View Source
var Redis *redis.Client

Redis

View Source
var SendEmail = mail.SendEmail

Mail Export

View Source
var SetRoute = gohanHttp.SetRoute
View Source
var TimeoutMiddleware = gohanHttp.TimeoutMiddleware
View Source
var Unmarshal = gohanHttp.Unmarshal
View Source
var ValidateJWT = security.ValidateJWT

Functions

func InitRedis added in v1.5.7

func InitRedis(host, port, password string)

Types

type DB

type DB = database.DB

Database

type Env

type Env = config.Env

Config

type HTTPClient added in v1.5.0

type HTTPClient = gohanHttp.HTTPClient

HTTP Client (External API Requests)

type JWTClaims

type JWTClaims = security.JWTClaims

Security

type Pagination added in v1.5.9

type Pagination = database.Pagination

type RawQuery added in v1.4.5

type RawQuery = database.RawQuery

type Router

type Router = gohanHttp.Router

HTTP Router & Server

type Tx added in v1.4.5

type Tx = database.Tx

Directories

Path Synopsis
cmd
gohan command
internal

Jump to

Keyboard shortcuts

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