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 (
	// FieldNotesMap is a map of attribute names in result type FieldNotes indexed
	// by view name.
	FieldNotesMap = map[string][]string{
		"default": []string{
			"notes",
			"media",
			"station",
		},
	}
	// NoteMediaMap is a map of attribute names in result type NoteMedia indexed by
	// view name.
	NoteMediaMap = map[string][]string{
		"default": []string{
			"id",
			"url",
			"key",
		},
	}
	// FieldNoteStationMap is a map of attribute names in result type
	// FieldNoteStation indexed by view name.
	FieldNoteStationMap = map[string][]string{
		"default": []string{
			"readOnly",
		},
	}
)

Functions

func ValidateFieldNoteAuthorView

func ValidateFieldNoteAuthorView(result *FieldNoteAuthorView) (err error)

ValidateFieldNoteAuthorView runs the validations defined on FieldNoteAuthorView.

func ValidateFieldNoteStationView

func ValidateFieldNoteStationView(result *FieldNoteStationView) (err error)

ValidateFieldNoteStationView runs the validations defined on FieldNoteStationView using the "default" view.

func ValidateFieldNoteView

func ValidateFieldNoteView(result *FieldNoteView) (err error)

ValidateFieldNoteView runs the validations defined on FieldNoteView.

func ValidateFieldNotes

func ValidateFieldNotes(result *FieldNotes) (err error)

ValidateFieldNotes runs the validations defined on the viewed result type FieldNotes.

func ValidateFieldNotesView

func ValidateFieldNotesView(result *FieldNotesView) (err error)

ValidateFieldNotesView runs the validations defined on FieldNotesView using the "default" view.

func ValidateNoteMedia

func ValidateNoteMedia(result *NoteMedia) (err error)

ValidateNoteMedia runs the validations defined on the viewed result type NoteMedia.

func ValidateNoteMediaView

func ValidateNoteMediaView(result *NoteMediaView) (err error)

ValidateNoteMediaView runs the validations defined on NoteMediaView using the "default" view.

Types

type FieldNoteAuthorView

type FieldNoteAuthorView struct {
	ID       *int32
	Name     *string
	MediaURL *string
}

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

type FieldNoteStationView

type FieldNoteStationView struct {
	ReadOnly *bool
}

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

type FieldNoteView

type FieldNoteView struct {
	ID        *int64
	CreatedAt *int64
	UpdatedAt *int64
	Author    *FieldNoteAuthorView
	Key       *string
	Title     *string
	Body      *string
	Version   *int64
	Media     []*NoteMediaView
}

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

type FieldNotes

type FieldNotes struct {
	// Type to project
	Projected *FieldNotesView
	// View to render
	View string
}

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

type FieldNotesView

type FieldNotesView struct {
	Notes   []*FieldNoteView
	Media   []*NoteMediaView
	Station *FieldNoteStationView
}

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

type NoteMedia

type NoteMedia struct {
	// Type to project
	Projected *NoteMediaView
	// View to render
	View string
}

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

type NoteMediaView

type NoteMediaView struct {
	ID          *int64
	URL         *string
	Key         *string
	ContentType *string
}

NoteMediaView 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