marks

package
v0.0.0-...-c300ec0 Latest Latest
Warning

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

Go to latest
Published: Mar 13, 2021 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AppConfig

type AppConfig struct {
	FullFormat        []string
	MarksYamlFileMode uint32
	SupportedBrowsers []string
	SupportedColors   []string
}

type Config

type Config struct {
	*AppConfig
	*UserConfig
}

type Mark

type Mark struct {
	Id   string
	Url  string
	Tags []string
}

func (*Mark) ContainsAllTags

func (m *Mark) ContainsAllTags(subtags []string) bool

func (*Mark) ContainsTag

func (m *Mark) ContainsTag(subtag string) bool

func (*Mark) String

func (m *Mark) String() string

type MarkAlreadyExistsError

type MarkAlreadyExistsError struct{}

func (MarkAlreadyExistsError) Error

func (e MarkAlreadyExistsError) Error() string

type MarkDoesNotExistError

type MarkDoesNotExistError struct{}

func (MarkDoesNotExistError) Error

func (e MarkDoesNotExistError) Error() string

type MarkService

type MarkService interface {
	Mark(id string) (*Mark, error)
	Marks() ([]*Mark, error)
	Create(m *Mark) error
	Update(id string, m *Mark) error
	Delete(id string) error
	Contains(id string) (bool, error)
	Filter(id, url string, tags []string) ([]*Mark, error)
}

type Printer

type Printer interface {
	Msg(string, ...interface{})
	Error(string, ...interface{})
	Tabulate([]*Mark) ([]string, error)
	FullMark(*Mark) (string, error)
	FullMarkWithFields(*Mark) (string, error)
	Id(string) (string, error)
	Url(string) (string, error)
	Tags([]string) (string, error)
	Browser(string) (string, error)
}

type Prompter

type Prompter interface {
	Select(string, []string) (int, error)
	Confirm(string) bool
}

type UserConfig

type UserConfig struct {
	ContentPath     string
	MarksYamlFile   string
	IdColor         string
	UrlColor        string
	TagsColor       string
	BrowserColor    string
	ChromeOpenArgs  string
	FirefoxOpenArgs string
	Browser         string
}

Jump to

Keyboard shortcuts

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