matrix

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: 8 Imported by: 0

Documentation

Overview

The matrix package supplies constants and datastructures that are defined by the matrix protocol at http://matrix.org/docs/spec/

TODO: Should be deleted

TODO: Should be deleted

Index

Constants

This section is empty.

Variables

View Source
var (
	// Default invalid Room ID
	NoRoomID RoomID = RoomID{}
	// Default invalid User ID
	NoUserID UserID = UserID{}
	// Default invalid Event ID
	NoEventID EventID = EventID{}
	// Default invalid Room Alias
	NoRoomAlias RoomAlias = RoomAlias{}
)

Functions

This section is empty.

Types

type DomainSpecificString

type DomainSpecificString struct {
	// contains filtered or unexported fields
}

func (DomainSpecificString) Compare

func (DomainSpecificString) Domain

func (dss DomainSpecificString) Domain() string

func (DomainSpecificString) IsMine

func (dss DomainSpecificString) IsMine() bool

func (DomainSpecificString) Localpart

func (dss DomainSpecificString) Localpart() string

func (DomainSpecificString) String

func (dss DomainSpecificString) String() string

type ErrorCode

type ErrorCode string

Enumerates the protocol defined errors that can be returned when performing a REST request to the server.

const (
	M_FORBIDDEN               ErrorCode = "M_FORBIDDEN"
	M_UNKNOWN_TOKEN           ErrorCode = "M_UNKNOWN_TOKEN"
	M_BAD_JSON                ErrorCode = "M_BAD_JSON"
	M_NOT_JSON                ErrorCode = "M_NOT_JSON"
	M_NOT_FOUND               ErrorCode = "M_NOT_FOUND"
	M_LIMIT_EXCEEDED          ErrorCode = "M_LIMIT_EXCEEDED"
	M_USER_IN_USE             ErrorCode = "M_USER_IN_USE"
	M_ROOM_IN_USE             ErrorCode = "M_ROOM_IN_USE"
	M_BAD_PAGINATION          ErrorCode = "M_BAD_PAGINATION"
	M_LOGIN_EMAIL_URL_NOT_YET ErrorCode = "M_LOGIN_EMAIL_URL_NOT_YET"
)

type EventID

type EventID struct{ DomainSpecificString }

func GenerateEventID

func GenerateEventID() (ev EventID, err error)

func NewEventID

func NewEventID(localpart, domain string) (EventID, error)

func ParseEventID

func ParseEventID(s string) (EventID, error)

type RoomAlias

type RoomAlias struct{ DomainSpecificString }

func NewRoomAlias

func NewRoomAlias(localpart, domain string) (RoomAlias, error)

func ParseRoomAlias

func ParseRoomAlias(s string) (RoomAlias, error)

type RoomID

type RoomID struct{ DomainSpecificString }

func GenerateRoomID

func GenerateRoomID() (RoomID, error)

func NewRoomID

func NewRoomID(localpart, domain string) (RoomID, error)

func ParseRoomID

func ParseRoomID(s string) (RoomID, error)

type RoomJoinRule

type RoomJoinRule string

Enumerates the different kinds of join rules that a room can have.

const (
	JOIN_PUBLIC  RoomJoinRule = "public"
	JOIN_KNOCK   RoomJoinRule = "knock"
	JOIN_INVITE  RoomJoinRule = "invite"
	JOIN_PRIVATE RoomJoinRule = "private"
)

type RoomMembership

type RoomMembership string
const (
	MEMBERSHIP_NONE   RoomMembership = "none"
	MEMBERSHIP_INVITE RoomMembership = "invite"
	MEMBERSHIP_JOIN   RoomMembership = "join"
	MEMBERSHIP_LEAVE  RoomMembership = "leave"
	MEMBERSHIP_BAN    RoomMembership = "ban"
)

type UserID

type UserID struct{ DomainSpecificString }

func NewUserID

func NewUserID(localpart, domain string) (UserID, error)

func ParseUserID

func ParseUserID(s string) (UserID, error)

Jump to

Keyboard shortcuts

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