Documentation
¶
Overview ¶
Package projectlink reads and writes .pgedge/link.yaml, the file that ties a project folder to one database. It holds identifiers only, never a credential or a profile name, so it can be committed.
Index ¶
Constants ¶
const ( Dir = ".pgedge" File = "link.yaml" )
Dir and File name the link inside a project folder. `.pgedge` is shared with other pgEdge tools, so the CLI owns only File within it.
const ModuleManaged = "starfleet/managed"
ModuleManaged is the one Module value v1 writes.
Variables ¶
var CommandPaths = map[string][]string{ ModuleManaged: {"starfleet", "managed", "database", "env", "pull"}, }
CommandPaths maps a link's Module to the command path, under root, of that module's `env pull`. Root `pgedge env pull` dispatches on it.
Functions ¶
func AddEnvPullFlags ¶
AddEnvPullFlags declares env pull's flags. Root `pgedge env pull` and each module's own verb both call it, and the root copies every flag it was given onto the module's command, so the two forms cannot drift apart.
Types ¶
type Found ¶
type Found struct {
Link
// Path is the link file; Root is the project folder holding Dir.
Path string
Root string
}
Found is a link and where it was read from.