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

insights

package
v0.2.50 Latest Latest
Warning

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

Go to latest
Published: Oct 21, 2026 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Attention

type Attention struct {
	ID             string `json:"id"`
	RepositoryID   string `json:"repository_id"`
	RepositoryName string `json:"repository_name"`
	Title          string `json:"title"`
	Severity       string `json:"severity"`
	State          string `json:"state"`
	AgeSeconds     int64  `json:"age_seconds"`
	AssignedTo     string `json:"assigned_to,omitempty"`
}

type Audit

type Audit struct {
	ID           string          `json:"id"`
	ActorID      string          `json:"actor_id"`
	Action       string          `json:"action"`
	ObjectID     string          `json:"object_id"`
	RequestID    string          `json:"request_id"`
	RepositoryID string          `json:"repository_id,omitempty"`
	CreatedAt    time.Time       `json:"created_at"`
	Data         json.RawMessage `json:"data"`
}

type Capacity

type Capacity struct {
	QueuedJobs    int64 `json:"queued_jobs"`
	RunningJobs   int64 `json:"running_jobs"`
	ActivePools   int64 `json:"active_pools"`
	ActiveRunners int64 `json:"active_runners"`
	ReservedMicro int64 `json:"reserved_micro_usd"`
}

type EnvironmentHealth added in v0.2.38

type EnvironmentHealth struct {
	RepositoryID string     `json:"repository_id"`
	Repository   string     `json:"repository"`
	Environment  string     `json:"environment"`
	Kind         string     `json:"kind"`
	OperationID  string     `json:"operation_id"`
	State        string     `json:"state"`
	ObservedAt   *time.Time `json:"observed_at,omitempty"`
	ExpiresAt    *time.Time `json:"expires_at,omitempty"`
}

type Filter

type Filter struct {
	RepositoryID, TeamID, Recipe, Provider, ConnectionID, State, ActorID, Action, Cursor string
	Since, Until                                                                         *time.Time
	Limit                                                                                int
}

type Overview

type Overview struct {
	Counts    OverviewCounts  `json:"counts"`
	Attention []Attention     `json:"attention"`
	Portfolio []PortfolioRow  `json:"portfolio"`
	Capacity  Capacity        `json:"capacity"`
	Trend     []OverviewDay   `json:"trend"`
	Severity  []SeverityCount `json:"severity"`
}

type OverviewCounts

type OverviewCounts struct {
	NeedsDecision          int64 `json:"needs_decision"`
	Running                int64 `json:"running"`
	ReadyForReview         int64 `json:"ready_for_review"`
	Blocked                int64 `json:"blocked"`
	VerifiedDeployments    int64 `json:"verified_deployments"`
	AccessibleRepositories int64 `json:"accessible_repositories"`
	StaleRepositories      int64 `json:"stale_repositories"`
	QueuedJobs             int64 `json:"queued_jobs"`
}

type OverviewDay

type OverviewDay struct {
	Day         string `json:"day"`
	Findings    int64  `json:"findings"`
	Runs        int64  `json:"runs"`
	Merges      int64  `json:"merges"`
	Deployments int64  `json:"deployments"`
}

type PolicyResolver

type PolicyResolver func(context.Context, pgx.Tx, string, string) (policy.Resolved, error)

type PortfolioRow

type PortfolioRow struct {
	RepositoryID   string     `json:"repository_id"`
	RepositoryName string     `json:"repository_name"`
	Provider       string     `json:"provider"`
	Accessible     bool       `json:"accessible"`
	OpenFindings   int64      `json:"open_findings"`
	OpenChanges    int64      `json:"open_changes"`
	Blocked        int64      `json:"blocked"`
	LastSyncedAt   *time.Time `json:"last_synced_at"`
	Blocker        string     `json:"blocker,omitempty"`
}

type Service

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

func New

func New(identity *auth.Service) *Service

func (*Service) Audit

func (s *Service) Audit(ctx context.Context, session auth.Session, org string, f Filter) (domain.Page[Audit], error)

func (*Service) Health added in v0.2.38

func (s *Service) Health(ctx context.Context, session auth.Session, org string, f Filter) (domain.Page[EnvironmentHealth], error)

func (*Service) Overview

func (s *Service) Overview(ctx context.Context, session auth.Session, org string) (Overview, error)

func (*Service) Setup

func (s *Service) Setup(ctx context.Context, session auth.Session, org string, resolve PolicyResolver, repairReady, builtin bool, selected ...string) (Setup, error)

func (*Service) Usage

func (s *Service) Usage(ctx context.Context, session auth.Session, org string, f Filter) (domain.Page[Usage], error)

func (*Service) UsageSeries

func (s *Service) UsageSeries(ctx context.Context, session auth.Session, org string, f Filter) (UsageSeries, error)

func (*Service) UsageSummary

func (s *Service) UsageSummary(ctx context.Context, session auth.Session, org string, f Filter) (Summary, error)

func (*Service) Work added in v0.2.38

func (s *Service) Work(ctx context.Context, session auth.Session, org string, f Filter) (domain.Page[attention.Work], error)

type Setup

type Setup struct {
	Steps []SetupStep `json:"steps"`
}

type SetupStep

type SetupStep struct {
	ID           string `json:"id"`
	Done         bool   `json:"done"`
	Reason       string `json:"reason,omitempty"`
	RepositoryID string `json:"repository_id,omitempty"`
	ConnectionID string `json:"connection_id,omitempty"`
}

type SeverityCount

type SeverityCount struct {
	Severity string `json:"severity"`
	Count    int64  `json:"count"`
}

type Summary

type Summary struct {
	Records               int64         `json:"records"`
	Settled               int64         `json:"settled"`
	Unknown               int64         `json:"unknown"`
	Reserved              int64         `json:"reserved"`
	Dispatched            int64         `json:"dispatched"`
	Cancelled             int64         `json:"cancelled"`
	EstimatedCostMicroUSD int64         `json:"estimated_cost_micro_usd"`
	KnownTokens           int64         `json:"known_tokens"`
	UnknownMaximum        budget.Amount `json:"unknown_maximum"`
	Held                  budget.Amount `json:"held"`
}

type Usage

type Usage struct {
	Reservation    budget.Reservation `json:"reservation"`
	Provider       string             `json:"provider"`
	Recipe         string             `json:"recipe"`
	RepositoryName string             `json:"repository_name"`
}

type UsageDay

type UsageDay struct {
	Day      string `json:"day"`
	MicroUSD int64  `json:"micro_usd"`
	Tokens   int64  `json:"tokens"`
	Records  int64  `json:"records"`
}

type UsageProvider

type UsageProvider struct {
	Provider string `json:"provider"`
	MicroUSD int64  `json:"micro_usd"`
	Tokens   int64  `json:"tokens"`
	Records  int64  `json:"records"`
}

type UsageSeries

type UsageSeries struct {
	Days      []UsageDay      `json:"days"`
	Providers []UsageProvider `json:"providers"`
}

Jump to

Keyboard shortcuts

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