plugin

package
v0.25.3 Latest Latest
Warning

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

Go to latest
Published: Jun 12, 2026 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Register

func Register(s Service)

Register adds a service to the global registry.

Types

type Service

type Service interface {
	// Name returns the service identifier (e.g., "database", "api", "grpc", "log").
	Name() string

	// Label returns the UI badge label for the dashboard.
	Label() string

	// Detect runs auto-detection on the project directory.
	// Returns nil if the service is not detected.
	Detect(dir string) interface{}

	// Commands returns the cobra commands to register for this service.
	Commands() []*cobra.Command

	// IsConfigured checks if the config has this service set up.
	IsConfigured(cfg interface{}) bool
}

Service is the interface that each built-in service type must implement. This allows tinker to be extended with new service types (Redis, Kafka, etc.) without modifying core code.

func Find

func Find(name string) Service

Find returns a service by name.

func Services

func Services() []Service

Services returns all registered services.

Jump to

Keyboard shortcuts

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