exampleplugin

package
v0.1.6 Latest Latest
Warning

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

Go to latest
Published: Jul 13, 2026 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Overview

Package exampleplugin is a reference goboot plugin demonstrating every extension point (§46): it registers an annotation, contributes semantic analysis, generates an artifact, and provides a SQL dialect (as a database driver would). It doubles as documentation for plugin authors and as the end-to-end test subject for the plugin host.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Plugin

type Plugin struct{}

Plugin implements plugin.Plugin plus every optional capability interface.

func New

func New() *Plugin

New returns the example plugin.

func (*Plugin) Analyze

func (*Plugin) Analyze(app *model.Application) []*annotation.Diagnostic

Analyze reports an informational summary of the application (§46.1). It never mutates the model.

func (*Plugin) Annotations

func (*Plugin) Annotations() []*annotation.Definition

Annotations registers the @Exposed marker so the compiler recognizes it.

func (*Plugin) Dialects

func (*Plugin) Dialects() map[string]sqlgen.Dialect

Dialects registers a SQL Server dialect, illustrating how a database driver contributes its placeholder style (§27.4). SQL Server uses @p1, @p2, ...

func (*Plugin) Generate

func (*Plugin) Generate(app *model.Application) ([]plugin.File, error)

Generate emits a deterministic component manifest artifact (§46.1). It carries the generated-file marker so `goboot clean` removes it.

func (*Plugin) Name

func (*Plugin) Name() string

func (*Plugin) Version

func (*Plugin) Version() string

Jump to

Keyboard shortcuts

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