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 (
	// UserExportsMap is a map of attribute names in result type UserExports
	// indexed by view name.
	UserExportsMap = map[string][]string{
		"default": []string{
			"exports",
		},
	}
	// ExportStatusMap is a map of attribute names in result type ExportStatus
	// indexed by view name.
	ExportStatusMap = map[string][]string{
		"default": []string{
			"id",
			"token",
			"createdAt",
			"completedAt",
			"format",
			"progress",
			"message",
			"statusUrl",
			"downloadUrl",
			"size",
			"args",
		},
	}
)

Functions

func ValidateExportStatus

func ValidateExportStatus(result *ExportStatus) (err error)

ValidateExportStatus runs the validations defined on the viewed result type ExportStatus.

func ValidateExportStatusView

func ValidateExportStatusView(result *ExportStatusView) (err error)

ValidateExportStatusView runs the validations defined on ExportStatusView using the "default" view.

func ValidateUserExports

func ValidateUserExports(result *UserExports) (err error)

ValidateUserExports runs the validations defined on the viewed result type UserExports.

func ValidateUserExportsView

func ValidateUserExportsView(result *UserExportsView) (err error)

ValidateUserExportsView runs the validations defined on UserExportsView using the "default" view.

Types

type ExportStatus

type ExportStatus struct {
	// Type to project
	Projected *ExportStatusView
	// View to render
	View string
}

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

type ExportStatusView

type ExportStatusView struct {
	ID          *int64
	Token       *string
	CreatedAt   *int64
	CompletedAt *int64
	Format      *string
	Progress    *float32
	Message     *string
	StatusURL   *string
	DownloadURL *string
	Size        *int32
	Args        interface{}
}

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

type UserExports

type UserExports struct {
	// Type to project
	Projected *UserExportsView
	// View to render
	View string
}

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

type UserExportsView

type UserExportsView struct {
	Exports []*ExportStatusView
}

UserExportsView 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