mirror of https://github.com/veypi/OneAuth.git
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
29 lines
769 B
Go
29 lines
769 B
Go
|
1 week ago
|
//
|
||
|
|
// Copyright (C) 2024 veypi <i@veypi.com>
|
||
|
|
// 2025-03-04 16:08:06
|
||
|
|
// Distributed under terms of the MIT license.
|
||
|
|
//
|
||
|
|
|
||
|
|
package providers
|
||
|
|
|
||
|
|
import (
|
||
|
|
"github.com/veypi/vigo"
|
||
|
|
)
|
||
|
|
|
||
|
|
var Router = vigo.NewRouter()
|
||
|
|
|
||
|
|
func init() {
|
||
|
|
// 获取所有提供商(包括禁用的,管理员用)
|
||
|
|
Router.Get("/", "获取 OAuth 提供商列表", list)
|
||
|
|
// 获取单个提供商详情
|
||
|
|
Router.Get("/{code}", "获取 OAuth 提供商详情", get)
|
||
|
|
// 创建新提供商
|
||
|
|
Router.Post("/", "创建 OAuth 提供商", create)
|
||
|
|
// 更新提供商
|
||
|
|
Router.Patch("/{code}", "更新 OAuth 提供商", update)
|
||
|
|
// 删除提供商(仅非内置)
|
||
|
|
Router.Delete("/{code}", "删除 OAuth 提供商", del)
|
||
|
|
// 获取内置模板
|
||
|
|
Router.Get("/templates", "获取内置 OAuth 模板", templates)
|
||
|
|
}
|