Database

package
v0.0.0-...-6947385 Latest Latest
Warning

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

Go to latest
Published: Feb 20, 2023 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewGormUnitOfWork

func NewGormUnitOfWork() (*gorm.DB, error)

Types

type DataSeeder

type DataSeeder struct {
	UnitOfWork           *gorm.DB
	PermissionRepository Permission.PermissionRepository
	RoleRepository       Role.RoleRepository
	UserRepository       User.UserRepository
	// contains filtered or unexported fields
}

func (*DataSeeder) Seed

func (dataSeeder *DataSeeder) Seed() error

type PermissionData

type PermissionData struct {
	Id          string `json:"id"`
	Name        string `json:"name"`
	Description string `json:"description"`
}

type PermissionsData

type PermissionsData struct {
	Permissions []PermissionData `json:"permissions"`
}

type RoleData

type RoleData struct {
	Id          string   `json:"id"`
	Name        string   `json:"name"`
	Permissions []string `json:"permissions"`
}

type RolesData

type RolesData struct {
	Roles []RoleData `json:"roles"`
}

type UserData

type UserData struct {
	Id           string   `json:"id"`
	FirstName    string   `json:"first_name"`
	LastName     string   `json:"last_name"`
	EmailAddress string   `json:"email_address"`
	Roles        []string `json:"roles"`
}

type UsersData

type UsersData struct {
	Users []UserData `json:"users"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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