Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
Functions ¶
This section is empty.
Types ¶
type ConfigEntry ¶
type DB ¶
type DB struct { Root string // full path to usher root directory containing databases Domain string // fully-qualified domain whose mappings we want DBPath string // full path to database for Domain ConfigPath string // full path to usher config file }
func NewDB ¶
NewDB creates a DB struct with members derived from parameters, the environment, or defaults (in that order). It does no checking that the values produced are sane or exist on the filesystem.
func (*DB) Add ¶
Add a mapping for url and code to the database. If code is missing, a random code will be generated and returned.
func (*DB) Init ¶
Init checks and creates the following, if they don't exist: - an usher root directory - an usher database for the db.Domain - an entry in the user config file for db.Domain
func (*DB) Push ¶
Push syncs all current mappings with the backend configured for db.Domain in db.ConfigPath
Click to show internal directories.
Click to hide internal directories.