Documentation
¶
Overview ¶
Package ext_initial implements the OCFL "initial" extension. This extension allows indication that the semantics of a particular extension takes precedence over all other extensions.
Index ¶
- Constants
- Variables
- func GetInitialParams() ([]*extension.ExternalParam, error)
- func NewInitial() (extension.Extension, error)
- type Initial
- func (sl *Initial) GetConfig() any
- func (sl *Initial) GetExtension() string
- func (sl *Initial) GetName() string
- func (sl *Initial) IsRegistered() bool
- func (sl *Initial) Load(data json.RawMessage, _ fs.FS) error
- func (sl *Initial) SetExtension(ext string)
- func (sl *Initial) SetParams(params map[string]string) error
- func (sl *Initial) Terminate() error
- func (sl *Initial) WithLogger(logger ocfllogger.OCFLLogger) extension.Extension
- func (sl *Initial) WriteConfig(fsys appendfs.FS) error
- type InitialConfig
Constants ¶
const InitialDescription = "initial extension defines the name of the extension manager"
InitialDescription is a short description of the extension's purpose.
const InitialName = "initial"
InitialName is the unique name of the extension.
Variables ¶
var InitialDoc string
InitialDoc contains the documentation for the extension.
Functions ¶
func GetInitialParams ¶
func GetInitialParams() ([]*extension.ExternalParam, error)
GetInitialParams returns the external parameters supported by this extension.
func NewInitial ¶
NewInitial creates a new instance of the Initial extension with default configuration.
Types ¶
type Initial ¶
type Initial struct {
*InitialConfig
// contains filtered or unexported fields
}
Initial represents the initial extension instance.
func (*Initial) GetExtension ¶
GetExtension returns the functional extension name.
func (*Initial) IsRegistered ¶
IsRegistered returns true if the extension is registered.
func (*Initial) SetExtension ¶
SetExtension sets the functional extension name.
func (*Initial) WithLogger ¶
func (sl *Initial) WithLogger(logger ocfllogger.OCFLLogger) extension.Extension
WithLogger sets the logger for the extension and returns the extension itself.
type InitialConfig ¶
type InitialConfig struct {
*extension.ExtensionConfig
Extension string `json:"extension"`
}
InitialConfig holds the configuration for the initial extension.