sqlc

package
v0.3.3 Latest Latest
Warning

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

Go to latest
Published: Dec 1, 2025 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BulkInitializeRegistrySyncsParams added in v0.3.1

type BulkInitializeRegistrySyncsParams struct {
	RegIds       []uuid.UUID  `json:"reg_ids"`
	SyncStatuses []SyncStatus `json:"sync_statuses"`
	ErrorMsgs    []string     `json:"error_msgs"`
}

type BulkUpsertRegistriesParams added in v0.3.1

type BulkUpsertRegistriesParams struct {
	Names      []string       `json:"names"`
	RegTypes   []RegistryType `json:"reg_types"`
	CreatedAts []time.Time    `json:"created_ats"`
	UpdatedAts []time.Time    `json:"updated_ats"`
}

type BulkUpsertRegistriesRow added in v0.3.1

type BulkUpsertRegistriesRow struct {
	ID   uuid.UUID `json:"id"`
	Name string    `json:"name"`
}

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 DeleteOrphanedServersParams added in v0.3.2

type DeleteOrphanedServersParams struct {
	RegID   uuid.UUID   `json:"reg_id"`
	KeepIds []uuid.UUID `json:"keep_ids"`
}

type DeleteServerVersionParams added in v0.3.0

type DeleteServerVersionParams struct {
	RegID   uuid.UUID `json:"reg_id"`
	Name    string    `json:"name"`
	Version string    `json:"version"`
}

type GetServerIDsByRegistryNameVersionRow added in v0.3.2

type GetServerIDsByRegistryNameVersionRow struct {
	ID      uuid.UUID `json:"id"`
	Name    string    `json:"name"`
	Version string    `json:"version"`
}

type GetServerVersionParams added in v0.3.0

type GetServerVersionParams struct {
	Name         string  `json:"name"`
	Version      string  `json:"version"`
	RegistryName *string `json:"registry_name"`
}

type GetServerVersionRow added in v0.3.0

type GetServerVersionRow struct {
	RegistryType        RegistryType `json:"registry_type"`
	ID                  uuid.UUID    `json:"id"`
	Name                string       `json:"name"`
	Version             string       `json:"version"`
	IsLatest            bool         `json:"is_latest"`
	CreatedAt           *time.Time   `json:"created_at"`
	UpdatedAt           *time.Time   `json:"updated_at"`
	Description         *string      `json:"description"`
	Title               *string      `json:"title"`
	Website             *string      `json:"website"`
	UpstreamMeta        []byte       `json:"upstream_meta"`
	ServerMeta          []byte       `json:"server_meta"`
	RepositoryUrl       *string      `json:"repository_url"`
	RepositoryID        *string      `json:"repository_id"`
	RepositorySubfolder *string      `json:"repository_subfolder"`
	RepositoryType      *string      `json:"repository_type"`
}

type IconTheme

type IconTheme string
const (
	IconThemeLIGHT IconTheme = "LIGHT"
	IconThemeDARK  IconTheme = "DARK"
)

func (*IconTheme) Scan

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

type InitializeRegistrySyncParams added in v0.3.1

type InitializeRegistrySyncParams struct {
	Name       string     `json:"name"`
	SyncStatus SyncStatus `json:"sync_status"`
	ErrorMsg   *string    `json:"error_msg"`
}

type InsertRegistryParams

type InsertRegistryParams struct {
	Name      string       `json:"name"`
	RegType   RegistryType `json:"reg_type"`
	CreatedAt *time.Time   `json:"created_at"`
	UpdatedAt *time.Time   `json:"updated_at"`
}

type InsertRegistrySyncParams

type InsertRegistrySyncParams struct {
	RegID      uuid.UUID  `json:"reg_id"`
	SyncStatus SyncStatus `json:"sync_status"`
	ErrorMsg   *string    `json:"error_msg"`
	StartedAt  *time.Time `json:"started_at"`
}

type InsertServerIconParams added in v0.3.0

type InsertServerIconParams struct {
	ServerID  uuid.UUID `json:"server_id"`
	SourceUri string    `json:"source_uri"`
	MimeType  string    `json:"mime_type"`
	Theme     IconTheme `json:"theme"`
}

type InsertServerPackageParams added in v0.3.0

type InsertServerPackageParams struct {
	ServerID         uuid.UUID `json:"server_id"`
	RegistryType     string    `json:"registry_type"`
	PkgRegistryUrl   string    `json:"pkg_registry_url"`
	PkgIdentifier    string    `json:"pkg_identifier"`
	PkgVersion       string    `json:"pkg_version"`
	RuntimeHint      *string   `json:"runtime_hint"`
	RuntimeArguments []string  `json:"runtime_arguments"`
	PackageArguments []string  `json:"package_arguments"`
	EnvVars          []string  `json:"env_vars"`
	Sha256Hash       *string   `json:"sha256_hash"`
	Transport        string    `json:"transport"`
	TransportUrl     *string   `json:"transport_url"`
	TransportHeaders []string  `json:"transport_headers"`
}

type InsertServerRemoteParams added in v0.3.0

type InsertServerRemoteParams struct {
	ServerID         uuid.UUID `json:"server_id"`
	Transport        string    `json:"transport"`
	TransportUrl     string    `json:"transport_url"`
	TransportHeaders []string  `json:"transport_headers"`
}

type InsertServerVersionForSyncParams added in v0.3.2

type InsertServerVersionForSyncParams struct {
	Name                string     `json:"name"`
	Version             string     `json:"version"`
	RegID               uuid.UUID  `json:"reg_id"`
	CreatedAt           *time.Time `json:"created_at"`
	UpdatedAt           *time.Time `json:"updated_at"`
	Description         *string    `json:"description"`
	Title               *string    `json:"title"`
	Website             *string    `json:"website"`
	UpstreamMeta        []byte     `json:"upstream_meta"`
	ServerMeta          []byte     `json:"server_meta"`
	RepositoryUrl       *string    `json:"repository_url"`
	RepositoryID        *string    `json:"repository_id"`
	RepositorySubfolder *string    `json:"repository_subfolder"`
	RepositoryType      *string    `json:"repository_type"`
}

type InsertServerVersionParams added in v0.3.0

type InsertServerVersionParams struct {
	Name                string     `json:"name"`
	Version             string     `json:"version"`
	RegID               uuid.UUID  `json:"reg_id"`
	CreatedAt           *time.Time `json:"created_at"`
	UpdatedAt           *time.Time `json:"updated_at"`
	Description         *string    `json:"description"`
	Title               *string    `json:"title"`
	Website             *string    `json:"website"`
	UpstreamMeta        []byte     `json:"upstream_meta"`
	ServerMeta          []byte     `json:"server_meta"`
	RepositoryUrl       *string    `json:"repository_url"`
	RepositoryID        *string    `json:"repository_id"`
	RepositorySubfolder *string    `json:"repository_subfolder"`
	RepositoryType      *string    `json:"repository_type"`
}

type LatestServerVersion

type LatestServerVersion struct {
	RegID          uuid.UUID `json:"reg_id"`
	Name           string    `json:"name"`
	Version        string    `json:"version"`
	LatestServerID uuid.UUID `json:"latest_server_id"`
}

type ListRegistriesParams

type ListRegistriesParams struct {
	Next *time.Time `json:"next"`
	Prev *time.Time `json:"prev"`
	Size int64      `json:"size"`
}

type ListRegistrySyncsRow added in v0.3.1

type ListRegistrySyncsRow struct {
	Name                  string     `json:"name"`
	ID                    uuid.UUID  `json:"id"`
	RegID                 uuid.UUID  `json:"reg_id"`
	SyncStatus            SyncStatus `json:"sync_status"`
	ErrorMsg              *string    `json:"error_msg"`
	StartedAt             *time.Time `json:"started_at"`
	EndedAt               *time.Time `json:"ended_at"`
	AttemptCount          int64      `json:"attempt_count"`
	LastSyncHash          *string    `json:"last_sync_hash"`
	LastAppliedFilterHash *string    `json:"last_applied_filter_hash"`
	ServerCount           int64      `json:"server_count"`
}

type ListServerVersionsParams

type ListServerVersionsParams struct {
	Name         string     `json:"name"`
	RegistryName *string    `json:"registry_name"`
	Next         *time.Time `json:"next"`
	Prev         *time.Time `json:"prev"`
	Size         int64      `json:"size"`
}

type ListServerVersionsRow

type ListServerVersionsRow struct {
	RegistryType        RegistryType `json:"registry_type"`
	ID                  uuid.UUID    `json:"id"`
	Name                string       `json:"name"`
	Version             string       `json:"version"`
	IsLatest            bool         `json:"is_latest"`
	CreatedAt           *time.Time   `json:"created_at"`
	UpdatedAt           *time.Time   `json:"updated_at"`
	Description         *string      `json:"description"`
	Title               *string      `json:"title"`
	Website             *string      `json:"website"`
	UpstreamMeta        []byte       `json:"upstream_meta"`
	ServerMeta          []byte       `json:"server_meta"`
	RepositoryUrl       *string      `json:"repository_url"`
	RepositoryID        *string      `json:"repository_id"`
	RepositorySubfolder *string      `json:"repository_subfolder"`
	RepositoryType      *string      `json:"repository_type"`
}

type ListServersParams

type ListServersParams struct {
	Next         *time.Time `json:"next"`
	Prev         *time.Time `json:"prev"`
	RegistryName *string    `json:"registry_name"`
	Size         int64      `json:"size"`
}

type ListServersRow

type ListServersRow struct {
	RegistryType        RegistryType `json:"registry_type"`
	ID                  uuid.UUID    `json:"id"`
	Name                string       `json:"name"`
	Version             string       `json:"version"`
	IsLatest            bool         `json:"is_latest"`
	CreatedAt           *time.Time   `json:"created_at"`
	UpdatedAt           *time.Time   `json:"updated_at"`
	Description         *string      `json:"description"`
	Title               *string      `json:"title"`
	Website             *string      `json:"website"`
	UpstreamMeta        []byte       `json:"upstream_meta"`
	ServerMeta          []byte       `json:"server_meta"`
	RepositoryUrl       *string      `json:"repository_url"`
	RepositoryID        *string      `json:"repository_id"`
	RepositorySubfolder *string      `json:"repository_subfolder"`
	RepositoryType      *string      `json:"repository_type"`
}

type McpServer

type McpServer struct {
	ID                  uuid.UUID  `json:"id"`
	Name                string     `json:"name"`
	Version             string     `json:"version"`
	RegID               uuid.UUID  `json:"reg_id"`
	CreatedAt           *time.Time `json:"created_at"`
	UpdatedAt           *time.Time `json:"updated_at"`
	Description         *string    `json:"description"`
	Title               *string    `json:"title"`
	Website             *string    `json:"website"`
	UpstreamMeta        []byte     `json:"upstream_meta"`
	ServerMeta          []byte     `json:"server_meta"`
	RepositoryUrl       *string    `json:"repository_url"`
	RepositoryID        *string    `json:"repository_id"`
	RepositorySubfolder *string    `json:"repository_subfolder"`
	RepositoryType      *string    `json:"repository_type"`
}

type McpServerIcon

type McpServerIcon struct {
	ServerID  uuid.UUID `json:"server_id"`
	SourceUri string    `json:"source_uri"`
	MimeType  string    `json:"mime_type"`
	Theme     IconTheme `json:"theme"`
}

type McpServerPackage

type McpServerPackage struct {
	ServerID         uuid.UUID `json:"server_id"`
	RegistryType     string    `json:"registry_type"`
	PkgRegistryUrl   string    `json:"pkg_registry_url"`
	PkgIdentifier    string    `json:"pkg_identifier"`
	PkgVersion       string    `json:"pkg_version"`
	RuntimeHint      *string   `json:"runtime_hint"`
	RuntimeArguments []string  `json:"runtime_arguments"`
	PackageArguments []string  `json:"package_arguments"`
	EnvVars          []string  `json:"env_vars"`
	Sha256Hash       *string   `json:"sha256_hash"`
	Transport        string    `json:"transport"`
	TransportUrl     *string   `json:"transport_url"`
	TransportHeaders []string  `json:"transport_headers"`
}

type McpServerRemote

type McpServerRemote struct {
	ServerID         uuid.UUID `json:"server_id"`
	Transport        string    `json:"transport"`
	TransportUrl     string    `json:"transport_url"`
	TransportHeaders []string  `json:"transport_headers"`
}

type NullIconTheme

type NullIconTheme struct {
	IconTheme IconTheme `json:"icon_theme"`
	Valid     bool      `json:"valid"` // Valid is true if IconTheme is not NULL
}

func (*NullIconTheme) Scan

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

Scan implements the Scanner interface.

func (NullIconTheme) Value

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

Value implements the driver Valuer interface.

type NullRegistryType

type NullRegistryType struct {
	RegistryType RegistryType `json:"registry_type"`
	Valid        bool         `json:"valid"` // Valid is true if RegistryType is not NULL
}

func (*NullRegistryType) Scan

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

Scan implements the Scanner interface.

func (NullRegistryType) Value

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

Value implements the driver Valuer interface.

type NullSyncStatus

type NullSyncStatus struct {
	SyncStatus SyncStatus `json:"sync_status"`
	Valid      bool       `json:"valid"` // Valid is true if SyncStatus is not NULL
}

func (*NullSyncStatus) Scan

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

Scan implements the Scanner interface.

func (NullSyncStatus) Value

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

Value implements the driver Valuer interface.

type Querier

type Querier interface {
	BulkInitializeRegistrySyncs(ctx context.Context, arg BulkInitializeRegistrySyncsParams) error
	BulkUpsertRegistries(ctx context.Context, arg BulkUpsertRegistriesParams) ([]BulkUpsertRegistriesRow, error)
	// Temp Icon Table Operations
	CreateTempIconTable(ctx context.Context) error
	// Temp Package Table Operations
	CreateTempPackageTable(ctx context.Context) error
	// Temp Remote Table Operations
	CreateTempRemoteTable(ctx context.Context) error
	// Temporary table operations for bulk sync
	// Note: These queries reference temp tables that don't exist in the schema.
	// sqlc cannot validate these, but we organize them here for maintainability.
	// Temp Server Table Operations
	CreateTempServerTable(ctx context.Context) error
	DeleteOrphanedIcons(ctx context.Context, serverIds []uuid.UUID) error
	DeleteOrphanedPackages(ctx context.Context, serverIds []uuid.UUID) error
	DeleteOrphanedRemotes(ctx context.Context, serverIds []uuid.UUID) error
	DeleteOrphanedServers(ctx context.Context, arg DeleteOrphanedServersParams) error
	DeleteRegistriesNotInList(ctx context.Context, ids []uuid.UUID) error
	DeleteRegistry(ctx context.Context, name string) error
	DeleteServerIconsByServerId(ctx context.Context, serverID uuid.UUID) error
	DeleteServerPackagesByServerId(ctx context.Context, serverID uuid.UUID) error
	DeleteServerRemotesByServerId(ctx context.Context, serverID uuid.UUID) error
	DeleteServerVersion(ctx context.Context, arg DeleteServerVersionParams) (int64, error)
	DeleteServersByRegistry(ctx context.Context, regID uuid.UUID) error
	GetRegistry(ctx context.Context, id uuid.UUID) (Registry, error)
	GetRegistryByName(ctx context.Context, name string) (Registry, error)
	GetRegistrySync(ctx context.Context, id uuid.UUID) (RegistrySync, error)
	GetRegistrySyncByName(ctx context.Context, name string) (RegistrySync, error)
	GetServerIDsByRegistryNameVersion(ctx context.Context, regID uuid.UUID) ([]GetServerIDsByRegistryNameVersionRow, error)
	GetServerVersion(ctx context.Context, arg GetServerVersionParams) (GetServerVersionRow, error)
	InitializeRegistrySync(ctx context.Context, arg InitializeRegistrySyncParams) error
	InsertRegistry(ctx context.Context, arg InsertRegistryParams) (uuid.UUID, error)
	InsertRegistrySync(ctx context.Context, arg InsertRegistrySyncParams) (uuid.UUID, error)
	InsertServerIcon(ctx context.Context, arg InsertServerIconParams) error
	InsertServerPackage(ctx context.Context, arg InsertServerPackageParams) error
	InsertServerRemote(ctx context.Context, arg InsertServerRemoteParams) error
	InsertServerVersion(ctx context.Context, arg InsertServerVersionParams) (uuid.UUID, error)
	InsertServerVersionForSync(ctx context.Context, arg InsertServerVersionForSyncParams) (uuid.UUID, error)
	ListAllRegistryNames(ctx context.Context) ([]string, error)
	ListRegistries(ctx context.Context, arg ListRegistriesParams) ([]Registry, error)
	ListRegistrySyncs(ctx context.Context) ([]ListRegistrySyncsRow, error)
	ListServerPackages(ctx context.Context, serverIds []uuid.UUID) ([]McpServerPackage, error)
	ListServerRemotes(ctx context.Context, serverIds []uuid.UUID) ([]McpServerRemote, error)
	ListServerVersions(ctx context.Context, arg ListServerVersionsParams) ([]ListServerVersionsRow, error)
	ListServers(ctx context.Context, arg ListServersParams) ([]ListServersRow, error)
	UpdateRegistrySync(ctx context.Context, arg UpdateRegistrySyncParams) error
	UpsertIconsFromTemp(ctx context.Context) error
	UpsertLatestServerVersion(ctx context.Context, arg UpsertLatestServerVersionParams) (uuid.UUID, error)
	UpsertPackagesFromTemp(ctx context.Context) error
	UpsertRegistry(ctx context.Context, arg UpsertRegistryParams) (uuid.UUID, error)
	UpsertRegistrySyncByName(ctx context.Context, arg UpsertRegistrySyncByNameParams) error
	UpsertRemotesFromTemp(ctx context.Context) error
	UpsertServerVersionForSync(ctx context.Context, arg UpsertServerVersionForSyncParams) (uuid.UUID, error)
	UpsertServersFromTemp(ctx context.Context) error
}

type Queries

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

func New

func New(db DBTX) *Queries

func (*Queries) BulkInitializeRegistrySyncs added in v0.3.1

func (q *Queries) BulkInitializeRegistrySyncs(ctx context.Context, arg BulkInitializeRegistrySyncsParams) error

func (*Queries) BulkUpsertRegistries added in v0.3.1

func (q *Queries) BulkUpsertRegistries(ctx context.Context, arg BulkUpsertRegistriesParams) ([]BulkUpsertRegistriesRow, error)

func (*Queries) CreateTempIconTable added in v0.3.2

func (q *Queries) CreateTempIconTable(ctx context.Context) error

Temp Icon Table Operations

func (*Queries) CreateTempPackageTable added in v0.3.2

func (q *Queries) CreateTempPackageTable(ctx context.Context) error

Temp Package Table Operations

func (*Queries) CreateTempRemoteTable added in v0.3.2

func (q *Queries) CreateTempRemoteTable(ctx context.Context) error

Temp Remote Table Operations

func (*Queries) CreateTempServerTable added in v0.3.2

func (q *Queries) CreateTempServerTable(ctx context.Context) error

Temporary table operations for bulk sync Note: These queries reference temp tables that don't exist in the schema. sqlc cannot validate these, but we organize them here for maintainability. Temp Server Table Operations

func (*Queries) DeleteOrphanedIcons added in v0.3.2

func (q *Queries) DeleteOrphanedIcons(ctx context.Context, serverIds []uuid.UUID) error

func (*Queries) DeleteOrphanedPackages added in v0.3.2

func (q *Queries) DeleteOrphanedPackages(ctx context.Context, serverIds []uuid.UUID) error

func (*Queries) DeleteOrphanedRemotes added in v0.3.2

func (q *Queries) DeleteOrphanedRemotes(ctx context.Context, serverIds []uuid.UUID) error

func (*Queries) DeleteOrphanedServers added in v0.3.2

func (q *Queries) DeleteOrphanedServers(ctx context.Context, arg DeleteOrphanedServersParams) error

func (*Queries) DeleteRegistriesNotInList added in v0.3.1

func (q *Queries) DeleteRegistriesNotInList(ctx context.Context, ids []uuid.UUID) error

func (*Queries) DeleteRegistry added in v0.3.1

func (q *Queries) DeleteRegistry(ctx context.Context, name string) error

func (*Queries) DeleteServerIconsByServerId added in v0.3.2

func (q *Queries) DeleteServerIconsByServerId(ctx context.Context, serverID uuid.UUID) error

func (*Queries) DeleteServerPackagesByServerId added in v0.3.2

func (q *Queries) DeleteServerPackagesByServerId(ctx context.Context, serverID uuid.UUID) error

func (*Queries) DeleteServerRemotesByServerId added in v0.3.2

func (q *Queries) DeleteServerRemotesByServerId(ctx context.Context, serverID uuid.UUID) error

func (*Queries) DeleteServerVersion added in v0.3.0

func (q *Queries) DeleteServerVersion(ctx context.Context, arg DeleteServerVersionParams) (int64, error)

func (*Queries) DeleteServersByRegistry added in v0.3.2

func (q *Queries) DeleteServersByRegistry(ctx context.Context, regID uuid.UUID) error

func (*Queries) GetRegistry

func (q *Queries) GetRegistry(ctx context.Context, id uuid.UUID) (Registry, error)

func (*Queries) GetRegistryByName added in v0.3.0

func (q *Queries) GetRegistryByName(ctx context.Context, name string) (Registry, error)

func (*Queries) GetRegistrySync

func (q *Queries) GetRegistrySync(ctx context.Context, id uuid.UUID) (RegistrySync, error)

func (*Queries) GetRegistrySyncByName added in v0.3.1

func (q *Queries) GetRegistrySyncByName(ctx context.Context, name string) (RegistrySync, error)

func (*Queries) GetServerIDsByRegistryNameVersion added in v0.3.2

func (q *Queries) GetServerIDsByRegistryNameVersion(ctx context.Context, regID uuid.UUID) ([]GetServerIDsByRegistryNameVersionRow, error)

func (*Queries) GetServerVersion added in v0.3.0

func (q *Queries) GetServerVersion(ctx context.Context, arg GetServerVersionParams) (GetServerVersionRow, error)

func (*Queries) InitializeRegistrySync added in v0.3.1

func (q *Queries) InitializeRegistrySync(ctx context.Context, arg InitializeRegistrySyncParams) error

func (*Queries) InsertRegistry

func (q *Queries) InsertRegistry(ctx context.Context, arg InsertRegistryParams) (uuid.UUID, error)

func (*Queries) InsertRegistrySync

func (q *Queries) InsertRegistrySync(ctx context.Context, arg InsertRegistrySyncParams) (uuid.UUID, error)

func (*Queries) InsertServerIcon added in v0.3.0

func (q *Queries) InsertServerIcon(ctx context.Context, arg InsertServerIconParams) error

func (*Queries) InsertServerPackage added in v0.3.0

func (q *Queries) InsertServerPackage(ctx context.Context, arg InsertServerPackageParams) error

func (*Queries) InsertServerRemote added in v0.3.0

func (q *Queries) InsertServerRemote(ctx context.Context, arg InsertServerRemoteParams) error

func (*Queries) InsertServerVersion added in v0.3.0

func (q *Queries) InsertServerVersion(ctx context.Context, arg InsertServerVersionParams) (uuid.UUID, error)

func (*Queries) InsertServerVersionForSync added in v0.3.2

func (q *Queries) InsertServerVersionForSync(ctx context.Context, arg InsertServerVersionForSyncParams) (uuid.UUID, error)

func (*Queries) ListAllRegistryNames added in v0.3.1

func (q *Queries) ListAllRegistryNames(ctx context.Context) ([]string, error)

func (*Queries) ListRegistries

func (q *Queries) ListRegistries(ctx context.Context, arg ListRegistriesParams) ([]Registry, error)

func (*Queries) ListRegistrySyncs added in v0.3.1

func (q *Queries) ListRegistrySyncs(ctx context.Context) ([]ListRegistrySyncsRow, error)

func (*Queries) ListServerPackages added in v0.3.0

func (q *Queries) ListServerPackages(ctx context.Context, serverIds []uuid.UUID) ([]McpServerPackage, error)

func (*Queries) ListServerRemotes added in v0.3.0

func (q *Queries) ListServerRemotes(ctx context.Context, serverIds []uuid.UUID) ([]McpServerRemote, error)

func (*Queries) ListServerVersions

func (q *Queries) ListServerVersions(ctx context.Context, arg ListServerVersionsParams) ([]ListServerVersionsRow, error)

func (*Queries) ListServers

func (q *Queries) ListServers(ctx context.Context, arg ListServersParams) ([]ListServersRow, error)

func (*Queries) UpdateRegistrySync

func (q *Queries) UpdateRegistrySync(ctx context.Context, arg UpdateRegistrySyncParams) error

func (*Queries) UpsertIconsFromTemp added in v0.3.2

func (q *Queries) UpsertIconsFromTemp(ctx context.Context) error

func (*Queries) UpsertLatestServerVersion

func (q *Queries) UpsertLatestServerVersion(ctx context.Context, arg UpsertLatestServerVersionParams) (uuid.UUID, error)

func (*Queries) UpsertPackagesFromTemp added in v0.3.2

func (q *Queries) UpsertPackagesFromTemp(ctx context.Context) error

func (*Queries) UpsertRegistry added in v0.3.1

func (q *Queries) UpsertRegistry(ctx context.Context, arg UpsertRegistryParams) (uuid.UUID, error)

func (*Queries) UpsertRegistrySyncByName added in v0.3.1

func (q *Queries) UpsertRegistrySyncByName(ctx context.Context, arg UpsertRegistrySyncByNameParams) error

func (*Queries) UpsertRemotesFromTemp added in v0.3.2

func (q *Queries) UpsertRemotesFromTemp(ctx context.Context) error

func (*Queries) UpsertServerVersionForSync added in v0.3.2

func (q *Queries) UpsertServerVersionForSync(ctx context.Context, arg UpsertServerVersionForSyncParams) (uuid.UUID, error)

func (*Queries) UpsertServersFromTemp added in v0.3.2

func (q *Queries) UpsertServersFromTemp(ctx context.Context) error

func (*Queries) WithTx

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

type Registry

type Registry struct {
	ID        uuid.UUID    `json:"id"`
	Name      string       `json:"name"`
	RegType   RegistryType `json:"reg_type"`
	CreatedAt *time.Time   `json:"created_at"`
	UpdatedAt *time.Time   `json:"updated_at"`
}

type RegistrySync

type RegistrySync struct {
	ID                    uuid.UUID  `json:"id"`
	RegID                 uuid.UUID  `json:"reg_id"`
	SyncStatus            SyncStatus `json:"sync_status"`
	ErrorMsg              *string    `json:"error_msg"`
	StartedAt             *time.Time `json:"started_at"`
	EndedAt               *time.Time `json:"ended_at"`
	AttemptCount          int64      `json:"attempt_count"`
	LastSyncHash          *string    `json:"last_sync_hash"`
	LastAppliedFilterHash *string    `json:"last_applied_filter_hash"`
	ServerCount           int64      `json:"server_count"`
}

type RegistryType

type RegistryType string
const (
	RegistryTypeMANAGED RegistryType = "MANAGED"
	RegistryTypeFILE    RegistryType = "FILE"
	RegistryTypeREMOTE  RegistryType = "REMOTE"
)

func (*RegistryType) Scan

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

type SyncStatus

type SyncStatus string
const (
	SyncStatusINPROGRESS SyncStatus = "IN_PROGRESS"
	SyncStatusCOMPLETED  SyncStatus = "COMPLETED"
	SyncStatusFAILED     SyncStatus = "FAILED"
)

func (*SyncStatus) Scan

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

type TempMcpServer added in v0.3.2

type TempMcpServer struct {
	Name                string     `json:"name"`
	Version             string     `json:"version"`
	RegID               uuid.UUID  `json:"reg_id"`
	CreatedAt           *time.Time `json:"created_at"`
	UpdatedAt           *time.Time `json:"updated_at"`
	Description         *string    `json:"description"`
	Title               *string    `json:"title"`
	Website             *string    `json:"website"`
	UpstreamMeta        []byte     `json:"upstream_meta"`
	ServerMeta          []byte     `json:"server_meta"`
	RepositoryUrl       *string    `json:"repository_url"`
	RepositoryID        *string    `json:"repository_id"`
	RepositorySubfolder *string    `json:"repository_subfolder"`
	RepositoryType      *string    `json:"repository_type"`
}

type TempMcpServerIcon added in v0.3.2

type TempMcpServerIcon struct {
	ServerID  uuid.UUID `json:"server_id"`
	SourceUri string    `json:"source_uri"`
	MimeType  string    `json:"mime_type"`
	Theme     string    `json:"theme"`
}

type TempMcpServerPackage added in v0.3.2

type TempMcpServerPackage struct {
	ServerID         uuid.UUID `json:"server_id"`
	RegistryType     string    `json:"registry_type"`
	PkgRegistryUrl   string    `json:"pkg_registry_url"`
	PkgIdentifier    string    `json:"pkg_identifier"`
	PkgVersion       string    `json:"pkg_version"`
	RuntimeHint      *string   `json:"runtime_hint"`
	RuntimeArguments []string  `json:"runtime_arguments"`
	PackageArguments []string  `json:"package_arguments"`
	EnvVars          []string  `json:"env_vars"`
	Sha256Hash       *string   `json:"sha256_hash"`
	Transport        string    `json:"transport"`
	TransportUrl     *string   `json:"transport_url"`
	TransportHeaders []string  `json:"transport_headers"`
}

type TempMcpServerRemote added in v0.3.2

type TempMcpServerRemote struct {
	ServerID         uuid.UUID `json:"server_id"`
	Transport        string    `json:"transport"`
	TransportUrl     string    `json:"transport_url"`
	TransportHeaders []string  `json:"transport_headers"`
}

type UpdateRegistrySyncParams

type UpdateRegistrySyncParams struct {
	SyncStatus SyncStatus `json:"sync_status"`
	ErrorMsg   *string    `json:"error_msg"`
	EndedAt    *time.Time `json:"ended_at"`
	ID         uuid.UUID  `json:"id"`
}

type UpsertLatestServerVersionParams

type UpsertLatestServerVersionParams struct {
	RegID    uuid.UUID `json:"reg_id"`
	Name     string    `json:"name"`
	Version  string    `json:"version"`
	ServerID uuid.UUID `json:"server_id"`
}

type UpsertRegistryParams added in v0.3.1

type UpsertRegistryParams struct {
	Name      string       `json:"name"`
	RegType   RegistryType `json:"reg_type"`
	CreatedAt *time.Time   `json:"created_at"`
	UpdatedAt *time.Time   `json:"updated_at"`
}

type UpsertRegistrySyncByNameParams added in v0.3.1

type UpsertRegistrySyncByNameParams struct {
	Name                  string     `json:"name"`
	SyncStatus            SyncStatus `json:"sync_status"`
	ErrorMsg              *string    `json:"error_msg"`
	StartedAt             *time.Time `json:"started_at"`
	EndedAt               *time.Time `json:"ended_at"`
	AttemptCount          int64      `json:"attempt_count"`
	LastSyncHash          *string    `json:"last_sync_hash"`
	LastAppliedFilterHash *string    `json:"last_applied_filter_hash"`
	ServerCount           int64      `json:"server_count"`
}

type UpsertServerVersionForSyncParams added in v0.3.2

type UpsertServerVersionForSyncParams struct {
	Name                string     `json:"name"`
	Version             string     `json:"version"`
	RegID               uuid.UUID  `json:"reg_id"`
	CreatedAt           *time.Time `json:"created_at"`
	UpdatedAt           *time.Time `json:"updated_at"`
	Description         *string    `json:"description"`
	Title               *string    `json:"title"`
	Website             *string    `json:"website"`
	UpstreamMeta        []byte     `json:"upstream_meta"`
	ServerMeta          []byte     `json:"server_meta"`
	RepositoryUrl       *string    `json:"repository_url"`
	RepositoryID        *string    `json:"repository_id"`
	RepositorySubfolder *string    `json:"repository_subfolder"`
	RepositoryType      *string    `json:"repository_type"`
}

Jump to

Keyboard shortcuts

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