mongo

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Sep 5, 2023 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

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.

func (*MongoRepository) Create

func (r *MongoRepository) Create(ctx context.Context, userID, sessionID uuid.UUID, p *user.Session) error

func (*MongoRepository) Delete

func (r *MongoRepository) Delete(ctx context.Context, userID, sessionID uuid.UUID) error

func (*MongoRepository) Get

func (t *MongoRepository) Get(ctx context.Context, userID, sessionID uuid.UUID) (*user.Session, error)

func (*MongoRepository) List

GetTokens fetches all tokens for a specific user.

func (*MongoRepository) Update

func (r *MongoRepository) Update(ctx context.Context, userID, sessionID uuid.UUID, p *user.Session) error

Update udates when tokens metadata

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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