vfs_updater_commons

package
v0.3.40 Latest Latest
Warning

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

Go to latest
Published: Mar 9, 2025 License: BSD-3-Clause Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	PackageModeLiteral = "literal" // use only declared parameters
	PackageModeLocal   = "local"   // when need to search, search only in a local path
	PackageModeRemote  = "remote"  // when need to search, search only in a remote path
	PackageModeAuto    = "auto"    //  when need to search, search both in a remote and local path
)

Variables

This section is empty.

Functions

func IsInBlacklist

func IsInBlacklist(filename string, blacklist []string) bool

func IsInHistory

func IsInHistory(value string, history []string) bool

func IsValidSubPath

func IsValidSubPath(value string) bool

IsValidSubPath return true is passed path is a path that can be listed as sub-path

func NeedUpdate

func NeedUpdate(currentVersion, remoteVersion string, versionISRequired bool) bool

func Trim

func Trim(value string) string

Types

type PackageFile

type PackageFile struct {
	File   string `json:"file"`
	Target string `json:"target"`
}

func ToPackageFile

func ToPackageFile(dirTarget, file string) *PackageFile

func ToPackageFiles

func ToPackageFiles(dirTarget string, files, blacklist []string) (response []*PackageFile)

type VfsUpdaterOptions

type VfsUpdaterOptions struct {
	Backend             *vfsoptions.VfsOptions `json:"backend"`
	VersionFileRequired bool                   `json:"version_file_required"` // if true, first start will update all if version file does not exists
	VersionFile         string                 `json:"version_file"`
	PackageMode         string                 `json:"package_mode"` // literal, local, remote, auto
	PackageFiles        []*PackageFile         `json:"package_files"`
	Scheduled           *gg_scheduler.Schedule `json:"scheduled"`
}

func NewVfsUpdaterOptions

func NewVfsUpdaterOptions() (instance *VfsUpdaterOptions)

func (*VfsUpdaterOptions) GetPackageMode

func (instance *VfsUpdaterOptions) GetPackageMode() string

func (*VfsUpdaterOptions) String

func (instance *VfsUpdaterOptions) String() string

Jump to

Keyboard shortcuts

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