database

package
v0.0.0-...-9627f33 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 18, 2019 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MembChangeEvent

type MembChangeEvent int
const (
	ChangeJoined MembChangeEvent = iota
	ChangeLeft
)

type MemberChange

type MemberChange struct {
	GuildID   string
	Timestamp time.Time
	RoleIDs   []string
	Bot       bool
	Event     MembChangeEvent
}

type MemberRoleStatus

type MemberRoleStatus struct {
	RoleID  string
	Online  int
	Offline int
	Dnd     int
	Away    int
}

type MemberStatus

type MemberStatus struct {
	GuildID   string
	Timestamp time.Time
	Online    int
	Offline   int
	Dnd       int
	Away      int
}

type MemberStatusRolesCollection

type MemberStatusRolesCollection struct {
	GuildID   string
	Timestamp time.Time
	Roles     []*MemberRoleStatus
}

type Message

type Message struct {
	GuildID          string
	ChannelID        string
	RoleIDs          []string
	Bot              bool
	ContentLen       int
	Timestamp        time.Time
	MentionedRoleIDs []string
	Mentions         int
	Attachment       bool
}

type Middleware

type Middleware interface {
	Connect(params interface{}) error
	Close()

	AddMessage(msg *Message) error
	AddStatusUpdate(su *StatusUpdate) error
	AddMembChange(mc *MemberChange) error
	AddMembStatus(ms *MemberStatus) error
	AddMembStatusRoles(mrsc *MemberStatusRolesCollection) error
	AddReaction(r *Reaction) error
	AddVoice(v *Voice) error
}

type MongoConfig

type MongoConfig struct {
	Host     string `json:"host"`
	Port     string `json:"port"`
	Username string `json:"username"`
	Password string `json:"password"`
	AuthDB   string `json:"auth_db"`
	DataDB   string `json:"data_db"`
}

type MongoDB

type MongoDB struct {
	// contains filtered or unexported fields
}

func (*MongoDB) AddMembChange

func (m *MongoDB) AddMembChange(mc *MemberChange) error

func (*MongoDB) AddMembStatus

func (m *MongoDB) AddMembStatus(ms *MemberStatus) error

func (*MongoDB) AddMembStatusRoles

func (m *MongoDB) AddMembStatusRoles(mrsc *MemberStatusRolesCollection) error

func (*MongoDB) AddMessage

func (m *MongoDB) AddMessage(msg *Message) error

func (*MongoDB) AddReaction

func (m *MongoDB) AddReaction(r *Reaction) error

func (*MongoDB) AddStatusUpdate

func (m *MongoDB) AddStatusUpdate(su *StatusUpdate) error

func (*MongoDB) AddVoice

func (m *MongoDB) AddVoice(v *Voice) error

func (*MongoDB) Close

func (m *MongoDB) Close()

func (*MongoDB) Connect

func (m *MongoDB) Connect(params interface{}) (err error)

type Reaction

type Reaction struct {
	GuildID    string
	Timestamp  time.Time
	ChannelID  string
	RoleIDs    []string
	Emoji      string
	EmojiID    string
	ContentLen int
	Bot        bool
}

type StatusUpdate

type StatusUpdate struct {
	GuildID   string
	RoleIDs   []string
	Bot       bool
	OldStatus discordgo.Status
	NewStatus discordgo.Status
	Timestamp time.Time
}

type Voice

type Voice struct {
	GuildID   string
	ChannelID string
	Timestamp time.Time
	RoleIDs   []string
	Event     VoiceEvent
}

type VoiceEvent

type VoiceEvent int
const (
	VoiceJoined VoiceEvent = iota
	VoiceMoved
	VoiceLeft
)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL