root

package
v0.2.21 Latest Latest
Warning

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

Go to latest
Published: Sep 9, 2026 License: MPL-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Root

type Root struct {
	ID          RootID              `json:"id"`
	StorageKey  basespec.StorageKey `json:"storageKey"`
	DisplayName string              `json:"displayName"`
	Description string              `json:"description,omitempty"`
	Revision    uint64              `json:"revision"`
	CreatedAt   time.Time           `json:"createdAt"`
	ModifiedAt  time.Time           `json:"modifiedAt"`
	RetiredAt   *time.Time          `json:"retiredAt,omitempty"`
}

func (Root) Validate

func (r Root) Validate() error

type RootDeletionPolicy

type RootDeletionPolicy interface {
	IsRootDeletionProtected(rootID RootID) bool
}

RootDeletionPolicy is an optional lifecycle policy for Roots that must remain present while still allowing ordinary mutation of their descendants.

A retained Root is intentionally different from a protected topology Root: protected Roots reject ordinary Source, Collection, and Artifact mutations; retained Roots reject only Root retirement and purge.

type RootDraft

type RootDraft struct {
	ID          RootID              `json:"id"                    required:"true"`
	StorageKey  basespec.StorageKey `json:"storageKey"            required:"true"`
	DisplayName string              `json:"displayName"           required:"true"`
	Description string              `json:"description,omitempty"`
}

RootDraft is the caller-owned input for Root creation.

type RootID

type RootID string

func (RootID) Validate

func (v RootID) Validate() error

type RootPolicy

type RootPolicy interface {
	IsProtectedRoot(r RootID) bool
}

RootPolicy identifies Roots whose ordinary mutations are prohibited. The application composition owns the concrete policy and the protected-root declaration. Artifact Store does not know which application feature owns it.

type RootUpdate

type RootUpdate struct {
	ExpectedRevision uint64 `json:"expectedRevision"`
	DisplayName      string `json:"displayName"`
	Description      string `json:"description,omitempty"`
}

RootUpdate is the caller-owned input for a Root metadata update.

Jump to

Keyboard shortcuts

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