Documentation
¶
Index ¶
- type LinkMap
- func (l *LinkMap) Delete(key string) error
- func (l *LinkMap) Get(key string) (string, bool)
- func (l *LinkMap) GetAll() map[string]string
- func (l *LinkMap) GetAllKeys() []string
- func (l *LinkMap) GetFiltered(keys []string) map[string]string
- func (l *LinkMap) Put(key string, target *url.URL) error
- func (l *LinkMap) Update(key string, target *url.URL) error
- type ParseError
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type LinkMap ¶
type LinkMap struct {
// contains filtered or unexported fields
}
LinkMap houses the map of redirects, and keeps track of the backing file for maintaining the map across restarts. It also handles thread safety.
func NewLinkMap ¶
func NewLinkMap(persistType storage.StorageType, requestedConfig string) *LinkMap
NewLinkMap generates a new LinkMap object, with the requested config if it exists. If the requested config does not exist, it falls back to the default locations. If the default locations do not exist, the program will exit with an error.
func (*LinkMap) Delete ¶
Delete removes an entry from the link map. If the key is not present in the map, this is a no-op
func (*LinkMap) GetAll ¶
GetAll returns a map containing all of the entries from the current LinkMap object
func (*LinkMap) GetAllKeys ¶
type ParseError ¶
type ParseError struct{}
func (*ParseError) Error ¶
func (e *ParseError) Error() string
Click to show internal directories.
Click to hide internal directories.