interruptions

package
v2.41.1 Latest Latest
Warning

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

Go to latest
Published: May 1, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const ManualInterventionDecline = "Abort"
View Source
const ManualInterverventionApprove = "Proceed"

Variables

This section is empty.

Functions

func IsNil

func IsNil(i interface{}) bool

Types

type Control

type Control interface{}

type Form

type Form struct {
	Elements []*FormElement    `json:"Elements"`
	Values   map[string]string `json:"Values,omitempty"`
}

type FormElement

type FormElement struct {
	Control         Control `json:"Control,omitempty"`
	IsValueRequired *bool   `json:"IsValueRequired"`
	Name            string  `json:"Name,omitempty"`
}

type Interruption

type Interruption struct {
	CanTakeResponsibility       bool      `json:"CanTakeResponsibility"`
	CorrelationID               string    `json:"CorrelationId,omitempty"`
	Created                     time.Time `json:"Created,omitempty"`
	Form                        *Form     `json:"Form,omitempty"`
	HasResponsibility           bool      `json:"HasResponsibility"`
	IsLinkedToOtherInterruption bool      `json:"IsLinkedToOtherInterruption"`
	IsPending                   bool      `json:"IsPending"`
	RelatedDocumentIDs          []string  `json:"RelatedDocumentIds"`
	ResponsibleTeamIDs          []string  `json:"ResponsibleTeamIds"`
	ResponsibleUserID           string    `json:"ResponsibleUserId,omitempty"`
	SpaceID                     string    `json:"SpaceId,omitempty"`
	TaskID                      string    `json:"TaskId,omitempty"`
	Title                       string    `json:"Title,omitempty"`

	resources.Resource
}

func NewInterruption

func NewInterruption() *Interruption

type InterruptionService

type InterruptionService struct {
	services.Service
}

func NewInterruptionService

func NewInterruptionService(sling *sling.Sling, uriTemplate string) *InterruptionService

func (*InterruptionService) GetAll

func (s *InterruptionService) GetAll() ([]*Interruption, error)

GetAll returns all interruptions. If none can be found or an error occurs, it returns an empty collection.

func (*InterruptionService) GetByID

func (s *InterruptionService) GetByID(id string) (*Interruption, error)

GetByID returns the interruption that matches the input ID. If one cannot be found, it returns nil and an error.

func (*InterruptionService) GetByIDs

func (s *InterruptionService) GetByIDs(ids []string) ([]*Interruption, error)

GetByIDs gets a list of interruptions that match the input IDs.

func (InterruptionService) GetResponsibility

func (s InterruptionService) GetResponsibility(resource *Interruption) (*users.User, error)

GetResponsibility gets the User that is currently responsible for the Interruption.

func (*InterruptionService) Submit

Submit Submits a dictionary of form values for the interruption. Only the user with responsibility for this interruption can submit this form.

func (InterruptionService) TakeResponsibility

func (s InterruptionService) TakeResponsibility(resource *Interruption) (*users.User, error)

TakeResponsibility Allows the current user to take responsibility for this interruption. Only users in one of the responsible teams on this interruption can take responsibility for it.

type InterruptionSubmitRequest

type InterruptionSubmitRequest struct {
	Instructions string `json:"Instructions"`
	Notes        string `json:"Notes"`
	Result       string `json:"Result"`
}

func NewInterruptionSubmitRequest

func NewInterruptionSubmitRequest() *InterruptionSubmitRequest

type InterruptionsQuery

type InterruptionsQuery struct {
	IDs         []string `uri:"ids,omitempty" url:"ids,omitempty"`
	PendingOnly bool     `uri:"pendingOnly,omitempty" url:"pendingOnly,omitempty"`
	Regarding   string   `uri:"regarding,omitempty" url:"regarding,omitempty"`
	Skip        int      `uri:"skip,omitempty" url:"skip,omitempty"`
	Take        int      `uri:"take,omitempty" url:"take,omitempty"`
}

Jump to

Keyboard shortcuts

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