Versions in this module Expand all Collapse all v0 v0.8.0 Oct 29, 2025 Changes in this version type CalculateResponse + SecondsInState map[string]int type ProgressUpdate + SecondsInState map[string]int type SampleResponse + SecondsInState map[string]int v0.7.0 Oct 27, 2025 Changes in this version + const DefaultRateBurst + const DefaultRateLimit + var ErrAccessDenied = errors.New("access denied") + var ErrInvalidRequest = errors.New("invalid request") + var ErrNotFound = errors.New("not found") + var ErrRateLimit = errors.New("rate limit exceeded") + var ErrTimeout = errors.New("request timeout") + func IsAccessError(err error) bool + func NewAccessError(statusCode int, message string) error + type AccessError struct + Message string + StatusCode int + func (e *AccessError) Error() string + type CalculateRequest struct + Config *cost.Config + URL string + type CalculateResponse struct + Breakdown cost.Breakdown + Commit string + Timestamp time.Time + type OrgSampleRequest struct + Config *cost.Config + Days int + Org string + SampleSize int + type ProgressUpdate struct + Commit string + Error string + Owner string + PR int + Progress string + R2RCallout bool + Repo string + Result *cost.ExtrapolatedBreakdown + Type string + type RepoSampleRequest struct + Config *cost.Config + Days int + Owner string + Repo string + SampleSize int + type SampleResponse struct + Commit string + Extrapolated cost.ExtrapolatedBreakdown + Timestamp time.Time + type Server struct + func New() *Server + func (*Server) Shutdown() + func (s *Server) ServeHTTP(w http.ResponseWriter, r *http.Request) + func (s *Server) SetCORSConfig(origins string, allowAll bool) + func (s *Server) SetCommit(commit string) + func (s *Server) SetDataSource(source string) + func (s *Server) SetR2RCallout(enabled bool) + func (s *Server) SetRateLimit(rps int, burst int) + func (s *Server) SetTokenValidation(appID string, keyFile string) error