views

package
v0.0.0-...-b9360c4 Latest Latest
Warning

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

Go to latest
Published: Dec 15, 2023 License: BSD-3-Clause Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// StationActivityPageMap is a map of attribute names in result type
	// StationActivityPage indexed by view name.
	StationActivityPageMap = map[string][]string{
		"default": []string{
			"activities",
			"total",
			"page",
		},
	}
	// ProjectActivityPageMap is a map of attribute names in result type
	// ProjectActivityPage indexed by view name.
	ProjectActivityPageMap = map[string][]string{
		"default": []string{
			"activities",
			"total",
			"page",
		},
	}
	// ActivityEntryCollectionMap is a map of attribute names in result type
	// ActivityEntryCollection indexed by view name.
	ActivityEntryCollectionMap = map[string][]string{
		"default": []string{
			"id",
			"key",
			"project",
			"station",
			"created_at",
			"type",
			"meta",
		},
	}
	// ActivityEntryMap is a map of attribute names in result type ActivityEntry
	// indexed by view name.
	ActivityEntryMap = map[string][]string{
		"default": []string{
			"id",
			"key",
			"project",
			"station",
			"created_at",
			"type",
			"meta",
		},
	}
)

Functions

func ValidateActivityEntryCollectionView

func ValidateActivityEntryCollectionView(result ActivityEntryCollectionView) (err error)

ValidateActivityEntryCollectionView runs the validations defined on ActivityEntryCollectionView using the "default" view.

func ValidateActivityEntryView

func ValidateActivityEntryView(result *ActivityEntryView) (err error)

ValidateActivityEntryView runs the validations defined on ActivityEntryView using the "default" view.

func ValidateProjectActivityPage

func ValidateProjectActivityPage(result *ProjectActivityPage) (err error)

ValidateProjectActivityPage runs the validations defined on the viewed result type ProjectActivityPage.

func ValidateProjectActivityPageView

func ValidateProjectActivityPageView(result *ProjectActivityPageView) (err error)

ValidateProjectActivityPageView runs the validations defined on ProjectActivityPageView using the "default" view.

func ValidateProjectSummaryView

func ValidateProjectSummaryView(result *ProjectSummaryView) (err error)

ValidateProjectSummaryView runs the validations defined on ProjectSummaryView.

func ValidateStationActivityPage

func ValidateStationActivityPage(result *StationActivityPage) (err error)

ValidateStationActivityPage runs the validations defined on the viewed result type StationActivityPage.

func ValidateStationActivityPageView

func ValidateStationActivityPageView(result *StationActivityPageView) (err error)

ValidateStationActivityPageView runs the validations defined on StationActivityPageView using the "default" view.

func ValidateStationSummaryView

func ValidateStationSummaryView(result *StationSummaryView) (err error)

ValidateStationSummaryView runs the validations defined on StationSummaryView.

Types

type ActivityEntryCollectionView

type ActivityEntryCollectionView []*ActivityEntryView

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

type ActivityEntryView

type ActivityEntryView struct {
	ID        *int64
	Key       *string
	Project   *ProjectSummaryView
	Station   *StationSummaryView
	CreatedAt *int64
	Type      *string
	Meta      interface{}
}

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

type ProjectActivityPage

type ProjectActivityPage struct {
	// Type to project
	Projected *ProjectActivityPageView
	// View to render
	View string
}

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

type ProjectActivityPageView

type ProjectActivityPageView struct {
	Activities ActivityEntryCollectionView
	Total      *int32
	Page       *int32
}

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

type ProjectSummaryView

type ProjectSummaryView struct {
	ID   *int64
	Name *string
}

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

type StationActivityPage

type StationActivityPage struct {
	// Type to project
	Projected *StationActivityPageView
	// View to render
	View string
}

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

type StationActivityPageView

type StationActivityPageView struct {
	Activities ActivityEntryCollectionView
	Total      *int32
	Page       *int32
}

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

type StationSummaryView

type StationSummaryView struct {
	ID   *int64
	Name *string
}

StationSummaryView 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