seeds

package
v0.0.0-...-f5fa5b5 Latest Latest
Warning

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

Go to latest
Published: Feb 17, 2021 License: GPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Oauth2Client = []helpers.Oauth2Client{
	{
		ID:     helpers.NewToken(),
		Name:   "default",
		Secret: helpers.RandomString(10),
		UserID: uuid.New().String(),
	},
}
View Source
var User = []models.User{
	{ID: uuid.New().String(), Name: "Admin", Email: "admin@classroom.id", Password: "admin123456", RoleID: 1, IsEmailVerified: true},
	{ID: uuid.New().String(), Name: "Mr. Clark Kent", Email: "kent.super@classroom.id", Password: "teacher123456", RoleID: 2, IsEmailVerified: true},
	{ID: uuid.New().String(), Name: "Son Goku", Email: "gokuson@dragon.id", Password: "student123456", RoleID: 3, IsEmailVerified: true},
	{ID: uuid.New().String(), Name: "Son Gohan", Email: "gohan@dragon.id", Password: "student123456", RoleID: 3, IsEmailVerified: true},
	{ID: uuid.New().String(), Name: "Naruto", Email: "bunshin@ninja.co.jp", Password: "student123456", RoleID: 3, IsEmailVerified: true},
}
View Source
var UserRole = []models.UserRole{
	{ID: 1, Name: "Admin"},
	{ID: 2, Name: "Pengajar"},
	{ID: 3, Name: "Murid"},
}

Functions

func SeedOauth2Client

func SeedOauth2Client(db *gorm.DB)

func SeedUser

func SeedUser(db *gorm.DB)

func SeedUserRole

func SeedUserRole(db *gorm.DB)

Types

This section is empty.

Jump to

Keyboard shortcuts

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