{"modulePath":"github.com/peteraba/roadmapper","version":"v0.11.0","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package code\n\n## Functions\n\n```go\nfunc Uint64ToString(n uint64) string\n```\nUint64ToString converts a number into a string representation\n\n## Types\n\n```go\ntype Builder struct {\n}\n```\nBuilder is a factory for codes\n\n```go\nfunc (b Builder) New() Code\n```\nNew creates a new random code\n\n```go\nfunc (b Builder) NewFromID(id uint64) (Code, error)\n```\nNewFromID creates a new code from a number\n\n```go\nfunc (b Builder) NewFromString(s string) (Code, error)\n```\nNewFromString creates a new code from a string representation (typically a URL path)\n\n```go\ntype Code interface {\n\tString() string\n\tID() uint64\n}\n```\nCode represents a positive integer that also has a human-readable, url-friendly, rather minimalistic representation\n\n```go\ntype Code64 uint64\n```\nCode64 is a 64-bit Code\n\n```go\nfunc NewCode64() Code64\n```\nNewCode64 returns a random Code64\n\n```go\nfunc NewCode64FromString(s string) (Code64, error)\n```\nNewCode64FromString creates a new Code64 from a string representation\n\n```go\nfunc (c Code64) ID() uint64\n```\nID returns a numeric representation of a 64-bit Code\n\n```go\nfunc (c Code64) String() string\n```\nString returns a human-readable, url-friendly representation of a 64-bit Code\n\n","path":"github.com/peteraba/roadmapper/pkg/code","name":"code","synopsis":"","isRedistributable":true}
