policy

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Dec 17, 2021 License: Apache-2.0, MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Policy

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

func New

func New(cfg config.Policy) (*Policy, error)

func (*Policy) Allowed

func (p *Policy) Allowed(providerID peer.ID) bool

Allowed returns true if the policy allows the provider to index content. This check does not check whether the provider is trusted. An allowed provider must still be verified.

func (*Policy) Trusted

func (p *Policy) Trusted(providerID peer.ID) bool

Trusted returns true if the provider is explicitly trusted. A trusted provider is allowed to register without requiring verification.

Jump to

Keyboard shortcuts

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