models

package
v0.0.0-...-20ba6f3 Latest Latest
Warning

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

Go to latest
Published: May 20, 2021 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ValidateContributor

func ValidateContributor(contributor *ContributorForm) error

ValidateContributor takes a contributor form as parameter and check if its properties are valid

func ValidateRepository

func ValidateRepository(repository *RepositoryForm) error

ValidateRepository takes a repository form as parameter and check if its properties are valid

func ValidateWeek

func ValidateWeek(week *WeekForm) error

ValidateWeek takes a week form as parameter and check if its properties are valid

Types

type Contributor

type Contributor struct {
	ID           uint64 `gorm:"primary_key"`
	Name         string
	Total        uint
	Repository   Repository
	ImageLink    string
	RepositoryID uint64
}

Contributor is our struct for users

type ContributorForm

type ContributorForm struct {
	Name         string
	Total        uint
	Repository   Repository
	ImageLink    string
	RepositoryID uint64
}

ContributorForm is our struct to handle new users requests

type ContributorJSON

type ContributorJSON struct {
	ID           uint64
	Name         string
	Total        uint
	Repository   Repository
	ImageLink    string
	RepositoryID uint64
}

ContributorJSON is the struct to return contributor in json

type Repository

type Repository struct {
	ID        uint64 `gorm:"primary_key"`
	Name      string
	Author    string
	UpdatedAt time.Time
}

Repository is our struct for users

type RepositoryForm

type RepositoryForm struct {
	Name      string
	Author    string
	UpdatedAt time.Time
}

RepositoryForm is our struct to handle new users requests

type RepositoryJSON

type RepositoryJSON struct {
	ID        uint64
	Name      string
	Author    string
	UpdatedAt time.Time
}

RepositoryJSON is the struct to return repository in json

type Week

type Week struct {
	ID           uint64 `gorm:"primary_key"`
	Date         time.Time
	Total        uint
	RepositoryID uint64
	Repository   Repository
}

Week is our struct for users

type WeekForm

type WeekForm struct {
	Date         time.Time
	Total        uint
	RepositoryID uint64
	Repository   Repository
}

WeekForm is our struct to handle new users requests

type WeekJSON

type WeekJSON struct {
	ID           uint64
	Date         time.Time
	Total        uint
	RepositoryID uint64
	Repository   Repository
}

WeekJSON is the struct to return week in json

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL