synapse

package
v1.3.4 Latest Latest
Warning

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

Go to latest
Published: Feb 9, 2024 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const PrefixAdminApi = "/_synapse/admin"

Variables

This section is empty.

Functions

func DecodeAllSigningKeys

func DecodeAllSigningKeys(key io.Reader) ([]*homeserver_interop.SigningKey, error)

func DecodeSigningKey

func DecodeSigningKey(key io.Reader) (*homeserver_interop.SigningKey, error)

func EncodeAllSigningKeys

func EncodeAllSigningKeys(keys []*homeserver_interop.SigningKey) ([]byte, error)

func EncodeSigningKey

func EncodeSigningKey(key *homeserver_interop.SigningKey) ([]byte, error)

Types

type LocalMedia

type LocalMedia struct {
	homeserver_interop.ImportDbMedia
	MediaId     string
	ContentType string
	SizeBytes   int64
	CreatedTs   int64
	UploadName  string
	UserId      string
	UrlCache    string
}

type SynDatabase

type SynDatabase struct {
	homeserver_interop.ImportDb[LocalMedia]
	// contains filtered or unexported fields
}

func OpenDatabase

func OpenDatabase(connectionString string) (*SynDatabase, error)

func (*SynDatabase) GetAllMedia

func (d *SynDatabase) GetAllMedia() ([]*LocalMedia, error)

func (*SynDatabase) HasMedia

func (d *SynDatabase) HasMedia(mediaId string) (bool, error)

func (*SynDatabase) InsertMedia

func (d *SynDatabase) InsertMedia(mediaId string, contentType string, sizeBytes int64, createdTs int64, uploadName string, userId string) error

func (*SynDatabase) InsertThumbnail

func (d *SynDatabase) InsertThumbnail(mediaId string, width int, height int, contentType string, method string, sizeBytes int64) error

type SynUserStatRecord

type SynUserStatRecord struct {
	DisplayName string `json:"displayname"`
	UserId      string `json:"user_id"`
	MediaCount  int64  `json:"media_count"`
	MediaLength int64  `json:"media_length"`
}

type SynUserStatsResponse

type SynUserStatsResponse struct {
	Users     []*SynUserStatRecord `json:"users"`
	NextToken int64                `json:"next_token,omitempty"`
	Total     int64                `json:"total"`
}

Jump to

Keyboard shortcuts

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