biz

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Jul 9, 2022 License: Apache-2.0, MIT Imports: 19 Imported by: 3

README

Biz

Documentation

Index

Constants

View Source
const (
	SeedPathKey              = "seed.menu.path"
	ConnName    dal.ConnName = "sys"
)

Variables

View Source
var ProviderSet = wire.NewSet(NewMenuSeed)

ProviderSet is biz providers.

Functions

This section is empty.

Types

type Menu struct {
	gorm.UIDBase `json:",squash"`
	gorm.AuditedModel
	Name              string                      `json:"name"`
	Desc              string                      `json:"desc"`
	Component         string                      `json:"component"`
	Requirement       []MenuPermissionRequirement `gorm:"foreignKey:MenuID;constraint:OnDelete:CASCADE;" json:"requirement"`
	Parent            string                      `json:"parent"`
	Props             data.JSONMap                `json:"props"`
	FullPath          string                      `json:"full_path"`
	Priority          int32                       `json:"priority"`
	IgnoreAuth        bool                        `json:"ignore_auth"`
	Icon              string                      `json:"icon"`
	Iframe            string                      `json:"iframe"`
	MicroApp          string                      `json:"micro_app"`
	MicroAppDev       string                      `json:"micro_app_dev"`
	MicroAppName      string                      `json:"micro_app_name"`
	MicroAppBaseRoute string                      `json:"micro_app_base_route"`
	Meta              data.JSONMap                `json:"meta"`
	Title             string                      `json:"title"`
	Path              string                      `json:"path"`
	Redirect          string                      `json:"redirect"`
	IsPreserved       bool                        `json:"is_preserved"`
}
func (m *Menu) MergeWithPreservedFields(p *Menu)
type MenuPermissionRequirement struct {
	gorm.UIDBase `json:",squash"`
	MenuID       uuid.UUID `gorm:"type:char(36)" json:"menu_id"`
	Namespace    string    `json:"namespace"`
	Resource     string    `json:"resource"`
	Action       string    `json:"action"`
}
type MenuRepo interface {
	data.Repo[Menu, string, v1.ListMenuRequest]
	FindByName(ctx context.Context, name string) (*Menu, error)
}
type MenuSeed struct {
	// contains filtered or unexported fields
}

func NewMenuSeed

func NewMenuSeed(dbProvider gorm.DbProvider, menuRepo MenuRepo) *MenuSeed
func (m *MenuSeed) Seed(ctx context.Context, sCtx *seed.Context) error

Jump to

Keyboard shortcuts

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