templates

package
v0.0.0-...-4ae6852 Latest Latest
Warning

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

Go to latest
Published: Oct 25, 2025 License: AGPL-3.0 Imports: 32 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Attach

func Attach(mux goahttp.Muxer, service *Service)

Types

type CustomToolJSONV1

type CustomToolJSONV1 struct {
	ToolName string  `json:"toolName"`
	Purpose  string  `json:"purpose"`
	Inputs   []Input `json:"inputs"`
	Steps    []Step  `json:"steps"`
}

type Input

type Input struct {
	Name        string `json:"name"`
	Description string `json:"description"`
}

type Service

type Service struct {
	// contains filtered or unexported fields
}

func NewService

func NewService(logger *slog.Logger, db *pgxpool.Pool, sessions *sessions.Manager, toolsets ToolsetsService) *Service

func (*Service) APIKeyAuth

func (s *Service) APIKeyAuth(ctx context.Context, key string, schema *security.APIKeyScheme) (context.Context, error)

func (*Service) CreateTemplate

func (s *Service) CreateTemplate(ctx context.Context, payload *gen.CreateTemplatePayload) (*gen.CreatePromptTemplateResult, error)

func (*Service) DeleteTemplate

func (s *Service) DeleteTemplate(ctx context.Context, payload *gen.DeleteTemplatePayload) error

func (*Service) GetTemplate

func (s *Service) GetTemplate(ctx context.Context, payload *gen.GetTemplatePayload) (*gen.GetPromptTemplateResult, error)

func (*Service) ListTemplates

func (s *Service) ListTemplates(ctx context.Context, payload *gen.ListTemplatesPayload) (res *gen.ListPromptTemplatesResult, err error)

func (*Service) RenderTemplate

func (s *Service) RenderTemplate(ctx context.Context, payload *gen.RenderTemplatePayload) (*gen.RenderTemplateResult, error)

func (*Service) RenderTemplateByID

func (s *Service) RenderTemplateByID(ctx context.Context, payload *gen.RenderTemplateByIDPayload) (*gen.RenderTemplateResult, error)

func (*Service) RenderTemplateJSON

func (s *Service) RenderTemplateJSON(ctx context.Context, promptJSON string) (string, error)

func (*Service) UpdateTemplate

func (s *Service) UpdateTemplate(ctx context.Context, payload *gen.UpdateTemplatePayload) (*gen.UpdatePromptTemplateResult, error)

type Step

type Step struct {
	ID            string   `json:"id"`
	Tool          string   `json:"tool"`
	CanonicalTool string   `json:"canonicalTool"`
	ToolUrn       string   `json:"toolUrn"`
	Instructions  string   `json:"instructions"`
	Inputs        []string `json:"inputs"`
}

type ToolsetsService

type ToolsetsService interface {
	InvalidateCacheByTool(ctx context.Context, toolURN urn.Tool, projectID uuid.UUID) error
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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