data

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Dec 30, 2020 License: MIT Imports: 0 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ExampleInt    = 1
	ExampleFloat  = 3.141516
	ExampleString = "test"
	ExampleBool   = true
)
View Source
const (
	// ExampleIntWithComment represents an integer with a comment line above it.
	ExampleIntWithComment = 2
	// ExampleFloatWithComment represents a float with a comment line above it.
	ExampleFloatWithComment = 4.141516
	// ExampleStringWithComment represents a string with a comment line above it.
	ExampleStringWithComment = "test2"
	// ExampleBoolWithComment represents a bool with a comment line above it.
	ExampleBoolWithComment = false
)

Variables

View Source
var AnySlice = []interface{}{
	true,
	"test2",
}
View Source
var BoolSlice = []bool{
	true,
	false,
}
View Source
var FloatSlice = []float32{
	1.234,
	2.345,
}
View Source
var IntIntMap = map[int]int{
	0: 123,
	1: 234,
}
View Source
var IntSlice = []int{
	123,
	234,
}
View Source
var IntStringMap = map[int]string{
	0: "test",
	1: "test1",
}
View Source
var StringAnyMap = map[string]interface{}{
	"test a string": "test",
	"test a int":    123,
	"test a bool":   false,
}
View Source
var StringBoolMap = map[string]bool{
	"godmt": true,
	"typex": false,
}
View Source
var StringIntMap = map[string]int{
	"test":  123,
	"test1": 234,
}
View Source
var StringSlice = []string{
	"test",
	"test2",
}
View Source
var StringStringMap = map[string]string{
	"test":  "123",
	"test2": "234",
}

Functions

This section is empty.

Types

type EmbeddedType added in v1.1.0

type EmbeddedType struct {
	ID   string `json:"id"`
	Data struct {
		Test string `json:"test"`
	} `json:"data"`
}

type ExtendedScannedType added in v1.1.0

type ExtendedScannedType struct {
	ScannedType
	AnExtraField bool `json:"anExtraField"`
}

type ScannedStruct added in v1.1.0

type ScannedStruct struct {
	Doc          []string `json:"doc" binding:"required" validation:"required"`
	Name         string   `json:"name" binding:"required" validation:"required"`
	Fields       []bool   `json:"fields" binding:"required" validation:"required"`
	InternalType int      `xml:"internalType" binding:"required" validation:"required"`
}

ScannedStruct represents the details of a scanned struct.

type ScannedType added in v1.1.0

type ScannedType struct {
	Name         string      `json:"name"`
	Kind         string      `json:"kind"`
	Value        interface{} `json:"value"`
	Doc          []string    `json:"doc"`
	InternalType int         `json:"internalType"`
}

ScannedType represents a basic entity to be translated. More specifically const and var items.

Jump to

Keyboard shortcuts

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