internal

package
v0.0.0-...-bc8dd96 Latest Latest
Warning

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

Go to latest
Published: Mar 28, 2021 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

View Source
const (
	LINK_DEPTH_DEFAULT   = 1
	SOURCE_DEPTH_DEFAULT = 1
	TAIL_DEFAULT         = 0

	FILE_EXTENSION = ".png"
)

Variables

View Source
var (
	Output       string
	DiscordToken string
	GoogleToken  string
	GoogleCSE    string
	Rulebooks    string
	CacheFile    string
	KellenTag    string

	TALK_TO_KELLEN string
	HELP_STRING    string

	SourceCache Cache

	PrefixMap map[string]string = make(map[string]string)
)

Functions

func MessageCreate

func MessageCreate(session *dg.Session, message *dg.MessageCreate)

Types

type Cache

type Cache map[string][]SourcePage

func (*Cache) Get

func (c *Cache) Get(page string) ([]SourcePage, bool)

func (*Cache) Put

func (c *Cache) Put(page string, sources []SourcePage)

type CrawlerQuery

type CrawlerQuery struct {
	LinkDepth   int
	SourceDepth int
	SearchQuery string
	Tail        int
}

type Query

type Query interface {
	// contains filtered or unexported methods
}

type SourcePage

type SourcePage struct {
	Rulebook string `json:"rulebook"`
	Page     int    `json:"page"`
}

type SpecificQuery

type SpecificQuery struct {
	SourcePage
	Tail int
}

Jump to

Keyboard shortcuts

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