datastore: go.mercari.io/datastore/testsuite/realworld/tbf Index | Files

package tbf

import "go.mercari.io/datastore/testsuite/realworld/tbf"

Index

Package Files

circle_model.go image_model.go main.go misc_model.go

Variables

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

TestSuite contains all the test cases that this package provides.

type Circle Uses

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"`
}

Circle represents information on participating organizations.

func (*Circle) Load Uses

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

Load loads all of the provided properties into struct.

func (*Circle) LoadKey Uses

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

LoadKey loads key data into struct.

func (*Circle) Save Uses

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

Save saves all of struct fields to properties.

type CircleID Uses

type CircleID int64

CircleID means ID of Circle kind.

func (CircleID) FromPropertyValue Uses

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

FromPropertyValue convert property value to the valid value as the application.

func (CircleID) ToKey Uses

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

ToKey convert the value to datastore.Key.

func (CircleID) ToPropertyValue Uses

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

ToPropertyValue convert the value to the valid value as the property of datastore.

type Image Uses

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

Image provides information about circle image on GCS.

func (*Image) Load Uses

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

Load loads all of the provided properties into struct.

func (*Image) LoadKey Uses

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

LoadKey loads key data into struct.

func (*Image) Save Uses

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

Save saves all of struct fields to properties.

Package tbf imports 14 packages (graph). Updated 2018-06-27. Refresh now. Tools for package owners.