Documentation ¶
Overview ¶
Package build includes standard mage targets useful when building plugins.
Index ¶
- func BuildAll()
- func Clean() error
- func Coverage() error
- func Debugger() error
- func Format() error
- func Lint() error
- func ReloadPlugin() error
- func SetBeforeBuildCallback(cb BeforeBuildCallback) error
- func Test() error
- func Watch() error
- type BeforeBuildCallback
- type Build
- type Config
- type E2E
- type Info
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Debugger ¶
func Debugger() error
Debugger makes a new debug build, re-launches the plugin and attaches the Delve debugger, in headless mode listening on port 3222.
The plugin process is killed after re-building, in order to make Grafana launch the new version. Once the new version is up, we attach to it with Delve.
func ReloadPlugin ¶
func ReloadPlugin() error
ReloadPlugin - kills any running instances and waits for grafana to reload the plugin
func SetBeforeBuildCallback ¶
func SetBeforeBuildCallback(cb BeforeBuildCallback) error
SetBeforeBuildCallback configures a custom callback
Types ¶
type BeforeBuildCallback ¶
BeforeBuildCallback hooks into the build process
type Build ¶
Build is a namespace.
func (Build) DarwinARM64 ¶
DarwinARM64 builds the back-end plugin for OSX on ARM (M1).
func (Build) GenerateManifestFile ¶
GenerateManifestFile generates a manifest file for plugin submissions
func (Build) LinuxARM64 ¶
LinuxARM64 builds the back-end plugin for Linux on ARM64.
type Config ¶
type Config struct { OS string // GOOS Arch string // GOOS EnableDebug bool CustomVars map[string]string Env map[string]string EnableCGo bool RootPackagePath string OutputBinaryPath string }
Config holds the setup variables required for a build
type E2E ¶
E2E is a namespace.
func (E2E) Certificate ¶
Certificate prints the CA certificate to stdout.
type Info ¶
type Info struct { Time int64 `json:"time,omitempty"` Version string `json:"version,omitempty"` Repo string `json:"repo,omitempty"` Branch string `json:"branch,omitempty"` Hash string `json:"hash,omitempty"` Build int64 `json:"build,omitempty"` PR int64 `json:"pr,omitempty"` }
Info See also PluginBuildInfo in https://github.com/grafana/grafana/blob/master/pkg/plugins/models.go
func GetBuildInfo ¶
GetBuildInfo returns the build information that was compiled into the binary using: -X `github.com/ydb-platform/grafana-plugin-sdk-go/build.buildInfoJSON={...}`