app

package
v0.21.0 Latest Latest
Warning

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

Go to latest
Published: Feb 18, 2026 License: MIT Imports: 18 Imported by: 0

Documentation

Overview

Package app provides the core application logic for the GitHub bot. Coordinates webhook processing, Okta sync, and PR compliance checks.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type App

type App struct {
	Config       *config.Config
	Logger       *slog.Logger
	GitHubClient domain.GitHubClient
	OktaClient   domain.OktaClient
	Notifier     domain.Notifier
	// contains filtered or unexported fields
}

App is the main application instance containing all clients and configuration. depends on domain interfaces, not concrete implementations.

func NewApp added in v0.21.0

func NewApp(ctx context.Context, cfg *config.Config, logger *slog.Logger) (*App, error)

NewApp creates a new App instance with configured clients (composition root). concrete implementations are instantiated here and wired as domain interfaces. this is the single shared factory used by all entry points.

func (*App) GetStatus

func (a *App) GetStatus() StatusResponse

GetStatus returns current application status and enabled features.

func (*App) Handler added in v0.21.0

func (a *App) Handler() http.Handler

Handler returns the HTTP handler for the application. this is the single entry point for all HTTP request processing. both the server and lambda entry points feed requests into this handler.

type ScheduledEvent

type ScheduledEvent struct {
	Action string          `json:"action"`
	Data   json.RawMessage `json:"data,omitempty"`
}

ScheduledEvent represents a generic scheduled event.

type StatusResponse

type StatusResponse struct {
	Status            string `json:"status"`
	GitHubConfigured  bool   `json:"github_configured"`
	OktaSyncEnabled   bool   `json:"okta_sync_enabled"`
	PRComplianceCheck bool   `json:"pr_compliance_check"`
	SlackEnabled      bool   `json:"slack_enabled"`
}

StatusResponse contains application status and feature flags.

Jump to

Keyboard shortcuts

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