model

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Jun 26, 2023 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RebaseUri

func RebaseUri(uri string) string

Types

type MicroFrontendAttribute

type MicroFrontendAttribute struct {
	Name  string               `json:"name"`
	Value runtime.RawExtension `json:"value"`
}

func (*MicroFrontendAttribute) ToContract

type MicroFrontendConfig

type MicroFrontendConfig struct {
	ModuleUri              string
	Preload                *bool                         `json:"preload,omitempty"`
	Proxy                  *bool                         `json:"proxy,omitempty"`
	HashSuffix             string                        `json:"hash-suffix,omitempty"`
	StyleRelativePaths     []string                      `json:"style-relative-paths,omitempty"`
	ContextElements        []MicroFrontendContextElement `json:"context-elements,omitempty"`
	Navigations            []MicroFrontendNavigation     `json:"navigations,omitempty"`
	MicroFrontendNamespace string                        `json:"microfrontend-namespace,omitempty"`
	MicroFrontendName      string                        `json:"microfrontend-name,omitempty"`
	MicroFrontendLabels    map[string]string             `json:"microfrontend-labels,omitempty"`
}

func CreateFrontendConfigFromWebComponent

func CreateFrontendConfigFromWebComponent(webComponent *microfrontendv1alpha1.WebComponent) *MicroFrontendConfig

func (*MicroFrontendConfig) ExtractLabels

func (frontendConfig *MicroFrontendConfig) ExtractLabels() map[string]string

func (*MicroFrontendConfig) ExtractModuleUri

func (frontendConfig *MicroFrontendConfig) ExtractModuleUri() string

func (*MicroFrontendConfig) ExtractStyles

func (frontendConfig *MicroFrontendConfig) ExtractStyles(finalModuleUri string) []string

type MicroFrontendContextElement

type MicroFrontendContextElement struct {
	ContextNames []string                 `json:"context-names"`
	Element      string                   `json:"element"`
	Priority     *int                     `json:"priority,omitempty"`
	Attributes   []MicroFrontendAttribute `json:"attributes,omitempty"`
	Roles        []string                 `json:"roles,omitempty"`
}

func (*MicroFrontendContextElement) ExtractAttributes

func (context *MicroFrontendContextElement) ExtractAttributes() []MicroFrontendAttribute

func (*MicroFrontendContextElement) ExtractContextNames

func (context *MicroFrontendContextElement) ExtractContextNames() []string

func (*MicroFrontendContextElement) ExtractRoles

func (context *MicroFrontendContextElement) ExtractRoles() []string

type MicroFrontendIcon

type MicroFrontendIcon struct {
	Mime string `json:"mime"`
	Data string `json:"data"`
	Url  string `json:"url"`
}

func (*MicroFrontendIcon) ExtractIconPath

func (icon *MicroFrontendIcon) ExtractIconPath(iconPath string) string

type MicroFrontendNavigation

type MicroFrontendNavigation struct {
	Path       string                   `json:"path"`
	Title      string                   `json:"title"`
	Priority   *int                     `json:"priority,omitempty"`
	Details    string                   `json:"details,omitempty"`
	Element    string                   `json:"element"`
	Attributes []MicroFrontendAttribute `json:"attributes,omitempty"`
	Icon       *MicroFrontendIcon       `json:"icon,omitempty"`
	Roles      []string                 `json:"roles,omitempty"`
}

func (*MicroFrontendNavigation) ExtractAttributes

func (navigation *MicroFrontendNavigation) ExtractAttributes() []MicroFrontendAttribute

func (*MicroFrontendNavigation) ExtractRoles

func (navigation *MicroFrontendNavigation) ExtractRoles() []string

Jump to

Keyboard shortcuts

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