mongo

package
v1.1.3 Latest Latest
Warning

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

Go to latest
Published: Sep 13, 2023 License: Apache-2.0 Imports: 12 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, serviceAccountID uuid.UUID, sa *service_account.ServiceAccount) error

func (*MongoRepository) Delete

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

func (*MongoRepository) Get

func (t *MongoRepository) Get(ctx context.Context, serviceAccountID uuid.UUID) (uuid.UUID, *service_account.ServiceAccount, error)

Get fetches a specific token from the database.

func (*MongoRepository) GetClientSecret

func (r *MongoRepository) GetClientSecret(ctx context.Context, serviceAccountID uuid.UUID) (*model.HashingInstance, error)

func (*MongoRepository) List

func (*MongoRepository) UpdateClientSecret

func (r *MongoRepository) UpdateClientSecret(ctx context.Context, credentialID uuid.UUID, pw *model.HashingInstance) error

UpdatePassword hashes and updates the password of a specific user.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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