views

package
v2.0.8+incompatible Latest Latest
Warning

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

Go to latest
Published: Nov 30, 2019 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

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

Functions

func ValidateArchiveMedia

func ValidateArchiveMedia(result *ArchiveMedia) (err error)

ValidateArchiveMedia runs the validations defined on the viewed result type ArchiveMedia.

func ValidateArchiveMediaView

func ValidateArchiveMediaView(result *ArchiveMediaView) (err error)

ValidateArchiveMediaView runs the validations defined on ArchiveMediaView using the "default" view.

Types

type ArchiveMedia

type ArchiveMedia struct {
	// Type to project
	Projected *ArchiveMediaView
	// View to render
	View string
}

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

type ArchiveMediaView

type ArchiveMediaView struct {
	// The archive resouce href
	Href *string
	// HTTP status
	Status *int
	// HTTP response body content
	Body *string
}

ArchiveMediaView 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