config

package
v1.16.0 Latest Latest
Warning

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

Go to latest
Published: Feb 27, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Overview

Package config provide configuration.

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrEmptyPath = errors.New("config path is empty")
)

ErrEmptyPath returned when empty path is passed.

Functions

This section is empty.

Types

type Config

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

Config represents config for InstaDiff service.

func Load

func Load(ctx context.Context, path string) (Config, error)

Load loads config from passed filepath.

func (Config) IsLocalDBEnabled

func (c Config) IsLocalDBEnabled() bool

IsLocalDBEnabled returns local DB enabled status.

func (Config) MongoConfigURL

func (c Config) MongoConfigURL() string

MongoConfigURL returns configured MongoDB URL.

func (Config) MongoDBName

func (c Config) MongoDBName() string

MongoDBName returns configured MongoDB name.

func (Config) Sleep

func (c Config) Sleep() time.Duration

Sleep returns wait duration from for instagram operations to avoid blocks.

func (Config) UnFollowLimits

func (c Config) UnFollowLimits() int

UnFollowLimits returns unFollow action daily limits.

func (Config) Whitelist

func (c Config) Whitelist() map[string]struct{}

Whitelist returns map of whitelisted users.

Jump to

Keyboard shortcuts

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