views

package
v0.0.0-...-520f1c6 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

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

Functions

func ValidateJob

func ValidateJob(result *Job) (err error)

ValidateJob runs the validations defined on the viewed result type Job.

func ValidateJobView

func ValidateJobView(result *JobView) (err error)

ValidateJobView runs the validations defined on JobView using the "default" view.

Types

type Job

type Job struct {
	// Type to project
	Projected *JobView
	// View to render
	View string
}

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

type JobView

type JobView struct {
	// id of the job
	ID *uint
	// Name of the catalog
	CatalogName *string
	// status of the job
	Status *string
}

JobView 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