server

package
v0.5.1 Latest Latest
Warning

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

Go to latest
Published: May 1, 2026 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultAddr = "127.0.0.1:4765"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type ProcessResponse

type ProcessResponse struct {
	Decision   risk.Decision `json:"decision"`
	Reason     string        `json:"reason"`
	ReasonCode string        `json:"reason_code"`
	EventID    string        `json:"event_id"`
}

type Server

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

func NewServer

func NewServer(store *sqlite.Store, scorer risk.Scorer) *Server

func OpenDefaultServer

func OpenDefaultServer(dbPath string, scorer risk.Scorer) (*Server, func() error, error)

func (*Server) Handler

func (s *Server) Handler() http.Handler

func (*Server) ListenAndServe

func (s *Server) ListenAndServe(addr string) error

func (*Server) ProcessHookEvent

func (s *Server) ProcessHookEvent(ctx context.Context, event risk.HookEvent) (risk.RiskDecision, error)

Jump to

Keyboard shortcuts

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