controllers

package
v0.19.2 Latest Latest
Warning

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

Go to latest
Published: Mar 11, 2022 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

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      templates.TemplateWriter
	ProjectJobsErrorTemplate templates.TemplateWriter
	Db                       *db.BoltDB
	WsMux                    *websocket.Multiplexor
	KeyGenerator             JobIDKeyGenerator
}

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 templates.TemplateWriter
	WorkingDir         events.WorkingDir
	WorkingDirLocker   events.WorkingDirLocker
	DB                 *db.BoltDB
	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, r *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, r *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
}

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"`
}

Directories

Path Synopsis
mocks/matchers
Code generated by pegomock.
Code generated by pegomock.
mocks/matchers
Code generated by pegomock.
Code generated by pegomock.

Jump to

Keyboard shortcuts

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