Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MysqlServer ¶
type MysqlServer struct {
PluginInfraInterface
}
type PluginInfraInterface ¶
type PluginInfraInterface interface { // GetPluginByID returns plugin by id GetPluginByID(ctx context.Context, id string) (*model.Plugin, error) // GetPluginByName returns plugin by name GetPluginByName(ctx context.Context, name string) (*model.Plugin, error) // ListPlugins returns all plugins ListPlugins(ctx context.Context, limit, offset int32, orderBy, sortFieldName string, fuzzyName ...string) ([]*model.Plugin, error) // CreatePlugin creates a plugin CreatePlugin(ctx context.Context, plugin *model.Plugin) error // CountPlugins returns the number of plugins CountPlugins(ctx context.Context, fuzzyName ...string) (int, error) // UpdatePluginScoreAndHeat updates plugin state UpdatePluginScoreAndHeat(ctx context.Context, id, heat int32, score float64) error // UpdatePluginState updates plugin state GetPluginByAPIURL(ctx context.Context, apiURL string) (*model.Plugin, error) }
func NewPluginInfra ¶
func NewPluginInfra(mysqlConf *config.MysqlOptions) (PluginInfraInterface, error)
type PluginMetadataInfraInterface ¶
type PluginMetadataInfraInterface interface { InsertPluginMetadata(ctx context.Context, metadata model.PluginMetadata) error SelectPluginMetaDataBase(ctx context.Context, pluginID int) (*model.PluginMetadata, error) SelectPluginMetaDataAll(ctx context.Context, pluginID int) (*model.PluginMetadata, error) UpdatePluginMetadata(ctx context.Context, metadata model.PluginMetadata) error }
func NewPluginMetadataInfra ¶
func NewPluginMetadataInfra(mysqlConf *config.MysqlOptions) (PluginMetadataInfraInterface, error)
type PluginScoreInfraInterface ¶
type PluginScoreInfraInterface interface { InsertPluginScore(ctx context.Context, score model.PluginScore) error SelectPluginScore(ctx context.Context, pluginID int) ([]*model.PluginScore, error) }
func NewPluginScoreInfra ¶
func NewPluginScoreInfra(mysqlConf *config.MysqlOptions) (PluginScoreInfraInterface, error)
Click to show internal directories.
Click to hide internal directories.