editor

package
v0.0.0-...-ca71e2f Latest Latest
Warning

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

Go to latest
Published: Aug 17, 2017 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Editor

type Editor struct {
	// contains filtered or unexported fields
}

func NewEditor

func NewEditor(reader io.Reader, writer io.Writer, resources map[string]Resource) *Editor

func (*Editor) NewObject

func (e *Editor) NewObject(name string) (interface{}, error)

func (*Editor) UpdateObject

func (e *Editor) UpdateObject(object interface{}, name string) error

type Field

type Field struct {
	Name        string
	Association string
	Default     interface{}
}

Field is one of the Object fields

type Resource

type Resource struct {
	Fields []Field
	New    func() interface{}
}

Resource is a instruction for the editor New is a function that tells how to make a new Resource

Jump to

Keyboard shortcuts

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