views

package
v0.0.0-...-998107f Latest Latest
Warning

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

Go to latest
Published: Jun 14, 2019 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

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

Functions

func ValidateRatingResourceView

func ValidateRatingResourceView(result *RatingResourceView) (err error)

ValidateRatingResourceView runs the validations defined on RatingResourceView.

func ValidateRatingView

func ValidateRatingView(result *RatingView) (err error)

ValidateRatingView runs the validations defined on RatingView.

func ValidateRestratingMatch

func ValidateRestratingMatch(result *RestratingMatch) (err error)

ValidateRestratingMatch runs the validations defined on the viewed result type RestratingMatch.

func ValidateRestratingMatchView

func ValidateRestratingMatchView(result *RestratingMatchView) (err error)

ValidateRestratingMatchView runs the validations defined on RestratingMatchView using the "default" view.

Types

type RatingResourceView

type RatingResourceView struct {
	// Rating Resource Name
	Rrn *string
	// players strength
	Rating *RatingView
}

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

type RatingView

type RatingView struct {
	Strength *float64
	Lower    *float64
	Upper    *float64
}

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

type RestratingMatch

type RestratingMatch struct {
	// Type to project
	Projected *RestratingMatchView
	// View to render
	View string
}

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

type RestratingMatchView

type RestratingMatchView struct {
	Participants []*RatingResourceView
}

RestratingMatchView 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