peer

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 Peer

type Peer struct {
	ID         primitive.ObjectID `bson:"_id,omitempty"`
	ChildBotID primitive.ObjectID `bson:"cbi,omitempty"`
	TgUserID   int64              `bson:"tui,omitempty"`
	TgChatID   int64              `bson:"tci,omitempty"`
	Muted      bool               `bson:"m,omitempty"`
}

type Repo

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

func NewRepo

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

func (*Repo) Create

func (r *Repo) Create(c context.Context, childBotID primitive.ObjectID, tgUserID, tgChatID int64) error

func (*Repo) CreateMuted

func (r *Repo) CreateMuted(c context.Context, childBotID primitive.ObjectID, tgUserID, tgChatID int64) error

func (*Repo) CreateUnMuted added in v1.0.17

func (r *Repo) CreateUnMuted(c context.Context, childBotID primitive.ObjectID, tgUserID, tgChatID int64) error

func (*Repo) DeleteByChildBotID added in v1.0.5

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

func (*Repo) Get added in v1.0.11

func (r *Repo) Get(c context.Context, childBotID primitive.ObjectID, tgUserID int64) (Peer, bool, error)

Jump to

Keyboard shortcuts

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