registry

package
v0.35.0 Latest Latest
Warning

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

Go to latest
Published: Feb 28, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

Package registry provides metadata type registry information without circular dependencies

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetCanonicalDirectoryName

func GetCanonicalDirectoryName(metadataType string) string

GetCanonicalDirectoryName returns the proper directory name for a metadata type considering both the type itself and any parent-child relationships

func GetMetadataDirectory

func GetMetadataDirectory(metadataType string) string

GetMetadataDirectory returns the canonical directory name for a given metadata type.

func GetMetadataSuffix

func GetMetadataSuffix(metadataType string) string

GetMetadataSuffix returns the file suffix for a given metadata type

func GetParentType

func GetParentType(childType string) string

GetParentType returns the parent metadata type for child types like CustomField

func IsChildType

func IsChildType(metadataType string) bool

IsChildType returns true if the metadata type is a child of another type

Types

type FilesHelper

type FilesHelper struct {
	MetadataType string
	Name         string
	Content      interface{} // The metadata struct to marshal
}

FilesHelper provides a helper for implementing the Files() method for metadata types that consist of a single XML file without associated code files

func (*FilesHelper) GenerateFiles

func (h *FilesHelper) GenerateFiles(format string) (map[string][]byte, error)

GenerateFiles generates the files map for a metadata component

type MetadataRegistry

type MetadataRegistry struct {
	ChildTypes           map[string]string            `json:"childTypes"`
	StrictDirectoryNames map[string]string            `json:"strictDirectoryNames"`
	Suffixes             map[string]string            `json:"suffixes"`
	Types                map[string]*MetadataTypeInfo `json:"types"`
}

type MetadataTypeInfo

type MetadataTypeInfo struct {
	DirectoryName       string `json:"directoryName"`
	Id                  string `json:"id"`
	Name                string `json:"name"`
	Suffix              string `json:"suffix,omitempty"`
	StrictDirectoryName bool   `json:"strictDirectoryName"`
}

Jump to

Keyboard shortcuts

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