Documentation ¶
Index ¶
- Variables
- func ArrayContains(a []string, v string) bool
- func CalcBlockForDuration(timeoutMs string) (time.Duration, error)
- func CanInline(ct string) bool
- func DecodeUnpaddedBase64String(val string) ([]byte, error)
- func EncodeCanonicalJson(obj any) ([]byte, error)
- func EncodeUnpaddedBase64ToString(val []byte) string
- func ExtensionForContentType(ct string) string
- func FixContentType(ct string) string
- func FromMillis(m int64) time.Time
- func GenerateRandomString(nBytes int) (string, error)
- func GetAccessTokenFromRequest(request *http.Request) string
- func GetAppserviceUserIdFromRequest(request *http.Request) string
- func GetHourBucket(ts int64) int64
- func GetLogSafeQueryString(r *http.Request) string
- func GetLogSafeUrl(r *http.Request) string
- func GetOurDomains() []string
- func HasAnyPrefix(val string, prefixes []string) bool
- func IsGlobalAdmin(userId string) bool
- func IsHostIgnored(serverName string) bool
- func IsServerOurs(server string) bool
- func MakeUrl(parts ...string) string
- func MaxInt(a int, b int) int
- func MinFloat32(a float32, b float32) float32
- func MinInt(a int, b int) int
- func MxcUri(origin string, mediaId string) string
- func NowMillis() int64
- func SplitMxc(mxc string) (string, string, error)
- func SplitUserId(userId string) (string, string, error)
- func ToUtf8(text string, possibleContentType string) string
- type MatrixMediaPart
- type XMatrixAuth
Constants ¶
This section is empty.
Variables ¶
View Source
var InlineContentTypes = []string{
"text/css",
"text/plain",
"text/csv",
"application/json",
"application/ld+json",
"image/jpeg",
"image/gif",
"image/png",
"image/apng",
"image/webp",
"image/avif",
"video/mp4",
"video/webm",
"video/ogg",
"video/quicktime",
"audio/mp4",
"audio/webm",
"audio/aac",
"audio/mpeg",
"audio/ogg",
"audio/wave",
"audio/wav",
"audio/x-wav",
"audio/x-pn-wav",
"audio/flac",
"audio/x-flac",
}
Functions ¶
func ArrayContains ¶
func EncodeCanonicalJson ¶
func ExtensionForContentType ¶
func FixContentType ¶
func FromMillis ¶
func GenerateRandomString ¶
func GetHourBucket ¶
func GetLogSafeQueryString ¶
func GetLogSafeUrl ¶
func GetOurDomains ¶
func GetOurDomains() []string
func HasAnyPrefix ¶
func IsGlobalAdmin ¶
func IsHostIgnored ¶
func IsServerOurs ¶
func MinFloat32 ¶
Types ¶
type MatrixMediaPart ¶ added in v1.3.5
type MatrixMediaPart struct { Header textproto.MIMEHeader Body io.ReadCloser }
func MatrixMediaPartFromMimeMultipart ¶ added in v1.3.5
func MatrixMediaPartFromMimeMultipart(p *multipart.Part) *MatrixMediaPart
func MatrixMediaPartFromResponse ¶ added in v1.3.5
func MatrixMediaPartFromResponse(r *http.Response) *MatrixMediaPart
type XMatrixAuth ¶ added in v1.3.5
func GetXMatrixAuth ¶ added in v1.3.5
func GetXMatrixAuth(headers []string) ([]XMatrixAuth, error)
Source Files ¶
Click to show internal directories.
Click to hide internal directories.