acls

package
v0.0.0-...-2154053 Latest Latest
Warning

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

Go to latest
Published: Oct 25, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

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) (*gomatrixserverlib.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 gomatrixserverlib.ServerName, roomID string) bool

func (*ServerACLs) OnServerACLUpdate

func (s *ServerACLs) OnServerACLUpdate(state *gomatrixserverlib.Event)

Jump to

Keyboard shortcuts

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