views

package
v2.2.6+incompatible Latest Latest
Warning

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

Go to latest
Published: Dec 18, 2020 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

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

Functions

func ValidateFetchMedia

func ValidateFetchMedia(result *FetchMedia) (err error)

ValidateFetchMedia runs the validations defined on the viewed result type FetchMedia.

func ValidateFetchMediaView

func ValidateFetchMediaView(result *FetchMediaView) (err error)

ValidateFetchMediaView runs the validations defined on FetchMediaView using the "default" view.

Types

type FetchMedia

type FetchMedia struct {
	// Type to project
	Projected *FetchMediaView
	// View to render
	View string
}

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

type FetchMediaView

type FetchMediaView struct {
	// HTTP status code returned by fetched service
	Status *int
	// The href to the corresponding archive in the archiver service
	ArchiveHref *string
}

FetchMediaView 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