record

package
v0.0.0-...-fac03c6 Latest Latest
Warning

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

Go to latest
Published: Jul 26, 2016 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Record

type Record struct {
	Key         string    `storm:"id" json:"key" xml:"key" form:"key" valid:"required"`
	ContentType string    `storm:"index" json:"contentType" xml:"contentType" form:"contentType" valid:"required,alphanum"`
	Revision    time.Time `storm:"index" json:"revision" xml:"revision" form:"revision"`
	Content     string    `json:"content" xml:"content" form:"content" valid:"required"`
}

Record represents the ready to use json from storage

func NewRecord

func NewRecord(c contenttype.ContentType, key, content string) Record

NewRecord create a new record

type Revision

type Revision struct {
	ID        string    `storm:"id" json:"id" xml:"id" form:"id"`
	Key       string    `storm:"index" json:"key" xml:"key" form:"key"`
	CreatedAt time.Time `storm:"index" json:"createdAt" xml:"createdAt" form:"createdAt"`
	Diff      string    `json:"content" xml:"content" form:"content"`
}

Revision represents the ready to use json from storage

func NewRevision

func NewRevision(new *Record, old *Record) (Revision, error)

NewRevision create a new record revision

Jump to

Keyboard shortcuts

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