Documentation ¶
Index ¶
- type Configurations
- type Plugin
- type PresetScript
- type PresetScripts
- type RetentionPlugin
- type RetentionScript
- type Server
- func (s *Server) CreateRetentionScript(ctx context.Context, req *pluginpb.CreateRetentionScriptRequest) (*pluginpb.CreateRetentionScriptResponse, error)
- func (s *Server) DeleteRetentionScript(ctx context.Context, req *pluginpb.DeleteRetentionScriptRequest) (*pluginpb.DeleteRetentionScriptResponse, error)
- func (s *Server) GetOrgRetentionPluginConfig(ctx context.Context, req *pluginpb.GetOrgRetentionPluginConfigRequest) (*pluginpb.GetOrgRetentionPluginConfigResponse, error)
- func (s *Server) GetPlugins(ctx context.Context, req *pluginpb.GetPluginsRequest) (*pluginpb.GetPluginsResponse, error)
- func (s *Server) GetRetentionPluginConfig(ctx context.Context, req *pluginpb.GetRetentionPluginConfigRequest) (*pluginpb.GetRetentionPluginConfigResponse, error)
- func (s *Server) GetRetentionPluginsForOrg(ctx context.Context, req *pluginpb.GetRetentionPluginsForOrgRequest) (*pluginpb.GetRetentionPluginsForOrgResponse, error)
- func (s *Server) GetRetentionScript(ctx context.Context, req *pluginpb.GetRetentionScriptRequest) (*pluginpb.GetRetentionScriptResponse, error)
- func (s *Server) GetRetentionScripts(ctx context.Context, req *pluginpb.GetRetentionScriptsRequest) (*pluginpb.GetRetentionScriptsResponse, error)
- func (s *Server) Stop()
- func (s *Server) UpdateOrgRetentionPluginConfig(ctx context.Context, req *pluginpb.UpdateOrgRetentionPluginConfigRequest) (*pluginpb.UpdateOrgRetentionPluginConfigResponse, error)
- func (s *Server) UpdateRetentionScript(ctx context.Context, req *pluginpb.UpdateRetentionScriptRequest) (*pluginpb.UpdateRetentionScriptResponse, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Configurations ¶
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.
type Plugin ¶
type Plugin struct { Name string `db:"name"` ID string `db:"id"` Description *string `db:"description"` Logo *string `db:"logo"` 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.
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 ¶
func (s *Server) CreateRetentionScript(ctx context.Context, req *pluginpb.CreateRetentionScriptRequest) (*pluginpb.CreateRetentionScriptResponse, error)
CreateRetentionScript creates a script that is used for long-term data retention.
func (*Server) DeleteRetentionScript ¶
func (s *Server) DeleteRetentionScript(ctx context.Context, req *pluginpb.DeleteRetentionScriptRequest) (*pluginpb.DeleteRetentionScriptResponse, error)
DeleteRetentionScript creates a script that is used for long-term data retention.
func (*Server) GetOrgRetentionPluginConfig ¶
func (s *Server) GetOrgRetentionPluginConfig(ctx context.Context, req *pluginpb.GetOrgRetentionPluginConfigRequest) (*pluginpb.GetOrgRetentionPluginConfigResponse, error)
GetOrgRetentionPluginConfig gets the org's configuration for a plugin.
func (*Server) GetPlugins ¶
func (s *Server) GetPlugins(ctx context.Context, req *pluginpb.GetPluginsRequest) (*pluginpb.GetPluginsResponse, error)
GetPlugins fetches all of the available, latest plugins.
func (*Server) GetRetentionPluginConfig ¶
func (s *Server) GetRetentionPluginConfig(ctx context.Context, req *pluginpb.GetRetentionPluginConfigRequest) (*pluginpb.GetRetentionPluginConfigResponse, error)
GetRetentionPluginConfig gets the config for a specific plugin release.
func (*Server) GetRetentionPluginsForOrg ¶
func (s *Server) GetRetentionPluginsForOrg(ctx context.Context, req *pluginpb.GetRetentionPluginsForOrgRequest) (*pluginpb.GetRetentionPluginsForOrgResponse, error)
GetRetentionPluginsForOrg gets all data retention plugins enabled by the org.
func (*Server) GetRetentionScript ¶
func (s *Server) GetRetentionScript(ctx context.Context, req *pluginpb.GetRetentionScriptRequest) (*pluginpb.GetRetentionScriptResponse, error)
GetRetentionScript gets the details for a script an org is using for long-term data retention.
func (*Server) GetRetentionScripts ¶
func (s *Server) GetRetentionScripts(ctx context.Context, req *pluginpb.GetRetentionScriptsRequest) (*pluginpb.GetRetentionScriptsResponse, error)
GetRetentionScripts gets all retention scripts the org has configured.
func (*Server) UpdateOrgRetentionPluginConfig ¶
func (s *Server) UpdateOrgRetentionPluginConfig(ctx context.Context, req *pluginpb.UpdateOrgRetentionPluginConfigRequest) (*pluginpb.UpdateOrgRetentionPluginConfigResponse, error)
UpdateOrgRetentionPluginConfig updates an org's configuration for a plugin.
func (*Server) UpdateRetentionScript ¶
func (s *Server) UpdateRetentionScript(ctx context.Context, req *pluginpb.UpdateRetentionScriptRequest) (*pluginpb.UpdateRetentionScriptResponse, error)
UpdateRetentionScript updates a script used for long-term data retention.