api

package
v0.5.7 Latest Latest
Warning

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

Go to latest
Published: Mar 29, 2017 License: Apache-2.0 Imports: 31 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AbortWithCode added in v0.4.0

func AbortWithCode(c *gin.Context, status int, code int, message string)

func AbortWithError added in v0.4.0

func AbortWithError(lg LogFields)

func AbortWithErrors added in v0.4.0

func AbortWithErrors(c *gin.Context, status int, message string, emsgs ...string)

func GetAPIInfo added in v0.5.0

func GetAPIInfo(c *gin.Context)

func GetAPIVersion added in v0.5.0

func GetAPIVersion(c *gin.Context)

func GetPing added in v0.5.0

func GetPing(c *gin.Context)

func QueueStats added in v0.4.0

func QueueStats(c *gin.Context)

QueueStats returns statistics about redis rmq

func Route

func Route(r *gin.Engine)

Route defines all API endpoints

Types

type CredentialController added in v0.4.0

type CredentialController struct{}

func (CredentialController) AccessList added in v0.4.0

func (ctrl CredentialController) AccessList(c *gin.Context)

AccessList is a Gin handler function, returns access list for specified credential object

func (CredentialController) ActivityStream added in v0.4.0

func (ctrl CredentialController) ActivityStream(c *gin.Context)

ActivityStream returns the activities of the user on Credentials

func (CredentialController) All added in v0.4.0

func (ctrl CredentialController) All(c *gin.Context)

GetCredentials is a Gin handler function which returns list of credentials This takes lookup parameters and order parameters to filter and sort output data

func (CredentialController) Create added in v0.4.0

func (ctrl CredentialController) Create(c *gin.Context)

AddCredential is a Gin handler function which creates a new credential using request payload. This accepts Credential model.

func (CredentialController) Delete added in v0.4.0

func (ctrl CredentialController) Delete(c *gin.Context)

RemoveCredential is a Gin handler function which removes a credential object from the database

func (CredentialController) Middleware added in v0.4.0

func (ctrl CredentialController) Middleware(c *gin.Context)

Middleware generates a middleware handler function that works inside of a Gin request. This function takes CTXCredentialID from Gin Context and retrieves credential data from the collection and store credential data under key CTXCredential in Gin Context

func (CredentialController) ObjectRoles added in v0.5.0

func (ctrl CredentialController) ObjectRoles(c *gin.Context)

ObjectRoles is a Gin handler function This returns available roles can be associated with a Credential model

func (CredentialController) One added in v0.4.0

func (ctrl CredentialController) One(c *gin.Context)

GetCredential is a Gin handler function which returns the credential as a JSON object

func (CredentialController) OwnerTeams added in v0.4.0

func (ctrl CredentialController) OwnerTeams(c *gin.Context)

OwnerTeams is a Gin handler function which returns the access control list of Teams that has permissions to access specified credential object.

func (CredentialController) OwnerUsers added in v0.4.0

func (ctrl CredentialController) OwnerUsers(c *gin.Context)

OwnerUsers is a Gin handler function which returns the access control list of Users that has access to specified credential object.

func (CredentialController) Update added in v0.4.0

func (ctrl CredentialController) Update(c *gin.Context)

UpdateCredential is a Gin handler function which updates a credential using request payload. This replaces all the fields in the database, empty "" fields and unspecified fields will be removed from the database object.

type DashBoardController added in v0.4.0

type DashBoardController struct{}

func (DashBoardController) GetInfo added in v0.4.0

func (ctrl DashBoardController) GetInfo(c *gin.Context)

GetInfo is a Gin handler function which returns summary data for UI dashboard

type GroupController added in v0.4.0

type GroupController struct{}

func (GroupController) ActivityStream added in v0.4.0

func (ctrl GroupController) ActivityStream(c *gin.Context)

ActivityStream returns the activities of the user on Groups

func (GroupController) All added in v0.4.0

func (ctrl GroupController) All(c *gin.Context)

GetGroups is a Gin handler function which returns list of Groups This takes lookup parameters and order parameters to filer and sort output data.

func (GroupController) Create added in v0.4.0

func (ctrl GroupController) Create(c *gin.Context)

AddGroup is a Gin handler function which creates a new group using request payload. This accepts Group model.

func (GroupController) Delete added in v0.4.0

func (ctrl GroupController) Delete(c *gin.Context)

RemoveGroup is a Gin handler function which removes a group object from the database

func (GroupController) Middleware added in v0.4.0

func (ctrl GroupController) Middleware(c *gin.Context)

Middleware generates a middleware handler function that works inside of a Gin request. This function takes host_id parameter from the Gin Context and fetches host data from the database it will set host data under key host in the Gin Context.

func (GroupController) One added in v0.4.0

func (ctrl GroupController) One(c *gin.Context)

GetGroup is a Gin handler function which returns the host as a JSON object.

func (GroupController) Update added in v0.4.0

func (ctrl GroupController) Update(c *gin.Context)

UpdateGroup is a handler function which updates a group using request payload. This replaces all the fields in the database. empty "" fields and unspecified fields will be removed from the database object.

func (GroupController) VariableData added in v0.4.0

func (ctrl GroupController) VariableData(c *gin.Context)

VariableData is Gin handler function which returns host group variables

type HostController added in v0.4.0

type HostController struct{}

func (HostController) ActivityStream added in v0.4.0

func (ctrl HostController) ActivityStream(c *gin.Context)

ActivityStream returns the activities of the user on Hosts

func (HostController) All added in v0.4.0

func (ctrl HostController) All(c *gin.Context)

GetHosts is Gin handler function which returns list of hosts This takes lookup parameters and order parameters to filter and sort output data

func (HostController) AllGroups added in v0.4.0

func (ctrl HostController) AllGroups(c *gin.Context)

AllGroups is a Gin handler function which returns parent groups of a host TODO: not implemented

func (HostController) Create added in v0.4.0

func (ctrl HostController) Create(c *gin.Context)

AddHost is a Gin handler function which creates a new host using request payload This accepts Host model.

func (HostController) Delete added in v0.4.0

func (ctrl HostController) Delete(c *gin.Context)

RemoveHost is a Gin handler function which removes a host object from the database

func (HostController) Groups added in v0.4.0

func (ctrl HostController) Groups(c *gin.Context)

Groups is a Gin handler function which returns parent group of the host TODO: not implemented

func (HostController) Middleware added in v0.4.0

func (ctrl HostController) Middleware(c *gin.Context)

Middleware generates a middleware handler function that works inside of a Gin request. Middleware takes CTXHostID parameter from the Gin Context and fetches host data from the database it set host data under key CTXHost in the Gin Context

func (HostController) One added in v0.4.0

func (ctrl HostController) One(c *gin.Context)

GetHost is a Gin Handler function, returns the host as a JSON object

func (HostController) Update added in v0.4.0

func (ctrl HostController) Update(c *gin.Context)

UpdateHost is a handler function which updates a credential using request payload. This replaces all the fields in the database, empty "" fields and unspecified fields will be removed from the database object

func (HostController) VariableData added in v0.4.0

func (ctrl HostController) VariableData(c *gin.Context)

VariableData is a Gin Handler function which returns variables for the host as JSON formatted object.

type InventoryController added in v0.4.0

type InventoryController struct{}

func (InventoryController) AccessList added in v0.4.0

func (ctrl InventoryController) AccessList(c *gin.Context)

func (InventoryController) ActivityStream added in v0.4.0

func (ctrl InventoryController) ActivityStream(c *gin.Context)

ActivityStream returns the activities of the user on Inventories

func (InventoryController) All added in v0.4.0

func (ctrl InventoryController) All(c *gin.Context)

GetInventories is a Gin handler function which returns list of inventories This takes lookup parameters and order parameters to filter and sort output data.

func (InventoryController) Create added in v0.4.0

func (ctrl InventoryController) Create(c *gin.Context)

AddInventory is a Gin handler function which creates a new inventory using request payload. This accepts Inventory model.

func (InventoryController) Delete added in v0.4.0

func (ctrl InventoryController) Delete(c *gin.Context)

RemoveInventory is a Gin handler function which removes a inventory object from the database

func (InventoryController) Groups added in v0.4.0

func (ctrl InventoryController) Groups(c *gin.Context)

Groups is a Gin Handler function which returns all the groups of an Inventory.

func (InventoryController) Hosts added in v0.4.0

func (ctrl InventoryController) Hosts(c *gin.Context)

Hosts is a Gin handler function which returns all hosts associated with the inventory.

func (InventoryController) JobTemplates added in v0.4.0

func (ctrl InventoryController) JobTemplates(c *gin.Context)

JobTemplates is a Gin Handler function which returns list of Job Templates that includes the inventory.

func (InventoryController) Middleware added in v0.4.0

func (ctrl InventoryController) Middleware(c *gin.Context)

Middleware generates a middleware handler function that works inside of a Gin request. This function takes project_id parameter from Gin Context and fetches project data from the database this set project data under key project in Gin Context.

func (InventoryController) ObjectRoles added in v0.5.0

func (ctrl InventoryController) ObjectRoles(c *gin.Context)

ObjectRoles is a Gin handler function This returns available roles can be associated with a Inventory model

func (InventoryController) One added in v0.4.0

func (ctrl InventoryController) One(c *gin.Context)

GetInventory is a Gin handler function which returns the project as a JSON object

func (InventoryController) RootGroups added in v0.4.0

func (ctrl InventoryController) RootGroups(c *gin.Context)

RootGroups is a Gin handler function which returns list of root groups of the inventory.

func (InventoryController) Script added in v0.4.0

func (ctrl InventoryController) Script(c *gin.Context)

Script is a Gin Handler function which generates a ansible compatible inventory output note: we are not using var varname []string specially because output json must include [] for each array and {} for each object

func (InventoryController) Tree added in v0.4.0

func (ctrl InventoryController) Tree(c *gin.Context)

Tree is a Gin handler function which generate a json tree of the inventory.

func (InventoryController) Update added in v0.4.0

func (ctrl InventoryController) Update(c *gin.Context)

UpdateInventory is a Gin handler function which updates a credential using request payload. This replaces all the fields in the database, empty "" field and unspecified fields will be removed from the database.

func (InventoryController) VariableData added in v0.4.0

func (ctrl InventoryController) VariableData(c *gin.Context)

VariableData is a Gin Handler function which returns variable data for the inventory.

type JobController added in v0.4.0

type JobController struct{}

func (JobController) All added in v0.4.0

func (ctrl JobController) All(c *gin.Context)

GetJobs is a Gin handler function which returns list of jobs This takes lookup parameters and order parameters to filter and sort output data

func (JobController) Cancel added in v0.4.0

func (ctrl JobController) Cancel(c *gin.Context)

Cancel cancels the pending job. The response status code will be 202 if successful, or 405 if the job cannot be canceled.

func (JobController) CancelInfo added in v0.4.0

func (ctrl JobController) CancelInfo(c *gin.Context)

CancelInfo to determine if the job can be cancelled. The response will include the following field: can_cancel: [boolean] Indicates whether this job can be canceled

func (JobController) Middleware added in v0.4.0

func (ctrl JobController) Middleware(c *gin.Context)

Middleware generates a middleware handler function that works inside of a Gin request. This function takes CTXJobID from Gin Context and retrieves credential data from the collection and store credential data under key CTXJob in Gin Context

func (JobController) One added in v0.4.0

func (ctrl JobController) One(c *gin.Context)

GetJob is a Gin handler function which returns the job as a JSON object

func (JobController) StdOut added in v0.4.0

func (ctrl JobController) StdOut(c *gin.Context)

StdOut returns ANSI standard output of a Job

type JobTemplateController added in v0.4.0

type JobTemplateController struct{}

func (JobTemplateController) AccessList added in v0.4.0

func (ctrl JobTemplateController) AccessList(c *gin.Context)

AccessList is Gin Handler function

func (JobTemplateController) ActivityStream added in v0.4.0

func (ctrl JobTemplateController) ActivityStream(c *gin.Context)

ActivityStream returns the activities of the user on Job templates

func (JobTemplateController) All added in v0.4.0

func (ctrl JobTemplateController) All(c *gin.Context)

GetJTemplates is a Gin handler function which returns list of Job Templates The resulting data structure contains:

{
 "count\": 99,
 "next\": null,
 "previous\": null,
 "results\": [
	...
	]

The `count` field indicates the total number of job templates found for the given query. The `next` and `previous` fields provides links to additional results if there are more than will fit on a single page. The `results` list contains zero or more job template records. A success returns 200 status code A failure returns 500 status code This takes lookup parameters and order parameters to filter and sort output data

func (JobTemplateController) Create added in v0.4.0

func (ctrl JobTemplateController) Create(c *gin.Context)

AddJTemplate is Gin handler function which creates a new Credential using request payload This accepts Job Template model. fields to create a new job template: name: Name of this job template. string, required description: Optional description of this job template. string, default="" job_type: choice

  • `run: Run default
  • `check: Check
  • `scan: Scan

inventory: bson.ObjectId, default=nil project: bson.ObjectId, default=nil playbook: string, default="" credential: bson.ObjectId, default=nil cloud_credential: bson.ObjectId, default=nil network_credential: bson.ObjectId, default=nil forks: integer, default=0 limit: string, default="" verbosity: choice

  • 0: 0 Normal default
  • 1: 1 Verbose
  • 2: 2 More Verbose
  • 3: 3 Debug
  • 4: 4 Connection Debug
  • 5: 5 WinRM Debug

extra_vars: string, default="" job_tags: string, default="" force_handlers: boolean, default=False skip_tags: string, default="" start_at_task: string, default="" host_config_key: string, default="" ask_variables_on_launch: boolean, default=False ask_limit_on_launch: boolean, default=False ask_tags_on_launch: boolean, default=False ask_skip_tags_on_launch: boolean, default=False ask_job_type_on_launch: boolean, default=False ask_inventory_on_launch: boolean, default=False ask_credential_on_launch: boolean, default=False become_enabled: boolean, default=False allow_simultaneous: boolean, default=False

func (JobTemplateController) Delete added in v0.4.0

func (ctrl JobTemplateController) Delete(c *gin.Context)

RemoveJTemplate is a Gin handler function which removes a Job Template object from the database A success returns 204 status code A failure returns 500 status code

func (JobTemplateController) Jobs added in v0.4.0

func (ctrl JobTemplateController) Jobs(c *gin.Context)

Jobs returns list of jobs associated with the Job Template Resulting data structure contains:

{
 "count\": 99,
 "next\": null,
 "previous\": null,
 "results\": [
	...
	]
}

The `count` field indicates the total number of jobs found for the given query. The `next` and `previous` fields provides links to additional results if there are more than will fit on a single page. The `results` list contains zero or more job records.

func (JobTemplateController) Launch added in v0.4.0

func (ctrl JobTemplateController) Launch(c *gin.Context)

Launch creates a new job and adds the job into job queue. If any passwords, inventory, or extra variables (extra_vars) are required, they must be passed via POST data, with extra_vars given as a JSON string. If `credential_needed_to_start` is `true` then the `credential` field is required and if the `inventory_needed_to_start` is `True` then the `inventory` is required as well. success returns JSON serialized Job model with 201 status code if the request body is invalid returns JSON serialized Error model with 400 status code

func (JobTemplateController) LaunchInfo added in v0.4.0

func (ctrl JobTemplateController) LaunchInfo(c *gin.Context)

LaunchInfo returns JSON serialized launch information to determine if the job_template can be launched and whether any passwords are required to launch the job_template.

ask_variables_on_launch: Flag indicating whether the job template is configured to prompt for variables upon launch ask_tags_on_launch: Flag indicating whether the job template is configured to prompt for tags upon launch ask_skip_tags_on_launch: Flag indicating whether the job template is configured to prompt for skip_tags upon launch ask_job_type_on_launch: Flag indicating whether the job template is configured to prompt for job_type upon launch ask_limit_on_launch: Flag indicating whether the job template is configured to prompt for limit upon launch ask_inventory_on_launch: Flag indicating whether the job template is configured to prompt for inventory upon launch ask_credential_on_launch: Flag indicating whether the job template is configured to prompt for credential upon launch can_start_without_user_input: Flag indicating if the job template can be launched without user-input variables_needed_to_start: Required variable names required to launch the job_template credential_needed_to_start: Flag indicating the presence of a credential associated with the job template. If not then one should be supplied when launching the job inventory_needed_to_start: Flag indicating the presence of an inventory associated with the job template. If not then one should be supplied when launching the job

func (JobTemplateController) Middleware added in v0.4.0

func (ctrl JobTemplateController) Middleware(c *gin.Context)

Middleware generates a middleware handler function that works inside of a Gin request. This function takes CTXJobTemplateID from Gin Context and retrieves job template data from the collection and store job template data under key CTXJobTemplate in Gin Context

func (JobTemplateController) ObjectRoles added in v0.4.0

func (ctrl JobTemplateController) ObjectRoles(c *gin.Context)

ObjectRoles is a Gin handler function This returns available roles can be associated with a Job Template model

func (JobTemplateController) One added in v0.4.0

func (ctrl JobTemplateController) One(c *gin.Context)

GetJTemplate is a Gin handler function which returns the Job Template as a JSON object A success will return 200 status code A failure will return 500 status code

func (JobTemplateController) Update added in v0.4.0

func (ctrl JobTemplateController) Update(c *gin.Context)

UpdateJTemplate is a Gin handler function which updates a Job Template using request payload A success returns 200 status code A failure returns 500 status code if the request body is invalid returns serialized Error model with 400 status code

type LogFields added in v0.4.0

type LogFields struct {
	Context *gin.Context
	Status  int
	Message string
	Log     logrus.Fields
}

type OrganizationController added in v0.4.0

type OrganizationController struct{}

func (OrganizationController) ActivityStream added in v0.4.0

func (ctrl OrganizationController) ActivityStream(c *gin.Context)

ActivityStream returns the activities of the user on Organizations

func (OrganizationController) All added in v0.4.0

func (ctrl OrganizationController) All(c *gin.Context)

GetOrganizations is a Gin handler function which returns list of organization This takes lookup parameters and order parameters to filter and sort output data

func (OrganizationController) Create added in v0.4.0

func (ctrl OrganizationController) Create(c *gin.Context)

AddOrganization is a Gin handler function which creates a new organization using request payload. This accepts Organization model.

func (OrganizationController) Delete added in v0.4.0

func (ctrl OrganizationController) Delete(c *gin.Context)

RemoveOrganization is a Gin handler function which removes a organization object from the database

func (OrganizationController) GetAdmins added in v0.4.0

func (ctrl OrganizationController) GetAdmins(c *gin.Context)

GetAdmins returns an Organization admins

func (OrganizationController) GetCredentials added in v0.4.0

func (ctrl OrganizationController) GetCredentials(c *gin.Context)

GetCredentials returns credentials associated with an Organization

func (OrganizationController) GetInventories added in v0.4.0

func (ctrl OrganizationController) GetInventories(c *gin.Context)

GetInventories returns all inventories an Organization

func (OrganizationController) GetProjects added in v0.4.0

func (ctrl OrganizationController) GetProjects(c *gin.Context)

GetProjects returns all projects of an Organization

func (OrganizationController) GetTeams added in v0.4.0

func (ctrl OrganizationController) GetTeams(c *gin.Context)

GetTeams will return an Organization Teams

func (OrganizationController) GetUsers added in v0.4.0

func (ctrl OrganizationController) GetUsers(c *gin.Context)

GetUsers Returns all Organization users

func (OrganizationController) Middleware added in v0.4.0

func (ctrl OrganizationController) Middleware(c *gin.Context)

Middleware generates a middleware handler function that works inside of a Gin request. This function takes CTXOrganizationID from Gin Context and retrieves organization data from the collection and store organization data under key CTXOrganization in Gin Context

func (OrganizationController) ObjectRoles added in v0.5.0

func (ctrl OrganizationController) ObjectRoles(c *gin.Context)

ObjectRoles is a Gin handler function This returns available roles can be associated with a Organization model

func (OrganizationController) One added in v0.4.0

func (ctrl OrganizationController) One(c *gin.Context)

GetOrganization is a Gin handler function which returns the organization as a JSON object

func (OrganizationController) Update added in v0.4.0

func (ctrl OrganizationController) Update(c *gin.Context)

UpdateOrganization is a Gin handler function which updates a organization using request payload. This replaces all the fields in the database, empty "" fields and unspecified fields will be removed from the database object.

type ProjectController added in v0.4.0

type ProjectController struct{}

func (ProjectController) AccessList added in v0.4.0

func (ctrl ProjectController) AccessList(c *gin.Context)

AccessList returns the list of teams and users that is able to access current project object in the gin context

func (ProjectController) ActivityStream added in v0.4.0

func (ctrl ProjectController) ActivityStream(c *gin.Context)

ActivityStream returns the activities of the user on projects

func (ProjectController) All added in v0.4.0

func (ctrl ProjectController) All(c *gin.Context)

GetProjects returns a JSON array of projects

func (ProjectController) Create added in v0.4.0

func (ctrl ProjectController) Create(c *gin.Context)

AddProject is a Gin handler function which creates a new project using request payload. This accepts Project model.

func (ProjectController) Delete added in v0.4.0

func (ctrl ProjectController) Delete(c *gin.Context)

RemoveProject is a Gin handler function which removes a project object from the database

func (ProjectController) Middleware added in v0.4.0

func (ctrl ProjectController) Middleware(c *gin.Context)

Middleware generates a middleware handler function that works inside of a Gin request. This function takes CTXProjectID from Gin Context and retrieves project data from the collection and store credential data under key CTXProject in Gin Context

func (ProjectController) ObjectRoles added in v0.5.0

func (ctrl ProjectController) ObjectRoles(c *gin.Context)

ObjectRoles is a Gin handler function This returns available roles can be associated with a Project model

func (ProjectController) One added in v0.4.0

func (ctrl ProjectController) One(c *gin.Context)

GetProject returns the project as a JSON object

func (ProjectController) OwnerTeams added in v0.4.0

func (ctrl ProjectController) OwnerTeams(c *gin.Context)

Teams returns the list of teams that has permission to access project object in the gin.Context

func (ProjectController) Playbooks added in v0.4.0

func (ctrl ProjectController) Playbooks(c *gin.Context)

Playbooks returns array of playbooks contains in project directory

func (ProjectController) ProjectUpdates added in v0.4.0

func (ctrl ProjectController) ProjectUpdates(c *gin.Context)

ProjectUpdates is a Gin handler function which returns project update jobs

func (ProjectController) SCMUpdate added in v0.4.0

func (ctrl ProjectController) SCMUpdate(c *gin.Context)

SCMUpdate creates a new system job to update a project

func (ProjectController) SCMUpdateInfo added in v0.4.0

func (ctrl ProjectController) SCMUpdateInfo(c *gin.Context)

SCMUpdateInfo returns whether a project can be updated or not

func (ProjectController) Update added in v0.4.0

func (ctrl ProjectController) Update(c *gin.Context)

UpdateProject is a Gin handler function which updates a project using request payload. This replaces all the fields in the database, empty "" fields and unspecified fields will be removed from the database object.

type TJobTmplController added in v0.4.0

type TJobTmplController struct{}

func (TJobTmplController) AccessList added in v0.4.0

func (ctrl TJobTmplController) AccessList(c *gin.Context)

AccessList is Gin Handler function

func (TJobTmplController) ActivityStream added in v0.4.0

func (ctrl TJobTmplController) ActivityStream(c *gin.Context)

ActivityStream returns serialized list of Activity models associated with the Job Template Resulting data structure contains:

{
 "count\": 99,
 "next\": null,
 "previous\": null,
 "results\": [
	...
	]
}

The `count` field indicates the total number of activity streams found for the given query. The `next` and `previous` fields provides links to additional results if there are more than will fit on a single page. The `results` list contains zero or more activity stream records. success returns 200 status code failure reruns 500 status code

func (TJobTmplController) All added in v0.4.0

func (ctrl TJobTmplController) All(c *gin.Context)

GetJTemplates is a Gin handler function which returns list of Job Templates The resulting data structure contains:

{
 "count\": 99,
 "next\": null,
 "previous\": null,
 "results\": [
	...
	]

The `count` field indicates the total number of job templates found for the given query. The `next` and `previous` fields provides links to additional results if there are more than will fit on a single page. The `results` list contains zero or more job template records. A success returns 200 status code A failure returns 500 status code This takes lookup parameters and order parameters to filter and sort output data

func (TJobTmplController) Create added in v0.4.0

func (ctrl TJobTmplController) Create(c *gin.Context)

AddJTemplate is Gin handler function which creates a new Credential using request payload This accepts Job Template model. fields to create a new job template: name: Name of this job template. string, required description: Optional description of this job template. string, default="" job_type: choice

  • `run: Run default
  • `check: Check
  • `scan: Scan

inventory: bson.ObjectId, default=nil project: bson.ObjectId, default=nil playbook: string, default="" credential: bson.ObjectId, default=nil cloud_credential: bson.ObjectId, default=nil network_credential: bson.ObjectId, default=nil forks: integer, default=0 limit: string, default="" verbosity: choice

  • 0: 0 Normal default
  • 1: 1 Verbose
  • 2: 2 More Verbose
  • 3: 3 Debug
  • 4: 4 Connection Debug
  • 5: 5 WinRM Debug

extra_vars: string, default="" job_tags: string, default="" force_handlers: boolean, default=False skip_tags: string, default="" start_at_task: string, default="" host_config_key: string, default="" ask_variables_on_launch: boolean, default=False ask_limit_on_launch: boolean, default=False ask_tags_on_launch: boolean, default=False ask_skip_tags_on_launch: boolean, default=False ask_job_type_on_launch: boolean, default=False ask_inventory_on_launch: boolean, default=False ask_credential_on_launch: boolean, default=False become_enabled: boolean, default=False allow_simultaneous: boolean, default=False

func (TJobTmplController) Delete added in v0.4.0

func (ctrl TJobTmplController) Delete(c *gin.Context)

RemoveJTemplate is a Gin handler function which removes a Job Template object from the database A success returns 204 status code A failure returns 500 status code

func (TJobTmplController) Jobs added in v0.4.0

func (ctrl TJobTmplController) Jobs(c *gin.Context)

Jobs returns list of jobs associated with the Job Template Resulting data structure contains:

{
 "count\": 99,
 "next\": null,
 "previous\": null,
 "results\": [
	...
	]
}

The `count` field indicates the total number of jobs found for the given query. The `next` and `previous` fields provides links to additional results if there are more than will fit on a single page. The `results` list contains zero or more job records.

func (TJobTmplController) Launch added in v0.4.0

func (ctrl TJobTmplController) Launch(c *gin.Context)

Launch creates a new job and adds the job into job queue. If any passwords, inventory, or extra variables (extra_vars) are required, they must be passed via POST data, with extra_vars given as a JSON string. If `credential_needed_to_start` is `true` then the `credential` field is required and if the `inventory_needed_to_start` is `True` then the `inventory` is required as well. success returns JSON serialized Job model with 201 status code if the request body is invalid returns JSON serialized Error model with 400 status code

func (TJobTmplController) LaunchInfo added in v0.4.0

func (ctrl TJobTmplController) LaunchInfo(c *gin.Context)

LaunchInfo returns JSON serialized launch information to determine if the job_template can be launched and whether any passwords are required to launch the job_template.

ask_variables_on_launch: Flag indicating whether the job template is configured to prompt for variables upon launch ask_tags_on_launch: Flag indicating whether the job template is configured to prompt for tags upon launch ask_skip_tags_on_launch: Flag indicating whether the job template is configured to prompt for skip_tags upon launch ask_job_type_on_launch: Flag indicating whether the job template is configured to prompt for job_type upon launch ask_limit_on_launch: Flag indicating whether the job template is configured to prompt for limit upon launch ask_inventory_on_launch: Flag indicating whether the job template is configured to prompt for inventory upon launch ask_credential_on_launch: Flag indicating whether the job template is configured to prompt for credential upon launch can_start_without_user_input: Flag indicating if the job template can be launched without user-input variables_needed_to_start: Required variable names required to launch the job_template credential_needed_to_start: Flag indicating the presence of a credential associated with the job template. If not then one should be supplied when launching the job inventory_needed_to_start: Flag indicating the presence of an inventory associated with the job template. If not then one should be supplied when launching the job

func (TJobTmplController) Middleware added in v0.4.0

func (ctrl TJobTmplController) Middleware(c *gin.Context)

Middleware generates a middleware handler function that works inside of a Gin request. This function takes CTXTerraformJobTemplateID from Gin Context and retrieves terraform job template data from the collection and store terraform job template data under key CTXTerraformJobTemplate in Gin Context

func (TJobTmplController) ObjectRoles added in v0.4.0

func (ctrl TJobTmplController) ObjectRoles(c *gin.Context)

ObjectRoles is a Gin handler function This returns available roles can be associated with a Terraform Job Template model

func (TJobTmplController) One added in v0.4.0

func (ctrl TJobTmplController) One(c *gin.Context)

GetJTemplate is a Gin handler function which returns the Terraform Job Template as a JSON object A success will return 200 status code A failure will return 500 status code

func (TJobTmplController) Update added in v0.4.0

func (ctrl TJobTmplController) Update(c *gin.Context)

UpdateJTemplate is a Gin handler function which updates a Job Template using request payload A success returns 200 status code A failure returns 500 status code if the request body is invalid returns serialized Error model with 400 status code

type TeamController added in v0.4.0

type TeamController struct{}

func (TeamController) AccessList added in v0.4.0

func (ctrl TeamController) AccessList(c *gin.Context)

func (TeamController) ActivityStream added in v0.4.0

func (ctrl TeamController) ActivityStream(c *gin.Context)

ActivityStream returns the activities of the user on Teams

func (TeamController) All added in v0.4.0

func (ctrl TeamController) All(c *gin.Context)

GetTeams is a Gin handler function which returns list of teams This takes lookup parameters and order parameters to filter and sort output data

func (TeamController) AssignRole added in v0.4.0

func (ctrl TeamController) AssignRole(c *gin.Context)

func (TeamController) Create added in v0.4.0

func (ctrl TeamController) Create(c *gin.Context)

AddTeam creates a new team

func (TeamController) Credentials added in v0.4.0

func (ctrl TeamController) Credentials(c *gin.Context)

Credentials is Gin handler function which returns credentials associated with a team

func (TeamController) Delete added in v0.4.0

func (ctrl TeamController) Delete(c *gin.Context)

RemoveTeam is a Gin handler function which removes a team object from the database

func (TeamController) GetRoles added in v0.4.0

func (ctrl TeamController) GetRoles(c *gin.Context)

func (TeamController) Middleware added in v0.4.0

func (ctrl TeamController) Middleware(c *gin.Context)

Middleware generates a middleware handler function that works inside of a Gin request. This function takes CTXTeamID from Gin Context and retrieves team data from the collection and store team data under key CTXTeam in Gin Context

func (TeamController) One added in v0.4.0

func (ctrl TeamController) One(c *gin.Context)

GetTeam is a Gin handler function which returns the team as a JSON object

func (TeamController) Projects added in v0.4.0

func (ctrl TeamController) Projects(c *gin.Context)

Projects is a Gin handler function which returns projects associated with a team

func (TeamController) Update added in v0.4.0

func (ctrl TeamController) Update(c *gin.Context)

UpdateTeam will update the Job Template

func (TeamController) Users added in v0.4.0

func (ctrl TeamController) Users(c *gin.Context)

Users is a Gin handler function which returns users associated with a team

type TerraformJobController added in v0.4.0

type TerraformJobController struct{}

func (TerraformJobController) All added in v0.4.0

func (ctrl TerraformJobController) All(c *gin.Context)

GetJobs is a Gin handler function which returns list of jobs This takes lookup parameters and order parameters to filter and sort output data

func (TerraformJobController) Cancel added in v0.4.0

func (ctrl TerraformJobController) Cancel(c *gin.Context)

Cancel cancels the pending job. The response status code will be 202 if successful, or 405 if the job cannot be canceled.

func (TerraformJobController) CancelInfo added in v0.4.0

func (ctrl TerraformJobController) CancelInfo(c *gin.Context)

CancelInfo to determine if the job can be cancelled. The response will include the following field: can_cancel: [boolean] Indicates whether this job can be canceled

func (TerraformJobController) Middleware added in v0.4.0

func (ctrl TerraformJobController) Middleware(c *gin.Context)

Middleware generates a middleware handler function that works inside of a Gin request. This function takes CTXTerraformJobID from Gin Context and retrieves credential data from the collection and store credential data under key CTXTerraformJob in Gin Context

func (TerraformJobController) One added in v0.4.0

func (ctrl TerraformJobController) One(c *gin.Context)

GetJob is a Gin handler function which returns the job as a JSON object

func (TerraformJobController) StdOut added in v0.4.0

func (ctrl TerraformJobController) StdOut(c *gin.Context)

StdOut returns ANSI standard output of a Job

type UserController added in v0.4.0

type UserController struct{}

func (UserController) ActivityStream added in v0.4.0

func (ctrl UserController) ActivityStream(c *gin.Context)

ActivityStream returns the activities of the user on other Users

func (UserController) AdminsOfOrganizations added in v0.4.0

func (ctrl UserController) AdminsOfOrganizations(c *gin.Context)

func (UserController) All added in v0.4.0

func (ctrl UserController) All(c *gin.Context)

func (UserController) AssignRole added in v0.4.0

func (ctrl UserController) AssignRole(c *gin.Context)

func (UserController) Create added in v0.4.0

func (ctrl UserController) Create(c *gin.Context)

func (UserController) Credentials added in v0.4.0

func (ctrl UserController) Credentials(c *gin.Context)

func (UserController) Delete added in v0.4.0

func (ctrl UserController) Delete(c *gin.Context)

func (UserController) GetRoles added in v0.4.0

func (ctrl UserController) GetRoles(c *gin.Context)

func (UserController) Middleware added in v0.4.0

func (ctrl UserController) Middleware(c *gin.Context)

func (UserController) One added in v0.4.0

func (ctrl UserController) One(c *gin.Context)

func (UserController) Organizations added in v0.4.0

func (ctrl UserController) Organizations(c *gin.Context)

func (UserController) Projects added in v0.4.0

func (ctrl UserController) Projects(c *gin.Context)

func (UserController) Teams added in v0.4.0

func (ctrl UserController) Teams(c *gin.Context)

func (UserController) Update added in v0.4.0

func (ctrl UserController) Update(c *gin.Context)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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