Documentation
¶
Index ¶
- type EventParser
- func (p *EventParser) ParseEvent(ctx context.Context, eventType string, rawEvent interface{}) (models.GitHubContext, error)
- func (p *EventParser) ParseIssueCommentEvent(ctx context.Context, event *github.IssueCommentEvent) (models.GitHubContext, error)
- func (p *EventParser) ParseWebhookEvent(ctx context.Context, eventType string, deliveryID string, payload []byte) (models.GitHubContext, error)
- type Parser
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type EventParser ¶
type EventParser struct{}
EventParser 事件解析器
func (*EventParser) ParseEvent ¶
func (p *EventParser) ParseEvent(ctx context.Context, eventType string, rawEvent interface{}) (models.GitHubContext, error)
ParseEvent 解析通用事件(兼容性方法)
func (*EventParser) ParseIssueCommentEvent ¶
func (p *EventParser) ParseIssueCommentEvent(ctx context.Context, event *github.IssueCommentEvent) (models.GitHubContext, error)
ParseIssueCommentEvent 解析Issue评论事件(从原始GitHub事件)
func (*EventParser) ParseWebhookEvent ¶
func (p *EventParser) ParseWebhookEvent( ctx context.Context, eventType string, deliveryID string, payload []byte, ) (models.GitHubContext, error)
ParseWebhookEvent 解析webhook事件为统一的GitHubContext
Click to show internal directories.
Click to hide internal directories.