{"modulePath":"github.com/webdevops/github-workflow-exporter","version":"v0.0.0-20261020192241-314c893981f0","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package config\n\n## Types\n\n```go\ntype Opts struct {\n\t// logger\n\tLogger struct {\n\t\tLevel  string `long:\"log.level\"    env:\"LOG_LEVEL\"   description:\"Log level\" choice:\"trace\" choice:\"debug\" choice:\"info\" choice:\"warning\" choice:\"error\" default:\"info\"`                          // nolint:staticcheck // multiple choices are ok\n\t\tFormat string `long:\"log.format\"   env:\"LOG_FORMAT\"  description:\"Log format\" choice:\"logfmt\" choice:\"json\" default:\"logfmt\"`                                                                     // nolint:staticcheck // multiple choices are ok\n\t\tSource string `long:\"log.source\"   env:\"LOG_SOURCE\"  description:\"Show source for every log message (useful for debugging and bug reports)\" choice:\"\" choice:\"short\" choice:\"file\" choice:\"full\"` // nolint:staticcheck // multiple choices are ok\n\t\tColor  string `long:\"log.color\"    env:\"LOG_COLOR\"   description:\"Enable color for logs\" choice:\"\" choice:\"auto\" choice:\"yes\" choice:\"no\"`                                                        // nolint:staticcheck // multiple choices are ok\n\t\tTime   bool   `long:\"log.time\"     env:\"LOG_TIME\"    description:\"Show log time\"`\n\t}\n\n\t// Github\n\tGitHub struct {\n\t\tEnterpriseURL string `long:\"github.enterprise.url\"   env:\"GITHUB_ENTERPRISE_URL\"  description:\"GitHub enterprise url (self hosted)\"`\n\n\t\tOrganization string `long:\"github.organization\"     env:\"GITHUB_ORGANIZATION\"    description:\"GitHub organization name\" required:\"true\"`\n\n\t\tAuth struct {\n\t\t\t// PAT auth\n\t\t\tToken string `long:\"github.token\"            env:\"GITHUB_TOKEN\"           description:\"GitHub token auth: PAT\" json:\"-\"`\n\n\t\t\t// APP auth\n\t\t\tAppID             *int64  `long:\"github.app.id\"              env:\"GITHUB_APP_ID\"               description:\"GitHub app auth: App ID\"`\n\t\t\tAppInstallationID *int64  `long:\"github.app.installationid\"  env:\"GITHUB_APP_INSTALLATION_ID\"  description:\"GitHub app auth: App installation ID\"`\n\t\t\tAppPrivateKeyFile *string `long:\"github.app.keyfile\"         env:\"GITHUB_APP_PRIVATE_KEY\"      description:\"GitHub app auth: Private key (path to file)\"`\n\t\t}\n\n\t\tRepositories struct {\n\t\t\tCustomProperties []string `long:\"github.repository.customprops\"         env:\"GITHUB_REPOSITORY_CUSTOMPROPS\"      description:\"GitHub repository custom properties as labels for repos and workflows (space delimiter)\" env-delim:\" \"`\n\t\t}\n\n\t\tWorkflows struct {\n\t\t\tTimeframe time.Duration `long:\"github.workflows.timeframe\"     env:\"GITHUB_WORKFLOWS_TIMEFRAME\"    description:\"GitHub workflow timeframe for fetching\" default:\"168h\"`\n\n\t\t\tRunRunningStatus          []string `long:\"github.workflows.run_running.status\"         env:\"GITHUB_WORKFLOWS_RUN_RUNNING_STATUS\"         description:\"workflow statuses for github_workflow_run_running metric (others will be ignored, * allows all)\"              env-delim:\" \" default:\"in_progress\" default:\"queued\" default:\"waiting\" default:\"pending\"`                                                              //nolint:staticcheck // ignore duplicate default tag\n\t\t\tRunLatestStatus           []string `long:\"github.workflows.latest_run.status\"          env:\"GITHUB_WORKFLOWS_LATEST_RUN_STATUS\"          description:\"workflow statuses for github_workflow_run_running metric (others will be ignored, * allows all)\"              env-delim:\" \" default:\"completed\" default:\"expected\" default:\"failure\" default:\"startup_failure\"`                                                      //nolint:staticcheck // ignore duplicate default tag\n\t\t\tConsecutiveFailuresStatus []string `long:\"github.workflows.consecutive_failed.status\"  env:\"GITHUB_WORKFLOWS_CONSECUTIVE_FAILED_STATUS\"  description:\"workflow statuses for github_workflow_consecutive_failed_runs metric (others will be ignored, * allows all)\"  env-delim:\" \" default:\"completed\" default:\"expected\" default:\"failure\" default:\"startup_failure\"`                                                      //nolint:staticcheck // ignore duplicate default tag\n\t\t\tConsecutiveRunStatus      []string `long:\"github.workflows.consecutive_runs.status\"    env:\"GITHUB_WORKFLOWS_CONSECUTIVE_RUNS_STATUS\"    description:\"workflow statuses for github_workflow_consecutive_runs metric (others will be ignored, * allows all)\"         env-delim:\" \" default:\"completed\" default:\"expected\" default:\"failure\" default:\"startup_failure\" default:\"queued\" default:\"waiting\" default:\"pending\"` //nolint:staticcheck // ignore duplicate default tag\n\t\t}\n\t}\n\n\tScrape struct {\n\t\tTime time.Duration `long:\"scrape.time\"     env:\"SCRAPE_TIME\"    description:\"Scrape time\" default:\"30m\"`\n\t}\n\n\t// caching\n\tCache struct {\n\t\tPath string `long:\"cache.path\" env:\"CACHE_PATH\" description:\"Cache path (to folder, file://path... or azblob://storageaccount.blob.core.windows.net/containername or k8scm://{namespace}/{configmap}})\"`\n\t}\n\n\tServer struct {\n\t\t// general options\n\t\tBind         string        `long:\"server.bind\"              env:\"SERVER_BIND\"           description:\"Server address\"        default:\":8080\"`\n\t\tReadTimeout  time.Duration `long:\"server.timeout.read\"      env:\"SERVER_TIMEOUT_READ\"   description:\"Server read timeout\"   default:\"5s\"`\n\t\tWriteTimeout time.Duration `long:\"server.timeout.write\"     env:\"SERVER_TIMEOUT_WRITE\"  description:\"Server write timeout\"  default:\"10s\"`\n\t}\n}\n```\n\n```go\nfunc (o *Opts) GetCachePath(path string) (ret *string)\n```\n\n```go\nfunc (o *Opts) GetJson() []byte\n```\n\n","path":"github.com/webdevops/github-workflow-exporter/config","name":"config","synopsis":"","isRedistributable":true}
