Documentation
¶
Index ¶
- func DefaultFiles(m RegisterableMetadata, format Format) (map[string][]byte, error)
- func ParseMetadataXml(i MetadataPointer, path string) error
- func ParseMetadataXmlIfPossible(i MetadataPointer, path string) ([]byte, error)
- type FileContents
- type FilesGenerator
- type Format
- type MetadataFilePath
- type MetadataInfo
- type MetadataObjectName
- type MetadataPointer
- type MetadataType
- type RegisterableMetadata
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DefaultFiles ¶
func DefaultFiles(m RegisterableMetadata, format Format) (map[string][]byte, error)
DefaultFiles provides a default implementation of the Files method for metadata types that consist of a single XML file without associated code files
func ParseMetadataXml ¶
func ParseMetadataXml(i MetadataPointer, path string) error
func ParseMetadataXmlIfPossible ¶
func ParseMetadataXmlIfPossible(i MetadataPointer, path string) ([]byte, error)
Types ¶
type FileContents ¶
FileContents represents a file's path and content
type FilesGenerator ¶
type FilesGenerator interface {
// Files returns a map of files that make up this metadata component
// The map key is the relative file path, the value contains the content
Files(format Format) (map[string][]byte, error)
}
FilesGenerator is an optional interface that metadata types can implement to provide custom file generation logic
type MetadataFilePath ¶
type MetadataFilePath string
type MetadataInfo ¶
type MetadataInfo struct {
// contains filtered or unexported fields
}
func (MetadataInfo) Contents ¶
func (m MetadataInfo) Contents() []byte
func (MetadataInfo) GetMetadataInfo ¶
func (m MetadataInfo) GetMetadataInfo() MetadataInfo
func (MetadataInfo) Name ¶
func (m MetadataInfo) Name() MetadataObjectName
func (MetadataInfo) NameFromPath ¶
func (m MetadataInfo) NameFromPath(path string) MetadataObjectName
func (MetadataInfo) Path ¶
func (m MetadataInfo) Path() MetadataFilePath
type MetadataObjectName ¶
type MetadataObjectName string
func NameFromPath ¶
func NameFromPath(path string) MetadataObjectName
type MetadataPointer ¶
type MetadataPointer interface {
// SetMetadata should have a pointer receiver. This ensures that functions
// that take a MetadataPointer receive a pointer.
SetMetadata(MetadataInfo)
NameFromPath(path string) MetadataObjectName
}
type MetadataType ¶
type MetadataType = string
type RegisterableMetadata ¶
type RegisterableMetadata interface {
MetadataPointer
GetMetadataInfo() MetadataInfo
Type() MetadataType
}
Click to show internal directories.
Click to hide internal directories.