Documentation ¶
Index ¶
- Variables
- func ValidateApprovalRequest(result *ApprovalRequest) (err error)
- func ValidateApprovalRequestCollectionView(result ApprovalRequestCollectionView) (err error)
- func ValidateApprovalRequestCollectionViewExtended(result ApprovalRequestCollectionView) (err error)
- func ValidateApprovalRequestList(result *ApprovalRequestList) (err error)
- func ValidateApprovalRequestListView(result *ApprovalRequestListView) (err error)
- func ValidateApprovalRequestListViewExtended(result *ApprovalRequestListView) (err error)
- func ValidateApprovalRequestView(result *ApprovalRequestView) (err error)
- func ValidateApprovalRequestViewExtended(result *ApprovalRequestView) (err error)
- func ValidateApprovalSubject(result *ApprovalSubject) (err error)
- func ValidateConfigurationOptionView(result *ConfigurationOptionView) (err error)
- func ValidateParameterView(result *ParameterView) (err error)
- func ValidateRegexpView(result *RegexpView) (err error)
- func ValidateUserView(result *UserView) (err error)
- type ApprovalRequest
- type ApprovalRequestCollectionView
- type ApprovalRequestList
- type ApprovalRequestListView
- type ApprovalRequestView
- type ApprovalSubject
- type ConfigurationOptionView
- type ParameterView
- type RegexpView
- type UserView
Constants ¶
This section is empty.
Variables ¶
var ( // 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", }, } // ApprovalRequestListMap is a map of attribute names in result type // ApprovalRequestList indexed by view name. ApprovalRequestListMap = map[string][]string{ "default": []string{ "count", "items", "etag", "not_modified", "kind", }, "extended": []string{ "count", "items", "etag", "not_modified", "kind", }, } // ApprovalRequestCollectionMap is a map of attribute names in result type // ApprovalRequestCollection indexed by view name. ApprovalRequestCollectionMap = 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", }, } )
Functions ¶
func ValidateApprovalRequest ¶ added in v1.0.6
func ValidateApprovalRequest(result *ApprovalRequest) (err error)
ValidateApprovalRequest runs the validations defined on the viewed result type ApprovalRequest.
func ValidateApprovalRequestCollectionView ¶ added in v1.0.6
func ValidateApprovalRequestCollectionView(result ApprovalRequestCollectionView) (err error)
ValidateApprovalRequestCollectionView runs the validations defined on ApprovalRequestCollectionView using the "default" view.
func ValidateApprovalRequestCollectionViewExtended ¶ added in v1.0.6
func ValidateApprovalRequestCollectionViewExtended(result ApprovalRequestCollectionView) (err error)
ValidateApprovalRequestCollectionViewExtended runs the validations defined on ApprovalRequestCollectionView using the "extended" view.
func ValidateApprovalRequestList ¶ added in v1.0.6
func ValidateApprovalRequestList(result *ApprovalRequestList) (err error)
ValidateApprovalRequestList runs the validations defined on the viewed result type ApprovalRequestList.
func ValidateApprovalRequestListView ¶ added in v1.0.6
func ValidateApprovalRequestListView(result *ApprovalRequestListView) (err error)
ValidateApprovalRequestListView runs the validations defined on ApprovalRequestListView using the "default" view.
func ValidateApprovalRequestListViewExtended ¶ added in v1.0.6
func ValidateApprovalRequestListViewExtended(result *ApprovalRequestListView) (err error)
ValidateApprovalRequestListViewExtended runs the validations defined on ApprovalRequestListView using the "extended" view.
func ValidateApprovalRequestView ¶ added in v1.0.6
func ValidateApprovalRequestView(result *ApprovalRequestView) (err error)
ValidateApprovalRequestView runs the validations defined on ApprovalRequestView using the "default" view.
func ValidateApprovalRequestViewExtended ¶ added in v1.0.6
func ValidateApprovalRequestViewExtended(result *ApprovalRequestView) (err error)
ValidateApprovalRequestViewExtended runs the validations defined on ApprovalRequestView using the "extended" view.
func ValidateApprovalSubject ¶ added in v1.0.6
func ValidateApprovalSubject(result *ApprovalSubject) (err error)
ValidateApprovalSubject runs the validations defined on ApprovalSubject.
func ValidateConfigurationOptionView ¶ added in v1.0.6
func ValidateConfigurationOptionView(result *ConfigurationOptionView) (err error)
ValidateConfigurationOptionView runs the validations defined on ConfigurationOptionView.
func ValidateParameterView ¶ added in v1.0.6
func ValidateParameterView(result *ParameterView) (err error)
ValidateParameterView runs the validations defined on ParameterView.
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 ApprovalRequest ¶
type ApprovalRequest struct { // Type to project Projected *ApprovalRequestView // View to render View string }
ApprovalRequest is the viewed result type that is projected based on a view.
type ApprovalRequestCollectionView ¶
type ApprovalRequestCollectionView []*ApprovalRequestView
ApprovalRequestCollectionView is a type that runs validations on a projected type.
type ApprovalRequestList ¶
type ApprovalRequestList struct { // Type to project Projected *ApprovalRequestListView // View to render View string }
ApprovalRequestList is the viewed result type that is projected based on a view.
type ApprovalRequestListView ¶
type ApprovalRequestListView struct { // count is the number of approval requests in the list Count *uint // etag is a HTTP ETag for the list. Etag *string // items is the array of approval requests. Items ApprovalRequestCollectionView // 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#approval_request_list". Kind *string }
ApprovalRequestListView 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 ¶ added in v1.0.6
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 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 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 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.