extensionAPI

package
v0.5.4 Latest Latest
Warning

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

Go to latest
Published: Oct 20, 2023 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BucketFsUpload

type BucketFsUpload struct {
	Name             string `json:"name"`
	DownloadURL      string `json:"downloadUrl"`
	LicenseURL       string `json:"licenseUrl"`
	FileSize         int    `json:"fileSize"`
	BucketFsFilename string `json:"bucketFsFilename"`
}

type JsExtInstallation

type JsExtInstallation struct {
	ID      string `json:"id"`
	Name    string `json:"name"`
	Version string `json:"version"`
}

type JsExtInstance

type JsExtInstance struct {
	Id   string `json:"id"`
	Name string `json:"name"`
}

type JsExtension

type JsExtension struct {
	Id                  string
	Name                string
	Category            string
	Description         string
	InstallableVersions []JsExtensionVersion
	BucketFsUploads     []BucketFsUpload
	// contains filtered or unexported fields
}

func LoadExtension

func LoadExtension(id, content string) (*JsExtension, error)

LoadExtension loads an extension from the given file content.

[impl -> dsn~extension-definition~1].

func (*JsExtension) AddInstance

func (e *JsExtension) AddInstance(context *context.ExtensionContext, version string, params *ParameterValues) (instance *JsExtInstance, errorResult error)

func (*JsExtension) DeleteInstance

func (e *JsExtension) DeleteInstance(context *context.ExtensionContext, extensionVersion, instanceId string) (errorResult error)

func (*JsExtension) FindInstallations

func (e *JsExtension) FindInstallations(context *context.ExtensionContext, metadata *exaMetadata.ExaMetadata) (installations []*JsExtInstallation, errorResult error)

func (*JsExtension) GetParameterDefinitions

func (e *JsExtension) GetParameterDefinitions(context *context.ExtensionContext, version string) (definitions []interface{}, errorResult error)

func (*JsExtension) Install

func (e *JsExtension) Install(context *context.ExtensionContext, version string) (errorResult error)

func (*JsExtension) ListInstances

func (e *JsExtension) ListInstances(context *context.ExtensionContext, version string) (instances []*JsExtInstance, errorResult error)

func (*JsExtension) Uninstall

func (e *JsExtension) Uninstall(context *context.ExtensionContext, version string) (errorResult error)

func (*JsExtension) Upgrade added in v0.5.0

func (e *JsExtension) Upgrade(context *context.ExtensionContext) (result *JsUpgradeResult, errorResult error)

type JsExtensionVersion

type JsExtensionVersion struct {
	Name       string
	Latest     bool
	Deprecated bool
}

type JsUpgradeResult added in v0.5.0

type JsUpgradeResult struct {
	PreviousVersion string `json:"previousVersion"`
	NewVersion      string `json:"newVersion"`
}

type ParameterValue

type ParameterValue struct {
	Name  string `json:"name"`
	Value string `json:"value"`
}

type ParameterValues

type ParameterValues struct {
	Values []ParameterValue `json:"values"`
}

func (ParameterValues) Find

func (pv ParameterValues) Find(id string) (value ParameterValue, found bool)

Find returns the parameter with the given ID and true if the parameter exists or an empty parameter and false in case none exists.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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