Documentation ¶
Index ¶
- Constants
- func FilterByFlags(flags ...string) func(EventConfig) bool
- func FilterByFrequency(f Frequency) func(EventConfig) bool
- func FilterByNames(names ...string) func(EventConfig) bool
- func FilterExpired(ev EventConfig) bool
- func FilterInactive(ev EventConfig) bool
- func FilterNotOpenable(ev EventConfig) bool
- func FilterNotStarted(ev EventConfig) bool
- type EventConfig
- type EventTypeser
- type Frequency
- type Types
Constants ¶
View Source
const ( TypeGetPoH = "get_poh" TypeFreeWeekly = "free_weekly" TypeBeReferred = "be_referred" TypeReferralSpecific = "referral_specific" TypePassportScan = "passport_scan" )
View Source
const ( FlagActive = "active" FlagNotStarted = "not_started" FlagExpired = "expired" FlagDisabled = "disabled" )
Variables ¶
This section is empty.
Functions ¶
func FilterByFlags ¶ added in v0.2.1
func FilterByFlags(flags ...string) func(EventConfig) bool
func FilterByFrequency ¶
func FilterByFrequency(f Frequency) func(EventConfig) bool
func FilterByNames ¶ added in v0.2.1
func FilterByNames(names ...string) func(EventConfig) bool
func FilterExpired ¶
func FilterExpired(ev EventConfig) bool
func FilterInactive ¶
func FilterInactive(ev EventConfig) bool
func FilterNotOpenable ¶
func FilterNotOpenable(ev EventConfig) bool
func FilterNotStarted ¶
func FilterNotStarted(ev EventConfig) bool
Types ¶
type EventConfig ¶
type EventConfig struct { Name string `fig:"name,required"` Description string `fig:"description,required"` ShortDescription string `fig:"short_description,required"` Reward int64 `fig:"reward,required"` Title string `fig:"title,required"` Frequency Frequency `fig:"frequency,required"` StartsAt *time.Time `fig:"starts_at"` ExpiresAt *time.Time `fig:"expires_at"` NoAutoOpen bool `fig:"no_auto_open"` AutoClaim bool `fig:"auto_claim"` Disabled bool `fig:"disabled"` ActionURL *url.URL `fig:"action_url"` Logo *url.URL `fig:"logo"` }
func (EventConfig) Flag ¶ added in v0.2.1
func (e EventConfig) Flag() string
func (EventConfig) Resource ¶
func (e EventConfig) Resource() resources.EventStaticMeta
type EventTypeser ¶
type EventTypeser interface {
EventTypes() Types
}
func NewConfig ¶
func NewConfig(getter kv.Getter) EventTypeser
Click to show internal directories.
Click to hide internal directories.