Documentation ¶
Index ¶
- func AddFlags(cmd *cobra.Command)
- func IPAllowlistHandler(handler http.Handler, allowed []*net.IPNet) http.Handler
- func InstrumentHandler(handler http.Handler) http.Handler
- func ParseCIDRs(inputs []string) []*net.IPNet
- func SecretKeyHandler(handler http.Handler, name string, key string) http.Handler
- type Config
- type Deployment
- type DeploymentConfig
- type Repository
- type RepositoryConfig
- type WebhookServer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IPAllowlistHandler ¶
func ParseCIDRs ¶
Types ¶
type Config ¶
type Config struct { ListenAddr string `mapstructure:"listen_address" hcl:"listen_address,optional"` LogLevel string `hcl:"log_level,optional"` AllowedIPs []string `hcl:"allowed_ips,optional"` SecretKey string `hcl:"secret_key,optional"` ArgoToken string `hcl:"argocd_token"` ArgoUrl string `hcl:"argocd_url"` Repositories []RepositoryConfig `hcl:"repository,block"` Deployments []DeploymentConfig `hcl:"deployment,block"` }
type Deployment ¶
type Deployment struct { Name string RepositoryName string KustomizePath string CommitMessage *template.Template Images []string ApplicationName string }
func NewDeployment ¶
func NewDeployment(cfg DeploymentConfig) (*Deployment, error)
type DeploymentConfig ¶
type Repository ¶
func NewRepository ¶
func NewRepository(cfg RepositoryConfig) *Repository
func (*Repository) Discard ¶
func (r *Repository) Discard()
func (*Repository) Worktree ¶
func (r *Repository) Worktree() (*git.Worktree, error)
type RepositoryConfig ¶
type WebhookServer ¶
func NewServer ¶
func NewServer(cfg Config) *WebhookServer
func (*WebhookServer) ServeHTTP ¶
func (s *WebhookServer) ServeHTTP(resp http.ResponseWriter, req *http.Request)
Click to show internal directories.
Click to hide internal directories.