Documentation ¶
Index ¶
- type AuthRepositoryData
- func (r AuthRepositoryData) CurrentUser(authorization string) (entities.User, error)
- func (r AuthRepositoryData) Login(username string, password string) (string, error)
- func (r AuthRepositoryData) SignUp(username string, password string) (string, error)
- func (r AuthRepositoryData) ValidateAuthorization(authorization string) (*models.JWTClaim, error)
- type CrudRepositoryData
- type ShortcutRepositoryData
- func (r ShortcutRepositoryData) Delete(id string) bool
- func (r ShortcutRepositoryData) DeleteShortcut(id string, userId string) bool
- func (r ShortcutRepositoryData) FindAll() ([]entities.Shortcut, error)
- func (r ShortcutRepositoryData) FindById(id string) (entities.Shortcut, bool)
- func (r ShortcutRepositoryData) FindShortcuts(userId string) ([]entities.Shortcut, error)
- func (r ShortcutRepositoryData) Save(entity entities.Shortcut) (entities.Shortcut, error)
- func (r ShortcutRepositoryData) SaveUrl(url string, userId string) (entities.Shortcut, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AuthRepositoryData ¶
type AuthRepositoryData struct {
// contains filtered or unexported fields
}
func NewAuthRepositoryData ¶
func NewAuthRepositoryData( environment *datasources.Environment, userMongoDB *datasources.UserMongoDB, ) *AuthRepositoryData
func (AuthRepositoryData) CurrentUser ¶
func (r AuthRepositoryData) CurrentUser(authorization string) (entities.User, error)
func (AuthRepositoryData) Login ¶
func (r AuthRepositoryData) Login(username string, password string) (string, error)
func (AuthRepositoryData) SignUp ¶
func (r AuthRepositoryData) SignUp(username string, password string) (string, error)
func (AuthRepositoryData) ValidateAuthorization ¶
func (r AuthRepositoryData) ValidateAuthorization(authorization string) (*models.JWTClaim, error)
type CrudRepositoryData ¶
func NewCrudRepositoryData ¶
func NewCrudRepositoryData[T entities.Entity](memdb *datasources.MemDB[T]) *CrudRepositoryData[T]
func (CrudRepositoryData[T]) Delete ¶
func (r CrudRepositoryData[T]) Delete(id string) bool
func (CrudRepositoryData[T]) FindAll ¶
func (r CrudRepositoryData[T]) FindAll() []T
func (CrudRepositoryData[T]) FindById ¶
func (r CrudRepositoryData[T]) FindById(id string) (T, bool)
func (CrudRepositoryData[T]) Save ¶
func (r CrudRepositoryData[T]) Save(entity T) (T, error)
type ShortcutRepositoryData ¶
type ShortcutRepositoryData struct {
// contains filtered or unexported fields
}
func NewShortcutRepositoryData ¶
func NewShortcutRepositoryData( shortcutMongoDB *datasources.ShortcutMongoDB, shortcutRedis *datasources.ShortcutRedis, ) *ShortcutRepositoryData
func (ShortcutRepositoryData) Delete ¶
func (r ShortcutRepositoryData) Delete(id string) bool
func (ShortcutRepositoryData) DeleteShortcut ¶
func (r ShortcutRepositoryData) DeleteShortcut(id string, userId string) bool
func (ShortcutRepositoryData) FindAll ¶
func (r ShortcutRepositoryData) FindAll() ([]entities.Shortcut, error)
func (ShortcutRepositoryData) FindById ¶
func (r ShortcutRepositoryData) FindById(id string) (entities.Shortcut, bool)
func (ShortcutRepositoryData) FindShortcuts ¶
func (r ShortcutRepositoryData) FindShortcuts(userId string) ([]entities.Shortcut, error)
Click to show internal directories.
Click to hide internal directories.