updateloop

package
v0.11.1 Latest Latest
Warning

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

Go to latest
Published: Apr 29, 2022 License: MIT Imports: 23 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Module added in v0.10.0

func Module() fx.Option

Types

type Config added in v0.10.0

type Config struct {
	// ForceUpdate indicates whether updateloop should force an update operation (only once).
	// This environment variable is useful in development. Don't use in production unless you find it fits.
	ForceUpdate bool `env:"FORCE_UPDATE" envDefault:"false"`
	// ForceSubmit indicates whether updateloop should force a submit operation (only once).
	// This environment variable is useful in development. Don't use in production unless you find it fits.
	ForceSubmit bool `env:"FORCE_SUBMIT" envDefault:"false"`
	// ForceResVersion indicates whether updateloop should force the remote resVersion to a specific value (only once).
	// This environment variable is useful in development. Don't use in production unless you find it fits.
	ForceResVersion string `env:"FORCE_RES_VERSION" envDefault:""`
}

func ProvideConfig added in v0.10.0

func ProvideConfig() (*Config, error)

type ResVersion added in v0.10.0

type ResVersion string

type Service added in v0.10.0

type Service struct {
	MainResDir      string
	MainStaticDir   string
	ForceUpdate     bool
	ForceSubmit     bool
	ForceResVersion string

	AvgService   *avg.Service
	AssetService *asset.Service
}

func NewService added in v0.10.0

func NewService(
	avgS *avg.Service,
	assetS *asset.Service,
	appConf *config.Config,
	conf *Config,
) *Service

func (*Service) AttemptUpdate added in v0.10.0

func (s *Service) AttemptUpdate(ctx context.Context) error

AttemptUpdate attempts to update the resources.

func (*Service) ResDir added in v0.10.0

func (s *Service) ResDir(r ResVersion) string

func (*Service) ResVer added in v0.10.0

func (s *Service) ResVer(ctx context.Context) (ResVersion, ResVersion, error)

func (*Service) StaticDir added in v0.10.0

func (s *Service) StaticDir(r ResVersion) string

func (*Service) VersioningDir added in v0.10.0

func (s *Service) VersioningDir(r ResVersion) string

Jump to

Keyboard shortcuts

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