views

package
v0.25.0 Latest Latest
Warning

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

Go to latest
Published: May 14, 2023 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": {
			"orders",
			"at-time",
			"links",
		},
	}
	// OrderStatusRTMap is a map indexing the attribute names of OrderStatusRT by
	// view name.
	OrderStatusRTMap = map[string][]string{
		"default": {
			"id",
			"name",
			"status",
			"ordered_at",
			"started_at",
			"finished_at",
			"parameters",
			"products",
			"service",
			"account",
			"links",
		},
		"tiny": {
			"name",
			"status",
			"links",
		},
	}
)

Functions

func ValidateDescribedByTView

func ValidateDescribedByTView(result *DescribedByTView) (err error)

ValidateDescribedByTView runs the validations defined on DescribedByTView.

func ValidateNavTView

func ValidateNavTView(result *NavTView) (err error)

ValidateNavTView runs the validations defined on NavTView.

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 ValidateOrderStatusRT

func ValidateOrderStatusRT(result *OrderStatusRT) (err error)

ValidateOrderStatusRT runs the validations defined on the viewed result type OrderStatusRT.

func ValidateOrderStatusRTView

func ValidateOrderStatusRTView(result *OrderStatusRTView) (err error)

ValidateOrderStatusRTView runs the validations defined on OrderStatusRTView using the "default" view.

func ValidateOrderStatusRTViewTiny

func ValidateOrderStatusRTViewTiny(result *OrderStatusRTView) (err error)

ValidateOrderStatusRTViewTiny runs the validations defined on OrderStatusRTView using the "tiny" view.

func ValidateParameterTView

func ValidateParameterTView(result *ParameterTView) (err error)

ValidateParameterTView runs the validations defined on ParameterTView.

func ValidateProductTView

func ValidateProductTView(result *ProductTView) (err error)

ValidateProductTView runs the validations defined on ProductTView.

func ValidateRefTView

func ValidateRefTView(result *RefTView) (err error)

ValidateRefTView runs the validations defined on RefTView.

func ValidateSelfTView

func ValidateSelfTView(result *SelfTView) (err error)

ValidateSelfTView runs the validations defined on SelfTView.

func ValidateSelfWithDataTView

func ValidateSelfWithDataTView(result *SelfWithDataTView) (err error)

ValidateSelfWithDataTView runs the validations defined on SelfWithDataTView.

Types

type DescribedByTView

type DescribedByTView struct {
	Href *string
	Type *string
}

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

type NavTView struct {
	Self  *string
	First *string
	Next  *string
}

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

type OrderListItemView

type OrderListItemView struct {
	// Order ID
	ID *string
	// Optional customer provided name
	Name *string
	// Order status
	Status *string
	// DateTime order was placed
	OrderedAt *string
	// DateTime processing of order started
	StartedAt *string
	// DateTime order was finished
	FinishedAt *string
	// ID of ordered service
	ServiceID *string
	// ID of ordered service
	AccountID *string
	Links     *SelfTView
}

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
	Orders []*OrderListItemView
	// Time at which this list was valid
	AtTime *string
	// Navigation links
	Links *NavTView
}

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

type OrderStatusRT

type OrderStatusRT struct {
	// Type to project
	Projected *OrderStatusRTView
	// View to render
	View string
}

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

type OrderStatusRTView

type OrderStatusRTView struct {
	// Order ID
	ID *string
	// Order status
	Status *string
	// DateTime order was placed
	OrderedAt *string
	// DateTime order processing started
	StartedAt *string
	// DateTime order processing finished
	FinishedAt *string
	// Products delivered for this order
	Products []*ProductTView
	// Reference to service requested
	Service *RefTView
	// Reference to billable account
	Account *RefTView
	Links   *SelfTView
	// Optional customer provided name
	Name *string
	// Service parameters
	Parameters []*ParameterTView
}

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

type ParameterTView

type ParameterTView struct {
	Name  *string
	Value *string
}

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

type ProductTView

type ProductTView struct {
	ID       *string
	Name     *string
	Status   *string
	MimeType *string
	Size     *int64
	Links    *SelfWithDataTView
}

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

type RefTView

type RefTView struct {
	ID    *string
	Links *SelfTView
}

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

type SelfTView

type SelfTView struct {
	Self        *string
	DescribedBy *DescribedByTView
}

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

type SelfWithDataTView

type SelfWithDataTView struct {
	Self        *string
	DescribedBy *DescribedByTView
	Data        *string
}

SelfWithDataTView 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