devapp

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Sep 22, 2026 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Overview

Package devapp provides linked SQLite application fixtures for developer MCP tests.

Index

Constants

View Source
const Module = "example.com/mcpapp"
View Source
const Package = "github.com/viant/datly/internal/testharness/devapp"

Variables

View Source
var ReadDQL = "" /* 154-byte string literal not displayed */
View Source
var WriteDQL = ""

Functions

func Configuration

func Configuration(root, dsn string) (developer.Config, error)

Configuration is production composition for the linked test executable, not a Build stub.

func Exports

func Exports() (*x.Registry, error)

func NewWrite

func NewWrite() h.Contract[WriteInput, WriteOutput]

Types

type Fixture

type Fixture struct {
	Root, DSN string
	DB        *sqlite.Harness
}

func New

func New(t *testing.T) *Fixture

type ReadInput

type ReadInput struct {
	ID int `parameter:"ID,kind=path,in=id,required"`
}

type ReadOutput

type ReadOutput struct {
	Rows []*Record `parameter:"Rows,kind=output,in=view" view:"Read,table=records" sql:"SELECT id,name FROM records WHERE id=:ID" json:"rows"`
}

type Record

type Record struct {
	ID   int    `sqlx:"id,primaryKey=true" json:"id"`
	Name string `sqlx:"name" json:"name"`
}

type WriteInput

type WriteInput struct {
	Record *Record `parameter:"Record,kind=body,in=data,required"`
}

type WriteOutput

type WriteOutput struct {
	Data *Record `json:"data"`
}

Jump to

Keyboard shortcuts

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