lib

package
v0.9.2 Latest Latest
Warning

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

Go to latest
Published: May 7, 2018 License: MIT Imports: 8 Imported by: 7

Documentation

Index

Constants

View Source
const (
	SESSION_INTERVAL time.Duration = 24 * time.Hour
	SESSION_RETRY    time.Duration = 30 * time.Second
)

Variables

View Source
var (
	Sessions = make(map[string]*Session)
)

Functions

func IsDupMessage

func IsDupMessage(key, m string) bool

Types

type Chat

type Chat interface {
	GetLabel() string
	MinScore() int
	SetGroup(g Group)
	Group() Group
	Chan() chan *Message
	Exit()
}

type Group

type Group interface {
	GetChats() []Chat
	GetInputs() []Input
	GetName() string
	Chan() chan *Message
	Exit()
}

type Input

type Input interface {
	StartSession()
	SetGroup(g Group)
	DelGroup(g Group)
	GetScore() int
	HasAlarms() bool
	GetLabel() string
	Clean()
	Purge()
	Exit()
}

type Message

type Message struct {
	Origin interface{}
	Score  int
	Msg    string
}

type Plugin

type Plugin interface {
	MinScore() int
	Group() Group
}

type Session

type Session struct {
	Profile string
	Region  string
	Svc     *sqs.SQS
	// contains filtered or unexported fields
}

func NewSession

func NewSession(profile string, region string) *Session

Jump to

Keyboard shortcuts

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