views

package
v0.0.0-...-0250c29 Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2026 License: BSD-3-Clause Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// DataEventsMap is a map indexing the attribute names of DataEvents by view
	// name.
	DataEventsMap = map[string][]string{
		"default": {
			"events",
		},
	}
	// DataEventMap is a map indexing the attribute names of DataEvent by view name.
	DataEventMap = map[string][]string{
		"default": {
			"id",
			"createdAt",
			"updatedAt",
			"author",
			"title",
			"description",
			"bookmark",
			"start",
			"end",
			"permissions",
			"userHasReported",
		},
	}
)

Functions

func ValidateAuthorPhotoView

func ValidateAuthorPhotoView(result *AuthorPhotoView) (err error)

ValidateAuthorPhotoView runs the validations defined on AuthorPhotoView.

func ValidateDataEventView

func ValidateDataEventView(result *DataEventView) (err error)

ValidateDataEventView runs the validations defined on DataEventView using the "default" view.

func ValidateDataEvents

func ValidateDataEvents(result *DataEvents) (err error)

ValidateDataEvents runs the validations defined on the viewed result type DataEvents.

func ValidateDataEventsView

func ValidateDataEventsView(result *DataEventsView) (err error)

ValidateDataEventsView runs the validations defined on DataEventsView using the "default" view.

func ValidatePostAuthorView

func ValidatePostAuthorView(result *PostAuthorView) (err error)

ValidatePostAuthorView runs the validations defined on PostAuthorView.

func ValidateSimplePermissionsView

func ValidateSimplePermissionsView(result *SimplePermissionsView) (err error)

ValidateSimplePermissionsView runs the validations defined on SimplePermissionsView.

Types

type AuthorPhotoView

type AuthorPhotoView struct {
	URL *string
}

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

type DataEventView

type DataEventView struct {
	ID              *int64
	CreatedAt       *int64
	UpdatedAt       *int64
	Author          *PostAuthorView
	Title           *string
	Description     *string
	Bookmark        *string
	Start           *int64
	End             *int64
	Permissions     *SimplePermissionsView
	UserHasReported *bool
}

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

type DataEvents

type DataEvents struct {
	// Type to project
	Projected *DataEventsView
	// View to render
	View string
}

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

type DataEventsView

type DataEventsView struct {
	Events []*DataEventView
}

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

type PostAuthorView

type PostAuthorView struct {
	ID    *int32
	Name  *string
	Photo *AuthorPhotoView
}

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

type SimplePermissionsView

type SimplePermissionsView struct {
	CanDelete *bool
	CanEdit   *bool
}

SimplePermissionsView 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