package
0.0.0-20240625175532-5e162f928670
Repository: https://github.com/vasnake/golang-web_services-mrg_course.git
Documentation: pkg.go.dev

# Functions

No description provided by the author
No description provided by the author
use cookie value to get session from DB, if no cookie or no DB record => error.
create new session for user.
drop session from DB and from cooklie.
redirect to login or user page, according to session value in context (set by middleware).
render list of loaded files.
проблема - генерируем превью сразу же.
No description provided by the author
token service factory.
storage factory.
save secret in object.
token service factory.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
compile one time, on app start.
No description provided by the author
Argon2 is the winner of the password hashing competition and should be considered as your first choice for new applications;.
bcrypt where PBKDF2 or scrypt support is not available.
md5 - плохой вариант, подвержен брутфорс-атаке.
PBKDF2 when FIPS certification or enterprise support on many platforms is required;.
scrypt where resisting any/all hardware accelerated attacks is necessary but support isn’t.
file name generator util.
No description provided by the author
проблема - каждый раз вычитываем файл и парсим jpeg.
не очень эффективно - каждый раз вычитываем файл.
save to storage, return name aka md5sum; problem: only jpg, w/o checking.
No description provided by the author
get session or error from context.
No description provided by the author
put file to storage, create preview, append to list.

# Variables

No description provided by the author
No description provided by the author

# Structs

token service, way to pass a secret.
some key, salt.
token data.
token service.
No description provided by the author
No description provided by the author
No description provided by the author
web-server data, with ref.
service data.
No description provided by the author
No description provided by the author
only user id, no session id.
user version used for session check.
No description provided by the author
No description provided by the author
use DB for user profile.
No description provided by the author
attempt to abstract storage.
token structure.
No description provided by the author
No description provided by the author
No description provided by the author

# Interfaces

No description provided by the author
storage interface for using in tests.