awx

package
v0.0.0-...-b74415f Latest Latest
Warning

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

Go to latest
Published: Sep 26, 2019 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Overview

This package contains the AWX client.

Index

Constants

View Source
const Version = "0.0.0"

Version is the version of the client.

Variables

This section is empty.

Functions

This section is empty.

Types

type Connection

type Connection struct {
	// contains filtered or unexported fields
}

func (*Connection) Close

func (c *Connection) Close()

func (*Connection) JobTemplates

func (c *Connection) JobTemplates() *JobTemplatesResource

JobTemplates returns a reference to the resource that manages the collection of job templates.

func (*Connection) Jobs

func (c *Connection) Jobs() *JobsResource

Jobs returns a reference to the resource that manages the collection of jobs.

func (*Connection) OAuth2Supported

func (c *Connection) OAuth2Supported() bool

func (*Connection) Organizations

func (c *Connection) Organizations() *OrganizationsResource

Organizations returns a reference to the resource that manages the collection of Organizations.

func (*Connection) Projects

func (c *Connection) Projects() *ProjectsResource

Projects returns a reference to the resource that manages the collection of projects.

func (*Connection) Users

func (c *Connection) Users() *UsersResource

Users returns a reference to the resource that manages the collection of users.

type ConnectionBuilder

type ConnectionBuilder struct {
	// contains filtered or unexported fields
}

func NewConnectionBuilder

func NewConnectionBuilder() *ConnectionBuilder

func (*ConnectionBuilder) Agent

func (b *ConnectionBuilder) Agent(agent string) *ConnectionBuilder

Agent sets the value of the HTTP user agent header that the client will use in all the requests sent to the server. This is optional, and the default value is the name of the client followed by the version number, for example 'GoClient/0.0.1'.

func (*ConnectionBuilder) Bearer

func (b *ConnectionBuilder) Bearer(bearer string) *ConnectionBuilder

func (*ConnectionBuilder) Build

func (b *ConnectionBuilder) Build() (c *Connection, err error)

func (*ConnectionBuilder) CACertificates

func (b *ConnectionBuilder) CACertificates(certs []byte) *ConnectionBuilder

CACertificates adds a list of CA certificates that will be trusted when verifying the certificates presented by the AWX server. The certs parameter must be a list of PEM encoded certificates.

func (*ConnectionBuilder) CAFile

func (b *ConnectionBuilder) CAFile(file string) *ConnectionBuilder

CAFile sets the name of the file that contains the PEM encoded CA certificates that will be trusted when verifying the certificate presented by the AWX server. It can be used multiple times to specify multiple files.

func (*ConnectionBuilder) Insecure

func (b *ConnectionBuilder) Insecure(insecure bool) *ConnectionBuilder

func (*ConnectionBuilder) Password

func (b *ConnectionBuilder) Password(password string) *ConnectionBuilder

func (*ConnectionBuilder) Proxy

func (b *ConnectionBuilder) Proxy(proxy string) *ConnectionBuilder

func (*ConnectionBuilder) Token

func (b *ConnectionBuilder) Token(token string) *ConnectionBuilder

func (*ConnectionBuilder) URL

func (*ConnectionBuilder) Username

func (b *ConnectionBuilder) Username(username string) *ConnectionBuilder

type Job

type Job struct {
	// contains filtered or unexported fields
}

func (*Job) Id

func (j *Job) Id() int

func (*Job) IsFinished

func (j *Job) IsFinished() bool

func (*Job) IsSuccessful

func (j *Job) IsSuccessful() bool

func (*Job) Status

func (j *Job) Status() JobStatus

type JobGetRequest

type JobGetRequest struct {
	Request
}

func (*JobGetRequest) Send

func (r *JobGetRequest) Send() (response *JobGetResponse, err error)

type JobGetResponse

type JobGetResponse struct {
	// contains filtered or unexported fields
}

func (*JobGetResponse) Job

func (r *JobGetResponse) Job() *Job

type JobResource

type JobResource struct {
	Resource
}

func NewJobResource

func NewJobResource(connection *Connection, path string) *JobResource

func (*JobResource) Get

func (r *JobResource) Get() *JobGetRequest

type JobStatus

type JobStatus string
const (
	JobStatusNew       JobStatus = "new"
	JobStatusPending   JobStatus = "pending"
	JobStatusWaiting   JobStatus = "waiting"
	JobStatusRunning   JobStatus = "running"
	JobStatusSuccesful JobStatus = "successful"
	JobStatusFailed    JobStatus = "failed"
	JobStatusError     JobStatus = "error"
	JobStatusCancelled JobStatus = "cancelled"
)

type JobTemplate

type JobTemplate struct {
	// contains filtered or unexported fields
}

func (*JobTemplate) AskLimitOnLaunch

func (t *JobTemplate) AskLimitOnLaunch() bool

func (*JobTemplate) AskVarsOnLaunch

func (t *JobTemplate) AskVarsOnLaunch() bool

func (*JobTemplate) Id

func (t *JobTemplate) Id() int

func (*JobTemplate) Name

func (t *JobTemplate) Name() string

type JobTemplateGetRequest

type JobTemplateGetRequest struct {
	Request
}

func (*JobTemplateGetRequest) Send

func (r *JobTemplateGetRequest) Send() (response *JobTemplateGetResponse, err error)

type JobTemplateGetResponse

type JobTemplateGetResponse struct {
	// contains filtered or unexported fields
}

func (*JobTemplateGetResponse) Result

func (r *JobTemplateGetResponse) Result() *JobTemplate

type JobTemplateLaunch

type JobTemplateLaunch struct {
	JobTemplateData *JobTemplate `json:"job_template_data,omitempty"`
}

type JobTemplateLaunchGetRequest

type JobTemplateLaunchGetRequest struct {
	Request
}

func (*JobTemplateLaunchGetRequest) Send

type JobTemplateLaunchGetResponse

type JobTemplateLaunchGetResponse struct {
	// contains filtered or unexported fields
}

func (*JobTemplateLaunchGetResponse) JobTemplateData

func (r *JobTemplateLaunchGetResponse) JobTemplateData() *JobTemplate

type JobTemplateLaunchPostRequest

type JobTemplateLaunchPostRequest struct {
	Request
	// contains filtered or unexported fields
}

func (*JobTemplateLaunchPostRequest) ExtraVar

func (r *JobTemplateLaunchPostRequest) ExtraVar(name string, value interface{}) *JobTemplateLaunchPostRequest

ExtraVar adds a single external variable to extraVars map.

func (*JobTemplateLaunchPostRequest) ExtraVars

func (r *JobTemplateLaunchPostRequest) ExtraVars(value map[string]interface{}) *JobTemplateLaunchPostRequest

ExtraVars set a map or external variables sent to the AWX job.

func (*JobTemplateLaunchPostRequest) Limit

Limit allows limiting template execution to specific hosts.

func (*JobTemplateLaunchPostRequest) Send

type JobTemplateLaunchPostResponse

type JobTemplateLaunchPostResponse struct {
	Job int
}

type JobTemplateLaunchResource

type JobTemplateLaunchResource struct {
	Resource
}

func NewJobTemplateLaunchResource

func NewJobTemplateLaunchResource(connection *Connection, path string) *JobTemplateLaunchResource

func (*JobTemplateLaunchResource) Get

func (*JobTemplateLaunchResource) Post

type JobTemplateResource

type JobTemplateResource struct {
	Resource
}

func NewJobTemplateResource

func NewJobTemplateResource(connection *Connection, path string) *JobTemplateResource

func (*JobTemplateResource) Get

func (*JobTemplateResource) Launch

type JobTemplatesGetRequest

type JobTemplatesGetRequest struct {
	Request
}

func (*JobTemplatesGetRequest) Filter

func (r *JobTemplatesGetRequest) Filter(name string, value interface{}) *JobTemplatesGetRequest

func (*JobTemplatesGetRequest) Send

func (r *JobTemplatesGetRequest) Send() (response *JobTemplatesGetResponse, err error)

type JobTemplatesGetResponse

type JobTemplatesGetResponse struct {
	ListGetResponse
	// contains filtered or unexported fields
}

func (*JobTemplatesGetResponse) Results

func (r *JobTemplatesGetResponse) Results() []*JobTemplate

type JobTemplatesResource

type JobTemplatesResource struct {
	Resource
}

func NewJobTemplatesResource

func NewJobTemplatesResource(connection *Connection, path string) *JobTemplatesResource

func (*JobTemplatesResource) Get

func (*JobTemplatesResource) Id

type JobsGetRequest

type JobsGetRequest struct {
	Request
}

func (*JobsGetRequest) Filter

func (r *JobsGetRequest) Filter(name string, value interface{}) *JobsGetRequest

func (*JobsGetRequest) Send

func (r *JobsGetRequest) Send() (response *JobsGetResponse, err error)

type JobsGetResponse

type JobsGetResponse struct {
	ListGetResponse
	// contains filtered or unexported fields
}

func (*JobsGetResponse) Results

func (r *JobsGetResponse) Results() []*Job

type JobsResource

type JobsResource struct {
	Resource
}

func NewJobsResource

func NewJobsResource(connection *Connection, path string) *JobsResource

func (*JobsResource) Get

func (r *JobsResource) Get() *JobsGetRequest

func (*JobsResource) Id

func (r *JobsResource) Id(id int) *JobResource

type ListGetResponse

type ListGetResponse struct {
	// contains filtered or unexported fields
}

func (*ListGetResponse) Count

func (r *ListGetResponse) Count() int

type Organization

type Organization struct {
	// contains filtered or unexported fields
}

Organization represents an AWX Organization.

func (*Organization) Execute_role_Id

func (p *Organization) Execute_role_Id() int

Name returns the name of the Organization.

func (*Organization) Id

func (p *Organization) Id() int

Id returns the unique identifier of the Organization.

func (*Organization) Name

func (p *Organization) Name() string

Name returns the name of the Organization.

type OrganizationGetRequest

type OrganizationGetRequest struct {
	Request
}

func (*OrganizationGetRequest) Send

func (r *OrganizationGetRequest) Send() (response *OrganizationGetResponse, err error)

type OrganizationGetResponse

type OrganizationGetResponse struct {
	// contains filtered or unexported fields
}

func (*OrganizationGetResponse) Result

type OrganizationResource

type OrganizationResource struct {
	Resource
}

func NewOrganizationResource

func NewOrganizationResource(connection *Connection, path string) *OrganizationResource

func (*OrganizationResource) Get

type OrganizationsGetRequest

type OrganizationsGetRequest struct {
	Request
}

func (*OrganizationsGetRequest) Filter

func (r *OrganizationsGetRequest) Filter(name string, value interface{}) *OrganizationsGetRequest

func (*OrganizationsGetRequest) Send

func (r *OrganizationsGetRequest) Send() (response *OrganizationsGetResponse, err error)

type OrganizationsGetResponse

type OrganizationsGetResponse struct {
	ListGetResponse
	// contains filtered or unexported fields
}

func (*OrganizationsGetResponse) Results

func (r *OrganizationsGetResponse) Results() []*Organization

type OrganizationsResource

type OrganizationsResource struct {
	Resource
}

func NewOrganizationsResource

func NewOrganizationsResource(connection *Connection, path string) *OrganizationsResource

func (*OrganizationsResource) Get

func (*OrganizationsResource) Id

type Project

type Project struct {
	// contains filtered or unexported fields
}

Project represents an AWX project.

func (*Project) Id

func (p *Project) Id() int

Id returns the unique identifier of the project.

func (*Project) Name

func (p *Project) Name() string

Name returns the name of the project.

func (*Project) SCMBranch

func (p *Project) SCMBranch() string

SCMBranch returns the source code management system branch of the project.

func (*Project) SCMType

func (p *Project) SCMType() string

SCMType returns the source code management system type of the project.

func (*Project) SCMURL

func (p *Project) SCMURL() string

SCMType returns the source code management system URL of the project.

type ProjectGetRequest

type ProjectGetRequest struct {
	Request
}

func (*ProjectGetRequest) Send

func (r *ProjectGetRequest) Send() (response *ProjectGetResponse, err error)

type ProjectGetResponse

type ProjectGetResponse struct {
	// contains filtered or unexported fields
}

func (*ProjectGetResponse) Result

func (r *ProjectGetResponse) Result() *Project

type ProjectResource

type ProjectResource struct {
	Resource
}

func NewProjectResource

func NewProjectResource(connection *Connection, path string) *ProjectResource

func (*ProjectResource) Get

type ProjectsGetRequest

type ProjectsGetRequest struct {
	Request
}

func (*ProjectsGetRequest) Filter

func (r *ProjectsGetRequest) Filter(name string, value interface{}) *ProjectsGetRequest

func (*ProjectsGetRequest) Send

func (r *ProjectsGetRequest) Send() (response *ProjectsGetResponse, err error)

type ProjectsGetResponse

type ProjectsGetResponse struct {
	ListGetResponse
	// contains filtered or unexported fields
}

func (*ProjectsGetResponse) Results

func (r *ProjectsGetResponse) Results() []*Project

type ProjectsResource

type ProjectsResource struct {
	Resource
}

func NewProjectsResource

func NewProjectsResource(connection *Connection, path string) *ProjectsResource

func (*ProjectsResource) Get

func (*ProjectsResource) Id

type Request

type Request struct {
	// contains filtered or unexported fields
}

type Resource

type Resource struct {
	// contains filtered or unexported fields
}

func (*Resource) String

func (r *Resource) String() string

type User

type User struct {
	// contains filtered or unexported fields
}

User represents an AWX User.

func (*User) Id

func (p *User) Id() int

Id returns the unique identifier of the User.

func (*User) Is_superuser

func (p *User) Is_superuser() bool

SCMType returns the source code management system type of the User.

func (*User) Username

func (p *User) Username() string

Name returns the username of the User.

type UserGetRequest

type UserGetRequest struct {
	Request
}

func (*UserGetRequest) Send

func (r *UserGetRequest) Send() (response *UserGetResponse, err error)

type UserGetResponse

type UserGetResponse struct {
	// contains filtered or unexported fields
}

func (*UserGetResponse) Result

func (r *UserGetResponse) Result() *User

type UserResource

type UserResource struct {
	Resource
}

func NewUserResource

func NewUserResource(connection *Connection, path string) *UserResource

func (*UserResource) Get

func (r *UserResource) Get() *UserGetRequest

type UsersGetRequest

type UsersGetRequest struct {
	Request
}

func (*UsersGetRequest) Filter

func (r *UsersGetRequest) Filter(name string, value interface{}) *UsersGetRequest

func (*UsersGetRequest) Send

func (r *UsersGetRequest) Send() (response *UsersGetResponse, err error)

type UsersGetResponse

type UsersGetResponse struct {
	ListGetResponse
	// contains filtered or unexported fields
}

func (*UsersGetResponse) Results

func (r *UsersGetResponse) Results() []*User

type UsersResource

type UsersResource struct {
	Resource
}

func NewUsersResource

func NewUsersResource(connection *Connection, path string) *UsersResource

func (*UsersResource) Get

func (r *UsersResource) Get() *UsersGetRequest

func (*UsersResource) Id

func (r *UsersResource) Id(id int) *UserResource

Directories

Path Synopsis
internal
data
This package contains the internal data structures used by the client in order to generate and parse the JSON documents used by in the AWX API.
This package contains the internal data structures used by the client in order to generate and parse the JSON documents used by in the AWX API.

Jump to

Keyboard shortcuts

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