spanner

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Dec 10, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const ToolKind string = "spanner-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"`

	Client *spanner.Client

	Statement string
	// contains filtered or unexported fields
}

func NewGenericTool

func NewGenericTool(name, stmt, desc string, client *spanner.Client, dialect string, parameters tools.Parameters) Tool

func (Tool) Invoke

func (t Tool) Invoke(params tools.ParamValues) (string, error)

func (Tool) Manifest

func (t Tool) Manifest() tools.Manifest

func (Tool) ParseParams

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

Jump to

Keyboard shortcuts

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