Documentation
¶
Index ¶
- Constants
- Variables
- func NewRetryToken() string
- type ActivityRepository
- type AddCommentInput
- type AddDependencyInput
- type AddExternalLinkInput
- type AppliedUsage
- type ArchivedListInput
- type ArchivedListRawInput
- type ArchivedListResult
- type CommandRepository
- type Comment
- type CommentRepository
- type CommentRevision
- type CreateInput
- type CreateRepoScopeInput
- type DeferredLifecycleHook
- type DeleteCommentResult
- type DeleteDependencyResult
- type DeleteExternalLinkResult
- type Dependencies
- type Dependency
- type DependencyType
- type ExternalLink
- type ExternalLinkType
- type HookWorkspace
- type LifecycleHookRuntimeData
- type LinkRepository
- type ListInput
- type Optional
- type PersistedUsageResult
- type PickupDiagnosis
- type PickupDiagnosisAgent
- type PickupDiagnosisBlockedTicket
- type PickupDiagnosisCapacity
- type PickupDiagnosisCapacityBucket
- type PickupDiagnosisProvider
- type PickupDiagnosisReason
- type PickupDiagnosisReasonCode
- type PickupDiagnosisReasonSeverity
- type PickupDiagnosisRetry
- type PickupDiagnosisState
- type PickupDiagnosisStatusCapacity
- type PickupDiagnosisWorkflow
- type Priority
- type QueryRepository
- type RecordActivityEventInput
- type RecordUsageInput
- type RecordUsageResult
- type Repository
- type ResumeRetryInput
- type RunLifecycleHookInput
- type RuntimeRepository
- type Service
- func (s *Service) AddComment(ctx context.Context, input AddCommentInput) (Comment, error)
- func (s *Service) AddDependency(ctx context.Context, input AddDependencyInput) (Dependency, error)
- func (s *Service) AddExternalLink(ctx context.Context, input AddExternalLinkInput) (ExternalLink, error)
- func (s *Service) ConfigureActivityEmitter(emitter *activitysvc.Emitter)
- func (s *Service) ConfigurePlatformEnvironment(apiURL string, agentPlatform ticketHookAgentPlatform)
- func (s *Service) ConfigureSSHPool(pool ticketHookSSHPool)
- func (s *Service) ConfigureTransportResolver(resolver ticketHookTransportResolver)
- func (s *Service) Create(ctx context.Context, input CreateInput) (Ticket, error)
- func (s *Service) Get(ctx context.Context, ticketID uuid.UUID) (Ticket, error)
- func (s *Service) GetPickupDiagnosis(ctx context.Context, ticketID uuid.UUID) (PickupDiagnosis, error)
- func (s *Service) List(ctx context.Context, input ListInput) ([]Ticket, error)
- func (s *Service) ListArchived(ctx context.Context, input ArchivedListInput) (ArchivedListResult, error)
- func (s *Service) ListCommentRevisions(ctx context.Context, ticketID uuid.UUID, commentID uuid.UUID) ([]CommentRevision, error)
- func (s *Service) ListComments(ctx context.Context, ticketID uuid.UUID) ([]Comment, error)
- func (s *Service) RecordActivityEvent(ctx context.Context, input RecordActivityEventInput) (catalogdomain.ActivityEvent, error)
- func (s *Service) RecordUsage(ctx context.Context, input RecordUsageInput, metrics provider.MetricsProvider) (RecordUsageResult, error)
- func (s *Service) RemoveComment(ctx context.Context, ticketID uuid.UUID, commentID uuid.UUID) (DeleteCommentResult, error)
- func (s *Service) RemoveDependency(ctx context.Context, ticketID uuid.UUID, dependencyID uuid.UUID) (DeleteDependencyResult, error)
- func (s *Service) RemoveExternalLink(ctx context.Context, ticketID uuid.UUID, externalLinkID uuid.UUID) (DeleteExternalLinkResult, error)
- func (s *Service) ResumeRetry(ctx context.Context, input ResumeRetryInput) (Ticket, error)
- func (s *Service) RunLifecycleHook(ctx context.Context, input RunLifecycleHookInput) error
- func (s *Service) RunLifecycleHookBestEffort(ctx context.Context, input RunLifecycleHookInput)
- func (s *Service) Update(ctx context.Context, input UpdateInput) (Ticket, error)
- func (s *Service) UpdateComment(ctx context.Context, input UpdateCommentInput) (Comment, error)
- type Ticket
- type TicketReference
- type Type
- type UpdateCommentInput
- type UpdateInput
- type UpdateResult
- type UsageMetricsAgent
- type UsageRepository
Constants ¶
View Source
const ( PickupDiagnosisStateRunnable = domain.PickupDiagnosisStateRunnable PickupDiagnosisStateWaiting = domain.PickupDiagnosisStateWaiting PickupDiagnosisStateBlocked = domain.PickupDiagnosisStateBlocked PickupDiagnosisStateRunning = domain.PickupDiagnosisStateRunning PickupDiagnosisStateCompleted = domain.PickupDiagnosisStateCompleted )
View Source
const ( PickupDiagnosisReasonReadyForPickup = domain.PickupDiagnosisReasonReadyForPickup PickupDiagnosisReasonCompleted = domain.PickupDiagnosisReasonCompleted PickupDiagnosisReasonRunningCurrentRun = domain.PickupDiagnosisReasonRunningCurrentRun PickupDiagnosisReasonRetryBackoff = domain.PickupDiagnosisReasonRetryBackoff PickupDiagnosisReasonRetryPausedRepeatedStalls = domain.PickupDiagnosisReasonRetryPausedRepeatedStalls PickupDiagnosisReasonRetryPausedBudget = domain.PickupDiagnosisReasonRetryPausedBudget PickupDiagnosisReasonRetryPausedInterrupted = domain.PickupDiagnosisReasonRetryPausedInterrupted PickupDiagnosisReasonRetryPausedUser = domain.PickupDiagnosisReasonRetryPausedUser PickupDiagnosisReasonBlockedDependency = domain.PickupDiagnosisReasonBlockedDependency PickupDiagnosisReasonNoMatchingActiveWorkflow = domain.PickupDiagnosisReasonNoMatchingActiveWorkflow PickupDiagnosisReasonWorkflowInactive = domain.PickupDiagnosisReasonWorkflowInactive PickupDiagnosisReasonWorkflowMissingAgent = domain.PickupDiagnosisReasonWorkflowMissingAgent PickupDiagnosisReasonAgentMissing = domain.PickupDiagnosisReasonAgentMissing PickupDiagnosisReasonAgentInterruptRequested = domain.PickupDiagnosisReasonAgentInterruptRequested PickupDiagnosisReasonAgentPaused = domain.PickupDiagnosisReasonAgentPaused PickupDiagnosisReasonAgentPauseRequested = domain.PickupDiagnosisReasonAgentPauseRequested PickupDiagnosisReasonProviderMissing = domain.PickupDiagnosisReasonProviderMissing PickupDiagnosisReasonMachineMissing = domain.PickupDiagnosisReasonMachineMissing PickupDiagnosisReasonMachineOffline = domain.PickupDiagnosisReasonMachineOffline PickupDiagnosisReasonProviderUnknown = domain.PickupDiagnosisReasonProviderUnknown PickupDiagnosisReasonProviderStale = domain.PickupDiagnosisReasonProviderStale PickupDiagnosisReasonWorkflowConcurrencyFull = domain.PickupDiagnosisReasonWorkflowConcurrencyFull PickupDiagnosisReasonProjectConcurrencyFull = domain.PickupDiagnosisReasonProjectConcurrencyFull PickupDiagnosisReasonProviderConcurrencyFull = domain.PickupDiagnosisReasonProviderConcurrencyFull PickupDiagnosisReasonStatusCapacityFull = domain.PickupDiagnosisReasonStatusCapacityFull )
View Source
const ( PickupDiagnosisReasonSeverityInfo = domain.PickupDiagnosisReasonSeverityInfo PickupDiagnosisReasonSeverityWarning = domain.PickupDiagnosisReasonSeverityWarning PickupDiagnosisReasonSeverityError = domain.PickupDiagnosisReasonSeverityError )
View Source
const ( DefaultPriority = domain.DefaultPriority PriorityUrgent = domain.PriorityUrgent PriorityHigh = domain.PriorityHigh PriorityMedium = domain.PriorityMedium PriorityLow = domain.PriorityLow )
View Source
const ( DefaultType = domain.DefaultType TypeFeature = domain.TypeFeature TypeBugfix = domain.TypeBugfix TypeRefactor = domain.TypeRefactor TypeChore = domain.TypeChore TypeEpic = domain.TypeEpic )
View Source
const ( DefaultDependencyType = domain.DefaultDependencyType DependencyTypeBlocks = domain.DependencyTypeBlocks DependencyTypeSubIssue = domain.DependencyTypeSubIssue )
View Source
const ( ExternalLinkTypeGithubIssue = domain.ExternalLinkTypeGithubIssue ExternalLinkTypeGitlabIssue = domain.ExternalLinkTypeGitlabIssue ExternalLinkTypeJiraTicket = domain.ExternalLinkTypeJiraTicket ExternalLinkTypeGithubPR = domain.ExternalLinkTypeGithubPR ExternalLinkTypeGitlabMR = domain.ExternalLinkTypeGitlabMR ExternalLinkTypeCustom = domain.ExternalLinkTypeCustom )
Variables ¶
View Source
var ( ErrProjectNotFound = domain.ErrProjectNotFound ErrProjectRepoNotFound = domain.ErrProjectRepoNotFound ErrRepoScopeRequired = domain.ErrRepoScopeRequired ErrTicketNotFound = domain.ErrTicketNotFound ErrTicketConflict = domain.ErrTicketConflict ErrStatusNotFound = domain.ErrStatusNotFound ErrWorkflowNotFound = domain.ErrWorkflowNotFound ErrStatusNotAllowed = domain.ErrStatusNotAllowed ErrParentTicketNotFound = domain.ErrParentTicketNotFound ErrTargetMachineNotFound = domain.ErrTargetMachineNotFound ErrDependencyNotFound = domain.ErrDependencyNotFound ErrDependencyConflict = domain.ErrDependencyConflict ErrCommentNotFound = domain.ErrCommentNotFound ErrExternalLinkNotFound = domain.ErrExternalLinkNotFound ErrExternalLinkConflict = domain.ErrExternalLinkConflict ErrInvalidDependency = domain.ErrInvalidDependency ErrRetryResumeConflict = domain.ErrRetryResumeConflict )
Functions ¶
func NewRetryToken ¶
func NewRetryToken() string
NewRetryToken returns a new retry-generation token for ticket retry state.
Types ¶
type ActivityRepository ¶ added in v0.5.0
type ActivityRepository interface {
RecordActivityEvent(ctx context.Context, input domain.RecordActivityEventInput) (catalogdomain.ActivityEvent, error)
}
type AddCommentInput ¶
type AddCommentInput = domain.AddCommentInput
type AddDependencyInput ¶
type AddDependencyInput = domain.AddDependencyInput
type AddExternalLinkInput ¶
type AddExternalLinkInput = domain.AddExternalLinkInput
type AppliedUsage ¶
type AppliedUsage = domain.AppliedUsage
type ArchivedListInput ¶
type ArchivedListInput = domain.ArchivedListInput
func ParseArchivedListInput ¶
func ParseArchivedListInput(projectID uuid.UUID, raw ArchivedListRawInput) (ArchivedListInput, error)
type ArchivedListRawInput ¶
type ArchivedListRawInput = domain.ArchivedListRawInput
type ArchivedListResult ¶
type ArchivedListResult = domain.ArchivedListResult
type CommandRepository ¶ added in v0.5.0
type CommentRepository ¶ added in v0.5.0
type CommentRepository interface {
ListComments(ctx context.Context, ticketID uuid.UUID) ([]domain.Comment, error)
ListCommentRevisions(ctx context.Context, ticketID uuid.UUID, commentID uuid.UUID) ([]domain.CommentRevision, error)
AddComment(ctx context.Context, input domain.AddCommentInput) (domain.Comment, error)
UpdateComment(ctx context.Context, input domain.UpdateCommentInput) (domain.Comment, error)
RemoveComment(ctx context.Context, ticketID uuid.UUID, commentID uuid.UUID) (domain.DeleteCommentResult, error)
}
type CommentRevision ¶
type CommentRevision = domain.CommentRevision
type CreateInput ¶
type CreateInput = domain.CreateInput
type CreateRepoScopeInput ¶
type CreateRepoScopeInput = domain.CreateRepoScopeInput
type DeferredLifecycleHook ¶
type DeferredLifecycleHook = domain.DeferredLifecycleHook
type DeleteCommentResult ¶
type DeleteCommentResult = domain.DeleteCommentResult
type DeleteDependencyResult ¶
type DeleteDependencyResult = domain.DeleteDependencyResult
type DeleteExternalLinkResult ¶
type DeleteExternalLinkResult = domain.DeleteExternalLinkResult
type Dependencies ¶ added in v0.5.0
type Dependencies struct {
Activity ActivityRepository
Query QueryRepository
Command CommandRepository
Link LinkRepository
Comment CommentRepository
Usage UsageRepository
Runtime RuntimeRepository
}
type Dependency ¶
type Dependency = domain.Dependency
type DependencyType ¶
type DependencyType = domain.DependencyType
func ParseDependencyType ¶
func ParseDependencyType(raw string) (DependencyType, error)
type ExternalLink ¶
type ExternalLink = domain.ExternalLink
type ExternalLinkType ¶
type ExternalLinkType = domain.ExternalLinkType
func ParseExternalLinkType ¶
func ParseExternalLinkType(raw string) (ExternalLinkType, error)
type HookWorkspace ¶
type HookWorkspace = domain.HookWorkspace
type LifecycleHookRuntimeData ¶
type LifecycleHookRuntimeData = domain.LifecycleHookRuntimeData
type LinkRepository ¶ added in v0.5.0
type LinkRepository interface {
AddDependency(ctx context.Context, input domain.AddDependencyInput) (domain.Dependency, error)
RemoveDependency(ctx context.Context, ticketID uuid.UUID, dependencyID uuid.UUID) (domain.DeleteDependencyResult, error)
AddExternalLink(ctx context.Context, input domain.AddExternalLinkInput) (domain.ExternalLink, error)
RemoveExternalLink(ctx context.Context, ticketID uuid.UUID, externalLinkID uuid.UUID) (domain.DeleteExternalLinkResult, error)
}
type PersistedUsageResult ¶
type PersistedUsageResult = domain.PersistedUsageResult
type PickupDiagnosis ¶
type PickupDiagnosis = domain.PickupDiagnosis
type PickupDiagnosisAgent ¶
type PickupDiagnosisAgent = domain.PickupDiagnosisAgent
type PickupDiagnosisBlockedTicket ¶
type PickupDiagnosisBlockedTicket = domain.PickupDiagnosisBlockedTicket
type PickupDiagnosisCapacity ¶
type PickupDiagnosisCapacity = domain.PickupDiagnosisCapacity
type PickupDiagnosisCapacityBucket ¶
type PickupDiagnosisCapacityBucket = domain.PickupDiagnosisCapacityBucket
type PickupDiagnosisProvider ¶
type PickupDiagnosisProvider = domain.PickupDiagnosisProvider
type PickupDiagnosisReason ¶
type PickupDiagnosisReason = domain.PickupDiagnosisReason
type PickupDiagnosisReasonCode ¶
type PickupDiagnosisReasonCode = domain.PickupDiagnosisReasonCode
type PickupDiagnosisReasonSeverity ¶
type PickupDiagnosisReasonSeverity = domain.PickupDiagnosisReasonSeverity
type PickupDiagnosisRetry ¶
type PickupDiagnosisRetry = domain.PickupDiagnosisRetry
type PickupDiagnosisState ¶
type PickupDiagnosisState = domain.PickupDiagnosisState
type PickupDiagnosisStatusCapacity ¶
type PickupDiagnosisStatusCapacity = domain.PickupDiagnosisStatusCapacity
type PickupDiagnosisWorkflow ¶
type PickupDiagnosisWorkflow = domain.PickupDiagnosisWorkflow
type Priority ¶
func ParsePriority ¶
type QueryRepository ¶ added in v0.5.0
type RecordActivityEventInput ¶
type RecordActivityEventInput = domain.RecordActivityEventInput
type RecordUsageInput ¶
type RecordUsageInput = domain.RecordUsageInput
type RecordUsageResult ¶
type RecordUsageResult = domain.RecordUsageResult
type Repository ¶
type Repository interface {
ActivityRepository
QueryRepository
CommandRepository
LinkRepository
CommentRepository
UsageRepository
RuntimeRepository
}
type ResumeRetryInput ¶
type ResumeRetryInput = domain.ResumeRetryInput
type RunLifecycleHookInput ¶
type RuntimeRepository ¶ added in v0.5.0
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
func NewService ¶
func NewService(deps Dependencies) *Service
func (*Service) AddComment ¶
func (*Service) AddDependency ¶
func (s *Service) AddDependency(ctx context.Context, input AddDependencyInput) (Dependency, error)
func (*Service) AddExternalLink ¶
func (s *Service) AddExternalLink(ctx context.Context, input AddExternalLinkInput) (ExternalLink, error)
func (*Service) ConfigureActivityEmitter ¶ added in v0.3.0
func (s *Service) ConfigureActivityEmitter(emitter *activitysvc.Emitter)
func (*Service) ConfigurePlatformEnvironment ¶
func (*Service) ConfigureSSHPool ¶
func (s *Service) ConfigureSSHPool(pool ticketHookSSHPool)
func (*Service) ConfigureTransportResolver ¶
func (s *Service) ConfigureTransportResolver(resolver ticketHookTransportResolver)
func (*Service) GetPickupDiagnosis ¶
func (*Service) ListArchived ¶
func (s *Service) ListArchived(ctx context.Context, input ArchivedListInput) (ArchivedListResult, error)
func (*Service) ListCommentRevisions ¶
func (*Service) ListComments ¶
func (*Service) RecordActivityEvent ¶
func (s *Service) RecordActivityEvent(ctx context.Context, input RecordActivityEventInput) (catalogdomain.ActivityEvent, error)
func (*Service) RecordUsage ¶
func (s *Service) RecordUsage( ctx context.Context, input RecordUsageInput, metrics provider.MetricsProvider, ) (RecordUsageResult, error)
func (*Service) RemoveComment ¶
func (*Service) RemoveDependency ¶
func (*Service) RemoveExternalLink ¶
func (*Service) ResumeRetry ¶
func (*Service) RunLifecycleHook ¶
func (s *Service) RunLifecycleHook(ctx context.Context, input RunLifecycleHookInput) error
func (*Service) RunLifecycleHookBestEffort ¶
func (s *Service) RunLifecycleHookBestEffort(ctx context.Context, input RunLifecycleHookInput)
func (*Service) UpdateComment ¶
type TicketReference ¶
type TicketReference = domain.TicketReference
type UpdateCommentInput ¶
type UpdateCommentInput = domain.UpdateCommentInput
type UpdateInput ¶
type UpdateInput = domain.UpdateInput
type UpdateResult ¶
type UpdateResult = domain.UpdateResult
type UsageMetricsAgent ¶
type UsageMetricsAgent = domain.UsageMetricsAgent
type UsageRepository ¶ added in v0.5.0
type UsageRepository interface {
RecordUsage(ctx context.Context, input domain.RecordUsageInput, usageDelta ticketing.UsageDelta) (domain.PersistedUsageResult, error)
}
Click to show internal directories.
Click to hide internal directories.