matrix

package module
v0.0.0-...-007f2ab Latest Latest
Warning

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

Go to latest
Published: Jan 13, 2023 License: AGPL-3.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

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

func NewClient

func NewClient(config *Config, db *sql.DB) (*Client, error)

func (*Client) Broadcast

func (c *Client) Broadcast(message *event.MessageEventContent) (success bool)

func (*Client) Encrypt

func (c *Client) Encrypt() error

func (*Client) Login

func (c *Client) Login() error

func (*Client) Send

func (c *Client) Send(roomID id.RoomID, message *event.MessageEventContent) error

func (*Client) Sync

func (c *Client) Sync(ctx context.Context, cancel context.CancelFunc, wg *sync.WaitGroup)

type Config

type Config struct {
	AllowedRooms   []string `json:"allowed_rooms"`
	DeviceName     string   `json:"device_name"`
	Greeting       string
	LogLevel       uint   `json:"log_level"`
	HomeserverURL  string `json:"homeserver_url"`
	UserIdentifier string `json:"user_identifier"`
	Password       string
	PickleKey      string `json:"pickle_key"`
}

Jump to

Keyboard shortcuts

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