Documentation
¶
Overview ¶
Package taskwrite creates and reads tracker tasks for a project: what f10 task create and task read do, for the command and the daemon alike.
Index ¶
- func Create(ctx context.Context, warn io.Writer, t *target.Target, n New) (ref.Ref, string, error)
- func DocTitle(id, doc string) string
- func Document(ctx context.Context, t *target.Target, token string, withImages bool) (string, error)
- func GithubAuth(ctx context.Context, t *target.Target) func(*http.Request)
- func LinkBodyAfter(ctx context.Context, t *target.Target, doc string, warn io.Writer) string
- func MdLink(id, title, url string) string
- func Read(ctx context.Context, t *target.Target, r ref.Ref) (string, error)
- func RefusedUpFront(t *target.Target) (tasksource.RefusedSource, bool)
- func WithImages(ctx context.Context, doc, dir string, d images.Downloader) string
- type New
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Create ¶
Create sends the task to the driver's create, else makes it an issue on the host, and returns it with its url. It is never retried, since a failed write is an unknown outcome.
func Document ¶
Document is the task token names as f10 task read prints it: a bundle's members joined, and with images set the linked images saved locally, so an agent reads files in place of urls that expire. An empty token is the checkout's task.
func GithubAuth ¶
GithubAuth sends the gh token only to GitHub's own hosts over https, where a private repo's attachments sit. It is read once; a failed read leaves the request bare, so its error names the image.
func LinkBodyAfter ¶
LinkBodyAfter turns the body's `After: <id>` line into a link titled with the base task, when its title and url are known.
func MdLink ¶
MdLink is the task as a markdown link, brackets in the title escaped so the link text always ends where the link does.
func Read ¶
Read is the task's text as f10 renders it, feeding the ledger's task refs so a later ref costs no tracker call.
func RefusedUpFront ¶
func RefusedUpFront(t *target.Target) (tasksource.RefusedSource, bool)
RefusedUpFront is the source that creates nothing in t's project, which answers before anything is read, so capture falls back.
func WithImages ¶
WithImages ends doc with a footer naming its downloaded images. A dir that cannot be written fails every image, never the read.