Skip to content

Releases: faroedev/faroe

v0.5.1

15 Sep 08:52
Compare
Choose a tag to compare

Overview

  • Removed user signed in notification when completing signup.

Pull requests

v0.5.0

09 Sep 23:37
Compare
Choose a tag to compare

Overview

  • Simplified storage.

New storage interface

Main storage, rate limit storage, and cache has been unified into a single storage. The mainStorage, rateLimitStorage, and cache parameters of NewSever() has been replaced by a single storage parameter. The MainStorageInterface, RateLimitStorage, and CacheInterface has been replaced by StorageInterface.

The new StorageInterface has a similar API to the previous MainStorageInterface, but with the errors replaced and the Set() method replaced by an Add() method.

type StorageInterface interface {
	Get(key string) ([]byte, int32, error)
	Add(key string, value []byte, expiresAt time.Time) error
	Update(key string, value []byte, expiresAt time.Time, counter int32) error
	Delete(key string) error
}

Note all existing data will be invalid.

Pull requests

v0.4.0

06 Sep 13:56
Compare
Choose a tag to compare

Overview

  • Using a user server is now optional.

New UserStoreInterface interface

NewServer() takes an UserStoreInterface. This gives you the option to handle user operations directly in the server instead of relying on a separate user server.

type UserStoreInterface interface {
	CreateUser(emailAddress string, passwordHash []byte, passwordHashAlgorithmId string, passwordSalt []byte) (UserStruct, error)
	GetUser(userId string) (UserStruct, error)
	GetUserByEmailAddress(emailAddress string) (UserStruct, error)
	UpdateUserEmailAddress(userId string, emailAddress string, userEmailAddressCounter int32) error
	UpdateUserPasswordHash(userId string, passwordHash []byte, passwordHashAlgorithmId string, passwordSalt []byte, userPasswordHashCounter int32) error
	IncrementUserSessionsCounter(userId string, userSessionsCounter int32) error
	DeleteUser(userId string) error
}

You can use NewUserServerClient() to continue using a user server.

// Implements UserStoreInterface.
userServerClient := faroe.NewUserServerClient()

All Changes

v0.3.0

05 Sep 06:19
Compare
Choose a tag to compare

Initial release!