users

package
v1.24.0 Latest Latest
Warning

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

Go to latest
Published: Aug 28, 2024 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Overview

Package users provides helper function for user operations.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateUser

func CreateUser(ctx context.Context, b backends.Backend, params *CreateUserParams) error

CreateUser stores a new user in the given backend.

func MakeCredentials

func MakeCredentials(username string, userPassword password.Password, mechanisms *types.Array) (*types.Document, error)

MakeCredentials creates a document with credentials for the chosen mechanisms. The mechanisms array must be validated by the caller.

Types

type CreateUserParams

type CreateUserParams struct {
	Database   string
	Username   string
	Password   password.Password
	Mechanisms *types.Array
}

CreateUserParams represents the parameters of CreateUser function.

Jump to

Keyboard shortcuts

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