Documentation ¶
Index ¶
- Variables
- func ValidateAppliedPolicyView(result *AppliedPolicyView) (err error)
- func ValidateAppliedPolicyViewLink(result *AppliedPolicyView) (err error)
- func ValidateAppliedPolicyViewSource(result *AppliedPolicyView) (err error)
- func ValidateApprovalRequestView(result *ApprovalRequestView) (err error)
- func ValidateApprovalRequestViewExtended(result *ApprovalRequestView) (err error)
- func ValidateApprovalSubject(result *ApprovalSubject) (err error)
- func ValidateArchivedIncident(result *ArchivedIncident) (err error)
- func ValidateArchivedIncidentCollectionView(result ArchivedIncidentCollectionView) (err error)
- func ValidateArchivedIncidentCollectionViewExtended(result ArchivedIncidentCollectionView) (err error)
- func ValidateArchivedIncidentCollectionViewSource(result ArchivedIncidentCollectionView) (err error)
- func ValidateArchivedIncidentList(result *ArchivedIncidentList) (err error)
- func ValidateArchivedIncidentListView(result *ArchivedIncidentListView) (err error)
- func ValidateArchivedIncidentListViewExtended(result *ArchivedIncidentListView) (err error)
- func ValidateArchivedIncidentView(result *ArchivedIncidentView) (err error)
- func ValidateArchivedIncidentViewExtended(result *ArchivedIncidentView) (err error)
- func ValidateArchivedIncidentViewSource(result *ArchivedIncidentView) (err error)
- func ValidateConfigurationOptionView(result *ConfigurationOptionView) (err error)
- func ValidateCredentialsTagView(result *CredentialsTagView) (err error)
- func ValidateCredentialsView(result *CredentialsView) (err error)
- func ValidateEscalationActionView(result *EscalationActionView) (err error)
- func ValidateEscalationView(result *EscalationView) (err error)
- func ValidateEscalations(result *Escalations) (err error)
- func ValidateEscalationsView(result *EscalationsView) (err error)
- func ValidateParameterView(result *ParameterView) (err error)
- func ValidatePermissionView(result *PermissionView) (err error)
- func ValidatePolicyTemplateView(result *PolicyTemplateView) (err error)
- func ValidatePolicyTemplateViewExtended(result *PolicyTemplateView) (err error)
- func ValidatePolicyTemplateViewLink(result *PolicyTemplateView) (err error)
- func ValidatePolicyTemplateViewSource(result *PolicyTemplateView) (err error)
- func ValidateProjectView(result *ProjectView) (err error)
- func ValidatePublishedTemplateView(result *PublishedTemplateView) (err error)
- func ValidatePublishedTemplateViewExtended(result *PublishedTemplateView) (err error)
- func ValidatePublishedTemplateViewLink(result *PublishedTemplateView) (err error)
- func ValidatePublishedTemplateViewSource(result *PublishedTemplateView) (err error)
- func ValidateRegexpView(result *RegexpView) (err error)
- func ValidateResolutionActionView(result *ResolutionActionView) (err error)
- func ValidateResolutionView(result *ResolutionView) (err error)
- func ValidateResolutions(result *Resolutions) (err error)
- func ValidateResolutionsView(result *ResolutionsView) (err error)
- func ValidateUserView(result *UserView) (err error)
- type AppliedPolicyView
- type ApprovalRequestView
- type ApprovalSubject
- type ArchivedIncident
- type ArchivedIncidentCollectionView
- type ArchivedIncidentList
- type ArchivedIncidentListView
- type ArchivedIncidentView
- type ConfigurationOptionView
- type CredentialsTagView
- type CredentialsView
- type EscalationActionView
- type EscalationView
- type Escalations
- type EscalationsView
- 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 ¶
var ( // ArchivedIncidentMap is a map of attribute names in result type // ArchivedIncident indexed by view name. ArchivedIncidentMap = map[string][]string{ "default": []string{ "id", "project", "href", "applied_policy", "summary", "created_at", "updated_at", "resolved_at", "resolved_by", "resolution_message", "state", "violation_data_count", "severity", "category", "options", "dry_run", "action_failed", "kind", "etag", "not_modified", }, "extended": []string{ "id", "project", "href", "applied_policy", "summary", "detail", "created_at", "updated_at", "resolved_at", "resolved_by", "resolution_message", "state", "violation_data_count", "severity", "category", "options", "dry_run", "action_failed", "kind", "etag", "not_modified", }, "source": []string{ "id", "project", "href", "applied_policy", "kind", "etag", "not_modified", }, } // ArchivedIncidentListMap is a map of attribute names in result type // ArchivedIncidentList indexed by view name. ArchivedIncidentListMap = map[string][]string{ "default": []string{ "count", "items", "etag", "not_modified", "kind", }, "extended": []string{ "count", "items", "etag", "not_modified", "kind", }, } // EscalationsMap is a map of attribute names in result type Escalations // indexed by view name. EscalationsMap = map[string][]string{ "default": []string{ "status", "escalations", "started_at", "finished_at", }, } // ResolutionsMap is a map of attribute names in result type Resolutions // indexed by view name. ResolutionsMap = map[string][]string{ "default": []string{ "status", "resolutions", "started_at", "finished_at", }, } // AppliedPolicyMap is a map of attribute names in result type AppliedPolicy // indexed by view name. AppliedPolicyMap = map[string][]string{ "default": []string{ "id", "policy_aggregate_id", "incident_aggregate_id", "name", "project", "href", "policy_template", "published_template", "description", "doc_link", "info", "created_by", "created_at", "updated_at", "severity", "category", "frequency", "dry_run", "skip_approvals", "options", "credentials", "status", "error", "errored_at", "scope", "kind", }, "source": []string{ "id", "policy_aggregate_id", "incident_aggregate_id", "name", "project", "href", "policy_template", "published_template", "kind", }, "link": []string{ "id", "policy_aggregate_id", "incident_aggregate_id", "name", "href", "policy_template", "published_template", "created_by", "created_at", "frequency", "kind", }, } // PolicyTemplateMap is a map of attribute names in result type PolicyTemplate // indexed by view name. PolicyTemplateMap = map[string][]string{ "default": []string{ "id", "name", "project_id", "rs_pt_ver", "short_description", "doc_link", "info", "default_frequency", "href", "fingerprint", "category", "created_by", "created_at", "updated_by", "updated_at", "required_roles", "severity", "tenancy", "kind", }, "extended": []string{ "id", "name", "project_id", "rs_pt_ver", "short_description", "long_description", "doc_link", "info", "default_frequency", "href", "fingerprint", "category", "created_by", "created_at", "updated_by", "updated_at", "permissions", "required_roles", "parameters", "severity", "tenancy", "credentials", "kind", }, "source": []string{ "id", "name", "href", "filename", "source", "fingerprint", "kind", }, "link": []string{ "id", "name", "href", "fingerprint", "updated_at", "updated_by", "kind", }, } // PublishedTemplateMap is a map of attribute names in result type // PublishedTemplate indexed by view name. PublishedTemplateMap = map[string][]string{ "default": []string{ "id", "name", "org_id", "project_id", "policy_template_id", "policy_template_url", "policy_template_fingerprint", "rs_pt_ver", "short_description", "doc_link", "info", "default_frequency", "href", "fingerprint", "category", "created_by", "created_at", "updated_by", "updated_at", "hidden_by", "hidden_at", "required_roles", "severity", "built_in", "hidden", "tenancy", "kind", }, "extended": []string{ "id", "name", "org_id", "project_id", "policy_template_id", "policy_template_url", "policy_template_fingerprint", "rs_pt_ver", "short_description", "long_description", "doc_link", "info", "default_frequency", "href", "fingerprint", "category", "created_by", "created_at", "updated_by", "updated_at", "hidden_by", "hidden_at", "permissions", "required_roles", "parameters", "severity", "built_in", "hidden", "tenancy", "credentials", "kind", }, "source": []string{ "id", "name", "href", "filename", "source", "fingerprint", "kind", }, "link": []string{ "id", "name", "href", "fingerprint", "updated_at", "updated_by", "built_in", "kind", }, } // ArchivedIncidentCollectionMap is a map of attribute names in result type // ArchivedIncidentCollection indexed by view name. ArchivedIncidentCollectionMap = map[string][]string{ "default": []string{ "id", "project", "href", "applied_policy", "summary", "created_at", "updated_at", "resolved_at", "resolved_by", "resolution_message", "state", "violation_data_count", "severity", "category", "options", "dry_run", "action_failed", "kind", "etag", "not_modified", }, "extended": []string{ "id", "project", "href", "applied_policy", "summary", "detail", "created_at", "updated_at", "resolved_at", "resolved_by", "resolution_message", "state", "violation_data_count", "severity", "category", "options", "dry_run", "action_failed", "kind", "etag", "not_modified", }, "source": []string{ "id", "project", "href", "applied_policy", "kind", "etag", "not_modified", }, } // EscalationMap is a map of attribute names in result type Escalation indexed // by view name. EscalationMap = map[string][]string{ "default": []string{ "status", "name", "actions", }, } // EscalationActionMap is a map of attribute names in result type // EscalationAction indexed by view name. EscalationActionMap = map[string][]string{ "default": []string{ "type", "status", "started_at", "finished_at", "error", "approval_request", "process_href", }, } // ApprovalRequestMap is a map of attribute names in result type // ApprovalRequest indexed by view name. ApprovalRequestMap = map[string][]string{ "default": []string{ "id", "project_id", "href", "label", "description", "subject", "created_at", "updated_at", "status", "kind", }, "extended": []string{ "id", "project_id", "href", "label", "description", "subject", "created_at", "updated_at", "status", "parameters", "options", "approved_by", "approved_at", "denial_comment", "denied_by", "denied_at", "kind", }, } // ResolutionMap is a map of attribute names in result type Resolution indexed // by view name. ResolutionMap = map[string][]string{ "default": []string{ "status", "name", "actions", }, } // ResolutionActionMap is a map of attribute names in result type // ResolutionAction indexed by view name. ResolutionActionMap = map[string][]string{ "default": []string{ "type", "status", "started_at", "finished_at", "error", "approval_request", "process_href", }, } )
Functions ¶
func ValidateAppliedPolicyView ¶
func ValidateAppliedPolicyView(result *AppliedPolicyView) (err error)
ValidateAppliedPolicyView runs the validations defined on AppliedPolicyView using the "default" view.
func ValidateAppliedPolicyViewLink ¶
func ValidateAppliedPolicyViewLink(result *AppliedPolicyView) (err error)
ValidateAppliedPolicyViewLink runs the validations defined on AppliedPolicyView using the "link" view.
func ValidateAppliedPolicyViewSource ¶
func ValidateAppliedPolicyViewSource(result *AppliedPolicyView) (err error)
ValidateAppliedPolicyViewSource runs the validations defined on AppliedPolicyView using the "source" view.
func ValidateApprovalRequestView ¶
func ValidateApprovalRequestView(result *ApprovalRequestView) (err error)
ValidateApprovalRequestView runs the validations defined on ApprovalRequestView using the "default" view.
func ValidateApprovalRequestViewExtended ¶
func ValidateApprovalRequestViewExtended(result *ApprovalRequestView) (err error)
ValidateApprovalRequestViewExtended runs the validations defined on ApprovalRequestView using the "extended" view.
func ValidateApprovalSubject ¶
func ValidateApprovalSubject(result *ApprovalSubject) (err error)
ValidateApprovalSubject runs the validations defined on ApprovalSubject.
func ValidateArchivedIncident ¶
func ValidateArchivedIncident(result *ArchivedIncident) (err error)
ValidateArchivedIncident runs the validations defined on the viewed result type ArchivedIncident.
func ValidateArchivedIncidentCollectionView ¶
func ValidateArchivedIncidentCollectionView(result ArchivedIncidentCollectionView) (err error)
ValidateArchivedIncidentCollectionView runs the validations defined on ArchivedIncidentCollectionView using the "default" view.
func ValidateArchivedIncidentCollectionViewExtended ¶
func ValidateArchivedIncidentCollectionViewExtended(result ArchivedIncidentCollectionView) (err error)
ValidateArchivedIncidentCollectionViewExtended runs the validations defined on ArchivedIncidentCollectionView using the "extended" view.
func ValidateArchivedIncidentCollectionViewSource ¶
func ValidateArchivedIncidentCollectionViewSource(result ArchivedIncidentCollectionView) (err error)
ValidateArchivedIncidentCollectionViewSource runs the validations defined on ArchivedIncidentCollectionView using the "source" view.
func ValidateArchivedIncidentList ¶
func ValidateArchivedIncidentList(result *ArchivedIncidentList) (err error)
ValidateArchivedIncidentList runs the validations defined on the viewed result type ArchivedIncidentList.
func ValidateArchivedIncidentListView ¶
func ValidateArchivedIncidentListView(result *ArchivedIncidentListView) (err error)
ValidateArchivedIncidentListView runs the validations defined on ArchivedIncidentListView using the "default" view.
func ValidateArchivedIncidentListViewExtended ¶
func ValidateArchivedIncidentListViewExtended(result *ArchivedIncidentListView) (err error)
ValidateArchivedIncidentListViewExtended runs the validations defined on ArchivedIncidentListView using the "extended" view.
func ValidateArchivedIncidentView ¶
func ValidateArchivedIncidentView(result *ArchivedIncidentView) (err error)
ValidateArchivedIncidentView runs the validations defined on ArchivedIncidentView using the "default" view.
func ValidateArchivedIncidentViewExtended ¶
func ValidateArchivedIncidentViewExtended(result *ArchivedIncidentView) (err error)
ValidateArchivedIncidentViewExtended runs the validations defined on ArchivedIncidentView using the "extended" view.
func ValidateArchivedIncidentViewSource ¶
func ValidateArchivedIncidentViewSource(result *ArchivedIncidentView) (err error)
ValidateArchivedIncidentViewSource runs the validations defined on ArchivedIncidentView using the "source" view.
func ValidateConfigurationOptionView ¶
func ValidateConfigurationOptionView(result *ConfigurationOptionView) (err error)
ValidateConfigurationOptionView runs the validations defined on ConfigurationOptionView.
func ValidateCredentialsTagView ¶
func ValidateCredentialsTagView(result *CredentialsTagView) (err error)
ValidateCredentialsTagView runs the validations defined on CredentialsTagView.
func ValidateCredentialsView ¶
func ValidateCredentialsView(result *CredentialsView) (err error)
ValidateCredentialsView runs the validations defined on CredentialsView.
func ValidateEscalationActionView ¶
func ValidateEscalationActionView(result *EscalationActionView) (err error)
ValidateEscalationActionView runs the validations defined on EscalationActionView using the "default" view.
func ValidateEscalationView ¶
func ValidateEscalationView(result *EscalationView) (err error)
ValidateEscalationView runs the validations defined on EscalationView using the "default" view.
func ValidateEscalations ¶
func ValidateEscalations(result *Escalations) (err error)
ValidateEscalations runs the validations defined on the viewed result type Escalations.
func ValidateEscalationsView ¶
func ValidateEscalationsView(result *EscalationsView) (err error)
ValidateEscalationsView runs the validations defined on EscalationsView using the "default" view.
func ValidateParameterView ¶
func ValidateParameterView(result *ParameterView) (err error)
ValidateParameterView runs the validations defined on ParameterView.
func ValidatePermissionView ¶
func ValidatePermissionView(result *PermissionView) (err error)
ValidatePermissionView runs the validations defined on PermissionView.
func ValidatePolicyTemplateView ¶
func ValidatePolicyTemplateView(result *PolicyTemplateView) (err error)
ValidatePolicyTemplateView runs the validations defined on PolicyTemplateView using the "default" view.
func ValidatePolicyTemplateViewExtended ¶
func ValidatePolicyTemplateViewExtended(result *PolicyTemplateView) (err error)
ValidatePolicyTemplateViewExtended runs the validations defined on PolicyTemplateView using the "extended" view.
func ValidatePolicyTemplateViewLink ¶
func ValidatePolicyTemplateViewLink(result *PolicyTemplateView) (err error)
ValidatePolicyTemplateViewLink runs the validations defined on PolicyTemplateView using the "link" view.
func ValidatePolicyTemplateViewSource ¶
func ValidatePolicyTemplateViewSource(result *PolicyTemplateView) (err error)
ValidatePolicyTemplateViewSource runs the validations defined on PolicyTemplateView using the "source" view.
func ValidateProjectView ¶
func ValidateProjectView(result *ProjectView) (err error)
ValidateProjectView runs the validations defined on ProjectView.
func ValidatePublishedTemplateView ¶
func ValidatePublishedTemplateView(result *PublishedTemplateView) (err error)
ValidatePublishedTemplateView runs the validations defined on PublishedTemplateView using the "default" view.
func ValidatePublishedTemplateViewExtended ¶
func ValidatePublishedTemplateViewExtended(result *PublishedTemplateView) (err error)
ValidatePublishedTemplateViewExtended runs the validations defined on PublishedTemplateView using the "extended" view.
func ValidatePublishedTemplateViewLink ¶
func ValidatePublishedTemplateViewLink(result *PublishedTemplateView) (err error)
ValidatePublishedTemplateViewLink runs the validations defined on PublishedTemplateView using the "link" view.
func ValidatePublishedTemplateViewSource ¶
func ValidatePublishedTemplateViewSource(result *PublishedTemplateView) (err error)
ValidatePublishedTemplateViewSource runs the validations defined on PublishedTemplateView using the "source" view.
func ValidateRegexpView ¶
func ValidateRegexpView(result *RegexpView) (err error)
ValidateRegexpView runs the validations defined on RegexpView.
func ValidateResolutionActionView ¶
func ValidateResolutionActionView(result *ResolutionActionView) (err error)
ValidateResolutionActionView runs the validations defined on ResolutionActionView using the "default" view.
func ValidateResolutionView ¶
func ValidateResolutionView(result *ResolutionView) (err error)
ValidateResolutionView runs the validations defined on ResolutionView using the "default" view.
func ValidateResolutions ¶
func ValidateResolutions(result *Resolutions) (err error)
ValidateResolutions runs the validations defined on the viewed result type Resolutions.
func ValidateResolutionsView ¶
func ValidateResolutionsView(result *ResolutionsView) (err error)
ValidateResolutionsView runs the validations defined on ResolutionsView using the "default" view.
func ValidateUserView ¶
ValidateUserView runs the validations defined on UserView.
Types ¶
type AppliedPolicyView ¶
type AppliedPolicyView struct { // id identifies an applied policy by ID. ID *string // policy_aggregate_id is set if applied policy is part of an policy aggregate. PolicyAggregateID *string // incident_aggregate_id is set if applied incident is part of an policy // aggregate. IncidentAggregateID *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 // skip_approvals means that any approval actions will be skipped and all // actions automatically run. SkipApprovals *bool // options lists the configuration options used to parameterize the policy. Options []*ConfigurationOptionView // credentials map of credentials to use. The key in the map is the credential // name from the PolicyTemplate and the value is the credential identifier from // the Credentials management page. Credentials map[string]string // 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 // scope is whether the policy is managed at an org-wide or project level. Scope *string // kind is "gov#applied_policy". Kind *string }
AppliedPolicyView is a type that runs validations on a projected type.
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 *ApprovalSubject // 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.
type ApprovalSubject ¶
type ApprovalSubject struct { // kind is the kind of subject Kind *string // href is the href of the subject. Href *string }
ApprovalSubject is a type that runs validations on a projected type.
type ArchivedIncident ¶
type ArchivedIncident struct { // Type to project Projected *ArchivedIncidentView // View to render View string }
ArchivedIncident is the viewed result type that is projected based on a view.
type ArchivedIncidentCollectionView ¶
type ArchivedIncidentCollectionView []*ArchivedIncidentView
ArchivedIncidentCollectionView is a type that runs validations on a projected type.
type ArchivedIncidentList ¶
type ArchivedIncidentList struct { // Type to project Projected *ArchivedIncidentListView // View to render View string }
ArchivedIncidentList is the viewed result type that is projected based on a view.
type ArchivedIncidentListView ¶
type ArchivedIncidentListView 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 archived incidents. Items ArchivedIncidentCollectionView // 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#archived_incident_list". Kind *string }
ArchivedIncidentListView is a type that runs validations on a projected type.
type ArchivedIncidentView ¶
type ArchivedIncidentView struct { // id is the ID of the archived 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 archived 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#archived_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 }
ArchivedIncidentView is a type that runs validations on a projected type.
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{} // no_echo determines whether the value of the configuration option should be // hidden in UIs and API responses. NoEcho *bool }
ConfigurationOptionView is a type that runs validations on a projected type.
type CredentialsTagView ¶
type CredentialsTagView struct { // Key is the tag key. Key *string `json:"key"` // Value is the tag value. Value *string `json:"value"` }
CredentialsTagView is a type that runs validations on a projected type.
type CredentialsView ¶
type CredentialsView struct { // Name in policy template source code Name *string `json:"name"` // Schemes of credentials service resource supported. Schemes []string `json:"schemes"` // Label for the auth reference Label *string `json:"label"` // Description of what types of permissions need to be provided by auth. Description *string `json:"description"` // Tags is an optional filter to only show credentials matching a certain tag. Tags []*CredentialsTagView `json:"tags"` }
CredentialsView is a type that runs validations on a projected type.
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.
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.
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.
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.
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.
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.
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 // default_frequency defines the interval the template will be run unless set // differently during application. DefaultFrequency *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 // tenancy indicates whether this template can be run across multiple projects // or is restricted to a single project. Tenancy *string // credentials is a list of authorization for external APIs needed to run the // policy. Credentials map[string]*CredentialsView // kind is "gov#policy_template". Kind *string }
PolicyTemplateView is a type that runs validations on a projected type.
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.
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 // default_frequency defines the interval the template will be run unless set // differently during application. DefaultFrequency *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 // tenancy indicates whether this template can be run across multiple projects // or is restricted to a single project. Tenancy *string // credentials is a list of authorization for external APIs needed to run the // policy. Credentials map[string]*CredentialsView // kind is "gov#published_template". Kind *string }
PublishedTemplateView is a type that runs validations on a projected type.
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.
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.
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.
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.
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.