views

package
v0.0.0-...-1a1a679 Latest Latest
Warning

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

Go to latest
Published: Oct 13, 2019 License: GPL-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// OperationMap is a map of attribute names in result type Operation indexed by
	// view name.
	OperationMap = map[string][]string{
		"default": []string{
			"status",
		},
	}
)

Functions

func ValidateOperation

func ValidateOperation(result *Operation) (err error)

ValidateOperation runs the validations defined on the viewed result type Operation.

func ValidateOperationView

func ValidateOperationView(result *OperationView) (err error)

ValidateOperationView runs the validations defined on OperationView using the "default" view.

Types

type Operation

type Operation struct {
	// Type to project
	Projected *OperationView
	// View to render
	View string
}

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

type OperationView

type OperationView struct {
	// The status of the operation
	Status *string
}

OperationView 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