Documentation ¶
Index ¶
- func ValidateContributor(contributor *ContributorForm) error
- func ValidateRepository(repository *RepositoryForm) error
- func ValidateWeek(week *WeekForm) error
- type Contributor
- type ContributorForm
- type ContributorJSON
- type Repository
- type RepositoryForm
- type RepositoryJSON
- type Week
- type WeekForm
- type WeekJSON
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 ¶
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 ¶
RepositoryForm is our struct to handle new users requests
type RepositoryJSON ¶
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
Click to show internal directories.
Click to hide internal directories.