asset

package
v0.2.1 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	AssetFolderPath = "assets"
)

Variables

View Source
var (
	DownloadsFolderPath = filepath.Join(AssetFolderPath, "downloads")
	ExtractsFolderPath  = filepath.Join(AssetFolderPath, "extracts")
	OutputFolderPath    = filepath.Join(AssetFolderPath, "outputs")
	IndexJsonPath       = filepath.Join(OutputFolderPath, "index.json")
)

Functions

func ApplyCLIPluginTransform added in v0.2.0

func ApplyCLIPluginTransform(dataServerBaseURL *url.URL, connPkgs []ndchub.ConnectorPackaging) error

func CreateAssetFolders added in v0.2.1

func CreateAssetFolders() error

func DownloadConnectorTarballs added in v0.2.0

func DownloadConnectorTarballs(connPkgs []ndchub.ConnectorPackaging) error

func ExtractConnectorTarballs added in v0.2.0

func ExtractConnectorTarballs(connPkgs []ndchub.ConnectorPackaging) error

func OutputConnectorTarballs added in v0.2.0

func OutputConnectorTarballs(connPkgs []ndchub.ConnectorPackaging) error

func StoreCLIPluginFiles added in v0.2.0

func StoreCLIPluginFiles(connPkgs []ndchub.ConnectorPackaging) error

func WriteIndexJSON

func WriteIndexJSON(index *Index) error

Types

type BinaryCLIPluginPlatform added in v0.2.0

type BinaryCLIPluginPlatform struct {
	Selector string
	URI      string
	SHA256   string
	Bin      string
}

type BinaryExternalCLIPluginDefinition added in v0.2.0

type BinaryExternalCLIPluginDefinition struct {
	Name    string `yaml:"name"`
	Version string `yaml:"version"`
}

func (*BinaryExternalCLIPluginDefinition) GetType added in v0.2.0

type BinaryInlineCLIPluginDefinition added in v0.2.0

type BinaryInlineCLIPluginDefinition struct {
	Platforms []BinaryCLIPluginPlatform `yaml:"platforms"`
}

func (*BinaryInlineCLIPluginDefinition) GetType added in v0.2.0

type CLIPluginDefinition added in v0.2.0

type CLIPluginDefinition interface {
	GetType() CLIPluginType
}

type CLIPluginType added in v0.2.0

type CLIPluginType string
var (
	Binary       CLIPluginType = "Binary"
	BinaryInline CLIPluginType = "BinaryInline"
	Docker       CLIPluginType = "Docker"
)

type Connector

type Connector struct {
	Namespace     string `json:"namespace"`
	Name          string `json:"name"`
	LatestVersion string `json:"latest_version"`
}

type ConnectorMetadataYAML added in v0.2.0

type ConnectorMetadataYAML struct {
	CLIPlugin CLIPluginDefinition `yaml:"cliPlugin"`
}

func (*ConnectorMetadataYAML) UnmarshalYAML added in v0.2.0

func (cmy *ConnectorMetadataYAML) UnmarshalYAML(value *yaml.Node) error

type DockerCLIPluginDefinition added in v0.2.0

type DockerCLIPluginDefinition struct {
	DockerImage string `yaml:"dockerImage"`
}

func (*DockerCLIPluginDefinition) GetType added in v0.2.0

type Index

type Index struct {
	TotalConnectors   int                 `json:"total_connectors"`
	Connectors        []Connector         `json:"connectors"`
	ConnectorVersions map[string][]string `json:"connector_versions"`
}

Jump to

Keyboard shortcuts

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