Documentation
¶
Index ¶
- Constants
- func IsNil(i interface{}) bool
- type Control
- type Form
- type FormElement
- type Interruption
- type InterruptionService
- func (s *InterruptionService) GetAll() ([]*Interruption, error)
- func (s *InterruptionService) GetByID(id string) (*Interruption, error)
- func (s *InterruptionService) GetByIDs(ids []string) ([]*Interruption, error)
- func (s InterruptionService) GetResponsibility(resource *Interruption) (*users.User, error)
- func (s *InterruptionService) Submit(resource *Interruption, r *InterruptionSubmitRequest) (*Interruption, error)
- func (s InterruptionService) TakeResponsibility(resource *Interruption) (*users.User, error)
- type InterruptionSubmitRequest
- type InterruptionsQuery
Constants ¶
const ManualInterventionDecline = "Abort"
const ManualInterverventionApprove = "Proceed"
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Form ¶
type Form struct {
Elements []*FormElement `json:"Elements"`
Values map[string]string `json:"Values,omitempty"`
}
type FormElement ¶
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 ¶
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 ¶
func (s *InterruptionService) Submit(resource *Interruption, r *InterruptionSubmitRequest) (*Interruption, error)
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"`
}