config

package
v0.0.0-...-7ce8734 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 17, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AdminConfig

type AdminConfig struct {
	TwitchUserID string
}

type AuthGithubConfig

type AuthGithubConfig struct {
	Webhook AuthGithubWebhook
}

type AuthGithubWebhook

type AuthGithubWebhook struct {
	Secret string
}

type AuthTwitchConfig

type AuthTwitchConfig struct {
	// Bot contains the client id, secret, and redirect URI for authenticating new bot accounts
	Bot TwitchAuthConfig

	// User contains the client id, secret, and redirect URI for authenticating random users/moderators who want to log into the dashboard
	User TwitchAuthConfig

	// Streamer contains the client id, secret, and reidrect URI for authenticating streamers
	// This will be an extra option after logging in where streamers can choose to give out more permissions (like getting their subscribers)
	Streamer TwitchAuthConfig

	Webhook TwitchWebhookConfig
}

type Config

type Config struct {
	Admin AdminConfig

	Web WebConfig

	PostgreSQL PostgreSQLConfig

	SQL SQLConfig

	Auth authConfig

	Hooks map[string]struct {
		Secret string
	}

	TLSKey  string
	TLSCert string

	Pajbot1 Pajbot1Config
}

The Config contains all the data required to connect to the twitch IRC servers

func LoadConfig

func LoadConfig(path string) (*Config, error)

LoadConfig parses a config file from the given json file at the path and returns a Config object

func (*Config) Validate

func (c *Config) Validate() error

type Pajbot1Config

type Pajbot1Config struct {
	SQL SQLConfig
}

type PostgreSQLConfig

type PostgreSQLConfig struct {
	DSN string
}

type SQLConfig

type SQLConfig struct {
	DSN string
}

type TwitchAuthConfig

type TwitchAuthConfig struct {
	// Twitch OAuth2 ID and Secret (created at twitch.tv/settings/connections)
	ClientID     string
	ClientSecret string
}

type TwitchWebhookConfig

type TwitchWebhookConfig struct {
	Secret string

	// HostPrefix is deprecated since 2021-07-11
	HostPrefix *string

	// LeaseTimeSeconds is deprecated since 2021-07-11
	LeaseTimeSeconds *int
}

func (*TwitchWebhookConfig) Validate

func (c *TwitchWebhookConfig) Validate() error

type WebConfig

type WebConfig struct {
	Host   string
	Domain string
	Secure bool
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL