admin

package
Version: v0.0.0-...-9346360 Latest Latest
Warning

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

Go to latest
Published: Sep 16, 2020 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddSection

func AddSection(name string, inputStructs ...interface{})

AddSection : register your Database Structs into different sections effictively mimic Django Admin App based Object Grouping

func ConfigCMSModel

func ConfigCMSModel(ModelName string, Config *MConfig)

ConfigCMSModel :

func SetupRoutes

func SetupRoutes(app *fiber.App, db *gorm.DB)

SetupRoutes : function creates all the necessary routes for the admin site

Types

type Field

type Field struct {
	Type            string
	Choices         []string
	HelpText        string
	ForeignKeyModel string
}

Field :

type MConfig

type MConfig struct {
	ListDisplay []string
}

MConfig :

type Model

type Model struct {
	ObjectPtr       interface{}
	Fields          map[string]Field
	PrimaryKeyField string
	Config          MConfig
}

Model :

Source Files

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL