gin

package
v0.1.4 Latest Latest
Warning

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

Go to latest
Published: Jul 25, 2022 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CKey

type CKey string

type Error

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

type Gin

type Gin struct {
	L logger.Interface
	E *g.Engine
	R *g.RouterGroup
	// contains filtered or unexported fields
}

func New

func New(m string, v string, b string, l logger.Interface, rdb *redis.Client, at int, rt int) *Gin

func (*Gin) AuthAccess added in v0.1.1

func (ge *Gin) AuthAccess() g.HandlerFunc

func (*Gin) AuthRefresh added in v0.1.1

func (ge *Gin) AuthRefresh() g.HandlerFunc

func (*Gin) ErrorResponse

func (ge *Gin) ErrorResponse(c *g.Context, code int, msg string, iss string, err error)

func (*Gin) NewSession added in v0.1.3

func (a *Gin) NewSession(uid uint) (TokenV1, error)

func (*Gin) RefreshSession added in v0.1.3

func (a *Gin) RefreshSession(uid uint, key string, req string) (TokenV1, error)

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