Documentation
¶
Index ¶
- type MongoRepository
- func (r *MongoRepository) BuildIndexes(ctx context.Context) error
- func (r *MongoRepository) Create(ctx context.Context, serviceAccountID uuid.UUID, ...) error
- func (r *MongoRepository) Delete(ctx context.Context, serviceAccountID uuid.UUID) error
- func (t *MongoRepository) Get(ctx context.Context, serviceAccountID uuid.UUID) (uuid.UUID, *service_account.ServiceAccount, error)
- func (r *MongoRepository) GetClientSecret(ctx context.Context, serviceAccountID uuid.UUID) (*model.HashingInstance, error)
- func (t *MongoRepository) List(ctx context.Context) (iterator.Iterator[*service_account.Entry], error)
- func (r *MongoRepository) UpdateClientSecret(ctx context.Context, credentialID uuid.UUID, pw *model.HashingInstance) 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.
func (*MongoRepository) Create ¶
func (r *MongoRepository) Create(ctx context.Context, serviceAccountID uuid.UUID, sa *service_account.ServiceAccount) 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 (t *MongoRepository) List(ctx context.Context) (iterator.Iterator[*service_account.Entry], error)
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.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.