controllers

package
v0.0.0-...-8540621 Latest Latest
Warning

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

Go to latest
Published: Nov 25, 2024 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Configurations

type Configurations map[string]string

Configurations type to use in sqlx for the map of configurations.

func (*Configurations) Scan

func (p *Configurations) Scan(src interface{}) error

Scan Scans the sqlx database type ([]bytes) into the Configurations type.

func (Configurations) Value

func (p Configurations) Value() (driver.Value, error)

Value Returns a golang database/sql driver value for Configurations.

type Plugin

type Plugin struct {
	Name                 string  `db:"name"`
	ID                   string  `db:"id"`
	Description          *string `db:"description"`
	Version              string  `db:"version"`
	DataRetentionEnabled bool    `db:"data_retention_enabled" yaml:"dataRetentionEnabled"`
}

Plugin contains metadata about a plugin.

type PresetScript

type PresetScript struct {
	Name              string `json:"name"`
	Description       string `json:"description"`
	DefaultFrequencyS int64  `json:"default_frequency_s" yaml:"defaultFrequencyS"`
	Script            string `json:"script"`
	DefaultDisabled   bool   `json:"default_disabled" yaml:"defaultDisabled"`
}

PresetScript type to use in sqlx for preset scripts.

type PresetScripts

type PresetScripts []*PresetScript

PresetScripts represents an array of PresetScripts.

func (*PresetScripts) Scan

func (p *PresetScripts) Scan(src interface{}) error

Scan Scans the sqlx database type ([]bytes) into the PresetScripts type.

func (PresetScripts) Value

func (p PresetScripts) Value() (driver.Value, error)

Value Returns a golang database/sql driver value for PresetScripts.

type RetentionPlugin

type RetentionPlugin struct {
	ID                   string         `db:"plugin_id"`
	Version              string         `db:"version"`
	Configurations       Configurations `db:"configurations"`
	DocumentationURL     *string        `db:"documentation_url" yaml:"documentationURL"`
	DefaultExportURL     *string        `db:"default_export_url" yaml:"defaultExportURL"`
	AllowCustomExportURL bool           `db:"allow_custom_export_url" yaml:"allowCustomExportURL"`
	AllowInsecureTLS     bool           `db:"allow_insecure_tls" yaml:"allowInsecureTLS"`
	PresetScripts        PresetScripts  `db:"preset_scripts" yaml:"presetScripts"`
}

RetentionPlugin contains metadata about a retention plugin.

type RetentionScript

type RetentionScript struct {
	OrgID       uuid.UUID `db:"org_id"`
	ScriptID    uuid.UUID `db:"script_id"`
	ScriptName  string    `db:"script_name"`
	Description string    `db:"description"`
	IsPreset    bool      `db:"is_preset"`
	PluginID    string    `db:"plugin_id"`
	ExportURL   string    `db:"export_url"`
}

RetentionScript represents a retention script in the plugin system.

type Server

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

Server is a bridge implementation of the pluginService.

func New

func New(db *sqlx.DB, dbKey string, cronScriptClient cronscriptpb.CronScriptServiceClient) *Server

New creates a new server.

func (*Server) CreateRetentionScript

CreateRetentionScript creates a script that is used for long-term data retention.

func (*Server) DeleteRetentionScript

DeleteRetentionScript creates a script that is used for long-term data retention.

func (*Server) GetOrgRetentionPluginConfig

GetOrgRetentionPluginConfig gets the org's configuration for a plugin.

func (*Server) GetPlugins

GetPlugins fetches all of the available, latest plugins.

func (*Server) GetRetentionPluginConfig

GetRetentionPluginConfig gets the config for a specific plugin release.

func (*Server) GetRetentionPluginsForOrg

GetRetentionPluginsForOrg gets all data retention plugins enabled by the org.

func (*Server) GetRetentionScript

GetRetentionScript gets the details for a script an org is using for long-term data retention.

func (*Server) GetRetentionScripts

GetRetentionScripts gets all retention scripts the org has configured.

func (*Server) Stop

func (s *Server) Stop()

Stop performs any necessary cleanup before shutdown.

func (*Server) UpdateOrgRetentionPluginConfig

UpdateOrgRetentionPluginConfig updates an org's configuration for a plugin.

func (*Server) UpdateRetentionScript

UpdateRetentionScript updates a script used for long-term data retention.

Jump to

Keyboard shortcuts

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