Documentation ¶
Index ¶
Constants ¶
View Source
const ARTICLE_COLLECTION = "articles_cache"
View Source
const GUILD_COLLECTION = "discord_guilds"
Variables ¶
View Source
var Client *mongo.Client
Functions ¶
func Connect ¶
func Connect(mongodbConfig MongodbConfig) (err error)
Types ¶
type Article ¶ added in v0.3.0
type Article struct { ID string `json:"id,omitempty" bson:"_id,omitempty"` ArticleID string `json:"article_id,omitempty" bson:"article_id,omitempty"` Link string `json:"link,omitempty" bson:"link,omitempty"` ChangedAt int64 `json:"changed_at" bson:"changed_at"` }
func FindArticleByLink ¶ added in v0.3.0
type ChannelSubjects ¶ added in v0.3.0
type Guild ¶
type Guild struct { ID string `json:"id,omitempty" bson:"_id,omitempty"` GuildID string `json:"guildId,omitempty" bson:"guildId,omitempty"` Name string `json:"name" bson:"name,omitempty"` Settings Settings `json:"Settings" bson:"Settings,omitempty"` ChannelSubjects []ChannelSubjects `json:"channelSubjects" bson:"channelSubjects,omitempty"` ChangedAt int64 `json:"changed_at" bson:"changed_at"` }
func FindGuildByGuildID ¶ added in v0.3.0
func GetAllGuilds ¶
func InsertGuild ¶
func (*Guild) AddChannelSubject ¶ added in v0.3.0
func (*Guild) RemoveChannelSubject ¶ added in v0.4.0
type MongoCollections ¶
type MongoCollections struct { Guild *mongo.Collection Article *mongo.Collection }
type MongodbConfig ¶
Click to show internal directories.
Click to hide internal directories.