router

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Jul 14, 2022 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

RouterSet 路由providers

Functions

func AuthRoter

func AuthRoter(r *gin.Engine, auth *AuthApi)

注册需要jwt认证路由

func NewRouter

func NewRouter(
	cfg *conf.Config, logger *zap.Logger,
	noAuth *NoAuthApi, auth *AuthApi,
) *gin.Engine

NewRouter 创建gin路由

Types

type AuthApi

type AuthApi struct {
	// contains filtered or unexported fields
}

NoAuthApi 需要jwt认证的api

func NewAuthApi

func NewAuthApi(
	cfg *conf.Config, jwtSrv *lib.JwtService,
	userH *api.UserHandler,
) *AuthApi

NewAuthApi 创建AuthApi

type NoAuthApi

type NoAuthApi struct {
	// contains filtered or unexported fields
}

NoAuthApi 不需要jwt认证的api

func NewNoAuthApi

func NewNoAuthApi(authH *api.AuthHandler) *NoAuthApi

NewNoAuthApi 创建NoAuthApi

Jump to

Keyboard shortcuts

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