controllers

package
v0.28.1 Latest Latest
Warning

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

Go to latest
Published: May 23, 2024 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type APIController added in v0.19.8

type APIController struct {
	APISecret                      []byte
	Locker                         locking.Locker
	Logger                         logging.SimpleLogging
	Parser                         events.EventParsing
	ProjectCommandBuilder          events.ProjectCommandBuilder
	ProjectPlanCommandRunner       events.ProjectPlanCommandRunner
	ProjectApplyCommandRunner      events.ProjectApplyCommandRunner
	FailOnPreWorkflowHookError     bool
	PreWorkflowHooksCommandRunner  events.PreWorkflowHooksCommandRunner
	PostWorkflowHooksCommandRunner events.PostWorkflowHooksCommandRunner
	RepoAllowlistChecker           *events.RepoAllowlistChecker
	Scope                          tally.Scope
	VCSClient                      vcs.Client
}

func (*APIController) Apply added in v0.19.8

func (a *APIController) Apply(w http.ResponseWriter, r *http.Request)

func (*APIController) Plan added in v0.19.8

func (a *APIController) Plan(w http.ResponseWriter, r *http.Request)

type APIRequest added in v0.19.8

type APIRequest struct {
	Repository string `validate:"required"`
	Ref        string `validate:"required"`
	Type       string `validate:"required"`
	PR         int
	Projects   []string
	Paths      []struct {
		Directory string
		Workspace string
	}
}

type GithubAppController

type GithubAppController struct {
	AtlantisURL         *url.URL
	Logger              logging.SimpleLogging
	GithubSetupComplete bool
	GithubHostname      string
	GithubOrg           string
}

GithubAppController handles the creation and setup of a new GitHub app

func (*GithubAppController) ExchangeCode

func (g *GithubAppController) ExchangeCode(w http.ResponseWriter, r *http.Request)

ExchangeCode handles the user coming back from creating their app A code query parameter is exchanged for this app's ID, key, and webhook_secret Implements https://developer.github.com/apps/building-github-apps/creating-github-apps-from-a-manifest/#implementing-the-github-app-manifest-flow

func (*GithubAppController) New

New redirects the user to create a new GitHub app

type JobIDKeyGenerator added in v0.18.3

type JobIDKeyGenerator struct{}

func (JobIDKeyGenerator) Generate added in v0.18.3

func (g JobIDKeyGenerator) Generate(r *http.Request) (string, error)

type JobsController added in v0.18.0

type JobsController struct {
	AtlantisVersion          string
	AtlantisURL              *url.URL
	Logger                   logging.SimpleLogging
	ProjectJobsTemplate      web_templates.TemplateWriter
	ProjectJobsErrorTemplate web_templates.TemplateWriter
	Backend                  locking.Backend
	WsMux                    *websocket.Multiplexor
	KeyGenerator             JobIDKeyGenerator
	StatsScope               tally.Scope
}

func (*JobsController) GetProjectJobs added in v0.18.0

func (j *JobsController) GetProjectJobs(w http.ResponseWriter, r *http.Request)

func (*JobsController) GetProjectJobsWS added in v0.18.0

func (j *JobsController) GetProjectJobsWS(w http.ResponseWriter, r *http.Request)

type LocksController

type LocksController struct {
	AtlantisVersion    string
	AtlantisURL        *url.URL
	Locker             locking.Locker
	Logger             logging.SimpleLogging
	ApplyLocker        locking.ApplyLocker
	VCSClient          vcs.Client
	LockDetailTemplate web_templates.TemplateWriter
	WorkingDir         events.WorkingDir
	WorkingDirLocker   events.WorkingDirLocker
	Backend            locking.Backend
	DeleteLockCommand  events.DeleteLockCommand
}

LocksController handles all requests relating to Atlantis locks.

func (*LocksController) DeleteLock

func (l *LocksController) DeleteLock(w http.ResponseWriter, r *http.Request)

DeleteLock handles deleting the lock at id and commenting back on the pull request that the lock has been deleted.

func (*LocksController) GetLock

func (l *LocksController) GetLock(w http.ResponseWriter, r *http.Request)

GetLock is the GET /locks/{id} route. It renders the lock detail view.

func (*LocksController) LockApply

func (l *LocksController) LockApply(w http.ResponseWriter, _ *http.Request)

LockApply handles creating a global apply lock. If Lock already exists it will be a no-op

func (*LocksController) UnlockApply

func (l *LocksController) UnlockApply(w http.ResponseWriter, _ *http.Request)

UnlockApply handles releasing a global apply lock. If Lock doesn't exists it will be a no-op

type StatusController

type StatusController struct {
	Logger          logging.SimpleLogging
	Drainer         *events.Drainer
	AtlantisVersion string
}

StatusController handles the status of Atlantis.

func (*StatusController) Get

Get is the GET /status route.

type StatusResponse

type StatusResponse struct {
	ShuttingDown    bool   `json:"shutting_down"`
	InProgressOps   int    `json:"in_progress_operations"`
	AtlantisVersion string `json:"version"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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