Documentation
¶
Overview ¶
Package dashboard composes the Curator's pending work from the modules that own it. It reads their public projections and adds no status of its own.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RegisterRoutes ¶
func RegisterRoutes(e *echo.Echo, module UseCases, requireCurator echo.MiddlewareFunc)
RegisterRoutes keeps the overview behind the Curator guard.
Types ¶
type AlbumWork ¶
type AlbumWork struct {
ID string `json:"id"`
Title string `json:"title"`
Status string `json:"status"`
Message string `json:"message"`
Ready bool `json:"ready"`
}
AlbumWork is one Album with its import status as Publishing reports it. Ready is true when publishing would show the Album to at least one Person.
type Albums ¶
type Albums interface {
ListAlbums(context.Context, string) ([]publishing.Album, error)
ChapterFailures(context.Context) ([]publishing.ChapterFailure, error)
}
Albums is the consumer-owned view of Publishing.
type Attention ¶
type Attention struct {
PendingRequests int `json:"pending_requests"`
Imports []AlbumWork `json:"imports"`
Deliveries []Delivery `json:"deliveries"`
Chapters []ChapterWork `json:"chapters"`
}
Attention groups actual failures and decisions: nothing here is a choice the Curator made to wait.
type ChapterWork ¶
type ChapterWork struct {
AlbumID string `json:"album_id"`
AlbumTitle string `json:"album_title"`
MomentID string `json:"moment_id"`
EntryID string `json:"entry_id"`
Title string `json:"title"`
Message string `json:"message"`
}
ChapterWork is one video whose chapter extraction failed, addressed so the Curator can open it in its Album and retry.
type Dashboard ¶
type Dashboard struct {
NeedsAttention Attention `json:"needs_attention"`
Ready Ready `json:"ready"`
Active bool `json:"active"`
}
Dashboard is the Curator's focused work list. Active reports that an import or an email is still running, so the browser polls only then. Chapter probes report through the Album page, which polls itself.
type Delivery ¶
type Delivery struct {
ID string `json:"id"`
Kind string `json:"kind"`
Recipient string `json:"recipient"`
Status string `json:"status"`
Message string `json:"message"`
Attempts int `json:"attempts"`
UpdatedAt time.Time `json:"updated_at"`
PersonID string `json:"person_id"`
PersonName string `json:"person_name"`
InvitationID string `json:"invitation_id"`
}
Delivery is one failed or uncertain email. Update and alert email retry from here; an Invitation carries its InvitationID and retries from the Person page, which also checks that the Person may still be invited.
type Mail ¶
type Mail interface {
OpenDeliveries(context.Context) ([]notifications.DeliveryWork, error)
PreviewUpdates(context.Context) (notifications.Preview, error)
}
Mail is the consumer-owned view of Notifications. The preview is computed on request and changes nothing; its row count is the unannounced people. It resolves every eligible Person's visible content, which is fine at household scale but is the heaviest part of a poll.
type Ready ¶
type Ready struct {
Unpublished []AlbumWork `json:"unpublished"`
UnannouncedPeople int `json:"unannounced_people"`
}
Ready groups work the Curator may finish whenever they like. Neither entry is a failure.