Documentation ¶ Index ¶ type Repo func NewRepo(ctx context.Context, db *mongo.Database) (*Repo, error) func (r *Repo) Create(c context.Context, tgUserID, tgChatID int64) (User, error) func (r *Repo) GetByID(c context.Context, id primitive.ObjectID) (User, error) type User 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) Create ¶ func (r *Repo) Create(c context.Context, tgUserID, tgChatID int64) (User, error) func (*Repo) GetByID ¶ func (r *Repo) GetByID(c context.Context, id primitive.ObjectID) (User, error) type User ¶ type User struct { ID primitive.ObjectID `bson:"_id,omitempty"` TgUserID int64 `bson:"tui,omitempty"` TgChatID int64 `bson:"tci,omitempty"` } Source Files ¶ View all Source files repo.go Click to show internal directories. Click to hide internal directories.