Documentation
¶
Overview ¶
Copyright gotree Author. All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Copyright gotree Author. All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Copyright gotree Author. All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Copyright gotree Author. All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Copyright gotree Author. All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Index ¶
- func Config() framework.Configer
- type AppAsync
- type AppController
- func (this *AppController) Async(run func(ac AppAsync), completeds ...func())
- func (this *AppController) Gotree(child interface{}) *AppController
- func (this *AppController) OnCreate(method string, argv interface{})
- func (this *AppController) OnDestory(method string, reply interface{}, e error)
- func (this *AppController) SessionGet(key string, value interface{}) error
- func (this *AppController) SessionSet(key string, value interface{})
- type AppService
- func (this *AppService) CallDao(obj interface{}, reply interface{}) error
- func (this *AppService) Gotree(child interface{}) *AppService
- func (this *AppService) InjectImpl(name string, service interface{})
- func (this *AppService) SessionGet(key string, value interface{}) error
- func (this *AppService) SessionSet(key string, value interface{})
- func (this *AppService) Testing(coms ...string)
- type AppTimer
- type Application
- func (this *Application) AsyncNum() (result int)
- func (this *Application) RegController(controller interface{})
- func (this *Application) RegTimer(service interface{})
- func (this *Application) RegisterService(child interface{})
- func (this *Application) ReqHeader(k string) string
- func (this *Application) Run()
- type ComApi
- func (this *ComApi) Gotree(child interface{}) *ComApi
- func (this *ComApi) HostAddr() string
- func (this *ComApi) HttpGet(apiAddr string, args map[string]interface{}, callback ...Request) (result []byte, e error)
- func (this *ComApi) HttpPost(apiAddr string, args map[string]interface{}, callback ...Request) (result []byte, e error)
- func (this *ComApi) HttpPostJson(apiAddr string, raw interface{}, callback ...Request) (result []byte, e error)
- func (this *ComApi) Testing()
- type ComCache
- type ComController
- func (this *ComController) Api(child interface{})
- func (this *ComController) Cache(child interface{})
- func (this *ComController) Gotree(child interface{}) *ComController
- func (this *ComController) Memory(child interface{})
- func (this *ComController) Model(child interface{})
- func (this *ComController) OnCreate(method string, argv interface{})
- func (this *ComController) OnDestory(method string, reply interface{}, e error)
- func (this *ComController) Other(child interface{})
- func (this *ComController) Queue(name string, fun func() error)
- func (this *ComController) Transaction(fun func() error) error
- type ComMemory
- func (this *ComMemory) AllKey() (result []interface{})
- func (this *ComMemory) DaoInit()
- func (this *ComMemory) Delete(keys ...interface{})
- func (this *ComMemory) DeleteAll(key interface{})
- func (this *ComMemory) Expire(key interface{}, sec int)
- func (this *ComMemory) Get(key, value interface{}) bool
- func (this *ComMemory) Gotree(child interface{}) *ComMemory
- func (this *ComMemory) Incr(key interface{}, addValue int64) (result int64, e error)
- func (this *ComMemory) MemoryTimeout(now int64)
- func (this *ComMemory) MultiSet(args ...interface{})
- func (this *ComMemory) MultiSetnx(args ...interface{}) bool
- func (this *ComMemory) Set(key, value interface{})
- func (this *ComMemory) Setnx(key, value interface{}) bool
- func (this *ComMemory) Testing()
- type ComModel
- func (this *ComModel) Conn() Conn
- func (this *ComModel) Connections(m map[string]int)
- func (this *ComModel) DaoInit()
- func (this *ComModel) FormatIn(args ...interface{}) (list []interface{})
- func (this *ComModel) FormatMark(arg interface{}) string
- func (this *ComModel) Gotree(child interface{}) *ComModel
- func (this *ComModel) Testing()
- type ComOther
- type Conn
- type DAO
- func (this *DAO) Gotree() *DAO
- func (this *DAO) RegApi(service interface{})
- func (this *DAO) RegCache(service interface{})
- func (this *DAO) RegController(controller interface{})
- func (this *DAO) RegMemory(service interface{})
- func (this *DAO) RegModel(service interface{})
- func (this *DAO) RegOther(service interface{})
- func (this *DAO) RegQueue(controller interface{}, queueName string, queueLen int, goroutine ...int)
- func (this *DAO) Run(args ...interface{})
- type LogInter
- type Request
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type AppController ¶
type AppController struct {
framework.CallController
}
AppController
func (*AppController) Async ¶
func (this *AppController) Async(run func(ac AppAsync), completeds ...func())
Async
func (*AppController) Gotree ¶
func (this *AppController) Gotree(child interface{}) *AppController
AppController
func (*AppController) OnCreate ¶
func (this *AppController) OnCreate(method string, argv interface{})
func (*AppController) OnDestory ¶
func (this *AppController) OnDestory(method string, reply interface{}, e error)
func (*AppController) SessionGet ¶
func (this *AppController) SessionGet(key string, value interface{}) error
func (*AppController) SessionSet ¶
func (this *AppController) SessionSet(key string, value interface{})
type AppService ¶
type AppService struct { framework.GotreeBase // contains filtered or unexported fields }
func (*AppService) CallDao ¶
func (this *AppService) CallDao(obj interface{}, reply interface{}) error
func (*AppService) Gotree ¶
func (this *AppService) Gotree(child interface{}) *AppService
func (*AppService) InjectImpl ¶
func (this *AppService) InjectImpl(name string, service interface{})
func (*AppService) SessionGet ¶
func (this *AppService) SessionGet(key string, value interface{}) error
func (*AppService) SessionSet ¶
func (this *AppService) SessionSet(key string, value interface{})
func (*AppService) Testing ¶
func (this *AppService) Testing(coms ...string)
type AppTimer ¶
type AppTimer struct { framework.GotreeBase // contains filtered or unexported fields }
type Application ¶
type Application struct {
// contains filtered or unexported fields
}
func App ¶
func App() *Application
func (*Application) AsyncNum ¶
func (this *Application) AsyncNum() (result int)
func (*Application) RegController ¶
func (this *Application) RegController(controller interface{})
RegController
func (*Application) RegisterService ¶
func (this *Application) RegisterService(child interface{})
func (*Application) Run ¶
func (this *Application) Run()
type ComApi ¶
type ComApi struct { framework.GotreeBase // contains filtered or unexported fields }
func (*ComApi) HttpGet ¶
func (this *ComApi) HttpGet(apiAddr string, args map[string]interface{}, callback ...Request) (result []byte, e error)
HttpGet
func (*ComApi) HttpPost ¶
func (this *ComApi) HttpPost(apiAddr string, args map[string]interface{}, callback ...Request) (result []byte, e error)
HttpPost
type ComCache ¶
type ComCache struct { framework.GotreeBase // contains filtered or unexported fields }
func (*ComCache) Connections ¶
type ComController ¶
type ComController struct { framework.CallController // contains filtered or unexported fields }
ComController
func (*ComController) Cache ¶
func (this *ComController) Cache(child interface{})
Cache 服务定位器获取Cache
func (*ComController) Gotree ¶
func (this *ComController) Gotree(child interface{}) *ComController
Gotree
func (*ComController) Model ¶
func (this *ComController) Model(child interface{})
Model 服务定位器获取model
func (*ComController) OnCreate ¶
func (this *ComController) OnCreate(method string, argv interface{})
func (*ComController) OnDestory ¶
func (this *ComController) OnDestory(method string, reply interface{}, e error)
func (*ComController) Queue ¶
func (this *ComController) Queue(name string, fun func() error)
Queue 队列处理
func (*ComController) Transaction ¶
func (this *ComController) Transaction(fun func() error) error
Transaction 事务
type ComMemory ¶
type ComMemory struct { framework.GotreeBase // contains filtered or unexported fields }
ComMemory 内存数据源
func (*ComMemory) MemoryTimeout ¶
MemoryTimeout 超时处理
func (*ComMemory) MultiSetnx ¶
MultiSet 多条
type ComModel ¶
type ComModel struct { framework.GotreeBase // contains filtered or unexported fields }
func (*ComModel) Connections ¶
type ComOther ¶
type ComOther struct { framework.GotreeBase // contains filtered or unexported fields }
Other data sources
type DAO ¶
type DAO struct { framework.GotreeBase // contains filtered or unexported fields }
type LogInter ¶
type LogInter interface { Notice(str ...interface{}) Debug(str ...interface{}) Warning(str ...interface{}) Error(str ...interface{}) }
type Request ¶
type Request func(request *helper.HTTPRequest)