config

package
v1.5.1 Latest Latest
Warning

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

Go to latest
Published: Mar 20, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// DefaultApiURL is the standard base URL for the fullstory.com API.
	DefaultApiURL         = "https://api.fullstory.com"
	DefaultSegmentId      = "everyone"
	DefaultExportDelay    = 24 * time.Hour
	DefaultExportDuration = 1 * time.Hour
	MinExportDuration     = 15 * time.Minute
	MaxExportDuration     = 24 * time.Hour
)

Variables

This section is empty.

Functions

func Validate

func Validate(conf *Config, getNow func() time.Time) error

Types

type BigQueryConfig

type BigQueryConfig struct {
	Project             string
	Dataset             string
	ExportTable         string
	SyncTable           string
	PartitionExpiration Duration
}

type Config

type Config struct {
	// Deprecated: Use Provider instead
	Warehouse            string
	Provider             Provider
	FsApiToken           string
	ExportDuration       Duration
	ExportDelay          Duration
	AdditionalHttpHeader []Header
	Backoff              Duration
	BackoffStepsMax      int
	// Deprecated
	CheckInterval Duration
	TmpDir        string
	// Deprecated
	ListExportLimit int
	// Deprecated: use ExportDuration
	GroupFilesByDay bool
	SaveAsJson      bool
	StorageOnly     bool
	StartTime       time.Time

	// The segment to export. Defaults to the "everyone" segment, which will export all data.
	SegmentId string

	IncludeMobileAppsFields bool

	ApiURL string

	FilePrefix string

	// aws: s3 + redshift
	S3       S3Config
	Redshift RedshiftConfig

	// gcloud: GCS + BigQuery
	GCS      GCSConfig
	BigQuery BigQueryConfig

	// local filesystem: Local
	Local LocalConfig
}

func Load

func Load(filename string) (*Config, error)

type Duration

type Duration struct {
	time.Duration
}

func (*Duration) UnmarshalText

func (d *Duration) UnmarshalText(text []byte) error

type GCSConfig

type GCSConfig struct {
	StorageConfig
	Bucket string
	// Deprecated: Use `StorageOnly` option at the main level
	GCSOnly bool
}
type Header struct {
	Key   string
	Value string
}

type LocalConfig

type LocalConfig struct {
	StorageConfig
	SaveDir string
	// Deprecated: Use `StartTime` in the base config instead
	StartTime time.Time
	// This forces the exports to start at the provided StartTime instead of using the
	// any sync file that might exist.
	UseStartTime bool
}

type Provider

type Provider string
const (
	LocalProvider Provider = "local"
	AWSProvider   Provider = "aws"
	GCProvider    Provider = "gcp"
)

type RedshiftConfig

type RedshiftConfig struct {
	Host           string
	Port           string
	DB             string
	User           string
	Password       string
	ExportTable    string
	SyncTable      string
	DatabaseSchema string
	Credentials    string
	VarCharMax     int
	S3Region       string `toml:"-"`
}

type S3Config

type S3Config struct {
	StorageConfig
	Bucket  string
	Region  string
	Timeout Duration
	// Deprecated: Use `StorageOnly` option instead
	S3Only bool
}

type StorageConfig added in v1.1.0

type StorageConfig struct {
	FilePrefix string `toml:"-"`
}

Jump to

Keyboard shortcuts

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