Documentation
¶
Index ¶
- Variables
- func GenRandomBytes(size int) (blk []byte, err error)
- func HashPassword(password string) (string, error)
- func InStringArray(val string, array []string) (ok bool)
- func IsCollectionExists(ctx context.Context, db *mongo.Database, collectionName string) (bool, error)
- func PrepareErrorMessage(msg models.BaseMessage, errorType string, errorText string, serverID string) models.BaseMessage
- func PrepareMessageInternalServerError(msg models.BaseMessage, err error, serverID string) models.BaseMessage
- func PrepareMessageUnauthorized(msg models.BaseMessage, serverDomain string) models.BaseMessage
- func ValidatePassword(password string) error
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrPasswordIsEmpty = fmt.Errorf("the password is empty") ErrPasswordIsTooShort = fmt.Errorf("the password is too short") )
Functions ¶
func GenRandomBytes ¶
func HashPassword ¶
func InStringArray ¶
func IsCollectionExists ¶
func PrepareErrorMessage ¶
func PrepareErrorMessage(msg models.BaseMessage, errorType string, errorText string, serverID string) models.BaseMessage
func PrepareMessageInternalServerError ¶
func PrepareMessageInternalServerError(msg models.BaseMessage, err error, serverID string) models.BaseMessage
func PrepareMessageUnauthorized ¶
func PrepareMessageUnauthorized(msg models.BaseMessage, serverDomain string) models.BaseMessage
func ValidatePassword ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.