sitedb

package
v0.0.0-...-fb49ba0 Latest Latest
Warning

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

Go to latest
Published: Apr 7, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Package sitedb reads out channel and variable information from CoeBot site DB dumps.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Channels

func Channels(ctx context.Context, db *sqlx.DB) (map[string]*Channel, error)

Channels returns all of the channel rows in the database.

func Vars

func Vars(ctx context.Context, db *sqlx.DB) (map[string][]*Var, error)

Vars returns all of the var rows in the database.

Types

type Channel

type Channel struct {
	DisplayName              string `json:"display_name"`
	BotName                  string `json:"bot_name"`
	YouTube                  string `json:"youtube"`
	Twitter                  string `json:"twitter"`
	Active                   bool   `json:"active"`
	ShouldShowOffensiveWords bool   `json:"should_show_offensive_words"`
	ShouldShowBoir           bool   `json:"should_show_boir"`
}

Channel is a site_channels row.

type Var

type Var struct {
	Name         string    `json:"name"`
	Value        string    `json:"value"`
	Description  string    `json:"description"`
	LastModified time.Time `json:"last_modified"`
}

Var is a site_vars row.

Jump to

Keyboard shortcuts

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