restapi

package
v0.0.0-...-292f760 Latest Latest
Warning

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

Go to latest
Published: Nov 29, 2023 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Echo

type Echo interface {
	Start(string) error
	POST(string, echo.HandlerFunc, ...echo.MiddlewareFunc) *echo.Route
}

type InteractPayload

type InteractPayload struct {
	Prompt string `json:"prompt"`
}

type InteractResponse

type InteractResponse struct {
	Text string `json:"text"`
}

type MockEcho

type MockEcho struct {
	mock.Mock
}

func (*MockEcho) POST

func (echo *MockEcho) POST(endpoint string, handler echo.HandlerFunc, args ...echo.MiddlewareFunc) *echo.Route

func (*MockEcho) Start

func (echo *MockEcho) Start(port string) error

type MockMyContextAI

type MockMyContextAI struct {
	mock.Mock
}

func (*MockMyContextAI) Interact

func (app *MockMyContextAI) Interact(prompt string) string

type RestAPI

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

func NewRestAPI

func NewRestAPI(echo Echo, app interactor.InteractorInterface) RestAPI

func (RestAPI) Start

func (api RestAPI) Start()

Jump to

Keyboard shortcuts

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