Documentation
¶
Index ¶
- Variables
- func CreateConfigFiles(app services.Application, configs map[string]interface{})
- func CreateFile(path string, content []byte)
- func CreateTemplateFiles(app services.Application, templates map[string]string)
- func IntRef(i int) *int
- func IntRefOrNil(v interface{}) *int
- func MockServices(configs map[string]interface{}, envs map[string]string) services.Services
- func StringRef(str string) *string
- func StringRefOrNil(v interface{}) *string
- func TestCookies(t *testing.T, url string, expect map[string]string)
- func TestDeleteRequestString(t *testing.T, url string, expect string)
- func TestGetJSONRequest(t *testing.T, url string, expect map[string]interface{})
- func TestGetRequest(t *testing.T, url string, expect string)
- func TestHTMLRequest(t *testing.T, url string, see string)
- func TestPostJSONRequest(t *testing.T, url string, params map[string]interface{}, ...)
- func TestPutJSONRequest(t *testing.T, url string, params map[string]interface{}, ...)
- func TestPutJSONRequestString(t *testing.T, url string, params map[string]interface{}, expect string)
- func TestSession(t *testing.T, first string, second string, expect map[string]string)
- type ServicesMock
- func (s *ServicesMock) App() services.Application
- func (s *ServicesMock) Cache() services.Cache
- func (s *ServicesMock) Config() services.Config
- func (s *ServicesMock) GetByName(name string) interface{}
- func (s *ServicesMock) Hash() services.Hash
- func (s *ServicesMock) Localization() services.Localization
- func (s *ServicesMock) Logger() services.Logger
- func (s *ServicesMock) Migrator() services.Migratory
- func (s *ServicesMock) Modules() services.ModuleManager
- func (s *ServicesMock) Redis() services.RedisClient
- func (s *ServicesMock) Renderer() services.RenderEngine
- func (s *ServicesMock) Repository() services.Repository
- func (s *ServicesMock) Router() services.Router
- type TestMigMigratable
- type TestMigrationModel
- type TestMigrationModule
- func (t *TestMigrationModule) Activated() bool
- func (t *TestMigrationModule) Deactivated()
- func (t *TestMigrationModule) Description() string
- func (t *TestMigrationModule) GroupsHandlers() []*services.RouteGroup
- func (t *TestMigrationModule) Installed() bool
- func (t *TestMigrationModule) MiddleWares() []*services.MiddleWare
- func (t *TestMigrationModule) Migrations() []services.Migratable
- func (t *TestMigrationModule) Purged()
- func (t *TestMigrationModule) Routes() []*services.Route
- func (t *TestMigrationModule) Services() map[string]func() interface{}
- func (t *TestMigrationModule) Templates() []*services.Template
- func (t *TestMigrationModule) Title() string
- func (t *TestMigrationModule) Version() string
- type TestRouteMigratable
- type TestRouteModel
- type TestRouteModule
- func (t *TestRouteModule) Activated() bool
- func (t *TestRouteModule) Deactivated()
- func (t *TestRouteModule) Description() string
- func (t *TestRouteModule) GroupsHandlers() []*services.RouteGroup
- func (t *TestRouteModule) Installed() bool
- func (t *TestRouteModule) MiddleWares() []*services.MiddleWare
- func (t *TestRouteModule) Migrations() []services.Migratable
- func (t *TestRouteModule) Purged()
- func (t *TestRouteModule) Routes() []*services.Route
- func (t *TestRouteModule) Services() map[string]func() interface{}
- func (t *TestRouteModule) Templates() []*services.Template
- func (t *TestRouteModule) Title() string
- func (t *TestRouteModule) Version() string
Constants ¶
This section is empty.
Variables ¶
View Source
var CommonConfigs = map[string]interface{}{ "app.hjson": map[string]interface{}{ "debug": true, }, "rdbms.hjson": map[string]interface{}{ "app": "sqlite3", "runtime": map[string]interface{}{ "migrations": "migrations", "connection": "sqlite3", }, "connections": map[string]interface{}{ "sqlite3": map[string]interface{}{ "driver": "sqlite3", "file": "storage(\"test.db\")", }, }, }, "server.hjson": map[string]interface{}{ "address": "127.0.0.1", "port": 8181, "sessions": map[string]interface{}{ "auto": true, "driver": "redis", "connection": "default", }, }, "redis.hjson": map[string]interface{}{ "connections": map[string]interface{}{ "local": map[string]interface{}{}, }, }, }
View Source
var CommonEnvs = map[string]string{}
View Source
var SimpleTemplates = map[string]string{
"home.jet": `
{{ extends "layout.jet" }}
{{ block body() }}
<main>
This content will be yielded in the layout above.
</main>
{{ end }}
`,
"layout.jet": `
<!DOCTYPE html>
<html>
<head></head>
<body>
{{yield body()}}
</body>
</html>
`,
"error-debug.jet": `
{{ extends "layout.jet" }}
{{ block body() }}
<main>
This content will be yielded in the layout above.
</main>
`,
"error-deploy.jet": `
{{ extends "layout.jet" }}
{{ block body() }}
<main>
This content will be yielded in the layout above.
</main>
`,
}
Functions ¶
func CreateConfigFiles ¶
func CreateConfigFiles(app services.Application, configs map[string]interface{})
func CreateFile ¶
func CreateTemplateFiles ¶
func CreateTemplateFiles(app services.Application, templates map[string]string)
func IntRefOrNil ¶
func IntRefOrNil(v interface{}) *int
func MockServices ¶
func StringRefOrNil ¶
func StringRefOrNil(v interface{}) *string
func TestDeleteRequestString ¶
func TestGetJSONRequest ¶
func TestPostJSONRequest ¶
func TestPutJSONRequest ¶
Types ¶
type ServicesMock ¶
type ServicesMock struct {
}
func (*ServicesMock) App ¶
func (s *ServicesMock) App() services.Application
func (*ServicesMock) Cache ¶
func (s *ServicesMock) Cache() services.Cache
func (*ServicesMock) Config ¶
func (s *ServicesMock) Config() services.Config
func (*ServicesMock) GetByName ¶
func (s *ServicesMock) GetByName(name string) interface{}
func (*ServicesMock) Hash ¶
func (s *ServicesMock) Hash() services.Hash
func (*ServicesMock) Localization ¶
func (s *ServicesMock) Localization() services.Localization
func (*ServicesMock) Logger ¶
func (s *ServicesMock) Logger() services.Logger
func (*ServicesMock) Migrator ¶
func (s *ServicesMock) Migrator() services.Migratory
func (*ServicesMock) Modules ¶
func (s *ServicesMock) Modules() services.ModuleManager
func (*ServicesMock) Redis ¶
func (s *ServicesMock) Redis() services.RedisClient
func (*ServicesMock) Renderer ¶
func (s *ServicesMock) Renderer() services.RenderEngine
func (*ServicesMock) Repository ¶
func (s *ServicesMock) Repository() services.Repository
func (*ServicesMock) Router ¶
func (s *ServicesMock) Router() services.Router
type TestMigMigratable ¶
type TestMigMigratable struct {
}
type TestMigrationModel ¶
func (*TestMigrationModel) PrimaryKey ¶
func (t *TestMigrationModel) PrimaryKey() string
func (*TestMigrationModel) TableName ¶
func (t *TestMigrationModel) TableName() string
type TestMigrationModule ¶
type TestMigrationModule struct {
}
func (*TestMigrationModule) Activated ¶
func (t *TestMigrationModule) Activated() bool
func (*TestMigrationModule) Deactivated ¶
func (t *TestMigrationModule) Deactivated()
func (*TestMigrationModule) Description ¶
func (t *TestMigrationModule) Description() string
func (*TestMigrationModule) GroupsHandlers ¶
func (t *TestMigrationModule) GroupsHandlers() []*services.RouteGroup
func (*TestMigrationModule) Installed ¶
func (t *TestMigrationModule) Installed() bool
func (*TestMigrationModule) MiddleWares ¶
func (t *TestMigrationModule) MiddleWares() []*services.MiddleWare
func (*TestMigrationModule) Migrations ¶
func (t *TestMigrationModule) Migrations() []services.Migratable
func (*TestMigrationModule) Purged ¶
func (t *TestMigrationModule) Purged()
func (*TestMigrationModule) Routes ¶
func (t *TestMigrationModule) Routes() []*services.Route
func (*TestMigrationModule) Services ¶
func (t *TestMigrationModule) Services() map[string]func() interface{}
func (*TestMigrationModule) Templates ¶
func (t *TestMigrationModule) Templates() []*services.Template
func (*TestMigrationModule) Title ¶
func (t *TestMigrationModule) Title() string
func (*TestMigrationModule) Version ¶
func (t *TestMigrationModule) Version() string
type TestRouteMigratable ¶
type TestRouteMigratable struct {
}
type TestRouteModel ¶
func (*TestRouteModel) PrimaryKey ¶
func (t *TestRouteModel) PrimaryKey() string
func (*TestRouteModel) TableName ¶
func (t *TestRouteModel) TableName() string
type TestRouteModule ¶
func (*TestRouteModule) Activated ¶
func (t *TestRouteModule) Activated() bool
func (*TestRouteModule) Deactivated ¶
func (t *TestRouteModule) Deactivated()
func (*TestRouteModule) Description ¶
func (t *TestRouteModule) Description() string
func (*TestRouteModule) GroupsHandlers ¶
func (t *TestRouteModule) GroupsHandlers() []*services.RouteGroup
func (*TestRouteModule) Installed ¶
func (t *TestRouteModule) Installed() bool
func (*TestRouteModule) MiddleWares ¶
func (t *TestRouteModule) MiddleWares() []*services.MiddleWare
func (*TestRouteModule) Migrations ¶
func (t *TestRouteModule) Migrations() []services.Migratable
func (*TestRouteModule) Purged ¶
func (t *TestRouteModule) Purged()
func (*TestRouteModule) Routes ¶
func (t *TestRouteModule) Routes() []*services.Route
func (*TestRouteModule) Services ¶
func (t *TestRouteModule) Services() map[string]func() interface{}
func (*TestRouteModule) Templates ¶
func (t *TestRouteModule) Templates() []*services.Template
func (*TestRouteModule) Title ¶
func (t *TestRouteModule) Title() string
func (*TestRouteModule) Version ¶
func (t *TestRouteModule) Version() string
Click to show internal directories.
Click to hide internal directories.