github.com/kotovmak/go-admin@v1.1.1/examples/datamodel/tables.go (about)

     1  package datamodel
     2  
     3  import "github.com/kotovmak/go-admin/plugins/admin/modules/table"
     4  
     5  // Generators is a map of table models.
     6  //
     7  // The key of generators is the prefix of table info url.
     8  // The corresponding value is the Form and TableName data.
     9  //
    10  // http://{{config.Domain}}:{{Port}}/{{config.Prefix}}/info/{{key}}
    11  //
    12  // example:
    13  //
    14  // "posts"   => http://localhost:9033/admin/info/posts
    15  // "authors" => http://localhost:9033/admin/info/authors
    16  var Generators = map[string]table.Generator{
    17  	"posts":   GetPostsTable,
    18  	"authors": GetAuthorsTable,
    19  }