state

package
v0.0.0-...-860483f Latest Latest
Warning

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

Go to latest
Published: Aug 9, 2024 License: AGPL-3.0 Imports: 12 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	TableEventModifiers = "event_modifiers"
	TableRepos          = "repos"
	TableGuilds         = "guilds"
	TableWebhooks       = "webhooks"
	TableWebhookLogs    = "webhook_logs"

	TableList = []*string{
		&TableEventModifiers,
		&TableRepos,
		&TableGuilds,
		&TableWebhooks,
		&TableWebhookLogs,
	}
)
View Source
var (
	Json       = jsoniter.ConfigCompatibleWithStandardLibrary
	Discord    *discordgo.Session
	Pool       *pgxpool.Pool
	Context    = context.Background()
	Validator  = validator.New()
	Logger     *zap.Logger
	Config     *config.Config
	MapMutex   *mapofmu.M[string]
	IsEmbedded bool // Whether gitlogs is being embedded into another service
)

Functions

func ApplyMigrations

func ApplyMigrations()

func Close

func Close()

func PrepareForEmbedding

func PrepareForEmbedding()

Must be called when embedding, PrepareForEmbedding creates the table names from config and may do other setup in the future

Note that config.GetTable must be set before calling this function

func Setup

func Setup()

Types

This section is empty.

Jump to

Keyboard shortcuts

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