acl

package
v0.13.1 Latest Latest
Warning

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

Go to latest
Published: Oct 10, 2025 License: Unlicense Imports: 31 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Registry = &S{}

Functions

This section is empty.

Types

type A

type A struct{ S }

type Follows

type Follows struct {
	Ctx context.Context

	*database.D
	// contains filtered or unexported fields
}

func (*Follows) AddFollow added in v0.8.0

func (f *Follows) AddFollow(pub []byte)

AddFollow appends a pubkey to the in-memory follows list if not already present and signals the syncer to refresh subscriptions.

func (*Follows) Configure

func (f *Follows) Configure(cfg ...any) (err error)

func (*Follows) GetACLInfo

func (f *Follows) GetACLInfo() (name, description, documentation string)

func (*Follows) GetAccessLevel

func (f *Follows) GetAccessLevel(pub []byte, address string) (level string)

func (*Follows) GetFollowedPubkeys added in v0.6.0

func (f *Follows) GetFollowedPubkeys() [][]byte

GetFollowedPubkeys returns a copy of the followed pubkeys list

func (*Follows) Syncer

func (f *Follows) Syncer()

func (*Follows) Type

func (f *Follows) Type() string

type None

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

func (*None) Configure

func (n *None) Configure(cfg ...any) (err error)

func (None) GetACLInfo

func (n None) GetACLInfo() (name, description, documentation string)

func (*None) GetAccessLevel

func (n *None) GetAccessLevel(pub []byte, address string) (level string)

func (None) Syncer

func (n None) Syncer()

func (None) Type

func (n None) Type() string

type S

type S struct {
	ACL    []acl.I
	Active atomic.String
}

func (*S) AddFollow added in v0.8.0

func (s *S) AddFollow(pub []byte)

AddFollow forwards a pubkey to the active ACL if it supports dynamic follows

func (*S) Configure

func (s *S) Configure(cfg ...any) (err error)

func (*S) GetACLInfo

func (s *S) GetACLInfo() (name, description, documentation string)

func (*S) GetAccessLevel

func (s *S) GetAccessLevel(pub []byte, address string) (level string)

func (*S) Register

func (s *S) Register(i acl.I)

func (*S) Syncer

func (s *S) Syncer()

func (*S) Type

func (s *S) Type() (typ string)

Source Files

  • acl.go
  • follows.go
  • none.go

Jump to

Keyboard shortcuts

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