functioncall

package
v1.4.0 Latest Latest
Warning

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

Go to latest
Published: Jun 24, 2023 License: MIT Imports: 1 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func As

func As[T any](funcs Funcs) (dest T)

Types

type Func

type Func struct {
	Value       any    `json:"-"`
	Description string `json:"description,omitempty"`
	Parameters  Params `json:"parameters,omitempty"`
}

type Funcs

type Funcs map[string]Func

func (Funcs) Decode

func (funcs Funcs) Decode(dest any)

func (Funcs) MarshalJSON

func (funcs Funcs) MarshalJSON() ([]byte, error)

type Param

type Param struct {
	Name        string `json:"-"`
	Type        string `json:"type,omitempty"`
	Description string `json:"description,omitempty"`
	Required    bool   `json:"-"`
}

type Params

type Params []Param

func (Params) MarshalJSON

func (params Params) MarshalJSON() ([]byte, error)

Jump to

Keyboard shortcuts

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