models

package
v0.0.0-...-e78ef58 Latest Latest
Warning

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

Go to latest
Published: Jan 8, 2022 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultConfig = ConfigModel{
	Storage: StorageConfigModel{
		LifetimeSeconds: 30 * 60,
		Location:        "./collections",
	},
	Webserver: WebserverConfigModel{
		BindAddress:   "0.0.0.0:80",
		PublicAddress: "http://localhost:80",
	},
	Discord: DiscordConfigModel{
		CooldownSeconds: 10 * 60,
		MessageLimit:    100_000,
		SizeLimit:       "5G",
	},
}

Functions

This section is empty.

Types

type AttMetadata

type AttMetadata struct {
	ArchiveFilename string `json:"archive_filename"`
	Hash            string `json:"hash"`
	IsDuplicate     bool   `json:"is_duplicate"`
	*discordgo.MessageAttachment
}

type ConfigModel

type ConfigModel struct {
	Discord   DiscordConfigModel   `json:"discord"`
	Storage   StorageConfigModel   `json:"storage"`
	Webserver WebserverConfigModel `json:"webserver"`
}

type DiscordConfigModel

type DiscordConfigModel struct {
	Token           string `json:"token"`
	CooldownSeconds uint   `json:"cooldownseconds"`
	MessageLimit    uint   `json:"messageslimit"`
	SizeLimit       string `json:"sizelimit"`

	SizeLimitU uint64 `json:"-"`
}

type MsgMetadata

type MsgMetadata struct {
	GuildID     string        `json:"guild_id"`
	ChannelID   string        `json:"channel_id"`
	MessageID   string        `json:"message_id"`
	AuthorID    string        `json:"author_id"`
	Attachments []AttMetadata `json:"attachments"`
}

type StorageConfigModel

type StorageConfigModel struct {
	LifetimeSeconds uint   `json:"lifetimeseconds"`
	Location        string `json:"lcoation"`
}

type WebserverConfigModel

type WebserverConfigModel struct {
	BindAddress   string `json:"bindaddress"`
	PublicAddress string `json:"publicaddress"`
}

Jump to

Keyboard shortcuts

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