core

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Oct 29, 2022 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const REMOTE_LOCATION string = "online"

Variables

This section is empty.

Functions

func Bool

func Bool(v bool) *bool

Bool returns a pointer to a bool

Types

type Channel

type Channel struct {
	Name     string
	ID       string
	Verified bool
}

type Config

type Config struct {
	Discord DiscordConfig `yaml:"discord"`
}

type DiscordConfig

type DiscordConfig struct {
	Token   string `yaml:"token" env:"DISCORD_TOKEN"`
	GuildID string `yaml:"guild_id" env:"DISCORD_GUILD_ID"`

	EventCategory       string `yaml:"event_category" env:"DISCORD_EVENT_CATEGORY"`
	ArchiveCategory     string `yaml:"archive_category" env:"DISCORD_ARCHIVE_CATEGORY"`
	NotificationChannel string `yaml:"notification_channel" env:"DISCORD_NOTIFICATION_CHANNEL"`
}

type Event

type Event struct {
	Name      string
	ID        string
	Location  string
	Completed bool
	DateTime  time.Time

	Organizer *User
}

func (*Event) Channel

func (event *Event) Channel() *Channel

Channel returns a channel object associated with an event

func (*Event) GetCityFromLocation

func (event *Event) GetCityFromLocation() string

GetCityFromLocation returns the city name of an event's location

func (*Event) GetMonthPrefix

func (event *Event) GetMonthPrefix() string

GetMonthPrefix returns a month in short form

type User

type User struct {
	ID string
}

func (*User) Mention

func (user *User) Mention() string

Mention generated a Discord mention string for the user

Jump to

Keyboard shortcuts

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