Documentation ¶
Overview ¶
Package conservator herds service bots for external services.
Index ¶
- Variables
- type Channel
- type ChannelData
- type ChannelOptions
- type ChannelTypes
- type Conservator
- func (s *Conservator) Close()
- func (s *Conservator) GetChannels(integrationID *int32, reply *[][]string) error
- func (s *Conservator) GetRoles(integrationID *int32, reply *[][]string) error
- func (s *Conservator) JoinUser(j *JoinUser, reply *bool) error
- func (s *Conservator) Run()
- func (s *Conservator) VerifyDiscord(args *string, reply *bool) error
- func (s *Conservator) VerifyDiscordChannel(args []string, reply *bool) error
- type EntityName
- type JoinUser
- type Service
- type ServiceOptions
- type ServiceTypes
- type Share
Constants ¶
This section is empty.
Variables ¶
View Source
var NOTIFICATION_TYPES = []string{"kill", "war", "locator", "application", "structure"}
Functions ¶
This section is empty.
Types ¶
type Channel ¶
type Channel struct { IntegrationID int32 `db:"integrationID" json:"integrationID,omitempty"` ChannelID string `db:"channelID" json:"channelID,omitempty"` ChannelName string `db:"channelName" json:"channelName,omitempty"` Services string `db:"services" json:"services,omitempty"` OptionsJSON string `db:"options" json:"-"` Options ChannelOptions `db:"-" json:"options,omitempty"` }
type ChannelData ¶
type ChannelOptions ¶
type ChannelOptions struct { Killmail struct { IgnoreHighSec bool `json:"ignoreHighsec,omitempty"` IgnoreLowSec bool `json:"ignoreLowsec,omitempty"` IgnoreNullSec bool `json:"ignoreNullsec,omitempty"` IgnoreWorthless bool `json:"ignoreWorthless,omitempty"` War bool `json:"war,omitempty"` FactionWar bool `json:"factionWar,omitempty"` SendAll bool `json:"sendAll,omitempty"` SendAllAbyssalT4 bool `json:"sendAllAbyssalT4,omitempty"` } `json:"killmail,omitempty"` }
type ChannelTypes ¶
type ChannelTypes struct { War bool `json:"war,omitempty"` // war notifications Locator bool `json:"locator,omitempty"` // locator agent responses Kill bool `json:"kill,omitempty"` // killmails Structure bool `json:"structure,omitempty"` // structure notifications Application bool `json:"application,omitempty"` // applications to corp }
func (*ChannelTypes) GetServices ¶
func (c *ChannelTypes) GetServices() string
type Conservator ¶
type Conservator struct {
// contains filtered or unexported fields
}
Conservator Handles our little bot.
func NewConservator ¶
func NewConservator(redis *redis.Pool, db *sqlx.DB, addresses []string, discordToken string) *Conservator
NewConservator Service.
func (*Conservator) GetChannels ¶
func (s *Conservator) GetChannels(integrationID *int32, reply *[][]string) error
func (*Conservator) GetRoles ¶
func (s *Conservator) GetRoles(integrationID *int32, reply *[][]string) error
func (*Conservator) VerifyDiscord ¶
func (s *Conservator) VerifyDiscord(args *string, reply *bool) error
func (*Conservator) VerifyDiscordChannel ¶
func (s *Conservator) VerifyDiscordChannel(args []string, reply *bool) error
type EntityName ¶
type Service ¶
type Service struct { Server botservice.Integration `json:"-,omitempty"` IntegrationID int32 `db:"integrationID" json:"integrationID,omitempty"` FactionID int32 `db:"factionID" json:"factionID,omitempty"` Name string `db:"name" json:"name,omitempty"` EntityID int32 `db:"entityID" json:"entityID,omitempty"` EntityName string `db:"entityName" json:"entityName,omitempty"` EntityType string `db:"entityType" json:"entityType,omitempty"` Address string `db:"address" json:"address,omitempty" ` Authentication string `db:"authentication,omitempty"` Type string `db:"type" json:"type,omitempty"` Services string `db:"services" json:"services,omitempty"` OptionsJSON string `db:"options" json:"-"` Options ServiceOptions `db:"-" json:"options,omitempty"` }
type ServiceOptions ¶
type ServiceTypes ¶
type ServiceTypes struct {
Auth bool `json:"auth,omitempty"` // Authentication
}
func (*ServiceTypes) GetServices ¶
func (c *ServiceTypes) GetServices() string
Click to show internal directories.
Click to hide internal directories.