rpc

package
v0.0.51 Latest Latest
Warning

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

Go to latest
Published: Aug 15, 2024 License: BSD-3-Clause Imports: 3 Imported by: 2

Documentation

Index

Constants

View Source
const ItemsArrayVarName = "routes"

Variables

This section is empty.

Functions

func GenerateTypeScript added in v0.0.14

func GenerateTypeScript(opts Opts) error

Types

type ActionType added in v0.0.50

type ActionType = string
const (
	ActionTypeQuery    ActionType = "query"
	ActionTypeMutation ActionType = "mutation"
)

type AdHocType added in v0.0.36

type AdHocType = tsgen.AdHocType

type Opts

type Opts struct {
	// Path, including filename, where the resulting TypeScript file will be written
	OutPath           string
	RouteDefs         []RouteDef
	AdHocTypes        []AdHocType
	ExportRoutesArray bool
}

type RouteDef

type RouteDef struct {
	Key        string
	ActionType ActionType
	Input      any
	Output     any
}

Jump to

Keyboard shortcuts

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