views

package
v0.0.0-...-dca2783 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ProjectUpdateMap is a map of attribute names in result type ProjectUpdate
	// indexed by view name.
	ProjectUpdateMap = map[string][]string{
		"default": []string{
			"id",
			"body",
		},
	}
	// PendingInvitesMap is a map of attribute names in result type PendingInvites
	// indexed by view name.
	PendingInvitesMap = map[string][]string{
		"default": []string{
			"pending",
			"projects",
		},
	}
	// ProjectMap is a map of attribute names in result type Project indexed by
	// view name.
	ProjectMap = map[string][]string{
		"default": []string{
			"id",
			"name",
			"description",
			"goal",
			"location",
			"tags",
			"privacy",
			"startTime",
			"endTime",
			"photo",
			"readOnly",
			"showStations",
			"bounds",
			"following",
		},
	}
	// ProjectsMap is a map of attribute names in result type Projects indexed by
	// view name.
	ProjectsMap = map[string][]string{
		"default": []string{
			"projects",
		},
	}
	// DownloadedPhotoMap is a map of attribute names in result type
	// DownloadedPhoto indexed by view name.
	DownloadedPhotoMap = map[string][]string{
		"default": []string{
			"length",
			"body",
			"contentType",
			"etag",
		},
	}
	// ProjectCollectionMap is a map of attribute names in result type
	// ProjectCollection indexed by view name.
	ProjectCollectionMap = map[string][]string{
		"default": []string{
			"id",
			"name",
			"description",
			"goal",
			"location",
			"tags",
			"privacy",
			"startTime",
			"endTime",
			"photo",
			"readOnly",
			"showStations",
			"bounds",
			"following",
		},
	}
)

Functions

func ValidateDownloadedPhoto

func ValidateDownloadedPhoto(result *DownloadedPhoto) (err error)

ValidateDownloadedPhoto runs the validations defined on the viewed result type DownloadedPhoto.

func ValidateDownloadedPhotoView

func ValidateDownloadedPhotoView(result *DownloadedPhotoView) (err error)

ValidateDownloadedPhotoView runs the validations defined on DownloadedPhotoView using the "default" view.

func ValidatePendingInviteView

func ValidatePendingInviteView(result *PendingInviteView) (err error)

ValidatePendingInviteView runs the validations defined on PendingInviteView.

func ValidatePendingInvites

func ValidatePendingInvites(result *PendingInvites) (err error)

ValidatePendingInvites runs the validations defined on the viewed result type PendingInvites.

func ValidatePendingInvitesView

func ValidatePendingInvitesView(result *PendingInvitesView) (err error)

ValidatePendingInvitesView runs the validations defined on PendingInvitesView using the "default" view.

func ValidateProject

func ValidateProject(result *Project) (err error)

ValidateProject runs the validations defined on the viewed result type Project.

func ValidateProjectBoundsView

func ValidateProjectBoundsView(result *ProjectBoundsView) (err error)

ValidateProjectBoundsView runs the validations defined on ProjectBoundsView.

func ValidateProjectCollectionView

func ValidateProjectCollectionView(result ProjectCollectionView) (err error)

ValidateProjectCollectionView runs the validations defined on ProjectCollectionView using the "default" view.

func ValidateProjectFollowingView

func ValidateProjectFollowingView(result *ProjectFollowingView) (err error)

ValidateProjectFollowingView runs the validations defined on ProjectFollowingView.

func ValidateProjectSummaryView

func ValidateProjectSummaryView(result *ProjectSummaryView) (err error)

ValidateProjectSummaryView runs the validations defined on ProjectSummaryView.

func ValidateProjectUpdate

func ValidateProjectUpdate(result *ProjectUpdate) (err error)

ValidateProjectUpdate runs the validations defined on the viewed result type ProjectUpdate.

func ValidateProjectUpdateView

func ValidateProjectUpdateView(result *ProjectUpdateView) (err error)

ValidateProjectUpdateView runs the validations defined on ProjectUpdateView using the "default" view.

func ValidateProjectView

func ValidateProjectView(result *ProjectView) (err error)

ValidateProjectView runs the validations defined on ProjectView using the "default" view.

func ValidateProjects

func ValidateProjects(result *Projects) (err error)

ValidateProjects runs the validations defined on the viewed result type Projects.

func ValidateProjectsView

func ValidateProjectsView(result *ProjectsView) (err error)

ValidateProjectsView runs the validations defined on ProjectsView using the "default" view.

Types

type DownloadedPhoto

type DownloadedPhoto struct {
	// Type to project
	Projected *DownloadedPhotoView
	// View to render
	View string
}

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

type DownloadedPhotoView

type DownloadedPhotoView struct {
	Length      *int64
	ContentType *string
	Etag        *string
	Body        []byte
}

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

type PendingInviteView

type PendingInviteView struct {
	ID      *int64
	Project *ProjectSummaryView
	Time    *int64
	Role    *int32
}

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

type PendingInvites

type PendingInvites struct {
	// Type to project
	Projected *PendingInvitesView
	// View to render
	View string
}

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

type PendingInvitesView

type PendingInvitesView struct {
	Pending  []*PendingInviteView
	Projects ProjectCollectionView
}

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

type Project

type Project struct {
	// Type to project
	Projected *ProjectView
	// View to render
	View string
}

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

type ProjectBoundsView

type ProjectBoundsView struct {
	Min []float64
	Max []float64
}

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

type ProjectCollectionView

type ProjectCollectionView []*ProjectView

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

type ProjectFollowingView

type ProjectFollowingView struct {
	Total     *int32
	Following *bool
}

ProjectFollowingView 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 ProjectUpdate

type ProjectUpdate struct {
	// Type to project
	Projected *ProjectUpdateView
	// View to render
	View string
}

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

type ProjectUpdateView

type ProjectUpdateView struct {
	ID        *int64
	Body      *string
	CreatedAt *int64
}

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

type ProjectView

type ProjectView struct {
	ID           *int32
	Name         *string
	Description  *string
	Goal         *string
	Location     *string
	Tags         *string
	Privacy      *int32
	StartTime    *string
	EndTime      *string
	Photo        *string
	ReadOnly     *bool
	ShowStations *bool
	Bounds       *ProjectBoundsView
	Following    *ProjectFollowingView
}

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

type Projects

type Projects struct {
	// Type to project
	Projected *ProjectsView
	// View to render
	View string
}

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

type ProjectsView

type ProjectsView struct {
	Projects ProjectCollectionView
}

ProjectsView 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