Documentation
¶
Index ¶
- Constants
- type MigrationOptions
- type PostgresBackend
- func (p *PostgresBackend) AddPluginPolicySync(ctx context.Context, dbTx pgx.Tx, policy itypes.PluginPolicySync) error
- func (p *PostgresBackend) ChangeRatingForPlugin(ctx context.Context, dbTx pgx.Tx, pluginId string, oldRating int, ...) error
- func (p *PostgresBackend) Close() error
- func (p *PostgresBackend) CreatePricing(ctx context.Context, pricingDto types.PricingCreateDto) (*types.Pricing, error)
- func (p *PostgresBackend) CreateRatingForPlugin(ctx context.Context, dbTx pgx.Tx, pluginId string) error
- func (p *PostgresBackend) CreateReview(ctx context.Context, dbTx pgx.Tx, reviewDto itypes.ReviewCreateDto, ...) (string, error)
- func (p *PostgresBackend) CreateVaultToken(ctx context.Context, token types.VaultTokenCreate) (*types.VaultToken, error)
- func (p *PostgresBackend) DeleteAllPolicies(ctx context.Context, dbTx pgx.Tx, pluginID types.PluginID, publicKey string) error
- func (p *PostgresBackend) DeletePluginPolicySync(ctx context.Context, id uuid.UUID) error
- func (p *PostgresBackend) DeletePluginPolicyTx(ctx context.Context, dbTx pgx.Tx, id uuid.UUID) error
- func (p *PostgresBackend) DeletePricingById(ctx context.Context, id uuid.UUID) error
- func (p *PostgresBackend) FindAvgRatingByPluginID(ctx context.Context, pluginID string) (types.PluginAvgRatingDto, error)
- func (p *PostgresBackend) FindPluginById(ctx context.Context, dbTx pgx.Tx, id types.PluginID) (*itypes.Plugin, error)
- func (p *PostgresBackend) FindPlugins(ctx context.Context, filters itypes.PluginFilters, take int, skip int, ...) (*itypes.PluginsPaginatedList, error)
- func (p *PostgresBackend) FindPricingById(ctx context.Context, id uuid.UUID) (*types.Pricing, error)
- func (p *PostgresBackend) FindRatingByPluginId(ctx context.Context, dbTx pgx.Tx, pluginId string) ([]types.PluginRatingDto, error)
- func (p *PostgresBackend) FindReviewById(ctx context.Context, db pgx.Tx, id string) (*itypes.ReviewDto, error)
- func (p *PostgresBackend) FindReviewByUserAndPlugin(ctx context.Context, dbTx pgx.Tx, pluginId string, userAddress string) (*itypes.ReviewDto, error)
- func (p *PostgresBackend) FindReviews(ctx context.Context, pluginId string, skip int, take int, sort string) (itypes.ReviewsDto, error)
- func (p *PostgresBackend) FindTagById(ctx context.Context, id string) (*types.Tag, error)
- func (p *PostgresBackend) FindTagByName(ctx context.Context, name string) (*types.Tag, error)
- func (p *PostgresBackend) FindTags(ctx context.Context) ([]types.Tag, error)
- func (p *PostgresBackend) GetAPIKey(ctx context.Context, apiKey string) (*types.APIKey, error)
- func (p *PostgresBackend) GetAPIKeyByPluginId(ctx context.Context, pluginId string) (*types.APIKey, error)
- func (p *PostgresBackend) GetActiveVaultTokens(ctx context.Context, publicKey string) ([]types.VaultToken, error)
- func (p *PostgresBackend) GetAllPluginPolicies(ctx context.Context, publicKey string, pluginID types.PluginID, take int, ...) (*itypes.PluginPolicyPaginatedList, error)
- func (p *PostgresBackend) GetFeeById(ctx context.Context, id uint64) (*types.Fee, error)
- func (p *PostgresBackend) GetFeesByPublicKey(ctx context.Context, publicKey string) ([]*types.Fee, error)
- func (p *PostgresBackend) GetPluginInstallationsCount(ctx context.Context, pluginID types.PluginID) (itypes.PluginTotalCount, error)
- func (p *PostgresBackend) GetPluginPolicies(ctx context.Context, publicKey string, pluginIds []types.PluginID, ...) ([]types.PluginPolicy, error)
- func (p *PostgresBackend) GetPluginPolicy(ctx context.Context, id uuid.UUID) (*types.PluginPolicy, error)
- func (p *PostgresBackend) GetPluginPolicySync(ctx context.Context, id uuid.UUID) (*itypes.PluginPolicySync, error)
- func (p *PostgresBackend) GetPricingByPluginId(ctx context.Context, pluginId ptypes.PluginID) ([]types.Pricing, error)
- func (p *PostgresBackend) GetUnFinishedPluginPolicySyncs(ctx context.Context) ([]itypes.PluginPolicySync, error)
- func (p *PostgresBackend) GetUserFees(ctx context.Context, publicKey string) (*types.UserFeeStatus, error)
- func (p *PostgresBackend) GetVaultToken(ctx context.Context, tokenID string) (*types.VaultToken, error)
- func (p *PostgresBackend) InsertFee(ctx context.Context, dbTx pgx.Tx, fee *types.Fee) (uint64, error)
- func (p *PostgresBackend) InsertPluginInstallation(ctx context.Context, dbTx pgx.Tx, pluginID types.PluginID, publicKey string) error
- func (p *PostgresBackend) InsertPluginPolicyTx(ctx context.Context, dbTx pgx.Tx, policy types.PluginPolicy) (*types.PluginPolicy, error)
- func (p *PostgresBackend) MarkFeesCollected(ctx context.Context, dbTx pgx.Tx, feeIDs []uint64, txHash string, ...) error
- func (p *PostgresBackend) Migrate(opts *MigrationOptions) error
- func (p *PostgresBackend) Pool() *pgxpool.Pool
- func (p *PostgresBackend) RevokeAllVaultTokens(ctx context.Context, publicKey string) error
- func (p *PostgresBackend) RevokeVaultToken(ctx context.Context, tokenID string) error
- func (p *PostgresBackend) UpdateBatchStatus(ctx context.Context, dbTx pgx.Tx, txHash string, status *rpc.TxOnChainStatus) error
- func (p *PostgresBackend) UpdatePluginPolicySync(ctx context.Context, dbTx pgx.Tx, policy itypes.PluginPolicySync) error
- func (p *PostgresBackend) UpdatePluginPolicyTx(ctx context.Context, dbTx pgx.Tx, policy types.PluginPolicy) (*types.PluginPolicy, error)
- func (p *PostgresBackend) UpdateRatingForPlugin(ctx context.Context, dbTx pgx.Tx, pluginId string, reviewRating int) error
- func (p *PostgresBackend) UpdateReview(ctx context.Context, dbTx pgx.Tx, reviewId string, ...) error
- func (p *PostgresBackend) UpdateVaultTokenLastUsed(ctx context.Context, tokenID string) error
- func (p *PostgresBackend) WithTransaction(ctx context.Context, fn func(ctx context.Context, tx pgx.Tx) error) error
- type SystemMigrationManager
- type VerifierMigrationManager
Constants ¶
View Source
const PLUGINS_TABLE = "plugins"
View Source
const PLUGIN_INSTALLATIONS_TABLE = "plugin_installations"
View Source
const PLUGIN_RATING_TABLE = "plugin_ratings"
View Source
const PLUGIN_TAGS_TABLE = "plugin_tags"
View Source
const REVIEWS_TABLE = "reviews"
View Source
const TAGS_TABLE = "tags"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MigrationOptions ¶
type PostgresBackend ¶
type PostgresBackend struct {
// contains filtered or unexported fields
}
func NewPostgresBackend ¶
func NewPostgresBackend(dsn string, opts *MigrationOptions) (*PostgresBackend, error)
func (*PostgresBackend) AddPluginPolicySync ¶
func (p *PostgresBackend) AddPluginPolicySync(ctx context.Context, dbTx pgx.Tx, policy itypes.PluginPolicySync) error
func (*PostgresBackend) ChangeRatingForPlugin ¶
func (*PostgresBackend) Close ¶
func (p *PostgresBackend) Close() error
func (*PostgresBackend) CreatePricing ¶
func (p *PostgresBackend) CreatePricing(ctx context.Context, pricingDto types.PricingCreateDto) (*types.Pricing, error)
func (*PostgresBackend) CreateRatingForPlugin ¶
func (*PostgresBackend) CreateReview ¶
func (p *PostgresBackend) CreateReview(ctx context.Context, dbTx pgx.Tx, reviewDto itypes.ReviewCreateDto, pluginId string) (string, error)
func (*PostgresBackend) CreateVaultToken ¶
func (p *PostgresBackend) CreateVaultToken(ctx context.Context, token types.VaultTokenCreate) (*types.VaultToken, error)
func (*PostgresBackend) DeleteAllPolicies ¶
func (*PostgresBackend) DeletePluginPolicySync ¶
func (*PostgresBackend) DeletePluginPolicyTx ¶
func (*PostgresBackend) DeletePricingById ¶
func (*PostgresBackend) FindAvgRatingByPluginID ¶
func (p *PostgresBackend) FindAvgRatingByPluginID(ctx context.Context, pluginID string) (types.PluginAvgRatingDto, error)
func (*PostgresBackend) FindPluginById ¶
func (*PostgresBackend) FindPlugins ¶
func (p *PostgresBackend) FindPlugins( ctx context.Context, filters itypes.PluginFilters, take int, skip int, sort string, ) (*itypes.PluginsPaginatedList, error)
func (*PostgresBackend) FindPricingById ¶
func (*PostgresBackend) FindRatingByPluginId ¶
func (p *PostgresBackend) FindRatingByPluginId(ctx context.Context, dbTx pgx.Tx, pluginId string) ([]types.PluginRatingDto, error)
func (*PostgresBackend) FindReviewById ¶
func (*PostgresBackend) FindReviewByUserAndPlugin ¶
func (*PostgresBackend) FindReviews ¶
func (p *PostgresBackend) FindReviews(ctx context.Context, pluginId string, skip int, take int, sort string) (itypes.ReviewsDto, error)
func (*PostgresBackend) FindTagById ¶
func (*PostgresBackend) FindTagByName ¶
func (*PostgresBackend) GetAPIKeyByPluginId ¶
func (*PostgresBackend) GetActiveVaultTokens ¶
func (p *PostgresBackend) GetActiveVaultTokens(ctx context.Context, publicKey string) ([]types.VaultToken, error)
func (*PostgresBackend) GetAllPluginPolicies ¶
func (*PostgresBackend) GetFeeById ¶
func (*PostgresBackend) GetFeesByPublicKey ¶
func (*PostgresBackend) GetPluginInstallationsCount ¶
func (p *PostgresBackend) GetPluginInstallationsCount(ctx context.Context, pluginID types.PluginID) (itypes.PluginTotalCount, error)
func (*PostgresBackend) GetPluginPolicies ¶
func (p *PostgresBackend) GetPluginPolicies(ctx context.Context, publicKey string, pluginIds []types.PluginID, includeInactive bool) ([]types.PluginPolicy, error)
func (*PostgresBackend) GetPluginPolicy ¶
func (p *PostgresBackend) GetPluginPolicy(ctx context.Context, id uuid.UUID) (*types.PluginPolicy, error)
func (*PostgresBackend) GetPluginPolicySync ¶
func (p *PostgresBackend) GetPluginPolicySync(ctx context.Context, id uuid.UUID) (*itypes.PluginPolicySync, error)
func (*PostgresBackend) GetPricingByPluginId ¶
func (*PostgresBackend) GetUnFinishedPluginPolicySyncs ¶
func (p *PostgresBackend) GetUnFinishedPluginPolicySyncs(ctx context.Context) ([]itypes.PluginPolicySync, error)
func (*PostgresBackend) GetUserFees ¶
func (p *PostgresBackend) GetUserFees( ctx context.Context, publicKey string, ) (*types.UserFeeStatus, error)
func (*PostgresBackend) GetVaultToken ¶
func (p *PostgresBackend) GetVaultToken(ctx context.Context, tokenID string) (*types.VaultToken, error)
func (*PostgresBackend) InsertPluginInstallation ¶
func (*PostgresBackend) InsertPluginPolicyTx ¶
func (p *PostgresBackend) InsertPluginPolicyTx(ctx context.Context, dbTx pgx.Tx, policy types.PluginPolicy) (*types.PluginPolicy, error)
func (*PostgresBackend) MarkFeesCollected ¶
func (*PostgresBackend) Migrate ¶
func (p *PostgresBackend) Migrate(opts *MigrationOptions) error
func (*PostgresBackend) Pool ¶
func (p *PostgresBackend) Pool() *pgxpool.Pool
func (*PostgresBackend) RevokeAllVaultTokens ¶
func (p *PostgresBackend) RevokeAllVaultTokens(ctx context.Context, publicKey string) error
func (*PostgresBackend) RevokeVaultToken ¶
func (p *PostgresBackend) RevokeVaultToken(ctx context.Context, tokenID string) error
func (*PostgresBackend) UpdateBatchStatus ¶
func (p *PostgresBackend) UpdateBatchStatus(ctx context.Context, dbTx pgx.Tx, txHash string, status *rpc.TxOnChainStatus) error
func (*PostgresBackend) UpdatePluginPolicySync ¶
func (p *PostgresBackend) UpdatePluginPolicySync(ctx context.Context, dbTx pgx.Tx, policy itypes.PluginPolicySync) error
func (*PostgresBackend) UpdatePluginPolicyTx ¶
func (p *PostgresBackend) UpdatePluginPolicyTx(ctx context.Context, dbTx pgx.Tx, policy types.PluginPolicy) (*types.PluginPolicy, error)
func (*PostgresBackend) UpdateRatingForPlugin ¶
func (*PostgresBackend) UpdateReview ¶
func (p *PostgresBackend) UpdateReview(ctx context.Context, dbTx pgx.Tx, reviewId string, reviewDto itypes.ReviewCreateDto) error
func (*PostgresBackend) UpdateVaultTokenLastUsed ¶
func (p *PostgresBackend) UpdateVaultTokenLastUsed(ctx context.Context, tokenID string) error
type SystemMigrationManager ¶
type SystemMigrationManager struct {
// contains filtered or unexported fields
}
SystemMigrationManager handles system-level migrations (plugin_policies table)
func NewSystemMigrationManager ¶
func NewSystemMigrationManager(pool *pgxpool.Pool) *SystemMigrationManager
func (*SystemMigrationManager) Migrate ¶
func (s *SystemMigrationManager) Migrate() error
type VerifierMigrationManager ¶
type VerifierMigrationManager struct {
// contains filtered or unexported fields
}
VerifierMigrationManager handles verifier-specific migrations
func NewVerifierMigrationManager ¶
func NewVerifierMigrationManager(pool *pgxpool.Pool) *VerifierMigrationManager
func (*VerifierMigrationManager) Migrate ¶
func (v *VerifierMigrationManager) Migrate() error
Click to show internal directories.
Click to hide internal directories.