ticket

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: May 13, 2026 License: Apache-2.0 Imports: 30 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DependencyTypeBlocks   = domain.DependencyTypeBlocks
	DependencyTypeSubIssue = domain.DependencyTypeSubIssue
)

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 InstallRetryTokenHooks

func InstallRetryTokenHooks(client *ent.Client)

InstallRetryTokenHooks keeps retry token semantics consistent for direct ent mutations.

func NewRetryToken

func NewRetryToken() string

func ResetRetryBaseline

func ResetRetryBaseline(update *ent.TicketUpdateOne, current *ent.Ticket) *ent.TicketUpdateOne

ResetRetryBaseline clears active retry-cycle state after a healthy/manual-forward transition and rotates the retry token so stale delayed retries are discarded. attempt_count stays cumulative per the PRD, while current failure streak state is normalized.

func ScheduleRetry

func ScheduleRetry(update *ent.TicketUpdate, nextRetryAt time.Time, pauseReason string) *ent.TicketUpdate

ScheduleRetry rotates the retry token and records a delayed retry intent.

func ScheduleRetryOne

func ScheduleRetryOne(update *ent.TicketUpdateOne, nextRetryAt time.Time, pauseReason string) *ent.TicketUpdateOne

ScheduleRetryOne rotates the retry token and records a delayed retry intent.

Types

type ActivityRepository added in v0.5.0

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

func NewActivityRepository added in v0.5.0

func NewActivityRepository(client *ent.Client) *ActivityRepository

func (*ActivityRepository) RecordActivityEvent added in v0.5.0

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

type ArchivedListResult

type ArchivedListResult = domain.ArchivedListResult

type CommandRepository added in v0.5.0

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

func NewCommandRepository added in v0.5.0

func NewCommandRepository(client *ent.Client) *CommandRepository

func (*CommandRepository) Create added in v0.5.0

func (r *CommandRepository) Create(ctx context.Context, input CreateInput) (Ticket, error)

Create persists a new ticket and applies project defaults.

func (*CommandRepository) ResumeRetry added in v0.5.0

func (r *CommandRepository) ResumeRetry(ctx context.Context, input ResumeRetryInput) (Ticket, error)

ResumeRetry clears a repeated-stall retry pause and makes the ticket schedulable again.

func (*CommandRepository) Update added in v0.5.0

Update applies a partial update to an existing ticket.

type Comment

type Comment = domain.Comment

type CommentRepository added in v0.5.0

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

func NewCommentRepository added in v0.5.0

func NewCommentRepository(client *ent.Client) *CommentRepository

func (*CommentRepository) AddComment added in v0.5.0

func (r *CommentRepository) AddComment(ctx context.Context, input AddCommentInput) (Comment, error)

AddComment creates a new user discussion comment on a ticket.

func (*CommentRepository) ListCommentRevisions added in v0.5.0

func (r *CommentRepository) ListCommentRevisions(ctx context.Context, ticketID uuid.UUID, commentID uuid.UUID) ([]CommentRevision, error)

ListCommentRevisions returns immutable comment history oldest-first.

func (*CommentRepository) ListComments added in v0.5.0

func (r *CommentRepository) ListComments(ctx context.Context, ticketID uuid.UUID) ([]Comment, error)

func (*CommentRepository) RemoveComment added in v0.5.0

func (r *CommentRepository) RemoveComment(ctx context.Context, ticketID uuid.UUID, commentID uuid.UUID) (DeleteCommentResult, error)

RemoveComment deletes a user discussion comment from a ticket.

func (*CommentRepository) UpdateComment added in v0.5.0

func (r *CommentRepository) UpdateComment(ctx context.Context, input UpdateCommentInput) (Comment, error)

UpdateComment updates the markdown body of an existing ticket discussion comment.

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 Dependency

type Dependency = domain.Dependency

type DependencyType

type DependencyType = domain.DependencyType
type ExternalLink = domain.ExternalLink

type ExternalLinkType

type ExternalLinkType = domain.ExternalLinkType

type LifecycleHookRuntimeData

type LifecycleHookRuntimeData = domain.LifecycleHookRuntimeData

type LinkRepository added in v0.5.0

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

func NewLinkRepository added in v0.5.0

func NewLinkRepository(client *ent.Client) *LinkRepository

func (*LinkRepository) AddDependency added in v0.5.0

func (r *LinkRepository) AddDependency(ctx context.Context, input AddDependencyInput) (Dependency, error)

AddDependency creates a dependency edge between two tickets.

func (r *LinkRepository) AddExternalLink(ctx context.Context, input AddExternalLinkInput) (ExternalLink, error)

AddExternalLink creates a new external issue or PR association for a ticket.

func (*LinkRepository) RemoveDependency added in v0.5.0

func (r *LinkRepository) RemoveDependency(ctx context.Context, ticketID uuid.UUID, dependencyID uuid.UUID) (DeleteDependencyResult, error)

RemoveDependency deletes a dependency edge from a ticket.

func (r *LinkRepository) RemoveExternalLink(ctx context.Context, ticketID uuid.UUID, externalLinkID uuid.UUID) (DeleteExternalLinkResult, error)

type ListInput

type ListInput = domain.ListInput

type Optional

type Optional[T any] = domain.Optional[T]

type PersistedUsageResult

type PersistedUsageResult = domain.PersistedUsageResult

type Priority

type Priority = domain.Priority

type QueryRepository added in v0.5.0

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

func NewQueryRepository added in v0.5.0

func NewQueryRepository(client *ent.Client) *QueryRepository

func (*QueryRepository) Get added in v0.5.0

func (r *QueryRepository) Get(ctx context.Context, ticketID uuid.UUID) (Ticket, error)

func (*QueryRepository) List added in v0.5.0

func (r *QueryRepository) List(ctx context.Context, input ListInput) ([]Ticket, error)

List returns tickets in a project ordered for UI consumption.

func (*QueryRepository) ListArchived added in v0.5.0

type RecordActivityEventInput

type RecordActivityEventInput = domain.RecordActivityEventInput

type RecordUsageInput

type RecordUsageInput = domain.RecordUsageInput

type RecordUsageResult

type RecordUsageResult = domain.RecordUsageResult

type ResumeRetryInput

type ResumeRetryInput = domain.ResumeRetryInput

type RuntimeRepository added in v0.5.0

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

func NewRuntimeRepository added in v0.5.0

func NewRuntimeRepository(client *ent.Client) *RuntimeRepository

func (*RuntimeRepository) GetPickupDiagnosis added in v0.5.0

func (r *RuntimeRepository) GetPickupDiagnosis(ctx context.Context, ticketID uuid.UUID) (domain.PickupDiagnosis, error)

func (*RuntimeRepository) LoadLifecycleHookRuntimeData added in v0.5.0

func (r *RuntimeRepository) LoadLifecycleHookRuntimeData(
	ctx context.Context,
	ticketID uuid.UUID,
	runID uuid.UUID,
	workflowID *uuid.UUID,
) (LifecycleHookRuntimeData, error)

type Ticket

type Ticket = domain.Ticket

type TicketReference

type TicketReference = domain.TicketReference

type Type

type Type = domain.Type

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 struct {
	// contains filtered or unexported fields
}

func NewUsageRepository added in v0.5.0

func NewUsageRepository(client *ent.Client) *UsageRepository

func (*UsageRepository) RecordUsage added in v0.5.0

func (r *UsageRepository) RecordUsage(
	ctx context.Context,
	input RecordUsageInput,
	usageDelta ticketing.UsageDelta,
) (PersistedUsageResult, error)

Jump to

Keyboard shortcuts

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