internal

package
v0.0.0-...-5a665f7 Latest Latest
Warning

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

Go to latest
Published: Dec 13, 2022 License: MIT Imports: 18 Imported by: 0

Documentation

Index

Constants

View Source
const (
	OpenedAction = "opened"
	ClosedAction = "closed"
)

Variables

This section is empty.

Functions

func RegisterGithubWebhookDispatcher

func RegisterGithubWebhookDispatcher(config *githubapp.Config) error

func RegisterHealthCheck

func RegisterHealthCheck()

Types

type AlbHandler

type AlbHandler struct{}

func (*AlbHandler) ProxyWithContext

type Config

type Config struct {
	IntegrationID    int64  `env:"GITHUB_INTEGRATION_ID,required"`
	WebhookSecret    string `env:"GITHUB_WEBHOOK_SECRET,required"`
	PrivateKeyBytes  []byte `env:"GITHUB_PRIVATE_KEY,required"`
	GithubV3Endpoint string `env:"GITHUB_V3_ENDPOINT,required"`
	PrivateKey       string
}

func NewConfig

func NewConfig(ctx context.Context) (*Config, error)

func (*Config) ToGithubAppConfig

func (c *Config) ToGithubAppConfig() *githubapp.Config

type GithubAuthConfig

type GithubAuthConfig struct {
	IntegrationID int64  `yaml:"integration_id" json:"integrationId"`
	WebhookSecret string `yaml:"webhook_secret" json:"webhookSecret"`
	PrivateKey    string `yaml:"private_key" json:"privateKey"`
}

type PRHandler

type PRHandler struct {
	ClientCreator githubapp.ClientCreator
	OpenHandler   *business.PROpenHandler
	CloseHandler  *business.PRCloseHandler
}

func (*PRHandler) Handle

func (h *PRHandler) Handle(ctx context.Context, eventType, deliveryID string, payload []byte) error

func (*PRHandler) Handles

func (h *PRHandler) Handles() []string

Jump to

Keyboard shortcuts

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