Documentation
¶
Index ¶
- func CtxMiddlewareGenerator(config *Config) (mw func(http.Handler) http.Handler)
- func GetMacondoConfig(ctx context.Context) (*macondoconfig.Config, error)
- type ArgonConfig
- type Config
- type ConfigService
- func (cs *ConfigService) GetAnnouncements(ctx context.Context, req *pb.GetAnnouncementsRequest) (*pb.AnnouncementsResponse, error)
- func (cs *ConfigService) GetUserDetails(ctx context.Context, req *pb.UserRequest) (*pb.UserResponse, error)
- func (cs *ConfigService) SetAnnouncements(ctx context.Context, req *pb.SetAnnouncementsRequest) (*pb.ConfigResponse, error)
- func (cs *ConfigService) SetFEHash(ctx context.Context, req *pb.SetFEHashRequest) (*pb.ConfigResponse, error)
- func (cs *ConfigService) SetGamesEnabled(ctx context.Context, req *pb.EnableGamesRequest) (*pb.ConfigResponse, error)
- func (cs *ConfigService) SetUserPermissions(ctx context.Context, req *pb.PermissionsRequest) (*pb.ConfigResponse, error)
- type ConfigStore
- type CtxKey
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CtxMiddlewareGenerator ¶ added in v0.1.3
func GetMacondoConfig ¶ added in v0.1.3
func GetMacondoConfig(ctx context.Context) (*macondoconfig.Config, error)
Get the Macondo config from the context
Types ¶
type ArgonConfig ¶ added in v0.1.3
type Config ¶
type Config struct { MacondoConfig macondoconfig.Config ArgonConfig ArgonConfig DBConnString string ListenAddr string SecretKey string NatsURL string MailgunKey string RedisURL string DiscordToken string }
type ConfigService ¶ added in v0.1.2
type ConfigService struct {
// contains filtered or unexported fields
}
func NewConfigService ¶ added in v0.1.2
func NewConfigService(cs ConfigStore, userStore user.Store) *ConfigService
func (*ConfigService) GetAnnouncements ¶ added in v0.1.3
func (cs *ConfigService) GetAnnouncements(ctx context.Context, req *pb.GetAnnouncementsRequest) (*pb.AnnouncementsResponse, error)
func (*ConfigService) GetUserDetails ¶ added in v0.1.3
func (cs *ConfigService) GetUserDetails(ctx context.Context, req *pb.UserRequest) (*pb.UserResponse, error)
func (*ConfigService) SetAnnouncements ¶ added in v0.1.3
func (cs *ConfigService) SetAnnouncements(ctx context.Context, req *pb.SetAnnouncementsRequest) (*pb.ConfigResponse, error)
func (*ConfigService) SetFEHash ¶ added in v0.1.3
func (cs *ConfigService) SetFEHash(ctx context.Context, req *pb.SetFEHashRequest) (*pb.ConfigResponse, error)
func (*ConfigService) SetGamesEnabled ¶ added in v0.1.2
func (cs *ConfigService) SetGamesEnabled(ctx context.Context, req *pb.EnableGamesRequest) (*pb.ConfigResponse, error)
func (*ConfigService) SetUserPermissions ¶ added in v0.1.3
func (cs *ConfigService) SetUserPermissions(ctx context.Context, req *pb.PermissionsRequest) (*pb.ConfigResponse, error)
type ConfigStore ¶ added in v0.1.2
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) }
Click to show internal directories.
Click to hide internal directories.