sqlc

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Nov 19, 2025 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

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 IconTheme

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

func (*IconTheme) Scan

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

type InsertRegistryParams

type InsertRegistryParams struct {
	Name    string       `json:"name"`
	RegType RegistryType `json:"reg_type"`
}

type InsertRegistrySyncParams

type InsertRegistrySyncParams struct {
	RegID      pgtype.UUID `json:"reg_id"`
	SyncStatus SyncStatus  `json:"sync_status"`
	ErrorMsg   pgtype.Text `json:"error_msg"`
}

type LatestServerVersion

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

type ListRegistriesParams

type ListRegistriesParams struct {
	Next pgtype.Timestamptz `json:"next"`
	Prev pgtype.Timestamptz `json:"prev"`
	Size int64              `json:"size"`
}

type ListServerVersionsParams

type ListServerVersionsParams struct {
	Name string             `json:"name"`
	Next pgtype.Timestamptz `json:"next"`
	Prev pgtype.Timestamptz `json:"prev"`
	Size int64              `json:"size"`
}

type ListServerVersionsRow

type ListServerVersionsRow struct {
	ID                  pgtype.UUID        `json:"id"`
	Name                string             `json:"name"`
	Version             string             `json:"version"`
	CreatedAt           pgtype.Timestamptz `json:"created_at"`
	UpdatedAt           pgtype.Timestamptz `json:"updated_at"`
	Description         pgtype.Text        `json:"description"`
	Title               pgtype.Text        `json:"title"`
	Website             pgtype.Text        `json:"website"`
	UpstreamMeta        []byte             `json:"upstream_meta"`
	ServerMeta          []byte             `json:"server_meta"`
	RepositoryUrl       pgtype.Text        `json:"repository_url"`
	RepositoryID        pgtype.Text        `json:"repository_id"`
	RepositorySubfolder pgtype.Text        `json:"repository_subfolder"`
	RepositoryType      pgtype.Text        `json:"repository_type"`
}

type ListServersParams

type ListServersParams struct {
	Next pgtype.Timestamptz `json:"next"`
	Prev pgtype.Timestamptz `json:"prev"`
	Size int64              `json:"size"`
}

type ListServersRow

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

type McpServer

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

type McpServerIcon

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

type McpServerPackage

type McpServerPackage struct {
	ServerID         pgtype.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      pgtype.Text `json:"runtime_hint"`
	RuntimeArguments []string    `json:"runtime_arguments"`
	PackageArguments []string    `json:"package_arguments"`
	EnvVars          []string    `json:"env_vars"`
	Sha256Hash       pgtype.Text `json:"sha256_hash"`
	Transport        string      `json:"transport"`
	TransportUrl     pgtype.Text `json:"transport_url"`
	TransportHeaders []string    `json:"transport_headers"`
}

type McpServerRemote

type McpServerRemote struct {
	ServerID         pgtype.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 {
	GetRegistry(ctx context.Context, id pgtype.UUID) (Registry, error)
	GetRegistrySync(ctx context.Context, id pgtype.UUID) (RegistrySync, error)
	InsertRegistry(ctx context.Context, arg InsertRegistryParams) (pgtype.UUID, error)
	InsertRegistrySync(ctx context.Context, arg InsertRegistrySyncParams) (pgtype.UUID, error)
	ListRegistries(ctx context.Context, arg ListRegistriesParams) ([]Registry, error)
	ListServerVersions(ctx context.Context, arg ListServerVersionsParams) ([]ListServerVersionsRow, error)
	ListServers(ctx context.Context, arg ListServersParams) ([]ListServersRow, error)
	UpdateRegistrySync(ctx context.Context, arg UpdateRegistrySyncParams) error
	UpsertLatestServerVersion(ctx context.Context, arg UpsertLatestServerVersionParams) (pgtype.UUID, error)
	UpsertServerIcon(ctx context.Context, arg UpsertServerIconParams) error
	UpsertServerPackage(ctx context.Context, arg UpsertServerPackageParams) error
	UpsertServerRemote(ctx context.Context, arg UpsertServerRemoteParams) error
	UpsertServerVersion(ctx context.Context, arg UpsertServerVersionParams) (pgtype.UUID, error)
}

type Queries

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

func New

func New(db DBTX) *Queries

func (*Queries) GetRegistry

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

func (*Queries) GetRegistrySync

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

func (*Queries) InsertRegistry

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

func (*Queries) InsertRegistrySync

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

func (*Queries) ListRegistries

func (q *Queries) ListRegistries(ctx context.Context, arg ListRegistriesParams) ([]Registry, 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) UpsertLatestServerVersion

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

func (*Queries) UpsertServerIcon

func (q *Queries) UpsertServerIcon(ctx context.Context, arg UpsertServerIconParams) error

func (*Queries) UpsertServerPackage

func (q *Queries) UpsertServerPackage(ctx context.Context, arg UpsertServerPackageParams) error

func (*Queries) UpsertServerRemote

func (q *Queries) UpsertServerRemote(ctx context.Context, arg UpsertServerRemoteParams) error

func (*Queries) UpsertServerVersion

func (q *Queries) UpsertServerVersion(ctx context.Context, arg UpsertServerVersionParams) (pgtype.UUID, error)

func (*Queries) WithTx

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

type Registry

type Registry struct {
	ID        pgtype.UUID        `json:"id"`
	Name      string             `json:"name"`
	RegType   RegistryType       `json:"reg_type"`
	CreatedAt pgtype.Timestamptz `json:"created_at"`
	UpdatedAt pgtype.Timestamptz `json:"updated_at"`
}

type RegistrySync

type RegistrySync struct {
	ID         pgtype.UUID        `json:"id"`
	RegID      pgtype.UUID        `json:"reg_id"`
	SyncStatus SyncStatus         `json:"sync_status"`
	ErrorMsg   pgtype.Text        `json:"error_msg"`
	StartedAt  pgtype.Timestamptz `json:"started_at"`
	EndedAt    pgtype.Timestamptz `json:"ended_at"`
}

type RegistryType

type RegistryType string
const (
	RegistryTypeLOCAL  RegistryType = "LOCAL"
	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 UpdateRegistrySyncParams

type UpdateRegistrySyncParams struct {
	SyncStatus SyncStatus         `json:"sync_status"`
	ErrorMsg   pgtype.Text        `json:"error_msg"`
	EndedAt    pgtype.Timestamptz `json:"ended_at"`
	ID         pgtype.UUID        `json:"id"`
}

type UpsertLatestServerVersionParams

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

type UpsertServerIconParams

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

type UpsertServerPackageParams

type UpsertServerPackageParams struct {
	ServerID         pgtype.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      pgtype.Text `json:"runtime_hint"`
	RuntimeArguments []string    `json:"runtime_arguments"`
	PackageArguments []string    `json:"package_arguments"`
	EnvVars          []string    `json:"env_vars"`
	Sha256Hash       pgtype.Text `json:"sha256_hash"`
	Transport        string      `json:"transport"`
	TransportUrl     pgtype.Text `json:"transport_url"`
	TransportHeaders []string    `json:"transport_headers"`
}

type UpsertServerRemoteParams

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

type UpsertServerVersionParams

type UpsertServerVersionParams struct {
	Name                string      `json:"name"`
	Version             string      `json:"version"`
	RegID               pgtype.UUID `json:"reg_id"`
	Description         pgtype.Text `json:"description"`
	Title               pgtype.Text `json:"title"`
	Website             pgtype.Text `json:"website"`
	UpstreamMeta        []byte      `json:"upstream_meta"`
	ServerMeta          []byte      `json:"server_meta"`
	RepositoryUrl       pgtype.Text `json:"repository_url"`
	RepositoryID        pgtype.Text `json:"repository_id"`
	RepositorySubfolder pgtype.Text `json:"repository_subfolder"`
	RepositoryType      pgtype.Text `json:"repository_type"`
}

Jump to

Keyboard shortcuts

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