Documentation ¶
Overview ¶
Package kokodoko exposes an API for fetching GitHub permalinks given a path to a local file.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { }
Config holds options that alters the behavior of the app. Note: The author reserves the right to add fields to this struct without releasing a new major version. You should be fine as long as you name parameters in this struct.
type Kokodoko ¶
type Kokodoko struct {
// contains filtered or unexported fields
}
Kokodoko is the core application struct that executes everything.
func New ¶
New creates a new Kokodoko application based on the given dependencies and configuration.
func (*Kokodoko) Run ¶
Run reads the given args, performs some validation, makes some git syscalls, and returns the URL corresponding to the file (and line number(s)) identified in the args. First arg is interpreted as a file path, whereas the second optional argument is a line number or a line number range in the form "12-51". case it *is* actually easier to read since it's all very left-margin aligned.
type O11y ¶
type O11y interface { Wrap(ctx context.Context, err error, msgAndFmtArgs ...interface{}) error WithMetadatum(ctx context.Context, tab, key string, value interface{}) context.Context }
O11y exposes observability methods for monitoring this application.
type System ¶
type System interface { // repoPath doesn't have to be the root of the repository -- any directory in the repo. RemoteURL(ctx context.Context, repoPath string) (string, error) // repoPath doesn't have to be the root of the repository -- any directory in the repo. Hash(ctx context.Context, repoPath string) (string, error) // repoPath doesn't have to be the root of the repository -- any directory in the repo. RepoRoot(ctx context.Context, repoPath string) (string, error) AbsolutePath(relative string) (string, error) }
System represents data-fetching methods that require system calls.