service

package
v0.5.1 Latest Latest
Warning

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

Go to latest
Published: Jul 3, 2026 License: MIT Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HotReloadInit

func HotReloadInit(servicePath string, containerized, usesDoppler bool) error

HotReloadInit generates the Air configuration for a service. The plain .air.toml is always produced for host development; a containerised service additionally gets a Docker-tuned .air.docker.toml.

Both configs are tuned after `air init` so they build the service's ./cmd entrypoint rather than Air's default package. When the project uses Doppler, the host .air.toml also loads the fetched secrets file from .secrets/ — the container variant gets the same secrets through compose's env_file instead.

func Rename

func Rename(ctx *project.Context, oldName, newName string) error

Rename moves the service at oldName to newName, rewriting every place the identifier is embedded: module path, internal imports across sibling services, container build paths, Air watch targets, secrets file names, and the project.toml entry. It then runs the same post-write reconciliation that Delete uses (compose + Taskfile + gitignore + doppler + gomod) so the regenerated files key off the new service name.

The operation is not transactional: every change is logged so a partial failure leaves a readable trail. Rename is its own inverse — running `maestro rename <new> <old>` reverses a partial run.

Types

type Service

type Service struct {
	// contains filtered or unexported fields
}

func New

func New(name string, ctx *project.Context) *Service

func (*Service) Delete

func (s *Service) Delete() error

func (*Service) Generate

func (s *Service) Generate() error

func (*Service) WithDB

func (s *Service) WithDB(db projectcfg.ServiceConfig) *Service

WithDB sets the database choice captured by the dbwizard. Generate will persist this into project.toml and pass it to the generators that need it.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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