request

package
v0.0.0-...-19dc864 Latest Latest
Warning

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

Go to latest
Published: Nov 17, 2025 License: GPL-3.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CreateUser

type CreateUser struct {
	Email    string `json:"email"     validate:"required,email" example:"user@example.com"`
	Username string `json:"username"  validate:"required,min=3"  example:"johndoe"`
	Password string `json:"password"  validate:"required,min=6"  example:"password123"`
}

CreateUser represents create user request

type GenerateInvoicePDFRequest

type GenerateInvoicePDFRequest struct {
	Number      string        `json:"number"`
	Date        string        `json:"date"`
	BilledTo    []string      `json:"billed_to"`
	CompanyInfo []string      `json:"company_info"`
	Items       []InvoiceItem `json:"items"`
	Subtotal    string        `json:"subtotal"`
	Discount    string        `json:"discount"`
	TaxRate     string        `json:"tax_rate"`
	Tax         string        `json:"tax"`
	Total       string        `json:"total"`
	Terms       string        `json:"terms"`
	BankDetails []string      `json:"bank_details"`
}

type GenerateQR

type GenerateQR struct {
	AccountNo    string `json:"accountNo" binding:"required"`
	Amount       string `json:"amount" binding:"required"`
	Description  string `json:"description"`
	MCC          string `json:"mcc"`
	ReceiverName string `json:"receiverName"`
}

GenerateQR represents the request body for generating a VietQR code.

type InvoiceItem

type InvoiceItem struct {
	Description string `json:"description"`
	UnitCost    string `json:"unit_cost"`
	Qty         string `json:"qty"`
	Amount      string `json:"amount"`
}

type KafkaMessage

type KafkaMessage struct {
	Topic string      `json:"topic" binding:"required"`
	Key   string      `json:"key"`
	Value interface{} `json:"value" binding:"required"`
}

KafkaMessage represents a message to be sent to Kafka.

type LoginUser

type LoginUser struct {
	Email    string `json:"email"     validate:"required,email" example:"user@example.com"`
	Password string `json:"password"  validate:"required,min=6"  example:"password123"`
}

LoginUser represents login user request

type NatsPublishRequest

type NatsPublishRequest struct {
	Data string `json:"data"`
}

NatsPublishRequest represents the request body for NATS publish.

type PaymentRequest

type PaymentRequest struct {
	UserID        int64   `json:"user_id" binding:"required" example:"1"`
	Amount        float64 `json:"amount" binding:"required" example:"500000"`
	Currency      string  `json:"currency" binding:"required" example:"VND"`
	PaymentType   string  `json:"payment_type" binding:"required" example:"electric"`
	MeterNumber   string  `json:"meter_number" binding:"required" example:"EVN001234567"`
	CustomerCode  string  `json:"customer_code" binding:"required" example:"CUST001"`
	Description   string  `json:"description" example:"Thanh toán tiền điện tháng 12/2024"`
	PaymentMethod string  `json:"payment_method" binding:"required" example:"bank_transfer"`
}

PaymentRequest represents payment request @Description Payment request for electric bill

type RedisValue

type RedisValue struct {
	Key   string `json:"key" binding:"required"`
	Value string `json:"value" binding:"required"`
}

RedisValue represents a key-value pair for Redis.

type ShipperLocation

type ShipperLocation struct {
	ShipperID string    `json:"shipper_id" binding:"required"`
	Latitude  float64   `json:"latitude" binding:"required"`
	Longitude float64   `json:"longitude" binding:"required"`
	Timestamp time.Time `json:"timestamp" binding:"omitempty"`
}

ShipperLocation represents a shipper's location update request

type Translate

type Translate struct {
	Source      string `json:"source"       validate:"required"  example:"auto"`
	Destination string `json:"destination"  validate:"required"  example:"en"`
	Original    string `json:"original"     validate:"required"  example:"godev"`
}

type UpdateUser

type UpdateUser struct {
	Email    string `json:"email"     validate:"omitempty,email" example:"user@example.com"`
	Username string `json:"username"  validate:"omitempty,min=3"  example:"johndoe"`
	Password string `json:"password"  validate:"omitempty,min=6"  example:"password123"`
}

UpdateUser represents update user request

type UpdateVietQRStatus

type UpdateVietQRStatus struct {
	Status string `json:"status" binding:"required"`
}

UpdateVietQRStatus represents the request body for updating a VietQR status.

Jump to

Keyboard shortcuts

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