nest

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Sep 10, 2025 License: Unlicense Imports: 22 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MaxEagleItemIDLength = 15
)

Variables

This section is empty.

Functions

func CurrentLibrary

func CurrentLibrary() (*api.Library, error)

returns current library path and name

func CurrentLibraryName

func CurrentLibraryName() (string, error)

func CurrentLibraryPath

func CurrentLibraryPath() (string, error)

get path to current library

func GetEagleThumbnail

func GetEagleThumbnail(cfg *config.NestConfig, itemId string) (string, error)

func GetEagleThumbnailFullRes

func GetEagleThumbnailFullRes(cfg *config.NestConfig, itemId string) (string, error)

on my device thumbnails ONLY end with _thumbnail.png or they do not exist. this returns the full file path to the highest available resolution of the file.

func GetList

func GetList(cfg *config.NestConfig) (any, error)

func IsValidEagleItemId

func IsValidEagleItemId(itemId EagleItemId) bool

func LibrarySwitchSync

func LibrarySwitchSync(baseUrl string, libraryPath string, timeout int) error

func RegisterGroupRoutes

func RegisterGroupRoutes(g *echo.Group)

func RegisterRootRoutes

func RegisterRootRoutes(n config.NestConfig, server *echo.Echo)

registers routes on the server root (/)

func ServeThumbnailHandler

func ServeThumbnailHandler(cfg *config.NestConfig) echo.HandlerFunc

func WatchMtime

func WatchMtime(n config.NestConfig)

Types

type Data

type Data interface {
	GetData() []any
}

maybe

type Eagle

type Eagle struct {
	//Db        *sql.DB
	Libraries []*Library
}

rename to nest?

type EagleDataMessage

type EagleDataMessage struct {
	Status string `json:"status"`
	Data   string `json:"data"`
}

for endpoints that return a string.

type EagleItemId

type EagleItemId string

func (EagleItemId) IsValid

func (id EagleItemId) IsValid() bool

type EagleServerInfo

type EagleServerInfo struct {
	Status string `json:"status"`
	Data   struct {
		Version string `json:"version"`
	} `json:"data"`
}

type ItemIds

type ItemIds []string

type Library

type Library struct {
	Name  string
	Path  string
	Mutex sync.Mutex
}

type Mtime

type Mtime map[string]int

func TryIngestMtime

func TryIngestMtime(n config.NestConfig) *Mtime

type ThumbnailData

type ThumbnailData struct {
	Status        string `json:"status"`
	ThumbnailPath string `json:"data"`
}

type UrlBuilder

type UrlBuilder struct {
	Url   *url.URL
	Query *url.Values
}

func Uri

func Uri(cfg *config.NestConfig, path string) *UrlBuilder

func (UrlBuilder) String

func (u UrlBuilder) String() string

Jump to

Keyboard shortcuts

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