response

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: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Error

type Error struct {
	Error string `json:"error" example:"message"`
}

type ErrorResponse

type ErrorResponse struct {
	Error   string `json:"error" example:"error_type"`
	Message string `json:"message" example:"error_message"`
}

ErrorResponse represents error response

type GenerateInvoicePDFResponse

type GenerateInvoicePDFResponse struct {
	FilePath string `json:"file_path"`
}

type LoginResponse

type LoginResponse struct {
	Token string `json:"token"`
	User  struct {
		ID       int64  `json:"id"`
		Email    string `json:"email"`
		Username string `json:"username"`
	} `json:"user"`
}

LoginResponse represents login response

type PaymentResponse

type PaymentResponse struct {
	ID            int64     `json:"id" example:"1"`
	UserID        int64     `json:"user_id" example:"1"`
	Amount        float64   `json:"amount" example:"500000"`
	Currency      string    `json:"currency" example:"VND"`
	PaymentType   string    `json:"payment_type" example:"electric"`
	Status        string    `json:"status" example:"pending"`
	MeterNumber   string    `json:"meter_number" example:"EVN001234567"`
	CustomerCode  string    `json:"customer_code" example:"CUST001"`
	Description   string    `json:"description" example:"Thanh toán tiền điện tháng 12/2024"`
	TransactionID string    `json:"transaction_id" example:"uuid-here"`
	PaymentMethod string    `json:"payment_method" example:"bank_transfer"`
	CreatedAt     time.Time `json:"created_at" example:"2024-12-20T10:30:00Z"`
}

PaymentResponse represents payment response @Description Payment response with all payment details

type RedisValue

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

RedisValue represents a key-value pair for Redis.

func NewRedisValue

func NewRedisValue(v entity.RedisValue) RedisValue

NewRedisValue creates a new RedisValue response from an entity.

type Success

type Success struct {
	Message string `json:"message" example:"operation completed successfully"`
}

Success represents success response

Jump to

Keyboard shortcuts

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