Files
api/models/channel.go
T
2019-06-20 22:32:35 +02:00

33 lines
1014 B
Go

package models
// A Channel represents information abount an IRC RP channel, and whether it should be logged
type Channel struct {
Name string `bson:"_id"`
Logged bool `bson:"logged"`
Hub bool `bson:"hub"`
EventName string `bson:"eventName,omitempty"`
LocationName string `bson:"locationName,omitempty"`
}
// IsChangeObject is an interface implementation to identify it as a valid
// ChangeObject in GQL.
func (*Channel) IsChangeObject() {
panic("this method is a dummy, and so is its caller")
}
// ChannelFilter is a filter for channel listing.
type ChannelFilter struct {
Logged *bool `json:"logged"`
EventName *string `json:"eventName"`
LocationName *string `json:"locationName"`
Limit int `json:"limit"`
}
// ChannelUpdate is a filter for channel listing.
type ChannelUpdate struct {
Logged *bool `json:"logged"`
Hub *bool `json:"hub"`
EventName *string `json:"eventName"`
LocationName *string `json:"locationName"`
}