models

package
v1.6.2 Latest Latest
Warning

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

Go to latest
Published: Dec 21, 2024 License: AGPL-3.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	BaseKeyName        types.OrderKey = "name"
	BaseKeyAffiliation types.OrderKey = "affiliation"
)

i know it can be Constraint. But if i add it as `struct tag` it breaks typing and kind of hard to figure out how to fix nicely

Variables

View Source
var ConfigBaseOrderingKeyAllowedTags = []types.OrderKey{BaseKeyName, BaseKeyAffiliation}

Functions

This section is empty.

Types

type AlertBaseHealthLowerThan

type AlertBaseHealthLowerThan struct {
	OneValueTemplate
	AlertTresholdShared
}

====== Shared alerts for all bases =========

type AlertBaseIfHealthDecreasing

type AlertBaseIfHealthDecreasing struct {
	OneValueTemplate
}

type AlertBaseIfUnderAttack

type AlertBaseIfUnderAttack struct {
	OneValueTemplate
}

type AlertEnemiesEqualOrGreater

type AlertEnemiesEqualOrGreater struct {
	OneValueTemplate
	AlertTresholdShared
}

type AlertFriendsEqualOrGreater

type AlertFriendsEqualOrGreater struct {
	OneValueTemplate
	AlertTresholdShared
}

type AlertNeutralPlayersEqualOrGreater

type AlertNeutralPlayersEqualOrGreater struct {
	OneValueTemplate
	AlertTresholdShared
}

type AlertPingMessage

type AlertPingMessage struct {
	OneValueTemplate
	Value string
}

func (AlertPingMessage) GetValue

func (a AlertPingMessage) GetValue() string

type AlertTresholdShared

type AlertTresholdShared struct {
	Threshold int `gorm:"check:threshold > 0; check:threshold <= 100"`
}

func (AlertTresholdShared) GetThreshold

func (t AlertTresholdShared) GetThreshold() int

type Channel

type Channel struct {
	gorm.DeletedAt
	ChannelID types.DiscordChannelID `gorm:"primarykey"`
}

type ConfigBaseOrderingKey

type ConfigBaseOrderingKey struct {
	OneValueTemplate
	Value string
}

func (ConfigBaseOrderingKey) GetValue

func (a ConfigBaseOrderingKey) GetValue() string

type OneValueTemplate

type OneValueTemplate struct {
	gorm.Model
	ChannelID types.DiscordChannelID
	Channel   Channel `gorm:"references:ChannelID,unique"`
}

type TagBase

type TagBase struct {
	TagTemplate
}

type TagForumPostIgnore

type TagForumPostIgnore struct {
	TagTemplate
}

type TagForumPostTrack

type TagForumPostTrack struct {
	TagTemplate
}

type TagForumSubforumIgnore

type TagForumSubforumIgnore struct {
	TagTemplate
}

type TagForumSubforumTrack

type TagForumSubforumTrack struct {
	TagTemplate
}

type TagPlayerEnemy

type TagPlayerEnemy struct {
	TagTemplate
}

type TagPlayerEvent

type TagPlayerEvent struct {
	TagTemplate
}

type TagPlayerFriend

type TagPlayerFriend struct {
	TagTemplate
}

type TagRegion

type TagRegion struct {
	TagTemplate
}

type TagSystem

type TagSystem struct {
	TagTemplate
}

type TagTemplate

type TagTemplate struct {
	gorm.Model
	ChannelID types.DiscordChannelID
	Channel   Channel `gorm:"references:ChannelID"`
	Tag       string
}

func (TagTemplate) GetTag

func (t TagTemplate) GetTag() types.Tag

Jump to

Keyboard shortcuts

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