Documentation
¶
Index ¶
- Constants
- Variables
- type ActiveState
- type Available
- type Binary
- type InstallationID
- type Loaded
- type PluginMode
- func (m PluginMode) External() bool
- func (r PluginMode) Format(f fmt.State, verb rune)
- func (r PluginMode) MarshalText() ([]byte, error)
- func (r *PluginMode) Scan(__iNpUt__ any) error
- func (r PluginMode) String() string
- func (m PluginMode) Supervised() bool
- func (r *PluginMode) UnmarshalText(__iNpUt__ []byte) error
- func (r PluginMode) Value() (driver.Value, error)
- type Record
- type ReportedState
- func (r ReportedState) Format(f fmt.State, verb rune)
- func (r ReportedState) MarshalText() ([]byte, error)
- func (r *ReportedState) Scan(__iNpUt__ any) error
- func (r ReportedState) String() string
- func (r *ReportedState) UnmarshalText(__iNpUt__ []byte) error
- func (r ReportedState) Value() (driver.Value, error)
- type Validated
Constants ¶
View Source
const ( // max compressed plugin archive size accepted from uploads or URL fetches MaxArchiveSizeBytes int64 = 50 * 1024 * 1024 // 50 MiB // max manifest.json size read from a plugin archive MaxManifestSizeBytes int64 = 1 * 1024 * 1024 // 1 MiB // extraction guardrails for supervised runtime archive unpacking MaxArchiveExtractFileBytes uint64 = 50 * 1024 * 1024 // 50 MiB per file MaxArchiveExtractTotalBytes uint64 = 200 * 1024 * 1024 // 200 MiB total MaxArchiveExtractFileCount int = 2048 )
View Source
const ArchiveManifestFileName = "manifest.json"
View Source
const PluginDirectory = "plugins"
Variables ¶
View Source
var ( ActiveStateActive = ActiveState{activeStateActive} ActiveStateInactive = ActiveState{activeStateInactive} )
View Source
var ( PluginModeSupervised = PluginMode{pluginModeSupervised} PluginModeExternal = PluginMode{pluginModeExternal} )
View Source
var ( ReportedStateInactive = ReportedState{reportedStateInactive} ReportedStateStarting = ReportedState{reportedStateStarting} ReportedStateConnecting = ReportedState{reportedStateConnecting} ReportedStateActive = ReportedState{reportedStateActive} ReportedStateStopping = ReportedState{reportedStateStopping} ReportedStateError = ReportedState{reportedStateError} ReportedStateRestarting = ReportedState{reportedStateRestarting} )
Functions ¶
This section is empty.
Types ¶
type ActiveState ¶
type ActiveState struct {
// contains filtered or unexported fields
}
func NewActiveState ¶
func NewActiveState(__iNpUt__ string) (ActiveState, error)
func (ActiveState) MarshalText ¶
func (r ActiveState) MarshalText() ([]byte, error)
func (*ActiveState) Scan ¶
func (r *ActiveState) Scan(__iNpUt__ any) error
func (ActiveState) String ¶
func (r ActiveState) String() string
func (*ActiveState) UnmarshalText ¶
func (r *ActiveState) UnmarshalText(__iNpUt__ []byte) error
type Available ¶
Available represents a plugin that has been installed and registered in the database and is ready to use.
type InstallationID ¶
func (InstallationID) String ¶
func (id InstallationID) String() string
type Loaded ¶
type Loaded struct {
Record Record
State ActiveState
}
type PluginMode ¶
type PluginMode struct {
// contains filtered or unexported fields
}
func NewPluginMode ¶
func NewPluginMode(__iNpUt__ string) (PluginMode, error)
func (PluginMode) External ¶
func (m PluginMode) External() bool
func (PluginMode) MarshalText ¶
func (r PluginMode) MarshalText() ([]byte, error)
func (*PluginMode) Scan ¶
func (r *PluginMode) Scan(__iNpUt__ any) error
func (PluginMode) String ¶
func (r PluginMode) String() string
func (PluginMode) Supervised ¶
func (m PluginMode) Supervised() bool
func (*PluginMode) UnmarshalText ¶
func (r *PluginMode) UnmarshalText(__iNpUt__ []byte) error
type Record ¶
type Record struct {
InstallationID InstallationID
Created time.Time
AddedBy account.AccountID
Manifest rpc.Manifest
Config map[string]any
Token string
Mode PluginMode
// Supervised tells the host whether the plugin is a process owned by the
// process. When it is, the host will start the process and monitor it. If
// false, the plugin is an "external" plugin and not run as a child process.
Supervised bool
State ActiveState
StateChangedAt time.Time
StatusMessage string
Details map[string]any
ReportedState ReportedState
StartedAt time.Time
}
Record represents the database record for a plugin. It's the source of truth for plugins in general, it stores a copy of the manifest, who added it and the file path for the plugin's packaged binary application.
type ReportedState ¶
type ReportedState struct {
// contains filtered or unexported fields
}
func NewReportedState ¶
func NewReportedState(__iNpUt__ string) (ReportedState, error)
func (ReportedState) MarshalText ¶
func (r ReportedState) MarshalText() ([]byte, error)
func (*ReportedState) Scan ¶
func (r *ReportedState) Scan(__iNpUt__ any) error
func (ReportedState) String ¶
func (r ReportedState) String() string
func (*ReportedState) UnmarshalText ¶
func (r *ReportedState) UnmarshalText(__iNpUt__ []byte) error
Click to show internal directories.
Click to hide internal directories.