Internal

internal/app/complete

Package complete closes reviewed work after the review gate has passed.

import "github.com/nilstate/scafld/v2/internal/app/complete"

Package complete closes reviewed work after the review gate has passed.

Variables

ErrReviewGate is returned when completion is attempted before a passing review.

Source: internal/app/complete/complete.go:17

var ErrReviewGate = errors.New("review gate has not passed")

Functions

func Run(ctx context.Context, specs SpecStore, sessions SessionStore, clock Clock, taskID string) (spec.Model, error)

Source: internal/app/complete/complete.go:35

Run completes a reviewed task and records completion evidence.

Types

type Clock

Source: internal/app/complete/complete.go:32

Clock supplies completion timestamps.

type Clock interface{ Now() time.Time }
Methods
  • Now func() time.Time

type SessionStore

Source: internal/app/complete/complete.go:26

SessionStore is the session evidence port used by completion.

type SessionStore interface {
	Append(context.Context, string, session.Entry, string) (session.Session, error)
	Load(context.Context, string) (session.Session, error)
}
Methods
  • Append func(context.Context, string, session.Entry, string) (session.Session, error)
  • Load func(context.Context, string) (session.Session, error)

type SpecStore

Source: internal/app/complete/complete.go:20

SpecStore is the spec persistence port used by completion.

type SpecStore interface {
	Load(context.Context, string) (spec.Model, string, error)
	Save(context.Context, string, spec.Model) error
}
Methods
  • Load func(context.Context, string) (spec.Model, string, error)
  • Save func(context.Context, string, spec.Model) error