mongo

package
v0.0.0-...-a6f3d4c Latest Latest
Warning

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

Go to latest
Published: Dec 16, 2024 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Mongo

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

func Make

func Make(ctx context.Context, user, pass, host, port, dbName string, logger logging.Logger, tracer trace.Tracer) (Mongo, error)

func (Mongo) Close

func (db Mongo) Close() error

func (Mongo) Create

func (db Mongo) Create(ctx context.Context, token entity.Token) error

func (Mongo) Delete

func (db Mongo) Delete(ctx context.Context, id string) error

func (Mongo) EventHandlers

func (db Mongo) EventHandlers() map[event.EventType][]event.Handler

func (Mongo) Get

func (db Mongo) Get(ctx context.Context, opaqueToken string) (entity.Token, error)

func (Mongo) GetMultiple

func (db Mongo) GetMultiple(ctx context.Context, query filter.Filter) ([]entity.Token, error)

func (Mongo) SignOutUsersOnDeletion

func (db Mongo) SignOutUsersOnDeletion() event.Handler

SignOutUsersOnDeletion deletes all, both access and refresh tokens created for the deleted user.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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