create

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Jul 17, 2026 License: MIT Imports: 19 Imported by: 0

Documentation

Index

Constants

View Source
const (
	FcrepoStateOn  = "on"
	FcrepoStateOff = "off"

	IIIFCantaloupe       = "cantaloupe"
	IIIFTriplet          = "triplet"
	IIIFTopologyLocal    = "local"
	IIIFTopologyExternal = "external"

	DerivativeTopologyLocal       = "local"
	DerivativeTopologyDistributed = "distributed"

	CodebaseNested  = "nested"
	CodebaseGitRoot = "git-root"

	DefaultDrupalRootfs      = "drupal/rootfs/var/www/drupal"
	DefaultISLEFileSystemURI = "private"
	PublicISLEFileSystemURI  = "public"
	PrivateISLEFileSystemURI = "private"

	// LocalDrupalBaseURL is the internal Traefik route used by local Fcrepo
	// clients that cannot reach the host machine's localhost.
	LocalDrupalBaseURL = "http://" + localDrupalHost
)
View Source
const (
	FeatureBundleMergePDF   = "mergepdf"
	FeatureBundleHOCRSearch = "hocr-search"

	HOCRStructuredTextTermOption = "structured-text-term"
	IslandoraTagOption           = "islandora-tag"
)
View Source
const DefaultTrustedHostPatterns = "^localhost$"

DefaultTrustedHostPatterns is the Drupal trusted-host regex for local sites.

Variables

This section is empty.

Functions

func Apply

func Apply(opts Options) error

func ApplyBotMitigation added in v0.12.0

func ApplyBotMitigation(projectDir, state string) error

func ApplyDerivativeServices added in v0.13.0

func ApplyDerivativeServices(opts Options) error

ApplyDerivativeServices applies the requested local or distributed topology for derivative services in docker-compose.yml and docker-compose.dev.yml.

func ApplyFeatureBundles added in v1.0.0

func ApplyFeatureBundles(opts Options) error

ApplyFeatureBundles converges all explicitly requested bundles. Every target-state preflight runs before any project file is changed.

func ApplyIIIF added in v0.11.0

func ApplyIIIF(opts Options) error

func BotMitigationOptions added in v0.17.0

func BotMitigationOptions() coretraefik.BotMitigationOptions

func CheckFeatureBundleProject added in v1.0.0

func CheckFeatureBundleProject(opts Options, name string) error

CheckFeatureBundleProject verifies both Compose compatibility and the project files an enabled bundle will mutate. It never changes the project.

func CheckFeatureBundleRequirements added in v1.0.0

func CheckFeatureBundleRequirements(opts Options, name string) error

CheckFeatureBundleRequirements verifies the current Compose project without mutating it.

func DerivativeServiceNames added in v0.13.0

func DerivativeServiceNames() []string

DerivativeServiceNames returns the derivative service names in catalog order.

func FeatureBundleCurrentOptions added in v1.0.0

func FeatureBundleCurrentOptions(projectDir, drupalRootfs string, envFiles []string, name string) map[string]string

FeatureBundleCurrentOptions reads bundle-specific values from an existing checkout so interactive review preserves downstream choices.

func FeatureBundleNames added in v1.0.0

func FeatureBundleNames() []string

FeatureBundleNames returns feature names in catalog order.

func IsDerivativeService added in v0.13.0

func IsDerivativeService(name string) bool

IsDerivativeService reports whether name is a known derivative service.

func IsFeatureBundle added in v1.0.0

func IsFeatureBundle(name string) bool

IsFeatureBundle reports whether name is a known feature bundle.

func SyncBotMitigationBypass added in v0.17.0

func SyncBotMitigationBypass(projectDir string) error

func SyncBotMitigationBypassContext added in v0.17.3

func SyncBotMitigationBypassContext(ctx *config.Context) error

func SyncLocalDrupalInternalIngress added in v0.17.0

func SyncLocalDrupalInternalIngress(projectDir string, enabled bool) error

func SyncLocalDrupalInternalIngressContext added in v0.17.3

func SyncLocalDrupalInternalIngressContext(ctx *config.Context, enabled bool) error

func TrustedHostPatterns added in v0.17.0

func TrustedHostPatterns(domain string, includeLocalDrupal bool) string

TrustedHostPatterns returns comma-separated Drupal trusted host regexes.

func ValidateFeatureBundleObservedState added in v1.0.0

func ValidateFeatureBundleObservedState(opts Options, name string, enabled bool) error

ValidateFeatureBundleObservedState checks state details that the sitectl v1 generic YAML rules cannot express exactly, such as whitespace-delimited scalar tokens and equality across several Drupal configuration paths.

Types

type DerivativeServiceSpec added in v0.13.0

type DerivativeServiceSpec struct {
	Name        string
	ImageRef    string
	AlpacaEnv   string
	ExternalURL string
	LocalURL    string
	NeedsJWT    bool
}

DerivativeServiceSpec describes one derivative microservice and the URLs used when it runs locally or through the managed LibOps endpoint.

func DerivativeServiceSpecs added in v0.13.0

func DerivativeServiceSpecs() []DerivativeServiceSpec

DerivativeServiceSpecs returns the canonical derivative service catalog.

type FeatureBundleSpec added in v1.0.0

type FeatureBundleSpec struct {
	Name                 string
	DefaultState         corecomponent.State
	ComposeService       string
	ComposeAsset         string
	RequiredComposeKeys  []string
	RequiredSecrets      []string
	DrupalAssets         []string
	DrupalMutations      []FeatureYAMLMutation
	ComposerRequirements map[string]string
	ImageRequirements    []FeatureImageRequirement
}

FeatureBundleSpec describes a reviewable feature that may own Compose, Drupal config, and Composer requirements together.

func FeatureBundleSpecByName added in v1.0.0

func FeatureBundleSpecByName(name string) (FeatureBundleSpec, bool)

FeatureBundleSpecByName returns the canonical bundle definition.

func FeatureBundleSpecs added in v1.0.0

func FeatureBundleSpecs() []FeatureBundleSpec

FeatureBundleSpecs returns a copy of the canonical bundle catalog.

type FeatureImageRequirement added in v1.0.0

type FeatureImageRequirement struct {
	Service                string
	Repository             string
	MinimumVersion         string
	CompatibleRepositories []string
	RejectUnknown          bool
}

FeatureImageRequirement describes a Compose image compatibility boundary. The minimum applies when Repository is selected. CompatibleRepositories are independently maintained images known to provide the required capability.

type FeatureYAMLMutation added in v1.0.0

type FeatureYAMLMutation struct {
	File         string
	Path         string
	Kind         string
	Value        any
	OptionName   string
	DefaultValue string
	PresenceOnly bool
	// RestoreOnDisable preserves a value that the upstream hOCR patch replaces
	// instead of adding. DisableValue is the pre-feature starter-site value.
	RestoreOnDisable bool
	DisableValue     any
}

FeatureYAMLMutation is one narrowly owned Drupal config mutation in a feature bundle. Set mutations are deleted when the bundle is disabled; appended sequence items and scalar tokens are removed individually.

type Options

type Options struct {
	Path                 string
	DrupalRootfs         string
	Fcrepo               string
	Blazegraph           string
	IIIF                 string
	IIIFTopology         string
	IIIFUpstreamURL      string
	BotMitigation        string
	ComposeOverride      string
	ISLEFileSystemURI    string
	DerivativeServices   map[string]string
	FeatureBundles       map[string]string
	FeatureBundleOptions map[string]map[string]string
	EnvFiles             []string
	Codebase             string
}

Jump to

Keyboard shortcuts

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