123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155 |
- package voipHelpers
- import (
- "fmt"
- m "devel.mephi.ru/dyokunev/go-asu-models"
- I "devel.mephi.ru/dyokunev/wwwvoip/app/iface"
- vModels "devel.mephi.ru/dyokunev/wwwvoip/app/models"
- "github.com/xaionaro/reform"
- )
- var (
- ErrCannotModify error = fmt.Errorf("Modifying of this object is forbidden")
- ErrNotImplemented error = fmt.Errorf("Not implemented (yet?)")
- )
- type UnitScope struct {
- m.UnitScope
- vModels.ItemCommon
- }
- func NewUnitScope(scope m.UnitScope) *UnitScope {
- return &UnitScope{UnitScope: scope}
- }
- func (scope UnitScope) IsStruct() bool {
- return false
- }
- func (scope UnitScope) BeforeSave() error {
- return nil
- }
- func (scope UnitScope) AfterRestore() {
- return
- }
- func (scope UnitScope) GetKeyColumnName() string {
- panic(ErrNotImplemented)
- return ""
- }
- func (scope UnitScope) GetReformDB() *reform.DB {
- panic(ErrNotImplemented)
- return nil
- }
- func (scope UnitScope) IWhere(requiredArg interface{}, in_args ...interface{}) I.Scope {
- return NewUnitScope(*scope.Where(requiredArg, in_args...))
- }
- func (scope UnitScope) CanCache() bool {
- return false
- }
- func (scope UnitScope) CanSave() error {
- return ErrCannotModify
- }
- func (scope UnitScope) Create(controller I.Controller) error {
- return ErrCannotModify
- }
- func (scope UnitScope) Destroy(controller I.Controller) error {
- return ErrCannotModify
- }
- func (scope UnitScope) DefaultReformQuerier() I.ReformBackendQuerier {
- panic(ErrNotImplemented)
- return nil
- }
- func (scope UnitScope) FieldPtrByName(fieldName string) interface{} {
- panic(ErrNotImplemented)
- return nil
- }
- func (scope UnitScope) FieldValueByName(fieldName string) interface{} {
- panic(ErrNotImplemented)
- return nil
- }
- func (scope UnitScope) FlushCache() error {
- return nil
- }
- func (scope UnitScope) GetDisplayName() string {
- panic(ErrNotImplemented)
- return ""
- }
- func (scope UnitScope) IAsuFindByKey(key interface{}) (I.Item, error) {
- panic(ErrNotImplemented)
- return nil, nil
- }
- func (scope UnitScope) IDB(db *reform.DB) I.Scope {
- panic(ErrNotImplemented)
- return nil
- }
- func (scope UnitScope) IDiffFieldsTo(compareItem I.Item) [][]string {
- panic(ErrNotImplemented)
- return nil
- }
- func (scope UnitScope) IElem() (I.Item) {
- panic(ErrNotImplemented)
- return nil
- }
- func (scope UnitScope) IFirst(args ...interface{}) (I.Item, error) {
- panic(ErrNotImplemented)
- return nil, nil
- }
- func (scope UnitScope) IFixPairByFieldName(fieldName string) I.ItemPtr {
- panic(ErrNotImplemented)
- return nil
- }
- func (scope UnitScope) IGetTemplatesForSimilars() (result []I.Item) {
- panic(ErrNotImplemented)
- return nil
- }
- func (scope UnitScope) IGroup(argsI ...interface{}) I.Scope {
- panic(ErrNotImplemented)
- return nil
- }
- func (scope UnitScope) IIsIdenticalTo(compareItem I.Item) bool {
- panic(ErrNotImplemented)
- return false
- }
- func (scope UnitScope) ILimit(limit int) I.Scope {
- panic(ErrNotImplemented)
- return nil
- }
- func (scope UnitScope) INewKeyMap() I.ItemKeyMap {
- panic(ErrNotImplemented)
- return nil
- }
- func (scope UnitScope) IOrder(argsI ...interface{}) I.Scope {
- panic(ErrNotImplemented)
- return nil
- }
- func (scope UnitScope) IPrepareForRender() I.ItemPtr {
- panic(ErrNotImplemented)
- return nil
- }
- func (scope UnitScope) ISelect(args ...interface{}) (I.Slice, error) {
- panic(ErrNotImplemented)
- return nil, nil
- }
- func (scope UnitScope) ISetDB(dbI interface{}) I.ItemPtr {
- panic(ErrNotImplemented)
- return nil
- }
- func (scope UnitScope) ISetGroup(group []string) I.Scope {
- panic(ErrNotImplemented)
- return nil
- }
- func (scope UnitScope) ISetOrder(order []string) I.Scope {
- panic(ErrNotImplemented)
- return nil
- }
- func (scope UnitScope) ISetReformScope(anotherScope reform.GormImitateScope) reform.GormImitateScope {
- panic(ErrNotImplemented)
- return nil
- }
- func (scope UnitScope) ISetWhere(where [][]interface{}) I.Scope {
- panic(ErrNotImplemented)
- return nil
- }
- func (scope UnitScope) Model(newModel I.Model) I.Scope {
- panic(ErrNotImplemented)
- return nil
- }
|