views

package
v0.20.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ArtifactListRTMap is a map indexing the attribute names of ArtifactListRT by
	// view name.
	ArtifactListRTMap = map[string][]string{
		"default": {
			"artifacts",
			"links",
		},
	}
	// ArtifactStatusRTMap is a map indexing the attribute names of
	// ArtifactStatusRT by view name.
	ArtifactStatusRTMap = map[string][]string{
		"default": {
			"id",
			"name",
			"collections",
			"data",
			"status",
			"mime-type",
			"size",
			"metadata",
			"account",
			"links",
			"location",
			"tus_resumable",
			"tus_offset",
		},
	}
)

Functions

func ValidateArtifactListItemView

func ValidateArtifactListItemView(result *ArtifactListItemView) (err error)

ValidateArtifactListItemView runs the validations defined on ArtifactListItemView.

func ValidateArtifactListRT

func ValidateArtifactListRT(result *ArtifactListRT) (err error)

ValidateArtifactListRT runs the validations defined on the viewed result type ArtifactListRT.

func ValidateArtifactListRTView

func ValidateArtifactListRTView(result *ArtifactListRTView) (err error)

ValidateArtifactListRTView runs the validations defined on ArtifactListRTView using the "default" view.

func ValidateArtifactStatusRT

func ValidateArtifactStatusRT(result *ArtifactStatusRT) (err error)

ValidateArtifactStatusRT runs the validations defined on the viewed result type ArtifactStatusRT.

func ValidateArtifactStatusRTView

func ValidateArtifactStatusRTView(result *ArtifactStatusRTView) (err error)

ValidateArtifactStatusRTView runs the validations defined on ArtifactStatusRTView using the "default" view.

func ValidateDescribedByTView

func ValidateDescribedByTView(result *DescribedByTView) (err error)

ValidateDescribedByTView runs the validations defined on DescribedByTView.

func ValidateMetadataTView

func ValidateMetadataTView(result *MetadataTView) (err error)

ValidateMetadataTView runs the validations defined on MetadataTView.

func ValidateNavTView

func ValidateNavTView(result *NavTView) (err error)

ValidateNavTView runs the validations defined on NavTView.

func ValidateRefTView

func ValidateRefTView(result *RefTView) (err error)

ValidateRefTView runs the validations defined on RefTView.

func ValidateSelfTView

func ValidateSelfTView(result *SelfTView) (err error)

ValidateSelfTView runs the validations defined on SelfTView.

Types

type ArtifactListItemView

type ArtifactListItemView struct {
	// Artifact ID
	ID *string
	// Optional name
	Name *string
	// Artifact status
	Status *string
	// Size of aritfact in bytes
	Size *int64
	// Mime (content) type of artifact
	MimeType *string
	Links    *SelfTView
}

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

type ArtifactListRT

type ArtifactListRT struct {
	// Type to project
	Projected *ArtifactListRTView
	// View to render
	View string
}

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

type ArtifactListRTView

type ArtifactListRTView struct {
	// Artifacts
	Artifacts []*ArtifactListItemView
	// Navigation links
	Links *NavTView
}

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

type ArtifactStatusRT

type ArtifactStatusRT struct {
	// Type to project
	Projected *ArtifactStatusRTView
	// View to render
	View string
}

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

type ArtifactStatusRTView

type ArtifactStatusRTView struct {
	// Artifact ID
	ID *string
	// Optional name
	Name *string
	// List of collections this artifact is part of
	Collections []string
	// Link to retrieve the artifact data
	Data *SelfTView
	// Artifact status
	Status *string
	// Mime-type of data
	MimeType *string
	// Size of data
	Size *int64
	// List of metadata records associated with this artifact
	Metadata []*MetadataTView
	// Reference to billable account
	Account *RefTView
	Links   *SelfTView
	// link back to record
	Location *string
	// indicate version of TUS supported
	TusResumable *string
	// TUS offset for partially uploaded content
	TusOffset *int64
}

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

type DescribedByTView

type DescribedByTView struct {
	Href *string
	Type *string
}

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

type MetadataTView

type MetadataTView struct {
	Schema *string
	Data   interface{}
}

MetadataTView 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.

type RefTView

type RefTView struct {
	ID    *string
	Links *SelfTView
}

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

type SelfTView

type SelfTView struct {
	Self        *string
	DescribedBy *DescribedByTView
}

SelfTView 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