pwe

package module
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Mar 28, 2019 License: Apache-2.0 Imports: 8 Imported by: 2

README

pipeline status coverage report

Documentation

Overview

Copyright 2018 F5 Networks

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Investigation

type Investigation struct {
	StartDate   *time.Time          `json:"start_date,omitempty" yaml:"start_date,omitempty"`
	UpdatedDate *time.Time          `json:"updated_date,omitempty" yaml:"updated_date,omitempty"`
	EndDate     *time.Time          `json:"end_date,omitempty" yaml:"end_date,omitempty"`
	StartedBy   *User               `json:"started_by,omitempty" yaml:"started_by,omitempty"`
	Notes       Notes               `json:"notes,omitempty" yaml:"notes,omitempty"`
	Result      InvestigationStatus `json:"result,omitempty" yaml:"result,omitempty"`
}

type InvestigationStatus

type InvestigationStatus int
const (
	INVESTIGATION_ACTIVE InvestigationStatus = iota
	INVESTIGATION_PRODUCT
	INVESTIGATION_FRAMEWORK
	INVESTIGATION_PLATFORM
	INVESTIGATION_UNKNOWN
	INVESTIGATION_SUCCESS
)

func InvestigationStatusFromString

func InvestigationStatusFromString(val string) InvestigationStatus

func (InvestigationStatus) MarshalJSON

func (is InvestigationStatus) MarshalJSON() ([]byte, error)

func (InvestigationStatus) String

func (is InvestigationStatus) String() string

func (*InvestigationStatus) UnmarshalJSON

func (is *InvestigationStatus) UnmarshalJSON(b []byte) (err error)

type Job

type Job struct {
	ID              RequestID              `json:"correlation_id" yaml:"correlation_id"`
	Executor        *JobExecutor           `json:"executor" yaml:"executor"`
	ExecutionID     RequestID              `json:"run_id" yaml:"run_id"`
	Name            string                 `json:"name" yaml:"name"`
	Description     string                 `json:"description" yaml:"description"`
	CreatedDate     *time.Time             `json:"creation_date" yaml:"creation_date"`
	StartDate       *time.Time             `json:"start_date,omitempty" yaml:"start_date,omitempty"`
	UpdatedDate     *time.Time             `json:"updated_date,omitempty" yaml:"updated_date,omitempty"`
	EndDate         *time.Time             `json:"end_date,omitempty" yaml:"end_date,omitempty"`
	CurrentWorkflow string                 `json:"current_workflow" yaml:"current_workflow"`
	Workflows       workflow.Workflows     `json:"workflows,omitempty" yaml:"workflows,omitempty"`
	Actions         actions.Actions        `json:"actions,omitempty" yaml:"actions,omitempty"`
	Context         *variables.Context     `json:"context,omitempty" yaml:"context,omitempty"`
	Status          JobStatus              `json:"status" yaml:"status"`
	CurrentStep     *workflow.WorkflowStep `json:"current_step,omitempty" yaml:"current_step,omitempty"`
	StopOnFailure   bool                   `json:"stop_on_failure,omitempty" yaml:"stop_on_failure,omitempty"`
	Investigation   *Investigation         `json:"investigation,omitempty" yaml:"investigation,omitempty"`
}

func (*Job) Completed

func (j *Job) Completed() bool

Completed return true if the job is in a completed status

func (*Job) Failed

func (j *Job) Failed() bool

Failed returns true is the job is in a failed status

func (*Job) Pending

func (j *Job) Pending() bool

Pending return true if the job is in a pending status

func (*Job) UnmarshalJSON

func (j *Job) UnmarshalJSON(b []byte) (err error)

UnmarshalJSON decodes the job, and validates the data

func (*Job) Validate

func (j *Job) Validate() (err error)

func (*Job) Workflow

func (j *Job) Workflow() (wf workflow.Workflow)

type JobExecutor

type JobExecutor struct {
	Type    string         `json:"type" yaml:"type"`
	Image   string         `json:"image" yaml:"image"`
	Tag     string         `json:"version" yaml:"version"`
	Command string         `json:"command,omitempty" yaml:"command,omitempty"`
	Args    variables.Args `json:"args,omitempty" yaml:"args,omitempty"`
	Env     variables.Env  `json:"env,omitempty" yaml:"env,omitempty"`
}

type JobStatus

type JobStatus int
const (
	JOB_QUEUED JobStatus = iota
	JOB_RUNNING
	JOB_PENDING_RESOURCES
	JOB_FAILURE
	JOB_SUCCESS
	JOB_CANCELED
	JOB_UNDER_INVESTIGATION
)

func JobStatusFromString

func JobStatusFromString(val string) JobStatus

func (JobStatus) MarshalJSON

func (js JobStatus) MarshalJSON() ([]byte, error)

func (JobStatus) ReturnCode

func (js JobStatus) ReturnCode() int

func (JobStatus) String

func (js JobStatus) String() string

func (*JobStatus) UnmarshalJSON

func (js *JobStatus) UnmarshalJSON(b []byte) (err error)

type Note

type Note struct {
	Date      *time.Time `json:"date,omitempty" yaml:"date,omitempty"`
	EnteredBy *User      `json:"entered_by,omitempty" yaml:"entered_by,omitempty"`
	Text      string     `json:"text,omitempty" yaml:"text,omitempty"`
}

type Notes

type Notes = []Note

type RequestID

type RequestID string

Generate a new uuid string

func NewRequestID

func NewRequestID() (id RequestID)

func (RequestID) GoString

func (r RequestID) GoString() string

func (RequestID) String

func (r RequestID) String() string

func (RequestID) UnixNano

func (r RequestID) UnixNano() (nano int64, err error)

type User

type User struct {
	Username string `json:"username"`
	Name     string `json:"name"`
	Email    string `json:"email"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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