tbf

package
Version: v0.15.0 Latest Latest
Warning

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

Go to latest
Published: Jan 9, 2018 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var TestSuite = map[string]testsuite.Test{
	"RealWorld_TBF": RealWorld_TBF,
}

Functions

func RealWorld_TBF

func RealWorld_TBF(t *testing.T, ctx context.Context, client datastore.Client)

Types

type Circle

type Circle struct {
	ID        CircleID  `json:"id" datastore:"-"`
	Name      string    `json:"name"`
	ImageIDs  []ImageID `json:"-"`
	Images    []*Image  `json:"images" datastore:"-"`
	CreatedAt UnixTime  `json:"createdAt"`
	UpdatedAt UnixTime  `json:"updatedAt"`
}

func (*Circle) Load

func (circle *Circle) Load(ctx context.Context, ps []datastore.Property) error

func (*Circle) LoadKey

func (circle *Circle) LoadKey(ctx context.Context, k datastore.Key) error

func (*Circle) Save

func (circle *Circle) Save(ctx context.Context) ([]datastore.Property, error)

type CircleID

type CircleID int64

func KeyToCircleID

func KeyToCircleID(key datastore.Key) (CircleID, error)

func (CircleID) FromPropertyValue

func (id CircleID) FromPropertyValue(ctx context.Context, p datastore.Property) (dst interface{}, err error)

func (CircleID) ToKey

func (id CircleID) ToKey(client datastore.Client) datastore.Key

func (CircleID) ToPropertyValue

func (id CircleID) ToPropertyValue(ctx context.Context) (interface{}, error)

type Image

type Image struct {
	ID            ImageID  `json:"id" datastore:"-"`
	OwnerCircleID CircleID `json:"ownerCircleID"`
	GCSPath       string   `json:"gcsPath"`
	CreatedAt     UnixTime `json:"createdAt"`
	UpdatedAt     UnixTime `json:"updatedAt"`
}

func (*Image) Load

func (image *Image) Load(ctx context.Context, ps []datastore.Property) error

func (*Image) LoadKey

func (image *Image) LoadKey(ctx context.Context, k datastore.Key) error

func (*Image) Save

func (image *Image) Save(ctx context.Context) ([]datastore.Property, error)

type ImageID

type ImageID int64

func KeyToImageID

func KeyToImageID(key datastore.Key) (ImageID, error)

func (ImageID) FromPropertyValue

func (id ImageID) FromPropertyValue(ctx context.Context, p datastore.Property) (dst interface{}, err error)

func (ImageID) ToKey

func (id ImageID) ToKey(client datastore.Client) datastore.Key

func (ImageID) ToPropertyValue

func (id ImageID) ToPropertyValue(ctx context.Context) (interface{}, error)

type UnixTime

type UnixTime time.Time

func (UnixTime) FromPropertyValue

func (t UnixTime) FromPropertyValue(ctx context.Context, p datastore.Property) (dst interface{}, err error)

func (UnixTime) MarshalJSON

func (t UnixTime) MarshalJSON() ([]byte, error)

func (UnixTime) ToPropertyValue

func (t UnixTime) ToPropertyValue(ctx context.Context) (interface{}, error)

func (*UnixTime) UnmarshalJSON

func (t *UnixTime) UnmarshalJSON(b []byte) error

Jump to

Keyboard shortcuts

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