structure

package
v0.0.0 Latest Latest
Warning

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

Go to latest
Published: Aug 14, 2023 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Name

type Name string

name of something

type PInt

type PInt PositiveInt

type PositiveInt

type PositiveInt int64

type S

type S struct {
	Name string `json:"name"` // name of object

	// age of object
	Age int `json:"age"`
}

target object

type S2

type S2 struct {
	Name string `json:"name"` // name of object

	// age of object
	Age PInt `json:"age" required:"false"`

	Nickname string `json:"nickname,omitempty"`

	Friends []string       `json:"friends"`
	Items   map[string]int `json:"items"`

	Ignored string `json:"-"`

	Greeting fmt.Stringer
	Any      any `jsonschema-override:"{'required': false, 'deprecated': true}"`
}

target object

type S3

type S3 struct {
	Named   Sub2 `json:"named,omitempty"`
	Unnamed struct {
		Name Name `json:"name"`
	} `json:"unnamed,omitempty"`
}

type S4

type S4 struct {
	Named   Sub2 `json:"named,omitempty"`
	Unnamed struct {
		Name Name `json:"name"`
	} `json:"unnamed,omitempty"`

	Children []S4 `json:"children"`
}

type Sub2

type Sub2 struct {
	Name Name `json:"name"`
}

named sub-struct

Jump to

Keyboard shortcuts

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