Documentation
¶
Overview ¶
Package prims is the catalogue of the DSL's built-in type spellings. One row per name carries every fact the analyser, the code generators, and the language server read about it, so a built-in is described once.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Capacity ¶
Capacity returns the value range an integer kind can hold; ok is false for every other name.
func IsUnsigned ¶
IsUnsigned reports whether name is an unsigned integer kind.
func IsWireParseable ¶
IsWireParseable reports whether a wire-string binder (`@query`, `@header`, `@cookie`, `@form`) can parse name from a single string: string, bool, and the integer and float kinds.
Types ¶
type Spec ¶
type Spec struct {
Name string
Kind Kind
// Bits is the width of a sized integer or float (8, 16, 32, 64); 0
// for the platform-sized `int` / `uint` and for non-numeric kinds.
Bits int
// Go is the Go type the name lowers to; "" when it has none.
Go string
// Parser is the strconv function a wire-string binder parses the
// value with; "" for `string` (used verbatim) and for kinds with no
// wire form.
Parser string
// OASType and OASFormat are the OpenAPI schema `type` and `format`;
// an empty OASType is an unconstrained schema.
OASType, OASFormat string
// Lo and Hi bound the values an integer kind can hold.
Lo, Hi float64
// Doc is the hover text the language server shows.
Doc string
}
Spec describes one built-in type.
Click to show internal directories.
Click to hide internal directories.