Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // is not allowed to get. ErrUnauthorized = errors.New("peer not authorized for requested file") // ErrIncorrectHashSize is returned when using a hash that is not hashSize. ErrIncorrectHashSize = errors.Errorf("file hash should be %d bytes", hashSize) )
Functions ¶
This section is empty.
Types ¶
type ACL ¶
type ACL interface { // Authorize gives a list of peers access to a file hash. Authorize(context.Context, []peer.ID, []byte) error // IsAuthorized checks if a peer is authorized for a file hash. IsAuthorized(context.Context, peer.ID, []byte) (bool, error) }
ACL handles permissions on the files in the storage.
Click to show internal directories.
Click to hide internal directories.