Documentation ¶
Index ¶
- Constants
- Variables
- func MakeBadGateway(err error) *goa.ServiceError
- func MakeBadRequest(err error) *goa.ServiceError
- func MakeForbidden(err error) *goa.ServiceError
- func MakeInternalError(err error) *goa.ServiceError
- func MakeNotFound(err error) *goa.ServiceError
- func MakeUnauthorized(err error) *goa.ServiceError
- func NewIndexEndpoint(s Service, authJWTFn security.AuthJWTFunc) goa.Endpoint
- func NewShowEndpoint(s Service, authJWTFn security.AuthJWTFunc) goa.Endpoint
- func NewShowNonCatalogEndpoint(s Service, authJWTFn security.AuthJWTFunc) goa.Endpoint
- func NewViewedIncidentAggregate(res *IncidentAggregate, view string) *incidentaggregateviews.IncidentAggregate
- func NewViewedIncidentAggregateList(res *IncidentAggregateList, view string) *incidentaggregateviews.IncidentAggregateList
- func NewViewedIncidentAggregateNonCatalog(res *IncidentAggregateNonCatalog, view string) *incidentaggregateviews.IncidentAggregateNonCatalog
- type ActionSummary
- type AppliedPolicy
- type Auther
- type Client
- func (c *Client) Index(ctx context.Context, p *IndexPayload) (res *IncidentAggregateList, err error)
- func (c *Client) Show(ctx context.Context, p *ShowPayload) (res *IncidentAggregate, err error)
- func (c *Client) ShowNonCatalog(ctx context.Context, p *ShowNonCatalogPayload) (res *IncidentAggregateNonCatalog, err error)
- type ConfigurationOption
- type Credentials
- type CredentialsTag
- type Endpoints
- type IncidentAggregate
- type IncidentAggregateCollection
- type IncidentAggregateItem
- type IncidentAggregateItemCollection
- type IncidentAggregateList
- type IncidentAggregateNonCatalog
- type IncidentAggregateNonCatalogItem
- type IncidentAggregateNonCatalogItemCollection
- type IncidentSummary
- type IndexPayload
- type Org
- type Parameter
- type Permission
- type PolicyAggregate
- type PolicyAggregateItem
- type PolicyAggregateItemCollection
- type PolicyAggregateNonCatalog
- type PolicyAggregateNonCatalogItem
- type PolicyAggregateNonCatalogItemCollection
- type PolicyTemplate
- type Project
- type PublishedTemplate
- type Regexp
- type Service
- type ShowNonCatalogPayload
- type ShowPayload
- type User
Constants ¶
const ServiceName = "IncidentAggregate"
ServiceName is the name of the service as defined in the design. This is the same value that is set in the endpoint request contexts under the ServiceKey key.
Variables ¶
var MethodNames = [3]string{"show", "show_non_catalog", "index"}
MethodNames lists the service method names as defined in the design. These are the same values that are set in the endpoint request contexts under the MethodKey key.
Functions ¶
func MakeBadGateway ¶
func MakeBadGateway(err error) *goa.ServiceError
MakeBadGateway builds a goa.ServiceError from an error.
func MakeBadRequest ¶
func MakeBadRequest(err error) *goa.ServiceError
MakeBadRequest builds a goa.ServiceError from an error.
func MakeForbidden ¶
func MakeForbidden(err error) *goa.ServiceError
MakeForbidden builds a goa.ServiceError from an error.
func MakeInternalError ¶
func MakeInternalError(err error) *goa.ServiceError
MakeInternalError builds a goa.ServiceError from an error.
func MakeNotFound ¶
func MakeNotFound(err error) *goa.ServiceError
MakeNotFound builds a goa.ServiceError from an error.
func MakeUnauthorized ¶
func MakeUnauthorized(err error) *goa.ServiceError
MakeUnauthorized builds a goa.ServiceError from an error.
func NewIndexEndpoint ¶
func NewIndexEndpoint(s Service, authJWTFn security.AuthJWTFunc) goa.Endpoint
NewIndexEndpoint returns an endpoint function that calls the method "index" of service "IncidentAggregate".
func NewShowEndpoint ¶
func NewShowEndpoint(s Service, authJWTFn security.AuthJWTFunc) goa.Endpoint
NewShowEndpoint returns an endpoint function that calls the method "show" of service "IncidentAggregate".
func NewShowNonCatalogEndpoint ¶
func NewShowNonCatalogEndpoint(s Service, authJWTFn security.AuthJWTFunc) goa.Endpoint
NewShowNonCatalogEndpoint returns an endpoint function that calls the method "show_non_catalog" of service "IncidentAggregate".
func NewViewedIncidentAggregate ¶
func NewViewedIncidentAggregate(res *IncidentAggregate, view string) *incidentaggregateviews.IncidentAggregate
NewViewedIncidentAggregate initializes viewed result type IncidentAggregate from result type IncidentAggregate using the given view.
func NewViewedIncidentAggregateList ¶
func NewViewedIncidentAggregateList(res *IncidentAggregateList, view string) *incidentaggregateviews.IncidentAggregateList
NewViewedIncidentAggregateList initializes viewed result type IncidentAggregateList from result type IncidentAggregateList using the given view.
func NewViewedIncidentAggregateNonCatalog ¶
func NewViewedIncidentAggregateNonCatalog(res *IncidentAggregateNonCatalog, view string) *incidentaggregateviews.IncidentAggregateNonCatalog
NewViewedIncidentAggregateNonCatalog initializes viewed result type IncidentAggregateNonCatalog from result type IncidentAggregateNonCatalog using the given view.
Types ¶
type ActionSummary ¶
type ActionSummary struct { // The number of incidents with pending approvals. PendingCount uint // The number of failed escalations. FailedCount uint }
Summary of escalation and resolution actions for an incident aggregate.
type AppliedPolicy ¶
type AppliedPolicy 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 *Project // 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 *PolicyTemplate // published_template links to key attributes of the published template from // which the applied policy originated. PublishedTemplate *PublishedTemplate // 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 *User // 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 []*ConfigurationOption // 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 }
AppliedPolicy describes a policy that is currently applied.
type Auther ¶
type Auther interface { // JWTAuth implements the authorization logic for the JWT security scheme. JWTAuth(ctx context.Context, token string, schema *security.JWTScheme) (context.Context, error) }
Auther defines the authorization functions to be implemented by the service.
type Client ¶
type Client struct { ShowEndpoint goa.Endpoint ShowNonCatalogEndpoint goa.Endpoint IndexEndpoint goa.Endpoint }
Client is the "IncidentAggregate" service client.
func (*Client) Index ¶
func (c *Client) Index(ctx context.Context, p *IndexPayload) (res *IncidentAggregateList, err error)
Index calls the "index" endpoint of the "IncidentAggregate" service.
func (*Client) Show ¶
func (c *Client) Show(ctx context.Context, p *ShowPayload) (res *IncidentAggregate, err error)
Show calls the "show" endpoint of the "IncidentAggregate" service. Show may return the following errors:
- "not_found" (type *goa.ServiceError)
- error: internal error
func (*Client) ShowNonCatalog ¶
func (c *Client) ShowNonCatalog(ctx context.Context, p *ShowNonCatalogPayload) (res *IncidentAggregateNonCatalog, err error)
ShowNonCatalog calls the "show_non_catalog" endpoint of the "IncidentAggregate" service.
type ConfigurationOption ¶
type ConfigurationOption 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 }
ConfigurationOption describes a single parameter value used to configure an applied policy.
type Credentials ¶
type Credentials 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 []*CredentialsTag `json:"tags"` }
Credentials describes a reference to an API signer in the credentials service in the policy language.
type CredentialsTag ¶
type Endpoints ¶
Endpoints wraps the "IncidentAggregate" service endpoints.
func NewEndpoints ¶
NewEndpoints wraps the methods of the "IncidentAggregate" service with endpoints.
type IncidentAggregate ¶
type IncidentAggregate struct { // id is the ID of the incident_aggregate, must be unique in the org. ID string // Org represents a RightScale org and provides some information about the org. Org *Org // href is the href of the incident_aggregate. Href *string // policy_aggregate links to key attributes of the applied policy that // initiated the incident_aggregate. PolicyAggregate *PolicyAggregate // The number of incidents across all projects. Count *uint IncidentSummary *IncidentSummary ActionSummary *ActionSummary // An array of the individual incidents and their statuses. Items IncidentAggregateItemCollection // created_at is the incident_aggregate creation timestamp in RFC3339 format. CreatedAt *string // updated_at is the incident_aggregate update timestamp in RFC3339 format. UpdatedAt *string // state represents the current handling status of the incident_aggregate. State *string // severity defines the severity level of the incident_aggregate. Severity *string // category is the type categorization of the incident_aggregate. Category *string // dry_run is a flag used for testing a policy, that determines whether this // incident_aggregate should trigger escalation actions. DryRun *bool // kind is "gov#incident_aggregate". Kind string // etag is an HTTP ETag for the incident_aggregate. Etag string // not_modified is a flag used internally that indicates how to encode the HTTP // response (i.e. 200 or 304). NotModified *string }
IncidentAggregate is the result type of the IncidentAggregate service show method.
func NewIncidentAggregate ¶
func NewIncidentAggregate(vres *incidentaggregateviews.IncidentAggregate) *IncidentAggregate
NewIncidentAggregate initializes result type IncidentAggregate from viewed result type IncidentAggregate.
type IncidentAggregateCollection ¶
type IncidentAggregateCollection []*IncidentAggregate
type IncidentAggregateItem ¶
type IncidentAggregateItem 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 *Project // url of the incident. URL string // 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 *User // 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 // action_failed indicates whether any of the incident's actions failed during // execution. ActionFailed *bool // action_pending indicates whether any of the incident has any pending actions // such as approval requests. ActionPending *bool // kind is "gov#incident_aggregate_item". Kind string }
IncidentAggregateItem describes an incident raised from an applied policy.
type IncidentAggregateItemCollection ¶
type IncidentAggregateItemCollection []*IncidentAggregateItem
type IncidentAggregateList ¶
type IncidentAggregateList struct { // count is the number of incident aggregates in the list. Count *uint // etag is an HTTP ETag for the incident list. Etag string // items is the array of incident aggregates. Items IncidentAggregateCollection // 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_aggregate_list". Kind string }
IncidentAggregateList is the result type of the IncidentAggregate service index method.
func NewIncidentAggregateList ¶
func NewIncidentAggregateList(vres *incidentaggregateviews.IncidentAggregateList) *IncidentAggregateList
NewIncidentAggregateList initializes result type IncidentAggregateList from viewed result type IncidentAggregateList.
type IncidentAggregateNonCatalog ¶
type IncidentAggregateNonCatalog struct { // href is the href of the incident_aggregate. Href *string // policy_aggregate links to key attributes of the policy aggregate that // initiated the incident_aggregate. PolicyAggregate *PolicyAggregateNonCatalog // The number of incidents across all projects. Count *uint IncidentSummary *IncidentSummary ActionSummary *ActionSummary // An array of the individual incidents and their statuses. Items IncidentAggregateNonCatalogItemCollection // updated_at is the incident_aggregate update timestamp in RFC3339 format. UpdatedAt *string // kind is "gov#incident_aggregate_non_catalog". Kind string // etag is an HTTP ETag for the incident_aggregate. Etag string // not_modified is a flag used internally that indicates how to encode the HTTP // response (i.e. 200 or 304). NotModified *string }
IncidentAggregateNonCatalog is the result type of the IncidentAggregate service show_non_catalog method.
func NewIncidentAggregateNonCatalog ¶
func NewIncidentAggregateNonCatalog(vres *incidentaggregateviews.IncidentAggregateNonCatalog) *IncidentAggregateNonCatalog
NewIncidentAggregateNonCatalog initializes result type IncidentAggregateNonCatalog from viewed result type IncidentAggregateNonCatalog.
type IncidentAggregateNonCatalogItem ¶
type IncidentAggregateNonCatalogItem 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 *Project // url of the incident. URL string // applied_policy links to key attributes of the applied policy that initiated // the incident. AppliedPolicy *AppliedPolicy // 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 *User // 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 // action_failed indicates whether any of the incident's actions failed during // execution. ActionFailed *bool // action_pending indicates whether any of the incident has any pending actions // such as approval requests. ActionPending *bool // severity defines the severity level of the incident_aggregate. Severity *string // category is the type categorization of the incident_aggregate. Category *string // dry_run is a flag used for testing a policy, that determines whether this // incident_aggregate should trigger escalation actions. DryRun *bool // kind is "gov#incident_aggregate_non_catalog_item". Kind string }
IncidentAggregateNonCatalogItem describes an incident raised from an applied policy.
type IncidentAggregateNonCatalogItemCollection ¶
type IncidentAggregateNonCatalogItemCollection []*IncidentAggregateNonCatalogItem
type IncidentSummary ¶
type IncidentSummary struct { // The number of incidents across all projects. IncidentCount uint // The number of items in violation data across all incidents. ViolationDataCount uint // The number of incidents in a resolved state across all projects. ResolvedCount uint // The number of incidents in a triggered state across all projects. TriggeredCount uint }
Summary of all incidents for an incident aggregate.
type IndexPayload ¶
type IndexPayload struct { // org_id identifies an organization by ID. OrgID uint // etag is an HTTP ETag. It is typically the previous ETag value retrieved by // client if any. Service returns an empty response with HTTP status code 304 // Not Modified if value matches current value server side. Etag *string // View used to render incident_aggregates View *string // JWT token used to perform authorization Token *string // API Version, must be specified using this header APIVersion string }
IndexPayload is the payload type of the IncidentAggregate service index method.
type Parameter ¶
type Parameter 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 *Regexp `json:"allowed_pattern"` // The description used for constraints ConstraintDescription *string `json:"constraint_description"` }
Parameter defines a parameter given as input to a Policy
type Permission ¶
type Permission 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"` }
Permission defines a role required in RightScale to perform actions on resources
type PolicyAggregate ¶
type PolicyAggregate struct { // id identifies an policy aggregate by ID. ID string // name provides a name for this specific application of the policy. Name string // Org represents a RightScale organization. Org *Org // href is the href of the policy aggregate. Href string // incident_aggregate_href is the href of the incident aggregate. IncidentAggregateHref *string // published_template links to key attributes of the published template from // which the policy aggregate originated. PublishedTemplate *PublishedTemplate // project_ids is a the list of projects in this aggregate. If empty, applies // to all projects, minus excluded projects ProjectIds []uint // excluded_project_ids is a list of projects to exclude form this aggregate. ExcludedProjectIds []uint // 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 *User // created_at is the policy aggregate creation timestamp in RFC3339 format. CreatedAt *string // updated_at is the policy aggregate update timestamp in RFC3339 format. UpdatedAt *string // severity defines the severity level of incidents raised from this policy // aggregate. Severity *string // category is the type categorization of the policy aggregate. Category *string // frequency specifies the frequency with which individual policy evaluations // run. 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 []*ConfigurationOption // credentials is the map of name to credential used to launch the policy. Credentials map[string]string // status is used to identify the current status of the policy aggregate. Status *string // running_project_ids is a the list of projects the policy aggregate is // currently running on. RunningProjectIds []uint // The number of applied policies running across all projects. Count *uint // The number of applied policies in an active state. ActiveCount *uint // The number of applied policies in an error state. ErrorCount *uint // errors captures the errors occurred while applying aggregate to individual // projects. Errors map[string]string // An array of the individual applied policies and their statuses. Items PolicyAggregateItemCollection // kind is "gov#policy_aggregate". Kind string }
PolicyAggregate describes a policy that is applied across an entire organization. It contains a collection of any number of individual applied policies.
type PolicyAggregateItem ¶
type PolicyAggregateItem struct { // id identifies an applied policy by ID. ID string // Project represents a RightScale project and provides some information about // the project. Project *Project // url of the applied policy. URL string // 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 // 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#policy_aggregate_item". Kind string }
PolicyAggregateItem is a summarized view of a running applied policy.
type PolicyAggregateItemCollection ¶
type PolicyAggregateItemCollection []*PolicyAggregateItem
type PolicyAggregateNonCatalog ¶
type PolicyAggregateNonCatalog struct { // href is the href of the policy aggregate. Href string // incident_aggregate_href is the href of the incident aggregate. IncidentAggregateHref *string // running_project_ids is a the list of projects the policy aggregate is // currently running on. RunningProjectIds []uint // The number of applied policies running across all projects. Count *uint // The number of applied policies in an active state. ActiveCount *uint // The number of applied policies in an error state. ErrorCount *uint // An array of the individual applied policies and their statuses. Items PolicyAggregateNonCatalogItemCollection // kind is "gov#policy_aggregate_non_catalog". Kind string }
PolicyAggregateNonCatalog is a collection of all other applied policies that are not part of an aggregate. Only applied policies that are applied from the PolicyTemplate endpoint fall into this category. These types of policies shoudl largely be restricted to dev/test policies.
type PolicyAggregateNonCatalogItem ¶
type PolicyAggregateNonCatalogItem struct { // id identifies an applied policy by ID. ID string // name provides a name for this specific application of the policy. Name *string // description provides a human readable description for this specific // application of the policy. Description *string // Project represents a RightScale project and provides some information about // the project. Project *Project // url of the applied policy. URL string // policy_template links to key attributes of the template from which the item // originated. PolicyTemplate *PolicyTemplate // 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 // created_by is the RightScale user that applied the policy. CreatedBy *User // created_at is the policy aggregate creation timestamp in RFC3339 format. CreatedAt *string // updated_at is the policy aggregate update timestamp in RFC3339 format. UpdatedAt *string // severity defines the severity level of incidents raised from this policy // aggregate. Severity *string // category is the type categorization of the policy aggregate. Category *string // frequency specifies the frequency with which individual policy evaluations // run. 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 // kind is "gov#policy_aggregate_non_catalog_item". Kind string }
PolicyAggregateNonCatalogItem is a summarized view of a running applied policy.
type PolicyAggregateNonCatalogItemCollection ¶
type PolicyAggregateNonCatalogItemCollection []*PolicyAggregateNonCatalogItem
type PolicyTemplate ¶
type PolicyTemplate 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 *User // 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 *User // 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]*Permission // 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]*Parameter // 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]*Credentials // kind is "gov#policy_template". Kind string }
PolicyTemplate describes a previously uploaded policy template.
type Project ¶
type Project 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 }
Project represents a RightScale project and provides some information about the project.
type PublishedTemplate ¶
type PublishedTemplate 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 *User // 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 *User // 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]*Permission // 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]*Parameter // 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 *User // 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]*Credentials // kind is "gov#published_template". Kind string }
PublishedTemplate describes a previously created published template.
type Regexp ¶
type Regexp 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"` }
Regular expression
type Service ¶
type Service interface { // Show retrieves the details of an aggregate. // The "view" return value must have one of the following views // - "index" // - "default" // - "source" Show(context.Context, *ShowPayload) (res *IncidentAggregate, view string, err error) // ShowNonCatalog retrieves a list of incidents in the non-catalog policy // aggregate. These incidents largely originate from dev/test environments. // The "view" return value must have one of the following views // - "index" // - "default" ShowNonCatalog(context.Context, *ShowNonCatalogPayload) (res *IncidentAggregateNonCatalog, view string, err error) // Index retrieves the list of incident_aggregates in an organization. Index(context.Context, *IndexPayload) (res *IncidentAggregateList, err error) }
Service is the IncidentAggregate service interface.
type ShowNonCatalogPayload ¶
type ShowNonCatalogPayload struct { // org_id identifies an organization by ID. OrgID uint // etag is an HTTP ETag. It is typically the previous ETag value retrieved by // client if any. Service returns an empty response with HTTP status code 304 // Not Modified if value matches current value server side. Etag *string // View used to render incident aggregate View *string // JWT token used to perform authorization Token *string // API Version, must be specified using this header APIVersion string }
ShowNonCatalogPayload is the payload type of the IncidentAggregate service show_non_catalog method.
type ShowPayload ¶
type ShowPayload struct { // org_id identifies an organization by ID. OrgID uint // incident_aggregate_id identifies an aggregate by ID. IncidentAggregateID string // etag is an HTTP ETag. It is typically the previous ETag value retrieved by // client if any. Service returns an empty response with HTTP status code 304 // Not Modified if value matches current value server side. Etag *string // View used to render incident aggregate View *string // JWT token used to perform authorization Token *string // API Version, must be specified using this header APIVersion string }
ShowPayload is the payload type of the IncidentAggregate service show method.