Help us shape the future of Go! Take the 2026 Go Developer Survey

web

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: Oct 6, 2026 License: MIT Imports: 29 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AnnotatedLine

type AnnotatedLine struct {
	Number          int
	Text            string
	HighestSeverity schema.Severity
	FindingRefs     []FindingRef
	ElementID       string
}

type AnnotatedSpec

type AnnotatedSpec struct {
	Lines []AnnotatedLine
}

func BuildAnnotatedSpec

func BuildAnnotatedSpec(specText string, report *schema.Report, threshold schema.Severity) (AnnotatedSpec, error)

type Config

type Config struct {
	Addr              string
	RequestTimeout    time.Duration
	MaxUploadBytes    int64
	MaxRetainedChecks int
	RetainedCheckTTL  time.Duration
}

func DefaultConfig

func DefaultConfig() Config

func (Config) Validate

func (c Config) Validate() error

type FindingRef

type FindingRef struct {
	ID          string
	Kind        string
	Severity    schema.Severity
	Title       string
	IsPreflight bool
}

type Server

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

func NewServer

func NewServer(config Config) (*Server, error)

func NewServerWithChecker

func NewServerWithChecker(config Config, c checker) (*Server, error)

func (*Server) Handler

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

type Store

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

func NewStore

func NewStore(max int, ttl time.Duration) (*Store, error)

func (*Store) Get

func (s *Store) Get(id string) (*StoredCheck, bool)

func (*Store) Save

func (s *Store) Save(result *app.CheckResult) (*StoredCheck, error)

func (*Store) StartJanitor

func (s *Store) StartJanitor(ctx context.Context, interval time.Duration)

func (*Store) SweepExpired

func (s *Store) SweepExpired()

type StoredCheck

type StoredCheck struct {
	ID        string
	CreatedAt time.Time
	ExpiresAt time.Time
	Result    *app.CheckResult
}

Jump to

Keyboard shortcuts

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