Documentation
¶
Index ¶
- type Bridge
- type MatrixClient
- func (mc *MatrixClient) ArticleToMessage(article *models.Article) *MatrixMessage
- func (mc *MatrixClient) CreateRoom(newsgroup *models.Newsgroup) (string, error)
- func (mc *MatrixClient) SendArticle(roomID string, article *models.Article) error
- func (mc *MatrixClient) SendMessage(roomID string, message *MatrixMessage) error
- type MatrixEvent
- type MatrixMessage
- type RoomCreateRequest
- type RoomCreateResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Bridge ¶
type Bridge struct {
// contains filtered or unexported fields
}
func (*Bridge) BridgeArticle ¶
type MatrixClient ¶
func NewMatrixClient ¶
func NewMatrixClient(homeserver, accessToken, userID string) *MatrixClient
func (*MatrixClient) ArticleToMessage ¶
func (mc *MatrixClient) ArticleToMessage(article *models.Article) *MatrixMessage
func (*MatrixClient) CreateRoom ¶
func (mc *MatrixClient) CreateRoom(newsgroup *models.Newsgroup) (string, error)
func (*MatrixClient) SendArticle ¶
func (mc *MatrixClient) SendArticle(roomID string, article *models.Article) error
func (*MatrixClient) SendMessage ¶
func (mc *MatrixClient) SendMessage(roomID string, message *MatrixMessage) error
type MatrixEvent ¶
type MatrixMessage ¶
type RoomCreateRequest ¶
type RoomCreateRequest struct {
Name string `json:"name"`
Topic string `json:"topic,omitempty"`
Preset string `json:"preset,omitempty"`
Visibility string `json:"visibility"`
RoomAliasName string `json:"room_alias_name,omitempty"`
InitialState []MatrixEvent `json:"initial_state,omitempty"`
PowerLevels map[string]int `json:"power_level_content_override,omitempty"`
}
type RoomCreateResponse ¶
type RoomCreateResponse struct {
RoomID string `json:"room_id"`
}
Click to show internal directories.
Click to hide internal directories.