common

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: Jul 11, 2023 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 CheckLocalFile

func CheckLocalFile(filePath string) bool

func ParseForecastTime

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

func ParseStartTime

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

func PrepareLocalDir

func PrepareLocalDir(filePath string)

func PrintVersionInformation

func PrintVersionInformation()

Types

type DataConfig

type DataConfig struct {
	Default   string     `yaml:"default"`
	FileName  string     `yaml:"file_name"`
	FileNames []string   `yaml:"file_names"`
	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

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 TimeTemplateVariable

type TimeTemplateVariable struct {
	StartTime    time.Time
	ForecastTime time.Duration
	Year         string
	Month        string
	Day          string
	Hour         string
	Forecast     string
	Year4DV      string
	Month4DV     string
	Day4DV       string
	Hour4DV      string
	Year1HR      string
	Month1HR     string
	Day1HR       string
	Hour1HR      string
	Forecast1HR  string
}

func GenerateTimeTemplateVariable

func GenerateTimeTemplateVariable(startTime time.Time, forecastTime time.Duration) TimeTemplateVariable

Directories

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

Jump to

Keyboard shortcuts

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