forked from baron/baron-sso
43 lines
1.3 KiB
Go
43 lines
1.3 KiB
Go
package domain
|
|
|
|
// SmsService defines the interface for sending SMS messages.
|
|
type SmsService interface {
|
|
SendSms(to, content string) error
|
|
}
|
|
|
|
// NaverSmsRequest represents the request body for the Naver Cloud SMS API.
|
|
type NaverSmsRequest struct {
|
|
Type string `json:"type"`
|
|
ContentType string `json:"contentType"`
|
|
CountryCode string `json:"countryCode"`
|
|
From string `json:"from"`
|
|
Subject string `json:"subject,omitempty"`
|
|
Content string `json:"content"`
|
|
Messages []SmsMessage `json:"messages"`
|
|
}
|
|
|
|
// SmsMessage represents a single message to be sent.
|
|
type SmsMessage struct {
|
|
To string `json:"to"`
|
|
Content string `json:"content,omitempty"`
|
|
}
|
|
|
|
// NaverSmsResponse represents the response from the Naver Cloud SMS API.
|
|
type NaverSmsResponse struct {
|
|
RequestID string `json:"requestId"`
|
|
RequestTime string `json:"requestTime"`
|
|
StatusCode string `json:"statusCode"`
|
|
StatusName string `json:"statusName"`
|
|
}
|
|
|
|
// SmsRequest represents the request body for sending an SMS.
|
|
type SmsRequest struct {
|
|
PhoneNumber string `json:"phoneNumber"`
|
|
}
|
|
|
|
// SmsVerifyRequest represents the request body for verifying an SMS code.
|
|
type SmsVerifyRequest struct {
|
|
PhoneNumber string `json:"phoneNumber"`
|
|
Code string `json:"code"`
|
|
}
|