objects

package
v0.0.0-...-1cbd5f8 Latest Latest
Warning

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

Go to latest
Published: Jan 15, 2015 License: Apache-2.0 Imports: 3 Imported by: 4

Documentation

Overview

TODO(): This code needs to be moved to some other place in pallium. This is

not rest specific code.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Content

type Content map[string]interface{}

type Event

type Event struct {
	EventID   string  `json:"event_id"`
	EventType string  `json:"type"`
	Content   Content `json:"content"`
	RoomID    string  `json:"room_id"`
	UserID    string  `json:"user_id"`
}

type ForwardStreamToken

type ForwardStreamToken struct {
	TopologicalOrder uint64
}

func NewForwardStreamToken

func NewForwardStreamToken(o uint64) ForwardStreamToken

func (ForwardStreamToken) String

func (t ForwardStreamToken) String() string

type InitialSync

type InitialSync struct {
	End      string                `json:"end"`
	Presence []InitialSyncEvent    `json:"presence,omitempty"`
	Rooms    []InitialSyncRoomData `json:"rooms,omitempty"`
}

type InitialSyncEvent

type InitialSyncEvent struct {
	Type    string  `json:"type"`
	Content Content `json:"content"`
}

type InitialSyncRoomData

type InitialSyncRoomData struct {
	Membership string           `json:"membership"`
	RoomID     string           `json:"room_id"`
	Messages   *PaginationChunk `json:"messages,omitempty"`
	State      []Event          `json:"state"`
}

type PaginationChunk

type PaginationChunk struct {
	Start string  `json:"start"`
	End   string  `json:"end"`
	Chunk []Event `json:"chunk"`
}

type PaginationStreamToken

type PaginationStreamToken struct {
	ForwardStreamToken
	StreamingOrder uint64
}

func NewPaginationStreamToken

func NewPaginationStreamToken(to, so uint64) PaginationStreamToken

func (PaginationStreamToken) String

func (t PaginationStreamToken) String() string

type StreamToken

type StreamToken interface {
	String() string
}

func ParseStreamToken

func ParseStreamToken(s string) (StreamToken, error)

Jump to

Keyboard shortcuts

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