tbf

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jun 6, 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": tbf,
}

TestSuite contains all the test cases that this package provides.

Functions

This section is empty.

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

Circle represents information on participating organizations.

func (*Circle) Load

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

Load loads all of the provided properties into struct.

func (*Circle) LoadKey

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

LoadKey loads key data into struct.

func (*Circle) Save

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

Save saves all of struct fields to properties.

type CircleID

type CircleID int64

CircleID means ID of Circle kind.

func (CircleID) FromPropertyValue

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

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

ToKey convert the value to datastore.Key.

func (CircleID) ToPropertyValue

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

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

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

Image provides information about circle image on GCS.

func (*Image) Load

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

Load loads all of the provided properties into struct.

func (*Image) LoadKey

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

LoadKey loads key data into struct.

func (*Image) Save

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

Save saves all of struct fields to properties.

Jump to

Keyboard shortcuts

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