warp

package
v0.12.0 Latest Latest
Warning

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

Go to latest
Published: Feb 13, 2026 License: AGPL-3.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Run

func Run(configuration Configuration, registry registry.Registry)

Run creates the warp menu and update the menu whenever a relevant etcd key was changed

Types

type Categories

type Categories []*Category

Categories collection of warp categories

func (Categories) Len

func (categories Categories) Len() int

func (Categories) Less

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

func (Categories) Swap

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

type Category

type Category struct {
	Title   string
	Order   int
	Entries Entries
}

Category category of multiple entries in the warp menu

func (Category) String

func (category Category) String() string

String returns the title of the category

type ConfigReader

type ConfigReader struct {
	// contains filtered or unexported fields
}

ConfigReader reads the configuration for the warp menu from etcd

type Configuration

type Configuration struct {
	Sources        []Source
	Target         string
	Order          confd.Order
	SupportSources []SupportSource `yaml:"support"`
}

Configuration for warp menu creation

type DisabledSupportEntries

type DisabledSupportEntries struct {
	// contains filtered or unexported fields
}

type Entries

type Entries []Entry

Entries is a collection of warp entries

func (Entries) Len

func (entries Entries) Len() int

func (Entries) Less

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

func (Entries) Swap

func (entries 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 Source

type Source struct {
	Path       string
	SourceType string `yaml:"type"`
	Tag        string
}

Source in etcd

type SupportSource

type SupportSource struct {
	Identifier string `yaml:"identifier"`
	External   bool   `yaml:"external"`
	Href       string `yaml:"href"`
}

Source for SupportEntries from yaml

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)

Jump to

Keyboard shortcuts

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