config

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Nov 14, 2022 License: BSD-2-Clause Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultPropertiesTable   = "properties"
	DefaultCondominiumsTable = "condominiums"
	DefaultBannersTable      = "banners"
	DefaultBrokersTable      = "brokers"
)

Variables

This section is empty.

Functions

func SaveWith

func SaveWith(kvs ...any) error

Types

type CmdCfg

type CmdCfg struct {
	TenantId       string
	IgnoreLastSync bool
}

type DB

type DB struct {
	ConnectionString string `mapstructure:"connection_string"`
}

type JetimobCfg

type JetimobCfg struct {
	DB                        DB              `mapstructure:"db"`
	WebserviceKey             *string         `mapstructure:"webservice_key"`
	LastSync                  *time.Time      `mapstructure:"last_sync"` // última vez que houve uma sincronização com a Jetimob
	TenantDiscriminatorColumn *string         `mapstructure:"tenant_column"`
	TenantMapping             []TenantMapping `mapstructure:"tenant_mapping"`
	TruncateAll               bool            `mapstructure:"truncate_all"`
	Mappings                  Mappings        `mapstructure:"mappings"`
	CmdCfg                    CmdCfg
}

type Mappings

type Mappings struct {
	CondominiumsTable *string        `mapstructure:"condominiums_table"`
	PropertiesTable   *string        `mapstructure:"properties_table"`
	BrokersTable      *string        `mapstructure:"brokers_table"`
	BannersTable      *string        `mapstructure:"banners_table"`
	Condominiums      map[string]any `mapstructure:"condominiums"`
	Properties        map[string]any `mapstructure:"properties"`
	Brokers           map[string]any `mapstructure:"brokers"`
	Banners           map[string]any `mapstructure:"banners"`
}

type TenantMapping

type TenantMapping struct {
	Identifier    string `mapstructure:"identifier"`
	WebserviceKey string `mapstructure:"webservice_key"`
}

Jump to

Keyboard shortcuts

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