Documentation
¶
Index ¶
- Variables
- type A
- type Follows
- func (f *Follows) AddFollow(pub []byte)
- func (f *Follows) AdminRelays() []string
- func (f *Follows) Configure(cfg ...any) (err error)
- func (f *Follows) GetACLInfo() (name, description, documentation string)
- func (f *Follows) GetAccessLevel(pub []byte, address string) (level string)
- func (f *Follows) GetFollowedPubkeys() [][]byte
- func (f *Follows) SetFollowListUpdateCallback(callback func())
- func (f *Follows) Syncer()
- func (f *Follows) Type() string
- type Managed
- func (m *Managed) CheckPolicy(ev *event.E) (allowed bool, err error)
- func (m *Managed) Configure(cfg ...any) (err error)
- func (m *Managed) GetACLInfo() (name, description, documentation string)
- func (m *Managed) GetAccessLevel(pub []byte, address string) (level string)
- func (m *Managed) GetManagedACL() *database.ManagedACL
- func (m *Managed) IsIPBlocked(ip string) bool
- func (m *Managed) Syncer()
- func (m *Managed) Type() string
- func (m *Managed) UpdatePeerAdmins(peerPubkeys [][]byte)
- type None
- func (n None) CheckPolicy(ev *event.E) (allowed bool, err error)
- func (n *None) Configure(cfg ...any) (err error)
- func (n None) GetACLInfo() (name, description, documentation string)
- func (n *None) GetAccessLevel(pub []byte, address string) (level string)
- func (n None) Syncer()
- func (n None) Type() string
- type S
- func (s *S) AddFollow(pub []byte)
- func (s *S) CheckPolicy(ev *event.E) (allowed bool, err error)
- func (s *S) Configure(cfg ...any) (err error)
- func (s *S) GetACLInfo() (name, description, documentation string)
- func (s *S) GetAccessLevel(pub []byte, address string) (level string)
- func (s *S) Register(i acliface.I)
- func (s *S) SetMode(m string)
- func (s *S) Syncer()
- func (s *S) Type() (typ string)
Constants ¶
This section is empty.
Variables ¶
View Source
var Registry = &S{}
Functions ¶
This section is empty.
Types ¶
type Follows ¶
func (*Follows) AddFollow ¶ added in v0.8.0
AddFollow appends a pubkey to the in-memory follows list if not already present and signals the syncer to refresh subscriptions.
func (*Follows) AdminRelays ¶ added in v0.17.14
AdminRelays returns the admin relay URLs
func (*Follows) GetACLInfo ¶
func (*Follows) GetAccessLevel ¶
func (*Follows) GetFollowedPubkeys ¶ added in v0.6.0
GetFollowedPubkeys returns a copy of the followed pubkeys list
type Managed ¶ added in v0.17.0
func (*Managed) CheckPolicy ¶ added in v0.17.0
func (*Managed) GetACLInfo ¶ added in v0.17.0
func (*Managed) GetAccessLevel ¶ added in v0.17.0
func (*Managed) GetManagedACL ¶ added in v0.17.0
func (m *Managed) GetManagedACL() *database.ManagedACL
GetManagedACL returns the managed ACL database instance
func (*Managed) IsIPBlocked ¶ added in v0.17.0
IsIPBlocked checks if an IP address is blocked
type None ¶
type None struct {
// contains filtered or unexported fields
}
func (None) CheckPolicy ¶ added in v0.16.0
func (*None) GetAccessLevel ¶
type S ¶
func (*S) AddFollow ¶ added in v0.8.0
AddFollow forwards a pubkey to the active ACL if it supports dynamic follows
func (*S) CheckPolicy ¶ added in v0.17.0
CheckPolicy checks if an event is allowed by the active ACL policy
func (*S) SetMode ¶ added in v0.34.3
SetMode sets the active ACL mode and syncs it to the mode package for packages that need to check the mode without importing acl (to avoid cycles).
Source Files
¶
- acl.go
- follows.go
- managed.go
- none.go
Click to show internal directories.
Click to hide internal directories.