Documentation
¶
Index ¶
- Constants
- Variables
- func NewFactory(b bus.Bus) controller.Factory
- type Config
- func (m *Config) CloneMessageVT() protobuf_go_lite.CloneMessage
- func (m *Config) CloneVT() *Config
- func (this *Config) EqualMessageVT(thatMsg any) bool
- func (this *Config) EqualVT(that *Config) bool
- func (c *Config) EqualsConfig(other config.Config) bool
- func (c *Config) GetConfigID() string
- func (x *Config) GetDelveAddr() string
- func (x *Config) GetElectronPkg() string
- func (x *Config) GetNativeApp() *NativeAppConfig
- func (x *Config) GetProjectId() string
- func (x *Config) MarshalJSON() ([]byte, error)
- func (x *Config) MarshalProtoJSON(s *json.MarshalState)
- func (x *Config) MarshalProtoText() string
- func (m *Config) MarshalToSizedBufferVT(dAtA []byte) (int, error)
- func (m *Config) MarshalToVT(dAtA []byte) (int, error)
- func (m *Config) MarshalVT() (dAtA []byte, err error)
- func (*Config) ProtoMessage()
- func (x *Config) Reset()
- func (m *Config) SizeVT() (n int)
- func (x *Config) String() string
- func (c *Config) ToPluginCompilerConf() (*bldr_plugin_compiler_go.Config, error)
- func (x *Config) UnmarshalJSON(b []byte) error
- func (x *Config) UnmarshalProtoJSON(s *json.UnmarshalState)
- func (m *Config) UnmarshalVT(dAtA []byte) error
- func (c *Config) Validate() error
- type Controller
- func (c *Controller) BuildManifest(ctx context.Context, args *bldr_manifest_builder.BuildManifestArgs, ...) (*bldr_manifest_builder.BuilderResult, error)
- func (c *Controller) BundleElectronHook(ctx context.Context, builderConf *bldr_manifest_builder.BuilderConfig, ...) (*plugin_compiler_go.PreBuildHookResult, error)
- func (c *Controller) BundleSaucerHook(ctx context.Context, builderConf *bldr_manifest_builder.BuilderConfig, ...) (*plugin_compiler_go.PreBuildHookResult, error)
- func (c *Controller) Execute(ctx context.Context) error
- func (c *Controller) GetSupportedPlatforms() []string
- func (c *Controller) SupportsStartupManifestCache() bool
- type Factory
- type NativeAppConfig
- func (m *NativeAppConfig) CloneMessageVT() protobuf_go_lite.CloneMessage
- func (m *NativeAppConfig) CloneVT() *NativeAppConfig
- func (this *NativeAppConfig) EqualMessageVT(thatMsg any) bool
- func (this *NativeAppConfig) EqualVT(that *NativeAppConfig) bool
- func (x *NativeAppConfig) GetAppName() string
- func (x *NativeAppConfig) GetDevTools() bool
- func (x *NativeAppConfig) GetIconPath() string
- func (x *NativeAppConfig) GetQuitPolicy() QuitPolicy
- func (x *NativeAppConfig) GetThemeSource() string
- func (x *NativeAppConfig) GetWindowHeight() uint32
- func (x *NativeAppConfig) GetWindowTitle() string
- func (x *NativeAppConfig) GetWindowWidth() uint32
- func (x *NativeAppConfig) MarshalJSON() ([]byte, error)
- func (x *NativeAppConfig) MarshalProtoJSON(s *json.MarshalState)
- func (x *NativeAppConfig) MarshalProtoText() string
- func (m *NativeAppConfig) MarshalToSizedBufferVT(dAtA []byte) (int, error)
- func (m *NativeAppConfig) MarshalToVT(dAtA []byte) (int, error)
- func (m *NativeAppConfig) MarshalVT() (dAtA []byte, err error)
- func (*NativeAppConfig) ProtoMessage()
- func (x *NativeAppConfig) Reset()
- func (m *NativeAppConfig) SizeVT() (n int)
- func (x *NativeAppConfig) String() string
- func (x *NativeAppConfig) UnmarshalJSON(b []byte) error
- func (x *NativeAppConfig) UnmarshalProtoJSON(s *json.UnmarshalState)
- func (m *NativeAppConfig) UnmarshalVT(dAtA []byte) error
- type QuitPolicy
- func (x QuitPolicy) Enum() *QuitPolicy
- func (x QuitPolicy) MarshalJSON() ([]byte, error)
- func (x QuitPolicy) MarshalProtoJSON(s *json.MarshalState)
- func (x QuitPolicy) MarshalProtoText() string
- func (x QuitPolicy) MarshalText() ([]byte, error)
- func (x QuitPolicy) String() string
- func (x *QuitPolicy) UnmarshalJSON(b []byte) error
- func (x *QuitPolicy) UnmarshalProtoJSON(s *json.UnmarshalState)
- func (x *QuitPolicy) UnmarshalText(b []byte) error
Constants ¶
const ConfigID = ControllerID
ConfigID is the config identifier.
const ControllerID = "bldr/web/plugin/compiler"
ControllerID is the controller ID.
Variables ¶
var ( QuitPolicy_name = map[int32]string{ 0: "QUIT_POLICY_UNSPECIFIED", 1: "QUIT_POLICY_RESTART", 2: "QUIT_POLICY_EXIT", } QuitPolicy_value = map[string]int32{ "QUIT_POLICY_UNSPECIFIED": 0, "QUIT_POLICY_RESTART": 1, "QUIT_POLICY_EXIT": 2, } )
Enum value maps for QuitPolicy.
var Version = semver.MustParse("0.0.1")
Version is the controller version
Functions ¶
func NewFactory ¶
func NewFactory(b bus.Bus) controller.Factory
NewFactory constructs a new plugin compiler controller factory.
Types ¶
type Config ¶
type Config struct {
// ProjectId overrides the project id set in the project config.
ProjectId string `protobuf:"bytes,1,opt,name=project_id,json=projectId,proto3" json:"projectId,omitempty"`
// DelveAddr is the address to listen for Delve remote connections.
// If the build mode is dev and this is set, uses delve to run the plugin.
// Ignored if build mode is not dev or build platform is not "desktop".
// Special value: "wait" - waits for plugin entrypoint to be run manually.
DelveAddr string `protobuf:"bytes,2,opt,name=delve_addr,json=delveAddr,proto3" json:"delveAddr,omitempty"`
// ElectronPkg is the name and version of the npm package to use for electron.
// If unset, defaults to the version in package.json.
// If not found, defaults to electron@latest.
// Ignored if build platform is not "desktop".
ElectronPkg string `protobuf:"bytes,3,opt,name=electron_pkg,json=electronPkg,proto3" json:"electronPkg,omitempty"`
// NativeApp configures branding for native app renderers.
NativeApp *NativeAppConfig `protobuf:"bytes,4,opt,name=native_app,json=nativeApp,proto3" json:"nativeApp,omitempty"`
// contains filtered or unexported fields
}
Config configures the web plugin builder.
func (*Config) CloneMessageVT ¶
func (m *Config) CloneMessageVT() protobuf_go_lite.CloneMessage
func (*Config) EqualMessageVT ¶
func (*Config) EqualsConfig ¶
EqualsConfig checks if the config is equal to another.
func (*Config) GetConfigID ¶
GetConfigID returns the unique string for this configuration type.
func (*Config) GetDelveAddr ¶
func (*Config) GetElectronPkg ¶
func (*Config) GetNativeApp ¶
func (x *Config) GetNativeApp() *NativeAppConfig
func (*Config) GetProjectId ¶
func (*Config) MarshalJSON ¶
MarshalJSON marshals the Config to JSON.
func (*Config) MarshalProtoJSON ¶
func (x *Config) MarshalProtoJSON(s *json.MarshalState)
MarshalProtoJSON marshals the Config message to JSON.
func (*Config) MarshalProtoText ¶
func (*Config) MarshalToSizedBufferVT ¶
func (*Config) ProtoMessage ¶
func (*Config) ProtoMessage()
func (*Config) ToPluginCompilerConf ¶
func (c *Config) ToPluginCompilerConf() (*bldr_plugin_compiler_go.Config, error)
ToPluginCompilerConf converts the Config to a PluginCompilerConf.
func (*Config) UnmarshalJSON ¶
UnmarshalJSON unmarshals the Config from JSON.
func (*Config) UnmarshalProtoJSON ¶
func (x *Config) UnmarshalProtoJSON(s *json.UnmarshalState)
UnmarshalProtoJSON unmarshals the Config message from JSON.
func (*Config) UnmarshalVT ¶
type Controller ¶
type Controller struct {
*bus.BusController[*Config]
}
Controller is the compiler controller.
func (*Controller) BuildManifest ¶
func (c *Controller) BuildManifest( ctx context.Context, args *bldr_manifest_builder.BuildManifestArgs, host bldr_manifest_builder.BuildManifestHost, ) (*bldr_manifest_builder.BuilderResult, error)
BuildManifest attempts to compile the manifest once.
func (*Controller) BundleElectronHook ¶
func (c *Controller) BundleElectronHook( ctx context.Context, builderConf *bldr_manifest_builder.BuilderConfig, worldEng world.Engine, ) (*plugin_compiler_go.PreBuildHookResult, error)
BundleElectronHook bundles electron.
func (*Controller) BundleSaucerHook ¶
func (c *Controller) BundleSaucerHook( ctx context.Context, builderConf *bldr_manifest_builder.BuilderConfig, worldEng world.Engine, ) (*plugin_compiler_go.PreBuildHookResult, error)
BundleSaucerHook bundles saucer.
func (*Controller) Execute ¶
func (c *Controller) Execute(ctx context.Context) error
Execute executes the controller goroutine.
func (*Controller) GetSupportedPlatforms ¶
func (c *Controller) GetSupportedPlatforms() []string
GetSupportedPlatforms returns the base platform IDs this compiler supports.
func (*Controller) SupportsStartupManifestCache ¶
func (c *Controller) SupportsStartupManifestCache() bool
SupportsStartupManifestCache returns true if startup cache reuse is safe.
type Factory ¶
type Factory = bus.BusFactory[*Config, *Controller]
Factory is the factory for the compiler controller.
type NativeAppConfig ¶
type NativeAppConfig struct {
// AppName is the display name of the application.
AppName string `protobuf:"bytes,1,opt,name=app_name,json=appName,proto3" json:"appName,omitempty"`
// WindowTitle overrides the default window title.
WindowTitle string `protobuf:"bytes,2,opt,name=window_title,json=windowTitle,proto3" json:"windowTitle,omitempty"`
// WindowWidth is the default window width in pixels.
WindowWidth uint32 `protobuf:"varint,3,opt,name=window_width,json=windowWidth,proto3" json:"windowWidth,omitempty"`
// WindowHeight is the default window height in pixels.
WindowHeight uint32 `protobuf:"varint,4,opt,name=window_height,json=windowHeight,proto3" json:"windowHeight,omitempty"`
// DevTools controls whether DevTools open automatically.
DevTools bool `protobuf:"varint,5,opt,name=dev_tools,json=devTools,proto3" json:"devTools,omitempty"`
// ThemeSource overrides the native theme ("dark", "light", "system").
ThemeSource string `protobuf:"bytes,6,opt,name=theme_source,json=themeSource,proto3" json:"themeSource,omitempty"`
// IconPath is the path to the application icon PNG (relative to project root).
// Used for dev-mode branding of the extracted Electron binary.
IconPath string `protobuf:"bytes,7,opt,name=icon_path,json=iconPath,proto3" json:"iconPath,omitempty"`
// QuitPolicy configures whether user quit should restart or exit.
QuitPolicy QuitPolicy `protobuf:"varint,8,opt,name=quit_policy,json=quitPolicy,proto3" json:"quitPolicy,omitempty"`
// contains filtered or unexported fields
}
NativeAppConfig configures branding for native app renderers.
func (*NativeAppConfig) CloneMessageVT ¶
func (m *NativeAppConfig) CloneMessageVT() protobuf_go_lite.CloneMessage
func (*NativeAppConfig) CloneVT ¶
func (m *NativeAppConfig) CloneVT() *NativeAppConfig
func (*NativeAppConfig) EqualMessageVT ¶
func (this *NativeAppConfig) EqualMessageVT(thatMsg any) bool
func (*NativeAppConfig) EqualVT ¶
func (this *NativeAppConfig) EqualVT(that *NativeAppConfig) bool
func (*NativeAppConfig) GetAppName ¶
func (x *NativeAppConfig) GetAppName() string
func (*NativeAppConfig) GetDevTools ¶
func (x *NativeAppConfig) GetDevTools() bool
func (*NativeAppConfig) GetIconPath ¶
func (x *NativeAppConfig) GetIconPath() string
func (*NativeAppConfig) GetQuitPolicy ¶
func (x *NativeAppConfig) GetQuitPolicy() QuitPolicy
func (*NativeAppConfig) GetThemeSource ¶
func (x *NativeAppConfig) GetThemeSource() string
func (*NativeAppConfig) GetWindowHeight ¶
func (x *NativeAppConfig) GetWindowHeight() uint32
func (*NativeAppConfig) GetWindowTitle ¶
func (x *NativeAppConfig) GetWindowTitle() string
func (*NativeAppConfig) GetWindowWidth ¶
func (x *NativeAppConfig) GetWindowWidth() uint32
func (*NativeAppConfig) MarshalJSON ¶
func (x *NativeAppConfig) MarshalJSON() ([]byte, error)
MarshalJSON marshals the NativeAppConfig to JSON.
func (*NativeAppConfig) MarshalProtoJSON ¶
func (x *NativeAppConfig) MarshalProtoJSON(s *json.MarshalState)
MarshalProtoJSON marshals the NativeAppConfig message to JSON.
func (*NativeAppConfig) MarshalProtoText ¶
func (x *NativeAppConfig) MarshalProtoText() string
func (*NativeAppConfig) MarshalToSizedBufferVT ¶
func (m *NativeAppConfig) MarshalToSizedBufferVT(dAtA []byte) (int, error)
func (*NativeAppConfig) MarshalToVT ¶
func (m *NativeAppConfig) MarshalToVT(dAtA []byte) (int, error)
func (*NativeAppConfig) MarshalVT ¶
func (m *NativeAppConfig) MarshalVT() (dAtA []byte, err error)
func (*NativeAppConfig) ProtoMessage ¶
func (*NativeAppConfig) ProtoMessage()
func (*NativeAppConfig) Reset ¶
func (x *NativeAppConfig) Reset()
func (*NativeAppConfig) SizeVT ¶
func (m *NativeAppConfig) SizeVT() (n int)
func (*NativeAppConfig) String ¶
func (x *NativeAppConfig) String() string
func (*NativeAppConfig) UnmarshalJSON ¶
func (x *NativeAppConfig) UnmarshalJSON(b []byte) error
UnmarshalJSON unmarshals the NativeAppConfig from JSON.
func (*NativeAppConfig) UnmarshalProtoJSON ¶
func (x *NativeAppConfig) UnmarshalProtoJSON(s *json.UnmarshalState)
UnmarshalProtoJSON unmarshals the NativeAppConfig message from JSON.
func (*NativeAppConfig) UnmarshalVT ¶
func (m *NativeAppConfig) UnmarshalVT(dAtA []byte) error
type QuitPolicy ¶
type QuitPolicy int32
QuitPolicy configures how native desktop runtimes should behave on user quit.
const ( // QUIT_POLICY_UNSPECIFIED lets the compiler pick the default for the build. QuitPolicy_QUIT_POLICY_UNSPECIFIED QuitPolicy = 0 // QUIT_POLICY_RESTART keeps the host restart-friendly after user quit. QuitPolicy_QUIT_POLICY_RESTART QuitPolicy = 1 // QUIT_POLICY_EXIT exits cleanly without restart after user quit. QuitPolicy_QUIT_POLICY_EXIT QuitPolicy = 2 )
func (QuitPolicy) Enum ¶
func (x QuitPolicy) Enum() *QuitPolicy
func (QuitPolicy) MarshalJSON ¶
func (x QuitPolicy) MarshalJSON() ([]byte, error)
MarshalJSON marshals the QuitPolicy to JSON.
func (QuitPolicy) MarshalProtoJSON ¶
func (x QuitPolicy) MarshalProtoJSON(s *json.MarshalState)
MarshalProtoJSON marshals the QuitPolicy to JSON.
func (QuitPolicy) MarshalProtoText ¶
func (x QuitPolicy) MarshalProtoText() string
func (QuitPolicy) MarshalText ¶
func (x QuitPolicy) MarshalText() ([]byte, error)
MarshalText marshals the QuitPolicy to text.
func (QuitPolicy) String ¶
func (x QuitPolicy) String() string
func (*QuitPolicy) UnmarshalJSON ¶
func (x *QuitPolicy) UnmarshalJSON(b []byte) error
UnmarshalJSON unmarshals the QuitPolicy from JSON.
func (*QuitPolicy) UnmarshalProtoJSON ¶
func (x *QuitPolicy) UnmarshalProtoJSON(s *json.UnmarshalState)
UnmarshalProtoJSON unmarshals the QuitPolicy from JSON.
func (*QuitPolicy) UnmarshalText ¶
func (x *QuitPolicy) UnmarshalText(b []byte) error
UnmarshalText unmarshals the QuitPolicy from text.