v1alpha1

package
v0.0.0-...-78aeb2e Latest Latest
Warning

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

Go to latest
Published: Mar 21, 2024 License: Apache-2.0 Imports: 4 Imported by: 10

Documentation

Overview

Package v1alpha1 contains the definitions for OAM core/v1alpha1 objects

The definitions include: 1. Component 2. Application Confiuration 3. Trait Definition 4. Workload Definition 5. Scope Definition

Index

Constants

View Source
const MeshplayAnnotationPrefix = "design.meshmodel.io"

Variables

This section is empty.

Functions

func GetAPIVersionFromComponent

func GetAPIVersionFromComponent(comp Component) string

func GetAnnotationsForWorkload

func GetAnnotationsForWorkload(w v1alpha1.ComponentDefinition) map[string]string

func GetKindFromComponent

func GetKindFromComponent(comp Component) string

Types

type Component

type Component struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`

	Spec ComponentSpec `json:"spec,omitempty"`
}

Component is the structure for the core OAM Application Component

type ComponentParameter

type ComponentParameter struct {
	Name        string   `json:"name"`
	FieldPaths  []string `json:"fieldPaths"`
	Required    *bool    `json:"required,omitempty"`
	Description *string  `json:"description,omitempty"`
}

ComponentParameter is the structure for the core OAM Application Component Paramater

type ComponentSpec

type ComponentSpec struct {
	Type       string                 `json:"type"`
	Version    string                 `json:"version"`
	APIVersion string                 `json:"apiVersion"`
	Model      string                 `json:"model"`
	Settings   map[string]interface{} `json:"settings"`
	Parameters []ComponentParameter   `json:"parameters"`
}

ComponentSpec is the structure for the core OAM Application Component Spec

type Configuration

type Configuration struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`

	Spec ConfigurationSpec `json:"spec,omitempty"`
}

Configuration is the structure for OAM Application Configuration

type ConfigurationSpec

type ConfigurationSpec struct {
	Components []ConfigurationSpecComponent
}

ConfigurationSpec is the structure for the OAM Application Configuration Spec

type ConfigurationSpecComponent

type ConfigurationSpecComponent struct {
	ComponentName string
	Traits        []ConfigurationSpecComponentTrait
	Scopes        []ConfigurationSpecComponentScope
}

ConfigurationSpecComponent is the struct for OAM Application Configuration's spec's components

type ConfigurationSpecComponentScope

type ConfigurationSpecComponentScope struct {
	ScopeRef ConfigurationSpecComponentScopeRef
}

ConfigurationSpecComponentScope struct defines the structure for scope of OAM application configuration's spec's component's scope

type ConfigurationSpecComponentScopeRef

type ConfigurationSpecComponentScopeRef struct {
	metav1.TypeMeta `json:",inline"`
	Name            string
}

ConfigurationSpecComponentScopeRef struct defines the structure for scope of OAM application configuration's spec's component's scope's scopeRef

type ConfigurationSpecComponentTrait

type ConfigurationSpecComponentTrait struct {
	Name       string
	Properties map[string]interface{}
}

ConfigurationSpecComponentTrait is the struct

type DefinitionRef

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

DefinitionRef struct describes the structure for DefinitionRef which are used within TraitDefinition, WorkloadDefinition, etc

type ScopeDefinition

type ScopeDefinition struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`

	Spec ScopeDefinitionSpec
}

ScopeDefinition is the struct for OAM ScopeDefinition construct

type ScopeDefinitionSpec

type ScopeDefinitionSpec struct {
	AllowComponentOverlap bool              `json:"allowComponentOverlap,omitempty"`
	DefinitionRef         DefinitionRef     `json:"definitionRef,omitempty"`
	Metadata              map[string]string `json:"metadata,omitempty"`
}

ScopeDefinitionSpec is the struct for OAM ScopeDefinition's spec

type TraitDefinition

type TraitDefinition struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`

	Spec TraitDefinitionSpec `json:"spec,omitempty"`
}

TraitDefinition is the struct for OAM TraitDefinition construct

type TraitDefinitionSpec

type TraitDefinitionSpec struct {
	AppliesToWorkloads []string          `json:"appliesToWorkloads,omitempty"`
	DefinitionRef      DefinitionRef     `json:"definitionRef,omitempty"`
	RevisionEnabled    bool              `json:"revisionEnabled,omitempty"`
	Metadata           map[string]string `json:"metadata,omitempty"`
}

TraitDefinitionSpec is the struct for OAM TraitDefinitionSpec's spec

type WorkloadDefinition

type WorkloadDefinition struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`

	Spec WorkloadDefinitionSpec `json:"spec,omitempty"`
}

WorkloadDefinition is the struct for OAM WorkloadDefinition construct

type WorkloadDefinitionSpec

type WorkloadDefinitionSpec struct {
	DefinitionRef DefinitionRef     `json:"definitionRef,omitempty"`
	Metadata      map[string]string `json:"metadata,omitempty"`
}

WorkloadDefinitionSpec is the struct for OAM WorkloadDefinitionSpec's spec

Jump to

Keyboard shortcuts

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