Documentation ¶
Index ¶
- Constants
- func ConvertTopicToConfURI(topic string) (confURI sip.Uri, err error)
- func SearchForAUser(user User, users []User) (i int, err error)
- type ConfDescription
- type ConfInfo
- type ConfServer
- func (cs *ConfServer) AddConfInfo(confInfo ConfInfo) *ConfInfo
- func (cs *ConfServer) AddUserToTopic(topic string, user User) (err error)
- func (cs *ConfServer) GetAllTopics() (topics []string)
- func (cs *ConfServer) GetConfInfoByTopic(topic string) (conf *ConfInfo, err error)
- func (cs *ConfServer) RemoveUserFromTopic(topic string, user User) (err error)
- func (cs *ConfServer) String() (s string)
- type ConfState
- type User
Constants ¶
const PubSubHostString string = "pubsubserver.com"
Variables ¶
This section is empty.
Functions ¶
func ConvertTopicToConfURI ¶
Generate a Conference URI from a Topic string The ConfURI can be long and randomly generated, but in this implementation it is predictable for easy debug
Types ¶
type ConfInfo ¶
type ConfInfo struct { ConfID string ConfURI sip.Uri // Basic implementation from RFC4575 ConfDescription ConfState }
Conference Information
func NewConfInfo ¶
Create a new Conference Information
type ConfServer ¶
Conference Server Can be reached at its FactoryURI Maintains the slice of ConfInfo <-> Topics
func NewConfServer ¶
func NewConfServer(fURI sip.Uri) (newConfServer *ConfServer)
Create a new Conference Server with an empty database of of TopicToConfInfo
func (*ConfServer) AddConfInfo ¶
func (cs *ConfServer) AddConfInfo(confInfo ConfInfo) *ConfInfo
Create a new Conference Information for the corresponding Topic After that save that newly create ConfInfo to the slice of ConfInfo
func (*ConfServer) AddUserToTopic ¶
func (cs *ConfServer) AddUserToTopic(topic string, user User) (err error)
Find a topic then add new user to that topic
func (*ConfServer) GetAllTopics ¶
func (cs *ConfServer) GetAllTopics() (topics []string)
Return all topics handled by a Conference Server
func (*ConfServer) GetConfInfoByTopic ¶
func (cs *ConfServer) GetConfInfoByTopic(topic string) (conf *ConfInfo, err error)
Retrieve a ConfInfo using Topic as a search key
func (*ConfServer) RemoveUserFromTopic ¶
func (cs *ConfServer) RemoveUserFromTopic(topic string, user User) (err error)
TODO add RemoveUserFromTopic
func (*ConfServer) String ¶
func (cs *ConfServer) String() (s string)