util

package
v0.0.0-...-5b1f977 Latest Latest
Warning

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

Go to latest
Published: Mar 2, 2023 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckOut

func CheckOut(repository *git.Repository, option *git.CheckoutOptions) error

func CheckOutHash

func CheckOutHash(repository *git.Repository, hash string) error

func ClearToken

func ClearToken(c *gin.Context, doman ...string) error

func CloneRepo

func CloneRepo(path string, option *git.CloneOptions, ctx context.Context) (*git.Repository, error)

func CreateToken

func CreateToken(claims jwt.MapClaims, key string, tmout time.Duration) (string, error)

func GetLogs

func GetLogs(repository *git.Repository, option *git.LogOptions) (object.CommitIter, error)

func GetLogsHash

func GetLogsHash(repository *git.Repository, hash string) (object.CommitIter, error)

func GetToken

func GetToken(c *gin.Context, key string) jwt.MapClaims

func GetTokens

func GetTokens(s string, key string) jwt.MapClaims

func GinRegController

func GinRegController(g *gin.Engine, gc GinController)

func GinReqParseJson

func GinReqParseJson(fn interface{}) gin.HandlerFunc

func MidAccessAllowFun

func MidAccessAllowFun(c *gin.Context)

func SetToken

func SetToken(c *gin.Context, p jwt.MapClaims, key string, rem bool, doman ...string) (string, error)

Types

type GinController

type GinController interface {
	GetPath() string // 必须"/"开头
	Routes(g gin.IRoutes)
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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