MCPcopy Create free account
hub / github.com/MMadmer/EpicAssetsNotifyBot / guildConfigsToSQLite

Function guildConfigsToSQLite

internal/app/bootstrap.go:203–218  ·  view source on GitHub ↗
(items []model.GuildConfig)

Source from the content-addressed store, hash-verified

201}
202
203func guildConfigsToSQLite(items []model.GuildConfig) []sqlitestore.GuildConfig {
204 result := make([]sqlitestore.GuildConfig, 0, len(items))
205 for _, item := range items {
206 result = append(result, sqlitestore.GuildConfig{
207 GuildID: item.GuildID,
208 ChannelID: cloneInt64Ptr(item.ChannelID),
209 ThreadID: cloneInt64Ptr(item.ThreadID),
210 ShownAssets: item.ShownAssets,
211 Locale: item.Locale,
212 MentionRoleID: cloneInt64Ptr(item.MentionRoleID),
213 Enabled: item.Enabled,
214 IncludeImages: item.IncludeImages,
215 })
216 }
217 return result
218}
219
220func userProfilesToSQLite(items []model.UserProfile) []sqlitestore.UserProfile {
221 result := make([]sqlitestore.UserProfile, 0, len(items))

Callers 1

SaveSnapshotMethod · 0.85

Calls 1

cloneInt64PtrFunction · 0.70

Tested by

no test coverage detected