Documentation
¶
Index ¶
Constants ¶
View Source
const (
DefaultPoolSize = 10
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ColumnInfo ¶
type Config ¶
type Config struct {
ConnectionString string `json:"connection_string"`
PoolSize int `json:"pool_size"`
StatementTimeout time.Duration `json:"statement_timeout"`
}
func DefaultConfig ¶
func DefaultConfig() Config
type ExecuteResult ¶
type PostgresClient ¶
type PostgresClient struct {
// contains filtered or unexported fields
}
func NewPostgresClient ¶
func NewPostgresClient(logger *slog.Logger, cfg Config) (*PostgresClient, error)
func (*PostgresClient) CallTool ¶
func (c *PostgresClient) CallTool(ctx context.Context, name string, args json.RawMessage) (interface{}, error)
func (*PostgresClient) Close ¶
func (c *PostgresClient) Close()
func (*PostgresClient) GetTools ¶
func (c *PostgresClient) GetTools() []ToolDefinition
type QueryResult ¶
type ToolDefinition ¶
type ToolDefinition struct {
Name string `json:"name"`
Description string `json:"description"`
InputSchema json.RawMessage `json:"inputSchema"`
}
type ToolHandler ¶
type ToolHandler func(ctx context.Context, args json.RawMessage) (interface{}, error)
Click to show internal directories.
Click to hide internal directories.