model

package
v0.0.0-...-56e4e6a Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 10, 2023 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Browser

type Browser struct {
	M BrowserMap `json:"browserMap"`
	// contains filtered or unexported fields
}

func LoadBrowser

func LoadBrowser() (*Browser, error)

func (*Browser) Add

func (f *Browser) Add(name BrowserName, data *BrowserInfo) error

func (*Browser) Fetch

func (f *Browser) Fetch(name BrowserName) *BrowserInfo

func (*Browser) Remove

func (f *Browser) Remove(name BrowserName) error

func (*Browser) Save

func (f *Browser) Save() error

func (*Browser) Selection

func (f *Browser) Selection() []string

func (*Browser) Tui

func (f *Browser) Tui() (int, string, error)

type BrowserInfo

type BrowserInfo struct {
	AppPath string `json:"appPath"`
}

func NewBrowserInfo

func NewBrowserInfo(appPath string) *BrowserInfo

func (*BrowserInfo) Open

func (f *BrowserInfo) Open(data *FavData) error

type BrowserMap

type BrowserMap map[BrowserName]*BrowserInfo

type BrowserName

type BrowserName string

func (BrowserName) String

func (f BrowserName) String() string

type Fav

type Fav struct {
	M FavMap `json:"favMap"`
	// contains filtered or unexported fields
}

func LoadFav

func LoadFav() (*Fav, error)

func (*Fav) Add

func (f *Fav) Add(name FavName, data *FavData) error

func (*Fav) Fetch

func (f *Fav) Fetch(name FavName) *FavData

func (*Fav) Remove

func (f *Fav) Remove(name FavName) error

func (*Fav) Save

func (f *Fav) Save() error

func (*Fav) Selection

func (f *Fav) Selection() []string

func (*Fav) Tui

func (f *Fav) Tui() (int, string, error)

type FavData

type FavData struct {
	URL string `json:"url"`
}

func NewFavData

func NewFavData(url string) *FavData

type FavMap

type FavMap map[FavName]*FavData

type FavName

type FavName string

func (FavName) String

func (f FavName) String() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL