Documentation
¶
Overview ¶
Package transferwords is what an owner transfer says about the files a script's runs created (#1588): which of them a transfer is about, how many there are, and the sentence that tells an administrator whether they moved with the script or stayed where they were.
It reads the producer relation's rows and addresses and nothing else, so the wording can be read and tested without the handler that answers the transfer and cannot import it back.
Index ¶
- func Count(created []producedview.Item) string
- func Counts(assets, collections int) string
- func Created(items []producedview.Item) []producedview.Item
- func KeptWith(created []producedview.Item, scriptOwner string) string
- func SameAddress(rowOwner, owner string) bool
- func Sentence(a Account, owner string) string
- type Account
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Count ¶
func Count(created []producedview.Item) string
Count renders "2 assets and 1 collection" for a set of outputs.
func Created ¶
func Created(items []producedview.Item) []producedview.Item
Created narrows what a script wrote to what a transfer is about: the live assets and collections its runs CREATED. A file the script only wrote a version over is somebody else's and is not the script's to move; a resource is filed by library rather than by address and has no owner to change; a deleted file is gone either way.
func KeptWith ¶
func KeptWith(created []producedview.Item, scriptOwner string) string
KeptWith names who the outputs stay with when they are not moved, for the refusal that asks the caller to choose: the script's owner when every row names them, and the plain fact otherwise.
func SameAddress ¶
SameAddress reports whether a row's address names the person at owner. The comparison is case-insensitive, as every address comparison in the platform is, and an unattributed row names nobody.
func Sentence ¶
Sentence states, after the sentence about the script, what became of its outputs. It is the answer to the question the ticket found nobody was asked (#1588): a transfer moves the automation, and whether the files it refreshes went with it is the part an administrator is most likely to be wrong about.