gin

package
v1.6.0 Latest Latest
Warning

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

Go to latest
Published: Jan 7, 2024 License: MIT Imports: 20 Imported by: 0

Documentation

Index

Constants

View Source
const (
	AuthTypeGrpc = "grpc"
	AuthTypeJwt  = "jwt"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type CKey

type CKey string

type Error

type Error struct {
	Message string `json:"error" example:"message"`
}

type Gin

type Gin struct {
	Gin    *g.Engine
	Router *g.RouterGroup
	Jwt    *cj.Jwt
	*Options
}

func New

func New(o *Options) *Gin

func (*Gin) AuthAccessMiddleware added in v1.2.0

func (gin *Gin) AuthAccessMiddleware(rid []int32) g.HandlerFunc

func (*Gin) AuthRefreshMiddleware added in v1.2.0

func (gin *Gin) AuthRefreshMiddleware() g.HandlerFunc

func (*Gin) ErrorResponse

func (gin *Gin) ErrorResponse(c *g.Context, code int, msg string)

type Options added in v0.1.5

type Options struct {
	I18n        *i18n.Bundle
	Mode        string
	Version     string
	BaseUrl     string
	Log         cl.Interface
	AuthType    string
	AuthService *string
	Jwt         *cj.Jwt
	Captcha     *bool
}

type TokenV1 added in v0.1.3

type TokenV1 struct {
	Access  string `json:"access"`
	Refresh string `json:"refresh"`
}

Jump to

Keyboard shortcuts

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