Documentation
¶
Index ¶
- func ComparePassword(hashedPassword string, currPassword []byte) bool
- func HashPasswod(password string) (string, error)
- func NewClient() (tlsClient.HttpClient, error)
- func RandomEmail() string
- func RandomInt() int
- func RandomInt64(min, max int64) int64
- func RandomOwner() string
- func RandomString(n int) string
- type Config
- type EndpointsConfig
- type RightMoveConfig
- type RightMoveParams
- type ScraperConfig
- type ZooplaConfig
- type ZooplaParams
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ComparePassword ¶
func HashPasswod ¶
func NewClient ¶
func NewClient() (tlsClient.HttpClient, error)
func RandomInt64 ¶
RandomInt generates a random integer between min and max
func RandomString ¶
RandomString generates a random string of length n
Types ¶
type Config ¶
type Config struct { Environment string `mapstructure:"ENVIRONMENT"` DBDriver string `mapstructure:"DB_DRIVER"` DBSource string `mapstructure:"DB_SOURCE"` RedisAddress string `mapstructure:"REDIS_ADDRESS"` MigrationURL string `mapstructure:"MIGRATION_URL"` HTTPServerAddress string `mapstructure:"HTTP_SERVER_ADDRESS"` GRPCServerAddress string `mapstructure:"GRPC_SERVER_ADDRESS"` TokenSymmetricKey string `mapstructure:"TOKEN_SYMMETRIC_KEY"` AccessTokenDuration time.Duration `mapstructure:"ACCESS_TOKEN_DURATION"` RefreshTokenDuration time.Duration `mapstructure:"REFRESH_TOKEN_DURATION"` EmailSenderName string `mapstructure:"EMAIL_SENDER_NAME"` EmailSenderAddress string `mapstructure:"EMAIL_SENDER_ADDRESS"` EmailSenderPassword string `mapstructure:"EMAIL_SENDER_PASSWORD"` }
Config stores all configuration of the application The values are ready by viper from a config file or environment variables.
func LoadConfig ¶
LoadConfig reads configuration from file or environment variables.
type EndpointsConfig ¶
type RightMoveConfig ¶
type RightMoveConfig struct {
Params RightMoveParams `mapstructure:"params"`
}
type RightMoveParams ¶
type RightMoveParams struct { LocationIdentifier string `mapstructure:"locationIdentifier"` MaxBedrooms string `mapstructure:"maxBedrooms"` MinBedrooms string `mapstructure:"minBedrooms"` MaxPrice string `mapstructure:"maxPrice"` MinPrice string `mapstructure:"minPrice"` NumberOfPropertiesPerPage string `mapstructure:"numberOfPropertiesPerPage"` Radius string `mapstructure:"radius"` SortType string `mapstructure:"sortType"` Index string `mapstructure:"index"` PropertyTypes []string `mapstructure:"propertyTypes"` IncludeSSTC string `mapstructure:"includeSSTC"` ViewType string `mapstructure:"viewType"` MustHave []string `mapstructure:"mustHave"` DontShow []string `mapstructure:"dontShow"` Channel string `mapstructure:"channel"` AreaSizeUnit string `mapstructure:"areaSizeUnit"` CurrencyCode string `mapstructure:"currencyCode"` IsFetching string `mapstructure:"isFetching"` }
type ScraperConfig ¶
type ScraperConfig struct { DBSource string `mapstructure:"db_source"` Environment string `mapstructure:"environment"` EmailSenderName string `mapstructure:"email_sender_name"` EmailSenderAddress string `mapstructure:"email_sender_address"` EmailSenderPassword string `mapstructure:"email_sender_password"` RightMove RightMoveConfig `mapstructure:"rightmove"` Zoopla ZooplaConfig `mapstructure:"zoopla"` Endpoints EndpointsConfig `mapstructure:"endpoints"` }
func LoadScraperConfig ¶
func LoadScraperConfig(path string) (config ScraperConfig, err error)
type ZooplaConfig ¶
type ZooplaConfig struct {
Params ZooplaParams `mapstructure:"params"`
}
type ZooplaParams ¶
type ZooplaParams struct { PriceMax string `mapstructure:"price_max"` Q string `mapstructure:"q"` Radius string `mapstructure:"radius"` SearchSource string `mapstructure:"search_source"` BedsMax string `mapstructure:"beds_max"` BedsMin string `mapstructure:"beds_min"` Feature []string `mapstructure:"feature"` IsAuction string `mapstructure:"is_auction"` IsRetirementHome string `mapstructure:"is_retirement_home"` NewHomes string `mapstructure:"new_homes"` PropertySubType []string `mapstructure:"property_sub_type"` }
Click to show internal directories.
Click to hide internal directories.