Documentation ¶
Index ¶
Examples ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Generator ¶
Generator generates a relative, solidus delimited file path from a given identifier. The resulting paths may be used for mapping OCFL object identifiers to ocfl object root directories (possibly with intervening directories, e.g. pairtrees), as well as mapping file logical paths to physical paths.
type GeneratorFunc ¶
GeneratorFunc is a function that can be used to satisfy the Generator interface
Example ¶
Creates an fspath.Generator instance from the builtin uri.QueryEscape function
package main import ( "fmt" "net/url" "github.com/birkland/ocfl/fspath" ) func main() { var pathgen fspath.Generator = fspath.GeneratorFunc(url.QueryEscape) fmt.Println(pathgen.Generate("foo:bar")) }
Output: foo%3Abar
func (GeneratorFunc) Generate ¶
func (g GeneratorFunc) Generate(id string) string
Generate a path from a given id string
Click to show internal directories.
Click to hide internal directories.