model

package
v0.0.0-...-1c05b05 Latest Latest
Warning

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

Go to latest
Published: Dec 16, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewKnapsackKey

func NewKnapsackKey(id string) (key.Key, error)

Types

type Dao

type Dao struct {
	nosql.DocumentBase `bson:"-"`
	Data               *pb.Knapsack `bson:"data"`
	// contains filtered or unexported fields
}

func (*Dao) AddFeatures

func (d *Dao) AddFeatures(features map[int32]bool)

func (*Dao) AddItems

func (d *Dao) AddItems(items map[int64]*pb.Item)

func (*Dao) GetAndDeleteChanges

func (d *Dao) GetAndDeleteChanges(incrItems, decrItems map[int64]*pb.Item, source string) *pb.KnapsackModify

func (*Dao) GetUid

func (d *Dao) GetUid() string

func (*Dao) Init

func (d *Dao) Init(id string, doc diface.ICollection, cache diface.ICache) error

func (*Dao) InitDefault

func (d *Dao) InitDefault(uid string) error

func (*Dao) RemoveItems

func (d *Dao) RemoveItems(items map[int64]*pb.Item) error

func (*Dao) ToProto

func (d *Dao) ToProto() *pb.Knapsack

Jump to

Keyboard shortcuts

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