github

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jun 11, 2026 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Overview

github 包提供 GitHub 平台的连接器实现

该包实现了与 GitHub 平台的集成,包括 Webhook 事件接收、 OAuth 认证流程、用户信息同步等功能。

Index

Constants

View Source
const (
	EventTypeIssueComment = "issue_comment"
	EventTypePullRequest  = "pull_request"
	EventTypePush         = "push"
)

Variables

This section is empty.

Functions

func RegisterGitHubRoutes

func RegisterGitHubRoutes(r gin.IRouter, cfg config.GithubAppConfig, publisher eventbus.Publisher, db *gorm.DB, authSvc *auth.ThirdPartyAuthService)

RegisterGitHubRoutes 注册GitHub路由(便捷函数)

Types

type Connector

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

Connector implements the GitHub connector interface.

func NewConnector

func NewConnector(cfg config.GithubAppConfig, publisher eventbus.Publisher, db *gorm.DB, authSvc *auth.ThirdPartyAuthService) *Connector

NewConnector creates a new GitHub connector instance.

func (Connector) ChannelCode

func (Connector) ChannelCode() string

ChannelCode returns the channel identifier for GitHub.

func (*Connector) RegisterRoutes

func (c *Connector) RegisterRoutes(r gin.IRouter)

RegisterRoutes registers GitHub webhook and auth endpoints.

Jump to

Keyboard shortcuts

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