chore: import clean Agent Desk snapshot (2/7)
This commit is contained in:
83
internal/pkg/dto/dto.go
Normal file
83
internal/pkg/dto/dto.go
Normal file
@@ -0,0 +1,83 @@
|
||||
package dto
|
||||
|
||||
import "agent-desk/internal/pkg/enums"
|
||||
|
||||
type AuthPrincipal struct {
|
||||
UserID int64
|
||||
Username string
|
||||
Nickname string
|
||||
Avatar string
|
||||
UserType enums.UserType
|
||||
Status enums.Status
|
||||
Roles []string
|
||||
Permissions []string
|
||||
}
|
||||
|
||||
type WebChannelConfig struct {
|
||||
Title string `json:"title"`
|
||||
Subtitle string `json:"subtitle"`
|
||||
ThemeColor string `json:"themeColor"`
|
||||
Position string `json:"position"`
|
||||
Width string `json:"width"`
|
||||
UserTokenSecret string `json:"userTokenSecret,omitempty"`
|
||||
PromptStarters []string `json:"promptStarters,omitempty"`
|
||||
}
|
||||
|
||||
type TelegramChannelConfig struct {
|
||||
BotToken string `json:"botToken"`
|
||||
BotUsername string `json:"botUsername,omitempty"`
|
||||
WebhookSecret string `json:"webhookSecret,omitempty"`
|
||||
WelcomeMessage string `json:"welcomeMessage,omitempty"`
|
||||
}
|
||||
|
||||
type ZaloOAChannelConfig struct {
|
||||
AppID string `json:"appId,omitempty"`
|
||||
OAID string `json:"oaId,omitempty"`
|
||||
SecretKey string `json:"secretKey,omitempty"`
|
||||
AccessToken string `json:"accessToken"`
|
||||
RefreshToken string `json:"refreshToken,omitempty"`
|
||||
WebhookSecret string `json:"webhookSecret,omitempty"`
|
||||
WelcomeMessage string `json:"welcomeMessage,omitempty"`
|
||||
}
|
||||
|
||||
type SlackChannelConfig struct {
|
||||
BotToken string `json:"botToken,omitempty"` // xoxb-... Bot Token
|
||||
SigningSecret string `json:"signingSecret,omitempty"` // Slack Signing Secret
|
||||
AppID string `json:"appId,omitempty"` // Slack App ID
|
||||
TeamID string `json:"teamId,omitempty"` // Slack Workspace Team ID
|
||||
TeamName string `json:"teamName,omitempty"` // Slack Workspace Team Name
|
||||
DefaultChannel string `json:"defaultChannel,omitempty"` // Default channel to post
|
||||
}
|
||||
|
||||
type EmailChannelConfig struct {
|
||||
EmailAddress string `json:"emailAddress,omitempty"`
|
||||
ForwardingAddress string `json:"forwardingAddress,omitempty"`
|
||||
SenderName string `json:"senderName,omitempty"`
|
||||
Provider string `json:"provider,omitempty"`
|
||||
APIKey string `json:"apiKey,omitempty"`
|
||||
SMTPHost string `json:"smtpHost,omitempty"`
|
||||
SMTPPort int `json:"smtpPort,omitempty"`
|
||||
SMTPUser string `json:"smtpUser,omitempty"`
|
||||
SMTPPassword string `json:"smtpPassword,omitempty"`
|
||||
// SMTPUseTLS is a pointer so "not set" stays distinguishable from an explicit
|
||||
// false. A plain bool cannot say that, and inheriting the system value is the
|
||||
// wrong answer for a channel deliberately bound to a plaintext test server.
|
||||
SMTPUseTLS *bool `json:"smtpUseTls,omitempty"`
|
||||
// SMTPAllowInsecure accepts a self-signed certificate and skips opportunistic
|
||||
// STARTTLS, so a channel can be bound to a local test SMTP server. Never
|
||||
// enable it for a real mailbox.
|
||||
SMTPAllowInsecure bool `json:"smtpAllowInsecure,omitempty"`
|
||||
WebhookSecret string `json:"webhookSecret,omitempty"`
|
||||
WelcomeMessage string `json:"welcomeMessage,omitempty"`
|
||||
}
|
||||
|
||||
type DiscordChannelConfig struct {
|
||||
GuildID string `json:"guildId,omitempty"`
|
||||
GuildName string `json:"guildName,omitempty"`
|
||||
ChannelScope string `json:"channelScope,omitempty"` // all | dm_only
|
||||
BotToken string `json:"botToken,omitempty"`
|
||||
ApplicationID string `json:"applicationId,omitempty"`
|
||||
PublicKey string `json:"publicKey,omitempty"`
|
||||
WebhookSecret string `json:"webhookSecret,omitempty"`
|
||||
WelcomeMessage string `json:"welcomeMessage,omitempty"`
|
||||
}
|
||||
Reference in New Issue
Block a user