meta

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Sep 20, 2023 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TypeNull        = "null"
	TypeInt         = "int"
	TypeString      = "string"
	TypeBool        = "bool"
	TypeFloat       = "float"
	TypeObject      = "object"
	TypeDate        = "date"
	TypeTime        = "time"
	TypeDateTime    = TypeDate + TypeTime
	TypeDuration    = "duration"
	TypeArray       = "array"
	TypeArrayObject = "arrayObject"
	TypeArrayInt    = "arrayInt"
	TypeArrayString = "arrayString"
	TypeArrayBool   = "arrayBool"
	TypeArrayFloat  = "arrayFloat"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Key

type Key string

func (Key) CamelCase

func (k Key) CamelCase() string

CamelCase ex. camelCase

func (Key) CamelCaseAcronym

func (k Key) CamelCaseAcronym() string

CamelCaseAcronym ex. camelCaseID

func (Key) DotCase

func (k Key) DotCase() string

DotCase ex. dot.case

func (Key) DotCaseAcronym

func (k Key) DotCaseAcronym() string

DotCaseAcronym ex. dot.case.ID

func (Key) KebabCase

func (k Key) KebabCase() string

KebabCase ex. kebab-case

func (Key) KebabCaseAcronym

func (k Key) KebabCaseAcronym() string

KebabCaseAcronym ex. kebab-case-ID

func (Key) MergeCase

func (k Key) MergeCase() string

MergeCase ex. mergecase

func (Key) MergeCaseAcronym

func (k Key) MergeCaseAcronym() string

MergeCaseAcronym ex. mergecaseID

func (Key) PascalCase

func (k Key) PascalCase() string

PascalCase ex. PascalCase

func (Key) PascalCaseAcronym

func (k Key) PascalCaseAcronym() string

PascalCaseAcronym ex. PascalCaseID

func (Key) SnakeCase

func (k Key) SnakeCase() string

SnakeCase ex. snake_case

func (Key) SnakeCaseAcronym

func (k Key) SnakeCaseAcronym() string

SnakeCaseAcronym ex. snake_case_ID

func (Key) String

func (k Key) String() string

type Meta

type Meta struct {
	Key        Key
	Type       Type
	Properties []*Property
}

func (*Meta) Clone

func (m *Meta) Clone() *Meta

func (*Meta) Sort

func (m *Meta) Sort()

type Property

type Property struct {
	Nest *Meta
	Key  Key
	Type Type
}

type Type

type Type struct {
	Formatters *TypeFormatters `json:"formatters"`

	Key   Key    `json:"key"`
	Value string `json:"value"`
}

func TypeOf

func TypeOf(key Key, v interface{}) Type

func (Type) Doc

func (t Type) Doc() string

func (Type) IsArray

func (t Type) IsArray() bool

func (Type) IsArrayObject

func (t Type) IsArrayObject() bool

func (Type) IsBool

func (t Type) IsBool() bool

func (Type) IsDate

func (t Type) IsDate() bool

func (Type) IsDateTime

func (t Type) IsDateTime() bool

func (Type) IsDuration

func (t Type) IsDuration() bool

func (Type) IsFloat

func (t Type) IsFloat() bool

func (Type) IsInt

func (t Type) IsInt() bool

func (Type) IsNull

func (t Type) IsNull() bool

func (Type) IsObject

func (t Type) IsObject() bool

func (Type) IsString

func (t Type) IsString() bool

func (Type) IsTime

func (t Type) IsTime() bool

func (Type) String

func (t Type) String() string

type TypeFormatter

type TypeFormatter func(t Type) string

type TypeFormatters

type TypeFormatters struct {
	Type TypeFormatter
	Doc  TypeFormatter
}

Jump to

Keyboard shortcuts

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