testsuite

package
v0.13.0 Latest Latest
Warning

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

Go to latest
Published: Dec 19, 2017 License: MIT Imports: 12 Imported by: 35

Documentation

Index

Constants

This section is empty.

Variables

View Source
var TestSuite = map[string]Test{
	"Batch_Put":                                   Batch_Put,
	"Batch_PutWithCustomErrHandler":               Batch_PutWithCustomErrHandler,
	"Batch_Get":                                   Batch_Get,
	"Batch_GetWithCustomErrHandler":               Batch_GetWithCustomErrHandler,
	"Batch_Delete":                                Batch_Delete,
	"Batch_DeleteWithCustomErrHandler":            Batch_DeleteWithCustomErrHandler,
	"PutAndGet":                                   PutAndGet,
	"PutAndGet_TimeTime":                          PutAndGet_TimeTime,
	"PutAndDelete":                                PutAndDelete,
	"PutAndGet_ObjectHasObjectSlice":              PutAndGet_ObjectHasObjectSlice,
	"PutAndGet_ObjectHasObjectSliceWithFlatten":   PutAndGet_ObjectHasObjectSliceWithFlatten,
	"PutEntityType":                               PutEntityType,
	"PutAndGetNilKey":                             PutAndGetNilKey,
	"PutAndGetNilKeySlice":                        PutAndGetNilKeySlice,
	"PutInterface":                                PutInterface,
	"PutAndGetPropertyList":                       PutAndGetPropertyList,
	"PutAndGetMultiPropertyListSlice":             PutAndGetMultiPropertyListSlice,
	"PutAndGetBareStruct":                         PutAndGetBareStruct,
	"PutAndGetMultiBareStruct":                    PutAndGetMultiBareStruct,
	"GeoPoint_PutAndGet":                          GeoPoint_PutAndGet,
	"GobDecode":                                   GobDecode,
	"Key_Equal":                                   Key_Equal,
	"Key_Incomplete":                              Key_Incomplete,
	"Key_PutAndGet":                               Key_PutAndGet,
	"PLS_Basic":                                   PLS_Basic,
	"KL_Basic":                                    KL_Basic,
	"PropertyTranslater_PutAndGet":                PropertyTranslater_PutAndGet,
	"Filter_PropertyTranslaterMustError":          Filter_PropertyTranslaterMustError,
	"Query_Count":                                 Query_Count,
	"Query_GetAll":                                Query_GetAll,
	"Query_Cursor":                                Query_Cursor,
	"Query_NextByPropertyList":                    Query_NextByPropertyList,
	"Query_GetAllByPropertyListSlice":             Query_GetAllByPropertyListSlice,
	"Filter_Basic":                                Filter_Basic,
	"Filter_PropertyTranslater":                   Filter_PropertyTranslater,
	"Transaction_Commit":                          Transaction_Commit,
	"Transaction_Rollback":                        Transaction_Rollback,
	"Transaction_JoinAncesterQuery":               Transaction_JoinAncesterQuery,
	"RunInTransaction_Commit":                     RunInTransaction_Commit,
	"RunInTransaction_Rollback":                   RunInTransaction_Rollback,
	"TransactionBatch_Put":                        TransactionBatch_Put,
	"TransactionBatch_PutWithCustomErrHandler":    TransactionBatch_PutWithCustomErrHandler,
	"TransactionBatch_PutAndAllocateIDs":          TransactionBatch_PutAndAllocateIDs,
	"TransactionBatch_Get":                        TransactionBatch_Get,
	"TransactionBatch_GetWithCustomErrHandler":    TransactionBatch_GetWithCustomErrHandler,
	"TransactionBatch_Delete":                     TransactionBatch_Delete,
	"TransactionBatch_DeleteWithCustomErrHandler": TransactionBatch_DeleteWithCustomErrHandler,
}

Functions

func Batch_Delete

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

func Batch_DeleteWithCustomErrHandler added in v0.9.0

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

func Batch_Get

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

func Batch_GetWithCustomErrHandler added in v0.9.0

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

func Batch_Put

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

func Batch_PutWithCustomErrHandler added in v0.9.0

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

func Filter_Basic

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

func Filter_PropertyTranslater

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

func Filter_PropertyTranslaterMustError

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

func Filter_PropertyTranslaterWithOriginalTypes

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

func GeoPoint_PutAndGet

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

func GobDecode added in v0.7.0

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

func IsAEDatastoreClient

func IsAEDatastoreClient(ctx context.Context) bool

func IsCloudDatastoreClient

func IsCloudDatastoreClient(ctx context.Context) bool

func KL_Basic

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

func Key_Equal added in v0.5.0

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

func Key_Incomplete added in v0.5.0

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

func Key_PutAndGet added in v0.8.2

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

func MergeTestSuite

func MergeTestSuite(suite map[string]Test)

func PLS_Basic

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

func PropertyTranslater_PutAndGet

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

func PutAndDelete

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

func PutAndGet

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

func PutAndGetBareStruct added in v0.5.3

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

func PutAndGetMultiBareStruct added in v0.5.3

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

func PutAndGetMultiPropertyListSlice added in v0.5.3

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

func PutAndGetNilKey added in v0.5.2

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

func PutAndGetNilKeySlice added in v0.5.2

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

func PutAndGetPropertyList added in v0.5.3

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

func PutAndGet_ObjectHasObjectSlice

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

func PutAndGet_ObjectHasObjectSliceWithFlatten

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

func PutAndGet_TimeTime added in v0.8.1

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

func PutEntityType

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

func PutInterface added in v0.4.0

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

func Query_Count

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

func Query_Cursor

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

func Query_GetAll

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

func Query_GetAllByPropertyListSlice added in v0.6.0

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

func Query_NextByPropertyList added in v0.6.0

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

func RunInTransaction_Commit

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

func RunInTransaction_Rollback

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

func TransactionBatch_Delete

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

func TransactionBatch_DeleteWithCustomErrHandler added in v0.9.0

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

func TransactionBatch_Get

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

func TransactionBatch_GetWithCustomErrHandler added in v0.9.0

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

func TransactionBatch_Put

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

func TransactionBatch_PutAndAllocateIDs

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

func TransactionBatch_PutWithCustomErrHandler added in v0.9.0

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

func Transaction_Commit

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

func Transaction_JoinAncesterQuery

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

func Transaction_Rollback

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

func WrapAEFlag

func WrapAEFlag(ctx context.Context) context.Context

func WrapCloudFlag

func WrapCloudFlag(ctx context.Context) context.Context

Types

type DataKL

type DataKL struct {
	ID   int64 `datastore:"-"`
	Name string
}

func (*DataKL) Load

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

func (*DataKL) LoadKey

func (d *DataKL) LoadKey(ctx context.Context, k datastore.Key) error

func (*DataKL) Save

func (d *DataKL) Save(ctx context.Context) ([]datastore.Property, error)

type DataPLS

type DataPLS struct {
	Name      string
	LoadCount int
	CreatedAt time.Time
}

func (*DataPLS) Load

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

func (*DataPLS) Save

func (d *DataPLS) Save(ctx context.Context) ([]datastore.Property, error)

type EntityInterface added in v0.4.0

type EntityInterface interface {
	Kind() string
	ID() string
}

type MustReturnsError

type MustReturnsError int

func (MustReturnsError) FromPropertyValue

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

func (MustReturnsError) ToPropertyValue

func (_ MustReturnsError) ToPropertyValue(ctx context.Context) (interface{}, error)

type PutInterfaceTest added in v0.4.0

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

func (*PutInterfaceTest) ID added in v0.4.0

func (e *PutInterfaceTest) ID() string

func (*PutInterfaceTest) Kind added in v0.4.0

func (e *PutInterfaceTest) Kind() string

type Test

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

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

type UserID

type UserID int64

func (UserID) FromPropertyValue

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

func (UserID) ToPropertyValue

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

Directories

Path Synopsis
dsmiddleware
realworld
tbf

Jump to

Keyboard shortcuts

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