validation

package
v0.9.29 Latest Latest
Warning

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

Go to latest
Published: Jun 22, 2026 License: Apache-2.0 Imports: 9 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrorEmptyInput       = errors.New("empty input provided")
	ErrorNoValidator      = errors.New("no validator found for content type")
	ErrorMarshalJSON      = errors.New("error marshaling input to JSON")
	ErrorValidatingJSON   = errors.New("error validating JSON data")
	ErrorDocumentInvalid  = errors.New("The document is not valid:\n%s")
	ErrorRequiredField    = errors.New("field '%s' is required")
	ErrorInvalidFieldType = errors.New("field '%s' is invalid, got '%s', expected '%s'")
)

Functions

This section is empty.

Types

type Category

type Category struct {
	Label       string `json:"label,omitempty" yaml:"label,omitempty"`
	Icon        string `json:"icon,omitempty" yaml:"icon,omitempty"`
	Collapsible bool   `json:"collapsible,omitempty" yaml:"collapsible,omitempty"`
	Id          string `json:"id,omitempty" yaml:"id,omitempty"`
	IsGroup     bool   `json:"isGroup,omitempty" yaml:"isGroup,omitempty"`
	Collapsable bool   `json:"collapsable,omitempty" yaml:"collapsable,omitempty"`
	DxpOrder    int    `json:"dxpOrder,omitempty" yaml:"dxpOrder,omitempty"`
	Order       int    `json:"order,omitempty" yaml:"order,omitempty"`
}

type ClientPermissions

type ClientPermissions struct {
	UrlParameters UrlParameters `json:"urlParameters,omitempty" yaml:"urlParameters,omitempty"`
}

type Component

type Component struct {
	Annotations map[string]string `json:"annotations,omitempty" yaml:"annotations,omitempty"`
	Id          string            `json:"id,omitempty" yaml:"id,omitempty"`
	Type        Type              `json:"type,omitempty" yaml:"type,omitempty"`
}

type ContentConfiguration

type ContentConfiguration struct {
	Name                string              `json:"name,omitempty" yaml:"name,omitempty" jsonschema:"oneof_required=string"`
	CreationTimestamp   string              `json:"creationTimestamp,omitempty" yaml:"creationTimestamp,omitempty"`
	LuigiConfigFragment LuigiConfigFragment `json:"luigiConfigFragment" yaml:"luigiConfigFragment"`
	Url                 string              `json:"url,omitempty" yaml:"url,omitempty"`
}

type DefineEntity

type DefineEntity struct {
	Id                    string          `json:"id,omitempty" yaml:"id,omitempty"`
	UseBack               bool            `json:"useBack,omitempty" yaml:"useBack,omitempty"`
	ContextKey            string          `json:"contextKey,omitempty" yaml:"contextKey,omitempty"`
	DynamicFetchId        string          `json:"dynamicFetchId,omitempty" yaml:"dynamicFetchId,omitempty"`
	Label                 string          `json:"label,omitempty" yaml:"label,omitempty"`
	PluralLabel           string          `json:"pluralLabel,omitempty" yaml:"pluralLabel,omitempty"`
	NotFoundConfig        *NotFoundConfig `json:"notFoundConfig,omitempty" yaml:"notFoundConfig,omitempty"`
	GraphqlEntity         *GraphqlEntity  `json:"graphqlEntity,omitempty" yaml:"graphqlEntity,omitempty"`
	AdditionalContextKeys []string        `json:"additionalContextKeys,omitempty" yaml:"additionalContextKeys,omitempty"`
	Type                  string          `json:"type,omitempty" yaml:"type,omitempty"`
}

type ExtensionConfiguration

type ExtensionConfiguration interface {
	Validate([]byte, string) (string, *multierror.Error)
	WithSchema([]byte) error
}

func NewContentConfiguration

func NewContentConfiguration() ExtensionConfiguration
type ExternalLink struct {
	Url        string `json:"url,omitempty" yaml:"url,omitempty"`
	SameWindow bool   `json:"sameWindow,omitempty" yaml:"sameWindow,omitempty"`
}

type GraphqlEntity

type GraphqlEntity struct {
	Group   string `json:"group,omitempty" yaml:"group,omitempty"`
	Kind    string `json:"kind,omitempty" yaml:"kind,omitempty"`
	Query   string `json:"query,omitempty" yaml:"query,omitempty"`
	Version string `json:"version,omitempty" yaml:"version,omitempty"`
}

type LuigiConfigData

type LuigiConfigData struct {
	NodeDefaults    *NodeDefaults    `json:"nodeDefaults,omitempty" yaml:"nodeDefaults,omitempty"`
	Nodes           []Node           `json:"nodes,omitempty" yaml:"nodes,omitempty" jsonschema:"oneof_required=array"`
	Texts           []Text           `json:"texts,omitempty" yaml:"texts,omitempty"`
	TargetAppConfig *TargetAppConfig `json:"targetAppConfig,omitempty" yaml:"targetAppConfig,omitempty"`
	ViewGroup       *ViewGroup       `json:"viewGroup,omitempty" yaml:"viewGroup,omitempty"`
	UserSettings    *UserSettings    `json:"userSettings,omitempty" yaml:"userSettings,omitempty"`
}

type LuigiConfigFragment

type LuigiConfigFragment struct {
	Data LuigiConfigData `json:"data,omitempty" yaml:"data,omitempty" jsonschema:"oneof_required=object"`
}
type NavHeader struct {
	UseTitleResolver bool   `json:"useTitleResolver,omitempty" yaml:"useTitleResolver,omitempty"`
	Label            string `json:"label,omitempty" yaml:"label,omitempty"`
	ShowUpLink       bool   `json:"showUpLink,omitempty" yaml:"showUpLink,omitempty"`
	Icon             string `json:"icon,omitempty" yaml:"icon,omitempty"`
	Type             string `json:"type,omitempty" yaml:"type,omitempty"`
}

type Node

type Node struct {
	EntityType                string                   `json:"entityType,omitempty" yaml:"entityType,omitempty"`
	PathSegment               string                   `json:"pathSegment,omitempty" yaml:"pathSegment,omitempty"`
	Label                     string                   `json:"label,omitempty" yaml:"label,omitempty"`
	Icon                      string                   `json:"icon,omitempty" yaml:"icon,omitempty"`
	Category                  interface{}              `json:"category,omitempty" yaml:"category,omitempty" jsonschema:"anyof_ref=#/$defs/Category,anyof_type=string"`
	Url                       string                   `json:"url,omitempty" yaml:"url,omitempty"`
	HideFromNav               *bool                    `json:"hideFromNav,omitempty" yaml:"hideFromNav,omitempty"`
	VisibleForFeatureToggles  []string                 `json:"visibleForFeatureToggles,omitempty" yaml:"visibleForFeatureToggles,omitempty"`
	VirtualTree               *bool                    `json:"virtualTree,omitempty" yaml:"virtualTree,omitempty"`
	RequiredIFramePermissions interface{}              `json:"requiredIFramePermissions,omitempty" yaml:"requiredIFramePermissions,omitempty" jsonschema:"anyof_type=object"`
	Compound                  interface{}              `json:"compound,omitempty" yaml:"compound,omitempty" jsonschema:"anyof_type=object"`
	InitialRoute              string                   `json:"initialRoute,omitempty" yaml:"initialRoute,omitempty"`
	LayoutConfig              interface{}              `json:"layoutConfig,omitempty" yaml:"layoutConfig,omitempty" jsonschema:"anyof_type=object"`
	Context                   interface{}              `json:"context,omitempty" yaml:"context,omitempty" jsonschema:"anyof_type=object"`
	Webcomponent              interface{}              `json:"webcomponent,omitempty" yaml:"webcomponent,omitempty" jsonschema:"anyof_ref=#/$defs/Webcomponent,anyof_type=boolean"`
	LoadingIndicator          interface{}              `json:"loadingIndicator,omitempty" yaml:"loadingIndicator,omitempty" jsonschema:"anyof_type=object"`
	DefineEntity              *DefineEntity            `json:"defineEntity,omitempty" yaml:"defineEntity,omitempty"`
	KeepSelectedForChildren   *bool                    `json:"keepSelectedForChildren,omitempty" yaml:"keepSelectedForChildren,omitempty"`
	Children                  []Node                   `json:"children,omitempty" yaml:"children,omitempty"`
	UrlSuffix                 string                   `json:"urlSuffix,omitempty" yaml:"urlSuffix,omitempty"`
	HideSideNav               *bool                    `json:"hideSideNav,omitempty" yaml:"hideSideNav,omitempty"`
	TabNav                    *bool                    `json:"tabNav,omitempty" yaml:"tabNav,omitempty"`
	ShowBreadcrumbs           *bool                    `json:"showBreadcrumbs,omitempty" yaml:"showBreadcrumbs,omitempty"`
	DxpOrder                  float32                  `json:"dxpOrder,omitempty" yaml:"dxpOrder,omitempty"`
	Order                     float32                  `json:"order,omitempty" yaml:"order,omitempty"`
	TestId                    string                   `json:"testId,omitempty" yaml:"testId,omitempty"`
	NavSlot                   string                   `json:"navSlot,omitempty" yaml:"navSlot,omitempty"`
	VisibleForPlugin          *bool                    `json:"visibleForPlugin,omitempty" yaml:"visibleForPlugin,omitempty"`
	IsolateView               *bool                    `json:"isolateView,omitempty" yaml:"isolateView,omitempty"`
	VisibleForContext         string                   `json:"visibleForContext,omitempty" yaml:"visibleForContext,omitempty"`
	VisibleForEntityContext   *VisibleForEntityContext `json:"visibleForEntityContext,omitempty" yaml:"visibleForEntityContext,omitempty"`
	NetworkVisibility         string                   `json:"networkVisibility,omitempty" yaml:"networkVisibility,omitempty"`
	ClientPermissions         *ClientPermissions       `json:"clientPermissions,omitempty" yaml:"clientPermissions,omitempty"`
	NavigationContext         string                   `json:"navigationContext,omitempty" yaml:"navigationContext,omitempty"`
	NavHeader                 *NavHeader               `json:"navHeader,omitempty" yaml:"navHeader,omitempty"`
	TitleResolver             *TitleResolver           `json:"titleResolver,omitempty" yaml:"titleResolver,omitempty"`
	DefineSlot                string                   `json:"defineSlot,omitempty" yaml:"defineSlot,omitempty"`
	IgnoreInDocumentTitle     *bool                    `json:"ignoreInDocumentTitle,omitempty" yaml:"ignoreInDocumentTitle,omitempty"`
	ExternalLink              *ExternalLink            `json:"externalLink,omitempty" yaml:"externalLink,omitempty"`
	Link                      string                   `json:"link,omitempty" yaml:"link,omitempty"`
	ViewGroup                 string                   `json:"viewGroup,omitempty" yaml:"viewGroup,omitempty"`
	ConfigurationMissing      string                   `json:"configurationMissing,omitempty" yaml:"configurationMissing,omitempty"`
	ConfigurationHint         string                   `json:"configurationHint,omitempty" yaml:"configurationHint,omitempty"`
	ConfigurationLink         string                   `json:"configurationLink,omitempty" yaml:"configurationLink,omitempty"`
	Id                        string                   `json:"id,omitempty" yaml:"id,omitempty"`
	HideGlobalSearch          *bool                    `json:"hideGlobalSearch,omitempty" yaml:"hideGlobalSearch,omitempty"`
	HideFromBreadcrumb        *bool                    `json:"hideFromBreadcrumb,omitempty" yaml:"hideFromBreadcrumb,omitempty"`
}

type NodeDefaults

type NodeDefaults struct {
	EntityType  string `json:"entityType,omitempty" yaml:"entityType,omitempty"`
	IsolateView bool   `json:"isolateView,omitempty" yaml:"isolateView,omitempty"`
}

type NotFoundConfig

type NotFoundConfig struct {
	EntityListNavigationContext string `json:"entityListNavigationContext,omitempty" yaml:"entityListNavigationContext,omitempty"`
	SapIllusSVG                 string `json:"sapIllusSVG,omitempty" yaml:"sapIllusSVG,omitempty"`
}

type Project

type Project struct {
	Policies []string `json:"policies,omitempty" yaml:"policies,omitempty"`
}

type Request

type Request struct {
	Method  string            `json:"method,omitempty" yaml:"method,omitempty"`
	Url     string            `json:"url,omitempty" yaml:"url,omitempty"`
	Headers map[string]string `json:"headers,omitempty" yaml:"headers,omitempty"`
}

type RequiredIFramePermissions

type RequiredIFramePermissions struct {
	Allow   []string `json:"allow,omitempty" yaml:"allow,omitempty"`
	Sandbox []string `json:"sandbox,omitempty" yaml:"sandbox,omitempty"`
}

type SapIntegration

type SapIntegration struct {
	NavMode           string            `json:"navMode,omitempty" yaml:"navMode,omitempty"`
	UrlTemplateId     string            `json:"urlTemplateId,omitempty" yaml:"urlTemplateId,omitempty"`
	UrlTemplateParams UrlTemplateParams `json:"urlTemplateParams,omitempty" yaml:"urlTemplateParams,omitempty"`
}

type Setting

type Setting struct {
	Type       string   `json:"type,omitempty" yaml:"type,omitempty"`
	Label      string   `json:"label,omitempty" yaml:"label,omitempty"`
	Style      string   `json:"style,omitempty" yaml:"style,omitempty"`
	IsEditable bool     `json:"isEditable,omitempty" yaml:"isEditable,omitempty"`
	Options    []string `json:"options,omitempty" yaml:"options,omitempty"`
}

type TargetAppConfig

type TargetAppConfig struct {
	Version        string         `json:"_version,omitempty" yaml:"_version,omitempty"`
	SapIntegration SapIntegration `json:"sap.integration,omitempty" yaml:"sap.integration,omitempty"`
}

type Text

type Text struct {
	Locale         string            `json:"locale,omitempty" yaml:"locale,omitempty"`
	TextDictionary map[string]string `json:"textDictionary" yaml:"textDictionary"`
}

type TitleResolver

type TitleResolver struct {
	Request            Request `json:"request,omitempty" yaml:"request,omitempty"`
	TitlePropertyChain string  `json:"titlePropertyChain,omitempty" yaml:"titlePropertyChain,omitempty"`
	PrerenderFallback  bool    `json:"prerenderFallback,omitempty" yaml:"prerenderFallback,omitempty"`
	FallbackTitle      string  `json:"fallbackTitle,omitempty" yaml:"fallbackTitle,omitempty"`
	FallbackIcon       string  `json:"fallbackIcon,omitempty" yaml:"fallbackIcon,omitempty"`
}

type Type

type Type struct {
	Name string `json:"name,omitempty" yaml:"name,omitempty"`
}

type Url

type Url struct {
	Read  bool `json:"read,omitempty" yaml:"read,omitempty"`
	Write bool `json:"write,omitempty" yaml:"write,omitempty"`
}

type UrlParameters

type UrlParameters struct {
	Url    Url `json:"url,omitempty" yaml:"url,omitempty"`
	Q      Url `json:"q,omitempty" yaml:"q,omitempty"`
	Author Url `json:"author,omitempty" yaml:"author,omitempty"`
}

type UrlTemplateParams

type UrlTemplateParams struct {
	Query interface{} `json:"query,omitempty" yaml:"query,omitempty"`
}

type UserGroupsSetting

type UserGroupsSetting struct {
	Label    string             `json:"label,omitempty" yaml:"label,omitempty"`
	Sublabel string             `json:"sublabel,omitempty" yaml:"sublabel,omitempty"`
	Title    string             `json:"title,omitempty" yaml:"title,omitempty"`
	Icon     string             `json:"icon,omitempty" yaml:"icon,omitempty"`
	ViewUrl  string             `json:"viewUrl,omitempty" yaml:"viewUrl,omitempty"`
	Initials string             `json:"initials,omitempty" yaml:"initials,omitempty"`
	Settings map[string]Setting `json:"settings,omitempty" yaml:"settings,omitempty"`
}

type UserSettings

type UserSettings struct {
	Groups map[string]UserGroupsSetting `json:"groups,omitempty" yaml:"groups,omitempty"`
}

type ViewGroup

type ViewGroup struct {
	PreloadSuffix             string                    `json:"preloadSuffix,omitempty" yaml:"preloadSuffix,omitempty"`
	RequiredIFramePermissions RequiredIFramePermissions `json:"requiredIFramePermissions,omitempty" yaml:"requiredIFramePermissions,omitempty"`
}

type VisibleForEntityContext

type VisibleForEntityContext struct {
	Project   Project    `json:"project,omitempty" yaml:"project,omitempty"`
	Component *Component `json:"component,omitempty" yaml:"component,omitempty"`
}

type Webcomponent

type Webcomponent struct {
	SelfRegistered bool   `json:"selfRegistered,omitempty" yaml:"selfRegistered,omitempty"`
	TagName        string `json:"tagName,omitempty" yaml:"tagName,omitempty"`
	Type           string `json:"type,omitempty" yaml:"type,omitempty"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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