Documentation ¶
Index ¶
- type AuctionInputDTO
- type AuctionOutputDTO
- type AuctionStatus
- type AuctionUseCase
- func (au *AuctionUseCase) CreateAuction(ctx context.Context, auctionInput AuctionInputDTO) (*AuctionOutputDTO, *internal_error.InternalError)
- func (au *AuctionUseCase) FindAuctionById(ctx context.Context, id string) (*AuctionOutputDTO, *internal_error.InternalError)
- func (au *AuctionUseCase) FindAuctions(ctx context.Context, status AuctionStatus, category, productName string) ([]AuctionOutputDTO, *internal_error.InternalError)
- func (au *AuctionUseCase) FindWinningBidByAuctionId(ctx context.Context, auctionId string) (*WinningInfoOutputDTO, *internal_error.InternalError)
- type AuctionUseCaseInterface
- type ProductCondition
- type WinningInfoOutputDTO
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AuctionInputDTO ¶
type AuctionInputDTO struct { ProductName string `json:"product_name" binding:"required,min=1"` Category string `json:"category" binding:"required,min=2"` Description string `json:"description" binding:"required,min=10,max=200"` Condition ProductCondition `json:"condition" binding:"oneof=0 1 2"` }
type AuctionOutputDTO ¶
type AuctionOutputDTO struct { Id string `json:"id"` ProductName string `json:"product_name"` Category string `json:"category"` Description string `json:"description"` Condition ProductCondition `json:"condition"` Status AuctionStatus `json:"status"` Timestamp time.Time `json:"timestamp" time_format:"2006-01-02 15:04:05"` }
type AuctionStatus ¶
type AuctionStatus int64
type AuctionUseCase ¶
type AuctionUseCase struct {
// contains filtered or unexported fields
}
func (*AuctionUseCase) CreateAuction ¶
func (au *AuctionUseCase) CreateAuction( ctx context.Context, auctionInput AuctionInputDTO) (*AuctionOutputDTO, *internal_error.InternalError)
func (*AuctionUseCase) FindAuctionById ¶
func (au *AuctionUseCase) FindAuctionById( ctx context.Context, id string) (*AuctionOutputDTO, *internal_error.InternalError)
func (*AuctionUseCase) FindAuctions ¶
func (au *AuctionUseCase) FindAuctions( ctx context.Context, status AuctionStatus, category, productName string) ([]AuctionOutputDTO, *internal_error.InternalError)
func (*AuctionUseCase) FindWinningBidByAuctionId ¶
func (au *AuctionUseCase) FindWinningBidByAuctionId( ctx context.Context, auctionId string) (*WinningInfoOutputDTO, *internal_error.InternalError)
type AuctionUseCaseInterface ¶
type AuctionUseCaseInterface interface { CreateAuction( ctx context.Context, auctionInput AuctionInputDTO) (*AuctionOutputDTO, *internal_error.InternalError) FindAuctionById( ctx context.Context, id string) (*AuctionOutputDTO, *internal_error.InternalError) FindAuctions( ctx context.Context, status AuctionStatus, category, productName string) ([]AuctionOutputDTO, *internal_error.InternalError) FindWinningBidByAuctionId( ctx context.Context, auctionId string) (*WinningInfoOutputDTO, *internal_error.InternalError) }
func NewAuctionUseCase ¶
func NewAuctionUseCase( auctionRepository auction_entity.AuctionRepositoryInterface, bidRepository bid_entity.BidRepositoryInterface) AuctionUseCaseInterface
type ProductCondition ¶
type ProductCondition int64
type WinningInfoOutputDTO ¶
type WinningInfoOutputDTO struct { Auction AuctionOutputDTO `json:"auction"` Bid *bid_usecase.BidOutputDTO `json:"bid,omitempty"` }
Click to show internal directories.
Click to hide internal directories.