Documentation ¶
Overview ¶
This package contains the AWX client.
Index ¶
- Constants
- type Connection
- type ConnectionBuilder
- func (b *ConnectionBuilder) Agent(agent string) *ConnectionBuilder
- func (b *ConnectionBuilder) Bearer(bearer string) *ConnectionBuilder
- func (b *ConnectionBuilder) Build() (c *Connection, err error)
- func (b *ConnectionBuilder) CACertificates(certs []byte) *ConnectionBuilder
- func (b *ConnectionBuilder) CAFile(file string) *ConnectionBuilder
- func (b *ConnectionBuilder) Insecure(insecure bool) *ConnectionBuilder
- func (b *ConnectionBuilder) Password(password string) *ConnectionBuilder
- func (b *ConnectionBuilder) Proxy(proxy string) *ConnectionBuilder
- func (b *ConnectionBuilder) Token(token string) *ConnectionBuilder
- func (b *ConnectionBuilder) URL(url string) *ConnectionBuilder
- func (b *ConnectionBuilder) Username(username string) *ConnectionBuilder
- type Job
- type JobGetRequest
- type JobGetResponse
- type JobResource
- type JobStatus
- type JobTemplate
- type JobTemplateGetRequest
- type JobTemplateGetResponse
- type JobTemplateLaunch
- type JobTemplateLaunchGetRequest
- type JobTemplateLaunchGetResponse
- type JobTemplateLaunchPostRequest
- func (r *JobTemplateLaunchPostRequest) ExtraVar(name string, value interface{}) *JobTemplateLaunchPostRequest
- func (r *JobTemplateLaunchPostRequest) ExtraVars(value map[string]interface{}) *JobTemplateLaunchPostRequest
- func (r *JobTemplateLaunchPostRequest) Limit(value string) *JobTemplateLaunchPostRequest
- func (r *JobTemplateLaunchPostRequest) Send() (response *JobTemplateLaunchPostResponse, err error)
- type JobTemplateLaunchPostResponse
- type JobTemplateLaunchResource
- type JobTemplateResource
- type JobTemplatesGetRequest
- type JobTemplatesGetResponse
- type JobTemplatesResource
- type JobsGetRequest
- type JobsGetResponse
- type JobsResource
- type ListGetResponse
- type Project
- type ProjectGetRequest
- type ProjectGetResponse
- type ProjectResource
- type ProjectsGetRequest
- type ProjectsGetResponse
- type ProjectsResource
- type Request
- type Resource
Constants ¶
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) Projects ¶
func (c *Connection) Projects() *ProjectsResource
Projects returns a reference to the resource that manages the collection of projects.
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 (b *ConnectionBuilder) URL(url string) *ConnectionBuilder
func (*ConnectionBuilder) Username ¶
func (b *ConnectionBuilder) Username(username string) *ConnectionBuilder
type Job ¶
type Job struct {
// contains filtered or unexported fields
}
func (*Job) IsFinished ¶
func (*Job) IsSuccessful ¶
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 = "canceled" )
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 ¶
func (r *JobTemplateLaunchGetRequest) Send() (response *JobTemplateLaunchGetResponse, err error)
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 ¶
func (r *JobTemplateLaunchPostRequest) Limit(value string) *JobTemplateLaunchPostRequest
Limit allows limiting template execution to specific hosts.
func (*JobTemplateLaunchPostRequest) Send ¶
func (r *JobTemplateLaunchPostRequest) Send() (response *JobTemplateLaunchPostResponse, err error)
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 (r *JobTemplateLaunchResource) Get() *JobTemplateLaunchGetRequest
func (*JobTemplateLaunchResource) Post ¶
func (r *JobTemplateLaunchResource) Post() *JobTemplateLaunchPostRequest
type JobTemplateResource ¶
type JobTemplateResource struct {
Resource
}
func NewJobTemplateResource ¶
func NewJobTemplateResource(connection *Connection, path string) *JobTemplateResource
func (*JobTemplateResource) Get ¶
func (r *JobTemplateResource) Get() *JobTemplateGetRequest
func (*JobTemplateResource) Launch ¶
func (r *JobTemplateResource) Launch() *JobTemplateLaunchResource
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 (r *JobTemplatesResource) Get() *JobTemplatesGetRequest
func (*JobTemplatesResource) Id ¶
func (r *JobTemplatesResource) Id(id int) *JobTemplateResource
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 Project ¶
type Project struct {
// contains filtered or unexported fields
}
Project represents an AWX project.
func (*Project) SCMBranch ¶
SCMBranch returns the source code management system branch 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 ¶
func (r *ProjectResource) Get() *ProjectGetRequest
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 (r *ProjectsResource) Get() *ProjectsGetRequest
func (*ProjectsResource) Id ¶
func (r *ProjectsResource) Id(id int) *ProjectResource
Source Files ¶
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. |