views

package
v0.0.0-...-f1ca3c9 Latest Latest
Warning

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

Go to latest
Published: Jan 17, 2025 License: AGPL-3.0 Imports: 1 Imported by: 6

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ToolCollectionMap is a map indexing the attribute names of ToolCollection by
	// view name.
	ToolCollectionMap = map[string][]string{
		"default": {
			"name",
			"version",
			"packager",
		},
	}
	// OperationMap is a map indexing the attribute names of Operation by view name.
	OperationMap = map[string][]string{
		"default": {
			"status",
		},
	}
	// ToolMap is a map indexing the attribute names of Tool by view name.
	ToolMap = map[string][]string{
		"default": {
			"name",
			"version",
			"packager",
		},
	}
)

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.

func ValidateToolCollection

func ValidateToolCollection(result ToolCollection) (err error)

ValidateToolCollection runs the validations defined on the viewed result type ToolCollection.

func ValidateToolCollectionView

func ValidateToolCollectionView(result ToolCollectionView) (err error)

ValidateToolCollectionView runs the validations defined on ToolCollectionView using the "default" view.

func ValidateToolView

func ValidateToolView(result *ToolView) (err error)

ValidateToolView runs the validations defined on ToolView 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.

type ToolCollection

type ToolCollection struct {
	// Type to project
	Projected ToolCollectionView
	// View to render
	View string
}

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

type ToolCollectionView

type ToolCollectionView []*ToolView

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

type ToolView

type ToolView struct {
	// The name of the tool
	Name *string
	// The version of the tool
	Version *string
	// The packager of the tool
	Packager *string
}

ToolView 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