Documentation ¶ Index ¶ type Repo func NewRepo(ctx context.Context, db *mongo.Database) (*Repo, error) func (r *Repo) GetScene(c context.Context, userID primitive.ObjectID) (Scene, error) func (r *Repo) SetScene(c context.Context, userID primitive.ObjectID, sc Scene) error type Scene type State 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) GetScene ¶ func (r *Repo) GetScene(c context.Context, userID primitive.ObjectID) (Scene, error) func (*Repo) SetScene ¶ func (r *Repo) SetScene(c context.Context, userID primitive.ObjectID, sc Scene) error type Scene ¶ type Scene uint32 const ( None Scene = 1 CreateBot Scene = 2 DeleteBot Scene = 3 ) type State ¶ type State struct { ID primitive.ObjectID `bson:"_id,omitempty"` UserID primitive.ObjectID `bson:"ui,omitempty"` Scene Scene `bson:"s,omitempty"` } Source Files ¶ View all Source files repo.go Click to show internal directories. Click to hide internal directories.