Documentation
¶
Index ¶
- func RelativeTimeDisplay(ts int) string
- type HostBackend
- type HostBackendStorm
- func (backend *HostBackendStorm) AddNewVisit(hostname string) error
- func (backend *HostBackendStorm) CreateProfile(hostname string) (*HostProfile, error)
- func (backend *HostBackendStorm) DeleteHost(hostname string) error
- func (backend *HostBackendStorm) GetProfile(hostname string) (*HostProfile, error)
- type HostProfile
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RelativeTimeDisplay ¶
Types ¶
type HostBackend ¶
type HostBackend interface {
CreateProfile(hostname string) (*HostProfile, error)
GetProfile(hostname string) (*HostProfile, error)
AddNewVisit(hostname string) error
DeleteHost(hostname string) error
}
HostBackend defines the interface for hostEntry actions
type HostBackendStorm ¶
func NewHostBackend ¶
func NewHostBackend(path string) (*HostBackendStorm, error)
func (*HostBackendStorm) AddNewVisit ¶
func (backend *HostBackendStorm) AddNewVisit(hostname string) error
func (*HostBackendStorm) CreateProfile ¶
func (backend *HostBackendStorm) CreateProfile(hostname string) (*HostProfile, error)
func (*HostBackendStorm) DeleteHost ¶
func (backend *HostBackendStorm) DeleteHost(hostname string) error
func (*HostBackendStorm) GetProfile ¶
func (backend *HostBackendStorm) GetProfile(hostname string) (*HostProfile, error)
type HostProfile ¶
type HostProfile struct {
ID int `storm:"id,increment"`
Name string `storm:"unique"`
Visited int
LastVisited int
}
func (*HostProfile) GetLastVisitedForDisplay ¶
func (p *HostProfile) GetLastVisitedForDisplay() string
Click to show internal directories.
Click to hide internal directories.