child_state

package
v1.0.19 Latest Latest
Warning

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

Go to latest
Published: Nov 6, 2023 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Repo

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

func NewRepo

func NewRepo(ctx context.Context, db *mongo.Database) (*Repo, error)

func (*Repo) Delete added in v1.0.16

func (r *Repo) Delete(c context.Context, userID, childBotID primitive.ObjectID) error

func (*Repo) GetScene

func (r *Repo) GetScene(c context.Context, userID, childBotID primitive.ObjectID) (Scene, error)

func (*Repo) SetScene

func (r *Repo) SetScene(c context.Context, userID, childBotID primitive.ObjectID, sc Scene) error

type Scene

type Scene uint32
const (
	None        Scene = 1
	SetStart    Scene = 2
	SetKeywords Scene = 3
)

type State

type State struct {
	ID         primitive.ObjectID `bson:"_id,omitempty"`
	UserID     primitive.ObjectID `bson:"ui,omitempty"`
	ChildBotID primitive.ObjectID `bson:"cbi,omitempty"`
	Scene      Scene              `bson:"s,omitempty"`
}

Jump to

Keyboard shortcuts

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