views

package
v0.35.2 Latest Latest
Warning

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

Go to latest
Published: Apr 11, 2024 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ServiceListRTMap is a map indexing the attribute names of ServiceListRT by
	// view name.
	ServiceListRTMap = map[string][]string{
		"default": {
			"items",
			"at-time",
			"links",
		},
	}
)

Functions

func ValidateLinkTView added in v0.30.0

func ValidateLinkTView(result *LinkTView) (err error)

ValidateLinkTView runs the validations defined on LinkTView.

func ValidateServiceListItemView

func ValidateServiceListItemView(result *ServiceListItemView) (err error)

ValidateServiceListItemView runs the validations defined on ServiceListItemView.

func ValidateServiceListRT

func ValidateServiceListRT(result *ServiceListRT) (err error)

ValidateServiceListRT runs the validations defined on the viewed result type ServiceListRT.

func ValidateServiceListRTView

func ValidateServiceListRTView(result *ServiceListRTView) (err error)

ValidateServiceListRTView runs the validations defined on ServiceListRTView 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 ServiceListItemView

type ServiceListItemView struct {
	// ID
	ID *string
	// Optional customer provided name
	Name *string
	// Optional description of the service
	Description *string
	// Reference to billable account
	Account *string `json:"account"`
	Href    *string `json:"href,omitempty"`
}

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

type ServiceListRT

type ServiceListRT struct {
	// Type to project
	Projected *ServiceListRTView
	// View to render
	View string
}

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

type ServiceListRTView

type ServiceListRTView struct {
	// Services
	Items []*ServiceListItemView
	// Time at which this list was valid
	AtTime *string
	Links  []*LinkTView
}

ServiceListRTView 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