core

package module
v0.0.0-...-2b24328 Latest Latest
Warning

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

Go to latest
Published: Apr 6, 2024 License: MIT Imports: 7 Imported by: 0

README

LumePetal

LumePetal is a core component of a web application designed for use in personal projects, allowing you to efficiently create user-based applications using MongoDB. The goals of this project are as follows

  • Reduce development effort by standardizing the basic code.
  • Improve security by hiding sensitive information such as TOTP secrets and tokens from higher level components.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidUserId             = errors.New("invalid user id")
	ErrCouldNotCloseDbConnection = errors.New("could not close db connection")
)

Functions

This section is empty.

Types

type StoreKey

type StoreKey string
const (
	UserIdKey           StoreKey = "id"
	UserDisplayNameKey  StoreKey = "displayName"
	UserPasswordHashKey StoreKey = "passwordHash"
	UserStorageKey      StoreKey = "storage"
)

type UserData

type UserData struct {
	Id          string `bson:"-"`
	DisplayName string

	AllowPasswordLessLogin bool
	Storage                []interface{}
	// contains filtered or unexported fields
}

type UserService

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

func InitUserService

func InitUserService(dbUri string, userId string) (*UserService, error)

func (*UserService) GetUser

func (us *UserService) GetUser() UserData

Jump to

Keyboard shortcuts

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