views

package
v0.0.0-...-7475c9a Latest Latest
Warning

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

Go to latest
Published: Feb 27, 2021 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// HostCollectionMap is a map of attribute names in result type HostCollection
	// indexed by view name.
	HostCollectionMap = map[string][]string{
		"default": []string{
			"public",
			"on_demand",
		},
	}
	// HostMap is a map of attribute names in result type Host indexed by view name.
	HostMap = map[string][]string{
		"default": []string{
			"public",
			"on_demand",
		},
	}
)

Functions

func ValidateHost

func ValidateHost(result *Host) (err error)

ValidateHost runs the validations defined on the viewed result type Host.

func ValidateHostCollection

func ValidateHostCollection(result HostCollection) (err error)

ValidateHostCollection runs the validations defined on the viewed result type HostCollection.

func ValidateHostCollectionView

func ValidateHostCollectionView(result HostCollectionView) (err error)

ValidateHostCollectionView runs the validations defined on HostCollectionView using the "default" view.

func ValidateHostView

func ValidateHostView(result *HostView) (err error)

ValidateHostView runs the validations defined on HostView using the "default" view.

Types

type Host

type Host struct {
	// Type to project
	Projected *HostView
	// View to render
	View string
}

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

type HostCollection

type HostCollection struct {
	// Type to project
	Projected HostCollectionView
	// View to render
	View string
}

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

type HostCollectionView

type HostCollectionView []*HostView

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

type HostView

type HostView struct {
	// Whether or not to walk public tree
	Public *bool
	// Whether or not Ondemand polling is supported
	OnDemand *bool
}

HostView 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