repositories

package
v0.0.0-...-dabf9ce Latest Latest
Warning

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

Go to latest
Published: May 13, 2024 License: MIT Imports: 11 Imported by: 0

Documentation

Index

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

type CrudRepositoryData[T entities.Entity] struct {
	// contains filtered or unexported fields
}

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 (ShortcutRepositoryData) FindShortcuts

func (r ShortcutRepositoryData) FindShortcuts(userId string) ([]entities.Shortcut, error)

func (ShortcutRepositoryData) Save

func (ShortcutRepositoryData) SaveUrl

func (r ShortcutRepositoryData) SaveUrl(url string, userId string) (entities.Shortcut, error)

Jump to

Keyboard shortcuts

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