Documentation ¶
Index ¶
- func HTTPErrorResponse(w http.ResponseWriter, err error)
- func HTTPResponse(w http.ResponseWriter, code int, response []byte)
- func Ping(w http.ResponseWriter, r *http.Request)
- type BidController
- type CreateBidRequest
- type CreateInvestorRequest
- type CreateInvoiceRequest
- type CreateIssuerRequest
- type ErrorDetails
- type InvestorController
- type InvoiceController
- func (c *InvoiceController) ApproveTrade(w http.ResponseWriter, r *http.Request)
- func (c *InvoiceController) CreateInvoice(w http.ResponseWriter, r *http.Request)
- func (c *InvoiceController) GetBids(w http.ResponseWriter, r *http.Request)
- func (c *InvoiceController) GetInvoice(w http.ResponseWriter, r *http.Request)
- func (c *InvoiceController) ListInvoices(w http.ResponseWriter, r *http.Request)
- type IssuerController
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func HTTPErrorResponse ¶
func HTTPErrorResponse(w http.ResponseWriter, err error)
func HTTPResponse ¶
func HTTPResponse(w http.ResponseWriter, code int, response []byte)
Types ¶
type BidController ¶
type BidController struct {
// contains filtered or unexported fields
}
func NewBidController ¶
func NewBidController(service bid.Service) *BidController
func (*BidController) CreateBid ¶
func (c *BidController) CreateBid(w http.ResponseWriter, r *http.Request)
func (*BidController) GetBid ¶
func (c *BidController) GetBid(w http.ResponseWriter, r *http.Request)
type CreateBidRequest ¶
type CreateInvestorRequest ¶
type CreateInvoiceRequest ¶
type CreateInvoiceRequest struct { InvoiceDate time.Time `json:"invoice_date"` InvoiceNumber string `json:"invoice_number"` Reference string `json:"reference"` CompanyName string `json:"company_name"` CustomerName string `json:"customer_name"` Currency string `json:"currency"` TotalAmount float64 `json:"total_amount"` TotalVat float64 `json:"total_vat"` DueDate time.Time `json:"due_date"` IssuerID uuid.UUID `json:"issuer_id"` AskingPrice float64 `json:"asking_price"` InvoiceItems []struct { Description string `json:"description"` // quantity might be better as a float Quantity int `json:"quantity"` UnitPrice float64 `json:"unit_price"` Amount float64 `json:"amount"` Vat float64 `json:"vat"` Total float64 `json:"total"` } `json:"items"` }
type CreateIssuerRequest ¶
type ErrorDetails ¶
type ErrorDetails struct { Status int `json:"status"` Description string `json:"description"` Field string `json:"field,omitempty"` }
func ToHTTPError ¶
func ToHTTPError(domainErr error) *ErrorDetails
type InvestorController ¶
type InvestorController struct {
// contains filtered or unexported fields
}
func NewInvestorController ¶
func NewInvestorController(service investor.Service) *InvestorController
func (*InvestorController) CreateInvestor ¶
func (c *InvestorController) CreateInvestor(w http.ResponseWriter, r *http.Request)
func (*InvestorController) GetInvestor ¶
func (c *InvestorController) GetInvestor(w http.ResponseWriter, r *http.Request)
func (*InvestorController) ListInvestors ¶
func (c *InvestorController) ListInvestors(w http.ResponseWriter, r *http.Request)
type InvoiceController ¶
type InvoiceController struct {
// contains filtered or unexported fields
}
func NewInvoiceController ¶
func NewInvoiceController( service invoice.Service, bidService bid.Service, ) *InvoiceController
func (*InvoiceController) ApproveTrade ¶
func (c *InvoiceController) ApproveTrade(w http.ResponseWriter, r *http.Request)
func (*InvoiceController) CreateInvoice ¶
func (c *InvoiceController) CreateInvoice(w http.ResponseWriter, r *http.Request)
func (*InvoiceController) GetBids ¶
func (c *InvoiceController) GetBids(w http.ResponseWriter, r *http.Request)
func (*InvoiceController) GetInvoice ¶
func (c *InvoiceController) GetInvoice(w http.ResponseWriter, r *http.Request)
func (*InvoiceController) ListInvoices ¶
func (c *InvoiceController) ListInvoices(w http.ResponseWriter, r *http.Request)
type IssuerController ¶
type IssuerController struct {
// contains filtered or unexported fields
}
func NewIssuerController ¶
func NewIssuerController(service issuer.Service) *IssuerController
func (*IssuerController) CreateIssuer ¶
func (c *IssuerController) CreateIssuer(w http.ResponseWriter, r *http.Request)
func (*IssuerController) GetIssuer ¶
func (c *IssuerController) GetIssuer(w http.ResponseWriter, r *http.Request)
func (*IssuerController) ListIssuer ¶
func (c *IssuerController) ListIssuer(w http.ResponseWriter, r *http.Request)
Click to show internal directories.
Click to hide internal directories.