rpc

package
v0.0.45 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenerateTypeScript added in v0.0.14

func GenerateTypeScript(opts Opts) error

Types

type AdHocType added in v0.0.36

type AdHocType struct {
	// Instance of the struct to generate TypeScript for
	Struct any

	// Name is required only if struct is anonymous, otherwise optional override
	Name string
}

type Opts

type Opts struct {
	OutDest    string
	RouteDefs  []RouteDef
	AdHocTypes []AdHocType
}

type Procedure

type Procedure string

type RouteDef

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

type Type

type Type string
const (
	TypeQuery    Type = "query"
	TypeMutation Type = "mutation"
)

Jump to

Keyboard shortcuts

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