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: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// AvailableRolesMap is a map of attribute names in result type AvailableRoles
	// indexed by view name.
	AvailableRolesMap = map[string][]string{
		"default": []string{
			"roles",
		},
	}
	// DownloadedPhotoMap is a map of attribute names in result type
	// DownloadedPhoto indexed by view name.
	DownloadedPhotoMap = map[string][]string{
		"default": []string{
			"length",
			"body",
			"contentType",
			"etag",
		},
	}
	// UserMap is a map of attribute names in result type User indexed by view name.
	UserMap = map[string][]string{
		"default": []string{
			"id",
			"name",
			"email",
			"bio",
			"photo",
			"admin",
			"updatedAt",
			"tncDate",
		},
	}
	// ProjectUsersMap is a map of attribute names in result type ProjectUsers
	// indexed by view name.
	ProjectUsersMap = map[string][]string{
		"default": []string{
			"users",
		},
	}
	// TransmissionTokenMap is a map of attribute names in result type
	// TransmissionToken indexed by view name.
	TransmissionTokenMap = map[string][]string{
		"default": []string{
			"token",
			"url",
		},
	}
	// ProjectRoleCollectionMap is a map of attribute names in result type
	// ProjectRoleCollection indexed by view name.
	ProjectRoleCollectionMap = map[string][]string{
		"default": []string{
			"id",
			"name",
		},
	}
	// MentionableOptionsMap is a map of attribute names in result type
	// MentionableOptions indexed by view name.
	MentionableOptionsMap = map[string][]string{
		"default": []string{
			"users",
		},
	}
	// ProjectUserCollectionMap is a map of attribute names in result type
	// ProjectUserCollection indexed by view name.
	ProjectUserCollectionMap = map[string][]string{
		"default": []string{
			"user",
			"role",
			"membership",
			"invited",
			"accepted",
			"rejected",
		},
	}
	// ProjectUserMap is a map of attribute names in result type ProjectUser
	// indexed by view name.
	ProjectUserMap = map[string][]string{
		"default": []string{
			"user",
			"role",
			"membership",
			"invited",
			"accepted",
			"rejected",
		},
	}
	// ProjectRoleMap is a map of attribute names in result type ProjectRole
	// indexed by view name.
	ProjectRoleMap = map[string][]string{
		"default": []string{
			"id",
			"name",
		},
	}
	// MentionableUserCollectionMap is a map of attribute names in result type
	// MentionableUserCollection indexed by view name.
	MentionableUserCollectionMap = map[string][]string{
		"default": []string{
			"id",
			"name",
			"mention",
			"photo",
		},
	}
	// MentionableUserMap is a map of attribute names in result type
	// MentionableUser indexed by view name.
	MentionableUserMap = map[string][]string{
		"default": []string{
			"id",
			"name",
			"mention",
			"photo",
		},
	}
)

Functions

func ValidateAvailableRoleView

func ValidateAvailableRoleView(result *AvailableRoleView) (err error)

ValidateAvailableRoleView runs the validations defined on AvailableRoleView.

func ValidateAvailableRoles

func ValidateAvailableRoles(result *AvailableRoles) (err error)

ValidateAvailableRoles runs the validations defined on the viewed result type AvailableRoles.

func ValidateAvailableRolesView

func ValidateAvailableRolesView(result *AvailableRolesView) (err error)

ValidateAvailableRolesView runs the validations defined on AvailableRolesView using the "default" view.

func ValidateDownloadedPhoto

func ValidateDownloadedPhoto(result *DownloadedPhoto) (err error)

ValidateDownloadedPhoto runs the validations defined on the viewed result type DownloadedPhoto.

func ValidateDownloadedPhotoView

func ValidateDownloadedPhotoView(result *DownloadedPhotoView) (err error)

ValidateDownloadedPhotoView runs the validations defined on DownloadedPhotoView using the "default" view.

func ValidateMentionableOptions

func ValidateMentionableOptions(result *MentionableOptions) (err error)

ValidateMentionableOptions runs the validations defined on the viewed result type MentionableOptions.

func ValidateMentionableOptionsView

func ValidateMentionableOptionsView(result *MentionableOptionsView) (err error)

ValidateMentionableOptionsView runs the validations defined on MentionableOptionsView using the "default" view.

func ValidateMentionableUserCollectionView

func ValidateMentionableUserCollectionView(result MentionableUserCollectionView) (err error)

ValidateMentionableUserCollectionView runs the validations defined on MentionableUserCollectionView using the "default" view.

func ValidateMentionableUserView

func ValidateMentionableUserView(result *MentionableUserView) (err error)

ValidateMentionableUserView runs the validations defined on MentionableUserView using the "default" view.

func ValidateProjectRoleCollection

func ValidateProjectRoleCollection(result ProjectRoleCollection) (err error)

ValidateProjectRoleCollection runs the validations defined on the viewed result type ProjectRoleCollection.

func ValidateProjectRoleCollectionView

func ValidateProjectRoleCollectionView(result ProjectRoleCollectionView) (err error)

ValidateProjectRoleCollectionView runs the validations defined on ProjectRoleCollectionView using the "default" view.

func ValidateProjectRoleView

func ValidateProjectRoleView(result *ProjectRoleView) (err error)

ValidateProjectRoleView runs the validations defined on ProjectRoleView using the "default" view.

func ValidateProjectUserCollectionView

func ValidateProjectUserCollectionView(result ProjectUserCollectionView) (err error)

ValidateProjectUserCollectionView runs the validations defined on ProjectUserCollectionView using the "default" view.

func ValidateProjectUserView

func ValidateProjectUserView(result *ProjectUserView) (err error)

ValidateProjectUserView runs the validations defined on ProjectUserView using the "default" view.

func ValidateProjectUsers

func ValidateProjectUsers(result *ProjectUsers) (err error)

ValidateProjectUsers runs the validations defined on the viewed result type ProjectUsers.

func ValidateProjectUsersView

func ValidateProjectUsersView(result *ProjectUsersView) (err error)

ValidateProjectUsersView runs the validations defined on ProjectUsersView using the "default" view.

func ValidateTransmissionToken

func ValidateTransmissionToken(result *TransmissionToken) (err error)

ValidateTransmissionToken runs the validations defined on the viewed result type TransmissionToken.

func ValidateTransmissionTokenView

func ValidateTransmissionTokenView(result *TransmissionTokenView) (err error)

ValidateTransmissionTokenView runs the validations defined on TransmissionTokenView using the "default" view.

func ValidateUser

func ValidateUser(result *User) (err error)

ValidateUser runs the validations defined on the viewed result type User.

func ValidateUserPhotoView

func ValidateUserPhotoView(result *UserPhotoView) (err error)

ValidateUserPhotoView runs the validations defined on UserPhotoView.

func ValidateUserView

func ValidateUserView(result *UserView) (err error)

ValidateUserView runs the validations defined on UserView using the "default" view.

Types

type AvailableRoleView

type AvailableRoleView struct {
	ID   *int32
	Name *string
}

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

type AvailableRoles

type AvailableRoles struct {
	// Type to project
	Projected *AvailableRolesView
	// View to render
	View string
}

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

type AvailableRolesView

type AvailableRolesView struct {
	Roles []*AvailableRoleView
}

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

type DownloadedPhoto

type DownloadedPhoto struct {
	// Type to project
	Projected *DownloadedPhotoView
	// View to render
	View string
}

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

type DownloadedPhotoView

type DownloadedPhotoView struct {
	Length      *int64
	ContentType *string
	Etag        *string
	Body        []byte
}

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

type MentionableOptions

type MentionableOptions struct {
	// Type to project
	Projected *MentionableOptionsView
	// View to render
	View string
}

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

type MentionableOptionsView

type MentionableOptionsView struct {
	Users MentionableUserCollectionView
}

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

type MentionableUserCollectionView

type MentionableUserCollectionView []*MentionableUserView

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

type MentionableUserView

type MentionableUserView struct {
	ID      *int32
	Name    *string
	Mention *string
	Photo   *UserPhotoView
}

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

type ProjectRoleCollection

type ProjectRoleCollection struct {
	// Type to project
	Projected ProjectRoleCollectionView
	// View to render
	View string
}

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

type ProjectRoleCollectionView

type ProjectRoleCollectionView []*ProjectRoleView

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

type ProjectRoleView

type ProjectRoleView struct {
	ID   *int32
	Name *string
}

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

type ProjectUserCollectionView

type ProjectUserCollectionView []*ProjectUserView

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

type ProjectUserView

type ProjectUserView struct {
	User       *UserView
	Role       *string
	Membership *string
	Invited    *bool
	Accepted   *bool
	Rejected   *bool
}

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

type ProjectUsers

type ProjectUsers struct {
	// Type to project
	Projected *ProjectUsersView
	// View to render
	View string
}

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

type ProjectUsersView

type ProjectUsersView struct {
	Users ProjectUserCollectionView
}

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

type TransmissionToken

type TransmissionToken struct {
	// Type to project
	Projected *TransmissionTokenView
	// View to render
	View string
}

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

type TransmissionTokenView

type TransmissionTokenView struct {
	Token *string
	URL   *string
}

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

type User

type User struct {
	// Type to project
	Projected *UserView
	// View to render
	View string
}

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

type UserPhotoView

type UserPhotoView struct {
	URL *string
}

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

type UserView

type UserView struct {
	ID        *int32
	Name      *string
	Email     *string
	Bio       *string
	Photo     *UserPhotoView
	Admin     *bool
	UpdatedAt *int64
	TncDate   *int64
}

UserView 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