Documentation ¶
Index ¶
- type Status
- func (o *Status) AddFailureDetails(o *StatusDetails) (int, error)
- func (o *Status) AddPendingDetails(o *StatusDetails) (int, error)
- func (o *Status) AddSuccessDetails(s *StatusDetails) (int, error)
- func (o *Status) CreateFailureDetails(id, ver, mesg string) error
- func (o *Status) CreatePendingDetails(id, ver, mesg string) error
- func (o *Status) CreateSuccessDetails(id, ver, mesg string) error
- func (o *Status) IncreaseFailureCount() error
- func (o *Status) IncreasePendingCount() error
- func (o *Status) IncreaseSuccessCount() error
- func (o *Status) IncreaseTotalCount() error
- func (o *Status) NewFailureDetails() (*StatusDetails, error)
- func (o *Status) NewPendingDetails() (*StatusDetails, error)
- func (o *Status) NewSuccessDetails() (*StatusDetails, error)
- func (o *Status) SetFailureCount(i int) error
- func (o *Status) SetPendingCount(i int) error
- func (o *Status) SetRequestTimestamp(s string) error
- func (o *Status) SetRequestTimestampToCurrentTime() error
- func (o *Status) SetStatusCompleted() error
- func (o *Status) SetStatusPending() error
- func (o *Status) SetSuccessCount(i int) error
- func (o *Status) SetTotalCount(i int) error
- type StatusDetails
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Status ¶
type Status struct { properties.IDProperty Status string `json:"status,omitempty"` RequestTimestamp string `json:"request_timestamp,omitempty"` TotalCount int `json:"total_count,omitempty"` SuccessCount int `json:"success_count,omitempty"` Successes []StatusDetails `json:"successes,omitempty"` FailureCount int `json:"failure_count,omitempty"` Failures []StatusDetails `json:"failures,omitempty"` PendingCount int `json:"pending_count,omitempty"` Pendings []StatusDetails `json:"pendings,omitempty"` }
Status - This type implements the TAXII 2 Status Resource and defines all of the properties and methods needed to create and work with the TAXII Status Resource.
The following information comes directly from the TAXII 2 specification documents.
The status resource represents information about a request to add objects to a Collection. It contains information about the status of the request, such as whether or not it's completed (status) and MAY contain the status of individual objects within the request (i.e. whether they are still pending, completed and failed, or completed and succeeded).
func New ¶
func New() *Status
New - This function will create a new TAXII Status object and return it as a pointer.
func (*Status) AddFailureDetails ¶
func (o *Status) AddFailureDetails(o *StatusDetails) (int, error)
AddFailureDetails - This method will take in a SuccessDetails type as a pointer and add it to the Failures property. One would use this if they manually created their own SuccessDetails type and then wanted to add it to the Failures property.
func (*Status) AddPendingDetails ¶
func (o *Status) AddPendingDetails(o *StatusDetails) (int, error)
AddPendingDetails - This method will take in a SuccessDetails type as a pointer and add it to the Pendings property. One would use this if they manually created their own SuccessDetails type and then wanted to add it to the Pendings property.
func (*Status) AddSuccessDetails ¶
func (o *Status) AddSuccessDetails(s *StatusDetails) (int, error)
AddSuccessDetails - This method will take in a SuccessDetails type as a pointer and add it to the Successes property. One would use this if they manually created their own SuccessDetails type and then wanted to add it to the Successes property.
func (*Status) CreateFailureDetails ¶
CreateFailureDetails - This method will create a FailureDetails type based on the data provided and will add it to the Failures property.
func (*Status) CreatePendingDetails ¶
CreatePendingDetails - This method will create a SuccessDetails type based on the data provided and will add it to the Pending property.
func (*Status) CreateSuccessDetails ¶
CreateSuccessDetails - This method will create a SuccessDetails type based on the data provided and will add it to the Successes property.
func (*Status) IncreaseFailureCount ¶
IncreaseFailureCount - Increase Failure count number.
func (*Status) IncreasePendingCount ¶
IncreasePendingCount - Increase Pending count number.
func (*Status) IncreaseSuccessCount ¶
IncreaseSuccessCount - Increase Success count number.
func (*Status) IncreaseTotalCount ¶
IncreaseTotalCount - Increase Total count number.
func (*Status) NewFailureDetails ¶
func (o *Status) NewFailureDetails() (*StatusDetails, error)
NewFailureDetails - This method will create an empty SuccessDetails type, add it to the Failures property, and return a pointer to that instance.
func (*Status) NewPendingDetails ¶
func (o *Status) NewPendingDetails() (*StatusDetails, error)
NewPendingDetails - This method will create an empty SuccessDetails type, add it to the Pendings property, and return a pointer to that instance.
func (*Status) NewSuccessDetails ¶
func (o *Status) NewSuccessDetails() (*StatusDetails, error)
NewSuccessDetails - This method will create an empty SuccessDetails type, add it to the Successes property, and return a pointer to that instance.
func (*Status) SetFailureCount ¶
SetFailureCount - Set Failure Count to value provided.
func (*Status) SetPendingCount ¶
SetPendingCount - Set Pending Count to value provided.
func (*Status) SetRequestTimestamp ¶
SetRequestTimestamp - This method will set the Request time stamp to the provided value.
func (*Status) SetRequestTimestampToCurrentTime ¶
SetRequestTimestampToCurrentTime - This method will set the Request time stamp to the current time with micro second precision.
func (*Status) SetStatusCompleted ¶
SetStatusCompleted - This method will set the status to completed.
func (*Status) SetStatusPending ¶
SetStatusPending - This method will set the status to pending.
func (*Status) SetSuccessCount ¶
SetSuccessCount - Set Success Count to value provided.
func (*Status) SetTotalCount ¶
SetTotalCount - Set Total Count to value provided.
type StatusDetails ¶
type StatusDetails struct { ID string `json:"id,omitempty"` Version string `json:"version,omitempty"` Message string `json:"message,omitempty"` }
StatusDetails - This type defines the details for various status elements
func NewStatusDetails ¶
func NewStatusDetails() *StatusDetails
NewStatusDetails - This function will create a new TAXII Status Detail object and return it as a pointer.
func (*StatusDetails) SetID ¶
func (o *StatusDetails) SetID(s string) error
SetID - This method will set the ID to the provided value.
func (*StatusDetails) SetMessage ¶
func (o *StatusDetails) SetMessage(s string) error
SetMessage - This method will set the Message to the provided value.
func (*StatusDetails) SetVersion ¶
func (o *StatusDetails) SetVersion(s string) error
SetVersion - This method will set the Version to the provided value.