2023-11-05 13:58:41 +00:00
|
|
|
package swagger
|
|
|
|
|
|
|
|
import (
|
|
|
|
"github.com/labstack/echo/v4"
|
|
|
|
"go.mongodb.org/mongo-driver/mongo"
|
|
|
|
"go.uber.org/zap"
|
|
|
|
"penahub.gitlab.yandexcloud.net/pena-services/customer/internal/interface/repository"
|
|
|
|
)
|
|
|
|
|
|
|
|
type API2 struct {
|
2023-11-06 07:27:06 +00:00
|
|
|
logger *zap.Logger
|
|
|
|
history repository.HistoryRepository
|
|
|
|
account repository.AccountRepository
|
|
|
|
currency repository.CurrencyRepository
|
|
|
|
// cart repository.CartRepository
|
|
|
|
// wallet repository.WalletRepository
|
2023-11-05 13:58:41 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
var _ ServerInterface = (*API2)(nil)
|
|
|
|
|
|
|
|
func NewAPI2(logger *zap.Logger, db *mongo.Database) API2 {
|
|
|
|
return API2{
|
2023-11-06 07:27:06 +00:00
|
|
|
logger: logger,
|
|
|
|
history: repository.NewHistoryRepository2(logger, db.Collection("histories")),
|
|
|
|
currency: repository.NewCurrencyRepository2(logger, db.Collection("currency_lists")),
|
|
|
|
account: repository.NewAccountRepository2(logger, db.Collection("accounts")),
|
2023-11-05 13:58:41 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
func (api *API2) DeleteAccount(ctx echo.Context) error {
|
|
|
|
panic("TODO")
|
|
|
|
}
|
|
|
|
|
|
|
|
func (api *API2) GetAccount(ctx echo.Context) error {
|
|
|
|
panic("TODO")
|
|
|
|
}
|
|
|
|
|
|
|
|
func (api *API2) ChangeAccount(ctx echo.Context) error {
|
|
|
|
panic("TODO")
|
|
|
|
}
|
|
|
|
|
|
|
|
func (api *API2) AddAccount(ctx echo.Context) error {
|
|
|
|
panic("TODO")
|
|
|
|
}
|
|
|
|
|
|
|
|
func (api *API2) DeleteDirectAccount(ctx echo.Context, userId string) error {
|
|
|
|
panic("TODO")
|
|
|
|
}
|
|
|
|
|
|
|
|
func (api *API2) GetDirectAccount(ctx echo.Context, userId string) error {
|
|
|
|
panic("TODO")
|
|
|
|
}
|
|
|
|
|
|
|
|
func (api *API2) SetAccountVerificationStatus(ctx echo.Context, userId string) error {
|
|
|
|
panic("TODO")
|
|
|
|
}
|
|
|
|
|
|
|
|
func (api *API2) PaginationAccounts(ctx echo.Context, params PaginationAccountsParams) error {
|
|
|
|
panic("TODO")
|
|
|
|
}
|
|
|
|
|
|
|
|
func (api *API2) RemoveFromCart(ctx echo.Context, params RemoveFromCartParams) error {
|
|
|
|
panic("TODO")
|
|
|
|
}
|
|
|
|
|
|
|
|
func (api *API2) Add2cart(ctx echo.Context, params Add2cartParams) error {
|
|
|
|
panic("TODO")
|
|
|
|
}
|
|
|
|
|
|
|
|
func (api *API2) PayCart(ctx echo.Context) error {
|
|
|
|
panic("TODO")
|
|
|
|
}
|
|
|
|
|
|
|
|
func (api *API2) GetCurrencies(ctx echo.Context) error {
|
|
|
|
panic("TODO")
|
|
|
|
}
|
|
|
|
|
|
|
|
func (api *API2) UpdateCurrencies(ctx echo.Context) error {
|
|
|
|
panic("TODO")
|
|
|
|
}
|
|
|
|
|
|
|
|
func (api *API2) GetHistory(ctx echo.Context, params GetHistoryParams) error {
|
|
|
|
panic("TODO")
|
|
|
|
}
|
|
|
|
|
|
|
|
func (api *API2) ChangeCurrency(ctx echo.Context) error {
|
|
|
|
panic("TODO")
|
|
|
|
}
|
|
|
|
|
|
|
|
func (api *API2) RequestMoney(ctx echo.Context) error {
|
|
|
|
panic("TODO")
|
|
|
|
}
|