common

package
v0.6.1 Latest Latest
Warning

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

Go to latest
Published: Dec 6, 2019 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const ConfigFileBasename = ".yaml"

Variables

View Source
var (
	Version   = "Unknown version"
	BuildTime = "Unknown build time"
	GitCommit = "Unknown GitCommit"
)

Functions

func CheckFileOverSSH

func CheckFileOverSSH(filePath string, user string, host string, privateKeyFilePath string, hostKeyFilePath string) bool

func CheckForecastTime

func CheckForecastTime(value string) (time.Duration, error)

func CheckLocalFile

func CheckLocalFile(filePath string) bool

func CheckStartTime

func CheckStartTime(value string) (time.Time, error)

func PrepareLocalDir

func PrepareLocalDir(filePath string)

func PrintVersionInformation added in v0.5.0

func PrintVersionInformation()

Types

type DataConfig

type DataConfig struct {
	Default  string     `yaml:"default"`
	FileName string     `yaml:"file_name"`
	Paths    []PathItem `yaml:"paths"`
}

func LoadConfig

func LoadConfig(configDir string, dataType string) (DataConfig, error)

type PathItem

type PathItem struct {
	PathType  string `yaml:"type"`
	LevelType string `yaml:"level"`
	Path      string `yaml:"path"`
}

func FindHpcFile added in v0.5.0

func FindHpcFile(
	config DataConfig, locationLevels []string, startTime time.Time, forecastTime time.Duration,
	storageUser string, storageHost string, privateKeyFilePath string, hostKeyFilePath string,
) PathItem

func FindLocalFile

func FindLocalFile(config DataConfig, locationLevels []string, startTime time.Time, forecastTime time.Duration) PathItem

type TemplateVariable

type TemplateVariable struct {
	Year     string
	Month    string
	Day      string
	Hour     string
	Forecast string
	Year4DV  string
	Month4DV string
	Day4DV   string
	Hour4DV  string
}

func GenerateTemplateVariable

func GenerateTemplateVariable(startTime time.Time, forecastTime time.Duration) TemplateVariable

Directories

Path Synopsis
this is a auto generated file.
this is a auto generated file.

Jump to

Keyboard shortcuts

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