postgressql

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Nov 12, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const ToolKind string = "postgres-sql"

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Name        string           `yaml:"name"`
	Kind        string           `yaml:"kind"`
	Source      string           `yaml:"source"`
	Description string           `yaml:"description"`
	Statement   string           `yaml:"statement"`
	Parameters  tools.Parameters `yaml:"parameters"`
}

func (Config) Initialize

func (cfg Config) Initialize(srcs map[string]sources.Source) (tools.Tool, error)

func (Config) ToolConfigKind

func (cfg Config) ToolConfigKind() string

type Tool

type Tool struct {
	Name       string           `yaml:"name"`
	Kind       string           `yaml:"kind"`
	Parameters tools.Parameters `yaml:"parameters"`

	Pool      *pgxpool.Pool
	Statement string
	// contains filtered or unexported fields
}

func NewGenericTool

func NewGenericTool(name, stmt, desc string, pool *pgxpool.Pool, parameters tools.Parameters) Tool

func (Tool) Invoke

func (t Tool) Invoke(params []any) (string, error)

func (Tool) Manifest

func (t Tool) Manifest() tools.Manifest

func (Tool) ParseParams

func (t Tool) ParseParams(data map[string]any) ([]any, error)

Jump to

Keyboard shortcuts

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