acls

package
v0.13.5 Latest Latest
Warning

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

Go to latest
Published: Dec 12, 2023 License: Apache-2.0 Imports: 11 Imported by: 4

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 {
	// GetKnownRooms returns a list of all rooms we know about.
	GetKnownRooms(ctx context.Context) ([]string, error)
	// GetStateEvent returns the state event of a given type for a given room with a given state key
	// If no event could be found, returns nil
	// If there was an issue during the retrieval, returns an error
	GetStateEvent(ctx context.Context, roomID, evType, stateKey string) (*types.HeaderedEvent, 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(state gomatrixserverlib.PDU)

Jump to

Keyboard shortcuts

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