Documentation
¶
Index ¶
- Constants
- func Apply(opts Options) error
- func ApplyBotMitigation(projectDir, state string) error
- func ApplyDerivativeServices(opts Options) error
- func ApplyFeatureBundles(opts Options) error
- func ApplyIIIF(opts Options) error
- func BotMitigationOptions() coretraefik.BotMitigationOptions
- func CheckFeatureBundleProject(opts Options, name string) error
- func CheckFeatureBundleRequirements(opts Options, name string) error
- func DerivativeServiceNames() []string
- func FeatureBundleCurrentOptions(projectDir, drupalRootfs string, envFiles []string, name string) map[string]string
- func FeatureBundleNames() []string
- func IsDerivativeService(name string) bool
- func IsFeatureBundle(name string) bool
- func SyncBotMitigationBypass(projectDir string) error
- func SyncBotMitigationBypassContext(ctx *config.Context) error
- func SyncLocalDrupalInternalIngress(projectDir string, enabled bool) error
- func SyncLocalDrupalInternalIngressContext(ctx *config.Context, enabled bool) error
- func TrustedHostPatterns(domain string, includeLocalDrupal bool) string
- func ValidateFeatureBundleObservedState(opts Options, name string, enabled bool) error
- type DerivativeServiceSpec
- type FeatureBundleSpec
- type FeatureImageRequirement
- type FeatureYAMLMutation
- type Options
Constants ¶
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 )
const ( FeatureBundleMergePDF = "mergepdf" FeatureBundleHOCRSearch = "hocr-search" HOCRStructuredTextTermOption = "structured-text-term" IslandoraTagOption = "islandora-tag" )
const DefaultTrustedHostPatterns = "^localhost$"
DefaultTrustedHostPatterns is the Drupal trusted-host regex for local sites.
Variables ¶
This section is empty.
Functions ¶
func ApplyBotMitigation ¶ added in v0.12.0
func ApplyDerivativeServices ¶ added in v0.13.0
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
ApplyFeatureBundles converges all explicitly requested bundles. Every target-state preflight runs before any project file is changed.
func BotMitigationOptions ¶ added in v0.17.0
func BotMitigationOptions() coretraefik.BotMitigationOptions
func CheckFeatureBundleProject ¶ added in v1.0.0
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
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
IsDerivativeService reports whether name is a known derivative service.
func IsFeatureBundle ¶ added in v1.0.0
IsFeatureBundle reports whether name is a known feature bundle.
func SyncBotMitigationBypass ¶ added in v0.17.0
func SyncBotMitigationBypassContext ¶ added in v0.17.3
func SyncLocalDrupalInternalIngress ¶ added in v0.17.0
func SyncLocalDrupalInternalIngressContext ¶ added in v0.17.3
func TrustedHostPatterns ¶ added in v0.17.0
TrustedHostPatterns returns comma-separated Drupal trusted host regexes.
func ValidateFeatureBundleObservedState ¶ added in v1.0.0
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
}