users

package
v0.4.19 Latest Latest
Warning

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

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

Documentation

Overview

Package users provides the user related business logic.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func From added in v0.2.18

func From(ctx context.Context) *types.User

From returns the user from the context.

func GetUserByID added in v0.4.13

func GetUserByID(
	ctx context.Context,
	be *backend.Backend,
	id types.ID,
) (*types.User, error)

GetUserByID returns a user by ID.

func GetUserByName added in v0.4.14

func GetUserByName(
	ctx context.Context,
	be *backend.Backend,
	username string,
) (*types.User, error)

GetUserByName returns a user by the given username.

func IsCorrectPassword

func IsCorrectPassword(
	ctx context.Context,
	be *backend.Backend,
	username,
	password string,
) (*types.User, error)

IsCorrectPassword checks if the password is correct.

func SignUp

func SignUp(
	ctx context.Context,
	be *backend.Backend,
	username,
	password string,
) (*types.User, error)

SignUp signs up a new user.

func With added in v0.2.18

func With(ctx context.Context, user *types.User) context.Context

With returns a new context with the given user.

Types

This section is empty.

Jump to

Keyboard shortcuts

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