plugin_common

package
v1.5.0-RC1 Latest Latest
Warning

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

Go to latest
Published: Apr 29, 2025 License: Apache-2.0 Imports: 13 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type PluginCommonService

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

PluginCommonService user service

func NewPluginCommonService

func NewPluginCommonService(
	pluginConfigRepo PluginConfigRepo,
	pluginUserConfigRepo PluginUserConfigRepo,
	configService *config.ConfigService,
	data *data.Data,
	importerService *importer.ImporterService,
) *PluginCommonService

NewPluginCommonService new report service

func (*PluginCommonService) GetUserPluginConfig

func (ps *PluginCommonService) GetUserPluginConfig(ctx context.Context, req *schema.GetUserPluginConfigReq) (
	configValue string, err error)

GetUserPluginConfig get user plugin config

func (*PluginCommonService) UpdatePluginConfig

func (ps *PluginCommonService) UpdatePluginConfig(ctx context.Context, req *schema.UpdatePluginConfigReq) (err error)

UpdatePluginConfig update plugin config

func (*PluginCommonService) UpdatePluginStatus

func (ps *PluginCommonService) UpdatePluginStatus(ctx context.Context) (err error)

UpdatePluginStatus update plugin status

func (*PluginCommonService) UpdatePluginUserConfig

func (ps *PluginCommonService) UpdatePluginUserConfig(ctx context.Context, req *schema.UpdateUserPluginConfigReq) (err error)

UpdatePluginUserConfig update plugin config

type PluginConfigRepo

type PluginConfigRepo interface {
	SavePluginConfig(ctx context.Context, pluginSlugName, configValue string) (err error)
	GetPluginConfigAll(ctx context.Context) (pluginConfigs []*entity.PluginConfig, err error)
}

type PluginUserConfigRepo

type PluginUserConfigRepo interface {
	SaveUserPluginConfig(ctx context.Context, userID string, pluginSlugName, configValue string) (err error)
	GetPluginUserConfig(ctx context.Context, userID, pluginSlugName string) (
		pluginUserConfig *entity.PluginUserConfig, exist bool, err error)
	GetPluginUserConfigPage(ctx context.Context, page, pageSize int) (
		pluginUserConfigs []*entity.PluginUserConfig, total int64, err error)
	DeleteUserPluginConfig(ctx context.Context, userID string) (err error)
}

Jump to

Keyboard shortcuts

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