tools

package
v0.396.8 Latest Latest
Warning

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

Go to latest
Published: Nov 3, 2024 License: AGPL-3.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrInvalidSchema = errors.New("invalid schema")

Functions

func GenerateTools

func GenerateTools(ctx context.Context, schema *proto.Schema, config *config.ProjectConfig) ([]*toolsproto.ActionConfig, error)

GenerateTools will return a map of tool configurations generated for the given schema

Types

type Generator

type Generator struct {
	Schema     *proto.Schema
	KeelConfig *config.ProjectConfig
	Tools      map[string]*Tool
}

func NewGenerator

func NewGenerator(schema *proto.Schema, keelConfig *config.ProjectConfig) (*Generator, error)

NewGenerator creates a new tool config generator for the given schema

func (*Generator) Generate

func (g *Generator) Generate(ctx context.Context) error

Generate will generate all the tools for this generator's schema

func (*Generator) GetConfigs

func (g *Generator) GetConfigs() []*toolsproto.ActionConfig

GetConfigs will return the action configs that have been generated, in alphabetical order

type Tool

type Tool struct {
	Config         *toolsproto.ActionConfig
	Model          *proto.Model
	Action         *proto.Action
	SortableFields []string
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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