example

package
v0.0.0-...-519d24f Latest Latest
Warning

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

Go to latest
Published: May 5, 2020 License: BSD-3-Clause Imports: 10 Imported by: 0

Documentation

Overview

Code generated by github.com/yssk22/go/generator DO NOT EDIT.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Entity

type Entity struct {
	ID           string             `json:"id" ent:"key"`
	Digit        int                `json:"digit"`
	Desc         string             `json:"desc"`
	ContentBytes []byte             `json:"content_bytes" ent:"search"`
	SliceType    []string           `json:"slice_type"`
	BoolType     bool               `json:"bool_type" ent:"search"`
	FloatType    float64            `json:"float_type" ent:"search"`
	CreatedAt    time.Time          `json:"created_at"`
	UpdatedAt    time.Time          `json:"updated_at" ent:"timestamp"`
	CustomType   types.RGB          `json:"custom_type"`
	Location     appengine.GeoPoint `json:"location" ent:"search"`

	FieldWithNoIndex int `datastore:",noindex"`
	FieldWithHyphen  int `datastore:"-"`

	BeforeSaveDesc string
	AfterSaveDesc  string
}

Entity is an example for datastore entity @datastore

func (*Entity) AfterSave

func (e *Entity) AfterSave(ctx context.Context) error

func (*Entity) BeforeSave

func (e *Entity) BeforeSave(ctx context.Context) error

func (*Entity) NewKey

func (s *Entity) NewKey(ctx context.Context) *datastore.Key

type EntityIterator

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

func (*EntityIterator) Cursor

func (iter *EntityIterator) Cursor() (datastore.Cursor, error)

func (*EntityIterator) MustCursor

func (iter *EntityIterator) MustCursor() datastore.Cursor

func (*EntityIterator) MustNext

func (iter *EntityIterator) MustNext() (*datastore.Key, *Entity)

func (*EntityIterator) Next

func (iter *EntityIterator) Next() (*datastore.Key, *Entity, error)

type EntityKindClient

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

func NewEntityKindClient

func NewEntityKindClient(client *ds.Client) *EntityKindClient

func (*EntityKindClient) Count

func (d *EntityKindClient) Count(ctx context.Context, q *EntityQuery) (int, error)

func (*EntityKindClient) Delete

func (d *EntityKindClient) Delete(ctx context.Context, key interface{}) (*datastore.Key, error)

func (*EntityKindClient) DeleteMatched

func (d *EntityKindClient) DeleteMatched(ctx context.Context, q *EntityQuery) ([]*datastore.Key, error)

func (*EntityKindClient) DeleteMulti

func (d *EntityKindClient) DeleteMulti(ctx context.Context, keys interface{}) ([]*datastore.Key, error)

func (*EntityKindClient) Get

func (d *EntityKindClient) Get(ctx context.Context, key interface{}) (*datastore.Key, *Entity, error)

func (*EntityKindClient) GetAll

func (d *EntityKindClient) GetAll(ctx context.Context, q *EntityQuery) ([]*datastore.Key, []Entity, error)

func (*EntityKindClient) GetMulti

func (d *EntityKindClient) GetMulti(ctx context.Context, keys interface{}) ([]*datastore.Key, []*Entity, error)

func (*EntityKindClient) GetOne

func (*EntityKindClient) MustCount

func (d *EntityKindClient) MustCount(ctx context.Context, q *EntityQuery) int

func (*EntityKindClient) MustDelete

func (d *EntityKindClient) MustDelete(ctx context.Context, key interface{}) *datastore.Key

func (*EntityKindClient) MustDeleteMatched

func (d *EntityKindClient) MustDeleteMatched(ctx context.Context, q *EntityQuery) []*datastore.Key

func (*EntityKindClient) MustDeleteMulti

func (d *EntityKindClient) MustDeleteMulti(ctx context.Context, keys interface{}) []*datastore.Key

func (*EntityKindClient) MustGet

func (d *EntityKindClient) MustGet(ctx context.Context, key interface{}) (*datastore.Key, *Entity)

func (*EntityKindClient) MustGetAll

func (d *EntityKindClient) MustGetAll(ctx context.Context, q *EntityQuery) ([]*datastore.Key, []Entity)

func (*EntityKindClient) MustGetMulti

func (d *EntityKindClient) MustGetMulti(ctx context.Context, keys interface{}) ([]*datastore.Key, []*Entity)

func (*EntityKindClient) MustPut

func (d *EntityKindClient) MustPut(ctx context.Context, ent *Entity) *datastore.Key

func (*EntityKindClient) MustPutMulti

func (d *EntityKindClient) MustPutMulti(ctx context.Context, ents []*Entity) []*datastore.Key

func (*EntityKindClient) MustReplace

func (d *EntityKindClient) MustReplace(ctx context.Context, ent *Entity, replacer EntityReplacer) (*datastore.Key, *Entity)

func (*EntityKindClient) MustReplaceMulti

func (d *EntityKindClient) MustReplaceMulti(ctx context.Context, ents []*Entity, replacer EntityReplacer) ([]*datastore.Key, []*Entity)

func (*EntityKindClient) MustRun

func (*EntityKindClient) MustRunAll

func (d *EntityKindClient) MustRunAll(ctx context.Context, q *EntityQuery) ([]datastore.Key, []Entity, string)

func (*EntityKindClient) Put

func (d *EntityKindClient) Put(ctx context.Context, ent *Entity) (*datastore.Key, error)

func (*EntityKindClient) PutMulti

func (d *EntityKindClient) PutMulti(ctx context.Context, ents []*Entity) ([]*datastore.Key, error)

func (*EntityKindClient) Replace

func (d *EntityKindClient) Replace(ctx context.Context, ent *Entity, replacer EntityReplacer) (*datastore.Key, *Entity, error)

func (*EntityKindClient) ReplaceMulti

func (d *EntityKindClient) ReplaceMulti(ctx context.Context, ents []*Entity, replacer EntityReplacer) ([]*datastore.Key, []*Entity, error)

func (*EntityKindClient) Run

func (*EntityKindClient) RunAll

type EntityQuery

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

func NewEntityQuery

func NewEntityQuery() *EntityQuery

func (*EntityQuery) AscAfterSaveDesc

func (d *EntityQuery) AscAfterSaveDesc() *EntityQuery

func (*EntityQuery) AscBeforeSaveDesc

func (d *EntityQuery) AscBeforeSaveDesc() *EntityQuery

func (*EntityQuery) AscBoolType

func (d *EntityQuery) AscBoolType() *EntityQuery

func (*EntityQuery) AscCreatedAt

func (d *EntityQuery) AscCreatedAt() *EntityQuery

func (*EntityQuery) AscCustomType

func (d *EntityQuery) AscCustomType() *EntityQuery

func (*EntityQuery) AscDesc

func (d *EntityQuery) AscDesc() *EntityQuery

func (*EntityQuery) AscDigit

func (d *EntityQuery) AscDigit() *EntityQuery

func (*EntityQuery) AscFloatType

func (d *EntityQuery) AscFloatType() *EntityQuery

func (*EntityQuery) AscID

func (d *EntityQuery) AscID() *EntityQuery

func (*EntityQuery) AscLocationLat

func (d *EntityQuery) AscLocationLat() *EntityQuery

func (*EntityQuery) AscLocationLng

func (d *EntityQuery) AscLocationLng() *EntityQuery

func (*EntityQuery) AscSliceType

func (d *EntityQuery) AscSliceType() *EntityQuery

func (*EntityQuery) AscUpdatedAt

func (d *EntityQuery) AscUpdatedAt() *EntityQuery

func (*EntityQuery) DescAfterSaveDesc

func (d *EntityQuery) DescAfterSaveDesc() *EntityQuery

func (*EntityQuery) DescBeforeSaveDesc

func (d *EntityQuery) DescBeforeSaveDesc() *EntityQuery

func (*EntityQuery) DescBoolType

func (d *EntityQuery) DescBoolType() *EntityQuery

func (*EntityQuery) DescCreatedAt

func (d *EntityQuery) DescCreatedAt() *EntityQuery

func (*EntityQuery) DescCustomType

func (d *EntityQuery) DescCustomType() *EntityQuery

func (*EntityQuery) DescDesc

func (d *EntityQuery) DescDesc() *EntityQuery

func (*EntityQuery) DescDigit

func (d *EntityQuery) DescDigit() *EntityQuery

func (*EntityQuery) DescFloatType

func (d *EntityQuery) DescFloatType() *EntityQuery

func (*EntityQuery) DescID

func (d *EntityQuery) DescID() *EntityQuery

func (*EntityQuery) DescLocationLat

func (d *EntityQuery) DescLocationLat() *EntityQuery

func (*EntityQuery) DescLocationLng

func (d *EntityQuery) DescLocationLng() *EntityQuery

func (*EntityQuery) DescSliceType

func (d *EntityQuery) DescSliceType() *EntityQuery

func (*EntityQuery) DescUpdatedAt

func (d *EntityQuery) DescUpdatedAt() *EntityQuery

func (*EntityQuery) End

func (q *EntityQuery) End(s string) *EntityQuery

func (*EntityQuery) EqAfterSaveDesc

func (d *EntityQuery) EqAfterSaveDesc(v string) *EntityQuery

func (*EntityQuery) EqBeforeSaveDesc

func (d *EntityQuery) EqBeforeSaveDesc(v string) *EntityQuery

func (*EntityQuery) EqBoolType

func (d *EntityQuery) EqBoolType(v bool) *EntityQuery

func (*EntityQuery) EqCreatedAt

func (d *EntityQuery) EqCreatedAt(v time.Time) *EntityQuery

func (*EntityQuery) EqCustomType

func (d *EntityQuery) EqCustomType(v types.RGB) *EntityQuery

func (*EntityQuery) EqDesc

func (d *EntityQuery) EqDesc(v string) *EntityQuery

func (*EntityQuery) EqDigit

func (d *EntityQuery) EqDigit(v int) *EntityQuery

func (*EntityQuery) EqFloatType

func (d *EntityQuery) EqFloatType(v float64) *EntityQuery

func (*EntityQuery) EqID

func (d *EntityQuery) EqID(v string) *EntityQuery

func (*EntityQuery) EqLocationLat

func (d *EntityQuery) EqLocationLat(v float64) *EntityQuery

func (*EntityQuery) EqLocationLng

func (d *EntityQuery) EqLocationLng(v float64) *EntityQuery

func (*EntityQuery) EqSliceType

func (d *EntityQuery) EqSliceType(v string) *EntityQuery

func (*EntityQuery) EqUpdatedAt

func (d *EntityQuery) EqUpdatedAt(v time.Time) *EntityQuery

func (*EntityQuery) GeAfterSaveDesc

func (d *EntityQuery) GeAfterSaveDesc(v string) *EntityQuery

func (*EntityQuery) GeBeforeSaveDesc

func (d *EntityQuery) GeBeforeSaveDesc(v string) *EntityQuery

func (*EntityQuery) GeBoolType

func (d *EntityQuery) GeBoolType(v bool) *EntityQuery

func (*EntityQuery) GeCreatedAt

func (d *EntityQuery) GeCreatedAt(v time.Time) *EntityQuery

func (*EntityQuery) GeCustomType

func (d *EntityQuery) GeCustomType(v types.RGB) *EntityQuery

func (*EntityQuery) GeDesc

func (d *EntityQuery) GeDesc(v string) *EntityQuery

func (*EntityQuery) GeDigit

func (d *EntityQuery) GeDigit(v int) *EntityQuery

func (*EntityQuery) GeFloatType

func (d *EntityQuery) GeFloatType(v float64) *EntityQuery

func (*EntityQuery) GeID

func (d *EntityQuery) GeID(v string) *EntityQuery

func (*EntityQuery) GeLocationLat

func (d *EntityQuery) GeLocationLat(v float64) *EntityQuery

func (*EntityQuery) GeLocationLng

func (d *EntityQuery) GeLocationLng(v float64) *EntityQuery

func (*EntityQuery) GeSliceType

func (d *EntityQuery) GeSliceType(v string) *EntityQuery

func (*EntityQuery) GeUpdatedAt

func (d *EntityQuery) GeUpdatedAt(v time.Time) *EntityQuery

func (*EntityQuery) GtAfterSaveDesc

func (d *EntityQuery) GtAfterSaveDesc(v string) *EntityQuery

func (*EntityQuery) GtBeforeSaveDesc

func (d *EntityQuery) GtBeforeSaveDesc(v string) *EntityQuery

func (*EntityQuery) GtBoolType

func (d *EntityQuery) GtBoolType(v bool) *EntityQuery

func (*EntityQuery) GtCreatedAt

func (d *EntityQuery) GtCreatedAt(v time.Time) *EntityQuery

func (*EntityQuery) GtCustomType

func (d *EntityQuery) GtCustomType(v types.RGB) *EntityQuery

func (*EntityQuery) GtDesc

func (d *EntityQuery) GtDesc(v string) *EntityQuery

func (*EntityQuery) GtDigit

func (d *EntityQuery) GtDigit(v int) *EntityQuery

func (*EntityQuery) GtFloatType

func (d *EntityQuery) GtFloatType(v float64) *EntityQuery

func (*EntityQuery) GtID

func (d *EntityQuery) GtID(v string) *EntityQuery

func (*EntityQuery) GtLocationLat

func (d *EntityQuery) GtLocationLat(v float64) *EntityQuery

func (*EntityQuery) GtLocationLng

func (d *EntityQuery) GtLocationLng(v float64) *EntityQuery

func (*EntityQuery) GtSliceType

func (d *EntityQuery) GtSliceType(v string) *EntityQuery

func (*EntityQuery) GtUpdatedAt

func (d *EntityQuery) GtUpdatedAt(v time.Time) *EntityQuery

func (*EntityQuery) LeAfterSaveDesc

func (d *EntityQuery) LeAfterSaveDesc(v string) *EntityQuery

func (*EntityQuery) LeBeforeSaveDesc

func (d *EntityQuery) LeBeforeSaveDesc(v string) *EntityQuery

func (*EntityQuery) LeBoolType

func (d *EntityQuery) LeBoolType(v bool) *EntityQuery

func (*EntityQuery) LeCreatedAt

func (d *EntityQuery) LeCreatedAt(v time.Time) *EntityQuery

func (*EntityQuery) LeCustomType

func (d *EntityQuery) LeCustomType(v types.RGB) *EntityQuery

func (*EntityQuery) LeDesc

func (d *EntityQuery) LeDesc(v string) *EntityQuery

func (*EntityQuery) LeDigit

func (d *EntityQuery) LeDigit(v int) *EntityQuery

func (*EntityQuery) LeFloatType

func (d *EntityQuery) LeFloatType(v float64) *EntityQuery

func (*EntityQuery) LeID

func (d *EntityQuery) LeID(v string) *EntityQuery

func (*EntityQuery) LeLocationLat

func (d *EntityQuery) LeLocationLat(v float64) *EntityQuery

func (*EntityQuery) LeLocationLng

func (d *EntityQuery) LeLocationLng(v float64) *EntityQuery

func (*EntityQuery) LeSliceType

func (d *EntityQuery) LeSliceType(v string) *EntityQuery

func (*EntityQuery) LeUpdatedAt

func (d *EntityQuery) LeUpdatedAt(v time.Time) *EntityQuery

func (*EntityQuery) Limit

func (q *EntityQuery) Limit(n int) *EntityQuery

func (*EntityQuery) LtAfterSaveDesc

func (d *EntityQuery) LtAfterSaveDesc(v string) *EntityQuery

func (*EntityQuery) LtBeforeSaveDesc

func (d *EntityQuery) LtBeforeSaveDesc(v string) *EntityQuery

func (*EntityQuery) LtBoolType

func (d *EntityQuery) LtBoolType(v bool) *EntityQuery

func (*EntityQuery) LtCreatedAt

func (d *EntityQuery) LtCreatedAt(v time.Time) *EntityQuery

func (*EntityQuery) LtCustomType

func (d *EntityQuery) LtCustomType(v types.RGB) *EntityQuery

func (*EntityQuery) LtDesc

func (d *EntityQuery) LtDesc(v string) *EntityQuery

func (*EntityQuery) LtDigit

func (d *EntityQuery) LtDigit(v int) *EntityQuery

func (*EntityQuery) LtFloatType

func (d *EntityQuery) LtFloatType(v float64) *EntityQuery

func (*EntityQuery) LtID

func (d *EntityQuery) LtID(v string) *EntityQuery

func (*EntityQuery) LtLocationLat

func (d *EntityQuery) LtLocationLat(v float64) *EntityQuery

func (*EntityQuery) LtLocationLng

func (d *EntityQuery) LtLocationLng(v float64) *EntityQuery

func (*EntityQuery) LtSliceType

func (d *EntityQuery) LtSliceType(v string) *EntityQuery

func (*EntityQuery) LtUpdatedAt

func (d *EntityQuery) LtUpdatedAt(v time.Time) *EntityQuery

func (*EntityQuery) NeAfterSaveDesc

func (d *EntityQuery) NeAfterSaveDesc(v string) *EntityQuery

func (*EntityQuery) NeBeforeSaveDesc

func (d *EntityQuery) NeBeforeSaveDesc(v string) *EntityQuery

func (*EntityQuery) NeBoolType

func (d *EntityQuery) NeBoolType(v bool) *EntityQuery

func (*EntityQuery) NeCreatedAt

func (d *EntityQuery) NeCreatedAt(v time.Time) *EntityQuery

func (*EntityQuery) NeCustomType

func (d *EntityQuery) NeCustomType(v types.RGB) *EntityQuery

func (*EntityQuery) NeDesc

func (d *EntityQuery) NeDesc(v string) *EntityQuery

func (*EntityQuery) NeDigit

func (d *EntityQuery) NeDigit(v int) *EntityQuery

func (*EntityQuery) NeFloatType

func (d *EntityQuery) NeFloatType(v float64) *EntityQuery

func (*EntityQuery) NeID

func (d *EntityQuery) NeID(v string) *EntityQuery

func (*EntityQuery) NeLocationLat

func (d *EntityQuery) NeLocationLat(v float64) *EntityQuery

func (*EntityQuery) NeLocationLng

func (d *EntityQuery) NeLocationLng(v float64) *EntityQuery

func (*EntityQuery) NeSliceType

func (d *EntityQuery) NeSliceType(v string) *EntityQuery

func (*EntityQuery) NeUpdatedAt

func (d *EntityQuery) NeUpdatedAt(v time.Time) *EntityQuery

func (*EntityQuery) Start

func (q *EntityQuery) Start(s string) *EntityQuery

func (*EntityQuery) ViaKeys

func (q *EntityQuery) ViaKeys() *EntityQuery

type EntityReplacer

type EntityReplacer interface {
	Replace(*Entity, *Entity) *Entity
}

type EntityReplacerFunc

type EntityReplacerFunc func(*Entity, *Entity) *Entity

func (EntityReplacerFunc) Replace

func (f EntityReplacerFunc) Replace(old *Entity, new *Entity) *Entity

Jump to

Keyboard shortcuts

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