Documentation
¶
Overview ¶
Package route holds the side gate and the read gate. The side gate places an item by the first rung that decides it: every sighting's tags, then a routing rule, then the quality gate, else review. A routing rule is one that the set in force declares, or one that a person accepted. A seeded share of an accepted rule's items waits in review instead, marked rule-would-hide. A rule placed before the model always wins over it: the gate answers a ruled item too, and its answer moves nothing. The quality gate's rung sends to review an item that the gate dropped, marked gate-would-drop, unless every family of the item has earned hiding it, where it drops the item. It sends to review an item that the gate was unsure of, and otherwise places it by the gate's side guess at or above its floor. Where a connector that sighted the item declares person_sorts, a guess places nothing and the item waits in review beside it. While the item's quality task is open, an item that no tag or rule placed waits at the quality gate, and the side gate decides nothing. The read gate then chooses whether an item placed on a side is read as is or by a model: by its connector's read rule, else its side's default.
The side gate places an item only once the scan of its newest parse is done. The service runs both gates in the write that ends each stage after the parse and before the side gate, so a scan and its side decision commit together, and a parse's end places nothing. It runs them again in the write that applies a changed set, and in the write that adds a sighting to an item the store held. Each run leaves an item that a tag, a rule, a model or a person placed as it is. It decides again an item that the gate itself sent to review, or a model's guess below the floor, so a guess or a rule that arrives later reaches it. A person's placement from review runs the read gate the same way. Each decision is appended, and the newest at a gate decides. Each decision brings the item's delivery and its model read in line in the same write: a read as is queues its delivery, a read by a model queues its model read, and a drop or a move withdraws either where it has not run. The same write passes the item's decisions to each of its chapters, which no gate decides. A chapter's delivery waits for its book's to settle, and the write that settles the book's queues it.
Index ¶
- Constants
- Variables
- func AcceptRule(ctx context.Context, tx *store.Tx, r store.RoutingRule, log *slog.Logger) (store.RoutingRule, bool, error)
- func AfterApply(log *slog.Logger) connectors.AfterApply
- func AfterDelivery(ctx context.Context, tx *store.Tx, task store.Task) error
- func AfterDraft(floor float64) func(context.Context, *store.Tx, store.Task) error
- func AfterSighting(log *slog.Logger) func(context.Context, *store.Tx, string) error
- func AfterStage(log *slog.Logger) func(context.Context, *store.Tx, store.Task) error
- func Archive(ctx context.Context, tx *store.Tx, key string, a Archival) ([]store.Decision, error)
- func BeforeModel(set connectors.Set, accepted []store.RoutingRule, key string, ...) (store.Decision, bool)
- func ByModel(run string) string
- func ByParent(key string) string
- func ByPerson(login string) string
- func ChoiceNames() []string
- func Choose(ctx context.Context, tx *store.Tx, key string, p Pick) ([]store.Decision, error)
- func Gate(ctx context.Context, tx *store.Tx, key string, log *slog.Logger) ([]store.Decision, error)
- func ModelReadDue(side, read store.Decision, outputs []store.Output, open bool) bool
- func NoteOf(read store.Decision, draft *store.Output) (*string, bool)
- func PassToChapters(ctx context.Context, tx *store.Tx, key string) error
- func Place(ctx context.Context, tx *store.Tx, key string, p Placement) ([]store.Decision, error)
- func PlacingChoiceNames() []string
- func QueueDelivery(ctx context.Context, tx *store.Tx, key string) (bool, error)
- func QueueUndeliveredChapters(ctx context.Context, tx *store.Tx) (int, error)
- func Read(set connectors.Set, sightings []store.Sighting, side string, note *string) store.Decision
- func ReadByModel(side, read store.Decision) bool
- func RedraftAfterAnswer(ctx context.Context, tx *store.Tx, task store.Task) error
- func RetireRule(ctx context.Context, tx *store.Tx, name, decidedBy string, clientID *string, ...) (store.RoutingRule, bool, error)
- func Side(set connectors.Set, accepted []store.RoutingRule, key string, ...) store.Decision
- type Archival
- type ChapterError
- type Choice
- type ChoiceRefusedError
- type Draft
- type DueDelivery
- type DueReader
- type Guess
- type NotDeclaredError
- type Pick
- type Placement
- type PlaylistDestinationError
- type PushOnlyError
- type ReviewReason
- type RuleError
Constants ¶
const ( ChoiceArticles = "articles" ChoiceLearning = "learning" ChoiceSuggestion = "suggestion" ChoiceWatch = "watch" ChoicePsyche = "psyche" ChoiceArchive = "archive" ChoiceDrop = "drop" )
The choices that review offers a person for an item that waits on them. A choice with a Side places it on a destination. Archive keeps its record with no destination, and drop drops it.
const ( ArticlesDeliverer = "life-articles" LearningDeliverer = "learning-resources" WatchDeliverer = "ypl-watch" )
The deliverers whose destination a choice places an item on, as each registers its name.
const ( LikedChannel = CauseChannel LikedTheme = CauseTheme LikedThisItem = "this-item" )
The likes that an archive may name: what the person liked about the item, which a keep-rule proposal reads as the archive's cause. LikedThisItem says only the item itself was liked.
const ( VerdictReview = store.VerdictReview VerdictDrop = store.VerdictDrop VerdictSplit = store.VerdictSplit )
The side gate's verdicts beyond the two sides. An item placed on a destination that takes no side is dropped, softly: it keeps its row.
const ( CauseTags = "tags" CauseTagsDisagree = "tags-disagree" CauseRule = "rule" CauseGuess = "guess" CauseBelowFloor = "below-floor" // CauseNoGuess sends to review an item that no tag or rule placed and // that the quality gate gave no answer for: its run failed, or no quality // task was queued. CauseNoGuess = "no-guess" // CauseGateError sends to review an item whose gate could not read the // set in force or the item's sightings. The item keeps its parse. CauseGateError = "gate-error" // CausePersonSorts sends to review an item that no tag or rule placed and // that a connector declaring person_sorts sighted, where the quality gate // passed it with a side guess. The review queue shows the guess beside it. CausePersonSorts = "person-sorts" // CauseOwnersWords sends to review an item that no tag or rule placed and // that holds the owner's own words, as store.Item.SkipsQualityGate names // one. The quality gate never reads it, so no guess can place it. CauseOwnersWords = "owners-words" // CauseTopics splits a memo once its topics are landed, each an item that // the gates place on its own. Its verdict is VerdictSplit. CauseTopics = store.CauseTopics // CauseGateWouldDrop sends to review an item that the quality gate // dropped, where a family of the item has not earned hiding it. // CauseQualityDrop drops one that every family's trust hides, and keeps its // row. CauseQualityReview sends to review one that the gate was unsure of. CauseGateWouldDrop = "gate-would-drop" CauseQualityDrop = "quality-drop" CauseQualityReview = store.ReasonQualityReview // CauseRuleWouldHide sends to review an item that a routing rule would // have dropped or placed, where the rule's review share drew it. CauseRuleWouldHide = "rule-would-hide" // CauseConnector and CauseSideDefault are the read gate's. CauseConnector = "connector" CauseSideDefault = "side-default" // CauseUnstated is a person's placement that names no cause. CauseUnstated = "unstated" // CauseTitle, CauseTheme, CauseChannel and CauseLowQuality are a person's // causes naming the item's title, its theme, the channel that published // it, or that it held nothing worth keeping. A person may also name a // field of a sighting, such as subreddit. CauseTitle = "title" CauseTheme = "theme" CauseChannel = "channel" CauseLowQuality = "low-quality" // CausePush is a person's push that named its destination, at the side // gate and at the read gate. CausePush = "push" // CauseNoteDraft is a read by a model whose note is the note stage's // draft: the model's own where the draft reached the note floor, and a // person's where they took a draft that fell below it. CauseNoteUnclear // sends to review an item whose draft fell below the floor. CauseNoteDraft = "note-draft" CauseNoteUnclear = "note-unclear" // CauseLearningRefused sends to review a learning sort that the quality // gate did not pass, which records already written carry. CauseLearningRefused = "learning-refused" )
Causes that the gates write. A person's decision carries the aspect the person named instead, such as subreddit, channel, theme or title.
const ( ByTag = store.DecidedByTag // ByGate is the side gate itself, where no rung placed the item. ByGate = store.DecidedByGate )
Who decided, as decided_by spells it, beside rule:<name>, model:<run> and person:<login>.
const DefaultNoteFloor = 0.7
DefaultNoteFloor is the confidence at or above which a note's draft becomes the read's note, where serve's [note] floor names none. Below it, the item waits in review as note-unclear.
const GuessFloor = 0.7
GuessFloor is the confidence at or above which the quality gate's personal guess places an item. A fleet guess places nothing at any confidence: a tag, a rule or a person puts an item on the fleet side, never a guess. Below the floor, and on a fleet guess, the item waits in review with its guess.
const LensFleet = connectors.SideFleet
LensFleet is the lens that a suggestion's model read takes.
const PsycheDestination = "psyche"
PsycheDestination is the destination that the psyche choice and a push to psyche place an item on.
Variables ¶
var Choices = []Choice{ { Name: ChoiceArticles, Side: connectors.SidePersonal, Deliverer: ArticlesDeliverer, Read: connectors.ReadAsIs, Help: "delivered to your articles to read as is, with no summary", }, { Name: ChoiceLearning, Side: connectors.SidePersonal, Deliverer: LearningDeliverer, Read: connectors.ReadAsIs, Help: "delivered to your learning resources, whatever the gate answered", }, { Name: ChoiceSuggestion, Side: connectors.SideFleet, Read: connectors.ReadModel, Lens: LensFleet, Help: "a model reads it under the fleet lens and suggests fleet work", }, { Name: ChoiceWatch, Side: connectors.SidePersonal, Deliverer: WatchDeliverer, Read: connectors.ReadAsIs, Help: "added to the playlist you pick at its source, or the default", }, { Name: ChoicePsyche, Side: connectors.SidePersonal, DestinationName: PsycheDestination, Read: connectors.ReadAsIs, RunsHere: true, Help: "placed at psyche, and psyche relate reads it here at once", }, { Name: ChoiceArchive, Help: "done: kept with no destination, marked read, asks what you liked", }, { Name: ChoiceDrop, Help: "dropped with its row kept, after asking what decided it", }, }
Choices is every choice that review offers, in the order the review tab binds them.
var ErrNoRule = errors.New("no routing rule of that name was accepted")
ErrNoRule is a retirement of a rule that no person accepted.
var ErrNotDeclared = errors.New("the destination is not declared")
ErrNotDeclared is what a NotDeclaredError matches with errors.Is.
var ErrUnknownChoice = errors.New("the choice is none that places an item")
ErrUnknownChoice is a pick naming no placing choice of Choices.
var ErrUnknownLike = errors.New("the like is none that an archive names")
ErrUnknownLike is an archive naming a like that is none of Likes.
var Likes = []string{LikedChannel, LikedTheme, LikedThisItem}
Likes is every like an archive may name, in the order review asks them.
var ReviewReasons = []ReviewReason{ {store.ReasonQualityReview, "the quality gate sent it to review"}, {CauseGateWouldDrop, "the quality gate would drop it, and its family has not earned hiding it, or the family's draw showed it"}, {CauseRuleWouldHide, "a routing rule would drop it or place it without you, and the rule's review share drew it"}, {CauseNoteUnclear, "a model read waits on its note, whose draft fell below the note floor: write a note, or place it with none to take the draft"}, {store.ReasonShelved, "you put it on the shelf, which review does not offer: choose where it goes"}, {CauseLearningRefused, "you sorted it to learning, and the quality gate's newest answer did not pass it: choose where it goes"}, {CauseBelowFloor, "the quality gate guessed fleet, or its guess fell below its floor"}, {CausePersonSorts, "a connector that sighted it declares person_sorts, so its guess only shows"}, {CauseOwnersWords, "it holds your own words, such as a memo's topic, which the quality gate never reads"}, {CauseTagsDisagree, "its sightings' tags name destinations on two sides"}, {CauseNoGuess, "no tag or rule placed it, and the quality gate gave no answer"}, {CauseGateError, "the side gate could not read the set in force or its sightings"}, {store.ReasonNoParse, "no parse of it is usable"}, }
ReviewReasons lists why an item may wait in review, in the order that `review list --help` gives them. The gate's own doubts lead, because the reading pane decides them best. review-list.schema.json's reason enum holds these names.
Functions ¶
func AcceptRule ¶ added in v0.34.0
func AcceptRule(ctx context.Context, tx *store.Tx, r store.RoutingRule, log *slog.Logger) (store.RoutingRule, bool, error)
AcceptRule appends r as its name's newest version, unless the newest already says the same by the same hand. Then, whether it appended or not, it runs the gates again as regate does for the rule, so a write sent again after a failed gate decides what the first could not. It answers the newest version and whether it appended one, and a *RuleError where the set in force refuses r.
func AfterApply ¶
func AfterApply(log *slog.Logger) connectors.AfterApply
AfterApply is the hook that serve runs in the write that applies a changed set. It runs the gates again over each scanned item that no side decision placed, so a rule the set adds places what it matches. It then reconciles the delivery of each item read as is that holds no settled delivery, so a side's default or a deliverer that the set adds reaches the items that waited for one.
func AfterDelivery ¶ added in v0.23.0
AfterDelivery is the hook that serve runs in the write that ends a deliver task done. It brings the delivery of each chapter of the task's item in line, so a book whose delivery settled queues its chapters' in that write, and a refused book queues none.
func AfterDraft ¶ added in v0.32.0
AfterDraft is the hook that serve runs in the write that ends a note task done. Where the item's newest read still waits on a draft, it appends the read gate's decision on the newest done draft: a read by a model of the draft, as note-draft, where its confidence reaches floor, and a review, as note-unclear, below it. That decision then brings the item's model read and its chapters in line. A read that a person's note or placement decided while the draft ran is left as it is.
func AfterSighting ¶ added in v0.24.0
AfterSighting is the hook that serve's lander runs in the write that adds a sighting to an item the store held. It runs the gates over the item again, so a later sighting's tags, connector or fields decide an item that waits in review, and an item already placed stays where it is.
func AfterStage ¶
AfterStage is the hook that serve runs in the write that ends a task done. Where the task's stage comes after the parse and before the side gate, such as the scan, it runs the gates over the task's item.
func Archive ¶ added in v0.43.0
Archive appends a person's archive of the item under key: its side decision on the personal side with no destination, under the like as its cause, or unstated, and its read decision, verdict archive, so nothing reads or delivers it. A channel like keeps on the side decision the match that it implies, where a sighting holds the channel's id. It then writes the person's read mark, which teaches the quality gate as the mark does, unless the archival is Unmarked. An archive that repeats the newest side decision appends nothing. It answers store.ErrNoItem, a ChapterError and ErrUnknownLike.
func BeforeModel ¶
func BeforeModel(set connectors.Set, accepted []store.RoutingRule, key string, sightings []store.Sighting) (store.Decision, bool)
BeforeModel is the side decision on the item under key that a sighting's tags or a routing rule make, under set and each accepted rule in force, and false where neither places the item, so the quality gate judges it.
func ByParent ¶ added in v0.20.0
ByParent is a decision that an item took from its parent, under the parent's key.
func ChoiceNames ¶ added in v0.43.0
func ChoiceNames() []string
ChoiceNames is each choice's name, in order.
func Choose ¶ added in v0.43.0
Choose appends a person's pick of the item under key by p's choice: its side decision on the choice's destination, under the cause the person named or unstated, and its read decision, decided by the person under the choice's name. A choice whose Read is as-is reads it as is, so no model reads it, whatever the quality gate answered. A suggestion reads it by a model under the fleet lens, after a note's draft, and takes a draft already done. Watch keeps the playlist on its side decision for the delivery, and a watch whose item's delivery already holds another playlist is refused, since a delivery adds the video to one. A pick that repeats the newest side decision, playlist included, appends nothing. A pick of an item whose drop the gate showed or hid disagrees with the gate, as a placement does. It answers what Place answers, a ChoiceRefusedError, and ErrUnknownChoice.
func Gate ¶
func Gate(ctx context.Context, tx *store.Tx, key string, log *slog.Logger) ([]store.Decision, error)
Gate runs the side gate over the item under key and, where it places the item on a side, the read gate, appending each decision. It answers the decisions it appended.
It runs only over an item whose newest done parse holds a done scan, so no item is placed before its scan. It leaves an item that a tag, a rule, a model or a person placed as it is, so a sighting that arrives after placement moves nothing. Where it decides again and answers what the item's newest side decision already says, it appends nothing.
Where it cannot read the set in force or the item's sightings, it sends the item to review as CauseGateError and logs why, so the scan stands and the next stage or apply runs the gate again.
func ModelReadDue ¶
ModelReadDue says whether a replay runs the model read on an item: its newest decisions read it by a model, under a lens whose prompt this build holds, the read waits on no note's draft, no model read's task of it is open, and no done read of that lens's prompt in force over the item's reading parse answers the read's note. A read decision that the item took from its parent is never due, because a model read reads the item's own parse, and a book's chapter holds none.
func NoteOf ¶ added in v0.32.0
NoteOf is the note that a model read under read answers, and whether a model drafted it: the person's note where read carries one, the note of draft, the item's newest done draft, where read took it, and nil otherwise. A draft never reaches a decision's note, so a read takes it by its cause.
func PassToChapters ¶ added in v0.20.0
PassToChapters gives each chapter of the item under key the item's newest side decision and, where it places the item on a side, its newest read decision, each decided by ByParent. It appends nothing to a chapter whose newest decisions already say the same. It then brings each chapter's delivery and model read in line, as decide does for the item. A chapter takes its decisions only from its parent, so the gates never run on it.
func Place ¶
Place appends a person's decision on the item under key: on p's destination, or a drop where p names none. Where the destination takes a side, the read gate's decision follows it. A placement with no note of an item that holds a note's draft takes the draft, so its read by a model answers the draft, as the person's decision. A person can place any item, including one that a rule already placed. A placement that repeats the newest side decision appends nothing, and answers the decisions it made. A placement on a destination of an item whose drop the gate showed or hid disagrees with the gate, which returns each family of its answer to rung 0. A drop for low quality also writes the person's low-quality mark, which teaches the quality gate as the mark does. Place answers store.ErrNoItem where the store holds no such item, a NotDeclaredError for a destination that the set in force does not declare, a PushOnlyError for a push-only destination that p does not push to, a PlaylistDestinationError for a destination that only the watch choice places on, and a ChapterError for a book's chapter.
func PlacingChoiceNames ¶ added in v0.43.0
func PlacingChoiceNames() []string
PlacingChoiceNames is the name of each choice that places an item on a destination, in order.
func QueueDelivery ¶
QueueDelivery brings the deliveries of the item under key, and of each of its chapters, in line with what Due answers for their newest decisions under the set in force. So a replay of one book reaches its chapters. It answers whether it queued a delivery.
func QueueUndeliveredChapters ¶ added in v0.23.0
QueueUndeliveredChapters queues the delivery of each chapter that holds none while its book's delivery settled on a record, and answers how many it queued. serve runs it once it listens. So the chapters of a book delivered before its deliverer wrote chapters reach the book's record, with no replay asked for.
func Read ¶
Read is the read gate's decision on an item placed on side: the read rule of the first connector that sighted it and declares one, else side's default. A model read takes side's lens, and carries note, the questions and why the item was saved, where a person wrote one.
func ReadByModel ¶
ReadByModel says whether an item's newest side and read decisions send it to a model read: the side decision places it on a side, and the read decision reads it by a model.
func RedraftAfterAnswer ¶ added in v0.36.0
RedraftAfterAnswer is the hook that serve runs in the write that ends a quality task done, after the gate's decision. It acts where the read gate decided the item's read from a note's draft over a parse other than the item's reading parse, and the item stands on a side. There it appends the read that the side calls for again, which waits on a draft, and queues the draft. So once the gate answers over a new parse, the read is decided from a draft over the same parse. A read that a person decided stays as it is. So does an item that a model already read under the lens, which a model read's replay reads again.
func RetireRule ¶ added in v0.34.0
func RetireRule(ctx context.Context, tx *store.Tx, name, decidedBy string, clientID *string, log *slog.Logger) (store.RoutingRule, bool, error)
RetireRule appends a retired copy of the newest version of the rule called name, by decidedBy from clientID, which takes the rule out of force. It appends nothing where the rule is retired already. Either way it then runs the gates again as regate does for the rule, so each item that the rule dropped, or that its share sent to review, is decided again without it. An item that it placed on a destination stays there. It answers ErrNoRule where no version of name was accepted.
func Side ¶
func Side(set connectors.Set, accepted []store.RoutingRule, key string, sightings []store.Sighting, guess *Guess) store.Decision
Side is the side gate's decision on the item under key that sightings sighted, under set, each accepted rule in force, and the quality gate's guess, which is nil where it has given none.
Types ¶
type Archival ¶ added in v0.43.0
type Archival struct {
Liked string
Login, ClientID string
Presented *store.Presented
DecidedAfterMS *int64
Unmarked bool
}
Archival is a person's archive of an item: done, such as a video watched elsewhere. Liked is what they liked, one of Likes, or empty where they named none. Login, ClientID, Presented, DecidedAfterMS and Unmarked are a Placement's, and Unmarked keeps the read mark unwritten.
type ChapterError ¶ added in v0.20.0
ChapterError is a placement of a book's chapter. A chapter takes every decision from its book, so a placement of its own would be undone by the book's next one.
func (*ChapterError) Error ¶ added in v0.20.0
func (e *ChapterError) Error() string
type Choice ¶ added in v0.43.0
type Choice struct {
Name string
Side string
Deliverer string
DestinationName string
Read string
Lens string
// RunsHere says the client that chose it hands the item to psyche relate on its own machine once
// the placement lands, and nothing in the service runs it.
RunsHere bool
// Help is the choice's line in the CLI's help and the review tab's keys.
Help string
}
Choice is what one of review's choices does with an item. A placing choice puts it on Side, on the destination whose deliverer is Deliverer, or the one named DestinationName, or the side's default where it names neither, and reads it as Read says, under Lens where a model reads it. Archive and drop name no side.
func (Choice) Destination ¶ added in v0.43.0
func (c Choice) Destination(set connectors.Set) (destination *connectors.Destination, missing string)
Destination is where the choice places an item under set: the destination it names, the first destination whose deliverer is its own, or for a choice naming neither, its side's default, else the side's first. Only a named destination may be push-only. Archive and drop place on none, so they answer nil. missing says why the choice places nothing, where set declares no destination it takes.
func (Choice) Places ¶ added in v0.43.0
Places says whether the choice places an item on a destination.
func (Choice) TakesPlaylist ¶ added in v0.43.0
TakesPlaylist says whether the choice's deliverer adds the item to a playlist that the person picks.
type ChoiceRefusedError ¶ added in v0.43.0
ChoiceRefusedError is a pick that its choice cannot carry out on the item: no destination of the set in force takes the choice, the destination's deliverer cannot take the item, a watch names no playlist, or the item's delivery already holds another playlist.
func (*ChoiceRefusedError) Error ¶ added in v0.43.0
func (e *ChoiceRefusedError) Error() string
type Draft ¶ added in v0.32.0
type Draft struct {
Questions []string `json:"questions"`
WhySaved string `json:"why_saved"`
Confidence float64 `json:"confidence"`
}
Draft is what the read gate reads of the note stage's answer, as prompts/note/answer.schema.json holds it: the questions for a model read to answer, why the item was likely saved, and how sure the draft is.
type DueDelivery ¶ added in v0.23.0
type DueDelivery struct {
Destination connectors.Destination
Undelivered *connectors.Undelivered
Path *string
BookDestinationID string
}
DueDelivery is where Due sends an item: the destination whose deliverer writes it, or why none does. Path is the item's file below the deliverer's root, for a deliverer that writes by file. BookDestinationID is the destination's id for a chapter's book's record. Each is empty where the item reaches no deliverer, or where it does not apply.
func Due ¶
func Due(ctx context.Context, r DueReader, set connectors.Set, item store.Item, side, read store.Decision) (DueDelivery, bool, error)
Due is where an item's newest side and read decisions send it for delivery under set, and false where they send it nowhere: the side decision places it on no side, or the read decision reads it other than as is. It reads the item's live homes and its book's deliveries through r. A chapter names its book's record, so it is due only once its book's delivery to the same destination settled on one. The queue, a replay, an apply and items show each ask it.
type DueReader ¶ added in v0.23.0
type DueReader interface {
LiveHomes(ctx context.Context, sum string) ([]store.Home, error)
Deliveries(ctx context.Context, key string) ([]store.Delivery, error)
}
DueReader reads what Due decides from beside an item's decisions: its bytes' live homes, and its book's deliveries where it is a book's chapter. A write's Tx and the store's reader each are one.
type Guess ¶
type Guess struct {
// Side is personal, fleet or unsure.
Side string
Confidence float64
// Run names the model run that answered it.
Run string
}
Guess is the quality gate's side guess on an item.
type NotDeclaredError ¶
NotDeclaredError is a placement naming a destination that the set in force does not declare.
func (*NotDeclaredError) Error ¶
func (e *NotDeclaredError) Error() string
func (*NotDeclaredError) Is ¶
func (e *NotDeclaredError) Is(target error) bool
type Pick ¶ added in v0.43.0
type Pick struct {
Choice string
// Playlist is the playlist that a watch adds the video to, and DefaultPlaylist the one it takes
// where Playlist is empty.
Playlist, DefaultPlaylist string
// Cause and Note are a Placement's.
Cause string
Note *string
Login, ClientID string
Presented *store.Presented
DecidedAfterMS *int64
}
Pick is a person's pick of an item by one placing choice.
type Placement ¶
type Placement struct {
// Destination is where the item goes, one the set in force declares. A
// drop names none.
Destination string
// Cause is the aspect that decided it, such as subreddit, channel, theme
// or title. Empty is CauseUnstated.
Cause string
// Note is the questions and why the item was saved, which a model read
// answers.
Note *string
// Pushed is a push that named its destination, whose cause is CausePush.
// The person decides the read too, as is, so no model stage reads the
// item whatever its connector's read rule or its side's default.
Pushed bool
Login string
ClientID string
// Presented is the review card as drawn when the person decided, and
// DecidedAfterMS how long after the drawing they decided. The side
// decision keeps both, and the read decision after it neither.
Presented *store.Presented
DecidedAfterMS *int64
// Unmarked keeps a drop for low quality from writing the low-quality mark,
// for a caller that may not write marks.
Unmarked bool
}
Placement is a person's decision on an item.
type PlaylistDestinationError ¶ added in v0.35.0
type PlaylistDestinationError struct {
Destination string
// Choice is the choice whose pick places an item there.
Choice string
}
PlaylistDestinationError is a placement on a destination whose deliverer adds the item to the playlist that a person picks, which no placement carries.
func (*PlaylistDestinationError) Error ¶ added in v0.35.0
func (e *PlaylistDestinationError) Error() string
type PushOnlyError ¶ added in v0.31.0
type PushOnlyError struct {
Destination string
}
PushOnlyError is a placement on a push-only destination, whose program only a push or the psyche choice hands the item to.
func (*PushOnlyError) Error ¶ added in v0.31.0
func (e *PushOnlyError) Error() string
type ReviewReason ¶ added in v0.24.0
ReviewReason is one reason an item waits in review: its name and the line that `review list --help` gives it.