GraphQL API and utilities for the rpdata project
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

33 lines
1.0 KiB

  1. package models
  2. // A Channel represents information abount an IRC RP channel, and whether it should be logged
  3. type Channel struct {
  4. Name string `bson:"_id"`
  5. Logged bool `bson:"logged"`
  6. Hub bool `bson:"hub"`
  7. EventName string `bson:"eventName,omitempty"`
  8. LocationName string `bson:"locationName,omitempty"`
  9. }
  10. // IsChangeObject is an interface implementation to identify it as a valid
  11. // ChangeObject in GQL.
  12. func (*Channel) IsChangeObject() {
  13. panic("this method is a dummy, and so is its caller")
  14. }
  15. // ChannelFilter is a filter for channel listing.
  16. type ChannelFilter struct {
  17. Names []string `json:"names"`
  18. Logged *bool `json:"logged"`
  19. EventName *string `json:"eventName"`
  20. LocationName *string `json:"locationName"`
  21. Limit int `json:"limit"`
  22. }
  23. // ChannelUpdate is a filter for channel listing.
  24. type ChannelUpdate struct {
  25. Logged *bool `json:"logged"`
  26. Hub *bool `json:"hub"`
  27. EventName *string `json:"eventName"`
  28. LocationName *string `json:"locationName"`
  29. }