goMatrix: github.com/geir54/goMatrix Index | Files | Directories

package goMatrix

import "github.com/geir54/goMatrix"


Package Files

main.go room.go sessionManagement.go sync.go

type RoomInfo Uses

type RoomInfo struct {
    Name string

RoomInfo - Information about a room

type RoomMessage Uses

type RoomMessage struct {
    RoomID   string
    RoomName string
    Sender   string
    Text     string

RoomMessage - Message from a room

type Session Uses

type Session struct {
    NextBatch   string
    Rooms       map[string]RoomInfo // The rooms a user is part of
    AccessToken string
    HomeServer  string
    OnNewMsg    chan RoomMessage
    OnJoin      chan string // When we find a new room
    TxnID       int
    // contains filtered or unexported fields

Session .

func Init Uses

func Init(homeserver string) *Session

Init .

func (*Session) Close Uses

func (session *Session) Close()

Close closes everything down

func (*Session) Login Uses

func (session *Session) Login(user, password string) error

Login .

func (*Session) RoomNameToID Uses

func (session *Session) RoomNameToID(roomName string) string

RoomNameToID - get the room id from a room name

func (*Session) SendToRoom Uses

func (session *Session) SendToRoom(room, message string) error

SendToRoom - Send message to room

func (*Session) Start Uses

func (session *Session) Start()

Start ..

func (*Session) Sync Uses

func (session *Session) Sync() error

Sync .



Package goMatrix imports 8 packages (graph) and is imported by 1 packages. Updated 2016-07-17. Refresh now. Tools for package owners.