acls

package
v0.14.1 Latest Latest
Warning

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

Go to latest
Published: Jan 16, 2025 License: AGPL-3.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)

	// GetBulkStateACLs returns all server ACLs for the given rooms.
	GetBulkStateACLs(ctx context.Context, roomIDs []string) ([]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