output

package
v0.0.21 Latest Latest
Warning

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

Go to latest
Published: Apr 7, 2025 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DomainPool = sync.Pool{New: func() any { return new(Domain) }}
View Source
var FightPool = sync.Pool{New: func() any { return new(Fight) }}
View Source
var HistoryPool = sync.Pool{New: func() any { return new(History) }}
View Source
var ItemPool = sync.Pool{New: func() any { return new(Item) }}
View Source
var PlayerPool = sync.Pool{New: func() any { return new(Player) }}
View Source
var ResetSliceUserDataFuncSlice = [...]func(unsafe.Pointer){
	0: func(pointer unsafe.Pointer) {
		(*Domain)(pointer).Reset()
	},
	1: func(pointer unsafe.Pointer) {
		(*Fight)(pointer).Reset()
	},
	2: func(pointer unsafe.Pointer) {
		(*History)(pointer).Reset()
	},
	3: func(pointer unsafe.Pointer) {
		(*Item)(pointer).Reset()
	},
	4: func(pointer unsafe.Pointer) {
		(*Player)(pointer).Reset()
	},
}
View Source
var ResetUserDataFuncSlice = [...]func(unsafe.Pointer){
	0: func(pointer unsafe.Pointer) {
		(*User)(pointer).Reset()
	},
}
View Source
var SaveUserDataFuncSlice = [...]func(*UserData, unsafe.Pointer){
	0: SwapUserDataUser,
}
View Source
var UserPool = sync.Pool{New: func() any { return new(User) }}

Functions

func DeleteUserDataDomain

func DeleteUserDataDomain(d *UserData, pointer unsafe.Pointer)

func DeleteUserDataFight

func DeleteUserDataFight(d *UserData, pointer unsafe.Pointer)

func DeleteUserDataHistory

func DeleteUserDataHistory(d *UserData, pointer unsafe.Pointer)

func DeleteUserDataItem

func DeleteUserDataItem(d *UserData, p unsafe.Pointer)

func DeleteUserDataPlayer

func DeleteUserDataPlayer(d *UserData, p unsafe.Pointer)

func SwapUserDataDomain

func SwapUserDataDomain(d *UserData, pointer unsafe.Pointer)

func SwapUserDataFight

func SwapUserDataFight(d *UserData, pointer unsafe.Pointer)

func SwapUserDataHistory

func SwapUserDataHistory(d *UserData, pointer unsafe.Pointer)

func SwapUserDataItem

func SwapUserDataItem(d *UserData, p unsafe.Pointer)

func SwapUserDataPlayer

func SwapUserDataPlayer(d *UserData, p unsafe.Pointer)

func SwapUserDataUser

func SwapUserDataUser(d *UserData, p unsafe.Pointer)

Types

type DBUserDataInterface

type DBUserDataInterface interface {
	SaveUser(isNew bool, d *User) error
	SaveDomain(isNew bool, d *Domain) error
	DeleteDomain(d *Domain) error
	SaveFight(isNew bool, d *Fight) error
	DeleteFight(d *Fight) error
	SaveHistory(isNew bool, d *History) error
	DeleteHistory(d *History) error
	SaveItem(isNew bool, d *Item) error
	DeleteItem(d *Item) error
	SavePlayer(isNew bool, d *Player) error
	DeletePlayer(d *Player) error
}

type Domain

type Domain struct {
	A bson.ObjectID `bson:"_id" key_id`
	B int
	C []string
}

func (*Domain) DeepCopy

func (in *Domain) DeepCopy() *Domain

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Domain.

func (*Domain) DeepCopyInto

func (in *Domain) DeepCopyInto(out *Domain)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*Domain) PK added in v0.0.9

func (v *Domain) PK() any

func (*Domain) Reset

func (in *Domain) Reset()

Reset puts the given value back into the pool.

func (*Domain) ResetNoSelf

func (in *Domain) ResetNoSelf()

ResetNoSelf puts the given field value back into the pool.

func (*Domain) ResetOnlySelf

func (in *Domain) ResetOnlySelf()

ResetOnlySelf puts the given value back into the pool.

func (*Domain) TableName added in v0.0.8

func (*Domain) TableName() string

type Fight

type Fight struct {
	A int64 `bson:"_id" key_id`
	B int
	C []string
}

func (*Fight) DeepCopy

func (in *Fight) DeepCopy() *Fight

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Fight.

func (*Fight) DeepCopyInto

func (in *Fight) DeepCopyInto(out *Fight)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*Fight) PK added in v0.0.9

func (v *Fight) PK() any

func (*Fight) Reset

func (in *Fight) Reset()

Reset puts the given value back into the pool.

func (*Fight) ResetNoSelf

func (in *Fight) ResetNoSelf()

ResetNoSelf puts the given field value back into the pool.

func (*Fight) ResetOnlySelf

func (in *Fight) ResetOnlySelf()

ResetOnlySelf puts the given value back into the pool.

func (*Fight) TableName added in v0.0.8

func (*Fight) TableName() string

type History

type History struct {
	A int `bson:"_id" key_id`
	B int64
	C string
}

func (*History) DeepCopy

func (in *History) DeepCopy() *History

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new History.

func (*History) DeepCopyInto

func (in *History) DeepCopyInto(out *History)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*History) PK added in v0.0.9

func (v *History) PK() any

func (*History) Reset

func (in *History) Reset()

Reset puts the given value back into the pool.

func (*History) ResetNoSelf

func (in *History) ResetNoSelf()

ResetNoSelf puts the given field value back into the pool.

func (*History) ResetOnlySelf

func (in *History) ResetOnlySelf()

ResetOnlySelf puts the given value back into the pool.

func (*History) TableName added in v0.0.8

func (*History) TableName() string

type Item

type Item struct {
	ID    int64 `bson:"_id" key_id`
	CID   int64
	Value int64
}

func (*Item) DeepCopy

func (in *Item) DeepCopy() *Item

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Item.

func (*Item) DeepCopyInto

func (in *Item) DeepCopyInto(out *Item)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*Item) PK added in v0.0.9

func (v *Item) PK() any

func (*Item) Reset

func (in *Item) Reset()

Reset puts the given value back into the pool.

func (*Item) ResetNoSelf

func (in *Item) ResetNoSelf()

ResetNoSelf puts the given field value back into the pool.

func (*Item) ResetOnlySelf

func (in *Item) ResetOnlySelf()

ResetOnlySelf puts the given value back into the pool.

func (*Item) TableName added in v0.0.8

func (*Item) TableName() string

type Player

type Player struct {
	PID  int64 `bson:"_id" key_id`
	User User
}

func (*Player) DeepCopy

func (in *Player) DeepCopy() *Player

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Player.

func (*Player) DeepCopyInto

func (in *Player) DeepCopyInto(out *Player)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*Player) PK added in v0.0.9

func (v *Player) PK() any

func (*Player) Reset

func (in *Player) Reset()

Reset puts the given value back into the pool.

func (*Player) ResetNoSelf

func (in *Player) ResetNoSelf()

ResetNoSelf puts the given field value back into the pool.

func (*Player) ResetOnlySelf

func (in *Player) ResetOnlySelf()

ResetOnlySelf puts the given value back into the pool.

func (*Player) TableName added in v0.0.8

func (*Player) TableName() string

type User

type User struct {
	ID   int `bson:"_id" key_id`
	Name string
	Age  int
}

func (*User) DeepCopy

func (in *User) DeepCopy() *User

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new User.

func (*User) DeepCopyInto

func (in *User) DeepCopyInto(out *User)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*User) PK added in v0.0.9

func (v *User) PK() any

func (*User) Reset

func (in *User) Reset()

Reset puts the given value back into the pool.

func (*User) ResetNoSelf

func (in *User) ResetNoSelf()

ResetNoSelf puts the given field value back into the pool.

func (*User) ResetOnlySelf

func (in *User) ResetOnlySelf()

ResetOnlySelf puts the given value back into the pool.

func (*User) TableName added in v0.0.8

func (*User) TableName() string

type UserData

type UserData struct {
	keepalive.KeepAlive
	// contains filtered or unexported fields
}

+k8s:deepcopy-gen=false

+game:keepalive-gen=true

func (*UserData) ClearKeepalive

func (d *UserData) ClearKeepalive()

func (*UserData) Commit

func (d *UserData) Commit()

func (*UserData) DeleteDomain

func (d *UserData) DeleteDomain(id bson.ObjectID)

func (*UserData) DeleteFight

func (d *UserData) DeleteFight(id int64)

func (*UserData) DeleteHistory

func (d *UserData) DeleteHistory(id int)

func (*UserData) DeleteItem

func (d *UserData) DeleteItem(id int64)

func (*UserData) DeletePlayer

func (d *UserData) DeletePlayer(id int64)

func (*UserData) DoDB

func (d *UserData) DoDB(dbFace DBUserDataInterface) error

func (*UserData) DomainKAIndex

func (d *UserData) DomainKAIndex() int64

func (*UserData) FightKAIndex

func (d *UserData) FightKAIndex() int64

func (*UserData) GetDomain

func (d *UserData) GetDomain(id bson.ObjectID) (*Domain, bool)

func (*UserData) GetFight

func (d *UserData) GetFight(id int64) (*Fight, bool)

func (*UserData) GetHistory

func (d *UserData) GetHistory(id int) (History, bool)

func (*UserData) GetItem

func (d *UserData) GetItem(id int64) (Item, bool)

func (*UserData) GetPlayer

func (d *UserData) GetPlayer(id int64) (*Player, bool)

func (*UserData) GetUser

func (d *UserData) GetUser() *User

func (*UserData) GetUserReadOnly

func (d *UserData) GetUserReadOnly() *User

func (*UserData) HistoryKAIndex

func (d *UserData) HistoryKAIndex() int64

func (*UserData) Init

func (d *UserData) Init()

func (*UserData) ItemKAIndex

func (d *UserData) ItemKAIndex() int64

func (*UserData) LenDomain

func (d *UserData) LenDomain() int

func (*UserData) LenFight

func (d *UserData) LenFight() int

func (*UserData) LenHistory

func (d *UserData) LenHistory() int

func (*UserData) LenItem

func (d *UserData) LenItem() int

func (*UserData) LenPlayer

func (d *UserData) LenPlayer() int

func (*UserData) PlayerKAIndex

func (d *UserData) PlayerKAIndex() int64

func (*UserData) RangeDomains

func (d *UserData) RangeDomains(f func(v *Domain) bool)

func (*UserData) RangeFights

func (d *UserData) RangeFights(f func(v *Fight) bool)

func (*UserData) RangeHistorys

func (d *UserData) RangeHistorys(f func(v *History) bool)

func (*UserData) RangeItems

func (d *UserData) RangeItems(f func(k int64, v Item) bool)

func (*UserData) RangePlayers

func (d *UserData) RangePlayers(f func(k int64, v *Player) bool)

func (*UserData) Rollback

func (d *UserData) Rollback()

func (*UserData) SaveDomain

func (d *UserData) SaveDomain(save *Domain)

func (*UserData) SaveFight

func (d *UserData) SaveFight(save *Fight)

func (*UserData) SaveHistory

func (d *UserData) SaveHistory(save History)

func (*UserData) SaveItem

func (d *UserData) SaveItem(v Item)

func (*UserData) SavePlayer

func (d *UserData) SavePlayer(v *Player)

func (*UserData) SaveUser

func (d *UserData) SaveUser()

func (*UserData) UserKAIndex

func (d *UserData) UserKAIndex() int64

Jump to

Keyboard shortcuts

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