Documentation
¶
Index ¶
- type AppliedPolicyView
- type ApprovalRequestView
- type ApprovalSubject2
- type ConfigurationOptionView
- type EscalationActionView
- type EscalationView
- type Escalations
- type EscalationsView
- type Incident
- type IncidentCollectionView
- type IncidentList
- type IncidentListView
- type IncidentView
- type ParameterView
- type PermissionView
- type PolicyTemplateView
- type ProjectView
- type PublishedTemplateView
- type RegexpView
- type ResolutionActionView
- type ResolutionView
- type Resolutions
- type ResolutionsView
- type UserView
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AppliedPolicyView ¶
type AppliedPolicyView struct { // id identifies an applied policy by ID. ID *string // name provides a name for this specific application of the policy. Name *string // Project represents a RightScale project and provides some information about // the project. Project *ProjectView // href is the href of the applied policy. Href *string // policy_template links to key attributes of the policy template from which // the applied policy originated. PolicyTemplate *PolicyTemplateView // published_template links to key attributes of the published template from // which the applied policy originated. PublishedTemplate *PublishedTemplateView // description provides a human readable description for this specific // application of the policy. Description *string // doc_link is a HTTP URI to a page containing detailed documentation for the // policy. DocLink *string // info is an arbitrary set of key/value pairs that provide additional // information such as the policy author, support contact information, etc. Info map[string]string // created_by is the RightScale user that applied the policy. CreatedBy *UserView // created_at is the applied policy creation timestamp in RFC3339 format. CreatedAt *string // updated_at is the applied policy update timestamp in RFC3339 format. UpdatedAt *string // severity defines the severity level of incidents raised from this applied // policy. Severity *string // category is the type categorization of the applied policy. Category *string // frequency specifies the frequency with which to run policy evaluations Frequency *string // dry_run is a flag used for testing a policy so that an incident can be // raised without performing an action. DryRun *bool // options lists the configuration options used to parameterize the policy. Options []*ConfigurationOptionView // status is used to identify the current status of the applied policy. Status *string // error is the error message returned if the evaluation failed. On success // this attribute is empty. Error *string // errored_at is the applied policy error timestamp in RFC3339 format. On // success this attribute is empty. ErroredAt *string // kind is "gov#applied_policy". Kind *string }
AppliedPolicyView is a type that runs validations on a projected type.
func (*AppliedPolicyView) Validate ¶
func (result *AppliedPolicyView) Validate() (err error)
Validate runs the validations defined on AppliedPolicyView using the "default" view.
func (*AppliedPolicyView) ValidateLink ¶
func (result *AppliedPolicyView) ValidateLink() (err error)
ValidateLink runs the validations defined on AppliedPolicyView using the "link" view.
func (*AppliedPolicyView) ValidateSource ¶
func (result *AppliedPolicyView) ValidateSource() (err error)
ValidateSource runs the validations defined on AppliedPolicyView using the "source" view.
type ApprovalRequestView ¶
type ApprovalRequestView struct { // id identifies an approval request by ID. ID *string // project_id is the ID of the project where this approval request is created. ProjectID *uint // href is the href of the approval request Href *string // label is a short title for this approval request Label *string // description describes the details for this approval request. Description *string // subject is the subject of the approval. Subject *ApprovalSubject2 // created_at is the approval request creation timestamp in RFC3339 format. CreatedAt *string // updated_at is the last update timestamp in RFC3339 format. UpdatedAt *string // parameters is a list of parameters required for approval request. Parameters map[string]*ParameterView // status is the status of this approval request. Status *string // options lists the configuration options used to parameterize the approval // request. Options []*ConfigurationOptionView // approved_by is the RightScale user that approved this approval request. ApprovedBy *UserView // approved_at is the approval timestamp in RFC3339 format. ApprovedAt *string // denial_comment is a comment that explains the reason for denial, if relevant. DenialComment *string // denied_by is the RightScale user that denied this approval request. DeniedBy *UserView // denied_at is the denial timestamp in RFC3339 format. DeniedAt *string // kind is "gov#approval_request". Kind *string }
ApprovalRequestView is a type that runs validations on a projected type.
func (*ApprovalRequestView) Validate ¶
func (result *ApprovalRequestView) Validate() (err error)
Validate runs the validations defined on ApprovalRequestView using the "default" view.
func (*ApprovalRequestView) ValidateExtended ¶
func (result *ApprovalRequestView) ValidateExtended() (err error)
ValidateExtended runs the validations defined on ApprovalRequestView using the "extended" view.
type ApprovalSubject2 ¶
type ApprovalSubject2 struct { // kind is the kind of subject Kind *string // href is the href of the subject. Href *string }
ApprovalSubject2 is a type that runs validations on a projected type.
func (*ApprovalSubject2) Validate ¶
func (result *ApprovalSubject2) Validate() (err error)
Validate runs the validations defined on ApprovalSubject2.
type ConfigurationOptionView ¶
type ConfigurationOptionView struct { // name of option Name *string // label of option Label *string // type of option Type *string // value of option Value *interface{} }
ConfigurationOptionView is a type that runs validations on a projected type.
func (*ConfigurationOptionView) Validate ¶
func (result *ConfigurationOptionView) Validate() (err error)
Validate runs the validations defined on ConfigurationOptionView.
type EscalationActionView ¶
type EscalationActionView struct { // type is the type of the action. Type *string // status is the status of the action. Status *string // started_at is the time when the action was started. StartedAt *string // finished_at is the time when the action was finished. FinishedAt *string // error is any error occurred when handling the action. Error *string // approval_request is the approval request resource (if the type is // request_approval). ApprovalRequest *ApprovalRequestView // process_href is the href of a cloud workflow process. Required if the type // is cloud_workflow. ProcessHref *string }
EscalationActionView is a type that runs validations on a projected type.
func (*EscalationActionView) Validate ¶
func (result *EscalationActionView) Validate() (err error)
Validate runs the validations defined on EscalationActionView using the "default" view.
type EscalationView ¶
type EscalationView struct { // status is the status of the set of escalation actions. Status *string // name is the name of the escalation. Name *string // actions is the list of individual actions. Actions []*EscalationActionView }
EscalationView is a type that runs validations on a projected type.
func (*EscalationView) Validate ¶
func (result *EscalationView) Validate() (err error)
Validate runs the validations defined on EscalationView using the "default" view.
type Escalations ¶
type Escalations struct { // Type to project Projected *EscalationsView // View to render View string }
Escalations is the viewed result type that is projected based on a view.
func (*Escalations) Validate ¶
func (result *Escalations) Validate() (err error)
Validate runs the validations defined on the viewed result type Escalations.
type EscalationsView ¶
type EscalationsView struct { // status is the status of all of the escalations. Status *string // escalations is the set of escalations. Escalations []*EscalationView // started_at is the time when the incident handling is started. StartedAt *string // finished_at is the time when the incident handling is finished. It exists // when the status is completed or failed. FinishedAt *string }
EscalationsView is a type that runs validations on a projected type.
func (*EscalationsView) Validate ¶
func (result *EscalationsView) Validate() (err error)
Validate runs the validations defined on EscalationsView using the "default" view.
type Incident ¶
type Incident struct { // Type to project Projected *IncidentView // View to render View string }
Incident is the viewed result type that is projected based on a view.
type IncidentCollectionView ¶
type IncidentCollectionView []*IncidentView
IncidentCollectionView is a type that runs validations on a projected type.
func (IncidentCollectionView) Validate ¶
func (result IncidentCollectionView) Validate() (err error)
Validate runs the validations defined on IncidentCollectionView using the "default" view.
func (IncidentCollectionView) ValidateExtended ¶
func (result IncidentCollectionView) ValidateExtended() (err error)
ValidateExtended runs the validations defined on IncidentCollectionView using the "extended" view.
func (IncidentCollectionView) ValidateSource ¶
func (result IncidentCollectionView) ValidateSource() (err error)
ValidateSource runs the validations defined on IncidentCollectionView using the "source" view.
type IncidentList ¶
type IncidentList struct { // Type to project Projected *IncidentListView // View to render View string }
IncidentList is the viewed result type that is projected based on a view.
func (*IncidentList) Validate ¶
func (result *IncidentList) Validate() (err error)
Validate runs the validations defined on the viewed result type IncidentList.
type IncidentListView ¶
type IncidentListView struct { // count is the number of incidents in the list. Count *uint // etag is an HTTP ETag for the incident list. Etag *string // items is the array of incidents. Items IncidentCollectionView // not_modified is a flag used internally that indicates how to encode the HTTP // response (i.e. 200 or 304). NotModified *string // kind is "gov#incident_list". Kind *string }
IncidentListView is a type that runs validations on a projected type.
func (*IncidentListView) Validate ¶
func (result *IncidentListView) Validate() (err error)
Validate runs the validations defined on IncidentListView using the "default" view.
func (*IncidentListView) ValidateExtended ¶
func (result *IncidentListView) ValidateExtended() (err error)
ValidateExtended runs the validations defined on IncidentListView using the "extended" view.
type IncidentView ¶
type IncidentView struct { // id is the ID of the incident, must be unique in the project. ID *string // Project represents a RightScale project and provides some information about // the project. Project *ProjectView // href is the href of the incident. Href *string // applied_policy links to key attributes of the applied policy that initiated // the incident. AppliedPolicy *AppliedPolicyView // summary is a summary of the incident. Summary *string // message is a description of the incident. Detail *string // data is the data about the resources that violate the policy. Data *interface{} // The number of items in violation data. ViolationDataCount *uint // created_at is the incident creation timestamp in RFC3339 format. CreatedAt *string // updated_at is the incident update timestamp in RFC3339 format. UpdatedAt *string // resolved_at is the incident resolution timestamp in RFC3339 format. ResolvedAt *string // resolved_by is the RightScale user that resolved the incident if it was // resolved manually. ResolvedBy *UserView // resolution_message is an optional explaination of why the incident is // resolved. ResolutionMessage *string // state represents the current handling status of the incident. State *string // severity defines the severity level of the incident. Severity *string // category is the type categorization of the incident. Category *string // options lists the configuration options used to parameterize the policy that // created the incident. Options []*ConfigurationOptionView // dry_run is a flag used for testing a policy, that determines whether this // incident should trigger escalation actions. DryRun *bool // action_failed indicates whether any of the incident's actions failed during // execution. ActionFailed *bool // kind is "gov#incident". Kind *string // etag is an HTTP ETag for the incident. Etag *string // not_modified is a flag used internally that indicates how to encode the HTTP // response (i.e. 200 or 304). NotModified *string }
IncidentView is a type that runs validations on a projected type.
func (*IncidentView) Validate ¶
func (result *IncidentView) Validate() (err error)
Validate runs the validations defined on IncidentView using the "default" view.
func (*IncidentView) ValidateExtended ¶
func (result *IncidentView) ValidateExtended() (err error)
ValidateExtended runs the validations defined on IncidentView using the "extended" view.
func (*IncidentView) ValidateSource ¶
func (result *IncidentView) ValidateSource() (err error)
ValidateSource runs the validations defined on IncidentView using the "source" view.
type ParameterView ¶
type ParameterView struct { // Name of the parameter Name *string `json:"name"` // Type of the parameter Type *string `json:"type"` // Label to show in the UI Label *string `json:"label"` // The index of this parameter in the list Index *uint `json:"index"` // The category used to group parameters Category *string `json:"category"` // Description of the parameter Description *string `json:"description"` // The default value for the parameter Default *interface{} `json:"default"` // no_echo determines whether the value of the parameter should be hidden in // UIs and API responses. NoEcho *bool `json:"no_echo"` // List of values allowed for this parameter AllowedValues []interface{} `json:"allowed_values"` // The minimum length of a string parameter MinLength *uint `json:"min_length"` // The maximum length of a string parameter MaxLength *uint `json:"max_length"` // The minimum value of a number parmameter MinValue *float64 `json:"min_value"` // The maximum value of a number parameter MaxValue *float64 `json:"max_value"` // The regular expression pattern used to validate a string parameter AllowedPattern *RegexpView `json:"allowed_pattern"` // The description used for constraints ConstraintDescription *string `json:"constraint_description"` }
ParameterView is a type that runs validations on a projected type.
func (*ParameterView) Validate ¶
func (result *ParameterView) Validate() (err error)
Validate runs the validations defined on ParameterView.
type PermissionView ¶
type PermissionView struct { // Name of a permission Name *string `json:"name"` // Label is used in the UI Label *string `json:"label"` // List of resource names the permission is applied to Resources []string `json:"resources"` // List of action names the permission is applied to Actions []string `json:"actions"` }
PermissionView is a type that runs validations on a projected type.
func (*PermissionView) Validate ¶
func (result *PermissionView) Validate() (err error)
Validate runs the validations defined on PermissionView.
type PolicyTemplateView ¶
type PolicyTemplateView struct { // id identifies a policy template by ID. ID *string // name is the unique name of the policy template in the project. Name *string // project_id is the ID of the project that the policy template applies to. ProjectID *uint // rs_pt_ver is the policy engine version. RsPtVer *uint // short_description is the short description of the policy template. ShortDescription *string // long_description is the long description of the policy template. The content // can be markdown. LongDescription *string // doc_link is an HTTP URI to a page containing detailed documentation for the // policy. DocLink *string // info is an arbitrary set of key/value pairs that provide additional // information such as the policy author, support contact information, etc. Info map[string]string // href is the href of the policy template. Href *string // filename is the name of the file that was uploaded to create the policy // template. Filename *string // source is the policy template source code. Source *string // fingerprint is a SHA created during compilation. It is used to determine if // the template is outdated. Fingerprint *string // category is the type categorization of the policy template. Category *string // created_by is the RightScale user that created the policy template. CreatedBy *UserView // created_at is the policy template creation timestamp in RFC3339 format. CreatedAt *string // updated_by is the RightScale user that updated the policy template. UpdatedBy *UserView // updated_at is the last update timestamp in RFC3339 format. UpdatedAt *string // permissions is a list of permissions required to run the policy. Permissions map[string]*PermissionView // required_roles is a list of governance roles, derived from permissions, // required to run the policy. RequiredRoles []string // parameters is a list of parameters required to apply the policy. Parameters map[string]*ParameterView // severity defines the severity level of incidents raised from this policy // template. Severity *string // kind is "gov#policy_template". Kind *string }
PolicyTemplateView is a type that runs validations on a projected type.
func (*PolicyTemplateView) Validate ¶
func (result *PolicyTemplateView) Validate() (err error)
Validate runs the validations defined on PolicyTemplateView using the "default" view.
func (*PolicyTemplateView) ValidateExtended ¶
func (result *PolicyTemplateView) ValidateExtended() (err error)
ValidateExtended runs the validations defined on PolicyTemplateView using the "extended" view.
func (*PolicyTemplateView) ValidateLink ¶
func (result *PolicyTemplateView) ValidateLink() (err error)
ValidateLink runs the validations defined on PolicyTemplateView using the "link" view.
func (*PolicyTemplateView) ValidateSource ¶
func (result *PolicyTemplateView) ValidateSource() (err error)
ValidateSource runs the validations defined on PolicyTemplateView using the "source" view.
type ProjectView ¶
type ProjectView struct { // id is the Project ID ID *uint // name is the Project Name Name *string // org_id is the RightScale Organization ID OrgID *uint // org_name is the RightScale Organization Name OrgName *string }
ProjectView is a type that runs validations on a projected type.
func (*ProjectView) Validate ¶
func (result *ProjectView) Validate() (err error)
Validate runs the validations defined on ProjectView.
type PublishedTemplateView ¶
type PublishedTemplateView struct { // id identifies a published template by ID. ID *string // name is the unique name of the published template in the organization. Name *string // org_id is the ID of the organization that the published template belongs to. OrgID *uint // project_id is the ID of the project that the published template is published // from. ProjectID *uint // policy_template_id is the ID of the policy template from which the published // template originated. PolicyTemplateID *string // policy_template_url is the full URL to the policy template from which the // published template originated. PolicyTemplateURL *string // policy_template_fingerprint is fingerprint of the policy template. It is // used to determine if the policy template that this was published from is // outdated. PolicyTemplateFingerprint *string // rs_pt_ver is the policy engine version. RsPtVer *uint // short_description is the short description of the published template. ShortDescription *string // long_description is the long description of the published template. The // content can be markdown. LongDescription *string // doc_link is a HTTP URI to a page containing detailed documentation for the // policy. DocLink *string // info is an arbitrary set of key/value pairs that provide additional // information such as the policy author, support contact information, etc. Info map[string]string // href is the self-referential href of the published template. Href *string // filename is the name of the file that was uploaded to create the policy // template. Filename *string // source is published template source code. Source *string // fingerprint is a SHA created during compilation. It is used to determine if // the policy template that this was published from is outdated. Fingerprint *string // category is the type categorization of the published template. Category *string // created_by is the RightScale user that created the published template. CreatedBy *UserView // created_at is the published template creation timestamp in RFC3339 format. CreatedAt *string // updated_by is the RightScale user that updated the published template. UpdatedBy *UserView // updated_at is the published template update timestamp in RFC3339 format. UpdatedAt *string // permissions is a list of permissions required to run the policy. Permissions map[string]*PermissionView // required_roles is a list of governance roles, derived from permissions, // required to run the policy. RequiredRoles []string // parameters is a list of parameters required to apply the policy. Parameters map[string]*ParameterView // severity defines the severity level of incidents raised from this published // template. Severity *string // built_in is a flag to indicate whether the published template is a // "built-in" RS-supplied template. BuiltIn *bool // hidden is a flag to indicate whether the published template is hidden. Hidden *bool // hidden_by is the RightScale user that marked the published template as // hidden. HiddenBy *UserView // hidden_at is the hidden at timestamp in RFC3339 format. HiddenAt *string // kind is "gov#published_template". Kind *string }
PublishedTemplateView is a type that runs validations on a projected type.
func (*PublishedTemplateView) Validate ¶
func (result *PublishedTemplateView) Validate() (err error)
Validate runs the validations defined on PublishedTemplateView using the "default" view.
func (*PublishedTemplateView) ValidateExtended ¶
func (result *PublishedTemplateView) ValidateExtended() (err error)
ValidateExtended runs the validations defined on PublishedTemplateView using the "extended" view.
func (*PublishedTemplateView) ValidateLink ¶
func (result *PublishedTemplateView) ValidateLink() (err error)
ValidateLink runs the validations defined on PublishedTemplateView using the "link" view.
func (*PublishedTemplateView) ValidateSource ¶
func (result *PublishedTemplateView) ValidateSource() (err error)
ValidateSource runs the validations defined on PublishedTemplateView using the "source" view.
type RegexpView ¶
type RegexpView struct { // Pattern is the regular expression pattern. Pattern *string `json:"pattern"` // Options are the regular expression options. Options i (case insensitve) and // m (match over newlines) supported. Options *string `json:"options"` }
RegexpView is a type that runs validations on a projected type.
func (*RegexpView) Validate ¶
func (result *RegexpView) Validate() (err error)
Validate runs the validations defined on RegexpView.
type ResolutionActionView ¶
type ResolutionActionView struct { // type is the type of the action. Type *string // status is the status of the action. Status *string // started_at is the time when the action was started. StartedAt *string // finished_at is the time when the action was finished. FinishedAt *string // error is any error occurred when handling the action. Error *string // approval_request is the approval request resource (if the type is // request_approval). ApprovalRequest *ApprovalRequestView // process_href is the href of a cloud workflow process. Required if the type // is cloud_workflow. ProcessHref *string }
ResolutionActionView is a type that runs validations on a projected type.
func (*ResolutionActionView) Validate ¶
func (result *ResolutionActionView) Validate() (err error)
Validate runs the validations defined on ResolutionActionView using the "default" view.
type ResolutionView ¶
type ResolutionView struct { // status is the status of the set of resolution actions. Status *string // name is the name of the resolution. Name *string // actions is the list of individual actions. Actions []*ResolutionActionView }
ResolutionView is a type that runs validations on a projected type.
func (*ResolutionView) Validate ¶
func (result *ResolutionView) Validate() (err error)
Validate runs the validations defined on ResolutionView using the "default" view.
type Resolutions ¶
type Resolutions struct { // Type to project Projected *ResolutionsView // View to render View string }
Resolutions is the viewed result type that is projected based on a view.
func (*Resolutions) Validate ¶
func (result *Resolutions) Validate() (err error)
Validate runs the validations defined on the viewed result type Resolutions.
type ResolutionsView ¶
type ResolutionsView struct { // status is the status of all of the resolutions. Status *string // resolutions is the set of resolutions. Resolutions []*ResolutionView // started_at is the time when the incident handling is started. StartedAt *string // finished_at is the time when the incident handling is finished. It exists // when the status is completed or failed. FinishedAt *string }
ResolutionsView is a type that runs validations on a projected type.
func (*ResolutionsView) Validate ¶
func (result *ResolutionsView) Validate() (err error)
Validate runs the validations defined on ResolutionsView using the "default" view.