views

package
v1.1.26 Latest Latest
Warning

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

Go to latest
Published: Jul 2, 2024 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// LabelsMap is a map indexing the attribute names of Labels by view name.
	LabelsMap = map[string][]string{
		"default": {
			"labels",
		},
	}
)

Functions

func ValidateLabels

func ValidateLabels(result *Labels) (err error)

ValidateLabels runs the validations defined on the viewed result type Labels.

func ValidateLabelsView

func ValidateLabelsView(result *LabelsView) (err error)

ValidateLabelsView runs the validations defined on LabelsView using the "default" view.

Types

type Labels

type Labels struct {
	// Type to project
	Projected *LabelsView
	// View to render
	View string
}

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

type LabelsView

type LabelsView struct {
	// List of labels
	Labels []string
}

LabelsView 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