Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrNoPrefixes = errors.New("no more prefixes available")
)
View Source
var ErrNotFound = errors.New("short URL not found")
Functions ¶
Types ¶
type PrefixManager ¶
type PrefixManager struct {
// contains filtered or unexported fields
}
func NewPrefixManager ¶
func NewPrefixManager(db *bolt.DB) (*PrefixManager, error)
func (*PrefixManager) AllocateNewPrefix ¶
func (pm *PrefixManager) AllocateNewPrefix() (uint16, error)
AllocateNewPrefix assigns next prefix > 0
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
Click to show internal directories.
Click to hide internal directories.