metadata

package
v0.1.0-alpha.4 Latest Latest
Warning

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

Go to latest
Published: Dec 3, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

internal/destregistry/metadata/types.go

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FieldSchema

type FieldSchema struct {
	Type        string `json:"type"`
	Label       string `json:"label"`
	Description string `json:"description"`
	Key         string `json:"key"`
	Required    bool   `json:"required"`
}

type MetadataLoader

type MetadataLoader struct {
	// contains filtered or unexported fields
}

func NewMetadataLoader

func NewMetadataLoader(basePath string) *MetadataLoader

func (*MetadataLoader) Load

func (l *MetadataLoader) Load(providerType string) (*ProviderMetadata, error)

type ProviderMetadata

type ProviderMetadata struct {
	// From core.json
	Type             string        `json:"type"`
	ConfigFields     []FieldSchema `json:"config_fields"`
	CredentialFields []FieldSchema `json:"credential_fields"`

	// From ui.json
	Label          string `json:"label"`
	Description    string `json:"description"`
	Icon           string `json:"icon"`
	RemoteSetupURL string `json:"remote_setup_url,omitempty"`

	// From instructions.md
	Instructions string `json:"instructions"`

	// From validation.json
	ValidationSchema map[string]interface{} `json:"validation"` // Raw JSON schema
	Validation       *jsonschema.Schema     `json:"-"`          // Compiled schema for internal use
}

Jump to

Keyboard shortcuts

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