views

package
v0.44.0 Latest Latest
Warning

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

Go to latest
Published: Mar 18, 2025 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// OrderListRTMap is a map indexing the attribute names of OrderListRT by view
	// name.
	OrderListRTMap = map[string][]string{
		"default": {
			"items",
			"at-time",
			"links",
		},
	}
	// OrderTopResultItemCollectionMap is a map indexing the attribute names of
	// OrderTopResultItemCollection by view name.
	OrderTopResultItemCollectionMap = map[string][]string{
		"default": {
			"container",
			"cpu",
			"memory",
			"storage",
			"ephemeral-storage",
		},
	}
	// OrderTopResultItemMap is a map indexing the attribute names of
	// OrderTopResultItem by view name.
	OrderTopResultItemMap = map[string][]string{
		"default": {
			"container",
			"cpu",
			"memory",
			"storage",
			"ephemeral-storage",
		},
	}
)

Functions

func ValidateLinkTView added in v0.30.0

func ValidateLinkTView(result *LinkTView) (err error)

ValidateLinkTView runs the validations defined on LinkTView.

func ValidateOrderListItemView

func ValidateOrderListItemView(result *OrderListItemView) (err error)

ValidateOrderListItemView runs the validations defined on OrderListItemView.

func ValidateOrderListRT

func ValidateOrderListRT(result *OrderListRT) (err error)

ValidateOrderListRT runs the validations defined on the viewed result type OrderListRT.

func ValidateOrderListRTView

func ValidateOrderListRTView(result *OrderListRTView) (err error)

ValidateOrderListRTView runs the validations defined on OrderListRTView using the "default" view.

func ValidateOrderTopResultItemCollection

func ValidateOrderTopResultItemCollection(result OrderTopResultItemCollection) (err error)

ValidateOrderTopResultItemCollection runs the validations defined on the viewed result type OrderTopResultItemCollection.

func ValidateOrderTopResultItemCollectionView

func ValidateOrderTopResultItemCollectionView(result OrderTopResultItemCollectionView) (err error)

ValidateOrderTopResultItemCollectionView runs the validations defined on OrderTopResultItemCollectionView using the "default" view.

func ValidateOrderTopResultItemView

func ValidateOrderTopResultItemView(result *OrderTopResultItemView) (err error)

ValidateOrderTopResultItemView runs the validations defined on OrderTopResultItemView using the "default" view.

Types

type LinkTView added in v0.30.0

type LinkTView struct {
	// relation type
	Rel *string
	// mime type
	Type *string
	// web link
	Href *string
}

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

type OrderListItemView

type OrderListItemView struct {
	// ID
	ID *string
	// Optional customer provided name
	Name *string
	// Order status
	Status *string
	// DateTime order was placed
	OrderedAt *string
	// DateTime order processing started
	StartedAt *string
	// DateTime order processing finished
	FinishedAt *string
	// Reference to service requested
	Service *string
	// Reference to billable account
	Account *string
	Href    *string `json:"href,omitempty"`
}

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

type OrderListRT

type OrderListRT struct {
	// Type to project
	Projected *OrderListRTView
	// View to render
	View string
}

OrderListRT is the viewed result type that is projected based on a view.

type OrderListRTView

type OrderListRTView struct {
	// Orders
	Items []*OrderListItemView
	// Time at which this list was valid
	AtTime *string
	Links  []*LinkTView
}

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

type OrderTopResultItemCollection

type OrderTopResultItemCollection struct {
	// Type to project
	Projected OrderTopResultItemCollectionView
	// View to render
	View string
}

OrderTopResultItemCollection is the viewed result type that is projected based on a view.

type OrderTopResultItemCollectionView

type OrderTopResultItemCollectionView []*OrderTopResultItemView

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

type OrderTopResultItemView

type OrderTopResultItemView struct {
	// container
	Container *string
	// cpu
	CPU *string
	// memory
	Memory *string
	// storage
	Storage *string
	// ephemeral-storage
	EphemeralStorage *string
}

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
JackTT - Gopher 🇻🇳