queries

package
v0.1.20 Latest Latest
Warning

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

Go to latest
Published: Feb 6, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AddPluginTeamMemberParams added in v0.1.19

type AddPluginTeamMemberParams struct {
	PluginID         PluginID        `json:"plugin_id"`
	PublicKey        string          `json:"public_key"`
	Role             PluginOwnerRole `json:"role"`
	AddedByPublicKey pgtype.Text     `json:"added_by_public_key"`
	LinkID           pgtype.UUID     `json:"link_id"`
}

type BatchStatus

type BatchStatus string
const (
	BatchStatusSIGNED    BatchStatus = "SIGNED"
	BatchStatusBATCHED   BatchStatus = "BATCHED"
	BatchStatusFAILED    BatchStatus = "FAILED"
	BatchStatusCOMPLETED BatchStatus = "COMPLETED"
)

func (*BatchStatus) Scan

func (e *BatchStatus) Scan(src interface{}) error

type BillingAsset

type BillingAsset string
const (
	BillingAssetUsdc BillingAsset = "usdc"
)

func (*BillingAsset) Scan

func (e *BillingAsset) Scan(src interface{}) error

type ControlFlag

type ControlFlag struct {
	Key       string             `json:"key"`
	Enabled   bool               `json:"enabled"`
	UpdatedAt pgtype.Timestamptz `json:"updated_at"`
}

type CountEarningsByPluginOwnerFilteredParams added in v0.1.20

type CountEarningsByPluginOwnerFilteredParams struct {
	PublicKey string             `json:"public_key"`
	Column2   interface{}        `json:"column_2"`
	Column3   pgtype.Timestamptz `json:"column_3"`
	Column4   pgtype.Timestamptz `json:"column_4"`
}

type CreatePluginApiKeyParams added in v0.1.19

type CreatePluginApiKeyParams struct {
	PluginID  PluginID           `json:"plugin_id"`
	Apikey    string             `json:"apikey"`
	ExpiresAt pgtype.Timestamptz `json:"expires_at"`
}

type DBTX

type DBTX interface {
	Exec(context.Context, string, ...interface{}) (pgconn.CommandTag, error)
	Query(context.Context, string, ...interface{}) (pgx.Rows, error)
	QueryRow(context.Context, string, ...interface{}) pgx.Row
}

type Fee

type Fee struct {
	ID              int64              `json:"id"`
	PolicyID        pgtype.UUID        `json:"policy_id"`
	PublicKey       string             `json:"public_key"`
	TransactionType TransactionType    `json:"transaction_type"`
	Amount          int64              `json:"amount"`
	CreatedAt       pgtype.Timestamptz `json:"created_at"`
	FeeType         string             `json:"fee_type"`
	Metadata        []byte             `json:"metadata"`
	UnderlyingType  string             `json:"underlying_type"`
	UnderlyingID    string             `json:"underlying_id"`
	PluginID        pgtype.Text        `json:"plugin_id"`
}

type FeeBatch

type FeeBatch struct {
	ID             int64              `json:"id"`
	CreatedAt      pgtype.Timestamptz `json:"created_at"`
	TotalValue     int64              `json:"total_value"`
	Status         BatchStatus        `json:"status"`
	BatchCutoff    int32              `json:"batch_cutoff"`
	CollectionTxID pgtype.Text        `json:"collection_tx_id"`
}

type FeeBatchMember

type FeeBatchMember struct {
	BatchID int64 `json:"batch_id"`
	FeeID   int64 `json:"fee_id"`
}

type GetEarningsByPluginForOwnerRow added in v0.1.19

type GetEarningsByPluginForOwnerRow struct {
	PluginID pgtype.Text `json:"plugin_id"`
	Total    int64       `json:"total"`
}

type GetEarningsByPluginOwnerFilteredParams added in v0.1.19

type GetEarningsByPluginOwnerFilteredParams struct {
	PublicKey string             `json:"public_key"`
	Column2   interface{}        `json:"column_2"`
	Column3   pgtype.Timestamptz `json:"column_3"`
	Column4   pgtype.Timestamptz `json:"column_4"`
	Limit     int32              `json:"limit"`
	Offset    int32              `json:"offset"`
}

type GetEarningsByPluginOwnerFilteredRow added in v0.1.19

type GetEarningsByPluginOwnerFilteredRow struct {
	ID          int64              `json:"id"`
	PluginID    pgtype.Text        `json:"plugin_id"`
	PluginName  string             `json:"plugin_name"`
	Amount      int64              `json:"amount"`
	Asset       string             `json:"asset"`
	PricingType interface{}        `json:"pricing_type"`
	CreatedAt   pgtype.Timestamptz `json:"created_at"`
	FromAddress string             `json:"from_address"`
	TxHash      string             `json:"tx_hash"`
	Status      string             `json:"status"`
}

type GetEarningsByPluginOwnerRow added in v0.1.19

type GetEarningsByPluginOwnerRow struct {
	ID          int64              `json:"id"`
	PluginID    pgtype.Text        `json:"plugin_id"`
	PluginName  string             `json:"plugin_name"`
	Amount      int64              `json:"amount"`
	Asset       string             `json:"asset"`
	PricingType interface{}        `json:"pricing_type"`
	CreatedAt   pgtype.Timestamptz `json:"created_at"`
	FromAddress string             `json:"from_address"`
	TxHash      string             `json:"tx_hash"`
	Status      string             `json:"status"`
}

type GetEarningsSummaryByPluginOwnerRow added in v0.1.19

type GetEarningsSummaryByPluginOwnerRow struct {
	TotalEarnings     int64 `json:"total_earnings"`
	TotalTransactions int64 `json:"total_transactions"`
}

type GetPluginByIDAndOwnerParams added in v0.1.19

type GetPluginByIDAndOwnerParams struct {
	ID        PluginID `json:"id"`
	PublicKey string   `json:"public_key"`
}

type GetPluginOwnerParams added in v0.1.19

type GetPluginOwnerParams struct {
	PluginID  PluginID `json:"plugin_id"`
	PublicKey string   `json:"public_key"`
}

type GetPluginOwnerWithRoleParams added in v0.1.19

type GetPluginOwnerWithRoleParams struct {
	PluginID  PluginID `json:"plugin_id"`
	PublicKey string   `json:"public_key"`
}

type NullBatchStatus

type NullBatchStatus struct {
	BatchStatus BatchStatus `json:"batch_status"`
	Valid       bool        `json:"valid"` // Valid is true if BatchStatus is not NULL
}

func (*NullBatchStatus) Scan

func (ns *NullBatchStatus) Scan(value interface{}) error

Scan implements the Scanner interface.

func (NullBatchStatus) Value

func (ns NullBatchStatus) Value() (driver.Value, error)

Value implements the driver Valuer interface.

type NullBillingAsset

type NullBillingAsset struct {
	BillingAsset BillingAsset `json:"billing_asset"`
	Valid        bool         `json:"valid"` // Valid is true if BillingAsset is not NULL
}

func (*NullBillingAsset) Scan

func (ns *NullBillingAsset) Scan(value interface{}) error

Scan implements the Scanner interface.

func (NullBillingAsset) Value

func (ns NullBillingAsset) Value() (driver.Value, error)

Value implements the driver Valuer interface.

type NullPluginCategory

type NullPluginCategory struct {
	PluginCategory PluginCategory `json:"plugin_category"`
	Valid          bool           `json:"valid"` // Valid is true if PluginCategory is not NULL
}

func (*NullPluginCategory) Scan

func (ns *NullPluginCategory) Scan(value interface{}) error

Scan implements the Scanner interface.

func (NullPluginCategory) Value

func (ns NullPluginCategory) Value() (driver.Value, error)

Value implements the driver Valuer interface.

type NullPluginID

type NullPluginID struct {
	PluginID PluginID `json:"plugin_id"`
	Valid    bool     `json:"valid"` // Valid is true if PluginID is not NULL
}

func (*NullPluginID) Scan

func (ns *NullPluginID) Scan(value interface{}) error

Scan implements the Scanner interface.

func (NullPluginID) Value

func (ns NullPluginID) Value() (driver.Value, error)

Value implements the driver Valuer interface.

type NullPluginOwnerAddedVia added in v0.1.19

type NullPluginOwnerAddedVia struct {
	PluginOwnerAddedVia PluginOwnerAddedVia `json:"plugin_owner_added_via"`
	Valid               bool                `json:"valid"` // Valid is true if PluginOwnerAddedVia is not NULL
}

func (*NullPluginOwnerAddedVia) Scan added in v0.1.19

func (ns *NullPluginOwnerAddedVia) Scan(value interface{}) error

Scan implements the Scanner interface.

func (NullPluginOwnerAddedVia) Value added in v0.1.19

func (ns NullPluginOwnerAddedVia) Value() (driver.Value, error)

Value implements the driver Valuer interface.

type NullPluginOwnerRole added in v0.1.19

type NullPluginOwnerRole struct {
	PluginOwnerRole PluginOwnerRole `json:"plugin_owner_role"`
	Valid           bool            `json:"valid"` // Valid is true if PluginOwnerRole is not NULL
}

func (*NullPluginOwnerRole) Scan added in v0.1.19

func (ns *NullPluginOwnerRole) Scan(value interface{}) error

Scan implements the Scanner interface.

func (NullPluginOwnerRole) Value added in v0.1.19

func (ns NullPluginOwnerRole) Value() (driver.Value, error)

Value implements the driver Valuer interface.

type NullPricingAsset

type NullPricingAsset struct {
	PricingAsset PricingAsset `json:"pricing_asset"`
	Valid        bool         `json:"valid"` // Valid is true if PricingAsset is not NULL
}

func (*NullPricingAsset) Scan

func (ns *NullPricingAsset) Scan(value interface{}) error

Scan implements the Scanner interface.

func (NullPricingAsset) Value

func (ns NullPricingAsset) Value() (driver.Value, error)

Value implements the driver Valuer interface.

type NullPricingFrequency

type NullPricingFrequency struct {
	PricingFrequency PricingFrequency `json:"pricing_frequency"`
	Valid            bool             `json:"valid"` // Valid is true if PricingFrequency is not NULL
}

func (*NullPricingFrequency) Scan

func (ns *NullPricingFrequency) Scan(value interface{}) error

Scan implements the Scanner interface.

func (NullPricingFrequency) Value

func (ns NullPricingFrequency) Value() (driver.Value, error)

Value implements the driver Valuer interface.

type NullPricingMetric

type NullPricingMetric struct {
	PricingMetric PricingMetric `json:"pricing_metric"`
	Valid         bool          `json:"valid"` // Valid is true if PricingMetric is not NULL
}

func (*NullPricingMetric) Scan

func (ns *NullPricingMetric) Scan(value interface{}) error

Scan implements the Scanner interface.

func (NullPricingMetric) Value

func (ns NullPricingMetric) Value() (driver.Value, error)

Value implements the driver Valuer interface.

type NullPricingType

type NullPricingType struct {
	PricingType PricingType `json:"pricing_type"`
	Valid       bool        `json:"valid"` // Valid is true if PricingType is not NULL
}

func (*NullPricingType) Scan

func (ns *NullPricingType) Scan(value interface{}) error

Scan implements the Scanner interface.

func (NullPricingType) Value

func (ns NullPricingType) Value() (driver.Value, error)

Value implements the driver Valuer interface.

type NullTransactionType

type NullTransactionType struct {
	TransactionType TransactionType `json:"transaction_type"`
	Valid           bool            `json:"valid"` // Valid is true if TransactionType is not NULL
}

func (*NullTransactionType) Scan

func (ns *NullTransactionType) Scan(value interface{}) error

Scan implements the Scanner interface.

func (NullTransactionType) Value

func (ns NullTransactionType) Value() (driver.Value, error)

Value implements the driver Valuer interface.

type NullTxIndexerStatus

type NullTxIndexerStatus struct {
	TxIndexerStatus TxIndexerStatus `json:"tx_indexer_status"`
	Valid           bool            `json:"valid"` // Valid is true if TxIndexerStatus is not NULL
}

func (*NullTxIndexerStatus) Scan

func (ns *NullTxIndexerStatus) Scan(value interface{}) error

Scan implements the Scanner interface.

func (NullTxIndexerStatus) Value

func (ns NullTxIndexerStatus) Value() (driver.Value, error)

Value implements the driver Valuer interface.

type NullTxIndexerStatusOnchain

type NullTxIndexerStatusOnchain struct {
	TxIndexerStatusOnchain TxIndexerStatusOnchain `json:"tx_indexer_status_onchain"`
	Valid                  bool                   `json:"valid"` // Valid is true if TxIndexerStatusOnchain is not NULL
}

func (*NullTxIndexerStatusOnchain) Scan

func (ns *NullTxIndexerStatusOnchain) Scan(value interface{}) error

Scan implements the Scanner interface.

func (NullTxIndexerStatusOnchain) Value

Value implements the driver Valuer interface.

type Plugin

type Plugin struct {
	ID             PluginID           `json:"id"`
	Title          string             `json:"title"`
	Description    string             `json:"description"`
	ServerEndpoint string             `json:"server_endpoint"`
	Category       PluginCategory     `json:"category"`
	CreatedAt      pgtype.Timestamptz `json:"created_at"`
	UpdatedAt      pgtype.Timestamptz `json:"updated_at"`
	LogoUrl        string             `json:"logo_url"`
	ThumbnailUrl   string             `json:"thumbnail_url"`
	Images         []byte             `json:"images"`
	Faqs           []byte             `json:"faqs"`
	Features       []byte             `json:"features"`
	Audited        bool               `json:"audited"`
}

type PluginApikey

type PluginApikey struct {
	ID        pgtype.UUID        `json:"id"`
	PluginID  PluginID           `json:"plugin_id"`
	Apikey    string             `json:"apikey"`
	CreatedAt pgtype.Timestamptz `json:"created_at"`
	ExpiresAt pgtype.Timestamptz `json:"expires_at"`
	Status    int32              `json:"status"`
}

type PluginCategory

type PluginCategory string
const (
	PluginCategoryAiAgent PluginCategory = "ai-agent"
	PluginCategoryPlugin  PluginCategory = "plugin"
	PluginCategoryApp     PluginCategory = "app"
)

func (*PluginCategory) Scan

func (e *PluginCategory) Scan(src interface{}) error

type PluginID

type PluginID string
const (
	PluginIDVultisigDca0000            PluginID = "vultisig-dca-0000"
	PluginIDVultisigPayroll0000        PluginID = "vultisig-payroll-0000"
	PluginIDVultisigFeesFeee           PluginID = "vultisig-fees-feee"
	PluginIDVultisigCopytrader0000     PluginID = "vultisig-copytrader-0000"
	PluginIDNbitsLabsMerkleE93d        PluginID = "nbits-labs-merkle-e93d"
	PluginIDVultisigRecurringSends0000 PluginID = "vultisig-recurring-sends-0000"
)

func (*PluginID) Scan

func (e *PluginID) Scan(src interface{}) error

type PluginInstallation

type PluginInstallation struct {
	PluginID    PluginID           `json:"plugin_id"`
	PublicKey   string             `json:"public_key"`
	InstalledAt pgtype.Timestamptz `json:"installed_at"`
}

type PluginOwner added in v0.1.19

type PluginOwner struct {
	PluginID         PluginID            `json:"plugin_id"`
	PublicKey        string              `json:"public_key"`
	Active           bool                `json:"active"`
	Role             PluginOwnerRole     `json:"role"`
	AddedVia         PluginOwnerAddedVia `json:"added_via"`
	AddedByPublicKey pgtype.Text         `json:"added_by_public_key"`
	CreatedAt        pgtype.Timestamptz  `json:"created_at"`
	UpdatedAt        pgtype.Timestamptz  `json:"updated_at"`
	LinkID           pgtype.UUID         `json:"link_id"`
}

type PluginOwnerAddedVia added in v0.1.19

type PluginOwnerAddedVia string
const (
	PluginOwnerAddedViaBootstrapPluginKey PluginOwnerAddedVia = "bootstrap_plugin_key"
	PluginOwnerAddedViaOwnerApi           PluginOwnerAddedVia = "owner_api"
	PluginOwnerAddedViaAdminCli           PluginOwnerAddedVia = "admin_cli"
	PluginOwnerAddedViaMagicLink          PluginOwnerAddedVia = "magic_link"
)

func (*PluginOwnerAddedVia) Scan added in v0.1.19

func (e *PluginOwnerAddedVia) Scan(src interface{}) error

type PluginOwnerRole added in v0.1.19

type PluginOwnerRole string
const (
	PluginOwnerRoleAdmin  PluginOwnerRole = "admin"
	PluginOwnerRoleStaff  PluginOwnerRole = "staff"
	PluginOwnerRoleEditor PluginOwnerRole = "editor"
	PluginOwnerRoleViewer PluginOwnerRole = "viewer"
)

func (*PluginOwnerRole) Scan added in v0.1.19

func (e *PluginOwnerRole) Scan(src interface{}) error

type PluginPauseHistory added in v0.1.19

type PluginPauseHistory struct {
	ID                pgtype.UUID        `json:"id"`
	PluginID          PluginID           `json:"plugin_id"`
	Action            string             `json:"action"`
	ReportCountWindow pgtype.Int4        `json:"report_count_window"`
	ActiveUsers       pgtype.Int4        `json:"active_users"`
	ThresholdRate     pgtype.Numeric     `json:"threshold_rate"`
	Reason            pgtype.Text        `json:"reason"`
	TriggeredBy       pgtype.Text        `json:"triggered_by"`
	CreatedAt         pgtype.Timestamptz `json:"created_at"`
}

type PluginPolicy

type PluginPolicy struct {
	ID                 pgtype.UUID        `json:"id"`
	PublicKey          string             `json:"public_key"`
	PluginID           PluginID           `json:"plugin_id"`
	PluginVersion      string             `json:"plugin_version"`
	PolicyVersion      int32              `json:"policy_version"`
	Signature          string             `json:"signature"`
	Recipe             string             `json:"recipe"`
	Active             bool               `json:"active"`
	CreatedAt          pgtype.Timestamptz `json:"created_at"`
	UpdatedAt          pgtype.Timestamptz `json:"updated_at"`
	Deleted            bool               `json:"deleted"`
	DeactivationReason pgtype.Text        `json:"deactivation_reason"`
}

type PluginPolicyBilling

type PluginPolicyBilling struct {
	ID             pgtype.UUID          `json:"id"`
	Type           PricingType          `json:"type"`
	Frequency      NullPricingFrequency `json:"frequency"`
	StartDate      pgtype.Date          `json:"start_date"`
	Amount         int64                `json:"amount"`
	Asset          PricingAsset         `json:"asset"`
	PluginPolicyID pgtype.UUID          `json:"plugin_policy_id"`
}

type PluginPolicySync

type PluginPolicySync struct {
	ID        pgtype.UUID        `json:"id"`
	PolicyID  pgtype.UUID        `json:"policy_id"`
	PluginID  PluginID           `json:"plugin_id"`
	SyncType  int32              `json:"sync_type"`
	Signature pgtype.Text        `json:"signature"`
	Status    int32              `json:"status"`
	Reason    pgtype.Text        `json:"reason"`
	CreatedAt pgtype.Timestamptz `json:"created_at"`
	UpdatedAt pgtype.Timestamptz `json:"updated_at"`
}

type PluginRating

type PluginRating struct {
	PluginID     PluginID           `json:"plugin_id"`
	AvgRating    pgtype.Numeric     `json:"avg_rating"`
	TotalRatings int32              `json:"total_ratings"`
	Rating1Count int32              `json:"rating_1_count"`
	Rating2Count int32              `json:"rating_2_count"`
	Rating3Count int32              `json:"rating_3_count"`
	Rating4Count int32              `json:"rating_4_count"`
	Rating5Count int32              `json:"rating_5_count"`
	UpdatedAt    pgtype.Timestamptz `json:"updated_at"`
}

type PluginReport added in v0.1.19

type PluginReport struct {
	PluginID          PluginID           `json:"plugin_id"`
	ReporterPublicKey string             `json:"reporter_public_key"`
	Reason            string             `json:"reason"`
	CreatedAt         pgtype.Timestamptz `json:"created_at"`
	LastReportedAt    pgtype.Timestamptz `json:"last_reported_at"`
	ReportCount       int32              `json:"report_count"`
	Details           string             `json:"details"`
}

type PluginTag

type PluginTag struct {
	PluginID PluginID    `json:"plugin_id"`
	TagID    pgtype.UUID `json:"tag_id"`
}

type Pricing

type Pricing struct {
	ID        pgtype.UUID          `json:"id"`
	Type      PricingType          `json:"type"`
	Frequency NullPricingFrequency `json:"frequency"`
	Amount    int64                `json:"amount"`
	Asset     PricingAsset         `json:"asset"`
	Metric    PricingMetric        `json:"metric"`
	PluginID  PluginID             `json:"plugin_id"`
	CreatedAt pgtype.Timestamptz   `json:"created_at"`
	UpdatedAt pgtype.Timestamptz   `json:"updated_at"`
}

type PricingAsset

type PricingAsset string
const (
	PricingAssetUsdc PricingAsset = "usdc"
)

func (*PricingAsset) Scan

func (e *PricingAsset) Scan(src interface{}) error

type PricingFrequency

type PricingFrequency string
const (
	PricingFrequencyDaily    PricingFrequency = "daily"
	PricingFrequencyWeekly   PricingFrequency = "weekly"
	PricingFrequencyBiweekly PricingFrequency = "biweekly"
	PricingFrequencyMonthly  PricingFrequency = "monthly"
)

func (*PricingFrequency) Scan

func (e *PricingFrequency) Scan(src interface{}) error

type PricingMetric

type PricingMetric string
const (
	PricingMetricFixed PricingMetric = "fixed"
)

func (*PricingMetric) Scan

func (e *PricingMetric) Scan(src interface{}) error

type PricingType

type PricingType string
const (
	PricingTypeOnce      PricingType = "once"
	PricingTypeRecurring PricingType = "recurring"
	PricingTypePerTx     PricingType = "per-tx"
)

func (*PricingType) Scan

func (e *PricingType) Scan(src interface{}) error

type Queries

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

func New

func New(db DBTX) *Queries

func (*Queries) AcquireApiKeyLock added in v0.1.19

func (q *Queries) AcquireApiKeyLock(ctx context.Context, dollar_1 string) error

func (*Queries) AddPluginTeamMember added in v0.1.19

func (q *Queries) AddPluginTeamMember(ctx context.Context, arg *AddPluginTeamMemberParams) (*PluginOwner, error)

Add a new team member via magic link invite

func (*Queries) CheckLinkIdUsed added in v0.1.19

func (q *Queries) CheckLinkIdUsed(ctx context.Context, linkID pgtype.UUID) (bool, error)

Check if a link_id has already been used

func (*Queries) CountActiveApiKeys added in v0.1.19

func (q *Queries) CountActiveApiKeys(ctx context.Context, pluginID PluginID) (int64, error)

func (*Queries) CountEarningsByPluginOwnerFiltered added in v0.1.20

func (q *Queries) CountEarningsByPluginOwnerFiltered(ctx context.Context, arg *CountEarningsByPluginOwnerFilteredParams) (int64, error)

func (*Queries) CreatePluginApiKey added in v0.1.19

func (q *Queries) CreatePluginApiKey(ctx context.Context, arg *CreatePluginApiKeyParams) (*PluginApikey, error)

func (*Queries) ExpirePluginApiKey added in v0.1.19

func (q *Queries) ExpirePluginApiKey(ctx context.Context, id pgtype.UUID) (*PluginApikey, error)

func (*Queries) GetControlFlag added in v0.1.19

func (q *Queries) GetControlFlag(ctx context.Context, key string) (*ControlFlag, error)

Control Flags table queries (kill switch functionality)

func (*Queries) GetControlFlagsByKeys added in v0.1.19

func (q *Queries) GetControlFlagsByKeys(ctx context.Context, dollar_1 []string) ([]*ControlFlag, error)

func (*Queries) GetEarningsByPluginForOwner added in v0.1.19

func (q *Queries) GetEarningsByPluginForOwner(ctx context.Context, publicKey string) ([]*GetEarningsByPluginForOwnerRow, error)

func (*Queries) GetEarningsByPluginOwner added in v0.1.19

func (q *Queries) GetEarningsByPluginOwner(ctx context.Context, publicKey string) ([]*GetEarningsByPluginOwnerRow, error)

Earnings/Fees table queries

func (*Queries) GetEarningsByPluginOwnerFiltered added in v0.1.19

func (q *Queries) GetEarningsByPluginOwnerFiltered(ctx context.Context, arg *GetEarningsByPluginOwnerFilteredParams) ([]*GetEarningsByPluginOwnerFilteredRow, error)

func (*Queries) GetEarningsSummaryByPluginOwner added in v0.1.19

func (q *Queries) GetEarningsSummaryByPluginOwner(ctx context.Context, publicKey string) (*GetEarningsSummaryByPluginOwnerRow, error)

func (*Queries) GetPluginApiKeyByID added in v0.1.19

func (q *Queries) GetPluginApiKeyByID(ctx context.Context, id pgtype.UUID) (*PluginApikey, error)

func (*Queries) GetPluginApiKeys added in v0.1.19

func (q *Queries) GetPluginApiKeys(ctx context.Context, pluginID PluginID) ([]*PluginApikey, error)

Plugin API Keys table queries

func (*Queries) GetPluginByID

func (q *Queries) GetPluginByID(ctx context.Context, id PluginID) (*Plugin, error)

Plugins table queries

func (*Queries) GetPluginByIDAndOwner added in v0.1.19

func (q *Queries) GetPluginByIDAndOwner(ctx context.Context, arg *GetPluginByIDAndOwnerParams) (*Plugin, error)

func (*Queries) GetPluginOwner added in v0.1.19

func (q *Queries) GetPluginOwner(ctx context.Context, arg *GetPluginOwnerParams) (*PluginOwner, error)

Plugin Owners table queries (team management)

func (*Queries) GetPluginOwnerWithRole added in v0.1.19

func (q *Queries) GetPluginOwnerWithRole(ctx context.Context, arg *GetPluginOwnerWithRoleParams) (*PluginOwner, error)

Get a specific owner with their role for permission checks

func (*Queries) GetPluginPricings added in v0.1.19

func (q *Queries) GetPluginPricings(ctx context.Context, pluginID PluginID) ([]*Pricing, error)

func (*Queries) ListPluginOwners added in v0.1.19

func (q *Queries) ListPluginOwners(ctx context.Context, pluginID PluginID) ([]*PluginOwner, error)

func (*Queries) ListPluginTeamMembers added in v0.1.19

func (q *Queries) ListPluginTeamMembers(ctx context.Context, pluginID PluginID) ([]*PluginOwner, error)

Team Management Queries List team members for a plugin, excluding staff role (admins can't see staff)

func (*Queries) ListPlugins added in v0.1.19

func (q *Queries) ListPlugins(ctx context.Context) ([]*Plugin, error)

func (*Queries) ListPluginsByOwner added in v0.1.19

func (q *Queries) ListPluginsByOwner(ctx context.Context, publicKey string) ([]*Plugin, error)

func (*Queries) RemovePluginTeamMember added in v0.1.19

func (q *Queries) RemovePluginTeamMember(ctx context.Context, arg *RemovePluginTeamMemberParams) error

Deactivate a team member (soft delete)

func (*Queries) UpdatePlugin added in v0.1.19

func (q *Queries) UpdatePlugin(ctx context.Context, arg *UpdatePluginParams) (*Plugin, error)

func (*Queries) UpdatePluginApiKeyStatus added in v0.1.19

func (q *Queries) UpdatePluginApiKeyStatus(ctx context.Context, arg *UpdatePluginApiKeyStatusParams) (*PluginApikey, error)

func (*Queries) UpsertControlFlag added in v0.1.19

func (q *Queries) UpsertControlFlag(ctx context.Context, arg *UpsertControlFlagParams) error

func (*Queries) UpsertControlFlagReturning added in v0.1.19

func (q *Queries) UpsertControlFlagReturning(ctx context.Context, arg *UpsertControlFlagReturningParams) (*ControlFlag, error)

func (*Queries) WithTx

func (q *Queries) WithTx(tx pgx.Tx) *Queries

type RemovePluginTeamMemberParams added in v0.1.19

type RemovePluginTeamMemberParams struct {
	PluginID  PluginID `json:"plugin_id"`
	PublicKey string   `json:"public_key"`
}

type Review

type Review struct {
	ID        pgtype.UUID        `json:"id"`
	PluginID  NullPluginID       `json:"plugin_id"`
	PublicKey string             `json:"public_key"`
	Rating    int32              `json:"rating"`
	Comment   pgtype.Text        `json:"comment"`
	CreatedAt pgtype.Timestamptz `json:"created_at"`
	UpdatedAt pgtype.Timestamptz `json:"updated_at"`
}

type Tag

type Tag struct {
	ID        pgtype.UUID        `json:"id"`
	Name      string             `json:"name"`
	CreatedAt pgtype.Timestamptz `json:"created_at"`
}

type TransactionType

type TransactionType string
const (
	TransactionTypeDebit  TransactionType = "debit"
	TransactionTypeCredit TransactionType = "credit"
)

func (*TransactionType) Scan

func (e *TransactionType) Scan(src interface{}) error

type TxIndexer

type TxIndexer struct {
	ID            pgtype.UUID                `json:"id"`
	PluginID      string                     `json:"plugin_id"`
	TxHash        pgtype.Text                `json:"tx_hash"`
	ChainID       int32                      `json:"chain_id"`
	PolicyID      pgtype.UUID                `json:"policy_id"`
	TokenID       string                     `json:"token_id"`
	FromPublicKey string                     `json:"from_public_key"`
	ToPublicKey   string                     `json:"to_public_key"`
	ProposedTxHex string                     `json:"proposed_tx_hex"`
	Status        TxIndexerStatus            `json:"status"`
	StatusOnchain NullTxIndexerStatusOnchain `json:"status_onchain"`
	Lost          bool                       `json:"lost"`
	BroadcastedAt pgtype.Timestamp           `json:"broadcasted_at"`
	CreatedAt     pgtype.Timestamp           `json:"created_at"`
	UpdatedAt     pgtype.Timestamp           `json:"updated_at"`
	Amount        pgtype.Text                `json:"amount"`
}

type TxIndexerStatus

type TxIndexerStatus string
const (
	TxIndexerStatusPROPOSED TxIndexerStatus = "PROPOSED"
	TxIndexerStatusVERIFIED TxIndexerStatus = "VERIFIED"
	TxIndexerStatusSIGNED   TxIndexerStatus = "SIGNED"
)

func (*TxIndexerStatus) Scan

func (e *TxIndexerStatus) Scan(src interface{}) error

type TxIndexerStatusOnchain

type TxIndexerStatusOnchain string
const (
	TxIndexerStatusOnchainPENDING TxIndexerStatusOnchain = "PENDING"
	TxIndexerStatusOnchainSUCCESS TxIndexerStatusOnchain = "SUCCESS"
	TxIndexerStatusOnchainFAIL    TxIndexerStatusOnchain = "FAIL"
)

func (*TxIndexerStatusOnchain) Scan

func (e *TxIndexerStatusOnchain) Scan(src interface{}) error

type UpdatePluginApiKeyStatusParams added in v0.1.19

type UpdatePluginApiKeyStatusParams struct {
	ID     pgtype.UUID `json:"id"`
	Status int32       `json:"status"`
}

type UpdatePluginParams added in v0.1.19

type UpdatePluginParams struct {
	ID             PluginID `json:"id"`
	Title          string   `json:"title"`
	Description    string   `json:"description"`
	ServerEndpoint string   `json:"server_endpoint"`
}

type UpsertControlFlagParams added in v0.1.19

type UpsertControlFlagParams struct {
	Key     string `json:"key"`
	Enabled bool   `json:"enabled"`
}

type UpsertControlFlagReturningParams added in v0.1.19

type UpsertControlFlagReturningParams struct {
	Key     string `json:"key"`
	Enabled bool   `json:"enabled"`
}

type VaultToken

type VaultToken struct {
	ID         pgtype.UUID        `json:"id"`
	TokenID    string             `json:"token_id"`
	PublicKey  string             `json:"public_key"`
	CreatedAt  pgtype.Timestamptz `json:"created_at"`
	ExpiresAt  pgtype.Timestamptz `json:"expires_at"`
	LastUsedAt pgtype.Timestamptz `json:"last_used_at"`
	RevokedAt  pgtype.Timestamptz `json:"revoked_at"`
	UpdatedAt  pgtype.Timestamptz `json:"updated_at"`
}

Jump to

Keyboard shortcuts

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