data

package
v0.8.24 Latest Latest
Warning

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

Go to latest
Published: Mar 31, 2023 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Derive added in v0.6.4

func Derive(name string, pkg string, content string) (*model.Model, error)

Types

type Field

type Field struct {
	Name        string `json:"name"`
	RowID       int    `json:"rowID,omitempty"`
	Type        string `json:"type"`
	Key         string `json:"key,omitempty"`
	KeyID       string `json:"key_id,omitempty"`
	KeyOffset   int    `json:"key_offset,omitempty"`
	Enum        any    `json:"enum,omitempty"`
	Unique      bool   `json:"unique,omitempty"`
	FilePath    bool   `json:"file_path,omitempty"`
	FileExt     any    `json:"file_ext,omitempty"`
	Display     any    `json:"display,omitempty"`
	DisplayType string `json:"display_type,omitempty"`
	Description string `json:"description,omitempty"`
}

func (*Field) IsUnknown

func (f *Field) IsUnknown() bool

func (*Field) UnknownIdx

func (f *Field) UnknownIdx() int

type Fields

type Fields []*Field

type File

type File struct {
	Filename string  `json:"filename"`
	Fields   Fields  `json:"header"`
	Data     [][]any `json:"data"`
}

func (*File) String

func (f *File) String() string

func (*File) ToModel

func (f *File) ToModel(tableIdx int, groups model.Groups) (*model.Model, error)

type Files added in v0.5.1

type Files []*File

func (Files) Headers added in v0.5.1

func (f Files) Headers() []map[string]any

Jump to

Keyboard shortcuts

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