Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var DefaulRole = model.Config{ Name: "Role", Plural: "roles", Base: "Role", Public: false, Properties: map[string]model.Property{ "name": { Type: "string", Required: true, }, }, Relations: &map[string]*model.Relation{}, }
View Source
var DefaultConfig = AppConfig{ Name: "example-app", Version: "0.0.1", Description: "Example app", RestApiRoot: "/api/v1", Port: 8023, Casbin: AppCasbinConfig{ DumpModels: false, Policies: AppCasbinConfigPolicies{ OutputDirectory: "./common/models", }, }, }
View Source
var DefaultDatasources = map[string]model.DataSourceConfig{
"db": {
Name: "db",
Connector: "mongodb",
Host: "localhost",
Port: 27017,
Database: "example_db",
User: "",
Password: "",
},
}
View Source
var DefaultUser = model.Config{ Name: "User", Plural: "users", Base: "User", Public: true, Properties: map[string]model.Property{ "email": { Type: "string", Required: true, }, "password": { Type: "string", Required: true, }, }, Relations: &map[string]*model.Relation{}, Hidden: []string{"password"}, }
Functions ¶
Types ¶
type AppCasbinConfig ¶
type AppCasbinConfig struct { DumpModels bool `json:"dumpModels"` Policies AppCasbinConfigPolicies `json:"policies"` }
type AppCasbinConfigPolicies ¶
type AppCasbinConfigPolicies struct {
OutputDirectory string `json:"outputDirectory"`
}
Click to show internal directories.
Click to hide internal directories.