{"modulePath":"github.com/CHESSComputing/gotools/foxden","version":"v0.0.0-20261120163028-e7d93498a047","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package cmd\n\n## Variables\n\n```go\nvar StaticFs embed.FS\n```\n\n## Functions\n\n```go\nfunc CreateEnvironmentRecord() (dbs.EnvironmentRecord, error)\n```\nCreateEnvironmentRecord builds EnvironmentRecord from the current OS and shell environment\n\n```go\nfunc Execute() error\n```\nExecute executes the root command.\n\n```go\nfunc FileInfo(path string) (int64, string, error)\n```\nFileInfo return size and checksum of the file\n\n```go\nfunc FileList(dir string, pat string) []string\n```\nFileList walks through the directory tree starting at dir and returns a slice of full paths of files matching the pattern pat.\n\n```go\nfunc GenerateRecord(schema []beamlines.SchemaRecord) (map[string]any, error)\n```\nGenerateRecord creates a JSON object from schema records\n\n```go\nfunc GetOsInfo() (dbs.OsInfoRecord, error)\n```\nGetOsInfo collects OS name, version, and kernel info from the current system.\n\n```go\nfunc GetSystemInfo() (string, []string, []string, error)\n```\nGetSystemInfo returns the current user name, all non-loopback IPs, and all MAC addresses.\n\n```go\nfunc ReadFileContent(fname string) (string, error)\n```\nReadFileContent reads the content of the given file. If the file does not exist, it returns an empty string and no error. If the file exists, it returns its contents as a string.\n\n```go\nfunc TrackTime(verboseTime bool) func()\n```\nTrackTime provides elapsed time of function execution, e.g. add the following into any function you want to trace defer TrackTime(\"MyFunction\", verbose)()\n\n## Types\n\n```go\ntype DMRecord struct {\n\tName  string `json:\"name\"`\n\tPath  string `json:\"path\"`\n\tIsDir bool   `json:\"is_dir\"`\n}\n```\nDMRecord represents DataManagement record\n\n```go\ntype DOIRecord struct {\n\tDoi            string `json:\"doi\"`\n\tDoiUrl         string `json:\"doi_url\"`\n\tDid            string `json:\"did\"`\n\tDescription    string `json:\"description\"`\n\tProvider       string `json:\"doi_provider\"`\n\tPublished      string `json:\"doi_created_at\"`\n\tPublic         bool   `json:\"doi_public\"`\n\tAccessMetadata bool   `json:\"doi_access_metadata\"`\n}\n```\nDOIServiceResponse represents response structure of DOIService record\n\n```go\ntype IngestRecord struct {\n\tIngested int    `json:\"ingested\"`\n\tDid      string `json:\"did\"`\n\tGraphIRI string `json:\"graphIRI\"`\n}\n```\nIngestRecord represents ingest record from FabricNode\n\n```go\ntype MCDataRecord struct {\n\tStatus string             `json:\"status\"`\n\tData   []MaterialsCommons `json:\"data\"`\n}\n```\nMetaDataRecord represents MetaData record returned by discovery service\n\n```go\ntype MCResponse struct {\n\tData []map[string]any `json:\"data\"`\n}\n```\nMCResponse represents HTTP response from Material Commons API\n\n```go\ntype MLInput struct {\n\tModel   string `json:\"model\"`\n\tType    string `json:\"type\"`\n\tBackend string `json:\"backend\"`\n\tFile    string `json:\"file\",omitempty`\n\tVersion string `json:\"version\",omitempty`\n}\n```\nMLInput represents input for predict API\n\n```go\ntype MapRecord map[string]any\n```\n\n```go\ntype MaterialsCommons struct {\n\tID          string   `json:\"id\"`\n\tSite        string   `json:\"site\"`\n\tDescription string   `json:\"description\"`\n\tTags        []string `json:\"tags\"`\n\tBucket      string   `json:\"bucket\"`\n}\n```\nhelper function to get metadata MaterialsCommons represents MaterialsCommons object returned from discovery service\n\n```go\ntype MetaData struct {\n\tID          string   `json:\"id\"`\n\tSite        string   `json:\"site\"`\n\tDescription string   `json:\"description\"`\n\tTags        []string `json:\"tags\"`\n\tBucket      string   `json:\"bucket\"`\n}\n```\nhelper function to get metadata MetaData represents MetaData object returned from discovery service\n\n```go\ntype MetaDataRecord struct {\n\tStatus string     `json:\"status\"`\n\tData   []MetaData `json:\"data\"`\n}\n```\nMetaDataRecord represents MetaData record returned by discovery service\n\n```go\ntype MetadataParameters struct {\n\tDid    string\n\tSchema string\n}\n```\nMetadataParameters holds all parameters we may need to generate metadata record\n\n```go\ntype ProvenanceParameters struct {\n\tDid               string\n\tApp               string\n\tConfigFile        string\n\tInputDir          string\n\tInputFilePattern  string\n\tOutputDir         string\n\tOutputFilePattern string\n\tInputFileList     string\n\tOutputFileList    string\n}\n```\nProvenanceParameters holds all parameters we may need to generate provenance record\n\n```go\ntype ResponseRecord struct {\n\tStatus string `json:\"status\"`\n\tError  string `json:\"error\"`\n}\n```\nResponseRecord represents MetaData record returned by discovery service\n\n```go\ntype SpecScans struct {\n\tID          string   `json:\"id\"`\n\tSite        string   `json:\"site\"`\n\tDescription string   `json:\"description\"`\n\tTags        []string `json:\"tags\"`\n\tBucket      string   `json:\"bucket\"`\n}\n```\nhelper function to get specdata SpecScans represents SpecScans object returned from discovery service\n\n```go\ntype SpecScansRecord struct {\n\tStatus string      `json:\"status\"`\n\tData   []SpecScans `json:\"data\"`\n}\n```\nSpecScansRecord represents SpecScans record returned by discovery service\n\n```go\ntype StorageRecord struct {\n\tStatus string `json:\"status\"`\n\tData   any    `json:\"data\"`\n}\n```\nStorageRecord represents Storage record returned by datamanagement service\n\n```go\ntype TokenParameters struct {\n\tAlg               string\n\tIss               string\n\tSub               string\n\tAud               string\n\tCustomClaims      map[string]any\n\tExpirationMinutes int\n\tSecret            string\n\tPrivateKeyPath    string\n}\n```\nTokenParameters holds all input parameters to generate fake token\n\n```go\ntype UploadRecord struct {\n\tStatus string `json:\"status\"`\n\tError  string `json:\"error\"`\n\tMsg    string `json:\"msg\"`\n\tObject any    `json:\"object\"`\n}\n```\nUploadRecord represents Storage record returned by datamanagement service\n\n```go\ntype UrlParams struct {\n\tDid         string `url:\"did\"`\n\tFile        string `url:\"file\"`\n\tScript      string `url:\"script\"`\n\tEnvironment string `url:\"environment\"`\n\tPackage     string `url:\"package\"`\n\tSite        string `url:\"site\"`\n\tBucket      string `url:\"bucket\"`\n\tProcessing  string `url:\"processing\"`\n\tOsname      string `url:\"osname\"`\n}\n```\nUrlParams represents all possible parameters we can pass to datasets query\n\n```go\ntype UserMetaData struct {\n\tID          string   `json:\"id\"`\n\tSite        string   `json:\"site\"`\n\tDescription string   `json:\"description\"`\n\tTags        []string `json:\"tags\"`\n\tBucket      string   `json:\"bucket\"`\n}\n```\nhelper function to get metadata UserMetaData represents UserMetaData object returned from discovery service\n\n```go\ntype UserMetaDataRecord struct {\n\tStatus string         `json:\"status\"`\n\tData   []UserMetaData `json:\"data\"`\n}\n```\nUserMetaDataRecord represents UserMetaData record returned by discovery service\n\n","path":"github.com/CHESSComputing/gotools/foxden/cmd","name":"cmd","synopsis":"","isRedistributable":true}
