project

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jul 13, 2026 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrRevisionMismatch = errors.New("project revision mismatch")
	ErrInvalidManifest  = errors.New("invalid project manifest")
	ErrNotFound         = errors.New("project resource not found")
	ErrAlreadyExists    = errors.New("project resource already exists")
)

Functions

func Create

func Create(workspace string, manifest Manifest) (string, error)

Create initializes the manifest and its managed-file source state. Provider project IDs may intentionally be empty during onboarding.

func CreateExample

func CreateExample(workspace string) (string, error)

func ManifestPath

func ManifestPath(workspace string) string

func Validate

func Validate(manifest Manifest) error

Types

type Environment

type Environment struct {
	ID       string   `yaml:"id" json:"id"`
	Name     string   `yaml:"name" json:"name"`
	Kind     string   `yaml:"kind" json:"kind"`
	Provider Provider `yaml:"provider" json:"provider"`
	Publish  Publish  `yaml:"publish" json:"publish"`
}

type Manifest

type Manifest struct {
	Version      int           `yaml:"version" json:"version"`
	Project      Project       `yaml:"project" json:"project"`
	Pack         PackReference `yaml:"pack" json:"pack"`
	Source       Source        `yaml:"source" json:"source"`
	Environments []Environment `yaml:"environments" json:"environments"`
}

func Load

func Load(workspace string) (Manifest, error)

type PackReference

type PackReference struct {
	ID string `yaml:"id" json:"id"`
}

type Project

type Project struct {
	ID                        string                    `yaml:"id" json:"id"`
	Name                      string                    `yaml:"name" json:"name"`
	ReleaseConfirmationPolicy ReleaseConfirmationPolicy `yaml:"release_confirmation_policy" json:"release_confirmation_policy"`
}

type Provider

type Provider struct {
	Type      string `yaml:"type" json:"type"`
	ProjectID string `yaml:"project_id" json:"project_id"`
}

type Publish

type Publish struct {
	RequiresConfirmation bool `yaml:"requires_confirmation" json:"requires_confirmation"`
}

type ReleaseConfirmationPolicy

type ReleaseConfirmationPolicy struct {
	ProductionLowRiskMode string `yaml:"production_low_risk_mode" json:"production_low_risk_mode"`
}

ReleaseConfirmationPolicy is project-level by ADR-006. Empty values from older manifests resolve to environment_id during plan construction.

type RevisionMismatchError

type RevisionMismatchError struct {
	Expected uint64
	Current  uint64
	Snapshot Snapshot
}

func (*RevisionMismatchError) Error

func (e *RevisionMismatchError) Error() string

func (*RevisionMismatchError) Unwrap

func (e *RevisionMismatchError) Unwrap() error

type Snapshot

type Snapshot struct {
	Manifest Manifest
	Revision uint64
	Digest   string
}

type Source

type Source struct {
	Type    string `yaml:"type" json:"type"`
	Profile string `yaml:"profile,omitempty" json:"profile,omitempty"`
}

type Store

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

func Open

func Open(workspace string) (*Store, error)

func (*Store) Snapshot

func (s *Store) Snapshot() (Snapshot, error)

func (*Store) Update

func (s *Store) Update(expectedRevision uint64, mutate func(*Manifest) error) (Snapshot, error)

Jump to

Keyboard shortcuts

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