Documentation
¶
Index ¶
- Variables
- func AfterAuthorize(r *Config)
- func Authorize(c *gin.Context)
- func BeforeAuthorize(r *Config)
- func BoolUpdate(g Github) bool
- func Cors(c *gin.Context)
- func Default[T comparable](a *T, b T)
- func Failed(c *gin.Context, code int, message string, data ...any)
- func FetchFile(c *gin.Context)
- func GetBranches(c *gin.Context)
- func GetComments(c *gin.Context)
- func GetPosts(c *gin.Context)
- func GetToken(c *gin.Context)
- func GetUser(c *gin.Context) *user.User
- func IndexUpdate(g Github) error
- func Register(c *gin.Context)
- func Run(r *Config)
- func Submit(c *gin.Context)
- func Succeed(c *gin.Context, data ...any)
- type Config
- type Github
- func (g Github) Check() bool
- func (g *Github) GetLastCommit() error
- func (g Github) Index() string
- func (g Github) NoIndex() bool
- func (g Github) ToAPI() string
- func (g Github) ToData() []byte
- func (g Github) ToGIT() string
- func (g Github) ToReference() plumbing.ReferenceName
- func (g Github) Version() string
- func (g Github) Write() error
- type Monitor
- type Network
- type Resource
- type Runtime
Constants ¶
This section is empty.
Variables ¶
View Source
var ( GIT = "https://github.com/" API = "https://api.github.com/repos/" )
View Source
var Monitors = make(monitors)
Functions ¶
Types ¶
type Config ¶
type Config struct {
// gin 启动模式
Debug bool
// 资源
Resource
// 网络
Network
// 运行
Runtime
// 主页 git 链接 只需填写前三项
Github
// 其他参数
Map gin.H
// 引擎
*gin.Engine
}
webhook 配置
type Github ¶
type Monitor ¶
type Monitor struct {
Score float64
Uids utils.Set[string]
Posts map[*data.Post]float64
// contains filtered or unexported fields
}
博文检查器
Click to show internal directories.
Click to hide internal directories.