models

package
v0.0.0-...-b115b58 Latest Latest
Warning

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

Go to latest
Published: May 17, 2018 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Field

type Field struct {
	Name        string
	Type        string
	Description string
}

Field represents model's field

func NewField

func NewField(name, t, description string) Field

NewField method creates a new field by given parameters and returns pointer to it

type Model

type Model struct {
	Name   string
	Fields []Field
}

Model represents struct for storage golang model

func NewModel

func NewModel(name string) Model

NewModel method creates a new model by given parameters and returns pointer to it

func (*Model) AddField

func (m *Model) AddField(field ...Field)

AddField method adds field to end of the array

func (Model) String

func (m Model) String() string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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