Documentation ¶
Index ¶
- Variables
- func ValidateCredentialsTagView(result *CredentialsTagView) (err error)
- func ValidateCredentialsView(result *CredentialsView) (err error)
- func ValidateParameterView(result *ParameterView) (err error)
- func ValidatePermissionView(result *PermissionView) (err error)
- func ValidatePublishedTemplate(result *PublishedTemplate) (err error)
- func ValidatePublishedTemplateCollectionView(result PublishedTemplateCollectionView) (err error)
- func ValidatePublishedTemplateCollectionViewExtended(result PublishedTemplateCollectionView) (err error)
- func ValidatePublishedTemplateCollectionViewLink(result PublishedTemplateCollectionView) (err error)
- func ValidatePublishedTemplateCollectionViewSource(result PublishedTemplateCollectionView) (err error)
- func ValidatePublishedTemplateList(result *PublishedTemplateList) (err error)
- func ValidatePublishedTemplateListView(result *PublishedTemplateListView) (err error)
- func ValidatePublishedTemplateListViewExtended(result *PublishedTemplateListView) (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 ValidateUserView(result *UserView) (err error)
- type CredentialsTagView
- type CredentialsView
- type ParameterView
- type PermissionView
- type PublishedTemplate
- type PublishedTemplateCollectionView
- type PublishedTemplateList
- type PublishedTemplateListView
- type PublishedTemplateView
- type RegexpView
- type UserView
Constants ¶
This section is empty.
Variables ¶
var ( // 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", }, } // PublishedTemplateListMap is a map of attribute names in result type // PublishedTemplateList indexed by view name. PublishedTemplateListMap = map[string][]string{ "default": []string{ "count", "items", "etag", "not_modified", "kind", }, "extended": []string{ "count", "items", "etag", "not_modified", "kind", }, } // PublishedTemplateCollectionMap is a map of attribute names in result type // PublishedTemplateCollection indexed by view name. PublishedTemplateCollectionMap = 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", }, } )
Functions ¶
func ValidateCredentialsTagView ¶ added in v1.0.6
func ValidateCredentialsTagView(result *CredentialsTagView) (err error)
ValidateCredentialsTagView runs the validations defined on CredentialsTagView.
func ValidateCredentialsView ¶ added in v1.0.6
func ValidateCredentialsView(result *CredentialsView) (err error)
ValidateCredentialsView runs the validations defined on CredentialsView.
func ValidateParameterView ¶ added in v1.0.6
func ValidateParameterView(result *ParameterView) (err error)
ValidateParameterView runs the validations defined on ParameterView.
func ValidatePermissionView ¶ added in v1.0.6
func ValidatePermissionView(result *PermissionView) (err error)
ValidatePermissionView runs the validations defined on PermissionView.
func ValidatePublishedTemplate ¶ added in v1.0.6
func ValidatePublishedTemplate(result *PublishedTemplate) (err error)
ValidatePublishedTemplate runs the validations defined on the viewed result type PublishedTemplate.
func ValidatePublishedTemplateCollectionView ¶ added in v1.0.6
func ValidatePublishedTemplateCollectionView(result PublishedTemplateCollectionView) (err error)
ValidatePublishedTemplateCollectionView runs the validations defined on PublishedTemplateCollectionView using the "default" view.
func ValidatePublishedTemplateCollectionViewExtended ¶ added in v1.0.6
func ValidatePublishedTemplateCollectionViewExtended(result PublishedTemplateCollectionView) (err error)
ValidatePublishedTemplateCollectionViewExtended runs the validations defined on PublishedTemplateCollectionView using the "extended" view.
func ValidatePublishedTemplateCollectionViewLink ¶ added in v1.0.6
func ValidatePublishedTemplateCollectionViewLink(result PublishedTemplateCollectionView) (err error)
ValidatePublishedTemplateCollectionViewLink runs the validations defined on PublishedTemplateCollectionView using the "link" view.
func ValidatePublishedTemplateCollectionViewSource ¶ added in v1.0.6
func ValidatePublishedTemplateCollectionViewSource(result PublishedTemplateCollectionView) (err error)
ValidatePublishedTemplateCollectionViewSource runs the validations defined on PublishedTemplateCollectionView using the "source" view.
func ValidatePublishedTemplateList ¶ added in v1.0.6
func ValidatePublishedTemplateList(result *PublishedTemplateList) (err error)
ValidatePublishedTemplateList runs the validations defined on the viewed result type PublishedTemplateList.
func ValidatePublishedTemplateListView ¶ added in v1.0.6
func ValidatePublishedTemplateListView(result *PublishedTemplateListView) (err error)
ValidatePublishedTemplateListView runs the validations defined on PublishedTemplateListView using the "default" view.
func ValidatePublishedTemplateListViewExtended ¶ added in v1.0.6
func ValidatePublishedTemplateListViewExtended(result *PublishedTemplateListView) (err error)
ValidatePublishedTemplateListViewExtended runs the validations defined on PublishedTemplateListView using the "extended" view.
func ValidatePublishedTemplateView ¶ added in v1.0.6
func ValidatePublishedTemplateView(result *PublishedTemplateView) (err error)
ValidatePublishedTemplateView runs the validations defined on PublishedTemplateView using the "default" view.
func ValidatePublishedTemplateViewExtended ¶ added in v1.0.6
func ValidatePublishedTemplateViewExtended(result *PublishedTemplateView) (err error)
ValidatePublishedTemplateViewExtended runs the validations defined on PublishedTemplateView using the "extended" view.
func ValidatePublishedTemplateViewLink ¶ added in v1.0.6
func ValidatePublishedTemplateViewLink(result *PublishedTemplateView) (err error)
ValidatePublishedTemplateViewLink runs the validations defined on PublishedTemplateView using the "link" view.
func ValidatePublishedTemplateViewSource ¶ added in v1.0.6
func ValidatePublishedTemplateViewSource(result *PublishedTemplateView) (err error)
ValidatePublishedTemplateViewSource runs the validations defined on PublishedTemplateView using the "source" view.
func ValidateRegexpView ¶ added in v1.0.6
func ValidateRegexpView(result *RegexpView) (err error)
ValidateRegexpView runs the validations defined on RegexpView.
func ValidateUserView ¶ added in v1.0.6
ValidateUserView runs the validations defined on UserView.
Types ¶
type CredentialsTagView ¶ added in v1.0.6
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 ¶ added in v1.0.6
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 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 PublishedTemplate ¶
type PublishedTemplate struct { // Type to project Projected *PublishedTemplateView // View to render View string }
PublishedTemplate is the viewed result type that is projected based on a view.
type PublishedTemplateCollectionView ¶
type PublishedTemplateCollectionView []*PublishedTemplateView
PublishedTemplateCollectionView is a type that runs validations on a projected type.
type PublishedTemplateList ¶
type PublishedTemplateList struct { // Type to project Projected *PublishedTemplateListView // View to render View string }
PublishedTemplateList is the viewed result type that is projected based on a view.
type PublishedTemplateListView ¶
type PublishedTemplateListView struct { // count is the number of published templates in the list. Count *uint // etag is an HTTP ETag for the published template list. Etag *string // items is the array of published templates. Items PublishedTemplateCollectionView // 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#published_template_list". Kind *string }
PublishedTemplateListView 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.