daemonapi

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Aug 6, 2026 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsManagedType

func IsManagedType(t string) bool

func ManagedTypes

func ManagedTypes() []string

Types

type BatchRequest

type BatchRequest struct {
	Entries []EntrySnapshot `json:"entries"`
}

type BatchResponse

type BatchResponse struct {
	Results []OperationResult `json:"results"`
}

type EntrySnapshot

type EntrySnapshot struct {
	Name         string         `json:"name"`
	Type         string         `json:"type"`
	MountDirPath string         `json:"mount_dir_path"`
	Source       Source         `json:"source"`
	Options      map[string]any `json:"options,omitempty"`
}

func FromMountEntry

func FromMountEntry(entry *config.MountEntry) (EntrySnapshot, bool)

func (EntrySnapshot) Validate

func (e EntrySnapshot) Validate() error

type ErrorPayload

type ErrorPayload struct {
	Code    string `json:"code"`
	Message string `json:"message"`
	Detail  string `json:"detail,omitempty"`
}

type HealthResponse

type HealthResponse struct {
	OK              bool     `json:"ok"`
	Version         string   `json:"version"`
	PID             int      `json:"pid"`
	ManagedTypes    []string `json:"managed_types"`
	MountedSessions int      `json:"mounted_sessions"`
}

type OperationResult

type OperationResult struct {
	Name         string        `json:"name"`
	Type         string        `json:"type"`
	Managed      bool          `json:"managed"`
	Handled      bool          `json:"handled"`
	Success      bool          `json:"success"`
	Skipped      bool          `json:"skipped,omitempty"`
	Mounted      bool          `json:"mounted"`
	Backend      string        `json:"backend,omitempty"`
	MountDirPath string        `json:"mount_dir_path,omitempty"`
	LogPath      string        `json:"log_path,omitempty"`
	Message      string        `json:"message,omitempty"`
	Error        *ErrorPayload `json:"error,omitempty"`
}

type ShutdownError

type ShutdownError struct {
	Name    string `json:"name"`
	Message string `json:"message"`
}

type ShutdownResponse

type ShutdownResponse struct {
	OK        bool            `json:"ok"`
	Unmounted int             `json:"unmounted"`
	Errors    []ShutdownError `json:"errors,omitempty"`
}

type Source

type Source struct {
	URL             string `json:"url"`
	Username        string `json:"username,omitempty"`
	Password        string `json:"password,omitempty"`
	Path            string `json:"path,omitempty"`
	Provider        string `json:"provider,omitempty"`
	Bucket          string `json:"bucket,omitempty"`
	Region          string `json:"region,omitempty"`
	Endpoint        string `json:"endpoint,omitempty"`
	AccessKeyID     string `json:"access_key_id,omitempty"`
	SecretAccessKey string `json:"secret_access_key,omitempty"`
	SessionToken    string `json:"session_token,omitempty"`
	EnvAuth         bool   `json:"env_auth,omitempty"`
	ForcePathStyle  *bool  `json:"force_path_style,omitempty"`
}

type StatusResponse

type StatusResponse struct {
	Statuses []OperationResult `json:"statuses"`
}

Jump to

Keyboard shortcuts

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