Documentation
¶
Index ¶
- Variables
- func AddPgExecuteSqlConfig(t *testing.T, config map[string]any) map[string]any
- func GetCloudSQLDialOpts(ipType string) ([]cloudsqlconn.DialOption, error)
- func GetGoogleIdToken(audience string) (string, error)
- func GetHTTPToolsConfig(sourceConfig map[string]any, toolKind string) map[string]any
- func GetMssqlLAuthToolInfo(tableName string) (string, string, string, []any)
- func GetMssqlParamToolInfo(tableName string) (string, string, string, []any)
- func GetMssqlWants() (string, string)
- func GetMysqlLAuthToolInfo(tableName string) (string, string, string, []any)
- func GetMysqlParamToolInfo(tableName string) (string, string, string, []any)
- func GetMysqlWants() (string, string)
- func GetNonSpannerInvokeParamWant() (string, string)
- func GetPostgresSQLAuthToolInfo(tableName string) (string, string, string, []any)
- func GetPostgresSQLParamToolInfo(tableName string) (string, string, string, []any)
- func GetPostgresWants() (string, string)
- func GetToolsConfig(sourceConfig map[string]any, ...) map[string]any
- func RunMCPToolCallMethod(t *testing.T, invoke_param_want, fail_invocation_want string)
- func RunPgExecuteSqlToolInvokeTest(t *testing.T, select_1_want string)
- func RunSourceConnectionTest(t *testing.T, sourceConfig map[string]any, toolKind string) error
- func RunToolGetTest(t *testing.T)
- func RunToolInvokeTest(t *testing.T, select_1_want, invoke_param_want string)
- func SetupMsSQLTable(t *testing.T, ctx context.Context, pool *sql.DB, ...) func(*testing.T)
- func SetupMySQLTable(t *testing.T, ctx context.Context, pool *sql.DB, ...) func(*testing.T)
- func SetupPostgresSQLTable(t *testing.T, ctx context.Context, pool *pgxpool.Pool, ...) func(*testing.T)
- type CmdExec
Constants ¶
This section is empty.
Variables ¶
var ClientId = os.Getenv("CLIENT_ID")
var SERVICE_ACCOUNT_EMAIL = os.Getenv("SERVICE_ACCOUNT_EMAIL")
Functions ¶
func AddPgExecuteSqlConfig ¶
AddPgExecuteSqlConfig gets the tools config for `postgres-execute-sql`
func GetCloudSQLDialOpts ¶
func GetCloudSQLDialOpts(ipType string) ([]cloudsqlconn.DialOption, error)
GetCloudSQLDialOpts returns cloud sql connector's dial option for ip type.
func GetGoogleIdToken ¶
GetGoogleIdToken retrieve and return the Google ID token
func GetHTTPToolsConfig ¶
GetHTTPToolsConfig returns a mock HTTP tool's config file
func GetMssqlLAuthToolInfo ¶
GetMssqlLAuthToolInfo returns statements and param of my-auth-tool for mssql-sql kind
func GetMssqlParamToolInfo ¶
GetMssqlParamToolInfo returns statements and param for my-param-tool mssql-sql kind
func GetMssqlWants ¶
GetMssqlWants return the expected wants for mssql
func GetMysqlLAuthToolInfo ¶
GetMysqlLAuthToolInfo returns statements and param of my-auth-tool for mssql-sql kind
func GetMysqlParamToolInfo ¶
GetMysqlParamToolInfo returns statements and param for my-param-tool mssql-sql kind
func GetMysqlWants ¶
GetMysqlWants return the expected wants for mysql
func GetPostgresSQLAuthToolInfo ¶
GetPostgresSQLAuthToolInfo returns statements and param of my-auth-tool for postgres-sql kind
func GetPostgresSQLParamToolInfo ¶
GetPostgresSQLParamToolInfo returns statements and param for my-param-tool postgres-sql kind
func GetPostgresWants ¶
GetPostgresWants return the expected wants for postgres
func GetToolsConfig ¶
func GetToolsConfig(sourceConfig map[string]any, toolKind, param_tool_statement, auth_tool_statement string) map[string]any
GetToolsConfig returns a mock tools config file
func RunMCPToolCallMethod ¶
RunMCPToolCallMethod runs the tool/call for mcp endpoint
func RunSourceConnectionTest ¶
RunSourceConnection test for source connection
func RunToolInvokeTest ¶
RunToolInvoke runs the tool invoke endpoint
func SetupMsSQLTable ¶
func SetupMsSQLTable(t *testing.T, ctx context.Context, pool *sql.DB, create_statement, insert_statement, tableName string, params []any) func(*testing.T)
SetupMsSQLTable creates and inserts data into a table of tool compatible with mssql-sql tool
Types ¶
type CmdExec ¶
type CmdExec struct {
Out io.ReadCloser
// contains filtered or unexported fields
}
CmdExec represents an invocation of a toolbox command.
func StartCmd ¶
func StartCmd(ctx context.Context, toolsFile map[string]any, args ...string) (*CmdExec, func(), error)
StartCmd returns a CmdExec representing a running instance of a toolbox command.
func (*CmdExec) Close ¶
func (c *CmdExec) Close()
Close releases any resources associated with the instance.