Skip to content

Commit

Permalink
refactor: 拆分为 middlewares 和 plugins
Browse files Browse the repository at this point in the history
  • Loading branch information
caixw committed Mar 8, 2024
1 parent bb53254 commit 5804585
Show file tree
Hide file tree
Showing 33 changed files with 19 additions and 10 deletions.
23 changes: 16 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,25 +1,34 @@
# middleware
# use

[![Go](https://github.com/issue9/middleware/actions/workflows/go.yml/badge.svg)](https://github.com/issue9/middleware/actions/workflows/go.yml)
[![Go](https://github.com/issue9/use/actions/workflows/go.yml/badge.svg)](https://github.com/issue9/use/actions/workflows/go.yml)
[![license](https://img.shields.io/badge/license-MIT-brightgreen.svg?style=flat)](https://opensource.org/licenses/MIT)
[![codecov](https://codecov.io/gh/issue9/middleware/branch/master/graph/badge.svg)](https://codecov.io/gh/issue9/middleware)
[![PkgGoDev](https://pkg.go.dev/badge/github.com/issue9/middleware/v6)](https://pkg.go.dev/github.com/issue9/middleware/v6)
[![Go version](https://img.shields.io/github/go-mod/go-version/issue9/middleware)](https://golang.org)
[![codecov](https://codecov.io/gh/issue9/use/branch/master/graph/badge.svg)](https://codecov.io/gh/issue9/use)
[![PkgGoDev](https://pkg.go.dev/badge/github.com/issue9/use/v6)](https://pkg.go.dev/github.com/issue9/use/v6)
[![Go version](https://img.shields.io/github/go-mod/go-version/issue9/use)](https://golang.org)

[web](https://pkg.go.dev/github.com/issue9/web) 适用的中间件;

## 插件

插件位于 plugins 目录之下:

- access 客户端访问记录;
- health 接口状态的监测;

## 中间件

中间件位于 middlewares 目录之下:

- auth/basic 基本的验证处理;
- auth/jwt JSON Web Tokens 中间件;
- auth/session session 管理;
- health 接口状态的监测;
- acl/ratelimit x-rate-limit 的相关实现;
- acl/iplist 黑白名单;

## 安装

```shell
go get github.com/issue9/middleware/v6
go get github.com/issue9/use/v6
```

## 版权
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module github.com/issue9/middleware/v6
module github.com/issue9/use/v6

require (
github.com/golang-jwt/jwt/v5 v5.2.1
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions middleware.go → use.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
//go:generate web locale -l=und -m -f=yaml ./
//go:generate web update-locale -src=./locales/und.yaml -dest=./locales/zh-Hans.yaml

// Package middleware 适用 [web] 的一些中间件实现
// Package use 适用 [web] 的中间件和插件
//
// [web]: https://github.com/issue9/web
package middleware
package use

0 comments on commit 5804585

Please sign in to comment.