Documentation ¶
Index ¶
- type MongoRepository
- func (r *MongoRepository) BuildIndexes(ctx context.Context) error
- func (r *MongoRepository) Create(ctx context.Context, userID, sessionID uuid.UUID, p *user.Session) error
- func (r *MongoRepository) Delete(ctx context.Context, userID, sessionID uuid.UUID) error
- func (t *MongoRepository) Get(ctx context.Context, userID, sessionID uuid.UUID) (*user.Session, error)
- func (r *MongoRepository) List(ctx context.Context, userID uuid.UUID) (iterator.Iterator[*user.SessionEntry], error)
- func (r *MongoRepository) Update(ctx context.Context, userID, sessionID uuid.UUID, p *user.Session) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MongoRepository ¶
type MongoRepository struct {
Collection *mongo.Collection
}
func NewRepository ¶
func NewRepository(c *mongo.Client) (*MongoRepository, error)
func (*MongoRepository) BuildIndexes ¶
func (r *MongoRepository) BuildIndexes(ctx context.Context) error
BuildIndexes builds the indexes for the Mongo Object.
Click to show internal directories.
Click to hide internal directories.