confimport

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: 8 Imported by: 0

Documentation

Overview

Package confimport implements importing and exporting of full channel configurations.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Command

type Command struct {
	Info          *models.CommandInfo      `json:"info"`
	CustomCommand *models.CustomCommand    `json:"custom_command"`
	CommandList   *models.CommandList      `json:"command_list"`
	Repeat        *models.RepeatedCommand  `json:"repeat"`
	Schedule      *models.ScheduledCommand `json:"schedule"`
}

Command is a single command, including all variants and repeats/schedules.

type Config

type Config struct {
	Channel     *models.Channel     `json:"channel"`
	Quotes      []*models.Quote     `json:"quotes"`
	Commands    []*Command          `json:"commands"`
	Autoreplies []*models.Autoreply `json:"autoreplies"`
	Variables   []*models.Variable  `json:"variables"`
}

Config is a channel's full configuration, serialized.

func ExportByName

func ExportByName(ctx context.Context, exec boil.ContextExecutor, name string) (*Config, error)

ExportByName exports a channel's full configuration, keyed on channel name.

func (*Config) Insert

func (c *Config) Insert(ctx context.Context, exec boil.ContextExecutor) error

Insert inserts a config into the database. All IDs will be zero'd before inserting, to ensure all inserted rows have new IDs.

Directories

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

Jump to

Keyboard shortcuts

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