schemas

package
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: Mar 10, 2023 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

Functions

This section is empty.

Types

type Action

type Action struct {
	Title    string `json:"title"`
	Shortcut string `json:"shortcut"`
	Type     string `json:"type"`

	// edit
	Path string `json:"path"`

	// open
	Target string `json:"target"`

	// copy
	Text string `json:"text"`

	// run / push
	Command []Field `json:"command"`

	// run
	OnSuccess string `json:"onSuccess"`
}

type Detail

type Detail struct {
	Content Preview `json:"content"`
}

type Field

type Field struct {
	Value string     `json:"value"`
	Input *FormInput `json:"input"`
}

func (*Field) UnmarshalJSON

func (field *Field) UnmarshalJSON(data []byte) error

type FormInput

type FormInput struct {
	Type        string `json:"type"`
	Title       string `json:"title"`
	Placeholder string `json:"placeholder"`
	Default     string `json:"default"`

	Choices []string `json:"choices"`
	Label   string   `json:"label"`
}

type List

type List struct {
	ShowPreview   bool       `json:"showPreview"`
	GenerateItems bool       `json:"generateItems"`
	Items         []ListItem `json:"items"`
}

type ListItem

type ListItem struct {
	Id          string   `json:"id"`
	Title       string   `json:"title"`
	Subtitle    string   `json:"subtitle"`
	Preview     *Preview `json:"preview"`
	Accessories []string `json:"accessories"`
	Actions     []Action `json:"actions"`
}

type Preview

type Preview struct {
	Text     string   `json:"text"`
	Language string   `json:"language"`
	Command  []string `json:"command"`
}

type Response

type Response struct {
	Type    string   `json:"type"`
	Title   string   `json:"title"`
	Actions []Action `json:"actions"`

	*Detail
	*List
}

Jump to

Keyboard shortcuts

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