githubbot

package module
v0.0.0-...-a3a4006 Latest Latest
Warning

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

Go to latest
Published: Nov 9, 2015 License: GPL-2.0 Imports: 12 Imported by: 1

README

gitbot

Listens for github webhook events and posts them as messages to a Euphoria room.

Documentation

Index

Constants

View Source
const (
	PingReplyType = "ping-reply"
	PingEventType = "ping-event"

	SendType      = "send"
	SendEventType = "send-event"
	SendReplyType = "send-reply"

	NickType      = "nick"
	NickReplyType = "nick-reply"
	NickEventType = "nick-event"

	JoinEventType = "join-event"

	PartEventType = "part-event"

	AuthType = "auth"

	BounceEventType = "bounce-event"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type AuthCommand

type AuthCommand struct {
	Type     string `json:"type"`
	Passcode string `json:"passcode,omitempty"`
}

type Message

type Message struct {
	ID              string `json:"id"`
	Parent          string `json:"parent"`
	PreviousEditID  string `json:"previous_edit_id,omitempty"`
	Time            int64  `json:"time"`
	Sender          User   `json:"sender"`
	Content         string `json:"content"`
	EncryptionKeyID string `json:"encryption_key_id,omitempty"`
	Edited          int    `json:"edited,omitempty"`
	Deleted         int    `json:"deleted,omitempty"`
}

type NickCommand

type NickCommand struct {
	Name string `json:"name"`
}

type PacketEvent

type PacketEvent struct {
	ID    string          `json:"id"`
	Type  PacketType      `json:"type"`
	Data  json.RawMessage `json:"data,omitempty"`
	Error string          `json:"error,omitempty"`
}

func (*PacketEvent) Payload

func (p *PacketEvent) Payload() (interface{}, error)

type PacketType

type PacketType string

type PingEvent

type PingEvent struct {
	Time int64 `json:"time"`
	Next int64 `json:"next"`
}

type PingReply

type PingReply struct {
	UnixTime int64 `json:"time,omitempty"`
}

type SendCommand

type SendCommand struct {
	Content string `json:"content"`
	Parent  string `json:"parent"`
}

type SendEvent

type SendEvent Message

type SendReply

type SendReply Message

type Session

type Session struct {
	RoomName string
	// contains filtered or unexported fields
}

func NewSession

func NewSession(roomName, password string, port int, secret string, logger *logrus.Logger) (*Session, error)

func (*Session) Run

func (s *Session) Run()

type User

type User struct {
	ID        string `json:"id"`
	Name      string `json:"name"`
	ServerID  string `json:"server_id"`
	ServerEra string `json:"server_era"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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