acls

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Nov 3, 2024 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const MRoomServerACL = "m.room.server_acl"

Variables

This section is empty.

Functions

This section is empty.

Types

type ServerACL

type ServerACL struct {
	Allowed         []string `json:"allow"`
	Denied          []string `json:"deny"`
	AllowIPLiterals bool     `json:"allow_ip_literals"`
}

type ServerACLDatabase

type ServerACLDatabase interface {
	// RoomsWithACLs returns all room IDs for rooms with ACLs
	RoomsWithACLs(ctx context.Context) ([]string, error)

	// GetBulkStateContent returns all state events which match a given room ID and a given state key tuple. Both must be satisfied for a match.
	// If a tuple has the StateKey of '*' and allowWildcards=true then all state events with the EventType should be returned.
	GetBulkStateContent(ctx context.Context, roomIDs []string, tuples []gomatrixserverlib.StateKeyTuple, allowWildcards bool) ([]tables.StrippedEvent, error)
}

type ServerACLs

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

func NewServerACLs

func NewServerACLs(db ServerACLDatabase) *ServerACLs

func (*ServerACLs) IsServerBannedFromRoom

func (s *ServerACLs) IsServerBannedFromRoom(serverName spec.ServerName, roomID string) bool

func (*ServerACLs) OnServerACLUpdate

func (s *ServerACLs) OnServerACLUpdate(strippedEvent tables.StrippedEvent)

Jump to

Keyboard shortcuts

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