Documentation
¶
Index ¶
- Constants
- Variables
- type Config
- type LogConfig
- type LogFormat
- type NotificationsConfig
- type Server
- func (s *Server) ProcessEventImport(ctx context.Context, event campfire.Event, members []campfire.Member, ...) error
- func (s *Server) ProcessFullEventImport(ctx context.Context, event campfire.Event, skipClub bool) error
- func (s *Server) SendNotification(ctx context.Context, content string)
- func (s *Server) Start(trackerHandler http.Handler, rewardsHandler http.Handler)
- func (s *Server) Stop()
- type ServerConfig
Constants ¶
View Source
const ReloadRoute = "/dev/reload"
Variables ¶
View Source
var ErrContinueLater = errors.New("continue later")
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
Dev bool `toml:"dev"`
WarnUnknownEventCategories bool `toml:"warn_unknown_event_categories"`
Log LogConfig `toml:"log"`
Server ServerConfig `toml:"server"`
Database database.Config `toml:"database"`
Campfire campfire.Config `toml:"campfire"`
DiscordAuth auth.Config `toml:"discord_auth"`
CampfireAuth cauth.Config `toml:"campfire_auth"`
Notifications NotificationsConfig `toml:"notifications"`
}
func LoadConfig ¶
type LogConfig ¶
type NotificationsConfig ¶
type NotificationsConfig struct {
Enabled bool `toml:"enabled"`
WebhookURL string `toml:"webhook_url"`
}
func (NotificationsConfig) String ¶
func (c NotificationsConfig) String() string
type Server ¶
type Server struct {
Cfg Config
TrackerServer *http.Server
RewardsServer *http.Server
HttpClient *http.Client
Campfire *campfire.Client
DB *database.Database
Auth *auth.Auth
CampfireAuth *cauth.Auth
Templates func() *template.Template
StaticFS http.FileSystem
WebhookClient *webhook.Client
SentTokenNotifications []int
Reloader *goreload.Reloader
Logo image.Image
}
func (*Server) ProcessEventImport ¶
func (*Server) ProcessFullEventImport ¶
func (*Server) SendNotification ¶
type ServerConfig ¶
type ServerConfig struct {
TrackerAddr string `toml:"tracker_addr"`
PublicTrackerURL string `toml:"public_tracker_url"`
RewardsAddr string `toml:"rewards_addr"`
PublicRewardsURL string `toml:"public_rewards_url"`
}
func (ServerConfig) String ¶
func (c ServerConfig) String() string
Source Files
¶
Click to show internal directories.
Click to hide internal directories.