Documentation ¶
Index ¶
- func CtxMiddlewareGenerator(config *Config) (mw func(http.Handler) http.Handler)
- type ArgonConfig
- type Config
- type ConfigService
- func (cs *ConfigService) GetAnnouncements(ctx context.Context, req *connect.Request[pb.GetAnnouncementsRequest]) (*connect.Response[pb.AnnouncementsResponse], error)
- func (cs *ConfigService) GetUserDetails(ctx context.Context, req *connect.Request[pb.UserRequest]) (*connect.Response[pb.UserResponse], error)
- func (cs *ConfigService) SetAnnouncements(ctx context.Context, req *connect.Request[pb.SetAnnouncementsRequest]) (*connect.Response[pb.ConfigResponse], error)
- func (cs *ConfigService) SetFEHash(ctx context.Context, req *connect.Request[pb.SetFEHashRequest]) (*connect.Response[pb.ConfigResponse], error)
- func (cs *ConfigService) SetGamesEnabled(ctx context.Context, req *connect.Request[pb.EnableGamesRequest]) (*connect.Response[pb.ConfigResponse], error)
- func (cs *ConfigService) SetSingleAnnouncement(ctx context.Context, req *connect.Request[pb.SetSingleAnnouncementRequest]) (*connect.Response[pb.ConfigResponse], error)
- func (cs *ConfigService) SetUserPermissions(ctx context.Context, req *connect.Request[pb.PermissionsRequest]) (*connect.Response[pb.ConfigResponse], error)
- type ConfigStore
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Config ¶
type Config struct { ArgonConfig ArgonConfig DBHost string DBPort string DBUser string DBPassword string DBSSLMode string DBName string DBMigrationsPath string DBConnUri string DBConnDSN string ListenAddr string SecretKey string NatsURL string MailgunKey string RedisURL string DiscordToken string // Puzzles PuzzleGenerationSecretKey string ECSClusterName string PuzzleGenerationTaskDefinition string TourneyPDFLambdaFunctionName string Debug bool // contains filtered or unexported fields }
func DefaultConfig ¶
func DefaultConfig() *Config
func (*Config) MacondoConfig ¶
func (c *Config) MacondoConfig() *macondoconfig.Config
type ConfigService ¶
type ConfigService struct {
// contains filtered or unexported fields
}
func NewConfigService ¶
func NewConfigService(cs ConfigStore, userStore user.Store) *ConfigService
func (*ConfigService) GetAnnouncements ¶
func (cs *ConfigService) GetAnnouncements(ctx context.Context, req *connect.Request[pb.GetAnnouncementsRequest], ) (*connect.Response[pb.AnnouncementsResponse], error)
func (*ConfigService) GetUserDetails ¶
func (cs *ConfigService) GetUserDetails(ctx context.Context, req *connect.Request[pb.UserRequest], ) (*connect.Response[pb.UserResponse], error)
func (*ConfigService) SetAnnouncements ¶
func (cs *ConfigService) SetAnnouncements(ctx context.Context, req *connect.Request[pb.SetAnnouncementsRequest], ) (*connect.Response[pb.ConfigResponse], error)
func (*ConfigService) SetFEHash ¶
func (cs *ConfigService) SetFEHash(ctx context.Context, req *connect.Request[pb.SetFEHashRequest], ) (*connect.Response[pb.ConfigResponse], error)
func (*ConfigService) SetGamesEnabled ¶
func (cs *ConfigService) SetGamesEnabled(ctx context.Context, req *connect.Request[pb.EnableGamesRequest], ) (*connect.Response[pb.ConfigResponse], error)
func (*ConfigService) SetSingleAnnouncement ¶
func (cs *ConfigService) SetSingleAnnouncement(ctx context.Context, req *connect.Request[pb.SetSingleAnnouncementRequest], ) (*connect.Response[pb.ConfigResponse], error)
func (*ConfigService) SetUserPermissions ¶
func (cs *ConfigService) SetUserPermissions(ctx context.Context, req *connect.Request[pb.PermissionsRequest], ) (*connect.Response[pb.ConfigResponse], error)
type ConfigStore ¶
type ConfigStore interface { SetGamesEnabled(context.Context, bool) error GamesEnabled(context.Context) (bool, error) SetFEHash(context.Context, string) error FEHash(context.Context) (string, error) SetAnnouncements(context.Context, []*pb.Announcement) error GetAnnouncements(context.Context) ([]*pb.Announcement, error) SetAnnouncement(context.Context, string, *pb.Announcement) error }
Click to show internal directories.
Click to hide internal directories.