Documentation ¶
Index ¶
Constants ¶
View Source
const APIVersion string = "/v1"
View Source
const UI string = "/ui"
Variables ¶
This section is empty.
Functions ¶
func ProcessCLIArgs ¶
ProcessArgs processes and handles CLI arguments
Types ¶
type Config ¶
type Config struct { Build struct { Commit string `yaml:"Commit" env:"COMMIT" env-description:"Commit hash of the build passed"` Repo string `yaml:"Repo" env:"REPO" env-description:"Github repo containing the source of the build"` Version string `yaml:"Version" env:"VERSION" env-description:"Version number 1-0.14.qwehsadhascxzva"` } `yaml:"Build" env-prefix:"BUILD_"` ServiceName string `yaml:"ServiceName" env:"SERVICE_NAME" env-default:"pr-bot" env-description:"Name of the service"` Env string `yaml:"Env" env:"ENV" env-default:"local" env-description:"stage name; one of local|dev|staging|prod"` Server struct { Host string `yaml:"Host" env:"HOST" env-description:"Server host"` Port int `yaml:"Port" env:"PORT" env-description:"Server port"` TLS struct { CertFile string `yaml:"CertFile" env:"CERT_FILE" env-description:"Server certificate file path"` KeyFile string `yaml:"KeyFile" env:"KEY_FILE" env-description:"File path of server cert's private key"` } `yaml:"TLS" env-prefix:"TLS_"` } `yaml:"Server" env-prefix:"SERVER_"` AWS struct { Region string `yaml:"REGION" env:"REGION" env-default:"us-east-1"` Secrets struct { Webhook string `yaml:"Webhook" env:"WEBHOOK" env-default:"/ci/pr-bot/webhook"` Token string `yaml:"Token" env:"TOKEN" env-default:"/ci/pr-bot/token"` } `yaml:"Secrets" env-prefix:"SECRETS_"` } `yaml:"AWS" env-prefix:"AWS_"` OPA struct { Bundles struct { Root string `yaml:"Root" env:"ROOT"` Filename string `yaml:"Filename" env:"FILENAME"` ECR struct { Registry string `yaml:"Registry" env:"REGISTRY"` Repo string `yaml:"Repo" env:"REPO"` Tag string `yaml:"Tag" env:"TAG"` } `yaml:"ECR" env-prefix:"ECR_"` } `yaml:"Bundles" env-prefix:"BUNDLES_"` EvaluationReport struct { TTL time.Duration `yaml:"TTL" env:"TTL"` TableName string `yaml:"TableName" env:"TABLE_NAME"` } `yaml:"EvaluationReport" env-prefix:"EVALUATION_REPORT_"` } `yaml:"OPA" env-prefix:"OPA_"` Reviewer struct { Locker struct { TableName string `yaml:"TableName" env:"TABLE_NAME"` } `yaml:"Locker" env-prefix:"LOCKER_"` } `yaml:"Reviewer" env-prefix:"REVIEWER_"` GHE struct { ServiceAccount string `yaml:"ServiceAccount" env:"SERVICE_ACCOUNT"` Hostname string `yaml:"Hostname" env:"HOSTNAME" env-default:"github.com"` } `yaml:"GHE" env-prefix:"GHE_"` ConfigStore struct { Table string `yaml:"Table" env:"TABLE"` Refresh time.Duration `yaml:"Refresh" env:"REFRESH"` } `yaml:"ConfigStore" env-prefix:"CONFIG_STORE_"` Throttler struct { Table string `yaml:"Table" env:"TABLE"` PartitionKey string `yaml:"PartitionKey" env:"PARTITION_KEY"` SortKey string `yaml:"SortKey" env:"SORT_KEY"` TTLFieldName string `yaml:"TTLFieldName" env:"TTL_FIELD_NAME"` } `yaml:"Throttler" env-prefix:"THROTTLER_"` }
func ParseConfigFiles ¶
type Server ¶
func (*Server) WaitForGracefulShutdown ¶
func (srv *Server) WaitForGracefulShutdown()
Directories ¶
Path | Synopsis |
---|---|
cmd
|
|
templates
templ: version: v0.2.543
|
templ: version: v0.2.543 |
templates/components
templ: version: v0.2.543
|
templ: version: v0.2.543 |
templates/pages
templ: version: v0.2.543
|
templ: version: v0.2.543 |
Click to show internal directories.
Click to hide internal directories.