Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // DefaultCacheTime is redis caching time. // Default value is 1 day (24 hours) if redis client is set. DefaultCacheTime = 24 * time.Hour // DefaultCleanImageURL for cleaning image url. DefaultCleanImageURL = true // DefaultCleanVideoURL for cleaning video url. DefaultCleanVideoURL = true // DefaultVerbose for default verbose boolean value. DefaultVerbose = mallogger.LevelZero // DefaultConfig for default malscraper config with its default field value. DefaultConfig = Config{ RedisClient: nil, RedisConfig: nil, CacheTime: 0, CleanImageURL: DefaultCleanImageURL, CleanVideoURL: DefaultCleanVideoURL, Verbose: DefaultVerbose, } )
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { // Redis client and configuration for caching parsing data. // RedisClient will be assigned automatically if RedisConfig is set. // RedisClient can also be assigned directly without RedisConfig. // For more information, read `github.com/go-redis/redis/v7`. RedisClient *redis.Client RedisConfig *redis.Options // Expired time limit of the cached data (in seconds). CacheTime time.Duration // Does malscraper need to automatically clean any image url using // pkg/malscraper/utils.ImageURLCleaner() function. CleanImageURL bool // Does malscraper need to automatically clean any video url using // pkg/malscraper/utils.VideoURLCLeaner() function. CleanVideoURL bool // Using or expressed in more detailed information to console. Verbose int }
Config is config model for go-malscraper.
Click to show internal directories.
Click to hide internal directories.