api

package
v0.0.0-...-2e5aea3 Latest Latest
Warning

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

Go to latest
Published: Sep 1, 2021 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetHandler

func GetHandler(handleFunc getHandleFunc) func(w http.ResponseWriter, r *http.Request)

func PostHandler

func PostHandler(handleFunc postHandleFunc) func(w http.ResponseWriter, r *http.Request)

Types

type FileInfo

type FileInfo struct {
	Path          string    `json:"path,omitempty"`
	Name          string    `json:"name,omitempty"`
	FileExtension string    `json:"fileExtension,omitempty"`
	Size          int       `json:"size,omitempty"`
	Tags          []string  `json:"tags,omitempty"`
	Date          time.Time `json:"date,omitempty"`
	ModTime       time.Time `json:"modTime,omitempty"`
}

type Language

type Language struct {
	Name string `json:"name"`
	Tag  string `json:"tag"`
}

type Log

type Log struct {
	Time      time.Time `json:"time"`
	Label     string    `json:"label"`
	Files     []string  `json:"files"`
	SubLabels []string  `json:"subLabels"`
}

type Notification

type Notification struct {
	Message   string `json:"message"`
	Color     string `json:"color"`
	MultiLine bool   `json:"multiLine"`
}

type RenameTagRequest

type RenameTagRequest struct {
	From string `json:"from"`
	To   string `json:"to"`
}

type Request

type Request struct {
	TagsFilter   string            `json:"tagsFilter,omitempty"`
	SelectedTags []string          `json:"selectedTags,omitempty"` //
	FileInfos    []string          `json:"fileInfos,omitempty"`    // File paths for which file infos are requested
	RenameTag    *RenameTagRequest `json:"renameTag,omitempty"`
	LanguageTag  string            `json:"languageTag,omitempty"`
}

type Response

type Response struct {
	Notification    *Notification `json:"notification,omitempty"`
	Logs            []*Log        `json:"logs,omitempty"`
	Title           string        `json:"title,omitempty"`
	Version         string        `json:"version,omitempty"`
	ArchivePath     string        `json:"archivePath,omitempty"`
	CurrentLanguage *Language     `json:"currentLanguage,omitempty"`
	Languages       []Language    `json:"languages,omitempty"`
	UndoRedoCount   []int         `json:"undoRedoCount,omitempty"`
	Tags            []*Tag        `json:"tags,omitempty"`
	Files           []FileInfo    `json:"files,omitempty"` // File infos
}

type Tag

type Tag struct {
	FileCount int    `json:"fileCount"`
	Selected  bool   `json:"selected"`
	Name      string `json:"name"`
}

Jump to

Keyboard shortcuts

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