pluginstore

package
v0.0.0-...-daa3d23 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	PluginsStoreProjectMount string `envconfig:"PLUGIN_STORE_PROJECT_MOUNT" default:"/plugin-store-clone"`
	PluginsStorePath         string `envconfig:"PLUGIN_STORE_PATH" default:"/plugin-store"`
	PluginsFileName          string `envconfig:"PLUGIN_LIST_FILE" default:"plugin-list.yaml"`
	PluginFileName           string `envconfig:"PLUGIN_FILE" default:"plugin.yaml"`
	PluginConfigFileName     string `envconfig:"PLUGIN_CONFIG_FILE" default:"plugin-config.yaml"`
	PluginStoreProjectURL    string `envconfig:"PLUGIN_STORE_PROJECT_URL" default:"https://github.com/intelops/capten-plugins"`
	PluginStoreProjectAccess string `envconfig:"PLUGIN_STORE_PROJECT_ACCESS" default:""`
	PluginStoreProjectID     string `envconfig:"PLUGIN_STORE_PROJECT_ID" default:"1cf5201d-5f35-4d5b-afe0-4b9d0e0d4cd2"`
	GitVaultEntityName       string `envconfig:"GIT_VAULT_ENTITY_NAME" default:"git-project"`
	CaptenOAuthURL           string `envconfig:"CAPTEN_OAUTH_URL" default:"https://alpha.optimizor.app/api/.ory"`
}

type Deployment

type Deployment struct {
	ControlplaneCluster *DeploymentConfig `yaml:"controlplaneCluster"`
	BussinessCluster    *DeploymentConfig `yaml:"bussinessCluster"`
}

type DeploymentConfig

type DeploymentConfig struct {
	Version             string `yaml:"version"`
	ChartName           string `yaml:"chartName"`
	ChartRepo           string `yaml:"chartRepo"`
	DefaultNamespace    string `yaml:"defaultNamespace"`
	PrivilegedNamespace bool   `yaml:"privilegedNamespace"`
	ValuesFile          string `yaml:"valuesFile"`
}

type GitClient

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

func NewGitClient

func NewGitClient() *GitClient

func (*GitClient) Add

func (g *GitClient) Add(path string) error

func (*GitClient) Clone

func (g *GitClient) Clone(directory, url, token string) error

func (*GitClient) Commit

func (g *GitClient) Commit(msg, name, email string) error

func (*GitClient) GetDefaultBranchName

func (g *GitClient) GetDefaultBranchName() (string, error)

func (*GitClient) IsEmptyChanges

func (g *GitClient) IsEmptyChanges() (bool, error)

func (*GitClient) Push

func (g *GitClient) Push(branchName, token string) error

func (*GitClient) Remove

func (g *GitClient) Remove(path string) error

type Plugin

type Plugin struct {
	PluginName  string   `yaml:"pluginName"`
	Description string   `yaml:"description"`
	Category    string   `yaml:"category"`
	Icon        string   `yaml:"icon"`
	Versions    []string `yaml:"versions"`
}

type PluginConfig

type PluginConfig struct {
	Deployment         Deployment `yaml:"deployment"`
	ApiEndpoint        string     `yaml:"apiEndpoint"`
	UIEndpoint         string     `yaml:"uiEndpoint"`
	UIModulePackageURL string     `yaml:"uiModulePackageURL"`
	Capabilities       []string   `yaml:"capabilities"`
}

type PluginListData

type PluginListData struct {
	Plugins []string `yaml:"plugins"`
}

type PluginStore

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

func NewPluginStore

func NewPluginStore(log logging.Logger, dbStore captenStore, tc *temporalclient.Client) (*PluginStore, error)

func (*PluginStore) ConfigureStore

func (p *PluginStore) ConfigureStore(config *pluginstorepb.PluginStoreConfig) error

func (*PluginStore) DeployClusterPlugin

func (p *PluginStore) DeployClusterPlugin(ctx context.Context, pluginData *clusterpluginspb.Plugin) error

func (*PluginStore) DeployPlugin

func (p *PluginStore) DeployPlugin(storeType pluginstorepb.StoreType,
	pluginName, version string, values []byte) error

func (*PluginStore) GetPluginData

func (p *PluginStore) GetPluginData(storeType pluginstorepb.StoreType, pluginName string) (*pluginstorepb.PluginData, error)

func (*PluginStore) GetPluginValues

func (p *PluginStore) GetPluginValues(storeType pluginstorepb.StoreType,
	pluginName, version string) ([]byte, error)

func (*PluginStore) GetPlugins

func (p *PluginStore) GetPlugins(storeType pluginstorepb.StoreType) ([]*pluginstorepb.Plugin, error)

func (*PluginStore) GetStoreConfig

func (p *PluginStore) GetStoreConfig(storeType pluginstorepb.StoreType) (*pluginstorepb.PluginStoreConfig, error)

func (*PluginStore) SyncPlugins

func (p *PluginStore) SyncPlugins(storeType pluginstorepb.StoreType) error

func (*PluginStore) UnDeployClusterPlugin

func (p *PluginStore) UnDeployClusterPlugin(ctx context.Context, request *clusterpluginspb.UnDeployClusterPluginRequest) error

func (*PluginStore) UnDeployPlugin

func (p *PluginStore) UnDeployPlugin(storeType pluginstorepb.StoreType, pluginName string) error

Jump to

Keyboard shortcuts

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