Documentation
¶
Index ¶
- Variables
- type ActivityQueryRepository
- type ActivityQueryService
- type AgentProviderRepository
- type AgentProviderService
- type AgentRepository
- type AgentRunQueryRepository
- type AgentRunQueryService
- type AgentService
- type DashboardQueryRepository
- type DashboardQueryService
- type MachineHealthCollector
- type MachineRepository
- type MachineService
- type MachineTester
- type Option
- type OrganizationRepository
- type OrganizationService
- type ProjectRepoRepository
- type ProjectRepoService
- type ProjectRepository
- type ProjectService
- type ProjectStatusBootstrapper
- type ProjectStatusBootstrapperFunc
- type Repository
- type Service
- type Services
- type UsageQueryRepository
- type UsageQueryService
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrNotFound = domain.ErrNotFound ErrConflict = domain.ErrConflict ErrInvalidInput = domain.ErrInvalidInput ErrMachineProbeFailed = errors.New("machine probe failed") )
Functions ¶
This section is empty.
Types ¶
type ActivityQueryRepository ¶
type ActivityQueryRepository interface {
ListActivityEvents(ctx context.Context, input domain.ListActivityEvents) ([]domain.ActivityEvent, error)
}
type ActivityQueryService ¶
type ActivityQueryService interface {
ListActivityEvents(ctx context.Context, input domain.ListActivityEvents) ([]domain.ActivityEvent, error)
}
type AgentProviderRepository ¶
type AgentProviderRepository interface {
ListAgentProviders(ctx context.Context, organizationID uuid.UUID) ([]domain.AgentProvider, error)
CreateAgentProvider(ctx context.Context, input domain.CreateAgentProvider) (domain.AgentProvider, error)
GetAgentProvider(ctx context.Context, id uuid.UUID) (domain.AgentProvider, error)
UpdateAgentProvider(ctx context.Context, input domain.UpdateAgentProvider) (domain.AgentProvider, error)
}
type AgentProviderService ¶
type AgentProviderService interface {
ListAgentProviders(ctx context.Context, organizationID uuid.UUID) ([]domain.AgentProvider, error)
CreateAgentProvider(ctx context.Context, input domain.CreateAgentProvider) (domain.AgentProvider, error)
GetAgentProvider(ctx context.Context, id uuid.UUID) (domain.AgentProvider, error)
UpdateAgentProvider(ctx context.Context, input domain.UpdateAgentProvider) (domain.AgentProvider, error)
}
type AgentRepository ¶
type AgentRepository interface {
ListAgents(ctx context.Context, projectID uuid.UUID) ([]domain.Agent, error)
CreateAgent(ctx context.Context, input domain.CreateAgent) (domain.Agent, error)
GetAgent(ctx context.Context, id uuid.UUID) (domain.Agent, error)
UpdateAgent(ctx context.Context, input domain.UpdateAgent) (domain.Agent, error)
UpdateAgentRuntimeControlState(ctx context.Context, input domain.UpdateAgentRuntimeControlState) (domain.Agent, error)
DeleteAgent(ctx context.Context, id uuid.UUID) (domain.Agent, error)
}
type AgentRunQueryRepository ¶
type AgentRunQueryRepository interface {
ListAgentRuns(ctx context.Context, projectID uuid.UUID) ([]domain.AgentRun, error)
GetAgentRun(ctx context.Context, id uuid.UUID) (domain.AgentRun, error)
ListAgentOutput(ctx context.Context, input domain.ListAgentOutput) ([]domain.AgentOutputEntry, error)
ListAgentSteps(ctx context.Context, input domain.ListAgentSteps) ([]domain.AgentStepEntry, error)
ListAgentRunTraceEntries(ctx context.Context, input domain.ListAgentRunTraceEntries) ([]domain.AgentTraceEntry, error)
ListAgentRunStepEntries(ctx context.Context, input domain.ListAgentRunStepEntries) ([]domain.AgentStepEntry, error)
}
type AgentRunQueryService ¶
type AgentRunQueryService interface {
ListAgentRuns(ctx context.Context, projectID uuid.UUID) ([]domain.AgentRun, error)
GetAgentRun(ctx context.Context, id uuid.UUID) (domain.AgentRun, error)
ListAgentOutput(ctx context.Context, input domain.ListAgentOutput) ([]domain.AgentOutputEntry, error)
ListAgentSteps(ctx context.Context, input domain.ListAgentSteps) ([]domain.AgentStepEntry, error)
ListAgentRunTraceEntries(ctx context.Context, input domain.ListAgentRunTraceEntries) ([]domain.AgentTraceEntry, error)
ListAgentRunStepEntries(ctx context.Context, input domain.ListAgentRunStepEntries) ([]domain.AgentStepEntry, error)
GetAgentRunTranscriptPage(ctx context.Context, input domain.ListAgentRunTranscriptPage) (domain.AgentRunTranscriptPage, error)
}
type AgentService ¶
type AgentService interface {
ListAgents(ctx context.Context, projectID uuid.UUID) ([]domain.Agent, error)
CreateAgent(ctx context.Context, input domain.CreateAgent) (domain.Agent, error)
GetAgent(ctx context.Context, id uuid.UUID) (domain.Agent, error)
UpdateAgent(ctx context.Context, input domain.UpdateAgent) (domain.Agent, error)
RequestAgentPause(ctx context.Context, id uuid.UUID) (domain.Agent, error)
RequestAgentResume(ctx context.Context, id uuid.UUID) (domain.Agent, error)
RetireAgent(ctx context.Context, id uuid.UUID) (domain.Agent, error)
DeleteAgent(ctx context.Context, id uuid.UUID) (domain.Agent, error)
}
type DashboardQueryService ¶
type MachineHealthCollector ¶
type MachineHealthCollector interface {
CollectReachability(ctx context.Context, machine domain.Machine) (domain.MachineReachability, error)
CollectSystemResources(ctx context.Context, machine domain.Machine) (domain.MachineSystemResources, error)
CollectGPUResources(ctx context.Context, machine domain.Machine) (domain.MachineGPUResources, error)
CollectAgentEnvironment(ctx context.Context, machine domain.Machine) (domain.MachineAgentEnvironment, error)
CollectFullAudit(ctx context.Context, machine domain.Machine) (domain.MachineFullAudit, error)
}
type MachineRepository ¶
type MachineRepository interface {
ListMachines(ctx context.Context, organizationID uuid.UUID) ([]domain.Machine, error)
CreateMachine(ctx context.Context, input domain.CreateMachine) (domain.Machine, error)
GetMachine(ctx context.Context, id uuid.UUID) (domain.Machine, error)
UpdateMachine(ctx context.Context, input domain.UpdateMachine) (domain.Machine, error)
DeleteMachine(ctx context.Context, id uuid.UUID) (domain.Machine, error)
RecordMachineProbe(ctx context.Context, input domain.RecordMachineProbe) error
}
type MachineService ¶
type MachineService interface {
ListMachines(ctx context.Context, organizationID uuid.UUID) ([]domain.Machine, error)
CreateMachine(ctx context.Context, input domain.CreateMachine) (domain.Machine, error)
GetMachine(ctx context.Context, id uuid.UUID) (domain.Machine, error)
UpdateMachine(ctx context.Context, input domain.UpdateMachine) (domain.Machine, error)
DeleteMachine(ctx context.Context, id uuid.UUID) (domain.Machine, error)
TestMachineConnection(ctx context.Context, id uuid.UUID) (domain.Machine, domain.MachineProbe, error)
RefreshMachineHealth(ctx context.Context, id uuid.UUID) (domain.Machine, error)
}
type MachineTester ¶
type Option ¶
type Option func(*service)
func WithMachineHealthCollector ¶
func WithMachineHealthCollector(collector MachineHealthCollector) Option
func WithProjectStatusBootstrapper ¶
func WithProjectStatusBootstrapper(bootstrapper ProjectStatusBootstrapper) Option
type OrganizationRepository ¶
type OrganizationRepository interface {
ListOrganizations(ctx context.Context) ([]domain.Organization, error)
CreateOrganization(ctx context.Context, input domain.CreateOrganization) (domain.Organization, error)
GetOrganization(ctx context.Context, id uuid.UUID) (domain.Organization, error)
UpdateOrganization(ctx context.Context, input domain.UpdateOrganization) (domain.Organization, error)
ArchiveOrganization(ctx context.Context, id uuid.UUID) (domain.Organization, error)
}
type OrganizationService ¶
type OrganizationService interface {
ListOrganizations(ctx context.Context) ([]domain.Organization, error)
CreateOrganization(ctx context.Context, input domain.CreateOrganization) (domain.Organization, error)
GetOrganization(ctx context.Context, id uuid.UUID) (domain.Organization, error)
UpdateOrganization(ctx context.Context, input domain.UpdateOrganization) (domain.Organization, error)
ArchiveOrganization(ctx context.Context, id uuid.UUID) (domain.Organization, error)
}
type ProjectRepoRepository ¶
type ProjectRepoRepository interface {
ListProjectRepos(ctx context.Context, projectID uuid.UUID) ([]domain.ProjectRepo, error)
CreateProjectRepo(ctx context.Context, input domain.CreateProjectRepo) (domain.ProjectRepo, error)
GetProjectRepo(ctx context.Context, projectID uuid.UUID, id uuid.UUID) (domain.ProjectRepo, error)
UpdateProjectRepo(ctx context.Context, input domain.UpdateProjectRepo) (domain.ProjectRepo, error)
DeleteProjectRepo(ctx context.Context, projectID uuid.UUID, id uuid.UUID) (domain.ProjectRepo, error)
ListTicketRepoScopes(ctx context.Context, projectID uuid.UUID, ticketID uuid.UUID) ([]domain.TicketRepoScope, error)
CreateTicketRepoScope(ctx context.Context, input domain.CreateTicketRepoScope) (domain.TicketRepoScope, error)
GetTicketRepoScope(ctx context.Context, projectID uuid.UUID, ticketID uuid.UUID, id uuid.UUID) (domain.TicketRepoScope, error)
UpdateTicketRepoScope(ctx context.Context, input domain.UpdateTicketRepoScope) (domain.TicketRepoScope, error)
DeleteTicketRepoScope(ctx context.Context, projectID uuid.UUID, ticketID uuid.UUID, id uuid.UUID) (domain.TicketRepoScope, error)
}
type ProjectRepoService ¶
type ProjectRepoService interface {
ListProjectRepos(ctx context.Context, projectID uuid.UUID) ([]domain.ProjectRepo, error)
CreateProjectRepo(ctx context.Context, input domain.CreateProjectRepo) (domain.ProjectRepo, error)
GetProjectRepo(ctx context.Context, projectID uuid.UUID, id uuid.UUID) (domain.ProjectRepo, error)
UpdateProjectRepo(ctx context.Context, input domain.UpdateProjectRepo) (domain.ProjectRepo, error)
DeleteProjectRepo(ctx context.Context, projectID uuid.UUID, id uuid.UUID) (domain.ProjectRepo, error)
ListTicketRepoScopes(ctx context.Context, projectID uuid.UUID, ticketID uuid.UUID) ([]domain.TicketRepoScope, error)
CreateTicketRepoScope(ctx context.Context, input domain.CreateTicketRepoScope) (domain.TicketRepoScope, error)
GetTicketRepoScope(ctx context.Context, projectID uuid.UUID, ticketID uuid.UUID, id uuid.UUID) (domain.TicketRepoScope, error)
UpdateTicketRepoScope(ctx context.Context, input domain.UpdateTicketRepoScope) (domain.TicketRepoScope, error)
DeleteTicketRepoScope(ctx context.Context, projectID uuid.UUID, ticketID uuid.UUID, id uuid.UUID) (domain.TicketRepoScope, error)
}
type ProjectRepository ¶
type ProjectRepository interface {
ListProjects(ctx context.Context, organizationID uuid.UUID) ([]domain.Project, error)
CreateProject(ctx context.Context, input domain.CreateProject) (domain.Project, error)
GetProject(ctx context.Context, id uuid.UUID) (domain.Project, error)
UpdateProject(ctx context.Context, input domain.UpdateProject) (domain.Project, error)
ArchiveProject(ctx context.Context, id uuid.UUID) (domain.Project, error)
}
type ProjectService ¶
type ProjectService interface {
ListProjects(ctx context.Context, organizationID uuid.UUID) ([]domain.Project, error)
CreateProject(ctx context.Context, input domain.CreateProject) (domain.Project, error)
GetProject(ctx context.Context, id uuid.UUID) (domain.Project, error)
UpdateProject(ctx context.Context, input domain.UpdateProject) (domain.Project, error)
ArchiveProject(ctx context.Context, id uuid.UUID) (domain.Project, error)
}
type ProjectStatusBootstrapperFunc ¶
func (ProjectStatusBootstrapperFunc) BootstrapProjectStatuses ¶
type Repository ¶
type Repository interface {
OrganizationRepository
MachineRepository
ProjectRepository
ProjectRepoRepository
DashboardQueryRepository
UsageQueryRepository
AgentProviderRepository
AgentRepository
AgentRunQueryRepository
ActivityQueryRepository
}
Repository is a transitional compatibility facade over the narrower catalog repositories.
type Service ¶
type Service interface {
OrganizationService
MachineService
ProjectService
ProjectRepoService
DashboardQueryService
UsageQueryService
AgentProviderService
AgentService
AgentRunQueryService
ActivityQueryService
}
Service is a transitional compatibility facade over the narrower catalog services. New production consumers should depend on the smallest subdomain interface they need.
func New ¶
func New(repo Repository, resolver provider.ExecutableResolver, machineTester MachineTester, opts ...Option) Service
type Services ¶
type Services struct {
OrganizationService
MachineService
ProjectService
ProjectRepoService
DashboardQueryService
UsageQueryService
AgentProviderService
AgentService
AgentRunQueryService
ActivityQueryService
}
Services exposes the narrow catalog capabilities as an embeddable aggregate for composition roots.
func SplitServices ¶
type UsageQueryRepository ¶
type UsageQueryRepository interface {
GetOrganizationTokenUsage(ctx context.Context, input domain.GetOrganizationTokenUsage) (domain.OrganizationTokenUsageReport, error)
GetProjectTokenUsage(ctx context.Context, input domain.GetProjectTokenUsage) (domain.ProjectTokenUsageReport, error)
}
type UsageQueryService ¶
type UsageQueryService interface {
GetOrganizationTokenUsage(ctx context.Context, input domain.GetOrganizationTokenUsage) (domain.OrganizationTokenUsageReport, error)
GetProjectTokenUsage(ctx context.Context, input domain.GetProjectTokenUsage) (domain.ProjectTokenUsageReport, error)
}
Click to show internal directories.
Click to hide internal directories.