pattern

package
v0.8.1 Latest Latest
Warning

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

Go to latest
Published: Mar 15, 2025 License: Apache-2.0 Imports: 19 Imported by: 4

Documentation

Overview

Package pattern provides primitives to interact with the openapi HTTP API.

Code generated by github.com/oapi-codegen/oapi-codegen/v2 version v2.3.0 DO NOT EDIT.

Package pattern provides primitives to interact with the openapi HTTP API.

Code generated by github.com/oapi-codegen/oapi-codegen/v2 version v2.4.1 DO NOT EDIT.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DeletePatternModel

type DeletePatternModel struct {
	Id   uuid.UUID `json:"id,omitempty"`
	Name string    `json:"name,omitempty"`
}

DeletePatternModel defines model for DeletePatternModel.

type EvaluationRequest added in v0.7.17

type EvaluationRequest struct {
	// Design Designs are your primary tool for collaborative authorship of your infrastructure, workflow, and processes.
	Design PatternFile `json:"design" yaml:"design"`

	// Options Optional parameters for the evaluation process
	Options *Options `json:"options,omitempty" yaml:"options"`
}

EvaluationRequest defines model for EvaluationRequest.

type EvaluationResponse added in v0.7.17

type EvaluationResponse struct {
	// Design Designs are your primary tool for collaborative authorship of your infrastructure, workflow, and processes.
	Design PatternFile `json:"design" yaml:"design"`

	// EvaluationHash Hash of the input parameters and configuration used for this evaluation. Useful for identifying duplicate evaluations or caching results.
	EvaluationHash *string           `json:"evaluationHash,omitempty" yaml:"evaluationHash"`
	SchemaVersion  externalRef0.Text `json:"schemaVersion" yaml:"schemaVersion"`

	// Timestamp ISO 8601 formatted timestamp of when the evaluation was completed.
	Timestamp *time.Time `json:"timestamp,omitempty" yaml:"timestamp"`

	// Trace A detailed trace of the evaluation process, including actions taken and changes made.
	Trace Trace `json:"trace" yaml:"trace"`
}

EvaluationResponse Schema for the response of a relationship evaluation process in Meshery

type MesheryPattern

type MesheryPattern struct {
	CatalogData *catalog.CatalogData `json:"catalog_data,omitempty"`
	CreatedAt   time.Time            `json:"created_at,omitempty"`
	Id          uuid.UUID            `json:"id,omitempty"`
	Location    map[string]string    `json:"location,omitempty"`
	Name        string               `json:"name,omitempty"`

	// PatternFile Designs are your primary tool for collaborative authorship of your infrastructure, workflow, and processes.
	PatternFile *PatternFile `json:"pattern_file,omitempty"`
	UpdatedAt   time.Time    `json:"updated_at,omitempty"`
	UserId      uuid.UUID    `json:"user_id,omitempty"`
	Visibility  string       `json:"visibility,omitempty"`
}

MesheryPattern defines model for MesheryPattern.

type MesheryPatternDeleteRequestBody

type MesheryPatternDeleteRequestBody struct {
	Patterns *[]DeletePatternModel `json:"patterns,omitempty"`
}

MesheryPatternDeleteRequestBody defines model for MesheryPatternDeleteRequestBody.

type MesheryPatternPage

type MesheryPatternPage struct {
	Page       *int              `json:"page,omitempty"`
	PageSize   *int              `json:"page_size,omitempty"`
	Patterns   *[]MesheryPattern `json:"patterns,omitempty"`
	ResultType *string           `json:"resultType,omitempty"`
	TotalCount *int              `json:"total_count,omitempty"`
}

MesheryPatternPage defines model for MesheryPatternPage.

type MesheryPatternRequestBody

type MesheryPatternRequestBody struct {
	Name        *string         `json:"name,omitempty"`
	Path        string          `json:"path,omitempty"`
	PatternData *MesheryPattern `json:"pattern_data,omitempty"`
	Save        *bool           `json:"save,omitempty"`

	// Url endpoint
	Url string `json:"url,omitempty"`
}

MesheryPatternRequestBody defines model for MesheryPatternRequestBody.

type Options added in v0.7.17

type Options struct {
	// EnableTrace If true, include detailed trace information in the response
	EnableTrace *bool `json:"enableTrace,omitempty" yaml:"enableTrace"`

	// ReturnDiffOnly If true, only return the diff of changes instead of the complete updated design
	ReturnDiffOnly *bool `json:"returnDiffOnly,omitempty" yaml:"returnDiffOnly"`
}

type PatternFile

type PatternFile struct {
	// Id A Universally Unique Identifier used to uniquely identify entites in Meshery. The UUID core defintion is used across different schemas.
	Id uuid.UUID `json:"id"`

	// Name Name of the design; a descriptive, but concise title for the design document.
	Name string `json:"name"`

	// SchemaVersion Specifies the version of the schema to which the design conforms.
	SchemaVersion string `json:"schemaVersion"`

	// Version Revision of the design as expressed by an auto-incremented, SemVer-compliant version number. May be manually set by a user or third-party system, but will always be required to be of version number higher than the previously defined version number.
	Version  string                `json:"version"`
	Metadata *PatternFile_Metadata `json:"metadata,omitempty"`

	// Components A list of one or more component declarations.
	Components []*component.ComponentDefinition `json:"components"`

	// Preferences Design-level preferences
	Preferences *struct {
		// Layers List of available layers
		Layers map[string]interface{} `json:"layers"`
	} `json:"preferences,omitempty"`

	// Relationships List of relationships between components
	Relationships []*relationship.RelationshipDefinition `json:"relationships"`
}

PatternFile Designs are your primary tool for collaborative authorship of your infrastructure, workflow, and processes.

func (*PatternFile) ConvertFrom

func (p *PatternFile) ConvertFrom(pattern conversion.Hub) error

The pattern file indicated by "pattern" is converted to the version to which *PatternFile belongs or simply the package version of the .go file. "pattern" parameter acts as the source and the "p" the destination.

func (*PatternFile) ConvertTo

func (p *PatternFile) ConvertTo(pattern conversion.Hub) error

The pattern file indicated by "p", is converted to the version pointed by "pattern", the version of the patternFile which implements the Hub interface indicates the version the conversion will happen. Only one version of the resource (patternfile in this case) should implement the Hub interface. "pattern" parameter acts as the destination and "p" the source.

type PatternFile_Metadata added in v0.8.1

type PatternFile_Metadata struct {
	// ResolvedAliases Map of resolved aliases present in the design
	ResolvedAliases      *map[string]core.ResolvedAlias `json:"resolvedAliases,omitempty"`
	AdditionalProperties map[string]interface{}         `json:"-"`
}

PatternFile_Metadata defines model for PatternFile.Metadata.

func (PatternFile_Metadata) Get added in v0.8.1

func (a PatternFile_Metadata) Get(fieldName string) (value interface{}, found bool)

Getter for additional properties for PatternFile_Metadata. Returns the specified element and whether it was found

func (PatternFile_Metadata) MarshalJSON added in v0.8.1

func (a PatternFile_Metadata) MarshalJSON() ([]byte, error)

Override default JSON handling for PatternFile_Metadata to handle AdditionalProperties

func (*PatternFile_Metadata) Set added in v0.8.1

func (a *PatternFile_Metadata) Set(fieldName string, value interface{})

Setter for additional properties for PatternFile_Metadata

func (*PatternFile_Metadata) UnmarshalJSON added in v0.8.1

func (a *PatternFile_Metadata) UnmarshalJSON(b []byte) error

Override default JSON handling for PatternFile_Metadata to handle AdditionalProperties

type Trace added in v0.7.17

type Trace struct {
	// ComponentsAdded List of new components added to the design.
	ComponentsAdded []component.ComponentDefinition `json:"componentsAdded" yaml:"componentsAdded"`

	// ComponentsRemoved List of components removed from the design.
	ComponentsRemoved []component.ComponentDefinition `json:"componentsRemoved" yaml:"componentsRemoved"`

	// ComponentsUpdated List of components updated in the design.
	ComponentsUpdated []component.ComponentDefinition `json:"componentsUpdated" yaml:"componentsUpdated"`

	// PolicyActions List of policy actions applied during the evaluation.
	PolicyActions []string `json:"policyActions" yaml:"policyActions"`

	// RelationshipsAdded List of new relationships added to the design.
	RelationshipsAdded []relationship.RelationshipDefinition `json:"relationshipsAdded" yaml:"relationshipsAdded"`

	// RelationshipsRemoved List of relationships removed from the design.
	RelationshipsRemoved []relationship.RelationshipDefinition `json:"relationshipsRemoved" yaml:"relationshipsRemoved"`

	// RelationshipsUpdated List of relationships updated in the design.
	RelationshipsUpdated []relationship.RelationshipDefinition `json:"relationshipsUpdated" yaml:"relationshipsUpdated"`
}

Jump to

Keyboard shortcuts

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