Documentation
¶
Index ¶
- Constants
- Variables
- func BootstrapDirectory(directoryName string, collectionCount int) (files [][]byte, err error, directoryFound bool)
- func BootstrapMongoDump(directoryName string, collectionName string) (err error)
- func CallMethod(i interface{}, methodName string, in []reflect.Value) (err error)
- func ConnectDB()
- func Criteria(key string, value interface{}) map[string]interface{}
- func GetCollectionHistoryNames() (names []string)
- func GetCollectionNames() (names []string)
- func GetDefaultLocale(language string) string
- func IsValidationError(err error) bool
- func IsZeroOfUnderlyingType(x interface{}) bool
- func JoinEntity(collectionQ *Query, y interface{}, j join, id string, fieldToSet reflect.Value, ...) (err error)
- func MaxQ(k string, max interface{}) map[string]Max
- func MinQ(k string, min interface{}) map[string]Min
- func NewObjectId() string
- func Q(k string, v interface{}) map[string]interface{}
- func QTs(k string, v time.Time) map[string]time.Time
- func RangeQ(k string, min interface{}, max interface{}) map[string]Range
- func ResolveCollection(key string) (collection, error)
- func ResolveEntity(key string) modelEntity
- func ResolveField(collectionName string, fieldName string) string
- func ResolveHistoryCollection(key string) modelCollection
- func TimeZoneOffset(loc string) (zone string, offset int, err error)
- func TimeZoneValidLocation(s string) bool
- func UpdateAllRecordsToLatestSchema()
- type Account
- func (obj *Account) BSONBytes() (in []byte, err error)
- func (obj *Account) BSONString() (string, error)
- func (self *Account) CreateWithTran(t *Transaction, forceCreate bool) error
- func (self *Account) Delete() error
- func (self *Account) DeleteWithTran(t *Transaction) error
- func (obj *Account) DoesIdExist(objectID interface{}) bool
- func (self *Account) ForceCreateWithTran(t *Transaction) error
- func (self *Account) GetId() string
- func (obj *Account) JSONBytes() ([]byte, error)
- func (obj *Account) JSONString() (string, error)
- func (self *Account) JoinFields(remainingRecursions string, q *Query, recursionCount int) (err error)
- func (obj *Account) NewId()
- func (obj *Account) ParseInterface(x interface{}) (err error)
- func (self *Account) Reflect() []Field
- func (self *Account) Save() error
- func (self *Account) SaveWithTran(t *Transaction) error
- func (self *Account) Unmarshal(data []byte) error
- func (self *Account) ValidateAndClean() error
- type AccountHistoryRecord
- func (obj *AccountHistoryRecord) BSONBytes() (in []byte, err error)
- func (obj *AccountHistoryRecord) BSONString() (string, error)
- func (self *AccountHistoryRecord) Delete() error
- func (obj *AccountHistoryRecord) DoesIdExist(objectID interface{}) bool
- func (self *AccountHistoryRecord) GetData() string
- func (self *AccountHistoryRecord) GetId() string
- func (self *AccountHistoryRecord) GetType() int
- func (obj *AccountHistoryRecord) JSONBytes() ([]byte, error)
- func (obj *AccountHistoryRecord) JSONString() (string, error)
- func (self *AccountHistoryRecord) JoinFields(s string, q *Query, x int) error
- func (obj *AccountHistoryRecord) Reflect() []Field
- func (self *AccountHistoryRecord) Save() error
- func (self *AccountHistoryRecord) SaveWithTran(t *Transaction) error
- func (self *AccountHistoryRecord) Unmarshal(data []byte) error
- type AccountJoinItems
- type AccountsSecondaryPhoneInfo
- type BootstrapMeta
- type Building
- func (obj *Building) BSONBytes() (in []byte, err error)
- func (obj *Building) BSONString() (string, error)
- func (self *Building) CreateWithTran(t *Transaction, forceCreate bool) error
- func (self *Building) Delete() error
- func (self *Building) DeleteWithTran(t *Transaction) error
- func (obj *Building) DoesIdExist(objectID interface{}) bool
- func (self *Building) ForceCreateWithTran(t *Transaction) error
- func (self *Building) GetId() string
- func (obj *Building) JSONBytes() ([]byte, error)
- func (obj *Building) JSONString() (string, error)
- func (self *Building) JoinFields(remainingRecursions string, q *Query, recursionCount int) (err error)
- func (obj *Building) NewId()
- func (obj *Building) ParseInterface(x interface{}) (err error)
- func (self *Building) Reflect() []Field
- func (self *Building) Save() error
- func (self *Building) SaveWithTran(t *Transaction) error
- func (self *Building) Unmarshal(data []byte) error
- func (self *Building) ValidateAndClean() error
- type BuildingHistoryRecord
- func (obj *BuildingHistoryRecord) BSONBytes() (in []byte, err error)
- func (obj *BuildingHistoryRecord) BSONString() (string, error)
- func (self *BuildingHistoryRecord) Delete() error
- func (obj *BuildingHistoryRecord) DoesIdExist(objectID interface{}) bool
- func (self *BuildingHistoryRecord) GetData() string
- func (self *BuildingHistoryRecord) GetId() string
- func (self *BuildingHistoryRecord) GetType() int
- func (obj *BuildingHistoryRecord) JSONBytes() ([]byte, error)
- func (obj *BuildingHistoryRecord) JSONString() (string, error)
- func (self *BuildingHistoryRecord) JoinFields(s string, q *Query, x int) error
- func (obj *BuildingHistoryRecord) Reflect() []Field
- func (self *BuildingHistoryRecord) Save() error
- func (self *BuildingHistoryRecord) SaveWithTran(t *Transaction) error
- func (self *BuildingHistoryRecord) Unmarshal(data []byte) error
- type BuildingJoinItems
- type Country
- func (obj *Country) BSONBytes() (in []byte, err error)
- func (obj *Country) BSONString() (string, error)
- func (self *Country) CreateWithTran(t *Transaction, forceCreate bool) error
- func (self *Country) Delete() error
- func (self *Country) DeleteWithTran(t *Transaction) error
- func (obj *Country) DoesIdExist(objectID interface{}) bool
- func (self *Country) ForceCreateWithTran(t *Transaction) error
- func (self *Country) GetId() string
- func (obj *Country) JSONBytes() ([]byte, error)
- func (obj *Country) JSONString() (string, error)
- func (self *Country) JoinFields(remainingRecursions string, q *Query, recursionCount int) (err error)
- func (obj *Country) NewId()
- func (obj *Country) ParseInterface(x interface{}) (err error)
- func (self *Country) Reflect() []Field
- func (self *Country) Save() error
- func (self *Country) SaveWithTran(t *Transaction) error
- func (self *Country) Unmarshal(data []byte) error
- func (self *Country) ValidateAndClean() error
- type CountryHistoryRecord
- func (obj *CountryHistoryRecord) BSONBytes() (in []byte, err error)
- func (obj *CountryHistoryRecord) BSONString() (string, error)
- func (self *CountryHistoryRecord) Delete() error
- func (obj *CountryHistoryRecord) DoesIdExist(objectID interface{}) bool
- func (self *CountryHistoryRecord) GetData() string
- func (self *CountryHistoryRecord) GetId() string
- func (self *CountryHistoryRecord) GetType() int
- func (obj *CountryHistoryRecord) JSONBytes() ([]byte, error)
- func (obj *CountryHistoryRecord) JSONString() (string, error)
- func (self *CountryHistoryRecord) JoinFields(s string, q *Query, x int) error
- func (obj *CountryHistoryRecord) Reflect() []Field
- func (self *CountryHistoryRecord) Save() error
- func (self *CountryHistoryRecord) SaveWithTran(t *Transaction) error
- func (self *CountryHistoryRecord) Unmarshal(data []byte) error
- type CountryJoinItems
- type DataFormat
- type Field
- type FileObject
- func (obj *FileObject) BSONBytes() (in []byte, err error)
- func (obj *FileObject) BSONString() (string, error)
- func (self *FileObject) CreateWithTran(t *Transaction, forceCreate bool) error
- func (self *FileObject) Delete() error
- func (self *FileObject) DeleteWithTran(t *Transaction) error
- func (obj *FileObject) DoesIdExist(objectID interface{}) bool
- func (self *FileObject) ForceCreateWithTran(t *Transaction) error
- func (self *FileObject) GetId() string
- func (obj *FileObject) JSONBytes() ([]byte, error)
- func (obj *FileObject) JSONString() (string, error)
- func (self *FileObject) JoinFields(remainingRecursions string, q *Query, recursionCount int) (err error)
- func (obj *FileObject) NewId()
- func (obj *FileObject) ParseInterface(x interface{}) (err error)
- func (self *FileObject) Reflect() []Field
- func (self *FileObject) Save() error
- func (self *FileObject) SaveWithTran(t *Transaction) error
- func (self *FileObject) Unmarshal(data []byte) error
- func (self *FileObject) ValidateAndClean() error
- type FileObjectHistoryRecord
- func (obj *FileObjectHistoryRecord) BSONBytes() (in []byte, err error)
- func (obj *FileObjectHistoryRecord) BSONString() (string, error)
- func (self *FileObjectHistoryRecord) Delete() error
- func (obj *FileObjectHistoryRecord) DoesIdExist(objectID interface{}) bool
- func (self *FileObjectHistoryRecord) GetData() string
- func (self *FileObjectHistoryRecord) GetId() string
- func (self *FileObjectHistoryRecord) GetType() int
- func (obj *FileObjectHistoryRecord) JSONBytes() ([]byte, error)
- func (obj *FileObjectHistoryRecord) JSONString() (string, error)
- func (self *FileObjectHistoryRecord) JoinFields(s string, q *Query, x int) error
- func (obj *FileObjectHistoryRecord) Reflect() []Field
- func (self *FileObjectHistoryRecord) Save() error
- func (self *FileObjectHistoryRecord) SaveWithTran(t *Transaction) error
- func (self *FileObjectHistoryRecord) Unmarshal(data []byte) error
- type FileObjectJoinItems
- type Floor
- func (obj *Floor) BSONBytes() (in []byte, err error)
- func (obj *Floor) BSONString() (string, error)
- func (self *Floor) CreateWithTran(t *Transaction, forceCreate bool) error
- func (self *Floor) Delete() error
- func (self *Floor) DeleteWithTran(t *Transaction) error
- func (obj *Floor) DoesIdExist(objectID interface{}) bool
- func (self *Floor) ForceCreateWithTran(t *Transaction) error
- func (self *Floor) GetId() string
- func (obj *Floor) JSONBytes() ([]byte, error)
- func (obj *Floor) JSONString() (string, error)
- func (self *Floor) JoinFields(remainingRecursions string, q *Query, recursionCount int) (err error)
- func (obj *Floor) NewId()
- func (obj *Floor) ParseInterface(x interface{}) (err error)
- func (self *Floor) Reflect() []Field
- func (self *Floor) Save() error
- func (self *Floor) SaveWithTran(t *Transaction) error
- func (self *Floor) Unmarshal(data []byte) error
- func (self *Floor) ValidateAndClean() error
- type FloorHistoryRecord
- func (obj *FloorHistoryRecord) BSONBytes() (in []byte, err error)
- func (obj *FloorHistoryRecord) BSONString() (string, error)
- func (self *FloorHistoryRecord) Delete() error
- func (obj *FloorHistoryRecord) DoesIdExist(objectID interface{}) bool
- func (self *FloorHistoryRecord) GetData() string
- func (self *FloorHistoryRecord) GetId() string
- func (self *FloorHistoryRecord) GetType() int
- func (obj *FloorHistoryRecord) JSONBytes() ([]byte, error)
- func (obj *FloorHistoryRecord) JSONString() (string, error)
- func (self *FloorHistoryRecord) JoinFields(s string, q *Query, x int) error
- func (obj *FloorHistoryRecord) Reflect() []Field
- func (self *FloorHistoryRecord) Save() error
- func (self *FloorHistoryRecord) SaveWithTran(t *Transaction) error
- func (self *FloorHistoryRecord) Unmarshal(data []byte) error
- type FloorJoinItems
- type Locale
- type Max
- type Min
- type Query
- func (self *Query) AddAnd() *Query
- func (self *Query) AddAndOr() *Query
- func (self *Query) AddBlankAndOr() *Query
- func (self *Query) All(x interface{}) error
- func (self *Query) AndExclude(index int, criteria map[string]interface{}) *Query
- func (self *Query) AndFilter(index int, criteria map[string]interface{}) *Query
- func (self *Query) AndGreaterThan(index int, criteria map[string]Max) *Query
- func (self *Query) AndGreaterThanEqualTo(index int, criteria map[string]Max) *Query
- func (self *Query) AndIn(index int, criteria map[string]interface{}) *Query
- func (self *Query) AndLessThan(index int, criteria map[string]Min) *Query
- func (self *Query) AndLessThanEqualTo(index int, criteria map[string]Min) *Query
- func (self *Query) AndRange(index int, criteria map[string]Range) *Query
- func (self *Query) Blacklist(collection string, fields []string) *Query
- func (self *Query) ById(objectId interface{}, modelInstance interface{}) error
- func (self *Query) CheckForObjectId(val interface{}) interface{}
- func (self *Query) Count(x interface{}) (int, error)
- func (self *Query) Distinct(key string, x interface{}) error
- func (self *Query) Exclude(criteria map[string]interface{}) *Query
- func (self *Query) Exists(criteria map[string]interface{}) *Query
- func (self *Query) Filter(criteria map[string]interface{}) *Query
- func (self *Query) GenerateQuery() *mgo.Query
- func (self *Query) GetAndOr() map[string][]map[string][]bson.M
- func (self *Query) GetCollection() *mgo.Collection
- func (self *Query) GetOrCreate(x interface{}, t *Transaction) (err error)
- func (self *Query) GreaterThan(criteria map[string]Max) *Query
- func (self *Query) GreaterThanEqualTo(criteria map[string]Max) *Query
- func (self *Query) In(criteria map[string]interface{}) *Query
- func (self *Query) InitAndOr() *Query
- func (self *Query) Iter() (qi *QueryIterator)
- func (self *Query) Join(criteria string) *Query
- func (self *Query) LeftJoin(criteria string) *Query
- func (self *Query) LessThan(criteria map[string]Min) *Query
- func (self *Query) LessThanEqualTo(criteria map[string]Min) *Query
- func (self *Query) Limit(val int) *Query
- func (self *Query) LogQuery(functionName string)
- func (self *Query) NotExists(criteria map[string]interface{}) *Query
- func (self *Query) One(x interface{}) error
- func (self *Query) Or(criteria map[string]interface{}) *Query
- func (self *Query) OrExclude(index int, criteria map[string]interface{}) *Query
- func (self *Query) OrFilter(index int, criteria map[string]interface{}) *Query
- func (self *Query) OrGreaterThan(index int, criteria map[string]Max) *Query
- func (self *Query) OrGreaterThanEqualTo(index int, criteria map[string]Max) *Query
- func (self *Query) OrIn(index int, criteria map[string]interface{}) *Query
- func (self *Query) OrLessThan(index int, criteria map[string]Min) *Query
- func (self *Query) OrLessThanEqualTo(index int, criteria map[string]Min) *Query
- func (self *Query) OrRange(index int, criteria map[string]Range) *Query
- func (self *Query) Range(criteria map[string]Range) *Query
- func (self *Query) RenderViews(format DataFormat) *Query
- func (self *Query) Skip(val int) *Query
- func (self *Query) Sort(fields ...string) *Query
- func (self *Query) ToggleLogFlag(toggle bool) *Query
- func (self *Query) TotalRows() int
- func (self *Query) Where(field string, val interface{}) *Query
- func (self *Query) Whitelist(collection string, fields []string) *Query
- type QueryFieldFilter
- type QueryIterator
- type Range
- type Site
- func (obj *Site) BSONBytes() (in []byte, err error)
- func (obj *Site) BSONString() (string, error)
- func (self *Site) CreateWithTran(t *Transaction, forceCreate bool) error
- func (self *Site) Delete() error
- func (self *Site) DeleteWithTran(t *Transaction) error
- func (obj *Site) DoesIdExist(objectID interface{}) bool
- func (self *Site) ForceCreateWithTran(t *Transaction) error
- func (self *Site) GetId() string
- func (obj *Site) JSONBytes() ([]byte, error)
- func (obj *Site) JSONString() (string, error)
- func (self *Site) JoinFields(remainingRecursions string, q *Query, recursionCount int) (err error)
- func (obj *Site) NewId()
- func (obj *Site) ParseInterface(x interface{}) (err error)
- func (self *Site) Reflect() []Field
- func (self *Site) Save() error
- func (self *Site) SaveWithTran(t *Transaction) error
- func (self *Site) Unmarshal(data []byte) error
- func (self *Site) ValidateAndClean() error
- type SiteHistoryRecord
- func (obj *SiteHistoryRecord) BSONBytes() (in []byte, err error)
- func (obj *SiteHistoryRecord) BSONString() (string, error)
- func (self *SiteHistoryRecord) Delete() error
- func (obj *SiteHistoryRecord) DoesIdExist(objectID interface{}) bool
- func (self *SiteHistoryRecord) GetData() string
- func (self *SiteHistoryRecord) GetId() string
- func (self *SiteHistoryRecord) GetType() int
- func (obj *SiteHistoryRecord) JSONBytes() ([]byte, error)
- func (obj *SiteHistoryRecord) JSONString() (string, error)
- func (self *SiteHistoryRecord) JoinFields(s string, q *Query, x int) error
- func (obj *SiteHistoryRecord) Reflect() []Field
- func (self *SiteHistoryRecord) Save() error
- func (self *SiteHistoryRecord) SaveWithTran(t *Transaction) error
- func (self *SiteHistoryRecord) Unmarshal(data []byte) error
- type SiteJoinItems
- type Timezone
- type Transaction
- func (obj *Transaction) BSONBytes() (in []byte, err error)
- func (obj *Transaction) BSONString() (string, error)
- func (self *Transaction) Begin() error
- func (self *Transaction) Commit() error
- func (self *Transaction) Delete() error
- func (obj *Transaction) JSONBytes() ([]byte, error)
- func (obj *Transaction) JSONString() (string, error)
- func (self *Transaction) Resume() error
- func (self *Transaction) Rollback(userId string, reason string) error
- func (self *Transaction) RollbackTransaction() error
- func (self *Transaction) Save() error
- type User
- func (obj *User) BSONBytes() (in []byte, err error)
- func (obj *User) BSONString() (string, error)
- func (self *User) CreateWithTran(t *Transaction, forceCreate bool) error
- func (self *User) Delete() error
- func (self *User) DeleteWithTran(t *Transaction) error
- func (obj *User) DoesIdExist(objectID interface{}) bool
- func (self *User) ForceCreateWithTran(t *Transaction) error
- func (self *User) GetId() string
- func (obj *User) JSONBytes() ([]byte, error)
- func (obj *User) JSONString() (string, error)
- func (self *User) JoinFields(remainingRecursions string, q *Query, recursionCount int) (err error)
- func (obj *User) NewId()
- func (obj *User) ParseInterface(x interface{}) (err error)
- func (self *User) Reflect() []Field
- func (self *User) Save() error
- func (self *User) SaveWithTran(t *Transaction) error
- func (self *User) Unmarshal(data []byte) error
- func (self *User) ValidateAndClean() error
- type UserHistoryRecord
- func (obj *UserHistoryRecord) BSONBytes() (in []byte, err error)
- func (obj *UserHistoryRecord) BSONString() (string, error)
- func (self *UserHistoryRecord) Delete() error
- func (obj *UserHistoryRecord) DoesIdExist(objectID interface{}) bool
- func (self *UserHistoryRecord) GetData() string
- func (self *UserHistoryRecord) GetId() string
- func (self *UserHistoryRecord) GetType() int
- func (obj *UserHistoryRecord) JSONBytes() ([]byte, error)
- func (obj *UserHistoryRecord) JSONString() (string, error)
- func (self *UserHistoryRecord) JoinFields(s string, q *Query, x int) error
- func (obj *UserHistoryRecord) Reflect() []Field
- func (self *UserHistoryRecord) Save() error
- func (self *UserHistoryRecord) SaveWithTran(t *Transaction) error
- func (self *UserHistoryRecord) Unmarshal(data []byte) error
- type UserJoinItems
Constants ¶
const ( TRANSACTION_DATATYPE_ORIGINAL = 1 TRANSACTION_DATATYPE_NEW = 2 TRANSACTION_CHANGETYPE_INSERT = 1 TRANSACTION_CHANGETYPE_UPDATE = 2 TRANSACTION_CHANGETYPE_DELETE = 3 MGO_RECORD_NOT_FOUND = "not found" VALIDATION_ERROR = "ValidationError" VALIDATION_ERROR_REQUIRED = "ValidationErrorRequiredFieldMissing" VALIDATION_ERROR_EMAIL = "ValidationErrorInvalidEmail" VALIDATION_ERROR_SPECIFIC_REQUIRED = "ValidationFieldSpecificRequired" VALIDATION_ERROR_SPECIFIC_EMAIL = "ValidationFieldSpecificEmailRequired" )
const ( FIELD_COUNTRY_ID = "Id" FIELD_COUNTRY_ISO = "Iso" FIELD_COUNTRY_NAME = "Name" FIELD_FILEOBJECT_ID = "Id" FIELD_FILEOBJECT_NAME = "Name" FIELD_FILEOBJECT_PATH = "Path" FIELD_FILEOBJECT_CONTENT = "Content" FIELD_BUILDING_ID = "Id" FIELD_BUILDING_NAME = "Name" FIELD_BUILDING_IMAGECUSTOM = "ImageCustom" FIELD_BUILDING_IMAGEFILENAME = "ImageFileName" FIELD_BUILDING_SITEID = "SiteId" FIELD_BUILDING_ACCOUNTID = "AccountId" FIELD_FLOOR_ID = "Id" FIELD_FLOOR_NAME = "Name" FIELD_FLOOR_SITEID = "SiteId" FIELD_FLOOR_BUILDINGID = "BuildingId" FIELD_FLOOR_ACCOUNTID = "AccountId" FIELD_SITE_ID = "Id" FIELD_SITE_NAME = "Name" FIELD_SITE_IMAGECUSTOM = "ImageCustom" FIELD_SITE_ACCOUNTID = "AccountId" FIELD_SITE_COUNTRYID = "CountryId" FIELD_USER_ID = "Id" FIELD_USER_FIRST = "First" FIELD_USER_LAST = "Last" FIELD_USER_SIGNUPDATE = "SignupDate" FIELD_USER_EMAIL = "Email" FIELD_ACCOUNT_ID = "Id" FIELD_ACCOUNT_ACCOUNTNAME = "AccountName" FIELD_ACCOUNT_SECONDARYPHONE = "SecondaryPhone" FIELD_SECONDARYPHONEINFO_VALUE = "Value" FIELD_SECONDARYPHONEINFO_NUMERIC = "Numeric" FIELD_SECONDARYPHONEINFO_DIALCODE = "DialCode" FIELD_SECONDARYPHONEINFO_COUNTRYISO = "CountryISO" )
const ( ERROR_INVALID_ID_VALUE = "Invalid Id value for query." JOIN_ALL = "All" )
Variables ¶
var Accounts modelAccounts
var AccountsHistory modelAccountsHistory
var AllowWrites bool
var Buildings modelBuildings
var BuildingsHistory modelBuildingsHistory
var Countries modelCountries
var CountriesHistory modelCountriesHistory
var FileObjects modelFileObjects
var FileObjectsHistory modelFileObjectsHistory
var Floors modelFloors
var FloorsHistory modelFloorsHistory
var GoCoreAccountsHasBootStrapped atomicTypes.AtomicBool
var GoCoreBuildingsHasBootStrapped atomicTypes.AtomicBool
var GoCoreCountriesHasBootStrapped atomicTypes.AtomicBool
var GoCoreFileObjectsHasBootStrapped atomicTypes.AtomicBool
var GoCoreFloorsHasBootStrapped atomicTypes.AtomicBool
var GoCoreSitesHasBootStrapped atomicTypes.AtomicBool
var GoCoreUsersHasBootStrapped atomicTypes.AtomicBool
var Locales = []Locale{
{"Arabic", "ar"},
{"Chinese", "zh"},
{"Croatian", "hr"},
{"Czech", "cs"},
{"Danish", "da"},
{"Dutch", "nl"},
{"English", "en"},
{"Finnish", "fi"},
{"French", "fr"},
{"German", "de"},
{"Greek", "el"},
{"Hebrew", "he"},
{"Hindi", "hi"},
{"Hungarian", "hu"},
{"Indonesian", "id"},
{"Italian", "it"},
{"Japanese", "ja"},
{"Korean", "ko"},
{"Norwegian", "no"},
{"Polish", "pl"},
{"Portuguese", "pt"},
{"Romanian", "ro"},
{"Russian", "ru"},
{"Turkish", "tr"},
{"Thai", "th"},
{"Spanish", "es"},
{"Swedish", "sv"},
{"Debug", "dev"},
}
var Sites modelSites
var SitesHistory modelSitesHistory
var TimeZoneLocations = []Timezone{}/* 584 elements not displayed */
Locations is a list of all IANA timezone locations and country codes.
var Transactions modelTransactions
var Users modelUsers
var UsersHistory modelUsersHistory
Functions ¶
func BootstrapDirectory ¶
func BootstrapMongoDump ¶
func GetCollectionHistoryNames ¶
func GetCollectionHistoryNames() (names []string)
func GetCollectionNames ¶
func GetCollectionNames() (names []string)
func GetDefaultLocale ¶
func IsValidationError ¶
func IsZeroOfUnderlyingType ¶
func IsZeroOfUnderlyingType(x interface{}) bool
func JoinEntity ¶
func MaxQ ¶
MaxQ is a helper function to pass to things like Filter to filter a field value and a max value
func MinQ ¶
MinQ is a helper function to pass to things like Filter to filter a field value and min value
func NewObjectId ¶
func NewObjectId() string
func QTs ¶
QTs is a helper function to pass to things like Filter to filter a field value and a time.Time
func RangeQ ¶
RangeQ is a helper function to pass to things like Filter to filter a field value and key
func ResolveCollection ¶
func ResolveEntity ¶
func ResolveEntity(key string) modelEntity
func ResolveField ¶
func ResolveHistoryCollection ¶
func ResolveHistoryCollection(key string) modelCollection
func TimeZoneOffset ¶
TimeZoneOffset returns the abbreviated name of the zone of l (such as "CET") and its offset in seconds east of UTC. The location should be valid IANA timezone location.
func TimeZoneValidLocation ¶
TimeZoneValidLocation returns true if the given string can be found as a timezone location in the timezone.Locations array.
func UpdateAllRecordsToLatestSchema ¶
func UpdateAllRecordsToLatestSchema()
Types ¶
type Account ¶
type Account struct { Id bson.ObjectId `json:"Id" bson:"_id,omitempty"` AccountName string `json:"AccountName" bson:"AccountName" validate:"true,,,,,,"` SecondaryPhone AccountsSecondaryPhoneInfo `json:"SecondaryPhone" bson:"SecondaryPhone"` CreateDate time.Time `json:"CreateDate" bson:"CreateDate"` UpdateDate time.Time `json:"UpdateDate" bson:"UpdateDate"` LastUpdateId string `json:"LastUpdateId" bson:"LastUpdateId"` BootstrapMeta *BootstrapMeta `json:"BootstrapMeta" bson:"-"` Errors struct { Id string `json:"Id"` AccountName string `json:"AccountName"` SecondaryPhone struct { Value string `json:"Value"` Numeric string `json:"Numeric"` DialCode string `json:"DialCode"` CountryISO string `json:"CountryISO"` } `json:"SecondaryPhone"` } `json:"Errors" bson:"-"` Views struct { UpdateDate string `json:"UpdateDate" ref:"UpdateDate~DateTime"` UpdateFromNow string `json:"UpdateFromNow" ref:"UpdateDate~TimeFromNow"` } `json:"Views" bson:"-"` Joins struct { LastUpdateUser *User `json:"LastUpdateUser,omitempty" join:"Users,User,LastUpdateId,false,"` } `json:"Joins" bson:"-"` }
func (*Account) BSONString ¶
func (*Account) CreateWithTran ¶
func (self *Account) CreateWithTran(t *Transaction, forceCreate bool) error
func (*Account) DeleteWithTran ¶
func (self *Account) DeleteWithTran(t *Transaction) error
func (*Account) DoesIdExist ¶
func (*Account) ForceCreateWithTran ¶
func (self *Account) ForceCreateWithTran(t *Transaction) error
func (*Account) JSONString ¶
func (*Account) JoinFields ¶
func (*Account) ParseInterface ¶
func (*Account) SaveWithTran ¶
func (self *Account) SaveWithTran(t *Transaction) error
func (*Account) ValidateAndClean ¶
type AccountHistoryRecord ¶
type AccountHistoryRecord struct { Id bson.ObjectId `json:"id" bson:"_id,omitempty"` TId string `json:"tId" dbIndex:"index" bson:"tId"` ObjId string `json:"objId" dbIndex:"index" bson:"objId"` Data string `json:"data" bson:"data"` Type int `json:"type" bson:"type"` CreateDate time.Time `json:"createDate" dbIndex:"index" bson:"createDate"` }
func (*AccountHistoryRecord) BSONBytes ¶
func (obj *AccountHistoryRecord) BSONBytes() (in []byte, err error)
func (*AccountHistoryRecord) BSONString ¶
func (obj *AccountHistoryRecord) BSONString() (string, error)
func (*AccountHistoryRecord) Delete ¶
func (self *AccountHistoryRecord) Delete() error
func (*AccountHistoryRecord) DoesIdExist ¶
func (obj *AccountHistoryRecord) DoesIdExist(objectID interface{}) bool
func (*AccountHistoryRecord) GetData ¶
func (self *AccountHistoryRecord) GetData() string
func (*AccountHistoryRecord) GetId ¶
func (self *AccountHistoryRecord) GetId() string
func (*AccountHistoryRecord) GetType ¶
func (self *AccountHistoryRecord) GetType() int
func (*AccountHistoryRecord) JSONBytes ¶
func (obj *AccountHistoryRecord) JSONBytes() ([]byte, error)
func (*AccountHistoryRecord) JSONString ¶
func (obj *AccountHistoryRecord) JSONString() (string, error)
func (*AccountHistoryRecord) JoinFields ¶
func (self *AccountHistoryRecord) JoinFields(s string, q *Query, x int) error
func (*AccountHistoryRecord) Reflect ¶
func (obj *AccountHistoryRecord) Reflect() []Field
func (*AccountHistoryRecord) Save ¶
func (self *AccountHistoryRecord) Save() error
func (*AccountHistoryRecord) SaveWithTran ¶
func (self *AccountHistoryRecord) SaveWithTran(t *Transaction) error
func (*AccountHistoryRecord) Unmarshal ¶
func (self *AccountHistoryRecord) Unmarshal(data []byte) error
type AccountJoinItems ¶
type BootstrapMeta ¶
type BootstrapMeta struct { // Version is the version that you specifically want to bootstrap only to Version int `json:"Version" bson:"Version"` // Domain would be used to bootstrap only a specific domain Domain string `json:"Domain" bson:"Domain"` // ReleaseMode would be used to bootstrap only a specific release mode such as debug records ReleaseMode string `json:"ReleaseMode" bson:"ReleaseMode"` // ProductName would be used to bootstrap only a specific product name ProductName string `json:"ProductName" bson:"ProductName"` // Domains would be used to bootstrap only many domains Domains []string `json:"Domains" bson:"Domains"` // ProductNames would be used to bootstrap many product name ProductNames []string `json:"ProductNames" bson:"ProductNames"` // DeleteRow, if true, will delete the row from the bootstrap table after it is previousl bootstrapped DeleteRow bool `json:"DeleteRow" bson:"DeleteRow"` // AlwaysUpdate, if true, will always update the row from the bootstrap table after it is previously bootstrapped AlwaysUpdate bool `json:"AlwaysUpdate" bson:"AlwaysUpdate"` }
BootstrapMeta is a struct that is used to tell the bootstrap how or what you want to bootstrap
type Building ¶
type Building struct { Id bson.ObjectId `json:"Id" bson:"_id,omitempty"` Name string `json:"Name" bson:"Name" validate:"true,,,,,,"` ImageCustom string `json:"ImageCustom" bson:"ImageCustom"` ImageFileName string `json:"ImageFileName" bson:"ImageFileName"` SiteId string `json:"SiteId" dbIndex:"index" bson:"SiteId" validate:"true,,,,,,"` AccountId string `json:"AccountId" dbIndex:"index" bson:"AccountId" validate:"true,,,,,,"` CreateDate time.Time `json:"CreateDate" bson:"CreateDate"` UpdateDate time.Time `json:"UpdateDate" bson:"UpdateDate"` LastUpdateId string `json:"LastUpdateId" bson:"LastUpdateId"` BootstrapMeta *BootstrapMeta `json:"BootstrapMeta" bson:"-"` Errors struct { Id string `json:"Id"` Name string `json:"Name"` ImageCustom string `json:"ImageCustom"` ImageFileName string `json:"ImageFileName"` SiteId string `json:"SiteId"` AccountId string `json:"AccountId"` } `json:"Errors" bson:"-"` Views struct { UpdateDate string `json:"UpdateDate" ref:"UpdateDate~DateTime"` UpdateFromNow string `json:"UpdateFromNow" ref:"UpdateDate~TimeFromNow"` } `json:"Views" bson:"-"` Joins struct { FileObjects *FileObject `json:"FileObjects,omitempty" join:"FileObjects,FileObject,ImageCustom,false,"` Floors *FloorJoinItems `json:"Floors,omitempty" join:"Floors,Floor,Id,true,BuildingId"` Site *Site `json:"Site,omitempty" join:"Sites,Site,SiteId,false,"` Account *Account `json:"Account,omitempty" join:"Accounts,Account,AccountId,false,"` LastUpdateUser *User `json:"LastUpdateUser,omitempty" join:"Users,User,LastUpdateId,false,"` } `json:"Joins" bson:"-"` }
func (*Building) BSONString ¶
func (*Building) CreateWithTran ¶
func (self *Building) CreateWithTran(t *Transaction, forceCreate bool) error
func (*Building) DeleteWithTran ¶
func (self *Building) DeleteWithTran(t *Transaction) error
func (*Building) DoesIdExist ¶
func (*Building) ForceCreateWithTran ¶
func (self *Building) ForceCreateWithTran(t *Transaction) error
func (*Building) JSONString ¶
func (*Building) JoinFields ¶
func (*Building) ParseInterface ¶
func (*Building) SaveWithTran ¶
func (self *Building) SaveWithTran(t *Transaction) error
func (*Building) ValidateAndClean ¶
type BuildingHistoryRecord ¶
type BuildingHistoryRecord struct { Id bson.ObjectId `json:"id" bson:"_id,omitempty"` TId string `json:"tId" dbIndex:"index" bson:"tId"` ObjId string `json:"objId" dbIndex:"index" bson:"objId"` Data string `json:"data" bson:"data"` Type int `json:"type" bson:"type"` CreateDate time.Time `json:"createDate" dbIndex:"index" bson:"createDate"` }
func (*BuildingHistoryRecord) BSONBytes ¶
func (obj *BuildingHistoryRecord) BSONBytes() (in []byte, err error)
func (*BuildingHistoryRecord) BSONString ¶
func (obj *BuildingHistoryRecord) BSONString() (string, error)
func (*BuildingHistoryRecord) Delete ¶
func (self *BuildingHistoryRecord) Delete() error
func (*BuildingHistoryRecord) DoesIdExist ¶
func (obj *BuildingHistoryRecord) DoesIdExist(objectID interface{}) bool
func (*BuildingHistoryRecord) GetData ¶
func (self *BuildingHistoryRecord) GetData() string
func (*BuildingHistoryRecord) GetId ¶
func (self *BuildingHistoryRecord) GetId() string
func (*BuildingHistoryRecord) GetType ¶
func (self *BuildingHistoryRecord) GetType() int
func (*BuildingHistoryRecord) JSONBytes ¶
func (obj *BuildingHistoryRecord) JSONBytes() ([]byte, error)
func (*BuildingHistoryRecord) JSONString ¶
func (obj *BuildingHistoryRecord) JSONString() (string, error)
func (*BuildingHistoryRecord) JoinFields ¶
func (self *BuildingHistoryRecord) JoinFields(s string, q *Query, x int) error
func (*BuildingHistoryRecord) Reflect ¶
func (obj *BuildingHistoryRecord) Reflect() []Field
func (*BuildingHistoryRecord) Save ¶
func (self *BuildingHistoryRecord) Save() error
func (*BuildingHistoryRecord) SaveWithTran ¶
func (self *BuildingHistoryRecord) SaveWithTran(t *Transaction) error
func (*BuildingHistoryRecord) Unmarshal ¶
func (self *BuildingHistoryRecord) Unmarshal(data []byte) error
type BuildingJoinItems ¶
type Country ¶
type Country struct { Id bson.ObjectId `json:"Id" bson:"_id,omitempty"` Iso string `json:"Iso" bson:"Iso"` Name string `json:"Name" bson:"Name"` CreateDate time.Time `json:"CreateDate" bson:"CreateDate"` UpdateDate time.Time `json:"UpdateDate" bson:"UpdateDate"` LastUpdateId string `json:"LastUpdateId" bson:"LastUpdateId"` BootstrapMeta *BootstrapMeta `json:"BootstrapMeta" bson:"-"` Errors struct { Id string `json:"Id"` Iso string `json:"Iso"` Name string `json:"Name"` } `json:"Errors" bson:"-"` }
func (*Country) BSONString ¶
func (*Country) CreateWithTran ¶
func (self *Country) CreateWithTran(t *Transaction, forceCreate bool) error
func (*Country) DeleteWithTran ¶
func (self *Country) DeleteWithTran(t *Transaction) error
func (*Country) DoesIdExist ¶
func (*Country) ForceCreateWithTran ¶
func (self *Country) ForceCreateWithTran(t *Transaction) error
func (*Country) JSONString ¶
func (*Country) JoinFields ¶
func (*Country) ParseInterface ¶
func (*Country) SaveWithTran ¶
func (self *Country) SaveWithTran(t *Transaction) error
func (*Country) ValidateAndClean ¶
type CountryHistoryRecord ¶
type CountryHistoryRecord struct { Id bson.ObjectId `json:"id" bson:"_id,omitempty"` TId string `json:"tId" dbIndex:"index" bson:"tId"` ObjId string `json:"objId" dbIndex:"index" bson:"objId"` Data string `json:"data" bson:"data"` Type int `json:"type" bson:"type"` CreateDate time.Time `json:"createDate" dbIndex:"index" bson:"createDate"` }
func (*CountryHistoryRecord) BSONBytes ¶
func (obj *CountryHistoryRecord) BSONBytes() (in []byte, err error)
func (*CountryHistoryRecord) BSONString ¶
func (obj *CountryHistoryRecord) BSONString() (string, error)
func (*CountryHistoryRecord) Delete ¶
func (self *CountryHistoryRecord) Delete() error
func (*CountryHistoryRecord) DoesIdExist ¶
func (obj *CountryHistoryRecord) DoesIdExist(objectID interface{}) bool
func (*CountryHistoryRecord) GetData ¶
func (self *CountryHistoryRecord) GetData() string
func (*CountryHistoryRecord) GetId ¶
func (self *CountryHistoryRecord) GetId() string
func (*CountryHistoryRecord) GetType ¶
func (self *CountryHistoryRecord) GetType() int
func (*CountryHistoryRecord) JSONBytes ¶
func (obj *CountryHistoryRecord) JSONBytes() ([]byte, error)
func (*CountryHistoryRecord) JSONString ¶
func (obj *CountryHistoryRecord) JSONString() (string, error)
func (*CountryHistoryRecord) JoinFields ¶
func (self *CountryHistoryRecord) JoinFields(s string, q *Query, x int) error
func (*CountryHistoryRecord) Reflect ¶
func (obj *CountryHistoryRecord) Reflect() []Field
func (*CountryHistoryRecord) Save ¶
func (self *CountryHistoryRecord) Save() error
func (*CountryHistoryRecord) SaveWithTran ¶
func (self *CountryHistoryRecord) SaveWithTran(t *Transaction) error
func (*CountryHistoryRecord) Unmarshal ¶
func (self *CountryHistoryRecord) Unmarshal(data []byte) error
type CountryJoinItems ¶
type DataFormat ¶
type DataFormat struct { Language string `json:"Language"` DateFormat string `json:"DateFormat"` LocalTimeZone string `json:"LocalTimeZone"` }
func (*DataFormat) JSONString ¶
func (obj *DataFormat) JSONString() (string, error)
func (*DataFormat) Parse ¶
func (self *DataFormat) Parse(data string) (err error)
type Field ¶
type Field struct { Name string Label string DataType string IsView bool Validation *dbServices.FieldValidation }
type FileObject ¶
type FileObject struct { Id bson.ObjectId `json:"Id" bson:"_id,omitempty"` Name string `json:"Name" bson:"Name"` Path string `json:"Path" bson:"Path"` Content string `json:"Content" bson:"Content"` CreateDate time.Time `json:"CreateDate" bson:"CreateDate"` UpdateDate time.Time `json:"UpdateDate" bson:"UpdateDate"` LastUpdateId string `json:"LastUpdateId" bson:"LastUpdateId"` BootstrapMeta *BootstrapMeta `json:"BootstrapMeta" bson:"-"` Errors struct { Id string `json:"Id"` Name string `json:"Name"` Path string `json:"Path"` Content string `json:"Content"` } `json:"Errors" bson:"-"` }
func (*FileObject) BSONBytes ¶
func (obj *FileObject) BSONBytes() (in []byte, err error)
func (*FileObject) BSONString ¶
func (obj *FileObject) BSONString() (string, error)
func (*FileObject) CreateWithTran ¶
func (self *FileObject) CreateWithTran(t *Transaction, forceCreate bool) error
func (*FileObject) Delete ¶
func (self *FileObject) Delete() error
func (*FileObject) DeleteWithTran ¶
func (self *FileObject) DeleteWithTran(t *Transaction) error
func (*FileObject) DoesIdExist ¶
func (obj *FileObject) DoesIdExist(objectID interface{}) bool
func (*FileObject) ForceCreateWithTran ¶
func (self *FileObject) ForceCreateWithTran(t *Transaction) error
func (*FileObject) GetId ¶
func (self *FileObject) GetId() string
func (*FileObject) JSONBytes ¶
func (obj *FileObject) JSONBytes() ([]byte, error)
func (*FileObject) JSONString ¶
func (obj *FileObject) JSONString() (string, error)
func (*FileObject) JoinFields ¶
func (self *FileObject) JoinFields(remainingRecursions string, q *Query, recursionCount int) (err error)
func (*FileObject) NewId ¶
func (obj *FileObject) NewId()
func (*FileObject) ParseInterface ¶
func (obj *FileObject) ParseInterface(x interface{}) (err error)
func (*FileObject) Reflect ¶
func (self *FileObject) Reflect() []Field
func (*FileObject) Save ¶
func (self *FileObject) Save() error
func (*FileObject) SaveWithTran ¶
func (self *FileObject) SaveWithTran(t *Transaction) error
func (*FileObject) Unmarshal ¶
func (self *FileObject) Unmarshal(data []byte) error
func (*FileObject) ValidateAndClean ¶
func (self *FileObject) ValidateAndClean() error
type FileObjectHistoryRecord ¶
type FileObjectHistoryRecord struct { Id bson.ObjectId `json:"id" bson:"_id,omitempty"` TId string `json:"tId" dbIndex:"index" bson:"tId"` ObjId string `json:"objId" dbIndex:"index" bson:"objId"` Data string `json:"data" bson:"data"` Type int `json:"type" bson:"type"` CreateDate time.Time `json:"createDate" dbIndex:"index" bson:"createDate"` }
func (*FileObjectHistoryRecord) BSONBytes ¶
func (obj *FileObjectHistoryRecord) BSONBytes() (in []byte, err error)
func (*FileObjectHistoryRecord) BSONString ¶
func (obj *FileObjectHistoryRecord) BSONString() (string, error)
func (*FileObjectHistoryRecord) Delete ¶
func (self *FileObjectHistoryRecord) Delete() error
func (*FileObjectHistoryRecord) DoesIdExist ¶
func (obj *FileObjectHistoryRecord) DoesIdExist(objectID interface{}) bool
func (*FileObjectHistoryRecord) GetData ¶
func (self *FileObjectHistoryRecord) GetData() string
func (*FileObjectHistoryRecord) GetId ¶
func (self *FileObjectHistoryRecord) GetId() string
func (*FileObjectHistoryRecord) GetType ¶
func (self *FileObjectHistoryRecord) GetType() int
func (*FileObjectHistoryRecord) JSONBytes ¶
func (obj *FileObjectHistoryRecord) JSONBytes() ([]byte, error)
func (*FileObjectHistoryRecord) JSONString ¶
func (obj *FileObjectHistoryRecord) JSONString() (string, error)
func (*FileObjectHistoryRecord) JoinFields ¶
func (self *FileObjectHistoryRecord) JoinFields(s string, q *Query, x int) error
func (*FileObjectHistoryRecord) Reflect ¶
func (obj *FileObjectHistoryRecord) Reflect() []Field
func (*FileObjectHistoryRecord) Save ¶
func (self *FileObjectHistoryRecord) Save() error
func (*FileObjectHistoryRecord) SaveWithTran ¶
func (self *FileObjectHistoryRecord) SaveWithTran(t *Transaction) error
func (*FileObjectHistoryRecord) Unmarshal ¶
func (self *FileObjectHistoryRecord) Unmarshal(data []byte) error
type FileObjectJoinItems ¶
type FileObjectJoinItems struct { Count int `json:"Count"` Items *[]FileObject `json:"Items"` }
type Floor ¶
type Floor struct { Id bson.ObjectId `json:"Id" bson:"_id,omitempty"` Name string `json:"Name" bson:"Name" validate:"true,,,,,,"` SiteId string `json:"SiteId" dbIndex:"index" bson:"SiteId" validate:"true,,,,,,"` BuildingId string `json:"BuildingId" dbIndex:"index" bson:"BuildingId" validate:"true,,,,,,"` AccountId string `json:"AccountId" dbIndex:"index" bson:"AccountId" validate:"true,,,,,,"` CreateDate time.Time `json:"CreateDate" bson:"CreateDate"` UpdateDate time.Time `json:"UpdateDate" bson:"UpdateDate"` LastUpdateId string `json:"LastUpdateId" bson:"LastUpdateId"` BootstrapMeta *BootstrapMeta `json:"BootstrapMeta" bson:"-"` Errors struct { Id string `json:"Id"` Name string `json:"Name"` SiteId string `json:"SiteId"` BuildingId string `json:"BuildingId"` AccountId string `json:"AccountId"` } `json:"Errors" bson:"-"` Views struct { UpdateDate string `json:"UpdateDate" ref:"UpdateDate~DateTime"` UpdateFromNow string `json:"UpdateFromNow" ref:"UpdateDate~TimeFromNow"` } `json:"Views" bson:"-"` Joins struct { Site *Site `json:"Site,omitempty" join:"Sites,Site,SiteId,false,"` Building *Building `json:"Building,omitempty" join:"Buildings,Building,BuildingId,false,"` Account *Account `json:"Account,omitempty" join:"Accounts,Account,AccountId,false,"` LastUpdateUser *User `json:"LastUpdateUser,omitempty" join:"Users,User,LastUpdateId,false,"` } `json:"Joins" bson:"-"` }
func (*Floor) BSONString ¶
func (*Floor) CreateWithTran ¶
func (self *Floor) CreateWithTran(t *Transaction, forceCreate bool) error
func (*Floor) DeleteWithTran ¶
func (self *Floor) DeleteWithTran(t *Transaction) error
func (*Floor) DoesIdExist ¶
func (*Floor) ForceCreateWithTran ¶
func (self *Floor) ForceCreateWithTran(t *Transaction) error
func (*Floor) JSONString ¶
func (*Floor) JoinFields ¶
func (*Floor) ParseInterface ¶
func (*Floor) SaveWithTran ¶
func (self *Floor) SaveWithTran(t *Transaction) error
func (*Floor) ValidateAndClean ¶
type FloorHistoryRecord ¶
type FloorHistoryRecord struct { Id bson.ObjectId `json:"id" bson:"_id,omitempty"` TId string `json:"tId" dbIndex:"index" bson:"tId"` ObjId string `json:"objId" dbIndex:"index" bson:"objId"` Data string `json:"data" bson:"data"` Type int `json:"type" bson:"type"` CreateDate time.Time `json:"createDate" dbIndex:"index" bson:"createDate"` }
func (*FloorHistoryRecord) BSONBytes ¶
func (obj *FloorHistoryRecord) BSONBytes() (in []byte, err error)
func (*FloorHistoryRecord) BSONString ¶
func (obj *FloorHistoryRecord) BSONString() (string, error)
func (*FloorHistoryRecord) Delete ¶
func (self *FloorHistoryRecord) Delete() error
func (*FloorHistoryRecord) DoesIdExist ¶
func (obj *FloorHistoryRecord) DoesIdExist(objectID interface{}) bool
func (*FloorHistoryRecord) GetData ¶
func (self *FloorHistoryRecord) GetData() string
func (*FloorHistoryRecord) GetId ¶
func (self *FloorHistoryRecord) GetId() string
func (*FloorHistoryRecord) GetType ¶
func (self *FloorHistoryRecord) GetType() int
func (*FloorHistoryRecord) JSONBytes ¶
func (obj *FloorHistoryRecord) JSONBytes() ([]byte, error)
func (*FloorHistoryRecord) JSONString ¶
func (obj *FloorHistoryRecord) JSONString() (string, error)
func (*FloorHistoryRecord) JoinFields ¶
func (self *FloorHistoryRecord) JoinFields(s string, q *Query, x int) error
func (*FloorHistoryRecord) Reflect ¶
func (obj *FloorHistoryRecord) Reflect() []Field
func (*FloorHistoryRecord) Save ¶
func (self *FloorHistoryRecord) Save() error
func (*FloorHistoryRecord) SaveWithTran ¶
func (self *FloorHistoryRecord) SaveWithTran(t *Transaction) error
func (*FloorHistoryRecord) Unmarshal ¶
func (self *FloorHistoryRecord) Unmarshal(data []byte) error
type FloorJoinItems ¶
type Query ¶
type Query struct {
// contains filtered or unexported fields
}
func (*Query) AddBlankAndOr ¶
func (*Query) AndExclude ¶
func (*Query) AndGreaterThan ¶
func (*Query) AndGreaterThanEqualTo ¶
func (*Query) AndLessThan ¶
func (*Query) AndLessThanEqualTo ¶
func (*Query) CheckForObjectId ¶
func (self *Query) CheckForObjectId(val interface{}) interface{}
func (*Query) GenerateQuery ¶
func (*Query) GetCollection ¶
func (self *Query) GetCollection() *mgo.Collection
func (*Query) GetOrCreate ¶
func (self *Query) GetOrCreate(x interface{}, t *Transaction) (err error)
func (*Query) GreaterThanEqualTo ¶
func (*Query) Iter ¶
func (self *Query) Iter() (qi *QueryIterator)
func (*Query) OrGreaterThan ¶
func (*Query) OrGreaterThanEqualTo ¶
func (*Query) OrLessThanEqualTo ¶
func (*Query) RenderViews ¶
func (self *Query) RenderViews(format DataFormat) *Query
func (*Query) ToggleLogFlag ¶
type QueryFieldFilter ¶
type QueryIterator ¶
type QueryIterator struct {
// contains filtered or unexported fields
}
func (*QueryIterator) Next ¶
func (self *QueryIterator) Next(x interface{}) (gotRecord bool, err error)
type Site ¶
type Site struct { Id bson.ObjectId `json:"Id" bson:"_id,omitempty"` Name string `json:"Name" bson:"Name" validate:"true,,,,,,"` ImageCustom string `json:"ImageCustom" bson:"ImageCustom"` AccountId string `json:"AccountId" dbIndex:"index" bson:"AccountId"` CountryId string `json:"CountryId" bson:"CountryId" validate:"true,,,,,,"` CreateDate time.Time `json:"CreateDate" bson:"CreateDate"` UpdateDate time.Time `json:"UpdateDate" bson:"UpdateDate"` LastUpdateId string `json:"LastUpdateId" bson:"LastUpdateId"` BootstrapMeta *BootstrapMeta `json:"BootstrapMeta" bson:"-"` Errors struct { Id string `json:"Id"` Name string `json:"Name"` ImageCustom string `json:"ImageCustom"` AccountId string `json:"AccountId"` CountryId string `json:"CountryId"` } `json:"Errors" bson:"-"` Views struct { UpdateDate string `json:"UpdateDate" ref:"UpdateDate~DateTime"` UpdateFromNow string `json:"UpdateFromNow" ref:"UpdateDate~TimeFromNow"` } `json:"Views" bson:"-"` Joins struct { FileObjects *FileObject `json:"FileObjects,omitempty" join:"FileObjects,FileObject,ImageCustom,false,"` Account *Account `json:"Account,omitempty" join:"Accounts,Account,AccountId,false,"` Country *Country `json:"Country,omitempty" join:"Countries,Country,CountryId,false,"` Buildings *BuildingJoinItems `json:"Buildings,omitempty" join:"Buildings,Building,Id,true,SiteId"` LastUpdateUser *User `json:"LastUpdateUser,omitempty" join:"Users,User,LastUpdateId,false,"` } `json:"Joins" bson:"-"` }
func (*Site) BSONString ¶
func (*Site) CreateWithTran ¶
func (self *Site) CreateWithTran(t *Transaction, forceCreate bool) error
func (*Site) DeleteWithTran ¶
func (self *Site) DeleteWithTran(t *Transaction) error
func (*Site) DoesIdExist ¶
func (*Site) ForceCreateWithTran ¶
func (self *Site) ForceCreateWithTran(t *Transaction) error
func (*Site) JSONString ¶
func (*Site) JoinFields ¶
func (*Site) ParseInterface ¶
func (*Site) SaveWithTran ¶
func (self *Site) SaveWithTran(t *Transaction) error
func (*Site) ValidateAndClean ¶
type SiteHistoryRecord ¶
type SiteHistoryRecord struct { Id bson.ObjectId `json:"id" bson:"_id,omitempty"` TId string `json:"tId" dbIndex:"index" bson:"tId"` ObjId string `json:"objId" dbIndex:"index" bson:"objId"` Data string `json:"data" bson:"data"` Type int `json:"type" bson:"type"` CreateDate time.Time `json:"createDate" dbIndex:"index" bson:"createDate"` }
func (*SiteHistoryRecord) BSONBytes ¶
func (obj *SiteHistoryRecord) BSONBytes() (in []byte, err error)
func (*SiteHistoryRecord) BSONString ¶
func (obj *SiteHistoryRecord) BSONString() (string, error)
func (*SiteHistoryRecord) Delete ¶
func (self *SiteHistoryRecord) Delete() error
func (*SiteHistoryRecord) DoesIdExist ¶
func (obj *SiteHistoryRecord) DoesIdExist(objectID interface{}) bool
func (*SiteHistoryRecord) GetData ¶
func (self *SiteHistoryRecord) GetData() string
func (*SiteHistoryRecord) GetId ¶
func (self *SiteHistoryRecord) GetId() string
func (*SiteHistoryRecord) GetType ¶
func (self *SiteHistoryRecord) GetType() int
func (*SiteHistoryRecord) JSONBytes ¶
func (obj *SiteHistoryRecord) JSONBytes() ([]byte, error)
func (*SiteHistoryRecord) JSONString ¶
func (obj *SiteHistoryRecord) JSONString() (string, error)
func (*SiteHistoryRecord) JoinFields ¶
func (self *SiteHistoryRecord) JoinFields(s string, q *Query, x int) error
func (*SiteHistoryRecord) Reflect ¶
func (obj *SiteHistoryRecord) Reflect() []Field
func (*SiteHistoryRecord) Save ¶
func (self *SiteHistoryRecord) Save() error
func (*SiteHistoryRecord) SaveWithTran ¶
func (self *SiteHistoryRecord) SaveWithTran(t *Transaction) error
func (*SiteHistoryRecord) Unmarshal ¶
func (self *SiteHistoryRecord) Unmarshal(data []byte) error
type SiteJoinItems ¶
type Timezone ¶
type Timezone struct { Location string `json:"Location"` Code string `json:"Code"` Country string `json:"Country"` }
Timezone holds data gathered from CSV files on http://timezonedb.com/download.
func TimeZoneCode ¶
TimeZoneCode returns all timezones with given country code. If none is found, returns an error.
func TimeZoneCountry ¶
TimeZoneCountry returns all timezones with given country name. If none is found, returns an error.
type Transaction ¶
type Transaction struct { Id bson.ObjectId `json:"id" bson:"_id,omitempty"` UserId string `json:"userId" dbIndex:"index" bson:"userId"` CreateDate time.Time `json:"createDate" bson:"createDate"` LastUpdate time.Time `json:"lastUpdate" bson:"lastUpdate"` CompleteDate time.Time `json:"completeDate" bson:"completeDate"` RollbackDate time.Time `json:"rollbackDate" bson:"rollbackDate"` Committed bool `json:"committed" bson:"committed"` Error string `json:"error" bson:"error"` Collections []string `json:"collections" bson:"collections"` Details string `json:"details" bson:"details"` RolledBack bool `json:"rolledBack" bson:"rolledBack"` RolledBackBy string `json:"rolledBackBy" bson:"rolledBackBy"` RollbackReason string `json:"rollbackReason" bson:"rollbackReason"` }
func (*Transaction) BSONBytes ¶
func (obj *Transaction) BSONBytes() (in []byte, err error)
func (*Transaction) BSONString ¶
func (obj *Transaction) BSONString() (string, error)
func (*Transaction) Begin ¶
func (self *Transaction) Begin() error
func (*Transaction) Commit ¶
func (self *Transaction) Commit() error
func (*Transaction) Delete ¶
func (self *Transaction) Delete() error
func (*Transaction) JSONBytes ¶
func (obj *Transaction) JSONBytes() ([]byte, error)
func (*Transaction) JSONString ¶
func (obj *Transaction) JSONString() (string, error)
func (*Transaction) Resume ¶
func (self *Transaction) Resume() error
func (*Transaction) Rollback ¶
func (self *Transaction) Rollback(userId string, reason string) error
func (*Transaction) RollbackTransaction ¶
func (self *Transaction) RollbackTransaction() error
func (*Transaction) Save ¶
func (self *Transaction) Save() error
type User ¶
type User struct { Id bson.ObjectId `json:"Id" bson:"_id,omitempty"` First string `json:"First" bson:"First" validate:"true,,,,,,"` Last string `json:"Last" bson:"Last" validate:"true,,,,,,"` SignupDate time.Time `json:"SignupDate" bson:"SignupDate"` Email string `json:"Email" dbIndex:"unique" bson:"Email" validate:"true,email,,,,,"` CreateDate time.Time `json:"CreateDate" bson:"CreateDate"` UpdateDate time.Time `json:"UpdateDate" bson:"UpdateDate"` LastUpdateId string `json:"LastUpdateId" bson:"LastUpdateId"` BootstrapMeta *BootstrapMeta `json:"BootstrapMeta" bson:"-"` Errors struct { Id string `json:"Id"` First string `json:"First"` Last string `json:"Last"` SignupDate string `json:"SignupDate"` Email string `json:"Email"` } `json:"Errors" bson:"-"` }
func (*User) BSONString ¶
func (*User) CreateWithTran ¶
func (self *User) CreateWithTran(t *Transaction, forceCreate bool) error
func (*User) DeleteWithTran ¶
func (self *User) DeleteWithTran(t *Transaction) error
func (*User) DoesIdExist ¶
func (*User) ForceCreateWithTran ¶
func (self *User) ForceCreateWithTran(t *Transaction) error
func (*User) JSONString ¶
func (*User) JoinFields ¶
func (*User) ParseInterface ¶
func (*User) SaveWithTran ¶
func (self *User) SaveWithTran(t *Transaction) error
func (*User) ValidateAndClean ¶
type UserHistoryRecord ¶
type UserHistoryRecord struct { Id bson.ObjectId `json:"id" bson:"_id,omitempty"` TId string `json:"tId" dbIndex:"index" bson:"tId"` ObjId string `json:"objId" dbIndex:"index" bson:"objId"` Data string `json:"data" bson:"data"` Type int `json:"type" bson:"type"` CreateDate time.Time `json:"createDate" dbIndex:"index" bson:"createDate"` }
func (*UserHistoryRecord) BSONBytes ¶
func (obj *UserHistoryRecord) BSONBytes() (in []byte, err error)
func (*UserHistoryRecord) BSONString ¶
func (obj *UserHistoryRecord) BSONString() (string, error)
func (*UserHistoryRecord) Delete ¶
func (self *UserHistoryRecord) Delete() error
func (*UserHistoryRecord) DoesIdExist ¶
func (obj *UserHistoryRecord) DoesIdExist(objectID interface{}) bool
func (*UserHistoryRecord) GetData ¶
func (self *UserHistoryRecord) GetData() string
func (*UserHistoryRecord) GetId ¶
func (self *UserHistoryRecord) GetId() string
func (*UserHistoryRecord) GetType ¶
func (self *UserHistoryRecord) GetType() int
func (*UserHistoryRecord) JSONBytes ¶
func (obj *UserHistoryRecord) JSONBytes() ([]byte, error)
func (*UserHistoryRecord) JSONString ¶
func (obj *UserHistoryRecord) JSONString() (string, error)
func (*UserHistoryRecord) JoinFields ¶
func (self *UserHistoryRecord) JoinFields(s string, q *Query, x int) error
func (*UserHistoryRecord) Reflect ¶
func (obj *UserHistoryRecord) Reflect() []Field
func (*UserHistoryRecord) Save ¶
func (self *UserHistoryRecord) Save() error
func (*UserHistoryRecord) SaveWithTran ¶
func (self *UserHistoryRecord) SaveWithTran(t *Transaction) error
func (*UserHistoryRecord) Unmarshal ¶
func (self *UserHistoryRecord) Unmarshal(data []byte) error