Documentation
¶
Overview ¶
Package container contains interface and register used for torrent approval hash source
Index ¶
Constants ¶
View Source
const DefaultStorageCtxName = "MW_APPROVAL"
DefaultStorageCtxName default ctx name if value from configuration is not set
Variables ¶
View Source
var ( // ErrContainerDoesNotExist holds error about nonexistent container ErrContainerDoesNotExist = errors.New("torrent hash container with that name does not exist") )
Functions ¶
Types ¶
type Container ¶
type Container interface {
Approved(context.Context, bittorrent.InfoHash) bool
}
Container holds InfoHash and checks if value approved or not
func GetContainer ¶
func GetContainer(name string, config conf.MapConfig, storage storage.DataStorage) (Container, error)
GetContainer creates Container by its name and provided confBytes
Directories
¶
Path | Synopsis |
---|---|
Package directory implements container which checks if hash present in any of torrent file placed in some directory.
|
Package directory implements container which checks if hash present in any of torrent file placed in some directory. |
Package list implements container with pre-defined list of torrent hashes from config file
|
Package list implements container with pre-defined list of torrent hashes from config file |
Click to show internal directories.
Click to hide internal directories.