configuration

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Dec 15, 2022 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AccessConfig

type AccessConfig struct {
	AccessKeyID string `yaml:"accessKeyId"`
	SecretKey   string `yaml:"secretKey"`
	Token       string `yaml:"token"`
}

type BucketConfig

type BucketConfig struct {
	Name   string `yaml:"name"`
	Folder string `yaml:"folder"`
	CDNUrl string `yaml:"cdnUrl"`
}

type Config

type Config struct {
	Info      cfgstructs.ApplicationInfo `yaml:"info"`
	Log       cfgstructs.Logs            `yaml:"logs"`
	Storage   StorageConfig              `yaml:"storage"`
	Prerender PrerenderConfig            `yaml:"prerender"`
}

func Init

func Init(s stage.Interface, path string) (*Config, error)

type ElementConfig

type ElementConfig struct {
	Type      string `yaml:"type"`
	ID        string `yaml:"id"`
	Class     string `yaml:"class"`
	Attribute struct {
		Name  string `yaml:"name"`
		Value string `yaml:"value"`
	} `yaml:"attribute"`
}

func (ElementConfig) GetWaitElement

func (ec ElementConfig) GetWaitElement() string

func (ElementConfig) GetWaitElementAttr

func (ec ElementConfig) GetWaitElementAttr(attrValue string) string

type EndpointConfig

type EndpointConfig struct {
	URL           string `yaml:"endpointUrl"`
	PartitionID   string `yaml:"partitionId"`
	SigningName   string `yaml:"signingName"`
	SigningMethod string `yaml:"signingMethod"`
	SigningRegion string `yaml:"signingRegion"`
}

type LocalStorageConfig

type LocalStorageConfig struct {
	StoragePath string `yaml:"storage_path"` //nolint:tagliatelle // legacy
}

type PrerenderConfig

type PrerenderConfig struct {
	UserAgent       string         `yaml:"user_agent"`
	FilePostfix     string         `yaml:"file_postfix"`
	ConcurrentLimit int            `yaml:"concurrent_limit"`
	Lookup          lookupConfig   `yaml:"lookup"`
	WaitFor         string         `yaml:"wait_for"`
	ConsoleString   string         `yaml:"console_string"`
	MaxAttempts     int            `yaml:"max_attempts"`
	SleepTime       time.Duration  `yaml:"sleep_time"`
	WaitTimeout     time.Duration  `yaml:"wait_timeout"`
	RenderPeriod    time.Duration  `yaml:"render_period"`
	Element         ElementConfig  `yaml:"element"`
	Viewport        viewportConfig `yaml:"viewport"`
	Page404Text     string         `yaml:"page_404_text"`
}

type S3Config

type S3Config struct {
	Endpoint EndpointConfig `yaml:"endpoint"`
	Access   AccessConfig   `yaml:"access"`
	Bucket   BucketConfig   `yaml:"bucket"`
}

type StorageConfig

type StorageConfig struct {
	Type  string             `yaml:"type"`
	Local LocalStorageConfig `yaml:"local"`
	S3    S3Config           `yaml:"s3"`
}

Jump to

Keyboard shortcuts

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