config

package
v0.0.0-...-0a9172b Latest Latest
Warning

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

Go to latest
Published: Jul 18, 2024 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateGoogleClients

func CreateGoogleClients(config *Config)

func LoadDatabase

func LoadDatabase(config *Config)

Types

type Config

type Config struct {
	GoogleCred      string
	LWODDBFile      string
	YTDBFile        string
	LWODFolder      string
	YTChannel       string
	YTPlaylist      string
	LWODHealthCheck string
	YTHealthCheck   string
	LWODDelay       int
	LWODRefresh     int
	YTDelay         int
	YTRefresh       int
	YTAPIRefresh    int
	Continuous      bool
	Flags           Flags
	LWODDBConfig    LWODDBConfig
	YTDBConfig      YTDBConfig
	GoogleConfig    GoogleConfig
}

func Initialize

func Initialize() Config

func LoadDotEnv

func LoadDotEnv() Config

type Flags

type Flags struct {
	Verbose   bool
	AllSheets bool
	AllVideos bool
}

type GoogleConfig

type GoogleConfig struct {
	Drive   *drive.Service
	Sheets  *sheets.Service
	YouTube *youtube.Service
}

type LWODDBConfig

type LWODDBConfig struct {
	DB         *sql.DB
	Statements LWODStatements
}

type LWODStatements

type LWODStatements struct {
	SelectYTHashStmt       *sql.Stmt
	SelectYTByHashStmt     *sql.Stmt
	DeleteYTStmt           *sql.Stmt
	SelectTwitchHashStmt   *sql.Stmt
	SelectTwitchByHashStmt *sql.Stmt
	DeleteTwitchStmt       *sql.Stmt
	SelectRumbleHashStmt   *sql.Stmt
	SelectRumbleByHashStmt *sql.Stmt
	DeleteRumbleStmt       *sql.Stmt
	SelectKickHashStmt     *sql.Stmt
	SelectKickByHashStmt   *sql.Stmt
	DeleteKickStmt         *sql.Stmt
	SelectOdyseeHashStmt   *sql.Stmt
	SelectOdyseeByHashStmt *sql.Stmt
	DeleteOdyseeStmt       *sql.Stmt
	InsertYTStmt           *sql.Stmt
	InsertTwitchStmt       *sql.Stmt
	InsertRumbleStmt       *sql.Stmt
	InsertKickStmt         *sql.Stmt
	InsertOdyseeStmt       *sql.Stmt
	InsertURLStmt          *sql.Stmt
}

type YTDBConfig

type YTDBConfig struct {
	DB         *sql.DB
	Statements YTStatements
}

type YTStatements

type YTStatements struct {
	SelectVods              *sql.Stmt
	GetPlaylistEtag         *sql.Stmt
	AddPlaylistEtag         *sql.Stmt
	GetLivestreamSearchEtag *sql.Stmt
	AddLivestreamSearchEtag *sql.Stmt
	ReplaceVod              *sql.Stmt
}

Jump to

Keyboard shortcuts

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