add initial application structure with configuration, logging, and health check endpoints
This commit is contained in:
22
internal/domain/vo/response.go
Normal file
22
internal/domain/vo/response.go
Normal file
@@ -0,0 +1,22 @@
|
||||
package vo
|
||||
|
||||
type Response struct {
|
||||
Code string `json:"code"`
|
||||
Message string `json:"message"`
|
||||
Data any `json:"data,omitempty"`
|
||||
}
|
||||
|
||||
func OK(data any) Response {
|
||||
return Response{
|
||||
Code: "OK",
|
||||
Message: "success",
|
||||
Data: data,
|
||||
}
|
||||
}
|
||||
|
||||
func Error(message string) Response {
|
||||
return Response{
|
||||
Code: "ERROR",
|
||||
Message: message,
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user