initialize

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Aug 14, 2026 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Overview

Package initialize installs Aruo's managed engineering contract into an existing repository.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AugmentPlan

func AugmentPlan(plan templateengine.Plan) (templateengine.Plan, error)

AugmentPlan merges the managed Aruo contract into a rendered creation plan. The caller can then commit application files and governance files through one atomic writer operation.

Types

type FileChange

type FileChange struct {
	Path   string `json:"path"`
	Action string `json:"action"`
}

FileChange describes one proposed managed file.

type Plan

type Plan struct {
	Repository string       `json:"repository"`
	Stack      Stack        `json:"stack"`
	Changes    []FileChange `json:"changes"`
	Conflicts  []string     `json:"conflicts,omitempty"`
	// contains filtered or unexported fields
}

Plan is a side-effect-free initialization proposal.

type Request

type Request struct {
	Target string
}

Request describes one repository adoption operation.

type Result

type Result struct {
	Repository string       `json:"repository"`
	Stack      Stack        `json:"stack"`
	Changes    []FileChange `json:"changes"`
	DryRun     bool         `json:"dryRun"`
}

Result describes a completed or dry-run initialization.

type Service

type Service struct{}

Service plans and installs the embedded contract without touching application code.

func NewService

func NewService() *Service

NewService constructs the stateless initializer.

func (*Service) Apply

func (s *Service) Apply(ctx context.Context, plan Plan) (Result, error)

Apply commits a previously computed conflict-free plan through same-parent staging.

func (*Service) Plan

func (s *Service) Plan(ctx context.Context, request Request) (Plan, error)

Plan inspects target and returns every proposed write without mutating it.

type Stack

type Stack struct {
	Ecosystem      string   `json:"ecosystem"`
	Frameworks     []string `json:"frameworks"`
	PackageManager string   `json:"packageManager,omitempty"`
}

Stack is the deterministic local stack observation written by init.

Jump to

Keyboard shortcuts

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