events

package
v0.0.0-...-bd02bc2 Latest Latest
Warning

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

Go to latest
Published: Oct 29, 2022 License: Unlicense Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DB *db.DB
View Source
var Data = &Events{}
View Source
var Logger *zap.Logger
View Source
var OldEventLinkHMAC string
View Source
var SaveFile = "events.json"
View Source
var SaveInterval = time.Minute

Functions

func MindEvents

func MindEvents()

MindEvents

func OldEventToolAuthorization

func OldEventToolAuthorization(username string) string
func OldEventToolLink(username string) string

func Start

func Start()

Types

type Event

type Event struct {
	sync.RWMutex

	ID          string        `json:"id"`
	NumID       int           `json:"numeric_id"`
	At          time.Time     `json:"at"`
	WhereID     string        `json:"where_slack_id"`
	Where       string        `json:"where"`
	Expiration  time.Duration `json:"expiration"`
	Owner       EventMember   `json:"owner"`
	Members     []EventMember `json:"members"`
	Title       string        `json:"title"`
	Description string        `json:"description"`
	Created     time.Time     `json:"created"`
	Edited      time.Time     `json:"edited"`
	Audit       []string      `json:"audit_log"`
	// contains filtered or unexported fields
}

func NewEvent

func NewEvent() *Event

func (*Event) Join

func (e *Event) Join(u slack.User)

func (*Event) Log

func (e *Event) Log(str string, args ...interface{})

func (*Event) MarshallJSON

func (e *Event) MarshallJSON() ([]byte, error)

type EventMember

type EventMember struct {
	SlackID  string    `json:"slack_id"`
	Username string    `json:"username"`
	Gamertag string    `json:"gamertag"`
	Joined   time.Time `json:"joined"`
}

func NewMember

func NewMember(u slack.User) EventMember

type Events

type Events struct {
	sync.RWMutex
	// contains filtered or unexported fields
}

func (*Events) AddEvent

func (e *Events) AddEvent(ev *Event)

Jump to

Keyboard shortcuts

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