views

package
v1.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 13, 2019 License: MIT Imports: 1 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

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.

func (*ApprovalRequest) Validate

func (result *ApprovalRequest) Validate() (err error)

Validate runs the validations defined on the viewed result type ApprovalRequest.

type ApprovalRequestCollectionView

type ApprovalRequestCollectionView []*ApprovalRequestView

ApprovalRequestCollectionView is a type that runs validations on a projected type.

func (ApprovalRequestCollectionView) Validate

func (result ApprovalRequestCollectionView) Validate() (err error)

Validate runs the validations defined on ApprovalRequestCollectionView using the "default" view.

func (ApprovalRequestCollectionView) ValidateExtended

func (result ApprovalRequestCollectionView) ValidateExtended() (err error)

ValidateExtended runs the validations defined on ApprovalRequestCollectionView using the "extended" view.

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.

func (*ApprovalRequestList) Validate

func (result *ApprovalRequestList) Validate() (err error)

Validate runs the validations defined on the viewed result type ApprovalRequestList.

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.

func (*ApprovalRequestListView) Validate

func (result *ApprovalRequestListView) Validate() (err error)

Validate runs the validations defined on ApprovalRequestListView using the "default" view.

func (*ApprovalRequestListView) ValidateExtended

func (result *ApprovalRequestListView) ValidateExtended() (err error)

ValidateExtended runs the validations defined on ApprovalRequestListView using the "extended" view.

type ApprovalRequestView

type ApprovalRequestView struct {
	// id identifies an approval request by ID.
	ID *string
	// project_id is the ID of the project where this approval request is created.
	ProjectID *uint
	// href is the href of the approval request
	Href *string
	// label is a short title for this approval request
	Label *string
	// description describes the details for this approval request.
	Description *string
	// subject is the subject of the approval.
	Subject *ApprovalSubject2
	// created_at is the approval request creation timestamp in RFC3339 format.
	CreatedAt *string
	// updated_at is the last update timestamp in RFC3339 format.
	UpdatedAt *string
	// parameters is a list of parameters required for approval request.
	Parameters map[string]*ParameterView
	// status is the status of this approval request.
	Status *string
	// options lists the configuration options used to parameterize the approval
	// request.
	Options []*ConfigurationOptionView
	// approved_by is the RightScale user that approved this approval request.
	ApprovedBy *UserView
	// approved_at is the approval timestamp in RFC3339 format.
	ApprovedAt *string
	// denial_comment is a comment that explains the reason for denial, if relevant.
	DenialComment *string
	// denied_by is the RightScale user that denied this approval request.
	DeniedBy *UserView
	// denied_at is the denial timestamp in RFC3339 format.
	DeniedAt *string
	// kind is "gov#approval_request".
	Kind *string
}

ApprovalRequestView is a type that runs validations on a projected type.

func (*ApprovalRequestView) Validate

func (result *ApprovalRequestView) Validate() (err error)

Validate runs the validations defined on ApprovalRequestView using the "default" view.

func (*ApprovalRequestView) ValidateExtended

func (result *ApprovalRequestView) ValidateExtended() (err error)

ValidateExtended runs the validations defined on ApprovalRequestView using the "extended" view.

type ApprovalSubject2

type ApprovalSubject2 struct {
	// kind is the kind of subject
	Kind *string
	// href is the href of the subject.
	Href *string
}

ApprovalSubject2 is a type that runs validations on a projected type.

func (*ApprovalSubject2) Validate

func (result *ApprovalSubject2) Validate() (err error)

Validate runs the validations defined on ApprovalSubject2.

type ConfigurationOptionView

type ConfigurationOptionView struct {
	// name of option
	Name *string
	// label of option
	Label *string
	// type of option
	Type *string
	// value of option
	Value *interface{}
}

ConfigurationOptionView is a type that runs validations on a projected type.

func (*ConfigurationOptionView) Validate

func (result *ConfigurationOptionView) Validate() (err error)

Validate runs the validations defined on ConfigurationOptionView.

type ParameterView

type ParameterView struct {
	// Name of the parameter
	Name *string `json:"name"`
	// Type of the parameter
	Type *string `json:"type"`
	// Label to show in the UI
	Label *string `json:"label"`
	// The index of this parameter in the list
	Index *uint `json:"index"`
	// The category used to group parameters
	Category *string `json:"category"`
	// Description of the parameter
	Description *string `json:"description"`
	// The default value for the parameter
	Default *interface{} `json:"default"`
	// no_echo determines whether the value of the parameter should be hidden in
	// UIs and API responses.
	NoEcho *bool `json:"no_echo"`
	// List of values allowed for this parameter
	AllowedValues []interface{} `json:"allowed_values"`
	// The minimum length of a string parameter
	MinLength *uint `json:"min_length"`
	// The maximum length of a string parameter
	MaxLength *uint `json:"max_length"`
	// The minimum value of a number parmameter
	MinValue *float64 `json:"min_value"`
	// The maximum value of a number parameter
	MaxValue *float64 `json:"max_value"`
	// The regular expression pattern used to validate a string parameter
	AllowedPattern *RegexpView `json:"allowed_pattern"`
	// The description used for constraints
	ConstraintDescription *string `json:"constraint_description"`
}

ParameterView is a type that runs validations on a projected type.

func (*ParameterView) Validate

func (result *ParameterView) Validate() (err error)

Validate runs the validations defined on ParameterView.

type RegexpView

type RegexpView struct {
	// Pattern is the regular expression pattern.
	Pattern *string `json:"pattern"`
	// Options are the regular expression options. Options i (case insensitve) and
	// m (match over newlines) supported.
	Options *string `json:"options"`
}

RegexpView is a type that runs validations on a projected type.

func (*RegexpView) Validate

func (result *RegexpView) Validate() (err error)

Validate runs the validations defined on RegexpView.

type UserView

type UserView struct {
	// ID of user
	ID *uint
	// email of user
	Email *string
	// name of user, usually of the form 'First Last'
	Name *string
}

UserView is a type that runs validations on a projected type.

func (*UserView) Validate

func (result *UserView) Validate() (err error)

Validate runs the validations defined on UserView.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL