views

package
v0.28.9 Latest Latest
Warning

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

Go to latest
Published: Nov 14, 2023 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// MetadataRecordRTMap is a map indexing the attribute names of
	// MetadataRecordRT by view name.
	MetadataRecordRTMap = map[string][]string{
		"default": {
			"record-id",
			"entity",
			"schema",
			"aspect",
			"valid-from",
			"valid-to",
			"asserter",
			"revoker",
		},
	}
	// ListMetaRTMap is a map indexing the attribute names of ListMetaRT by view
	// name.
	ListMetaRTMap = map[string][]string{
		"default": {
			"records",
			"entity-id",
			"schema",
			"aspect-path",
			"at-time",
			"links",
		},
	}
	// AddMetaRTMap is a map indexing the attribute names of AddMetaRT by view name.
	AddMetaRTMap = map[string][]string{
		"default": {
			"record-id",
		},
	}
	// MetadataListItemRTMap is a map indexing the attribute names of
	// MetadataListItemRT by view name.
	MetadataListItemRTMap = map[string][]string{
		"default": {
			"record-id",
			"entity",
			"schema",
			"aspect",
			"aspectContext",
		},
	}
)

Functions

func ValidateAddMetaRT

func ValidateAddMetaRT(result *AddMetaRT) (err error)

ValidateAddMetaRT runs the validations defined on the viewed result type AddMetaRT.

func ValidateAddMetaRTView

func ValidateAddMetaRTView(result *AddMetaRTView) (err error)

ValidateAddMetaRTView runs the validations defined on AddMetaRTView using the "default" view.

func ValidateListMetaRT

func ValidateListMetaRT(result *ListMetaRT) (err error)

ValidateListMetaRT runs the validations defined on the viewed result type ListMetaRT.

func ValidateListMetaRTView

func ValidateListMetaRTView(result *ListMetaRTView) (err error)

ValidateListMetaRTView runs the validations defined on ListMetaRTView using the "default" view.

func ValidateMetadataListItemRTView

func ValidateMetadataListItemRTView(result *MetadataListItemRTView) (err error)

ValidateMetadataListItemRTView runs the validations defined on MetadataListItemRTView using the "default" view.

func ValidateMetadataRecordRT

func ValidateMetadataRecordRT(result *MetadataRecordRT) (err error)

ValidateMetadataRecordRT runs the validations defined on the viewed result type MetadataRecordRT.

func ValidateMetadataRecordRTView

func ValidateMetadataRecordRTView(result *MetadataRecordRTView) (err error)

ValidateMetadataRecordRTView runs the validations defined on MetadataRecordRTView using the "default" view.

func ValidateNavTView

func ValidateNavTView(result *NavTView) (err error)

ValidateNavTView runs the validations defined on NavTView.

Types

type AddMetaRT

type AddMetaRT struct {
	// Type to project
	Projected *AddMetaRTView
	// View to render
	View string
}

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

type AddMetaRTView

type AddMetaRTView struct {
	// Reference to record created
	RecordID *string
}

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

type ListMetaRT

type ListMetaRT struct {
	// Type to project
	Projected *ListMetaRTView
	// View to render
	View string
}

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

type ListMetaRTView

type ListMetaRTView struct {
	// List of metadata records
	Records []*MetadataListItemRTView
	// Entity for which to request metadata
	EntityID *string
	// Optional schema to filter on
	Schema *string
	// Optional json path to further filter on returned list
	AspectPath *string
	// Time at which this list was valid
	AtTime *string
	// Navigation links
	Links *NavTView
}

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

type MetadataListItemRTView

type MetadataListItemRTView struct {
	// Record ID
	RecordID *string
	// Entity ID
	Entity *string
	// Schema ID
	Schema *string
	// Attached metadata aspect
	Aspect interface{}
	// If aspectPath was defined, this is what matched the query
	AspectContext *string
}

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

type MetadataRecordRT

type MetadataRecordRT struct {
	// Type to project
	Projected *MetadataRecordRTView
	// View to render
	View string
}

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

type MetadataRecordRTView

type MetadataRecordRTView struct {
	// Record ID
	RecordID *string
	// Entity ID
	Entity *string
	// Schema ID
	Schema *string
	// Attached metadata aspect
	Aspect interface{}
	// Time this record was asserted
	ValidFrom *string
	// Time this record was revoked
	ValidTo *string
	// Entity asserting this metadata record at 'valid-from'
	Asserter *string
	// Entity revoking this record at 'valid-to'
	Revoker *string
}

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

type NavTView struct {
	Self  *string
	First *string
	Next  *string
}

NavTView 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