cmd

package
v1.3.3 Latest Latest
Warning

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

Go to latest
Published: Jun 18, 2026 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ConnectionClientCommands

type ConnectionClientCommands struct {
	ConnectionList   ConnectionListCmd   `cmd:"" name:"connections" help:"List connections." group:"CONNECTION"`
	ConnectionGet    ConnectionGetCmd    `cmd:"" name:"connection" help:"Get connection details." group:"CONNECTION"`
	ConnectionDelete ConnectionDeleteCmd `cmd:"" name:"connection-delete" help:"Delete a connection." group:"CONNECTION"`
}

type ConnectionDeleteCmd

type ConnectionDeleteCmd struct {
	Pid uint64 `arg:"" name:"pid" help:"PID of the connection."`
}

func (*ConnectionDeleteCmd) Run

func (cmd *ConnectionDeleteCmd) Run(ctx server.Cmd) error

type ConnectionGetCmd

type ConnectionGetCmd struct {
	Pid uint64 `arg:"" name:"pid" help:"PID of the connection."`
}

func (*ConnectionGetCmd) Run

func (cmd *ConnectionGetCmd) Run(ctx server.Cmd) error

type ConnectionListCmd

type ConnectionListCmd struct {
	schema.ConnectionListRequest
}

func (*ConnectionListCmd) Run

func (cmd *ConnectionListCmd) Run(ctx server.Cmd) error

type DatabaseClientCommands

type DatabaseClientCommands struct {
	DatabaseList   DatabaseListCmd   `cmd:"" name:"databases" help:"List databases." group:"DATABASE"`
	DatabaseGet    DatabaseGetCmd    `cmd:"" name:"database" help:"Get database details." group:"DATABASE"`
	DatabaseCreate DatabaseCreateCmd `cmd:"" name:"database-create" help:"Create a new database." group:"DATABASE"`
	DatabaseDelete DatabaseDeleteCmd `cmd:"" name:"database-delete" help:"Delete a database." group:"DATABASE"`
	DatabaseUpdate DatabaseUpdateCmd `cmd:"" name:"database-update" help:"Update a database." group:"DATABASE"`
}

type DatabaseCreateCmd

type DatabaseCreateCmd struct {
	schema.DatabaseMeta
}

func (*DatabaseCreateCmd) Run

func (cmd *DatabaseCreateCmd) Run(ctx server.Cmd) error

type DatabaseDeleteCmd

type DatabaseDeleteCmd struct {
	Name string `arg:"" name:"name" help:"Name of the database."`
}

func (*DatabaseDeleteCmd) Run

func (cmd *DatabaseDeleteCmd) Run(ctx server.Cmd) error

type DatabaseGetCmd

type DatabaseGetCmd struct {
	Name string `arg:"" name:"name" help:"Name of the database."`
}

func (*DatabaseGetCmd) Run

func (cmd *DatabaseGetCmd) Run(ctx server.Cmd) error

type DatabaseListCmd

type DatabaseListCmd struct {
	schema.DatabaseListRequest
}

func (*DatabaseListCmd) Run

func (cmd *DatabaseListCmd) Run(ctx server.Cmd) error

type DatabaseUpdateCmd

type DatabaseUpdateCmd struct {
	NewName string `flag:"" name:"name" help:"New name of the database."`
	schema.DatabaseMeta
}

func (*DatabaseUpdateCmd) Run

func (cmd *DatabaseUpdateCmd) Run(ctx server.Cmd) error

type ExtensionClientCommands

type ExtensionClientCommands struct {
	ExtensionList   ExtensionListCmd   `cmd:"" name:"extensions" help:"List extensions." group:"EXTENSION"`
	ExtensionGet    ExtensionGetCmd    `cmd:"" name:"extension" help:"Get extension details." group:"EXTENSION"`
	ExtensionCreate ExtensionCreateCmd `cmd:"" name:"extension-install" help:"Install an extension into a database schema." group:"EXTENSION"`
	ExtensionDelete ExtensionDeleteCmd `cmd:"" name:"extension-remove" help:"Remove an extension from one or more database schemas." group:"EXTENSION"`
}

type ExtensionCreateCmd

type ExtensionCreateCmd struct {
	schema.ExtensionMeta
	Cascade bool `flag:"" name:"cascade" help:"Cascade option."`
}

func (*ExtensionCreateCmd) Run

func (cmd *ExtensionCreateCmd) Run(ctx server.Cmd) error

type ExtensionDeleteCmd

type ExtensionDeleteCmd struct {
	Name    string `arg:"" name:"name" help:"Name of the extension."`
	Cascade bool   `flag:"" name:"cascade" help:"Cascade option."`
}

type ExtensionGetCmd

type ExtensionGetCmd struct {
	Name string `arg:"" name:"name" help:"Name of the extension."`
}

func (*ExtensionGetCmd) Run

func (cmd *ExtensionGetCmd) Run(ctx server.Cmd) error

type ExtensionListCmd

type ExtensionListCmd struct {
	schema.ExtensionListRequest
}

func (*ExtensionListCmd) Run

func (cmd *ExtensionListCmd) Run(ctx server.Cmd) error

type ObjectClientCommands

type ObjectClientCommands struct {
	ObjectList ObjectListCmd `cmd:"" name:"objects" help:"List objects." group:"OBJECT"`
	ObjectGet  ObjectGetCmd  `cmd:"" name:"object" help:"Get object details." group:"OBJECT"`
}

type ObjectGetCmd

type ObjectGetCmd struct {
	Database  string `arg:"" name:"database" help:"Name of the database."`
	Namespace string `arg:"" name:"schema" help:"Name of the schema."`
	Name      string `arg:"" name:"name" help:"Name of the object."`
}

func (*ObjectGetCmd) Run

func (cmd *ObjectGetCmd) Run(ctx server.Cmd) error

type ObjectListCmd

type ObjectListCmd struct {
	schema.ObjectListRequest
}

func (*ObjectListCmd) Run

func (cmd *ObjectListCmd) Run(ctx server.Cmd) error

type PingCmd

type PingCmd struct{}

func (*PingCmd) Run

func (cmd *PingCmd) Run(ctx server.Cmd) error

type ReplicationSlotClientCommands

type ReplicationSlotClientCommands struct {
	ReplicationSlotList   ReplicationSlotListCmd   `cmd:"" name:"replication-slots" help:"List replication slots." group:"REPLICATION SLOT"`
	ReplicationSlotGet    ReplicationSlotGetCmd    `cmd:"" name:"replication-slot" help:"Get replication slot details." group:"REPLICATION SLOT"`
	ReplicationSlotCreate ReplicationSlotCreateCmd `cmd:"" name:"replication-slot-create" help:"Create a new replication slot." group:"REPLICATION SLOT"`
	ReplicationSlotDelete ReplicationSlotDeleteCmd `cmd:"" name:"replication-slot-delete" help:"Delete a replication slot." group:"REPLICATION SLOT"`
}

type ReplicationSlotCreateCmd

type ReplicationSlotCreateCmd struct {
	schema.ReplicationSlotMeta
}

func (*ReplicationSlotCreateCmd) Run

func (cmd *ReplicationSlotCreateCmd) Run(ctx server.Cmd) error

type ReplicationSlotDeleteCmd

type ReplicationSlotDeleteCmd struct {
	Name string `arg:"" name:"name" help:"Name of the replication slot."`
}

func (*ReplicationSlotDeleteCmd) Run

func (cmd *ReplicationSlotDeleteCmd) Run(ctx server.Cmd) error

type ReplicationSlotGetCmd

type ReplicationSlotGetCmd struct {
	Name string `arg:"" name:"name" help:"Name of the replication slot."`
}

func (*ReplicationSlotGetCmd) Run

func (cmd *ReplicationSlotGetCmd) Run(ctx server.Cmd) error

type ReplicationSlotListCmd

type ReplicationSlotListCmd struct {
	schema.ReplicationSlotListRequest
}

func (*ReplicationSlotListCmd) Run

func (cmd *ReplicationSlotListCmd) Run(ctx server.Cmd) error

type RoleClientCommands

type RoleClientCommands struct {
	RoleList   RoleListCmd   `cmd:"" name:"roles" help:"List roles." group:"ROLE"`
	RoleGet    RoleGetCmd    `cmd:"" name:"role" help:"Get role details." group:"ROLE"`
	RoleCreate RoleCreateCmd `cmd:"" name:"role-create" help:"Create a new role." group:"ROLE"`
	RoleDelete RoleDeleteCmd `cmd:"" name:"role-delete" help:"Delete a role." group:"ROLE"`
	RoleUpdate RoleUpdateCmd `cmd:"" name:"role-update" help:"Update a role." group:"ROLE"`
}

type RoleCreateCmd

type RoleCreateCmd struct {
	schema.RoleMeta
}

func (*RoleCreateCmd) Run

func (cmd *RoleCreateCmd) Run(ctx server.Cmd) error

type RoleDeleteCmd

type RoleDeleteCmd struct {
	Name string `arg:"" name:"name" help:"Name of the role."`
}

func (*RoleDeleteCmd) Run

func (cmd *RoleDeleteCmd) Run(ctx server.Cmd) error

type RoleGetCmd

type RoleGetCmd struct {
	Name string `arg:"" name:"name" help:"Name of the role."`
}

func (*RoleGetCmd) Run

func (cmd *RoleGetCmd) Run(ctx server.Cmd) error

type RoleListCmd

type RoleListCmd struct {
	schema.RoleListRequest
}

func (*RoleListCmd) Run

func (cmd *RoleListCmd) Run(ctx server.Cmd) error

type RoleUpdateCmd

type RoleUpdateCmd struct {
	NewName string `flag:"" name:"role" help:"New name for the role."`
	schema.RoleMeta
}

func (*RoleUpdateCmd) Run

func (cmd *RoleUpdateCmd) Run(ctx server.Cmd) error

type RunServer

type RunServer struct {
	cmd.RunServer
	pgpkg.PostgresFlags `embed:"" prefix:"pg."`
	MCP                 bool `name:"mcp" help:"Enable an MCP endpoint" negatable:"" default:"false"`
}

func (*RunServer) Run

func (runner *RunServer) Run(ctx server.Cmd) error

func (*RunServer) WithManager

func (runner *RunServer) WithManager(ctx server.Cmd, conn pg.PoolConn, fn func(*manager.Manager) error) error

type SchemaClientCommands

type SchemaClientCommands struct {
	SchemaList   SchemaListCmd   `cmd:"" name:"schemas" help:"List schemas." group:"SCHEMA"`
	SchemaGet    SchemaGetCmd    `cmd:"" name:"schema" help:"Get schema details." group:"SCHEMA"`
	SchemaCreate SchemaCreateCmd `cmd:"" name:"schema-create" help:"Create a new schema in a database." group:"SCHEMA"`
	SchemaDelete SchemaDeleteCmd `cmd:"" name:"schema-delete" help:"Delete a schema from a database." group:"SCHEMA"`
	SchemaUpdate SchemaUpdateCmd `cmd:"" name:"schema-update" help:"Update a schema in a database." group:"SCHEMA"`
}

type SchemaCreateCmd

type SchemaCreateCmd struct {
	Database string `arg:"" name:"database" help:"Name of the database."`
	schema.SchemaMeta
}

func (*SchemaCreateCmd) Run

func (cmd *SchemaCreateCmd) Run(ctx server.Cmd) error

type SchemaDeleteCmd

type SchemaDeleteCmd struct {
	Database  string `arg:"" name:"database" help:"Name of the database."`
	Namespace string `arg:"" name:"schema" help:"Name of the schema."`
	Force     bool   `flag:"" name:"force" help:"Force deletion of the schema."`
}

func (*SchemaDeleteCmd) Run

func (cmd *SchemaDeleteCmd) Run(ctx server.Cmd) error

type SchemaGetCmd

type SchemaGetCmd struct {
	Database  string `arg:"" name:"database" help:"Name of the database."`
	Namespace string `arg:"" name:"schema" help:"Name of the schema."`
}

func (*SchemaGetCmd) Run

func (cmd *SchemaGetCmd) Run(ctx server.Cmd) error

type SchemaListCmd

type SchemaListCmd struct {
	schema.SchemaListRequest
}

func (*SchemaListCmd) Run

func (cmd *SchemaListCmd) Run(ctx server.Cmd) error

type SchemaUpdateCmd

type SchemaUpdateCmd struct {
	Database     string `arg:"" name:"database" help:"Name of the database."`
	NewNamespace string `flag:"" name:"name" help:"New name of the schema."`
	schema.SchemaMeta
}

func (*SchemaUpdateCmd) Run

func (cmd *SchemaUpdateCmd) Run(ctx server.Cmd) error

type ServerCommands

type ServerCommands struct {
	Run RunServer `cmd:"" name:"run" help:"Run the server." group:"SERVER"`
}

type SettingCategoryListCmd

type SettingCategoryListCmd struct {
	schema.SettingCategoryListRequest
}

func (*SettingCategoryListCmd) Run

func (cmd *SettingCategoryListCmd) Run(ctx server.Cmd) error

type SettingClientCommands

type SettingClientCommands struct {
	SettingList         SettingListCmd         `cmd:"" name:"settings" help:"List server settings." group:"SETTING"`
	SettingCategoryList SettingCategoryListCmd `cmd:"" name:"categories" help:"List distinct setting categories." group:"SETTING"`
	SettingGet          SettingGetCmd          `cmd:"" name:"setting" help:"Get setting details." group:"SETTING"`
	SettingUpdate       SettingUpdateCmd       `cmd:"" name:"setting-update" help:"Update a setting." group:"SETTING"`
}

type SettingGetCmd

type SettingGetCmd struct {
	Name string `arg:"" name:"name" help:"Name of the setting."`
}

func (*SettingGetCmd) Run

func (cmd *SettingGetCmd) Run(ctx server.Cmd) error

type SettingListCmd

type SettingListCmd struct {
	schema.SettingListRequest
}

func (*SettingListCmd) Run

func (cmd *SettingListCmd) Run(ctx server.Cmd) error

type SettingUpdateCmd

type SettingUpdateCmd struct {
	Name string `arg:"" name:"name" help:"Name of the setting."`
	schema.SettingMeta
}

func (*SettingUpdateCmd) Run

func (cmd *SettingUpdateCmd) Run(ctx server.Cmd) error

type StatementCommands

type StatementCommands struct {
	StatementList  StatementListCmd  `cmd:"" name:"statements" help:"Return statement statistics." group:"STATEMENT"`
	StatementReset StatementResetCmd `cmd:"" name:"statement-reset" help:"Reset statement statistics." group:"STATEMENT"`
}

type StatementListCmd

type StatementListCmd struct {
	schema.StatementListRequest
}

func (*StatementListCmd) Run

func (cmd *StatementListCmd) Run(ctx server.Cmd) error

type StatementResetCmd

type StatementResetCmd struct{}

func (*StatementResetCmd) Run

func (cmd *StatementResetCmd) Run(ctx server.Cmd) error

type TablespaceClientCommands

type TablespaceClientCommands struct {
	TablespaceList   TablespaceListCmd   `cmd:"" name:"tablespaces" help:"List tablespaces." group:"TABLESPACE"`
	TablespaceGet    TablespaceGetCmd    `cmd:"" name:"tablespace" help:"Get tablespace details." group:"TABLESPACE"`
	TablespaceCreate TablespaceCreateCmd `cmd:"" name:"tablespace-create" help:"Create a new tablespace." group:"TABLESPACE"`
	TablespaceDelete TablespaceDeleteCmd `cmd:"" name:"tablespace-delete" help:"Delete a tablespace." group:"TABLESPACE"`
	TablespaceUpdate TablespaceUpdateCmd `cmd:"" name:"tablespace-update" help:"Update a tablespace." group:"TABLESPACE"`
}

type TablespaceCreateCmd

type TablespaceCreateCmd struct {
	schema.TablespaceMeta
	Location string `arg:"" name:"location" help:"Location for the tablespace."`
}

func (*TablespaceCreateCmd) Run

func (cmd *TablespaceCreateCmd) Run(ctx server.Cmd) error

type TablespaceDeleteCmd

type TablespaceDeleteCmd struct {
	Name string `arg:"" name:"name" help:"Name of the tablespace."`
}

func (*TablespaceDeleteCmd) Run

func (cmd *TablespaceDeleteCmd) Run(ctx server.Cmd) error

type TablespaceGetCmd

type TablespaceGetCmd struct {
	Name string `arg:"" name:"name" help:"Name of the tablespace."`
}

func (*TablespaceGetCmd) Run

func (cmd *TablespaceGetCmd) Run(ctx server.Cmd) error

type TablespaceListCmd

type TablespaceListCmd struct {
	schema.TablespaceListRequest
}

func (*TablespaceListCmd) Run

func (cmd *TablespaceListCmd) Run(ctx server.Cmd) error

type TablespaceUpdateCmd

type TablespaceUpdateCmd struct {
	NewName string `flag:"" name:"name" help:"New name of the tablespace."`
	schema.TablespaceMeta
}

func (*TablespaceUpdateCmd) Run

func (cmd *TablespaceUpdateCmd) Run(ctx server.Cmd) error

Jump to

Keyboard shortcuts

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