gim

package module
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Oct 14, 2021 License: MIT Imports: 7 Imported by: 7

README

gim

gin modular

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Controller

type Controller struct {
	Path   string
	Routes []*Route
}

type GimError added in v0.0.3

type GimError struct {
	Message string
	Body    interface{}
	Status  int
}

func NewGimError added in v0.0.3

func NewGimError(status int, body interface{}, props ...string) *GimError

func (*GimError) Error added in v0.0.3

func (e *GimError) Error() string

type ImmediateJobConfig added in v0.0.3

type ImmediateJobConfig struct {
	Blocking bool
}

type Job added in v0.0.3

type Job struct {
	Cron      string
	Immediate *ImmediateJobConfig
	Run       func(app context.Context)
}

type Middleware

type Middleware struct {
	Use gin.HandlerFunc
}

type Module

type Module struct {
	Imports     []*Module
	Middlewares []*Middleware
	Controllers []*Controller
	Providers   []*Provider
	Jobs        []*Job
}

func (*Module) Bootstrap

func (m *Module) Bootstrap() *gin.Engine

type Provider added in v0.0.3

type Provider struct {
	Provide interface{}
	Factory func(app context.Context) interface{}
	Key     interface{}
}

type ProviderArgs added in v0.1.0

type ProviderArgs struct {
}

type Route

type Route struct {
	Endpoint string
	Get      RouteFunc
	Post     RouteFunc
	Put      RouteFunc
	Delete   RouteFunc
}

type RouteArgs added in v0.1.0

type RouteArgs struct {
	Ctx *gin.Context
	App context.Context
}

type RouteFunc added in v0.0.2

type RouteFunc func(args RouteArgs) interface{}

Directories

Path Synopsis
examples

Jump to

Keyboard shortcuts

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