types

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Oct 28, 2024 License: AGPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Categories

type Categories []*Category

Categories collection of warp Categories

func (*Categories) InsertCategories

func (c *Categories) InsertCategories(newCategories Categories)

InsertCategories adds new categories to the slice.

func (*Categories) InsertCategory

func (c *Categories) InsertCategory(newCategory *Category)

InsertCategory adds a new category to the slice. If the title are same the entries will be merged.

func (Categories) Len

func (c Categories) Len() int

func (Categories) Less

func (c Categories) Less(i, j int) bool

func (Categories) Swap

func (c Categories) Swap(i, j int)

type Category

type Category struct {
	Title   string
	Order   int
	Entries Entries
}

Category categories multiple entries in the warp menu

func (Category) String

func (c Category) String() string

type DoguConverter

type DoguConverter struct{}

DoguConverter converts dogus from the configuration to a warp menu category object

func (*DoguConverter) CreateEntryWithCategoryFromDogu added in v0.15.1

func (dc *DoguConverter) CreateEntryWithCategoryFromDogu(dogu *core.Dogu, tag string) (EntryWithCategory, error)

CreateEntryWithCategoryFromDogu returns a doguEntry with category if the dogu has the tag specified as parameter.

type Entries

type Entries []Entry

Entries is a collection of warp entries

func (Entries) Len

func (e Entries) Len() int

func (Entries) Less

func (e Entries) Less(i, j int) bool

func (Entries) Swap

func (e Entries) Swap(i, j int)

type Entry

type Entry struct {
	DisplayName string
	Href        string
	Title       string
	Target      Target
}

Entry link in the warp menu

type EntryWithCategory

type EntryWithCategory struct {
	Entry    Entry
	Category string
}

EntryWithCategory is a dto for entries with a Category

type ExternalConverter

type ExternalConverter struct{}

ExternalConverter is used to read external links from the configuration and convert them to a warp menu category object.

func (*ExternalConverter) ReadAndUnmarshalExternal

func (ec *ExternalConverter) ReadAndUnmarshalExternal(value string) (EntryWithCategory, error)

ReadAndUnmarshalExternal reads a specific external link from the configuration and converts it to an entry with a category.

type Target

type Target uint8

Target defines the target of the link

const (
	// TARGET_SELF means the link is part of the internal system
	TARGET_SELF Target = iota + 1
	// TARGET_EXTERNAL link is outside from the system
	TARGET_EXTERNAL
)

func (Target) MarshalJSON

func (target Target) MarshalJSON() ([]byte, error)

type WatchConfigurationContext added in v0.10.0

type WatchConfigurationContext interface {
	registry.WatchConfigurationContext
}

Jump to

Keyboard shortcuts

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