views

package
v0.0.0-...-8b3e257 Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2024 License: MIT Imports: 1 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// StoredResumeCollectionMap is a map indexing the attribute names of
	// StoredResumeCollection by view name.
	StoredResumeCollectionMap = map[string][]string{
		"default": {
			"id",
			"name",
			"experience",
			"education",
			"created_at",
		},
	}
	// StoredResumeMap is a map indexing the attribute names of StoredResume by
	// view name.
	StoredResumeMap = map[string][]string{
		"default": {
			"id",
			"name",
			"experience",
			"education",
			"created_at",
		},
	}
)

Functions

func ValidateEducationView

func ValidateEducationView(result *EducationView) (err error)

ValidateEducationView runs the validations defined on EducationView.

func ValidateExperienceView

func ValidateExperienceView(result *ExperienceView) (err error)

ValidateExperienceView runs the validations defined on ExperienceView.

func ValidateStoredResumeCollection

func ValidateStoredResumeCollection(result StoredResumeCollection) (err error)

ValidateStoredResumeCollection runs the validations defined on the viewed result type StoredResumeCollection.

func ValidateStoredResumeCollectionView

func ValidateStoredResumeCollectionView(result StoredResumeCollectionView) (err error)

ValidateStoredResumeCollectionView runs the validations defined on StoredResumeCollectionView using the "default" view.

func ValidateStoredResumeView

func ValidateStoredResumeView(result *StoredResumeView) (err error)

ValidateStoredResumeView runs the validations defined on StoredResumeView using the "default" view.

Types

type EducationView

type EducationView struct {
	// Name of the institution
	Institution *string
	// Major name
	Major *string
}

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

type ExperienceView

type ExperienceView struct {
	// Name of the company
	Company *string
	// Name of the role in the company
	Role *string
	// Duration (in years) in the company
	Duration *int
}

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

type StoredResumeCollection

type StoredResumeCollection struct {
	// Type to project
	Projected StoredResumeCollectionView
	// View to render
	View string
}

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

type StoredResumeCollectionView

type StoredResumeCollectionView []*StoredResumeView

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

type StoredResumeView

type StoredResumeView struct {
	// ID of the resume
	ID *int
	// Time when resume was created
	CreatedAt *string
	// Name in the resume
	Name *string
	// Experience section in the resume
	Experience []*ExperienceView
	// Education section in the resume
	Education []*EducationView
}

StoredResumeView 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