repositories

package
v0.0.0-...-9d97ec1 Latest Latest
Warning

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

Go to latest
Published: Jul 25, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Auth

type Auth interface {
	Register(ctx context.Context, data entity.User) (models.AuthResponse, error)
	Login(ctx context.Context, data models.LoginReq) (models.AuthResponse, error)
	Refresh(ctx context.Context, uuid, token string) (models.AuthResponse, error)
	GetPasswordAndID(ctx context.Context, email string) (string, string, error)
}

type CarManagement

type CarManagement interface {
	AddCar(ctx context.Context, car entity.Car) error
	RemoveCar(ctx context.Context, carID string) error
	EditCar(ctx context.Context, data models.CarReq, carID string) error
}

type NotifierRepo

type NotifierRepo interface {
	GetFBToken(ctx context.Context, userID string) (string, error)
	SaveNotification(ctx context.Context, notification entity.Notification) error
}

type Rent

type Rent interface {
	StartRent(ctx context.Context, userID, carID string) error
	FinishRent(ctx context.Context, userID, rentID string) (entity.Bill, error)
	GetRentHistory(ctx context.Context, userID string) ([]entity.RentHistory, error)
	GetAvailableCars(ctx context.Context) ([]entity.Car, error)
}

type Repository

type Repository interface {
	Auth
	Rent
	User
	CarManagement
	NotifierRepo
}

type User

type User interface {
	AboutMe(ctx context.Context, userID string) (entity.UserInfo, error)
	GetProfile(ctx context.Context, userID string) (entity.UserProfile, error)
	GetNotifications(ctx context.Context, userID string) ([]entity.Notification, error)
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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