13 changed files with 169 additions and 21 deletions
-
1.gitignore
-
1config/settings.go
-
2controllers/app_controller.go
-
25controllers/send_controller.go
-
1go.mod
-
2go.sum
-
24readme.md
-
2services/send_service.go
-
76services/send_service_impl.go
-
2statics/images/sendimages/.gitignore
-
13structs/auth_struct.go
-
23structs/send_struct.go
-
18validations/send_validation.go
@ -1,4 +1,5 @@ |
|||
package config |
|||
|
|||
const PathQrCode = "statics/images/qrcode" |
|||
const PathSendImage = "statics/images/sendimages" |
|||
const DBName = "hydrogenWaCli.db" |
|||
@ -0,0 +1,2 @@ |
|||
* |
|||
!.gitignore |
|||
@ -1,18 +1,11 @@ |
|||
package structs |
|||
|
|||
import "time" |
|||
import ( |
|||
"time" |
|||
) |
|||
|
|||
type LoginResponse struct { |
|||
ImagePath string `json:"image_path"` |
|||
Duration time.Duration `json:"duration"` |
|||
Code string `json:"code"` |
|||
} |
|||
|
|||
type SendMessageRequest struct { |
|||
PhoneNumber string `json:"phone_number" form:"phone_number"` |
|||
Message string `json:"message" form:"message"` |
|||
} |
|||
|
|||
type SendMessageResponse struct { |
|||
Status string `json:"status"` |
|||
} |
|||
@ -0,0 +1,23 @@ |
|||
package structs |
|||
|
|||
import "mime/multipart" |
|||
|
|||
type SendMessageRequest struct { |
|||
PhoneNumber string `json:"phone_number" form:"phone_number"` |
|||
Message string `json:"message" form:"message"` |
|||
} |
|||
|
|||
type SendMessageResponse struct { |
|||
Status string `json:"status"` |
|||
} |
|||
|
|||
type SendImageRequest struct { |
|||
PhoneNumber string `json:"phone_number" form:"phone_number"` |
|||
Caption string `json:"caption" form:"caption"` |
|||
Image *multipart.FileHeader `json:"image" form:"image"` |
|||
ViewOnce bool `json:"view_once" form:"view_once"` |
|||
} |
|||
|
|||
type SendImageResponse struct { |
|||
Status string `json:"status"` |
|||
} |
|||
Write
Preview
Loading…
Cancel
Save
Reference in new issue