Documentation ¶
Index ¶
- Constants
- Variables
- func AsStringOrEmpty(i interface{}) string
- func BcryptCheckStringHash(newString, hash string) bool
- func BcryptHashString(password string) (string, error)
- func BeginsWith(longerString string, smallerString string) bool
- func BuildActionContext(outcomeAttributes interface{}, inFieldMap map[string]interface{}) (interface{}, error)
- func BuildOutcome(inFieldMap map[string]interface{}, outcome Outcome) (*api2go.Api2GoModel, api2go.Request, error)
- func BuildWhereClause(functionName string, leftVal string, rightVal interface{}) (goqu.Expression, error)
- func CheckAllTableStatus(initConfig *CmsConfig, db database.DatabaseConnection)
- func CheckAuditTables(config *CmsConfig)
- func CheckErr(err error, message ...interface{}) bool
- func CheckInfo(err error, message ...interface{}) bool
- func CheckRelations(config *CmsConfig)
- func CheckTable(tableInfo *TableInfo, db database.DatabaseConnection, tx *sqlx.Tx) error
- func CheckTranslationTables(config *CmsConfig)
- func ColumnToInterfaceArray(s []column) []interface{}
- func CreateAMapOfColumnsWeWantInTheFinalTable(tableInfo *TableInfo) (map[string]bool, map[string]api2go.ColumnInfo)
- func CreateDefaultLocalStorage(db database.DatabaseConnection, localStoragePath string) error
- func CreateGuestActionListHandler(initConfig *CmsConfig) func(*gin.Context)
- func CreateIndexes(initConfig *CmsConfig, db database.DatabaseConnection)
- func CreatePostActionHandler(initConfig *CmsConfig, cruds map[string]*DbResource, ...) func(*gin.Context)
- func CreateRelations(initConfig *CmsConfig, db database.DatabaseConnection)
- func CreateRequestBody(mode Mode, mediaType string, name string, schema *openapi3.Schema, ...) (interface{}, error)
- func CreateTable(tableInfo *TableInfo, db *sqlx.Tx) error
- func CreateUniqueConstraints(initConfig *CmsConfig, db *sqlx.Tx)
- func Decrypt(key []byte, cryptoText string) (string, error)
- func Encrypt(key []byte, text string) (string, error)
- func EndsWith(str string, endsWith string) (string, bool)
- func EndsWithCheck(str string, endsWith string) bool
- func GenerateCertPEMWithKey(hostname string, privateKey *rsa.PrivateKey) ([]byte, error)
- func GetActionMapByTypeName(transaction *sqlx.Tx) (map[string]map[string]interface{}, error)
- func GetAdminReferenceIdWithTransaction(transaction *sqlx.Tx) map[string]bool
- func GetAdminUserIdAndUserGroupId(db sqlx.Ext) (int64, int64)
- func GetBodyParameterNames(mode Mode, name string, schema *openapi3.Schema) ([]string, error)
- func GetDataArray(sheet *xlsx.Sheet) (dataMap []map[string]interface{}, columnNames []string, err error)
- func GetExistingIndexes(db *sqlx.Tx) map[string]bool
- func GetFakeRow(columns []api2go.ColumnInfo) map[string]interface{}
- func GetIdToReferenceIdWithTransaction(typeName string, id int64, transaction *sqlx.Tx) (string, error)
- func GetJoins(rel api2go.TableRelation) []join
- func GetMD5Hash(text []byte) string
- func GetMD5HashString(text string) string
- func GetOauthConnectionById(authenticatorId int64, dbResource *DbResource) (*oauth2.Config, string, error)
- func GetOauthConnectionDescription(authenticator string, dbResource *DbResource) (*oauth2.Config, string, error)
- func GetObjectByWhereClauseWithTransaction(objType string, transaction *sqlx.Tx, queries ...goqu.Ex) ([]map[string]interface{}, error)
- func GetObjectGroupsByObjectIdWithTransaction(objectType string, objectId int64, transaction *sqlx.Tx) []auth.GroupPermission
- func GetParametersNames(s string) ([]string, error)
- func GetPublicPrivateKeyPEMBytes() ([]byte, []byte, *rsa.PrivateKey, error)
- func GetReferenceIdByWhereClauseWithTransaction(typeName string, transaction *sqlx.Tx, queries ...goqu.Ex) ([]string, error)
- func GetReferenceIdListToIdListWithTransaction(typeName string, referenceId []string, transaction *sqlx.Tx) (map[string]int64, error)
- func GetReferenceIdToIdWithTransaction(typeName string, referenceId string, updateTransaction *sqlx.Tx) (int64, error)
- func GetReverseJoins(rel api2go.TableRelation) []join
- func GetSingleColumnValueByReferenceIdWithTransaction(typeName string, selectColumn []interface{}, matchColumn string, ...) ([]interface{}, error)
- func GetTokensScope(tokUrl string, scope string, clientId string, clientSecret string, ...) (map[string]interface{}, error)
- func GetTotalCountBySelectBuilderWithTransaction(builder *goqu.SelectDataset, transaction *sqlx.Tx) (uint64, error)
- func GetUserMembersByGroupNameWithTransaction(groupName string, transaction *sqlx.Tx) []string
- func GetValidatedInFields(actionRequest ActionRequest, action Action) (map[string]interface{}, error)
- func GetWorldTableMapBy(col string, transaction *sqlx.Tx) (map[string]map[string]interface{}, error)
- func GroupNamesToIds(db database.DatabaseConnection, groupsName []string) ([]int64, error)
- func HasAnyFlag(flags []string, flagToFind []string) bool
- func HasFlag(flags []string, flagToFind string) bool
- func ImportDataFiles(imports []DataFileImport, db sqlx.Ext, cruds map[string]*DbResource)
- func ImportDataMapArray(data []map[string]interface{}, crud *DbResource, req api2go.Request) []error
- func ImportDataStringArray(data [][]string, headers []string, entityName string, crud *DbResource, ...) []error
- func InArray(val []interface{}, ar interface{}) (exists bool)
- func InStringArray(val []string, ar string) (exists bool)
- func InfoErr(err error, message ...interface{}) bool
- func InitialiseColumnManager()
- func IsAdminWithTransaction(userReferenceId string, transaction *sqlx.Tx) bool
- func IsReservedWord(w string) bool
- func IsStandardColumn(colName string) bool
- func MakeCreateTableQuery(tableInfo *TableInfo, sqlDriverName string) string
- func MapArrayToInterfaceArray(s []map[string]interface{}) []interface{}
- func NewClientNotification(notificationType string, message string, title string) map[string]interface{}
- func NewMapStringScan(columnNames []string) *mapStringScan
- func NewResponse(metadata map[string]interface{}, result interface{}, statusCode int, ...) api2go.Responder
- func ParseRsaPrivateKeyFromPemStr(privPEM string) (*rsa.PrivateKey, error)
- func PrintRelations(relations []api2go.TableRelation)
- func PrintTableInfo(info *TableInfo, title string)
- func ReferenceIdToIntegerId(typeName string, referenceId string, db database.DatabaseConnection) (int64, error)
- func RegisterTranslations()
- func RelationNamesToIds(db database.DatabaseConnection, tableInfo TableInfo) (map[string][]int64, error)
- func RowsToMap(rows *sqlx.Rows, typeName string) ([]map[string]interface{}, error)
- func SmallSnakeCaseText(str string) string
- func ToExpressionArray(s []string) []exp.Expression
- func ToInterfaceArray(s []string) []interface{}
- func ToOrderedExpressionArray(s []string) []exp.OrderedExpression
- func UpdateActionTable(initConfig *CmsConfig, db database.DatabaseConnection) error
- func UpdateExchanges(initConfig *CmsConfig, db database.DatabaseConnection)
- func UpdateStateMachineDescriptions(initConfig *CmsConfig, db database.DatabaseConnection)
- func UpdateStreams(initConfig *CmsConfig, db database.DatabaseConnection)
- func UpdateTasksData(initConfig *CmsConfig, db database.DatabaseConnection) error
- func UpdateWorldTable(initConfig *CmsConfig, db *sqlx.Tx) error
- func ValueOf(x interface{}) interface{}
- func ValuesOf(mapItem map[string]int64) []int64
- type Action
- type ActionExchangeHandler
- type ActionPerformerInterface
- func NewAcmeTlsCertificateGenerateActionPerformer(cruds map[string]*DbResource, configStore *ConfigStore, hostSwitch *gin.Engine) (ActionPerformerInterface, error)
- func NewBecomeAdminPerformer(initConfig *CmsConfig, cruds map[string]*DbResource) (ActionPerformerInterface, error)
- func NewCloudStoreFileDeleteActionPerformer(cruds map[string]*DbResource) (ActionPerformerInterface, error)
- func NewCloudStoreFileGetActionPerformer(cruds map[string]*DbResource) (ActionPerformerInterface, error)
- func NewCloudStoreFileListActionPerformer(cruds map[string]*DbResource) (ActionPerformerInterface, error)
- func NewCloudStoreFolderCreateActionPerformer(cruds map[string]*DbResource) (ActionPerformerInterface, error)
- func NewCloudStorePathMoveActionPerformer(cruds map[string]*DbResource) (ActionPerformerInterface, error)
- func NewCloudStoreSiteCreateActionPerformer(cruds map[string]*DbResource) (ActionPerformerInterface, error)
- func NewCommandExecuteActionPerformer(cruds map[string]*DbResource) (ActionPerformerInterface, error)
- func NewDeleteWorldColumnPerformer(initConfig *CmsConfig, cruds map[string]*DbResource) (ActionPerformerInterface, error)
- func NewDeleteWorldPerformer(initConfig *CmsConfig, cruds map[string]*DbResource) (ActionPerformerInterface, error)
- func NewDownloadCmsConfigPerformer(initConfig *CmsConfig) (ActionPerformerInterface, error)
- func NewExportCsvDataPerformer(initConfig *CmsConfig, cruds map[string]*DbResource) (ActionPerformerInterface, error)
- func NewExportDataPerformer(initConfig *CmsConfig, cruds map[string]*DbResource) (ActionPerformerInterface, error)
- func NewFileUploadActionPerformer(cruds map[string]*DbResource) (ActionPerformerInterface, error)
- func NewGenerateJwtTokenPerformer(configStore *ConfigStore, cruds map[string]*DbResource) (ActionPerformerInterface, error)
- func NewGenerateOauth2TokenPerformer(configStore *ConfigStore, cruds map[string]*DbResource) (ActionPerformerInterface, error)
- func NewGeneratePasswordResetActionPerformer(configStore *ConfigStore, cruds map[string]*DbResource) (ActionPerformerInterface, error)
- func NewGeneratePasswordResetVerifyActionPerformer(configStore *ConfigStore, cruds map[string]*DbResource) (ActionPerformerInterface, error)
- func NewGraphqlEnablePerformer(initConfig *CmsConfig, cruds map[string]*DbResource) (ActionPerformerInterface, error)
- func NewImportCloudStoreFilesPerformer(initConfig *CmsConfig, cruds map[string]*DbResource) (ActionPerformerInterface, error)
- func NewImportDataPerformer(initConfig *CmsConfig, cruds map[string]*DbResource) (ActionPerformerInterface, error)
- func NewIntegrationActionPerformer(integration Integration, initConfig *CmsConfig, cruds map[string]*DbResource, ...) (ActionPerformerInterface, error)
- func NewIntegrationInstallationPerformer(initConfig *CmsConfig, cruds map[string]*DbResource, configStore *ConfigStore) (ActionPerformerInterface, error)
- func NewMailSendActionPerformer(cruds map[string]*DbResource, mailDaemon *guerrilla.Daemon, ...) (ActionPerformerInterface, error)
- func NewMailServersSyncActionPerformer(cruds map[string]*DbResource, mailDaemon *guerrilla.Daemon, ...) (ActionPerformerInterface, error)
- func NewMakeResponsePerformer() (ActionPerformerInterface, error)
- func NewNetworkRequestPerformer(initConfig *CmsConfig, cruds map[string]*DbResource) (ActionPerformerInterface, error)
- func NewOauthLoginBeginActionPerformer(initConfig *CmsConfig, cruds map[string]*DbResource, configStore *ConfigStore) (ActionPerformerInterface, error)
- func NewOauthLoginResponseActionPerformer(initConfig *CmsConfig, cruds map[string]*DbResource, configStore *ConfigStore) (ActionPerformerInterface, error)
- func NewOtpGenerateActionPerformer(cruds map[string]*DbResource, configStore *ConfigStore) (ActionPerformerInterface, error)
- func NewOtpLoginVerifyActionPerformer(cruds map[string]*DbResource, configStore *ConfigStore) (ActionPerformerInterface, error)
- func NewOuathProfileExchangePerformer(initConfig *CmsConfig, cruds map[string]*DbResource) (ActionPerformerInterface, error)
- func NewRandomDataGeneratePerformer(initConfig *CmsConfig, cruds map[string]*DbResource) (ActionPerformerInterface, error)
- func NewRandomValueGeneratePerformer() (ActionPerformerInterface, error)
- func NewRenameWorldColumnPerformer(initConfig *CmsConfig, cruds map[string]*DbResource) (ActionPerformerInterface, error)
- func NewRestarSystemPerformer(initConfig *CmsConfig) (ActionPerformerInterface, error)
- func NewSelfTlsCertificateGenerateActionPerformer(cruds map[string]*DbResource, configStore *ConfigStore, ...) (ActionPerformerInterface, error)
- func NewSyncColumnStorageActionPerformer(cruds map[string]*DbResource) (ActionPerformerInterface, error)
- func NewSyncSiteStorageActionPerformer(cruds map[string]*DbResource) (ActionPerformerInterface, error)
- func NewUploadCsvFileToEntityPerformer(initConfig *CmsConfig, cruds map[string]*DbResource) (ActionPerformerInterface, error)
- func NewUploadFileToEntityPerformer(initConfig *CmsConfig, cruds map[string]*DbResource) (ActionPerformerInterface, error)
- type ActionRequest
- type ActionResponse
- type ActionRow
- type ActiveTaskInstance
- type AggregateData
- type AggregateRow
- type AggregationRequest
- type AssetFolderCache
- func (afc *AssetFolderCache) DeleteFileByName(fileName string) error
- func (afc *AssetFolderCache) GetFileByName(fileName string) (*os.File, error)
- func (afc *AssetFolderCache) GetPathContents(path string) ([]map[string]interface{}, error)
- func (afc *AssetFolderCache) UploadFiles(files []interface{}) error
- type CertificateManager
- type CloudStore
- type CmsConfig
- type ColumnMap
- type ColumnMapping
- type ColumnTag
- type ColumnType
- type ColumnTypeManager
- func (ctm *ColumnTypeManager) GetBlueprintType(columnType string) string
- func (ctm *ColumnTypeManager) GetFakeData(colTypeName string) string
- func (ctm *ColumnTypeManager) GetGraphqlType(columnType string) graphql.Type
- func (ctm *ColumnTypeManager) IsValidValue(val string, colType string, validator *validator2.Validate) error
- type Config
- type ConfigStore
- func (configStore *ConfigStore) DeleteConfigValueFor(key string, configtype string) error
- func (configStore *ConfigStore) GetAllConfig() map[string]string
- func (configStore *ConfigStore) GetConfigIntValueFor(key string, configtype string) (int, error)
- func (configStore *ConfigStore) GetConfigValueFor(key string, configtype string) (string, error)
- func (configStore *ConfigStore) GetConfigValueForWithTransaction(key string, configtype string, transaction *sqlx.Tx) (string, error)
- func (configStore *ConfigStore) SetConfigIntValueFor(key string, val int, configtype string) error
- func (configStore *ConfigStore) SetConfigValueFor(key string, val interface{}, configtype string) error
- func (configStore *ConfigStore) SetConfigValueForWithTransaction(key string, val interface{}, configtype string, transaction *sqlx.Tx) error
- func (configStore *ConfigStore) SetDefaultEnv(env string)
- type DaptinError
- type DaptinImapBackend
- type DaptinImapMailBox
- func (dimb *DaptinImapMailBox) Check() error
- func (dimb *DaptinImapMailBox) CopyMessages(uid bool, seqset *imap.SeqSet, dest string) error
- func (dimb *DaptinImapMailBox) CreateMessage(flags []string, date time.Time, body imap.Literal) error
- func (dimb *DaptinImapMailBox) Expunge() error
- func (dimb *DaptinImapMailBox) Info() (*imap.MailboxInfo, error)
- func (dimb *DaptinImapMailBox) ListMessages(uid bool, seqset *imap.SeqSet, items []imap.FetchItem, ch chan<- *imap.Message) error
- func (dimb *DaptinImapMailBox) Name() string
- func (dimb *DaptinImapMailBox) SearchMessages(uid bool, criteria *imap.SearchCriteria) ([]uint32, error)
- func (dimb *DaptinImapMailBox) SetSubscribed(subscribed bool) error
- func (dimb *DaptinImapMailBox) Status(items []imap.StatusItem) (*imap.MailboxStatus, error)
- func (dimb *DaptinImapMailBox) UpdateMessagesFlags(uid bool, seqset *imap.SeqSet, operation imap.FlagsOp, flags []string) error
- type DaptinImapUser
- func (diu *DaptinImapUser) CreateMailbox(name string) error
- func (diu *DaptinImapUser) DeleteMailbox(name string) error
- func (diu *DaptinImapUser) GetMailbox(name string) (backend.Mailbox, error)
- func (diu *DaptinImapUser) ListMailboxes(subscribed bool) ([]backend.Mailbox, error)
- func (diu *DaptinImapUser) Logout() error
- func (diu *DaptinImapUser) RenameMailbox(existingName, newName string) error
- func (diu *DaptinImapUser) Username() string
- type DataFileImport
- type DataValidationMiddleware
- func (dvm *DataValidationMiddleware) InterceptAfter(dr *DbResource, req *api2go.Request, results []map[string]interface{}, ...) ([]map[string]interface{}, error)
- func (dvm *DataValidationMiddleware) InterceptBefore(dr *DbResource, req *api2go.Request, objects []map[string]interface{}, ...) ([]map[string]interface{}, error)
- func (dvm DataValidationMiddleware) String() string
- type DatabaseRequestInterceptor
- func NewCreateEventHandler(cruds *map[string]*DbResource, dtopicMap *map[string]*olric.DTopic) DatabaseRequestInterceptor
- func NewDataValidationMiddleware(cmsConfig *CmsConfig, cruds *map[string]*DbResource) DatabaseRequestInterceptor
- func NewDeleteEventHandler(cruds *map[string]*DbResource, dtopicMap *map[string]*olric.DTopic) DatabaseRequestInterceptor
- func NewExchangeMiddleware(cmsConfig *CmsConfig, cruds *map[string]*DbResource) DatabaseRequestInterceptor
- func NewUpdateEventHandler(cruds *map[string]*DbResource, dtopicMap *map[string]*olric.DTopic) DatabaseRequestInterceptor
- func NewYJSHandlerMiddleware(documentProvider ydb.DocumentProvider) DatabaseRequestInterceptor
- type DbResource
- func (dbResource *DbResource) BecomeAdmin(userId int64, transaction *sqlx.Tx) bool
- func (dbResource *DbResource) CanBecomeAdmin() bool
- func (dbResource *DbResource) Create(obj interface{}, req api2go.Request) (api2go.Responder, error)
- func (dbResource *DbResource) CreateMailAccountBox(mailAccountId string, sessionUser *auth.SessionUser, mailBoxName string) (map[string]interface{}, error)
- func (dbResource *DbResource) CreateWithTransaction(obj interface{}, req api2go.Request, transaction *sqlx.Tx) (api2go.Responder, error)
- func (dbResource *DbResource) CreateWithoutFilter(obj interface{}, req api2go.Request, createTransaction *sqlx.Tx) (map[string]interface{}, error)
- func (dbResource *DbResource) DataStats(req AggregationRequest, transaction *sqlx.Tx) (*AggregateData, error)
- func (dbResource *DbResource) Delete(id string, req api2go.Request) (api2go.Responder, error)
- func (dbResource *DbResource) DeleteMailAccountBox(mailAccountId int64, mailBoxName string) error
- func (dbResource *DbResource) DeleteWithTransaction(id string, req api2go.Request, transaction *sqlx.Tx) (api2go.Responder, error)
- func (dbResource *DbResource) DeleteWithoutFilters(id string, req api2go.Request, transaction *sqlx.Tx) error
- func (dbResource *DbResource) DirectInsert(typeName string, data map[string]interface{}) error
- func (dbResource *DbResource) ExpungeMailBox(mailBoxId int64) (int64, error)
- func (dbResource *DbResource) FindAll(req api2go.Request) (response api2go.Responder, err error)
- func (dbResource *DbResource) FindOne(referenceId string, req api2go.Request) (api2go.Responder, error)
- func (dbResource *DbResource) FindOneWithTransaction(referenceId string, req api2go.Request, transaction *sqlx.Tx) (api2go.Responder, error)
- func (dbResource *DbResource) GetActionByName(typeName string, actionName string, transaction *sqlx.Tx) (Action, error)
- func (dbResource *DbResource) GetActionPermissionByName(worldId int64, actionName string) (PermissionInstance, error)
- func (dbResource *DbResource) GetActionsByType(typeName string) ([]Action, error)
- func (dbResource *DbResource) GetActiveIntegrations() ([]Integration, error)
- func (dbResource *DbResource) GetAdminEmailId() string
- func (dbResource *DbResource) GetAdminReferenceId() map[string]bool
- func (dbResource *DbResource) GetAllCloudStores() ([]CloudStore, error)
- func (dbResource *DbResource) GetAllObjects(typeName string) ([]map[string]interface{}, error)
- func (dbResource *DbResource) GetAllObjectsWithWhere(typeName string, where ...goqu.Ex) ([]map[string]interface{}, error)
- func (dbResource *DbResource) GetAllObjectsWithWhereWithTransaction(typeName string, transaction *sqlx.Tx, where ...goqu.Ex) ([]map[string]interface{}, error)
- func (dbResource *DbResource) GetAllRawObjects(typeName string) ([]map[string]interface{}, error)
- func (dbResource *DbResource) GetAllRawObjectsWithTransaction(typeName string, transaction *sqlx.Tx) ([]map[string]interface{}, error)
- func (dbResource *DbResource) GetAllSites() ([]SubSite, error)
- func (dbResource *DbResource) GetAllTasks() ([]Task, error)
- func (dbResource *DbResource) GetCloudStoreByNameWithTransaction(name string, transaction *sqlx.Tx) (CloudStore, error)
- func (dbResource *DbResource) GetCloudStoreByReferenceId(referenceID string) (CloudStore, error)
- func (dbResource *DbResource) GetContext(key string) interface{}
- func (dbResource *DbResource) GetFileFromLocalCloudStore(tableName string, columnName string, filesList []map[string]interface{}) (resp []map[string]interface{}, err error)
- func (dbResource *DbResource) GetFirstUnseenMailSequence(mailBoxId int64) uint32
- func (dbResource *DbResource) GetIdByWhereClause(typeName string, queries ...goqu.Ex) ([]int64, error)
- func (dbResource *DbResource) GetIdListToReferenceIdList(typeName string, ids []int64) (map[int64]string, error)
- func (dbResource *DbResource) GetIdToObject(typeName string, id int64) (map[string]interface{}, error)
- func (dbResource *DbResource) GetIdToObjectWithTransaction(typeName string, id int64, transaction *sqlx.Tx) (map[string]interface{}, error)
- func (dbResource *DbResource) GetIdToReferenceId(typeName string, id int64) (string, error)
- func (dbResource *DbResource) GetMailAccountBox(mailAccountId int64, mailBoxName string) (map[string]interface{}, error)
- func (dbResource *DbResource) GetMailBoxMailsByOffset(mailBoxId int64, start uint32, stop uint32) ([]map[string]interface{}, error)
- func (dbResource *DbResource) GetMailBoxMailsByUidSequence(mailBoxId int64, start uint32, stop uint32) ([]map[string]interface{}, error)
- func (dbResource *DbResource) GetMailBoxStatus(mailAccountId int64, mailBoxId int64) (*imap.MailboxStatus, error)
- func (dbResource *DbResource) GetMailboxNextUid(mailBoxId int64) (uint32, error)
- func (dbResource *DbResource) GetOauthDescriptionByTokenId(id int64) (*oauth2.Config, error)
- func (dbResource *DbResource) GetOauthDescriptionByTokenReferenceId(referenceId string) (*oauth2.Config, error)
- func (dbResource *DbResource) GetObjectByWhereClause(typeName string, column string, val interface{}) (map[string]interface{}, error)
- func (dbResource *DbResource) GetObjectByWhereClauseWithTransaction(typeName string, column string, val interface{}, transaction *sqlx.Tx) (map[string]interface{}, error)
- func (dbResource *DbResource) GetObjectGroupsByObjectId(objType string, objectId int64) []auth.GroupPermission
- func (dbResource *DbResource) GetObjectPermissionById(objectType string, id int64) PermissionInstance
- func (dbResource *DbResource) GetObjectPermissionByIdWithTransaction(objectType string, id int64, transaction *sqlx.Tx) PermissionInstance
- func (dbResource *DbResource) GetObjectPermissionByReferenceId(objectType string, referenceId string) PermissionInstance
- func (dbResource *DbResource) GetObjectPermissionByWhereClause(objectType string, colName string, colValue string) PermissionInstance
- func (dbResource *DbResource) GetObjectPermissionByWhereClauseWithTransaction(objectType string, colName string, colValue string, transaction *sqlx.Tx) PermissionInstance
- func (dbResource *DbResource) GetObjectUserGroupsByWhere(objectType string, colName string, colValue interface{}) []auth.GroupPermission
- func (dbResource *DbResource) GetObjectUserGroupsByWhereWithTransaction(objectType string, transaction *sqlx.Tx, colName string, colValue interface{}) []auth.GroupPermission
- func (dbResource *DbResource) GetRandomRow(typeName string, count uint) ([]map[string]interface{}, error)
- func (dbResource *DbResource) GetReferenceIdByWhereClause(typeName string, queries ...goqu.Ex) ([]string, error)
- func (dbResource *DbResource) GetReferenceIdListToIdList(typeName string, referenceId []string) (map[string]int64, error)
- func (dbResource *DbResource) GetReferenceIdToId(typeName string, referenceId string) (int64, error)
- func (dbResource *DbResource) GetReferenceIdToObject(typeName string, referenceId string) (map[string]interface{}, error)
- func (dbResource *DbResource) GetReferenceIdToObjectColumn(typeName string, referenceId string, columnToSelect string) (interface{}, error)
- func (dbResource *DbResource) GetReferenceIdToObjectColumnWithTransaction(typeName string, referenceId string, columnToSelect string, ...) (interface{}, error)
- func (dbResource *DbResource) GetReferenceIdToObjectWithTransaction(typeName string, referenceId string, transaction *sqlx.Tx) (map[string]interface{}, error)
- func (dbResource *DbResource) GetRowPermission(row map[string]interface{}) PermissionInstance
- func (dbResource *DbResource) GetRowPermissionWithTransaction(row map[string]interface{}, transaction *sqlx.Tx) PermissionInstance
- func (dbResource *DbResource) GetRowsByWhereClause(typeName string, includedRelations map[string]bool, where ...goqu.Ex) ([]map[string]interface{}, [][]map[string]interface{}, error)
- func (dbResource *DbResource) GetRowsByWhereClauseWithTransaction(typeName string, includedRelations map[string]bool, transaction *sqlx.Tx, ...) ([]map[string]interface{}, [][]map[string]interface{}, error)
- func (dbResource *DbResource) GetSingleColumnValueByReferenceId(typeName string, selectColumn []interface{}, matchColumn string, ...) ([]interface{}, error)
- func (dbResource *DbResource) GetSingleRowById(typeName string, id int64, includedRelations map[string]bool) (map[string]interface{}, []map[string]interface{}, error)
- func (dbResource *DbResource) GetSingleRowByReferenceId(typeName string, referenceId string, includedRelations map[string]bool) (map[string]interface{}, []map[string]interface{}, error)
- func (dbResource *DbResource) GetSingleRowByReferenceIdWithTransaction(typeName string, referenceId string, includedRelations map[string]bool, ...) (map[string]interface{}, []map[string]interface{}, error)
- func (dbResource *DbResource) GetTokenByTokenId(id int64) (*oauth2.Token, error)
- func (dbResource *DbResource) GetTokenByTokenName(name string) (*oauth2.Token, error)
- func (dbResource *DbResource) GetTokenByTokenReferenceId(referenceId string) (*oauth2.Token, *oauth2.Config, error)
- func (dbResource *DbResource) GetTotalCount() uint64
- func (dbResource *DbResource) GetTotalCountBySelectBuilder(builder *goqu.SelectDataset) uint64
- func (dbResource *DbResource) GetUserAccountRowByEmail(email string) (map[string]interface{}, error)
- func (dbResource *DbResource) GetUserAccountRowByEmailWithTransaction(email string, transaction *sqlx.Tx) (map[string]interface{}, error)
- func (dbResource *DbResource) GetUserById(userId int64) (map[string]interface{}, error)
- func (dbResource *DbResource) GetUserEmailIdByUsergroupId(usergroupId int64) string
- func (dbResource *DbResource) GetUserMailAccountRowByEmail(username string) (map[string]interface{}, error)
- func (dbResource *DbResource) GetUserMembersByGroupName(groupName string) []string
- func (dbResource *DbResource) GetUserPassword(email string) (string, error)
- func (db *DbResource) HandleActionRequest(actionRequest ActionRequest, req api2go.Request) ([]ActionResponse, error)
- func (dbResource *DbResource) IsAdmin(userReferenceId string) bool
- func (dbResource *DbResource) IsUserActionAllowed(userReferenceId string, userGroups []auth.GroupPermission, typeName string, ...) bool
- func (dbResource *DbResource) IsUserActionAllowedWithTransaction(userReferenceId string, userGroups []auth.GroupPermission, typeName string, ...) bool
- func (dbResource *DbResource) NewActiveTaskInstance(task Task) *ActiveTaskInstance
- func (dbResource *DbResource) PaginatedFindAll(req api2go.Request) (totalCount uint, response api2go.Responder, err error)
- func (dbResource *DbResource) PaginatedFindAllWithTransaction(req api2go.Request, transaction *sqlx.Tx) (totalCount uint, response api2go.Responder, err error)
- func (dbResource *DbResource) PaginatedFindAllWithoutFilters(req api2go.Request, transaction *sqlx.Tx) ([]map[string]interface{}, [][]map[string]interface{}, *PaginationData, bool, ...)
- func (dbResource *DbResource) PutContext(key string, val interface{})
- func (dbResource *DbResource) RenameMailAccountBox(mailAccountId int64, oldBoxName string, newBoxName string) error
- func (dbResource *DbResource) ResultToArrayOfMap(rows *sqlx.Rows, columnMap map[string]api2go.ColumnInfo, ...) ([]map[string]interface{}, [][]map[string]interface{}, error)
- func (dbResource *DbResource) ResultToArrayOfMapRaw(rows *sqlx.Rows, columnMap map[string]api2go.ColumnInfo) ([]map[string]interface{}, error)
- func (dbResource *DbResource) ResultToArrayOfMapWithTransaction(rows *sqlx.Rows, columnMap map[string]api2go.ColumnInfo, ...) ([]map[string]interface{}, [][]map[string]interface{}, error)
- func (dbResource *DbResource) SetMailBoxSubscribed(mailAccountId int64, mailBoxName string, subscribed bool) error
- func (dbResource *DbResource) StoreToken(token *oauth2.Token, token_type string, oauth_connect_reference_id string, ...) error
- func (dbResource *DbResource) SyncStorageToPath(cloudStore CloudStore, path string, tempDirectoryPath string) error
- func (dbResource *DbResource) TableInfo() *TableInfo
- func (dbResource *DbResource) TruncateTable(typeName string, skipRelations bool) error
- func (dbResource *DbResource) Update(obj interface{}, req api2go.Request) (api2go.Responder, error)
- func (dbResource *DbResource) UpdateAccessTokenByTokenId(id int64, accessToken string, expiresIn int64) error
- func (dbResource *DbResource) UpdateAccessTokenByTokenReferenceId(referenceId string, accessToken string, expiresIn int64) error
- func (dbResource *DbResource) UpdateMailFlags(mailBoxId int64, mailId int64, newFlags []string) error
- func (dbResource *DbResource) UpdateWithTransaction(obj interface{}, req api2go.Request, transaction *sqlx.Tx) (api2go.Responder, error)
- func (dbResource *DbResource) UpdateWithoutFilters(obj interface{}, req api2go.Request, updateTransaction *sqlx.Tx) (map[string]interface{}, error)
- func (dbResource *DbResource) UserGroupNameToId(groupName string) (uint64, error)
- func (dbResource *DbResource) UserGroupNameToIdWithTransaction(groupName string, transaction *sqlx.Tx) (uint64, error)
- type DefaultTaskScheduler
- type EventMessage
- type ExchangeContract
- type ExchangeExecution
- type ExchangeInterface
- type ExternalExchange
- type Faker
- type FsmManager
- type Group
- type Integration
- type LoopbackEventDesc
- type LoopbookFsmDescription
- type MiddlewareSet
- type Mode
- type ObjectAccessPermissionChecker
- func (pc *ObjectAccessPermissionChecker) InterceptAfter(dr *DbResource, req *api2go.Request, results []map[string]interface{}, ...) ([]map[string]interface{}, error)
- func (pc *ObjectAccessPermissionChecker) InterceptBefore(dr *DbResource, req *api2go.Request, results []map[string]interface{}, ...) ([]map[string]interface{}, error)
- func (pc *ObjectAccessPermissionChecker) String() string
- type Outcome
- type PaginationData
- type PermissionInstance
- func (p PermissionInstance) CanCreate(userId string, usergroupId []auth.GroupPermission) bool
- func (p PermissionInstance) CanDelete(userId string, usergroupId []auth.GroupPermission) bool
- func (p PermissionInstance) CanExecute(userId string, usergroupId []auth.GroupPermission) bool
- func (p PermissionInstance) CanPeek(userId string, usergroupId []auth.GroupPermission) bool
- func (p PermissionInstance) CanRead(userId string, usergroupId []auth.GroupPermission) bool
- func (p PermissionInstance) CanRefer(userId string, usergroupId []auth.GroupPermission) bool
- func (p PermissionInstance) CanUpdate(userId string, usergroupId []auth.GroupPermission) bool
- type Query
- type RestExchange
- type RestExternalExchange
- type StateMachineEvent
- type StateMachineInstance
- type StatusResponse
- type StreamContract
- type StreamProcessor
- func (dr *StreamProcessor) Create(obj interface{}, req api2go.Request) (api2go.Responder, error)
- func (dr *StreamProcessor) Delete(id string, req api2go.Request) (api2go.Responder, error)
- func (dr *StreamProcessor) FindOne(ID string, req api2go.Request) (api2go.Responder, error)
- func (dr *StreamProcessor) GetContract() StreamContract
- func (dr *StreamProcessor) GetName() string
- func (dr *StreamProcessor) PaginatedFindAll(req api2go.Request) (totalCount uint, response api2go.Responder, err error)
- func (dr *StreamProcessor) Update(obj interface{}, req api2go.Request) (api2go.Responder, error)
- type SubSite
- type SubSiteInformation
- type TableAccessPermissionChecker
- func (pc *TableAccessPermissionChecker) InterceptAfter(dr *DbResource, req *api2go.Request, results []map[string]interface{}, ...) ([]map[string]interface{}, error)
- func (pc *TableAccessPermissionChecker) InterceptBefore(dr *DbResource, req *api2go.Request, results []map[string]interface{}, ...) ([]map[string]interface{}, error)
- func (pc *TableAccessPermissionChecker) String() string
- type TableInfo
- type TableRelation
- type Task
- type TaskScheduler
- type TimeStamp
- type TokenResponse
- type Transformation
Constants ¶
const DATE_LAYOUT = "2006-01-02 15:04:05"
const USER_ACCOUNT_ID_COLUMN = "user_account_id"
const USER_ACCOUNT_TABLE_NAME = "user_account"
Variables ¶
var ColumnTypes = []ColumnType{ { Name: "id", BlueprintType: "string", ReclineType: "string", Validations: []string{}, DataTypes: []string{"varchar(20)", "varchar(10)"}, GraphqlType: graphql.ID, }, { Name: "alias", BlueprintType: "string", ReclineType: "string", DataTypes: []string{"varchar(100)", "varchar(20)", "varchar(10)"}, GraphqlType: graphql.String, }, { Name: "enum", BlueprintType: "string", ReclineType: "string", DataTypes: []string{"varchar(50)", "varchar(20)", "varchar(10)"}, GraphqlType: graphql.String, }, { Name: "date", BlueprintType: "string", ReclineType: "date", DataTypes: []string{"timestamp"}, GraphqlType: graphql.DateTime, }, { Name: "time", BlueprintType: "string", ReclineType: "time", DataTypes: []string{"timestamp"}, GraphqlType: graphql.String, }, { Name: "day", BlueprintType: "string", ReclineType: "string", DataTypes: []string{"varchar(10)"}, GraphqlType: graphql.String, }, { Name: "month", BlueprintType: "number", ReclineType: "string", Validations: []string{"min=1,max=12"}, DataTypes: []string{"int(4)"}, GraphqlType: graphql.Int, }, { Name: "year", BlueprintType: "number", ReclineType: "string", Validations: []string{"min=100,max=2100"}, DataTypes: []string{"int(4)"}, GraphqlType: graphql.Int, }, { Name: "minute", BlueprintType: "number", Validations: []string{"min=0,max=59"}, DataTypes: []string{"int(4)"}, GraphqlType: graphql.Int, }, { Name: "hour", BlueprintType: "number", ReclineType: "string", DataTypes: []string{"int(4)"}, GraphqlType: graphql.Int, }, { Name: "datetime", BlueprintType: "string", ReclineType: "date-time", DataTypes: []string{"timestamp"}, GraphqlType: graphql.DateTime, }, { Name: "email", BlueprintType: "string", ReclineType: "string", Validations: []string{"email"}, Conformations: []string{"email"}, DataTypes: []string{"varchar(100)"}, GraphqlType: graphql.String, }, { Name: "namespace", BlueprintType: "string", ReclineType: "string", DataTypes: []string{"varchar(200)"}, GraphqlType: graphql.String, }, { Name: "name", BlueprintType: "string", ReclineType: "string", Validations: []string{"required"}, Conformations: []string{"name"}, DataTypes: []string{"varchar(100)"}, GraphqlType: graphql.String, }, { Name: "encrypted", ReclineType: "string", BlueprintType: "string", DataTypes: []string{"varchar(100)", "varchar(500)", "varchar(500)", "text"}, GraphqlType: graphql.String, }, { Name: "json", ReclineType: "string", BlueprintType: "string", DataTypes: []string{"text", "varchar(100)"}, GraphqlType: graphql.String, }, { Name: "password", BlueprintType: "string", ReclineType: "string", Validations: []string{"required"}, DataTypes: []string{"varchar(200)"}, GraphqlType: graphql.String, }, { Name: "md5", BlueprintType: "string", ReclineType: "string", Validations: []string{"required"}, DataTypes: []string{"varchar(200)"}, GraphqlType: graphql.String, }, { Name: "bcrypt", BlueprintType: "string", ReclineType: "string", Validations: []string{"required"}, DataTypes: []string{"varchar(200)"}, GraphqlType: graphql.String, }, { Name: "md5-bcrypt", BlueprintType: "string", ReclineType: "string", Validations: []string{"required"}, DataTypes: []string{"varchar(200)"}, GraphqlType: graphql.String, }, { Name: "value", ReclineType: "string", BlueprintType: "string", DataTypes: []string{"varchar(100)"}, GraphqlType: graphql.String, }, { Name: "truefalse", BlueprintType: "boolean", ReclineType: "boolean", DataTypes: []string{"boolean"}, GraphqlType: graphql.Boolean, }, { Name: "timestamp", BlueprintType: "string", ReclineType: "date-time", DataTypes: []string{"timestamp"}, GraphqlType: graphql.DateTime, }, { Name: "location", BlueprintType: "string", ReclineType: "geo_point", DataTypes: []string{"varchar(50)"}, GraphqlType: graphql.String, }, { Name: "location.latitude", BlueprintType: "number", ReclineType: "number", Validations: []string{"latitude"}, DataTypes: []string{"float(7,4)"}, GraphqlType: graphql.Float, }, { Name: "location.longitude", BlueprintType: "number", ReclineType: "number", Validations: []string{"longitude"}, DataTypes: []string{"float(7,4)"}, GraphqlType: graphql.Float, }, { Name: "location.altitude", BlueprintType: "number", ReclineType: "number", DataTypes: []string{"float(7,4)"}, GraphqlType: graphql.Float, }, { Name: "color", BlueprintType: "string", ReclineType: "string", Validations: []string{"iscolor"}, DataTypes: []string{"varchar(50)"}, GraphqlType: graphql.String, }, { Name: "rating", BlueprintType: "number", ReclineType: "number", Validations: []string{"min=0,max=10"}, DataTypes: []string{"int(4)"}, GraphqlType: graphql.Int, }, { Name: "measurement", ReclineType: "number", BlueprintType: "number", DataTypes: []string{"int(10)"}, GraphqlType: graphql.Int, }, { Name: "float", ReclineType: "number", BlueprintType: "number", DataTypes: []string{"float(7,4)"}, GraphqlType: graphql.Float, }, { Name: "label", ReclineType: "string", BlueprintType: "string", DataTypes: []string{"varchar(100)"}, GraphqlType: graphql.String, }, { Name: "hidden", ReclineType: "string", BlueprintType: "string", DataTypes: []string{"varchar(100)"}, GraphqlType: graphql.String, }, { Name: "content", ReclineType: "string", BlueprintType: "string", DataTypes: []string{"text"}, GraphqlType: graphql.String, }, { Name: "html", ReclineType: "string", BlueprintType: "string", DataTypes: []string{"text"}, GraphqlType: graphql.String, }, { Name: "markdown", ReclineType: "string", BlueprintType: "string", DataTypes: []string{"text"}, GraphqlType: graphql.String, }, { Name: "file", BlueprintType: "string", ReclineType: "binary", Validations: []string{"base64"}, DataTypes: []string{"blob"}, GraphqlType: graphql.String, }, { Name: "json", BlueprintType: "string", ReclineType: "string", Validations: []string{"text"}, DataTypes: []string{"JSON"}, GraphqlType: graphql.String, }, { Name: "image", BlueprintType: "string", ReclineType: "binary", Validations: []string{"base64"}, DataTypes: []string{"blob"}, GraphqlType: graphql.String, }, { Name: "gzip", BlueprintType: "string", ReclineType: "binary", Validations: []string{"base64"}, DataTypes: []string{"blob"}, GraphqlType: graphql.String, }, { Name: "video", BlueprintType: "string", ReclineType: "binary", Validations: []string{"base64"}, DataTypes: []string{"blob"}, GraphqlType: graphql.String, }, { Name: "url", BlueprintType: "string", ReclineType: "string", Validations: []string{"url"}, DataTypes: []string{"varchar(500)"}, GraphqlType: graphql.String, }, }
var ConfigTableStructure = TableInfo{ TableName: settingsTableName, Columns: []api2go.ColumnInfo{ { Name: "id", ColumnName: "id", ColumnType: "id", DataType: "INTEGER", IsPrimaryKey: true, IsAutoIncrement: true, }, { Name: "name", ColumnName: "name", ColumnType: "string", DataType: "varchar(100)", IsNullable: false, IsIndexed: true, }, { Name: "ConfigType", ColumnName: "configtype", ColumnType: "string", DataType: "varchar(100)", IsNullable: false, IsIndexed: true, }, { Name: "ConfigState", ColumnName: "configstate", ColumnType: "string", DataType: "varchar(100)", IsNullable: false, IsIndexed: true, }, { Name: "ConfigEnv", ColumnName: "configenv", ColumnType: "string", DataType: "varchar(100)", IsNullable: false, IsIndexed: true, }, { Name: "Value", ColumnName: "value", ColumnType: "string", DataType: "varchar(5000)", IsNullable: true, IsIndexed: true, }, { Name: "ValueType", ColumnName: "valuetype", ColumnType: "string", DataType: "varchar(100)", IsNullable: true, IsIndexed: true, }, { Name: "PreviousValue", ColumnName: "previousvalue", ColumnType: "string", DataType: "varchar(100)", IsNullable: true, IsIndexed: true, }, { Name: "CreatedAt", ColumnName: "created_at", ColumnType: "datetime", DataType: "timestamp", DefaultValue: "current_timestamp", IsNullable: false, IsIndexed: true, }, { Name: "UpdatedAt", ColumnName: "updated_at", ColumnType: "datetime", DataType: "timestamp", IsNullable: true, IsIndexed: true, }, }, }
var EntityTypeToColumnTypeMap = map[fieldtypes.EntityType]string{
fieldtypes.DateTime: "datetime",
fieldtypes.Id: "label",
fieldtypes.Time: "time",
fieldtypes.Date: "date",
fieldtypes.Ipaddress: "label",
fieldtypes.Money: "measurement",
fieldtypes.Rating5: "measurement",
fieldtypes.Rating10: "measurement",
fieldtypes.Rating100: "measurement",
fieldtypes.Timestamp: "timestamp",
fieldtypes.NumberInt: "measurement",
fieldtypes.NumberFloat: "measurement",
fieldtypes.Boolean: "truefalse",
fieldtypes.Latitude: "location.latitude",
fieldtypes.Longitude: "location.longitude",
fieldtypes.City: "label",
fieldtypes.Country: "label",
fieldtypes.Continent: "label",
fieldtypes.State: "label",
fieldtypes.Pincode: "label",
fieldtypes.None: "content",
fieldtypes.Label: "label",
fieldtypes.Name: "name",
fieldtypes.Email: "email",
fieldtypes.Content: "content",
fieldtypes.Json: "json",
fieldtypes.Color: "color",
fieldtypes.Alias: "alias",
fieldtypes.Namespace: "namespace",
}
var ( errors.New("forbidden") )ErrUnauthorized =
var OlricCache *olric.DMap
var OperatorMap = map[string]string{
"contains": "like",
"like": "like",
"ilike": "iLike",
"begins with": "like",
"ends with": "like",
"not contains": "notLike",
"not like": "notLike",
"not ilike": "notILike",
"is": "is",
"eq": "eq",
"neq": "neq",
"in": "in",
"is not": "isNot",
"before": "lt",
"after": "gt",
"more then": "gt",
"any of": "any of",
"none of": "none of",
"less then": "lt",
"is empty": "is nil",
"is true": "is true",
"is false": "is false",
}
var ReservedWords = []string{}/* 826 elements not displayed */
thanks to https://www.drupal.org/node/141051
var StandardColumns = []api2go.ColumnInfo{ { Name: "id", ColumnName: "id", DataType: "INTEGER", IsPrimaryKey: true, IsAutoIncrement: true, ExcludeFromApi: true, ColumnType: "id", }, { Name: "version", ColumnName: "version", DataType: "INTEGER", ColumnType: "measurement", DefaultValue: "1", ExcludeFromApi: true, }, { Name: "created_at", ColumnName: "created_at", DataType: "timestamp", DefaultValue: "current_timestamp", ColumnType: "datetime", IsIndexed: true, }, { Name: "updated_at", ColumnName: "updated_at", DataType: "timestamp", IsIndexed: true, IsNullable: true, ColumnType: "datetime", }, { Name: "reference_id", ColumnName: "reference_id", DataType: "char(36)", IsIndexed: true, IsUnique: true, IsNullable: false, ColumnType: "alias", }, { Name: "permission", ColumnName: "permission", DataType: "int(11)", IsIndexed: false, ColumnType: "value", }, }
var StandardRelations = []api2go.TableRelation{ api2go.NewTableRelation("action", "belongs_to", "world"), api2go.NewTableRelation("feed", "belongs_to", "stream"), api2go.NewTableRelation("world", "has_many", "smd"), api2go.NewTableRelation("oauth_token", "has_one", "oauth_connect"), api2go.NewTableRelation("data_exchange", "has_one", "oauth_token"), api2go.NewTableRelationWithNames("data_exchange", "user_data_exchange", "has_one", "user_account", "as_user_id"), api2go.NewTableRelation("timeline", "belongs_to", "world"), api2go.NewTableRelation("cloud_store", "has_one", "oauth_token"), api2go.NewTableRelation("site", "has_one", "cloud_store"), api2go.NewTableRelation("mail_account", "belongs_to", "mail_server"), api2go.NewTableRelation("mail_box", "belongs_to", "mail_account"), api2go.NewTableRelation("mail", "belongs_to", "mail_box"), api2go.NewTableRelationWithNames("task", "task_executed", "has_one", USER_ACCOUNT_TABLE_NAME, "as_user_id"), api2go.NewTableRelation("calendar", "has_one", "collection"), api2go.NewTableRelationWithNames("user_otp_account", "primary_user_otp", "belongs_to", "user_account", "otp_of_account"), }
var StandardStreams = []StreamContract{ { StreamName: "table", RootEntityName: "world", Columns: []api2go.ColumnInfo{ { Name: "table_name", ColumnType: "label", }, { Name: "reference_id", ColumnType: "label", }, }, }, { StreamName: "transformed_user", RootEntityName: USER_ACCOUNT_TABLE_NAME, Columns: []api2go.ColumnInfo{ { Name: "transformed_user_name", ColumnType: "label", }, { Name: "primary_email", ColumnType: "label", }, }, Transformations: []Transformation{ { Operation: "select", Attributes: map[string]interface{}{ "Columns": []string{"name", "email"}, }, }, { Operation: "rename", Attributes: map[string]interface{}{ "OldName": "name", "NewName": "transformed_user_name", }, }, { Operation: "rename", Attributes: map[string]interface{}{ "OldName": "email", "NewName": "primary_email", }, }, { Operation: "filter", Attributes: map[string]interface{}{}, }, }, }, }
var StandardTables = []TableInfo{ { TableName: "document", IsHidden: true, DefaultGroups: adminsGroup, Icon: "fa-file", Columns: []api2go.ColumnInfo{ { ColumnName: "document_name", Name: "document_name", ColumnType: "label", DataType: "varchar(100)", IsNullable: false, IsIndexed: true, }, { ColumnName: "document_path", Name: "document_path", ColumnType: "label", DataType: "varchar(2000)", IsNullable: false, IsIndexed: true, }, { ColumnName: "document_extension", Name: "document_extension", ColumnType: "label", DataType: "varchar(50)", IsNullable: false, IsIndexed: true, }, { ColumnName: "mime_type", Name: "mime_type", ColumnType: "label", DataType: "varchar(50)", IsNullable: false, IsIndexed: true, }, { ColumnName: "document_content", Name: "document_content", IsForeignKey: true, IsNullable: false, ColumnType: "file.*", DataType: "longblob", ForeignKeyData: api2go.ForeignKeyData{ DataSource: "cloud_store", Namespace: "localstore", KeyName: "documents", }, }, }, }, { TableName: "calendar", IsHidden: true, DefaultGroups: adminsGroup, Icon: "fa-calendar-alt", Columns: []api2go.ColumnInfo{ { ColumnName: "rpath", Name: "rpath", ColumnType: "label", IsUnique: true, DataType: "varchar(500)", IsNullable: false, }, { ColumnName: "content", Name: "content", ColumnType: "file.ical", DataType: "longblob", IsNullable: false, IsForeignKey: true, ForeignKeyData: api2go.ForeignKeyData{ DataSource: "cloud_store", Namespace: "localstore", KeyName: "caldav", }, }, }, }, { TableName: "collection", IsHidden: true, DefaultGroups: adminsGroup, Icon: "fa-calendar-alt", Columns: []api2go.ColumnInfo{ { ColumnName: "name", Name: "name", ColumnType: "label", DataType: "varchar(500)", IsNullable: false, IsIndexed: true, }, { ColumnName: "description", Name: "description", ColumnType: "label", DataType: "text", IsNullable: false, IsIndexed: true, }, }, }, { TableName: "certificate", IsHidden: true, DefaultGroups: adminsGroup, Icon: "fa-certificate", Columns: []api2go.ColumnInfo{ { Name: "hostname", ColumnName: "hostname", IsUnique: true, IsIndexed: true, ColumnType: "label", DataType: "varchar(100)", IsNullable: false, }, { Name: "issuer", ColumnName: "issuer", ColumnType: "label", DataType: "varchar(100)", IsNullable: false, DefaultValue: "'self'", }, { Name: "generated_at", ColumnName: "generated_at", ColumnType: "datetime", DataType: "timestamp", IsNullable: true, }, { Name: "certificate_pem", ColumnName: "certificate_pem", ColumnType: "content", DataType: "text", IsNullable: true, }, { Name: "root_certificate", ColumnName: "root_certificate", ColumnType: "content", DataType: "text", IsNullable: true, }, { Name: "private_key_pem", ColumnName: "private_key_pem", ColumnType: "encrypted", DataType: "text", IsNullable: true, }, { Name: "public_key_pem", ColumnName: "public_key_pem", ColumnType: "content", DataType: "text", IsNullable: true, }, }, }, { TableName: "feed", IsHidden: true, DefaultGroups: adminsGroup, Icon: "fa-rss", Columns: []api2go.ColumnInfo{ { Name: "feed_name", ColumnName: "feed_name", IsUnique: true, IsIndexed: true, ColumnType: "label", DataType: "varchar(100)", IsNullable: false, }, { Name: "title", ColumnName: "title", ColumnType: "label", DataType: "varchar(500)", IsNullable: false, DefaultValue: "''", }, { Name: "title", ColumnName: "title", ColumnType: "label", DataType: "varchar(500)", IsNullable: false, DefaultValue: "''", }, { Name: "description", ColumnName: "description", ColumnType: "label", DataType: "text", IsNullable: false, }, { Name: "link", ColumnName: "link", ColumnType: "label", DataType: "varchar(1000)", IsNullable: false, DefaultValue: "''", }, { Name: "author_name", ColumnName: "author_name", ColumnType: "label", DataType: "varchar(500)", IsNullable: false, DefaultValue: "''", }, { Name: "author_email", ColumnName: "author_email", ColumnType: "label", DataType: "varchar(500)", IsNullable: false, DefaultValue: "''", }, { Name: "enable", ColumnName: "enable", ColumnType: "truefalse", DataType: "bool", IsNullable: false, DefaultValue: "false", }, { Name: "enable_atom", ColumnName: "enable_atom", ColumnType: "truefalse", DataType: "bool", IsNullable: false, DefaultValue: "true", }, { Name: "enable_json", ColumnName: "enable_json", ColumnType: "truefalse", DataType: "bool", IsNullable: false, DefaultValue: "true", }, { Name: "enable_rss", ColumnName: "enable_rss", ColumnType: "truefalse", DataType: "bool", IsNullable: false, DefaultValue: "true", }, { Name: "page_size", ColumnName: "page_size", ColumnType: "measurement", DataType: "int(11)", IsNullable: false, DefaultValue: "1000", }, }, }, { TableName: "integration", IsHidden: true, DefaultGroups: adminsGroup, Icon: "fa-exchange-alt", Columns: []api2go.ColumnInfo{ { Name: "name", ColumnName: "name", IsUnique: true, IsIndexed: true, ColumnType: "label", DataType: "varchar(100)", IsNullable: false, }, { Name: "specification_language", ColumnName: "specification_language", ColumnType: "label", DataType: "varchar(20)", IsNullable: false, }, { Name: "specification_format", ColumnName: "specification_format", ColumnType: "label", DataType: "varchar(10)", DefaultValue: "'json'", }, { Name: "specification", ColumnName: "specification", ColumnType: "content", DataType: "mediumtext", IsNullable: false, }, { Name: "authentication_type", ColumnName: "authentication_type", ColumnType: "label", }, { Name: "authentication_specification", ColumnName: "authentication_specification", ColumnType: "encrypted", DataType: "text", IsNullable: false, }, { Name: "enable", ColumnName: "enable", ColumnType: "truefalse", DataType: "bool", DefaultValue: "true", IsNullable: false, }, }, }, { TableName: "task", IsHidden: true, DefaultGroups: adminsGroup, Icon: "fa-clock", Columns: []api2go.ColumnInfo{ { Name: "name", ColumnName: "name", DataType: "varchar(100)", ColumnType: "label", IsIndexed: true, }, { Name: "action_name", ColumnName: "action_name", DataType: "varchar(100)", ColumnType: "label", }, { Name: "entity_name", ColumnName: "entity_name", DataType: "varchar(100)", ColumnType: "label", }, { Name: "schedule", ColumnName: "schedule", DataType: "varchar(100)", ColumnType: "label", }, { Name: "active", ColumnName: "active", DataType: "bool", ColumnType: "truefalse", }, { Name: "attributes", ColumnName: "attributes", DataType: "text", ColumnType: "json", }, { Name: "job_type", ColumnName: "job_type", DataType: "varchar(100)", ColumnType: "label", }, }, }, { TableName: "json_schema", Icon: "fa-code", DefaultGroups: adminsGroup, IsHidden: true, Columns: []api2go.ColumnInfo{ { Name: "schema_name", ColumnName: "schema_name", ColumnType: "label", DataType: "varchar(100)", IsNullable: false, }, { Name: "json_schema", ColumnType: "json", DataType: "text", ColumnName: "json_schema", }, }, }, { TableName: "timeline", Icon: "fa-clock-o", DefaultGroups: adminsGroup, IsHidden: true, Columns: []api2go.ColumnInfo{ { Name: "event_type", ColumnName: "event_type", ColumnType: "label", DataType: "varchar(50)", IsNullable: false, }, { Name: "title", ColumnName: "title", ColumnType: "label", IsIndexed: true, DataType: "varchar(50)", IsNullable: false, }, { Name: "payload", ColumnName: "payload", ColumnType: "content", DataType: "text", IsNullable: true, }, }, }, { TableName: "world", IsHidden: true, DefaultGroups: adminsGroup, Icon: "fa-home", Columns: []api2go.ColumnInfo{ { Name: "table_name", ColumnName: "table_name", IsNullable: false, IsUnique: true, IsIndexed: true, DataType: "varchar(200)", ColumnType: "name", }, { Name: "world_schema_json", ColumnName: "world_schema_json", DataType: "text", IsNullable: false, ColumnType: "json", }, { Name: "default_permission", ColumnName: "default_permission", DataType: "int(4)", IsNullable: false, DefaultValue: "644", ColumnType: "value", }, { Name: "is_top_level", ColumnName: "is_top_level", DataType: "bool", IsNullable: false, DefaultValue: "true", ColumnType: "truefalse", }, { Name: "is_hidden", ColumnName: "is_hidden", DataType: "bool", IsNullable: false, DefaultValue: "false", ColumnType: "truefalse", }, { Name: "is_join_table", ColumnName: "is_join_table", DataType: "bool", IsNullable: false, DefaultValue: "false", ColumnType: "truefalse", }, { Name: "is_state_tracking_enabled", ColumnName: "is_state_tracking_enabled", DataType: "bool", IsNullable: false, DefaultValue: "false", ColumnType: "truefalse", }, { Name: "default_order", ColumnName: "default_order", DataType: "varchar(100)", IsNullable: true, DefaultValue: "'+id'", ColumnType: "value", }, { Name: "icon", ColumnName: "icon", DataType: "varchar(20)", IsNullable: true, DefaultValue: "'fa-star'", ColumnType: "label", }, }, }, { TableName: "stream", Icon: "fa-strikethrough", DefaultGroups: adminsGroup, IsHidden: true, Columns: []api2go.ColumnInfo{ { Name: "stream_name", ColumnName: "stream_name", DataType: "varchar(100)", IsNullable: false, ColumnType: "label", IsIndexed: true, }, { Name: "enable", ColumnName: "enable", DataType: "bool", IsNullable: false, ColumnType: "truefalse", DefaultValue: "true", }, { Name: "stream_contract", ColumnName: "stream_contract", DataType: "text", IsNullable: false, ColumnType: "json", }, }, }, { TableName: "user_otp_account", Icon: "fa-sms", IsHidden: true, DefaultGroups: []string{}, Columns: []api2go.ColumnInfo{ { ColumnName: "mobile_number", IsIndexed: true, IsNullable: true, DataType: "varchar(20)", ColumnType: "label", }, { ColumnName: "otp_secret", IsIndexed: true, ExcludeFromApi: true, DataType: "varchar(100)", ColumnType: "encrypted", }, { ColumnName: "verified", DataType: "bool", DefaultValue: "false", ColumnType: "truefalse", Name: "verified", }, }, }, { TableName: USER_ACCOUNT_TABLE_NAME, Icon: "fa-user", DefaultGroups: []string{"users"}, Columns: []api2go.ColumnInfo{ { Name: "name", ColumnName: "name", IsIndexed: true, DataType: "varchar(80)", ColumnType: "label", }, { Name: "email", ColumnName: "email", DataType: "varchar(80)", IsIndexed: true, IsUnique: true, ColumnType: "email", }, { Name: "password", ColumnName: "password", DataType: "varchar(100)", ColumnType: "password", IsNullable: true, }, { Name: "confirmed", ColumnName: "confirmed", DataType: "bool", ColumnType: "truefalse", IsNullable: false, DefaultValue: "false", }, }, Validations: []ColumnTag{ { ColumnName: "email", Tags: "email", }, { ColumnName: "password", Tags: "required", }, { ColumnName: "name", Tags: "required", }, }, Conformations: []ColumnTag{ { ColumnName: "email", Tags: "email", }, }, }, { TableName: "usergroup", Icon: "fa-users", IsHidden: true, Columns: []api2go.ColumnInfo{ { Name: "name", ColumnName: "name", IsIndexed: true, IsUnique: true, DataType: "varchar(80)", ColumnType: "label", }, }, }, { TableName: "action", DefaultGroups: adminsGroup, IsHidden: true, Icon: "fa-bolt", Columns: []api2go.ColumnInfo{ { Name: "action_name", IsIndexed: true, ColumnName: "action_name", DataType: "varchar(100)", ColumnType: "label", }, { Name: "label", ColumnName: "label", IsIndexed: true, DataType: "varchar(100)", ColumnType: "label", }, { Name: "instance_optional", ColumnName: "instance_optional", IsIndexed: false, DataType: "bool", ColumnType: "truefalse", DefaultValue: "true", }, { Name: "action_schema", ColumnName: "action_schema", DataType: "text", ColumnType: "json", }, }, }, { TableName: "smd", IsHidden: true, DefaultGroups: adminsGroup, Columns: []api2go.ColumnInfo{ { Name: "name", ColumnName: "name", IsIndexed: true, DataType: "varchar(100)", ColumnType: "label", IsNullable: false, }, { Name: "label", ColumnName: "label", DataType: "varchar(100)", ColumnType: "label", IsNullable: false, }, { Name: "initial_state", ColumnName: "initial_state", DataType: "varchar(100)", ColumnType: "label", IsNullable: false, }, { Name: "events", ColumnName: "events", DataType: "text", ColumnType: "json", IsNullable: false, }, }, }, { TableName: "oauth_connect", IsHidden: true, DefaultGroups: adminsGroup, Columns: []api2go.ColumnInfo{ { Name: "name", ColumnName: "name", IsUnique: true, IsIndexed: true, DataType: "varchar(80)", ColumnType: "label", }, { Name: "client_id", ColumnName: "client_id", DataType: "varchar(150)", ColumnType: "label", }, { Name: "client_secret", ColumnName: "client_secret", DataType: "varchar(500)", ColumnType: "encrypted", }, { Name: "scope", ColumnName: "scope", DataType: "varchar(1000)", ColumnType: "content", DefaultValue: "'https://www.googleapis.com/auth/spreadsheets'", }, { Name: "response_type", ColumnName: "response_type", DataType: "varchar(80)", ColumnType: "label", DefaultValue: "'code'", }, { Name: "redirect_uri", ColumnName: "redirect_uri", DataType: "varchar(80)", ColumnType: "url", DefaultValue: "'/oauth/response'", }, { Name: "auth_url", ColumnName: "auth_url", DataType: "varchar(200)", DefaultValue: "'https://accounts.google.com/o/oauth2/auth'", ColumnType: "url", }, { Name: "token_url", ColumnName: "token_url", DataType: "varchar(200)", DefaultValue: "'https://accounts.google.com/o/oauth2/token'", ColumnType: "url", }, { Name: "profile_url", ColumnName: "profile_url", DataType: "varchar(200)", DefaultValue: "'https://www.googleapis.com/oauth2/v1/userinfo?alt=json'", ColumnType: "url", }, { Name: "profile_email_path", ColumnName: "profile_email_path", DataType: "varchar(200)", DefaultValue: "'email'", ColumnType: "label", }, { Name: "allow_login", ColumnName: "allow_login", DataType: "bool", DefaultValue: "false", ColumnType: "truefalse", }, { Name: "access_type_offline", ColumnName: "access_type_offline", DataType: "bool", DefaultValue: "false", ColumnType: "truefalse", }, }, }, { TableName: "data_exchange", IsHidden: true, DefaultGroups: adminsGroup, Columns: []api2go.ColumnInfo{ { Name: "name", ColumnName: "name", ColumnType: "label", IsUnique: true, DataType: "varchar(200)", IsIndexed: true, }, { Name: "source_attributes", ColumnName: "source_attributes", ColumnType: "json", DataType: "text", }, { Name: "source_type", ColumnName: "source_type", ColumnType: "label", DataType: "varchar(100)", }, { Name: "target_attributes", ColumnName: "target_attributes", ColumnType: "json", DataType: "text", }, { Name: "attributes", ColumnName: "attributes", ColumnType: "json", DataType: "text", }, { Name: "target_type", ColumnName: "target_type", ColumnType: "label", DataType: "varchar(100)", }, { Name: "options", ColumnName: "options", ColumnType: "json", DataType: "text", }, }, }, { TableName: "oauth_token", IsHidden: true, DefaultGroups: adminsGroup, Columns: []api2go.ColumnInfo{ { Name: "access_token", ColumnName: "access_token", ColumnType: "encrypted", DataType: "varchar(1000)", }, { Name: "expires_in", ColumnName: "expires_in", ColumnType: "measurement", DataType: "int(11)", }, { Name: "refresh_token", ColumnName: "refresh_token", ColumnType: "encrypted", DataType: "varchar(1000)", }, { Name: "token_type", ColumnName: "token_type", ColumnType: "label", DataType: "varchar(20)", }, }, }, { TableName: "cloud_store", DefaultGroups: adminsGroup, IsHidden: true, Columns: []api2go.ColumnInfo{ { Name: "Name", ColumnName: "name", ColumnType: "label", DataType: "varchar(100)", IsUnique: true, }, { Name: "store_type", ColumnName: "store_type", ColumnType: "label", DataType: "varchar(100)", }, { Name: "store_provider", ColumnName: "store_provider", ColumnType: "label", DataType: "varchar(100)", }, { Name: "root_path", ColumnName: "root_path", ColumnType: "label", DataType: "varchar(1000)", }, { Name: "store_parameters", ColumnName: "store_parameters", ColumnType: "json", DataType: "text", }, }, }, { TableName: "site", DefaultGroups: adminsGroup, IsHidden: true, Columns: []api2go.ColumnInfo{ { Name: "name", ColumnName: "name", ColumnType: "label", DataType: "varchar(100)", }, { Name: "hostname", ColumnName: "hostname", ColumnType: "label", DataType: "varchar(100)", }, { Name: "path", ColumnName: "path", ColumnType: "label", DataType: "varchar(100)", ColumnDescription: "path on the cloud store to host as base directory", }, { Name: "enable", ColumnName: "enable", ColumnType: "truefalse", DataType: "bool", DefaultValue: "true", }, { Name: "enable_https", ColumnName: "enable_https", ColumnType: "truefalse", DataType: "bool", DefaultValue: "false", }, { Name: "ftp_enabled", ColumnName: "ftp_enabled", ColumnType: "truefalse", DataType: "bool", DefaultValue: "false", }, { Name: "site_type", ColumnName: "site_type", ColumnType: "label", DataType: "varchar(20)", DefaultValue: "'static'", }, }, }, { TableName: "mail_server", IsHidden: true, Icon: "fa-envelope", DefaultGroups: adminsGroup, Columns: []api2go.ColumnInfo{ { Name: "hostname", ColumnName: "hostname", DataType: "varchar(100)", ColumnType: "label", }, { Name: "is_enabled", ColumnName: "is_enabled", DataType: "bool", ColumnType: "truefalse", DefaultValue: "false", }, { Name: "listen_interface", ColumnName: "listen_interface", DataType: "varchar(100)", ColumnType: "label", DefaultValue: "'0.0.0.0:465'", }, { Name: "max_size", ColumnName: "max_size", DataType: "int(11)", ColumnType: "measurement", DefaultValue: "10000", }, { Name: "max_clients", ColumnName: "max_clients", DataType: "int(11)", ColumnType: "measurement", DefaultValue: "20", }, { Name: "xclient_on", ColumnName: "xclient_on", DataType: "bool", ColumnType: "truefalse", DefaultValue: "false", }, { Name: "always_on_tls", ColumnName: "always_on_tls", DataType: "bool", ColumnType: "truefalse", DefaultValue: "true", }, { Name: "authentication_required", ColumnName: "authentication_required", DataType: "bool", ColumnType: "truefalse", DefaultValue: "true", }, }, }, { TableName: "mail_account", IsHidden: true, DefaultGroups: adminsGroup, Icon: "fa-envelope", Columns: []api2go.ColumnInfo{ { Name: "username", ColumnName: "username", DataType: "varchar(100)", ColumnType: "label", IsUnique: true, }, { Name: "password", ColumnName: "password", ColumnType: "password", }, { Name: "password_md5", ColumnName: "password_md5", ColumnType: "md5-bcrypt", }, }, }, { TableName: "mail_box", IsHidden: true, DefaultGroups: adminsGroup, Columns: []api2go.ColumnInfo{ { Name: "name", ColumnName: "name", DataType: "varchar(100)", ColumnType: "label", }, { Name: "subscribed", ColumnName: "subscribed", DataType: "bool", ColumnType: "truefalse", DefaultValue: "true", }, { Name: "uidvalidity", ColumnName: "uidvalidity", DataType: "int(11)", ColumnType: "value", DefaultValue: "1", }, { Name: "nextuid", ColumnName: "nextuid", DataType: "int(11)", ColumnType: "value", DefaultValue: "1", }, { Name: "attributes", ColumnName: "attributes", DataType: "varchar(100)", ColumnType: "label", }, { Name: "flags", ColumnName: "flags", DataType: "varchar(100)", ColumnType: "label", }, { Name: "permanent_flags", ColumnName: "permanent_flags", DataType: "varchar(100)", ColumnType: "label", }, }, }, { TableName: "mail", IsHidden: true, Icon: "fa-envelope", DefaultGroups: adminsGroup, Columns: []api2go.ColumnInfo{ { Name: "message_id", ColumnName: "message_id", DataType: "varchar(100)", ColumnType: "label", }, { Name: "mail_id", ColumnName: "mail_id", DataType: "varchar(100)", ColumnType: "label", }, { Name: "from_address", ColumnName: "from_address", DataType: "varchar(200)", ColumnType: "label", }, { Name: "internal_date", ColumnName: "internal_date", DataType: "timestamp", ColumnType: "datetime", }, { Name: "to_address", ColumnName: "to_address", DataType: "varchar(200)", ColumnType: "label", }, { Name: "reply_to_address", ColumnName: "reply_to_address", DataType: "varchar(200)", ColumnType: "label", }, { Name: "sender_address", ColumnName: "sender_address", DataType: "varchar(200)", ColumnType: "label", }, { Name: "subject", ColumnName: "subject", DataType: "varchar(200)", ColumnType: "label", }, { Name: "body", ColumnName: "body", DataType: "text", ColumnType: "label", }, { Name: "mail", ColumnName: "mail", ColumnType: "gzip", DataType: "blob", }, { Name: "spam_score", ColumnName: "spam_score", ColumnType: "measurement", DataType: "float", }, { Name: "hash", ColumnName: "hash", DataType: "varchar(100)", ColumnType: "label", }, { Name: "content_type", ColumnName: "content_type", DataType: "text", ColumnType: "content", }, { Name: "recipient", ColumnName: "recipient", DataType: "varchar(200)", ColumnType: "label", }, { Name: "has_attachment", ColumnName: "has_attachment", DataType: "bool", ColumnType: "truefalse", DefaultValue: "false", }, { Name: "ip_addr", ColumnName: "ip_addr", DataType: "varchar(30)", ColumnType: "label", }, { Name: "return_path", ColumnName: "return_path", DataType: "VARCHAR(255)", ColumnType: "content", }, { Name: "is_tls", ColumnName: "is_tls", DataType: "bool", ColumnType: "truefalse", DefaultValue: "false", }, { Name: "seen", ColumnName: "seen", DataType: "bool", ColumnType: "truefalse", DefaultValue: "false", }, { Name: "recent", ColumnName: "recent", DataType: "bool", ColumnType: "truefalse", DefaultValue: "true", }, { Name: "deleted", ColumnName: "deleted", DataType: "bool", ColumnType: "truefalse", DefaultValue: "false", }, { Name: "spam", ColumnName: "spam", DataType: "bool", ColumnType: "truefalse", DefaultValue: "false", }, { Name: "size", ColumnName: "size", DataType: "int(11)", ColumnType: "value", }, { Name: "flags", ColumnName: "flags", DataType: "varchar(500)", ColumnType: "label", DefaultValue: "", }, }, }, { TableName: "outbox", IsHidden: true, Icon: "fa-envelope", DefaultGroups: adminsGroup, Columns: []api2go.ColumnInfo{ { Name: "from_address", ColumnName: "from_address", DataType: "varchar(200)", ColumnType: "label", }, { Name: "to_address", ColumnName: "to_address", DataType: "varchar(200)", ColumnType: "label", }, { Name: "to_host", ColumnName: "to_host", DataType: "varchar(200)", ColumnType: "label", }, { Name: "mail", ColumnName: "mail", ColumnType: "gzip", DataType: "blob", }, { Name: "sent", ColumnName: "sent", ColumnType: "truefalse", DataType: "bool", DefaultValue: "false", }, }, }, }
var StandardTasks []Task
var SystemActions = []Action{ { Name: "import_files_from_store", Label: "Import files data to a table", OnType: "world", InstanceOptional: false, InFields: []api2go.ColumnInfo{ { Name: "table_name", ColumnType: "label", ColumnName: "table_name", }, }, OutFields: []Outcome{ { Type: "cloud_store.files.import", Method: "EXECUTE", Attributes: map[string]interface{}{ "table_name": "$.table_name", }, }, }, }, { Name: "install_integration", Label: "Install integration", OnType: "integration", InstanceOptional: false, OutFields: []Outcome{ { Type: "integration.install", Method: "EXECUTE", Attributes: map[string]interface{}{ "reference_id": "$.reference_id", }, }, }, }, { Name: "download_certificate", Label: "Download certificate", OnType: "certificate", InstanceOptional: false, OutFields: []Outcome{ { Type: "client.file.download", Method: "ACTIONRESPONSE", Attributes: map[string]interface{}{ "content": "!btoa(subject.certificate_pem)", "name": "!subject.hostname + '.pem.crt'", "contentType": "application/x-x509-ca-cert", "message": "!'Certificate for ' + subject.hostname", }, }, }, }, { Name: "download_public_key", Label: "Download public key", OnType: "certificate", InstanceOptional: false, OutFields: []Outcome{ { Type: "client.file.download", Method: "ACTIONRESPONSE", Attributes: map[string]interface{}{ "content": "!btoa(subject.public_key_pem)", "name": "!subject.hostname + '.pem.key.pub'", "contentType": "application/x-x509-ca-cert", "message": "!'Public Key for ' + subject.hostname", }, }, }, }, { Name: "generate_acme_certificate", Label: "Generate ACME certificate", OnType: "certificate", InstanceOptional: false, InFields: []api2go.ColumnInfo{ { Name: "email", ColumnType: "label", ColumnName: "email", }, }, OutFields: []Outcome{ { Type: "acme.tls.generate", Method: "EXECUTE", Attributes: map[string]interface{}{ "email": "~email", "certificate": "~subject", }, }, }, }, { Name: "generate_self_certificate", Label: "Generate Self certificate", OnType: "certificate", InstanceOptional: false, InFields: []api2go.ColumnInfo{}, OutFields: []Outcome{ { Type: "self.tls.generate", Method: "EXECUTE", Attributes: map[string]interface{}{ "certificate": "~subject", }, }, }, }, { Name: "register_otp", Label: "Register Mobile Number", OnType: USER_ACCOUNT_TABLE_NAME, InstanceOptional: false, InFields: []api2go.ColumnInfo{ { Name: "mobile_number", ColumnName: "mobile_number", ColumnType: "label", }, }, OutFields: []Outcome{ { Type: "otp.generate", Method: "EXECUTE", Reference: "otp", Attributes: map[string]interface{}{ "email": "$.email", "mobile": "~mobile_number", }, }, }, }, { Name: "verify_mobile_number", Label: "Verify Mobile Number", OnType: "user_otp_account", InstanceOptional: true, InFields: []api2go.ColumnInfo{ { Name: "mobile_number", ColumnName: "mobile_number", ColumnType: "label", }, { Name: "email", ColumnName: "email", ColumnType: "label", }, { Name: "otp", ColumnName: "otp", ColumnType: "label", }, }, OutFields: []Outcome{ { Type: "otp.login.verify", Method: "EXECUTE", Attributes: map[string]interface{}{ "otp": "~otp", "mobile": "~mobile_number", }, }, }, }, { Name: "send_otp", Label: "Send OTP to mobile", OnType: "user_otp_account", InstanceOptional: true, InFields: []api2go.ColumnInfo{ { Name: "mobile_number", ColumnName: "mobile_number", ColumnType: "label", }, { Name: "email", ColumnName: "email", ColumnType: "label", }, }, OutFields: []Outcome{ { Type: "otp.generate", Method: "EXECUTE", Reference: "otp", Attributes: map[string]interface{}{ "email": "~email", "mobile": "~mobile_number", }, }, }, }, { Name: "verify_otp", Label: "Login with OTP", OnType: "user_account", InstanceOptional: true, InFields: []api2go.ColumnInfo{ { Name: "otp", ColumnName: "otp", ColumnType: "label", }, { Name: "mobile_number", ColumnName: "mobile_number", ColumnType: "label", }, }, OutFields: []Outcome{ { Type: "otp.login.verify", Method: "EXECUTE", Attributes: map[string]interface{}{ "otp": "~otp", "mobile": "~mobile_number", }, }, }, }, { Name: "remove_column", Label: "Delete column", OnType: "world", InstanceOptional: false, InFields: []api2go.ColumnInfo{ { Name: "column_name", ColumnName: "column_name", ColumnType: "label", }, }, OutFields: []Outcome{ { Type: "world.column.delete", Method: "EXECUTE", Attributes: map[string]interface{}{ "world_id": "$.reference_id", "column_name": "~column_name", }, }, }, }, { Name: "remove_table", Label: "Delete table", OnType: "world", InstanceOptional: false, InFields: []api2go.ColumnInfo{}, OutFields: []Outcome{ { Type: "world.delete", Method: "EXECUTE", Attributes: map[string]interface{}{ "world_id": "$.reference_id", }, }, }, }, { Name: "rename_column", Label: "Rename column", OnType: "world", InstanceOptional: true, InFields: []api2go.ColumnInfo{ { Name: "table_name", ColumnName: "table_name", ColumnType: "label", }, { Name: "column_name", ColumnName: "column_name", ColumnType: "label", }, { Name: "new_column_name", ColumnName: "new_column_name", ColumnType: "label", }, }, OutFields: []Outcome{ { Type: "world.column.rename", Method: "EXECUTE", Attributes: map[string]interface{}{ "world_name": "~table_name", "column_name": "~column_name", "new_column_name": "~new_column_name", }, }, }, }, { Name: "sync_site_storage", Label: "Sync site storage", OnType: "site", InstanceOptional: false, InFields: []api2go.ColumnInfo{ { Name: "Path", ColumnName: "path", ColumnType: "label", }, }, OutFields: []Outcome{ { Type: "site.storage.sync", Method: "EXECUTE", Attributes: map[string]interface{}{ "cloud_store_id": "$.cloud_store_id", "site_id": "$.reference_id", "path": "~path", }, }, }, }, { Name: "sync_column_storage", Label: "Sync column storage", OnType: "world", InstanceOptional: true, InFields: []api2go.ColumnInfo{ { Name: "Table name", ColumnName: "table_name", ColumnType: "label", }, { Name: "Column name", ColumnName: "column_name", ColumnType: "label", }, }, OutFields: []Outcome{ { Type: "column.storage.sync", Method: "EXECUTE", Attributes: map[string]interface{}{ "column_name": "~column_name", "table_name": "~table_name", }, }, }, }, { Name: "sync_mail_servers", Label: "Sync Mail Servers", OnType: "mail_server", InstanceOptional: true, InFields: []api2go.ColumnInfo{}, OutFields: []Outcome{ { Type: "mail.servers.sync", Method: "EXECUTE", Attributes: map[string]interface{}{}, }, }, }, { Name: "restart_daptin", Label: "Restart system", OnType: "world", InstanceOptional: true, InFields: []api2go.ColumnInfo{}, OutFields: []Outcome{ { Type: "system_json_schema_update", Method: "EXECUTE", Attributes: map[string]interface{}{ "json_schema": "!JSON.parse('[{\"name\":\"empty.json\",\"file\":\"data:application/json;base64,e30K\",\"type\":\"application/json\"}]')", }, }, }, }, { Name: "generate_random_data", Label: "Generate random data", OnType: "world", InstanceOptional: true, InFields: []api2go.ColumnInfo{ { Name: "Number of records", ColumnName: "count", ColumnType: "measurement", }, { Name: "Table name", ColumnName: "table_name", ColumnType: "label", }, }, OutFields: []Outcome{ { Type: "generate.random.data", Method: "EXECUTE", Attributes: map[string]interface{}{ "count": "~count", "table_name": "~table_name", "user_reference_id": "$user.reference_id", "user_account_id": "$user.id", }, }, }, Validations: []ColumnTag{ { ColumnName: "count", Tags: "gt=0", }, }, }, { Name: "export_data", Label: "Export data for backup", OnType: "world", InstanceOptional: true, InFields: []api2go.ColumnInfo{ { ColumnName: "table_name", Name: "table_name", ColumnType: "label", }, }, OutFields: []Outcome{ { Type: "__data_export", Method: "EXECUTE", Attributes: map[string]interface{}{ "table_name": "~table_name", }, }, }, }, { Name: "export_csv_data", Label: "Export CSV data", OnType: "world", InstanceOptional: true, InFields: []api2go.ColumnInfo{ { ColumnName: "table_name", Name: "table_name", ColumnType: "label", }, }, OutFields: []Outcome{ { Type: "__csv_data_export", Method: "EXECUTE", Attributes: map[string]interface{}{ "table_name": "~table_name", }, }, }, }, { Name: "import_data", Label: "Import data from dump", OnType: "world", InstanceOptional: false, InFields: []api2go.ColumnInfo{ { Name: "JSON Dump file", ColumnName: "dump_file", ColumnType: "file.json|yaml|toml|hcl", IsNullable: false, }, { Name: "truncate_before_insert", ColumnName: "truncate_before_insert", ColumnType: "truefalse", }, }, OutFields: []Outcome{ { Type: "__data_import", Method: "EXECUTE", Attributes: map[string]interface{}{ "world_reference_id": "$.reference_id", "truncate_before_insert": "~truncate_before_insert", "dump_file": "~dump_file", "table_name": "$.table_name", "user": "~user", }, }, }, }, { Name: "upload_file", Label: "Upload file to external store", OnType: "cloud_store", InstanceOptional: false, InFields: []api2go.ColumnInfo{ { Name: "File", ColumnName: "file", ColumnType: "file.*", IsNullable: false, }, { Name: "Path", ColumnName: "path", ColumnType: "label", IsNullable: true, DefaultValue: "", }, }, OutFields: []Outcome{ { Type: "cloudstore.file.upload", Method: "EXECUTE", Attributes: map[string]interface{}{ "file": "~file", "oauth_token_id": "$.oauth_token_id", "store_provider": "$.store_provider", "path": "~path", "root_path": "$.root_path", }, }, }, }, { Name: "create_site", Label: "Create new site on this store", OnType: "cloud_store", InstanceOptional: false, InFields: []api2go.ColumnInfo{ { Name: "Site type", ColumnName: "site_type", ColumnType: "label", IsNullable: false, }, { Name: "Path", ColumnName: "path", ColumnType: "label", IsNullable: false, DefaultValue: "", }, { Name: "Hostname", ColumnName: "hostname", ColumnType: "label", IsNullable: false, }, }, OutFields: []Outcome{ { Type: "cloudstore.site.create", Method: "EXECUTE", Attributes: map[string]interface{}{ "oauth_token_id": "$.oauth_token_id", "store_provider": "$.store_provider", "cloud_store_id": "$.reference_id", "path": "~path", "user_account_id": "$user.reference_id", "hostname": "~hostname", "site_type": "~site_type", "root_path": "$.root_path", }, }, }, }, { Name: "delete_path", Label: "Delete path on a cloud store", OnType: "cloud_store", InstanceOptional: false, InFields: []api2go.ColumnInfo{ { Name: "Path", ColumnName: "path", ColumnType: "label", IsNullable: true, DefaultValue: "", }, }, OutFields: []Outcome{ { Type: "cloudstore.file.delete", Method: "EXECUTE", Attributes: map[string]interface{}{ "oauth_token_id": "$.oauth_token_id", "store_provider": "$.store_provider", "path": "~path", "root_path": "$.root_path", }, }, }, }, { Name: "create_folder", Label: "Create folder on a cloud store", OnType: "cloud_store", InstanceOptional: false, InFields: []api2go.ColumnInfo{ { Name: "Path", ColumnName: "path", ColumnType: "label", IsNullable: true, DefaultValue: "", }, { Name: "Name", ColumnName: "name", ColumnType: "label", IsNullable: false, }, }, OutFields: []Outcome{ { Type: "cloudstore.folder.create", Method: "EXECUTE", Attributes: map[string]interface{}{ "oauth_token_id": "$.oauth_token_id", "store_provider": "$.store_provider", "path": "~path", "name": "~name", "root_path": "$.root_path", }, }, }, }, { Name: "move_path", Label: "Create folder on a cloud store", OnType: "cloud_store", InstanceOptional: false, InFields: []api2go.ColumnInfo{ { Name: "Source path", ColumnName: "source", ColumnType: "label", }, { Name: "Destination path", ColumnName: "destination", ColumnType: "label", IsNullable: false, }, }, OutFields: []Outcome{ { Type: "cloudstore.path.move", Method: "EXECUTE", Attributes: map[string]interface{}{ "oauth_token_id": "$.oauth_token_id", "store_provider": "$.store_provider", "source": "~source", "destination": "~destination", "root_path": "$.root_path", }, }, }, }, { Name: "list_files", Label: "List files in the site path", OnType: "site", InstanceOptional: false, InFields: []api2go.ColumnInfo{ { Name: "path", ColumnName: "path", ColumnType: "label", IsNullable: false, }, }, OutFields: []Outcome{ { Type: "site.file.list", Method: "EXECUTE", Attributes: map[string]interface{}{ "site_id": "$.reference_id", "path": "~path", }, }, }, }, { Name: "get_file", Label: "Get file at the path in site", OnType: "site", InstanceOptional: false, InFields: []api2go.ColumnInfo{ { Name: "path", ColumnName: "path", ColumnType: "label", IsNullable: false, }, }, OutFields: []Outcome{ { Type: "site.file.get", Method: "EXECUTE", Attributes: map[string]interface{}{ "site_id": "$.reference_id", "path": "~path", }, }, }, }, { Name: "delete_file", Label: "Delete file in the site", OnType: "site", InstanceOptional: false, InFields: []api2go.ColumnInfo{ { Name: "path", ColumnName: "path", ColumnType: "label", IsNullable: false, }, }, OutFields: []Outcome{ { Type: "site.file.delete", Method: "EXECUTE", Attributes: map[string]interface{}{ "site_id": "$.reference_id", "path": "~path", }, }, }, }, { Name: "upload_system_schema", Label: "Upload features", OnType: "world", InstanceOptional: true, InFields: []api2go.ColumnInfo{ { Name: "Schema file", ColumnName: "schema_file", ColumnType: "file.json|yaml|toml|hcl", IsNullable: false, }, }, OutFields: []Outcome{ { Type: "system_json_schema_update", Method: "EXECUTE", Attributes: map[string]interface{}{ "json_schema": "~schema_file", }, }, }, }, { Name: "upload_xls_to_system_schema", Label: "Upload xls to entity", OnType: "world", InstanceOptional: true, InFields: []api2go.ColumnInfo{ { Name: "XLSX file", ColumnName: "data_xls_file", ColumnType: "file.xls|xlsx", IsNullable: false, }, { Name: "Entity name", ColumnName: "entity_name", ColumnType: "label", IsNullable: false, }, { Name: "Create entity if not exists", ColumnName: "create_if_not_exists", ColumnType: "truefalse", IsNullable: false, }, { Name: "Add missing columns", ColumnName: "add_missing_columns", ColumnType: "truefalse", IsNullable: false, }, }, Validations: []ColumnTag{ { ColumnName: "entity_name", Tags: "required", }, }, OutFields: []Outcome{ { Type: "__upload_xlsx_file_to_entity", Method: "EXECUTE", Attributes: map[string]interface{}{ "data_xls_file": "~data_xls_file", "entity_name": "~entity_name", "add_missing_columns": "~add_missing_columns", "create_if_not_exists": "~create_if_not_exists", }, }, }, }, { Name: "upload_csv_to_system_schema", Label: "Upload CSV to entity", OnType: "world", InstanceOptional: true, InFields: []api2go.ColumnInfo{ { Name: "CSV file", ColumnName: "data_csv_file", ColumnType: "file.csv", IsNullable: false, }, { Name: "Entity name", ColumnName: "entity_name", ColumnType: "label", IsNullable: false, }, { Name: "Create entity if not exists", ColumnName: "create_if_not_exists", ColumnType: "truefalse", DefaultValue: "false", IsNullable: true, }, { Name: "Add missing columns", ColumnName: "add_missing_columns", ColumnType: "truefalse", DefaultValue: "false", IsNullable: true, }, }, Validations: []ColumnTag{ { ColumnName: "entity_name", Tags: "required", }, }, OutFields: []Outcome{ { Type: "__upload_csv_file_to_entity", Method: "EXECUTE", Attributes: map[string]interface{}{ "data_csv_file": "~data_csv_file", "entity_name": "~entity_name", "add_missing_columns": "~add_missing_columns", "create_if_not_exists": "~create_if_not_exists", }, }, }, }, { Name: "download_system_schema", Label: "Download system schema", OnType: "world", InstanceOptional: true, InFields: []api2go.ColumnInfo{}, OutFields: []Outcome{ { Type: "__download_cms_config", Method: "EXECUTE", Attributes: map[string]interface{}{}, }, }, }, { Name: "become_an_administrator", Label: "Become Daptin Administrator", InstanceOptional: true, OnType: "world", InFields: []api2go.ColumnInfo{}, OutFields: []Outcome{ { Type: "__become_admin", Method: "EXECUTE", Attributes: map[string]interface{}{ "user_account_id": "$user.id", "user": "~user", }, }, }, }, { Name: "signup", Label: "Sign up", InstanceOptional: true, OnType: USER_ACCOUNT_TABLE_NAME, InFields: []api2go.ColumnInfo{ { Name: "name", ColumnName: "name", ColumnType: "label", IsNullable: false, }, { Name: "email", ColumnName: "email", ColumnType: "email", IsNullable: false, }, { Name: "mobile", ColumnName: "mobile", ColumnType: "label", IsNullable: true, }, { Name: "password", ColumnName: "password", ColumnType: "password", IsNullable: false, }, { Name: "Password Confirm", ColumnName: "passwordConfirm", ColumnType: "password", IsNullable: false, }, }, Validations: []ColumnTag{ { ColumnName: "email", Tags: "email", }, { ColumnName: "name", Tags: "required", }, { ColumnName: "password", Tags: "eqfield=InnerStructField[passwordConfirm],min=8", }, }, Conformations: []ColumnTag{ { ColumnName: "email", Tags: "email", }, { ColumnName: "name", Tags: "trim", }, { ColumnName: "mobile", Tags: "trim", }, }, OutFields: []Outcome{ { Type: USER_ACCOUNT_TABLE_NAME, Method: "POST", Reference: "user", SkipInResponse: true, Attributes: map[string]interface{}{ "name": "~name", "email": "~email", "password": "~password", "confirmed": "0", }, }, { Type: "otp.generate", Method: "EXECUTE", Reference: "otp", SkipInResponse: true, Condition: "!mobile != null && mobile != undefined && mobile != ''", Attributes: map[string]interface{}{ "mobile": "~mobile", "email": "~email", }, }, { Type: "client.notify", Method: "ACTIONRESPONSE", Attributes: map[string]interface{}{ "type": "success", "title": "Success", "message": "Sign-up successful. Redirecting to sign in", }, }, { Type: "client.redirect", Method: "ACTIONRESPONSE", Attributes: map[string]interface{}{ "location": "/auth/signin", "window": "self", "delay": 2000, }, }, }, }, { Name: "reset-password", Label: "Reset password", InstanceOptional: true, OnType: USER_ACCOUNT_TABLE_NAME, InFields: []api2go.ColumnInfo{ { Name: "email", ColumnName: "email", ColumnType: "email", IsNullable: false, }, }, Validations: []ColumnTag{ { ColumnName: "email", Tags: "email", }, }, Conformations: []ColumnTag{ { ColumnName: "email", Tags: "email", }, }, OutFields: []Outcome{ { Type: USER_ACCOUNT_TABLE_NAME, Method: "GET", Reference: "user", SkipInResponse: true, Attributes: map[string]interface{}{ "query": "[{\"column\": \"email\", \"operator\": \"is\", \"value\": \"$email\"}]", }, }, { Type: "otp.generate", Method: "EXECUTE", Reference: "otp", SkipInResponse: true, Attributes: map[string]interface{}{ "email": "$email", }, }, { Type: "mail.send", Method: "EXECUTE", SkipInResponse: true, Attributes: map[string]interface{}{ "to": "~email", "subject": "Request for password reset", "body": "Your verification code is: $otp.otp", "from": "no-reply@localhost", }, }, }, }, { Name: "reset-password-verify", Label: "Reset password verify code", InstanceOptional: true, OnType: USER_ACCOUNT_TABLE_NAME, InFields: []api2go.ColumnInfo{ { Name: "email", ColumnName: "email", ColumnType: "email", IsNullable: false, }, { Name: "otp", ColumnName: "otp", ColumnType: "value", IsNullable: false, }, }, Validations: []ColumnTag{ { ColumnName: "email", Tags: "email", }, }, Conformations: []ColumnTag{ { ColumnName: "email", Tags: "email", }, }, OutFields: []Outcome{ { Type: USER_ACCOUNT_TABLE_NAME, Method: "GET", Reference: "user", SkipInResponse: true, Attributes: map[string]interface{}{ "query": "[{\"column\": \"email\", \"operator\": \"is\", \"value\": \"$email\"}]", }, }, { Type: "otp.login.verify", Method: "EXECUTE", Attributes: map[string]interface{}{ "otp": "~otp", "email": "~email", }, }, { Type: "random.generate", Method: "EXECUTE", Reference: "newPassword", SkipInResponse: true, Attributes: map[string]interface{}{ "type": "password", }, }, { Type: USER_ACCOUNT_TABLE_NAME, SkipInResponse: true, Method: "UPDATE", Attributes: map[string]interface{}{ "reference_id": "$user[0].reference_id", "password": "!newPassword.value", }, }, { Type: "mail.send", Method: "EXECUTE", SkipInResponse: true, Attributes: map[string]interface{}{ "to": "~email", "subject": "Request for password reset", "body": "Your new password is: $newPassword.value", "from": "no-reply@localhost", }, }, }, }, { Name: "signin", Label: "Sign in", InstanceOptional: true, OnType: USER_ACCOUNT_TABLE_NAME, InFields: []api2go.ColumnInfo{ { Name: "email", ColumnName: "email", ColumnType: "email", IsNullable: false, }, { Name: "password", ColumnName: "password", ColumnType: "password", IsNullable: false, }, }, OutFields: []Outcome{ { Type: "jwt.token", Method: "EXECUTE", Attributes: map[string]interface{}{ "email": "~email", "password": "~password", }, }, }, }, { Name: "oauth_login_begin", Label: "Authenticate via OAuth", OnType: "oauth_connect", InFields: []api2go.ColumnInfo{}, OutFields: []Outcome{ { Type: "oauth.client.redirect", Method: "EXECUTE", Attributes: map[string]interface{}{ "authenticator": "$.name", "scope": "$.scope", }, }, }, }, { Name: "oauth.login.response", Label: "Handle OAuth login response code and state", InstanceOptional: true, OnType: "oauth_token", InFields: []api2go.ColumnInfo{ { Name: "code", ColumnName: "code", ColumnType: "hidden", IsNullable: false, }, { Name: "state", ColumnName: "state", ColumnType: "hidden", IsNullable: false, }, { Name: "authenticator", ColumnName: "authenticator", ColumnType: "hidden", IsNullable: false, }, }, OutFields: []Outcome{ { Type: "oauth_connect", Method: "GET", SkipInResponse: true, Reference: "Connection", Attributes: map[string]interface{}{ "filter": "~authenticator", "page[number]": "1", "page[size]": "1", }, }, { Type: "oauth.login.response", Method: "EXECUTE", SkipInResponse: true, Reference: "auth", Attributes: map[string]interface{}{ "authenticator": "~authenticator", "user_account_id": "~user.id", "user_reference_id": "~user.reference_id", "state": "~state", "code": "~code", }, }, { Type: "oauth.profile.exchange", Method: "EXECUTE", Reference: "profile", SkipInResponse: true, Condition: "$Connection[0].allow_login", Attributes: map[string]interface{}{ "authenticator": "~authenticator", "token": "$auth.access_token", "tokenInfoUrl": "$Connection[0].token_url", "profileUrl": "$Connection[0].profile_url", }, }, { Type: USER_ACCOUNT_TABLE_NAME, Method: "GET", Reference: "user", SkipInResponse: true, Condition: "$Connection[0].allow_login", Attributes: map[string]interface{}{ "filter": "!profile.email || profile.emailAddress", }, }, { Type: USER_ACCOUNT_TABLE_NAME, Method: "POST", Reference: "user", SkipInResponse: true, Condition: "!!user || (!user.length && !user.reference_id)", Attributes: map[string]interface{}{ "email": "!profile.email || profile.emailAddress", "name": "$profile.displayName", "password": "$profile.id", }, }, { Type: "usergroup", Method: "POST", Reference: "usergroup", SkipInResponse: true, Condition: "!!user || (!user.length && !user.reference_id)", Attributes: map[string]interface{}{ "name": "!'Home group for ' + profile.emails[0].value", }, }, { Type: "user_account_user_account_id_has_usergroup_usergroup_id", Method: "POST", SkipInResponse: true, Condition: "!!user || (!user.length && !user.reference_id)", Attributes: map[string]interface{}{ "user_account_id": "$user.reference_id", "usergroup_id": "$usergroup.reference_id", }, }, { Type: "jwt.token", Method: "EXECUTE", Attributes: map[string]interface{}{ "email": "!profile.email || profile.emailAddress", "skipPasswordCheck": true, }, }, { Type: "client.redirect", Method: "ACTIONRESPONSE", Attributes: map[string]interface{}{ "location": "/", "window": "self", "delay": 2000, }, }, }, }, { Name: "add_exchange", Label: "Add new data exchange", OnType: "world", InstanceOptional: false, InFields: []api2go.ColumnInfo{ { Name: "name", ColumnName: "name", ColumnType: "label", IsNullable: false, }, { Name: "sheet_id", ColumnName: "sheet_id", ColumnType: "alias", IsNullable: false, }, { Name: "app_key Key", ColumnName: "app_key", ColumnType: "alias", IsNullable: false, }, }, OutFields: []Outcome{ { Type: "data_exchange", Method: "POST", Attributes: map[string]interface{}{ "name": "!'Export ' + subject.table_name + ' to excel sheet'", "source_attributes": "!JSON.stringify({name: subject.table_name})", "source_type": "self", "target_type": "gsheet-append", "options": "!JSON.stringify({hasHeader: true})", "attributes": "!JSON.stringify([{SourceColumn: '$self.description', TargetColumn: 'Task description'}])", "target_attributes": "!JSON.stringify({sheetUrl: 'https://content-sheets.googleapis.com/v4/spreadsheets/' + sheet_id + '/values/A1:append', appKey: app_key})", }, }, }, }, }
var SystemExchanges []ExchangeContract
var SystemSmds []LoopbookFsmDescription
var ValidatorInstance = validator.New()
Functions ¶
func AsStringOrEmpty ¶ added in v0.9.0
func AsStringOrEmpty(i interface{}) string
func BcryptCheckStringHash ¶
func BcryptHashString ¶
func BeginsWith ¶ added in v0.6.2
func BuildActionContext ¶ added in v0.9.9
func BuildOutcome ¶
func BuildWhereClause ¶ added in v0.9.9
func CheckAllTableStatus ¶
func CheckAllTableStatus(initConfig *CmsConfig, db database.DatabaseConnection)
func CheckAuditTables ¶ added in v0.2.1
func CheckAuditTables(config *CmsConfig)
func CheckRelations ¶
func CheckRelations(config *CmsConfig)
func CheckTable ¶
func CheckTranslationTables ¶ added in v0.9.0
func CheckTranslationTables(config *CmsConfig)
func ColumnToInterfaceArray ¶ added in v0.9.9
func ColumnToInterfaceArray(s []column) []interface{}
func CreateDefaultLocalStorage ¶ added in v0.9.2
func CreateDefaultLocalStorage(db database.DatabaseConnection, localStoragePath string) error
func CreateIndexes ¶
func CreateIndexes(initConfig *CmsConfig, db database.DatabaseConnection)
func CreatePostActionHandler ¶
func CreatePostActionHandler(initConfig *CmsConfig, cruds map[string]*DbResource, actionPerformers []ActionPerformerInterface) func(*gin.Context)
func CreateRelations ¶
func CreateRelations(initConfig *CmsConfig, db database.DatabaseConnection)
func CreateRequestBody ¶ added in v0.9.0
func CreateRequestBody(mode Mode, mediaType string, name string, schema *openapi3.Schema, values map[string]interface{}) (interface{}, error)
OpenAPIExample creates an example structure from an OpenAPI 3 schema object, which is an extended subset of JSON Schema. https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.1.md#schemaObject
func CreateUniqueConstraints ¶
func EndsWithCheck ¶ added in v0.2.1
func GenerateCertPEMWithKey ¶ added in v0.9.0
func GenerateCertPEMWithKey(hostname string, privateKey *rsa.PrivateKey) ([]byte, error)
func GetActionMapByTypeName ¶
func GetAdminReferenceIdWithTransaction ¶ added in v0.9.9
func GetBodyParameterNames ¶ added in v0.9.0
func GetDataArray ¶ added in v0.2.1
func GetFakeRow ¶ added in v0.4.0
func GetFakeRow(columns []api2go.ColumnInfo) map[string]interface{}
func GetIdToReferenceIdWithTransaction ¶ added in v0.9.9
func GetIdToReferenceIdWithTransaction(typeName string, id int64, transaction *sqlx.Tx) (string, error)
GetIdToReferenceIdWithTransaction Looks up an integer id and return a string reference id of an object of type `typeName`
func GetJoins ¶ added in v0.9.9
func GetJoins(rel api2go.TableRelation) []join
func GetMD5Hash ¶
func GetMD5HashString ¶ added in v0.9.9
func GetOauthConnectionById ¶
func GetObjectByWhereClauseWithTransaction ¶ added in v0.9.9
func GetObjectGroupsByObjectIdWithTransaction ¶ added in v0.9.9
func GetParametersNames ¶ added in v0.9.0
func GetPublicPrivateKeyPEMBytes ¶ added in v0.9.0
func GetPublicPrivateKeyPEMBytes() ([]byte, []byte, *rsa.PrivateKey, error)
func GetReferenceIdByWhereClauseWithTransaction ¶ added in v0.9.9
func GetReferenceIdByWhereClauseWithTransaction(typeName string, transaction *sqlx.Tx, queries ...goqu.Ex) ([]string, error)
Load rows from the database of `typeName` with a where clause to filter rows Converts the queries to sql and run query with where clause Returns list of reference_ids
func GetReferenceIdListToIdListWithTransaction ¶ added in v0.9.9
func GetReferenceIdListToIdListWithTransaction(typeName string, referenceId []string, transaction *sqlx.Tx) (map[string]int64, error)
Lookup an string reference id and return a internal integer id of an object of type `typeName`
func GetReferenceIdToIdWithTransaction ¶ added in v0.9.9
func GetReferenceIdToIdWithTransaction(typeName string, referenceId string, updateTransaction *sqlx.Tx) (int64, error)
GetReferenceIdToIdWithTransaction Looks up a string reference id and return an internal integer id of an object of type `typeName`
func GetReverseJoins ¶ added in v0.9.9
func GetReverseJoins(rel api2go.TableRelation) []join
func GetSingleColumnValueByReferenceIdWithTransaction ¶ added in v0.9.9
func GetSingleColumnValueByReferenceIdWithTransaction( typeName string, selectColumn []interface{}, matchColumn string, values []string, transaction *sqlx.Tx) ([]interface{}, error)
GetSingleColumnValueByReferenceId select "column" from "typeName" where matchColumn in (values) returns list of values of the column
func GetTokensScope ¶ added in v0.6.0
func GetTotalCountBySelectBuilderWithTransaction ¶ added in v0.9.9
func GetUserMembersByGroupNameWithTransaction ¶ added in v0.9.9
func GetValidatedInFields ¶
func GetValidatedInFields(actionRequest ActionRequest, action Action) (map[string]interface{}, error)
func GetWorldTableMapBy ¶
func GroupNamesToIds ¶ added in v0.6.4
func GroupNamesToIds(db database.DatabaseConnection, groupsName []string) ([]int64, error)
func HasAnyFlag ¶ added in v0.9.0
func ImportDataFiles ¶ added in v0.2.1
func ImportDataFiles(imports []DataFileImport, db sqlx.Ext, cruds map[string]*DbResource)
func ImportDataMapArray ¶ added in v0.6.2
func ImportDataMapArray(data []map[string]interface{}, crud *DbResource, req api2go.Request) []error
func ImportDataStringArray ¶ added in v0.6.2
func InStringArray ¶ added in v0.9.9
func InitialiseColumnManager ¶ added in v0.2.1
func InitialiseColumnManager()
func IsAdminWithTransaction ¶ added in v0.9.9
func IsReservedWord ¶ added in v0.2.1
func IsStandardColumn ¶ added in v0.9.0
func MakeCreateTableQuery ¶
func MapArrayToInterfaceArray ¶ added in v0.9.9
func MapArrayToInterfaceArray(s []map[string]interface{}) []interface{}
func NewClientNotification ¶
func NewMapStringScan ¶
func NewMapStringScan(columnNames []string) *mapStringScan
func NewResponse ¶
func ParseRsaPrivateKeyFromPemStr ¶ added in v0.9.0
func ParseRsaPrivateKeyFromPemStr(privPEM string) (*rsa.PrivateKey, error)
func PrintRelations ¶ added in v0.5.7
func PrintRelations(relations []api2go.TableRelation)
func PrintTableInfo ¶ added in v0.5.7
func ReferenceIdToIntegerId ¶
func RegisterTranslations ¶ added in v0.6.9
func RegisterTranslations()
func RelationNamesToIds ¶ added in v0.9.9
func RowsToMap ¶
RowsToMap converts the result of db.QueryRowx => rows to array of data can be used on any *sqlx.Rows and assign a typeName
func SmallSnakeCaseText ¶ added in v0.2.1
func ToExpressionArray ¶ added in v0.9.9
func ToExpressionArray(s []string) []exp.Expression
func ToInterfaceArray ¶ added in v0.9.9
func ToInterfaceArray(s []string) []interface{}
func ToOrderedExpressionArray ¶ added in v0.9.9
func ToOrderedExpressionArray(s []string) []exp.OrderedExpression
func UpdateActionTable ¶
func UpdateActionTable(initConfig *CmsConfig, db database.DatabaseConnection) error
func UpdateExchanges ¶
func UpdateExchanges(initConfig *CmsConfig, db database.DatabaseConnection)
func UpdateStateMachineDescriptions ¶
func UpdateStateMachineDescriptions(initConfig *CmsConfig, db database.DatabaseConnection)
func UpdateStreams ¶ added in v0.4.0
func UpdateStreams(initConfig *CmsConfig, db database.DatabaseConnection)
func UpdateTasksData ¶ added in v0.6.9
func UpdateTasksData(initConfig *CmsConfig, db database.DatabaseConnection) error
Types ¶
type Action ¶
type Action struct { Name string // Name of the action Label string OnType string InstanceOptional bool RequestSubjectRelations []string ReferenceId string InFields []api2go.ColumnInfo OutFields []Outcome Validations []ColumnTag Conformations []ColumnTag }
Action is a set of `Outcome` based on set of Input values on a particular data type New actions can be defined and added using JSON or YAML files Actions are stored and reloaded from the `action` table of the storage
type ActionExchangeHandler ¶ added in v0.9.9
type ActionExchangeHandler struct {
// contains filtered or unexported fields
}
func (*ActionExchangeHandler) ExecuteTarget ¶ added in v0.9.9
func (g *ActionExchangeHandler) ExecuteTarget(row map[string]interface{}) (map[string]interface{}, error)
type ActionPerformerInterface ¶
type ActionPerformerInterface interface { DoAction(request Outcome, inFields map[string]interface{}, transaction *sqlx.Tx) (api2go.Responder, []ActionResponse, []error) Name() string }
func NewAcmeTlsCertificateGenerateActionPerformer ¶ added in v0.9.0
func NewAcmeTlsCertificateGenerateActionPerformer(cruds map[string]*DbResource, configStore *ConfigStore, hostSwitch *gin.Engine) (ActionPerformerInterface, error)
func NewBecomeAdminPerformer ¶
func NewBecomeAdminPerformer(initConfig *CmsConfig, cruds map[string]*DbResource) (ActionPerformerInterface, error)
Create a new action performer for becoming administrator action
func NewCloudStoreFileDeleteActionPerformer ¶ added in v0.9.2
func NewCloudStoreFileDeleteActionPerformer(cruds map[string]*DbResource) (ActionPerformerInterface, error)
func NewCloudStoreFileGetActionPerformer ¶ added in v0.9.2
func NewCloudStoreFileGetActionPerformer(cruds map[string]*DbResource) (ActionPerformerInterface, error)
func NewCloudStoreFileListActionPerformer ¶ added in v0.9.2
func NewCloudStoreFileListActionPerformer(cruds map[string]*DbResource) (ActionPerformerInterface, error)
func NewCloudStoreFolderCreateActionPerformer ¶ added in v0.9.2
func NewCloudStoreFolderCreateActionPerformer(cruds map[string]*DbResource) (ActionPerformerInterface, error)
func NewCloudStorePathMoveActionPerformer ¶ added in v0.9.2
func NewCloudStorePathMoveActionPerformer(cruds map[string]*DbResource) (ActionPerformerInterface, error)
func NewCloudStoreSiteCreateActionPerformer ¶ added in v0.9.2
func NewCloudStoreSiteCreateActionPerformer(cruds map[string]*DbResource) (ActionPerformerInterface, error)
func NewCommandExecuteActionPerformer ¶ added in v0.9.9
func NewCommandExecuteActionPerformer(cruds map[string]*DbResource) (ActionPerformerInterface, error)
Create a new action performer for command execute using exec.Command
func NewDeleteWorldColumnPerformer ¶ added in v0.9.0
func NewDeleteWorldColumnPerformer(initConfig *CmsConfig, cruds map[string]*DbResource) (ActionPerformerInterface, error)
func NewDeleteWorldPerformer ¶ added in v0.9.2
func NewDeleteWorldPerformer(initConfig *CmsConfig, cruds map[string]*DbResource) (ActionPerformerInterface, error)
func NewDownloadCmsConfigPerformer ¶
func NewDownloadCmsConfigPerformer(initConfig *CmsConfig) (ActionPerformerInterface, error)
func NewExportCsvDataPerformer ¶ added in v0.6.9
func NewExportCsvDataPerformer(initConfig *CmsConfig, cruds map[string]*DbResource) (ActionPerformerInterface, error)
func NewExportDataPerformer ¶ added in v0.2.1
func NewExportDataPerformer(initConfig *CmsConfig, cruds map[string]*DbResource) (ActionPerformerInterface, error)
func NewFileUploadActionPerformer ¶ added in v0.2.1
func NewFileUploadActionPerformer(cruds map[string]*DbResource) (ActionPerformerInterface, error)
func NewGenerateJwtTokenPerformer ¶
func NewGenerateJwtTokenPerformer(configStore *ConfigStore, cruds map[string]*DbResource) (ActionPerformerInterface, error)
func NewGenerateOauth2TokenPerformer ¶ added in v0.7.0
func NewGenerateOauth2TokenPerformer(configStore *ConfigStore, cruds map[string]*DbResource) (ActionPerformerInterface, error)
func NewGeneratePasswordResetActionPerformer ¶ added in v0.9.2
func NewGeneratePasswordResetActionPerformer(configStore *ConfigStore, cruds map[string]*DbResource) (ActionPerformerInterface, error)
func NewGeneratePasswordResetVerifyActionPerformer ¶ added in v0.9.2
func NewGeneratePasswordResetVerifyActionPerformer(configStore *ConfigStore, cruds map[string]*DbResource) (ActionPerformerInterface, error)
func NewGraphqlEnablePerformer ¶ added in v0.9.0
func NewGraphqlEnablePerformer(initConfig *CmsConfig, cruds map[string]*DbResource) (ActionPerformerInterface, error)
Create a new action performer for becoming administrator action
func NewImportCloudStoreFilesPerformer ¶ added in v0.9.1
func NewImportCloudStoreFilesPerformer(initConfig *CmsConfig, cruds map[string]*DbResource) (ActionPerformerInterface, error)
Create a new action performer for becoming administrator action
func NewImportDataPerformer ¶ added in v0.2.1
func NewImportDataPerformer(initConfig *CmsConfig, cruds map[string]*DbResource) (ActionPerformerInterface, error)
func NewIntegrationActionPerformer ¶ added in v0.9.0
func NewIntegrationActionPerformer(integration Integration, initConfig *CmsConfig, cruds map[string]*DbResource, configStore *ConfigStore) (ActionPerformerInterface, error)
Create a new action performer for becoming administrator action
func NewIntegrationInstallationPerformer ¶ added in v0.9.0
func NewIntegrationInstallationPerformer(initConfig *CmsConfig, cruds map[string]*DbResource, configStore *ConfigStore) (ActionPerformerInterface, error)
Create a new action performer for becoming administrator action
func NewMailSendActionPerformer ¶ added in v0.9.9
func NewMailSendActionPerformer(cruds map[string]*DbResource, mailDaemon *guerrilla.Daemon, certificateManager *CertificateManager) (ActionPerformerInterface, error)
func NewMailServersSyncActionPerformer ¶ added in v0.9.0
func NewMailServersSyncActionPerformer(cruds map[string]*DbResource, mailDaemon *guerrilla.Daemon, certificateManager *CertificateManager) (ActionPerformerInterface, error)
func NewMakeResponsePerformer ¶ added in v0.7.0
func NewMakeResponsePerformer() (ActionPerformerInterface, error)
Create a new action performer for becoming administrator action
func NewNetworkRequestPerformer ¶ added in v0.6.0
func NewNetworkRequestPerformer(initConfig *CmsConfig, cruds map[string]*DbResource) (ActionPerformerInterface, error)
func NewOauthLoginBeginActionPerformer ¶
func NewOauthLoginBeginActionPerformer(initConfig *CmsConfig, cruds map[string]*DbResource, configStore *ConfigStore) (ActionPerformerInterface, error)
func NewOauthLoginResponseActionPerformer ¶
func NewOauthLoginResponseActionPerformer(initConfig *CmsConfig, cruds map[string]*DbResource, configStore *ConfigStore) (ActionPerformerInterface, error)
func NewOtpGenerateActionPerformer ¶ added in v0.9.0
func NewOtpGenerateActionPerformer(cruds map[string]*DbResource, configStore *ConfigStore) (ActionPerformerInterface, error)
func NewOtpLoginVerifyActionPerformer ¶ added in v0.9.0
func NewOtpLoginVerifyActionPerformer(cruds map[string]*DbResource, configStore *ConfigStore) (ActionPerformerInterface, error)
func NewOuathProfileExchangePerformer ¶ added in v0.6.0
func NewOuathProfileExchangePerformer(initConfig *CmsConfig, cruds map[string]*DbResource) (ActionPerformerInterface, error)
func NewRandomDataGeneratePerformer ¶ added in v0.4.0
func NewRandomDataGeneratePerformer(initConfig *CmsConfig, cruds map[string]*DbResource) (ActionPerformerInterface, error)
func NewRandomValueGeneratePerformer ¶ added in v0.9.9
func NewRandomValueGeneratePerformer() (ActionPerformerInterface, error)
Create a new action performer for becoming administrator action
func NewRenameWorldColumnPerformer ¶ added in v0.9.0
func NewRenameWorldColumnPerformer(initConfig *CmsConfig, cruds map[string]*DbResource) (ActionPerformerInterface, error)
func NewRestarSystemPerformer ¶
func NewRestarSystemPerformer(initConfig *CmsConfig) (ActionPerformerInterface, error)
func NewSelfTlsCertificateGenerateActionPerformer ¶ added in v0.9.0
func NewSelfTlsCertificateGenerateActionPerformer(cruds map[string]*DbResource, configStore *ConfigStore, certificateManager *CertificateManager) (ActionPerformerInterface, error)
func NewSyncColumnStorageActionPerformer ¶ added in v0.9.0
func NewSyncColumnStorageActionPerformer(cruds map[string]*DbResource) (ActionPerformerInterface, error)
func NewSyncSiteStorageActionPerformer ¶ added in v0.6.9
func NewSyncSiteStorageActionPerformer(cruds map[string]*DbResource) (ActionPerformerInterface, error)
func NewUploadCsvFileToEntityPerformer ¶ added in v0.6.6
func NewUploadCsvFileToEntityPerformer(initConfig *CmsConfig, cruds map[string]*DbResource) (ActionPerformerInterface, error)
func NewUploadFileToEntityPerformer ¶ added in v0.2.1
func NewUploadFileToEntityPerformer(initConfig *CmsConfig, cruds map[string]*DbResource) (ActionPerformerInterface, error)
type ActionRequest ¶
func BuildActionRequest ¶ added in v0.6.9
func BuildActionRequest(closer io.ReadCloser, actionType, actionName string, params gin.Params, queryParams url.Values) (ActionRequest, error)
type ActionResponse ¶
type ActionResponse struct { ResponseType string Attributes interface{} }
func NewActionResponse ¶
func NewActionResponse(responseType string, attrs interface{}) ActionResponse
type ActionRow ¶
type ActionRow struct { Name string Label string OnType string InstanceOptional bool `db:"instance_optional"` ReferenceId string ActionSchema string `db:"action_schema"` }
ActionRow represents an action instance on the database Can be retrieved using GetActionByName
type ActiveTaskInstance ¶ added in v0.6.9
type ActiveTaskInstance struct { Task Task ActionRequest ActionRequest DbResource *DbResource }
func (*ActiveTaskInstance) Run ¶ added in v0.6.9
func (ati *ActiveTaskInstance) Run()
type AggregateData ¶ added in v0.6.2
type AggregateData struct {
Data []AggregateRow `json:"data"`
}
PaginatedFindAll(req Request) (totalCount uint, response Responder, err error)
type AggregateRow ¶ added in v0.9.9
type AggregationRequest ¶ added in v0.6.2
type AssetFolderCache ¶ added in v0.9.0
type AssetFolderCache struct { LocalSyncPath string Keyname string CloudStore CloudStore }
func (*AssetFolderCache) DeleteFileByName ¶ added in v0.9.2
func (afc *AssetFolderCache) DeleteFileByName(fileName string) error
func (*AssetFolderCache) GetFileByName ¶ added in v0.9.1
func (afc *AssetFolderCache) GetFileByName(fileName string) (*os.File, error)
func (*AssetFolderCache) GetPathContents ¶ added in v0.9.2
func (afc *AssetFolderCache) GetPathContents(path string) ([]map[string]interface{}, error)
func (*AssetFolderCache) UploadFiles ¶ added in v0.9.0
func (afc *AssetFolderCache) UploadFiles(files []interface{}) error
type CertificateManager ¶ added in v0.9.0
type CertificateManager struct {
// contains filtered or unexported fields
}
func NewCertificateManager ¶ added in v0.9.0
func NewCertificateManager(cruds map[string]*DbResource, configStore *ConfigStore) (*CertificateManager, error)
type CloudStore ¶ added in v0.2.1
type CmsConfig ¶
type CmsConfig struct { Tables []TableInfo EnableGraphQL bool Imports []DataFileImport StateMachineDescriptions []LoopbookFsmDescription Relations []api2go.TableRelation Actions []Action ExchangeContracts []ExchangeContract Hostname string SubSites map[string]SubSiteInformation Tasks []Task Streams []StreamContract ActionPerformers []ActionPerformerInterface }
func (*CmsConfig) AddRelations ¶ added in v0.5.7
func (ti *CmsConfig) AddRelations(relations ...api2go.TableRelation)
type ColumnMapping ¶
type ColumnMapping []ColumnMap
func (*ColumnMapping) UnmarshalJSON ¶
func (c *ColumnMapping) UnmarshalJSON(payload []byte) error
type ColumnType ¶ added in v0.2.1
type ColumnType struct { BlueprintType string Name string Validations []string Conformations []string ReclineType string DataTypes []string GraphqlType graphql.Type }
func (ColumnType) Fake ¶ added in v0.2.1
func (ct ColumnType) Fake() interface{}
type ColumnTypeManager ¶ added in v0.2.1
type ColumnTypeManager struct {
ColumnMap map[string]ColumnType
}
var ColumnManager *ColumnTypeManager
func (*ColumnTypeManager) GetBlueprintType ¶ added in v0.2.1
func (ctm *ColumnTypeManager) GetBlueprintType(columnType string) string
func (*ColumnTypeManager) GetFakeData ¶ added in v0.9.0
func (ctm *ColumnTypeManager) GetFakeData(colTypeName string) string
func (*ColumnTypeManager) GetGraphqlType ¶ added in v0.6.9
func (ctm *ColumnTypeManager) GetGraphqlType(columnType string) graphql.Type
func (*ColumnTypeManager) IsValidValue ¶ added in v0.2.1
func (ctm *ColumnTypeManager) IsValidValue(val string, colType string, validator *validator2.Validate) error
type ConfigStore ¶
type ConfigStore struct {
// contains filtered or unexported fields
}
func NewConfigStore ¶
func NewConfigStore(db database.DatabaseConnection) (*ConfigStore, error)
func (*ConfigStore) DeleteConfigValueFor ¶ added in v0.9.0
func (configStore *ConfigStore) DeleteConfigValueFor(key string, configtype string) error
func (*ConfigStore) GetAllConfig ¶ added in v0.9.0
func (configStore *ConfigStore) GetAllConfig() map[string]string
func (*ConfigStore) GetConfigIntValueFor ¶ added in v0.6.8
func (configStore *ConfigStore) GetConfigIntValueFor(key string, configtype string) (int, error)
func (*ConfigStore) GetConfigValueFor ¶
func (configStore *ConfigStore) GetConfigValueFor(key string, configtype string) (string, error)
func (*ConfigStore) GetConfigValueForWithTransaction ¶ added in v0.9.9
func (*ConfigStore) SetConfigIntValueFor ¶ added in v0.6.8
func (configStore *ConfigStore) SetConfigIntValueFor(key string, val int, configtype string) error
func (*ConfigStore) SetConfigValueFor ¶
func (configStore *ConfigStore) SetConfigValueFor(key string, val interface{}, configtype string) error
func (*ConfigStore) SetConfigValueForWithTransaction ¶ added in v0.9.9
func (*ConfigStore) SetDefaultEnv ¶
func (configStore *ConfigStore) SetDefaultEnv(env string)
type DaptinError ¶ added in v0.5.7
func NewDaptinError ¶ added in v0.5.7
func NewDaptinError(str string, code string) *DaptinError
func (*DaptinError) Error ¶ added in v0.6.9
func (de *DaptinError) Error() string
type DaptinImapBackend ¶ added in v0.9.0
type DaptinImapBackend struct {
// contains filtered or unexported fields
}
func NewImapServer ¶ added in v0.9.0
func NewImapServer(cruds map[string]*DbResource) *DaptinImapBackend
type DaptinImapMailBox ¶ added in v0.9.0
type DaptinImapMailBox struct {
// contains filtered or unexported fields
}
func (*DaptinImapMailBox) Check ¶ added in v0.9.0
func (dimb *DaptinImapMailBox) Check() error
Check requests a checkpoint of the currently selected mailbox. A checkpoint refers to any implementation-dependent housekeeping associated with the mailbox (e.g., resolving the server's in-memory state of the mailbox with the state on its disk). A checkpoint MAY take a non-instantaneous amount of real time to complete. If a server implementation has no such housekeeping considerations, CHECK is equivalent to NOOP.
func (*DaptinImapMailBox) CopyMessages ¶ added in v0.9.0
func (dimb *DaptinImapMailBox) CopyMessages(uid bool, seqset *imap.SeqSet, dest string) error
CopyMessages copies the specified message(s) to the end of the specified destination mailbox. The flags and internal date of the message(s) SHOULD be preserved, and the Recent flag SHOULD be set, in the copy.
If the destination mailbox does not exist, a server SHOULD return an error. It SHOULD NOT automatically create the mailbox.
If the Backend implements Updater, it must notify the client immediately via a mailbox update.
func (*DaptinImapMailBox) CreateMessage ¶ added in v0.9.0
func (dimb *DaptinImapMailBox) CreateMessage(flags []string, date time.Time, body imap.Literal) error
CreateMessage appends a new message to this mailbox. The \Recent flag will be added no matter flags is empty or not. If date is nil, the current time will be used.
If the Backend implements Updater, it must notify the client immediately via a mailbox update.
func (*DaptinImapMailBox) Expunge ¶ added in v0.9.0
func (dimb *DaptinImapMailBox) Expunge() error
Expunge permanently removes all messages that have the \Deleted flag set from the currently selected mailbox.
If the Backend implements Updater, it must notify the client immediately via an expunge update.
func (*DaptinImapMailBox) Info ¶ added in v0.9.0
func (dimb *DaptinImapMailBox) Info() (*imap.MailboxInfo, error)
Info returns this mailbox info.
func (*DaptinImapMailBox) ListMessages ¶ added in v0.9.0
func (dimb *DaptinImapMailBox) ListMessages(uid bool, seqset *imap.SeqSet, items []imap.FetchItem, ch chan<- *imap.Message) error
ListMessages returns a list of messages. seqset must be interpreted as UIDs if uid is set to true and as message sequence numbers otherwise. See RFC 3501 section 6.4.5 for a list of items that can be requested.
Messages must be sent to ch. When the function returns, ch must be closed.
func (*DaptinImapMailBox) Name ¶ added in v0.9.0
func (dimb *DaptinImapMailBox) Name() string
Name returns this mailbox name.
func (*DaptinImapMailBox) SearchMessages ¶ added in v0.9.0
func (dimb *DaptinImapMailBox) SearchMessages(uid bool, criteria *imap.SearchCriteria) ([]uint32, error)
SearchMessages searches messages. The returned list must contain UIDs if uid is set to true, or sequence numbers otherwise.
func (*DaptinImapMailBox) SetSubscribed ¶ added in v0.9.0
func (dimb *DaptinImapMailBox) SetSubscribed(subscribed bool) error
SetSubscribed adds or removes the mailbox to the server's set of "active" or "subscribed" mailboxes.
func (*DaptinImapMailBox) Status ¶ added in v0.9.0
func (dimb *DaptinImapMailBox) Status(items []imap.StatusItem) (*imap.MailboxStatus, error)
Status returns this mailbox status. The fields Name, Flags, PermanentFlags and UnseenSeqNum in the returned MailboxStatus must be always populated. This function does not affect the state of any messages in the mailbox. See RFC 3501 section 6.3.10 for a list of items that can be requested.
func (*DaptinImapMailBox) UpdateMessagesFlags ¶ added in v0.9.0
func (dimb *DaptinImapMailBox) UpdateMessagesFlags(uid bool, seqset *imap.SeqSet, operation imap.FlagsOp, flags []string) error
UpdateMessagesFlags alters flags for the specified message(s).
If the Backend implements Updater, it must notify the client immediately via a message update.
type DaptinImapUser ¶ added in v0.9.0
type DaptinImapUser struct {
// contains filtered or unexported fields
}
func (*DaptinImapUser) CreateMailbox ¶ added in v0.9.0
func (diu *DaptinImapUser) CreateMailbox(name string) error
CreateMailbox creates a new mailbox.
If the mailbox already exists, an error must be returned. If the mailbox name is suffixed with the server's hierarchy separator character, this is a declaration that the client intends to create mailbox names under this name in the hierarchy.
If the server's hierarchy separator character appears elsewhere in the name, the server SHOULD create any superior hierarchical names that are needed for the CREATE command to be successfully completed. In other words, an attempt to create "foo/bar/zap" on a server in which "/" is the hierarchy separator character SHOULD create foo/ and foo/bar/ if they do not already exist.
If a new mailbox is created with the same name as a mailbox which was deleted, its unique identifiers MUST be greater than any unique identifiers used in the previous incarnation of the mailbox UNLESS the new incarnation has a different unique identifier validity value.
func (*DaptinImapUser) DeleteMailbox ¶ added in v0.9.0
func (diu *DaptinImapUser) DeleteMailbox(name string) error
DeleteMailbox permanently remove the mailbox with the given name. It is an error to // attempt to delete INBOX or a mailbox name that does not exist.
The DELETE command MUST NOT remove inferior hierarchical names. For example, if a mailbox "foo" has an inferior "foo.bar" (assuming "." is the hierarchy delimiter character), removing "foo" MUST NOT remove "foo.bar".
The value of the highest-used unique identifier of the deleted mailbox MUST be preserved so that a new mailbox created with the same name will not reuse the identifiers of the former incarnation, UNLESS the new incarnation has a different unique identifier validity value.
func (*DaptinImapUser) GetMailbox ¶ added in v0.9.0
func (diu *DaptinImapUser) GetMailbox(name string) (backend.Mailbox, error)
GetMailbox returns a mailbox. If it doesn't exist, it returns ErrNoSuchMailbox.
func (*DaptinImapUser) ListMailboxes ¶ added in v0.9.0
func (diu *DaptinImapUser) ListMailboxes(subscribed bool) ([]backend.Mailbox, error)
ListMailboxes returns a list of mailboxes belonging to this user. If subscribed is set to true, only returns subscribed mailboxes.
func (*DaptinImapUser) Logout ¶ added in v0.9.0
func (diu *DaptinImapUser) Logout() error
Logout is called when this User will no longer be used, likely because the client closed the Connection.
func (*DaptinImapUser) RenameMailbox ¶ added in v0.9.0
func (diu *DaptinImapUser) RenameMailbox(existingName, newName string) error
RenameMailbox changes the name of a mailbox. It is an error to attempt to rename from a mailbox name that does not exist or to a mailbox name that already exists.
If the name has inferior hierarchical names, then the inferior hierarchical names MUST also be renamed. For example, a rename of "foo" to "zap" will rename "foo/bar" (assuming "/" is the hierarchy delimiter character) to "zap/bar".
If the server's hierarchy separator character appears in the name, the server SHOULD create any superior hierarchical names that are needed for the RENAME command to complete successfully. In other words, an attempt to rename "foo/bar/zap" to baz/rag/zowie on a server in which "/" is the hierarchy separator character SHOULD create baz/ and baz/rag/ if they do not already exist.
The value of the highest-used unique identifier of the old mailbox name MUST be preserved so that a new mailbox created with the same name will not reuse the identifiers of the former incarnation, UNLESS the new incarnation has a different unique identifier validity value.
Renaming INBOX is permitted, and has special behavior. It moves all messages in INBOX to a new mailbox with the given name, leaving INBOX empty. If the server implementation supports inferior hierarchical names of INBOX, these are unaffected by a rename of INBOX.
func (*DaptinImapUser) Username ¶ added in v0.9.0
func (diu *DaptinImapUser) Username() string
User represents a user in the mail storage system. A user operation always deals with mailboxes. Username returns this user's username.
type DataFileImport ¶ added in v0.2.1
func (DataFileImport) String ¶ added in v0.2.1
func (s DataFileImport) String() string
type DataValidationMiddleware ¶ added in v0.2.1
type DataValidationMiddleware struct {
// contains filtered or unexported fields
}
func (*DataValidationMiddleware) InterceptAfter ¶ added in v0.2.1
func (dvm *DataValidationMiddleware) InterceptAfter(dr *DbResource, req *api2go.Request, results []map[string]interface{}, transaction *sqlx.Tx) ([]map[string]interface{}, error)
func (*DataValidationMiddleware) InterceptBefore ¶ added in v0.2.1
func (dvm *DataValidationMiddleware) InterceptBefore(dr *DbResource, req *api2go.Request, objects []map[string]interface{}, transaction *sqlx.Tx) ([]map[string]interface{}, error)
func (DataValidationMiddleware) String ¶ added in v0.2.1
func (dvm DataValidationMiddleware) String() string
type DatabaseRequestInterceptor ¶
type DatabaseRequestInterceptor interface { InterceptBefore(*DbResource, *api2go.Request, []map[string]interface{}, *sqlx.Tx) ([]map[string]interface{}, error) InterceptAfter(*DbResource, *api2go.Request, []map[string]interface{}, *sqlx.Tx) ([]map[string]interface{}, error) fmt.Stringer }
func NewCreateEventHandler ¶
func NewCreateEventHandler(cruds *map[string]*DbResource, dtopicMap *map[string]*olric.DTopic) DatabaseRequestInterceptor
func NewDataValidationMiddleware ¶ added in v0.2.1
func NewDataValidationMiddleware(cmsConfig *CmsConfig, cruds *map[string]*DbResource) DatabaseRequestInterceptor
func NewDeleteEventHandler ¶
func NewDeleteEventHandler(cruds *map[string]*DbResource, dtopicMap *map[string]*olric.DTopic) DatabaseRequestInterceptor
func NewExchangeMiddleware ¶
func NewExchangeMiddleware(cmsConfig *CmsConfig, cruds *map[string]*DbResource) DatabaseRequestInterceptor
Creates a new exchange middleware which is responsible for calling external apis on data updates
func NewUpdateEventHandler ¶
func NewUpdateEventHandler(cruds *map[string]*DbResource, dtopicMap *map[string]*olric.DTopic) DatabaseRequestInterceptor
func NewYJSHandlerMiddleware ¶ added in v0.9.9
func NewYJSHandlerMiddleware(documentProvider ydb.DocumentProvider) DatabaseRequestInterceptor
type DbResource ¶
type DbResource struct { Connection database.DatabaseConnection Cruds map[string]*DbResource ActionHandlerMap map[string]ActionPerformerInterface OlricDb *olric.Olric AssetFolderCache map[string]map[string]*AssetFolderCache SubsiteFolderCache map[string]*AssetFolderCache MailSender func(e *mail.Envelope, task backends.SelectTask) (backends.Result, error) // contains filtered or unexported fields }
func NewDbResource ¶
func NewDbResource(model api2go.Api2GoModel, db database.DatabaseConnection, ms *MiddlewareSet, cruds map[string]*DbResource, configStore *ConfigStore, olricDb *olric.Olric, tableInfo TableInfo) (*DbResource, error)
func (*DbResource) BecomeAdmin ¶
func (dbResource *DbResource) BecomeAdmin(userId int64, transaction *sqlx.Tx) bool
BecomeAdmin make user the administrator and owner of everything Check CanBecomeAdmin before invoking this
func (*DbResource) CanBecomeAdmin ¶
func (dbResource *DbResource) CanBecomeAdmin() bool
CanBecomeAdmin Checks if the context user can invoke the become admin action checks if there is only 1 real user in the system No one can become admin once we have an adminstrator
func (*DbResource) CreateMailAccountBox ¶ added in v0.9.0
func (dbResource *DbResource) CreateMailAccountBox(mailAccountId string, sessionUser *auth.SessionUser, mailBoxName string) (map[string]interface{}, error)
Returns the user mail account box row of a user
func (*DbResource) CreateWithTransaction ¶ added in v0.9.9
func (*DbResource) CreateWithoutFilter ¶ added in v0.6.5
func (*DbResource) DataStats ¶ added in v0.6.2
func (dbResource *DbResource) DataStats(req AggregationRequest, transaction *sqlx.Tx) (*AggregateData, error)
func (*DbResource) DeleteMailAccountBox ¶ added in v0.9.0
func (dbResource *DbResource) DeleteMailAccountBox(mailAccountId int64, mailBoxName string) error
Returns the user mail account box row of a user
func (*DbResource) DeleteWithTransaction ¶ added in v0.9.9
func (*DbResource) DeleteWithoutFilters ¶ added in v0.6.5
func (*DbResource) DirectInsert ¶ added in v0.2.1
func (dbResource *DbResource) DirectInsert(typeName string, data map[string]interface{}) error
Update the data and set the values using the data map without an validation or transformations Invoked by data import action
func (*DbResource) ExpungeMailBox ¶ added in v0.9.0
func (dbResource *DbResource) ExpungeMailBox(mailBoxId int64) (int64, error)
func (*DbResource) FindOne ¶
func (dbResource *DbResource) FindOne(referenceId string, req api2go.Request) (api2go.Responder, error)
FindOne returns an object by its ID Possible Responder success status code 200
func (*DbResource) FindOneWithTransaction ¶ added in v0.9.9
func (dbResource *DbResource) FindOneWithTransaction(referenceId string, req api2go.Request, transaction *sqlx.Tx) (api2go.Responder, error)
FindOne returns an object by its ID Possible Responder success status code 200
func (*DbResource) GetActionByName ¶
func (dbResource *DbResource) GetActionByName(typeName string, actionName string, transaction *sqlx.Tx) (Action, error)
GetActionByName Gets an Action instance by `typeName` and `actionName` Check Action instance for usage
func (*DbResource) GetActionPermissionByName ¶
func (dbResource *DbResource) GetActionPermissionByName(worldId int64, actionName string) (PermissionInstance, error)
GetActionPermissionByName Gets permission of an action by typeId and actionName Loads the owner, usergroup and guest permission of the action from the database Return a PermissionInstance Special utility function for actions, for other objects use GetObjectPermissionByReferenceId
func (*DbResource) GetActionsByType ¶
func (dbResource *DbResource) GetActionsByType(typeName string) ([]Action, error)
GetActionsByType Gets the list of all actions defined on type `typeName` Returns list of `Action`
func (*DbResource) GetActiveIntegrations ¶ added in v0.9.0
func (dbResource *DbResource) GetActiveIntegrations() ([]Integration, error)
func (*DbResource) GetAdminEmailId ¶ added in v0.6.9
func (dbResource *DbResource) GetAdminEmailId() string
func (*DbResource) GetAdminReferenceId ¶ added in v0.6.9
func (dbResource *DbResource) GetAdminReferenceId() map[string]bool
func (*DbResource) GetAllCloudStores ¶ added in v0.2.1
func (dbResource *DbResource) GetAllCloudStores() ([]CloudStore, error)
func (*DbResource) GetAllObjects ¶ added in v0.2.1
func (dbResource *DbResource) GetAllObjects(typeName string) ([]map[string]interface{}, error)
GetAllObjects Gets all rows from the table `typeName` Returns an array of Map object, each object has the column name to value mapping Utility method for loading all objects having low count Can be used by actions
func (*DbResource) GetAllObjectsWithWhere ¶ added in v0.9.0
func (dbResource *DbResource) GetAllObjectsWithWhere(typeName string, where ...goqu.Ex) ([]map[string]interface{}, error)
GetAllObjectsWithWhere Get all rows from the table `typeName` Returns an array of Map object, each object has the column name to value mapping Utility method for loading all objects having low count Can be used by actions
func (*DbResource) GetAllObjectsWithWhereWithTransaction ¶ added in v0.9.9
func (dbResource *DbResource) GetAllObjectsWithWhereWithTransaction(typeName string, transaction *sqlx.Tx, where ...goqu.Ex) ([]map[string]interface{}, error)
GetAllObjectsWithWhere Get all rows from the table `typeName` Returns an array of Map object, each object has the column name to value mapping Utility method for loading all objects having low count Can be used by actions
func (*DbResource) GetAllRawObjects ¶ added in v0.2.1
func (dbResource *DbResource) GetAllRawObjects(typeName string) ([]map[string]interface{}, error)
GetAllRawObjects Get all rows from the table `typeName` without any processing of the response expect no "__type" column on the returned instances Returns an array of Map object, each object has the column name to value mapping Utility method for loading all objects having low count Can be used by actions
func (*DbResource) GetAllRawObjectsWithTransaction ¶ added in v0.9.9
func (*DbResource) GetAllSites ¶ added in v0.2.1
func (dbResource *DbResource) GetAllSites() ([]SubSite, error)
func (*DbResource) GetAllTasks ¶ added in v0.6.9
func (dbResource *DbResource) GetAllTasks() ([]Task, error)
func (*DbResource) GetCloudStoreByNameWithTransaction ¶ added in v0.9.9
func (dbResource *DbResource) GetCloudStoreByNameWithTransaction(name string, transaction *sqlx.Tx) (CloudStore, error)
func (*DbResource) GetCloudStoreByReferenceId ¶ added in v0.6.9
func (dbResource *DbResource) GetCloudStoreByReferenceId(referenceID string) (CloudStore, error)
func (*DbResource) GetContext ¶
func (dbResource *DbResource) GetContext(key string) interface{}
func (*DbResource) GetFileFromLocalCloudStore ¶ added in v0.9.0
func (dbResource *DbResource) GetFileFromLocalCloudStore(tableName string, columnName string, filesList []map[string]interface{}) (resp []map[string]interface{}, err error)
resolve a file column from data in column to actual file on a cloud store returns a map containing the metadata of the file and the file contents as base64 encoded can be sent to browser to invoke downloading js and data urls
func (*DbResource) GetFirstUnseenMailSequence ¶ added in v0.9.0
func (dbResource *DbResource) GetFirstUnseenMailSequence(mailBoxId int64) uint32
func (*DbResource) GetIdByWhereClause ¶
func (dbResource *DbResource) GetIdByWhereClause(typeName string, queries ...goqu.Ex) ([]int64, error)
GetIdByWhereClause Loads rows from the database of `typeName` with a where clause to filter rows Converts the queries to sql and run query with where clause Returns list of internal database integer ids
func (*DbResource) GetIdListToReferenceIdList ¶ added in v0.9.9
func (dbResource *DbResource) GetIdListToReferenceIdList(typeName string, ids []int64) (map[int64]string, error)
GetIdListToReferenceIdList Lookups an string internal integer id and return a reference id of an object of type `typeName`
func (*DbResource) GetIdToObject ¶
func (dbResource *DbResource) GetIdToObject(typeName string, id int64) (map[string]interface{}, error)
func (*DbResource) GetIdToObjectWithTransaction ¶ added in v0.9.9
func (*DbResource) GetIdToReferenceId ¶
func (dbResource *DbResource) GetIdToReferenceId(typeName string, id int64) (string, error)
GetIdToReferenceId Looks up an integer id and return a string reference id of an object of type `typeName`
func (*DbResource) GetMailAccountBox ¶ added in v0.9.0
func (dbResource *DbResource) GetMailAccountBox(mailAccountId int64, mailBoxName string) (map[string]interface{}, error)
Returns the user mail account box row of a user
func (*DbResource) GetMailBoxMailsByOffset ¶ added in v0.9.0
func (*DbResource) GetMailBoxMailsByUidSequence ¶ added in v0.9.0
func (*DbResource) GetMailBoxStatus ¶ added in v0.9.0
func (dbResource *DbResource) GetMailBoxStatus(mailAccountId int64, mailBoxId int64) (*imap.MailboxStatus, error)
func (*DbResource) GetMailboxNextUid ¶ added in v0.9.0
func (dbResource *DbResource) GetMailboxNextUid(mailBoxId int64) (uint32, error)
func (*DbResource) GetOauthDescriptionByTokenId ¶
func (dbResource *DbResource) GetOauthDescriptionByTokenId(id int64) (*oauth2.Config, error)
func (*DbResource) GetOauthDescriptionByTokenReferenceId ¶ added in v0.2.1
func (dbResource *DbResource) GetOauthDescriptionByTokenReferenceId(referenceId string) (*oauth2.Config, error)
func (*DbResource) GetObjectByWhereClause ¶ added in v0.6.9
func (dbResource *DbResource) GetObjectByWhereClause(typeName string, column string, val interface{}) (map[string]interface{}, error)
func (*DbResource) GetObjectByWhereClauseWithTransaction ¶ added in v0.9.9
func (*DbResource) GetObjectGroupsByObjectId ¶
func (dbResource *DbResource) GetObjectGroupsByObjectId(objType string, objectId int64) []auth.GroupPermission
func (*DbResource) GetObjectPermissionById ¶ added in v0.9.0
func (dbResource *DbResource) GetObjectPermissionById(objectType string, id int64) PermissionInstance
Get permission of an Object by typeName and string referenceId Loads the owner, usergroup and guest permission of the action from the database Return a PermissionInstance Return a NoPermissionToAnyone if no such object exist
func (*DbResource) GetObjectPermissionByIdWithTransaction ¶ added in v0.9.9
func (dbResource *DbResource) GetObjectPermissionByIdWithTransaction(objectType string, id int64, transaction *sqlx.Tx) PermissionInstance
Get permission of an Object by typeName and string referenceId Loads the owner, usergroup and guest permission of the action from the database Return a PermissionInstance Return a NoPermissionToAnyone if no such object exist
func (*DbResource) GetObjectPermissionByReferenceId ¶ added in v0.9.0
func (dbResource *DbResource) GetObjectPermissionByReferenceId(objectType string, referenceId string) PermissionInstance
GetObjectPermissionByReferenceId Gets permission of an Object by typeName and string referenceId Loads the owner, usergroup and guest permission of the action from the database Return a PermissionInstance Return a NoPermissionToAnyone if no such object exist
func (*DbResource) GetObjectPermissionByWhereClause ¶
func (dbResource *DbResource) GetObjectPermissionByWhereClause(objectType string, colName string, colValue string) PermissionInstance
GetObjectPermissionByWhereClause Gets permission of an Object by typeName and string referenceId with a simple where clause colName = colValue Use carefully Loads the owner, usergroup and guest permission of the action from the database Return a PermissionInstance Return a NoPermissionToAnyone if no such object exist
func (*DbResource) GetObjectPermissionByWhereClauseWithTransaction ¶ added in v0.9.9
func (dbResource *DbResource) GetObjectPermissionByWhereClauseWithTransaction(objectType string, colName string, colValue string, transaction *sqlx.Tx) PermissionInstance
func (*DbResource) GetObjectUserGroupsByWhere ¶
func (dbResource *DbResource) GetObjectUserGroupsByWhere(objectType string, colName string, colValue interface{}) []auth.GroupPermission
GetObjectUserGroupsByWhere Get list of group permissions for objects of typeName where colName=colValue Utility method which makes a join query to load a lot of permissions quickly Used by GetRowPermission
func (*DbResource) GetObjectUserGroupsByWhereWithTransaction ¶ added in v0.9.9
func (dbResource *DbResource) GetObjectUserGroupsByWhereWithTransaction(objectType string, transaction *sqlx.Tx, colName string, colValue interface{}) []auth.GroupPermission
GetObjectUserGroupsByWhere Get list of group permissions for objects of typeName where colName=colValue Utility method which makes a join query to load a lot of permissions quickly Used by GetRowPermission
func (*DbResource) GetRandomRow ¶ added in v0.9.9
func (dbResource *DbResource) GetRandomRow(typeName string, count uint) ([]map[string]interface{}, error)
func (*DbResource) GetReferenceIdByWhereClause ¶
func (dbResource *DbResource) GetReferenceIdByWhereClause(typeName string, queries ...goqu.Ex) ([]string, error)
Load rows from the database of `typeName` with a where clause to filter rows Converts the queries to sql and run query with where clause Returns list of reference_ids
func (*DbResource) GetReferenceIdListToIdList ¶ added in v0.9.9
func (dbResource *DbResource) GetReferenceIdListToIdList(typeName string, referenceId []string) (map[string]int64, error)
Lookup an string reference id and return a internal integer id of an object of type `typeName`
func (*DbResource) GetReferenceIdToId ¶
func (dbResource *DbResource) GetReferenceIdToId(typeName string, referenceId string) (int64, error)
GetReferenceIdToId Lookup an string reference id and return a internal integer id of an object of type `typeName`
func (*DbResource) GetReferenceIdToObject ¶
func (dbResource *DbResource) GetReferenceIdToObject(typeName string, referenceId string) (map[string]interface{}, error)
GetReferenceIdToObject Loads an object of type `typeName` using a reference_id Used internally, can be used by actions
func (*DbResource) GetReferenceIdToObjectColumn ¶ added in v0.9.1
func (dbResource *DbResource) GetReferenceIdToObjectColumn(typeName string, referenceId string, columnToSelect string) (interface{}, error)
GetReferenceIdToObjectColumn Loads an object of type `typeName` using a reference_id Used internally, can be used by actions
func (*DbResource) GetReferenceIdToObjectColumnWithTransaction ¶ added in v0.9.9
func (dbResource *DbResource) GetReferenceIdToObjectColumnWithTransaction(typeName string, referenceId string, columnToSelect string, transaction *sqlx.Tx) (interface{}, error)
GetReferenceIdToObjectColumn Loads an object of type `typeName` using a reference_id Used internally, can be used by actions
func (*DbResource) GetReferenceIdToObjectWithTransaction ¶ added in v0.9.9
func (dbResource *DbResource) GetReferenceIdToObjectWithTransaction(typeName string, referenceId string, transaction *sqlx.Tx) (map[string]interface{}, error)
GetReferenceIdToObject Loads an object of type `typeName` using a reference_id Used internally, can be used by actions
func (*DbResource) GetRowPermission ¶
func (dbResource *DbResource) GetRowPermission(row map[string]interface{}) PermissionInstance
func (*DbResource) GetRowPermissionWithTransaction ¶ added in v0.9.9
func (dbResource *DbResource) GetRowPermissionWithTransaction(row map[string]interface{}, transaction *sqlx.Tx) PermissionInstance
func (*DbResource) GetRowsByWhereClause ¶
func (*DbResource) GetRowsByWhereClauseWithTransaction ¶ added in v0.9.9
func (*DbResource) GetSingleColumnValueByReferenceId ¶
func (dbResource *DbResource) GetSingleColumnValueByReferenceId( typeName string, selectColumn []interface{}, matchColumn string, values []string) ([]interface{}, error)
GetSingleColumnValueByReferenceId select "column" from "typeName" where matchColumn in (values) returns list of values of the column
func (*DbResource) GetSingleRowById ¶ added in v0.9.0
func (*DbResource) GetSingleRowByReferenceId ¶
func (*DbResource) GetSingleRowByReferenceIdWithTransaction ¶ added in v0.9.9
func (*DbResource) GetTokenByTokenId ¶ added in v0.2.1
func (dbResource *DbResource) GetTokenByTokenId(id int64) (*oauth2.Token, error)
func (*DbResource) GetTokenByTokenName ¶ added in v0.6.5
func (dbResource *DbResource) GetTokenByTokenName(name string) (*oauth2.Token, error)
func (*DbResource) GetTokenByTokenReferenceId ¶ added in v0.2.1
func (*DbResource) GetTotalCount ¶
func (dbResource *DbResource) GetTotalCount() uint64
func (*DbResource) GetTotalCountBySelectBuilder ¶ added in v0.6.0
func (dbResource *DbResource) GetTotalCountBySelectBuilder(builder *goqu.SelectDataset) uint64
func (*DbResource) GetUserAccountRowByEmail ¶ added in v0.9.0
func (dbResource *DbResource) GetUserAccountRowByEmail(email string) (map[string]interface{}, error)
GetUserAccountRowByEmail Returns the user account row of a user by looking up on email
func (*DbResource) GetUserAccountRowByEmailWithTransaction ¶ added in v0.9.9
func (dbResource *DbResource) GetUserAccountRowByEmailWithTransaction(email string, transaction *sqlx.Tx) (map[string]interface{}, error)
GetUserAccountRowByEmail Returns the user account row of a user by looking up on email
func (*DbResource) GetUserById ¶ added in v0.9.9
func (dbResource *DbResource) GetUserById(userId int64) (map[string]interface{}, error)
func (*DbResource) GetUserEmailIdByUsergroupId ¶ added in v0.6.9
func (dbResource *DbResource) GetUserEmailIdByUsergroupId(usergroupId int64) string
func (*DbResource) GetUserMailAccountRowByEmail ¶ added in v0.9.0
func (dbResource *DbResource) GetUserMailAccountRowByEmail(username string) (map[string]interface{}, error)
Returns the user account row of a user by looking up on email
func (*DbResource) GetUserMembersByGroupName ¶ added in v0.9.9
func (dbResource *DbResource) GetUserMembersByGroupName(groupName string) []string
func (*DbResource) GetUserPassword ¶ added in v0.6.5
func (dbResource *DbResource) GetUserPassword(email string) (string, error)
func (*DbResource) HandleActionRequest ¶ added in v0.6.9
func (db *DbResource) HandleActionRequest(actionRequest ActionRequest, req api2go.Request) ([]ActionResponse, error)
func (*DbResource) IsAdmin ¶ added in v0.9.9
func (dbResource *DbResource) IsAdmin(userReferenceId string) bool
func (*DbResource) IsUserActionAllowed ¶
func (dbResource *DbResource) IsUserActionAllowed(userReferenceId string, userGroups []auth.GroupPermission, typeName string, actionName string) bool
IsUserActionAllowed Checks if a user identified by userReferenceId and belonging to userGroups is allowed to invoke an action `actionName` on type `typeName` Called before invoking an action from the /action/** api Checks EXECUTE on both the type and action for this user The permissions can come from different groups
func (*DbResource) IsUserActionAllowedWithTransaction ¶ added in v0.9.9
func (dbResource *DbResource) IsUserActionAllowedWithTransaction(userReferenceId string, userGroups []auth.GroupPermission, typeName string, actionName string, transaction *sqlx.Tx) bool
func (*DbResource) NewActiveTaskInstance ¶ added in v0.6.9
func (dbResource *DbResource) NewActiveTaskInstance(task Task) *ActiveTaskInstance
func (*DbResource) PaginatedFindAll ¶
func (*DbResource) PaginatedFindAllWithTransaction ¶ added in v0.9.9
func (*DbResource) PaginatedFindAllWithoutFilters ¶ added in v0.6.5
func (dbResource *DbResource) PaginatedFindAllWithoutFilters(req api2go.Request, transaction *sqlx.Tx) ( []map[string]interface{}, [][]map[string]interface{}, *PaginationData, bool, error)
PaginatedFindAll(req Request) (totalCount uint, response Responder, err error)
func (*DbResource) PutContext ¶
func (dbResource *DbResource) PutContext(key string, val interface{})
func (*DbResource) RenameMailAccountBox ¶ added in v0.9.0
func (dbResource *DbResource) RenameMailAccountBox(mailAccountId int64, oldBoxName string, newBoxName string) error
Returns the user mail account box row of a user
func (*DbResource) ResultToArrayOfMap ¶
func (dbResource *DbResource) ResultToArrayOfMap(rows *sqlx.Rows, columnMap map[string]api2go.ColumnInfo, includedRelationMap map[string]bool) ([]map[string]interface{}, [][]map[string]interface{}, error)
ResultToArrayOfMap converts the result of db.QueryRowx => rows to array of data fetches the related objects also expects columnMap to be fetched from rows check usage in exiting source for example includeRelationMap can be nil to include none or map[string]bool{"*": true} to include all relations can be used on any *sqlx.Rows
func (*DbResource) ResultToArrayOfMapRaw ¶ added in v0.2.1
func (dbResource *DbResource) ResultToArrayOfMapRaw(rows *sqlx.Rows, columnMap map[string]api2go.ColumnInfo) ([]map[string]interface{}, error)
convert the result of db.QueryRowx => rows to array of data can be used on any *sqlx.Rows and assign a typeName calls RowsToMap with the current model name
func (*DbResource) ResultToArrayOfMapWithTransaction ¶ added in v0.9.9
func (dbResource *DbResource) ResultToArrayOfMapWithTransaction( rows *sqlx.Rows, columnMap map[string]api2go.ColumnInfo, includedRelationMap map[string]bool, transaction *sqlx.Tx) ([]map[string]interface{}, [][]map[string]interface{}, error)
ResultToArrayOfMap converts the result of db.QueryRowx => rows to array of data fetches the related objects also expects columnMap to be fetched from rows check usage in exiting source for example includeRelationMap can be nil to include none or map[string]bool{"*": true} to include all relations can be used on any *sqlx.Rows
func (*DbResource) SetMailBoxSubscribed ¶ added in v0.9.0
func (dbResource *DbResource) SetMailBoxSubscribed(mailAccountId int64, mailBoxName string, subscribed bool) error
Returns the user mail account box row of a user
func (*DbResource) StoreToken ¶ added in v0.6.5
func (*DbResource) SyncStorageToPath ¶ added in v0.6.9
func (dbResource *DbResource) SyncStorageToPath(cloudStore CloudStore, path string, tempDirectoryPath string) error
func (*DbResource) TableInfo ¶ added in v0.9.0
func (dbResource *DbResource) TableInfo() *TableInfo
func (*DbResource) TruncateTable ¶ added in v0.2.1
func (dbResource *DbResource) TruncateTable(typeName string, skipRelations bool) error
func (*DbResource) UpdateAccessTokenByTokenId ¶ added in v0.2.1
func (dbResource *DbResource) UpdateAccessTokenByTokenId(id int64, accessToken string, expiresIn int64) error
func (*DbResource) UpdateAccessTokenByTokenReferenceId ¶ added in v0.2.1
func (dbResource *DbResource) UpdateAccessTokenByTokenReferenceId(referenceId string, accessToken string, expiresIn int64) error
func (*DbResource) UpdateMailFlags ¶ added in v0.9.0
func (dbResource *DbResource) UpdateMailFlags(mailBoxId int64, mailId int64, newFlags []string) error
func (*DbResource) UpdateWithTransaction ¶ added in v0.9.9
func (*DbResource) UpdateWithoutFilters ¶ added in v0.6.5
func (dbResource *DbResource) UpdateWithoutFilters(obj interface{}, req api2go.Request, updateTransaction *sqlx.Tx) (map[string]interface{}, error)
Update an object Possible Responder status codes are: - 200 OK: Update successful, however some field(s) were changed, returns updates source - 202 Accepted: Processing is delayed, return nothing - 204 No Content: Update was successful, no fields were changed by the server, return nothing
func (*DbResource) UserGroupNameToId ¶ added in v0.6.5
func (dbResource *DbResource) UserGroupNameToId(groupName string) (uint64, error)
UserGroupNameToId Converts group name to the internal integer id
func (*DbResource) UserGroupNameToIdWithTransaction ¶ added in v0.9.9
func (dbResource *DbResource) UserGroupNameToIdWithTransaction(groupName string, transaction *sqlx.Tx) (uint64, error)
UserGroupNameToId Converts group name to the internal integer id
type DefaultTaskScheduler ¶ added in v0.6.9
type DefaultTaskScheduler struct {
// contains filtered or unexported fields
}
func (*DefaultTaskScheduler) AddTask ¶ added in v0.6.9
func (dts *DefaultTaskScheduler) AddTask(task Task) error
func (*DefaultTaskScheduler) StartTasks ¶ added in v0.6.9
func (dts *DefaultTaskScheduler) StartTasks()
func (*DefaultTaskScheduler) StopTasks ¶ added in v0.9.0
func (dts *DefaultTaskScheduler) StopTasks()
type EventMessage ¶ added in v0.9.9
type ExchangeContract ¶
type ExchangeContract struct { Name string SourceAttributes map[string]interface{} `db:"source_attributes"` Attributes map[string]interface{} `db:"attributes"` SourceType string `db:"source_type"` TargetAttributes map[string]interface{} `db:"target_attributes"` TargetType string `db:"target_type"` User auth.SessionUser Options map[string]interface{} ReferenceId string `db:"reference_id"` AsUserId int64 }
type ExchangeExecution ¶
type ExchangeExecution struct { ExchangeContract ExchangeContract // contains filtered or unexported fields }
func NewExchangeExecution ¶
func NewExchangeExecution(exchange ExchangeContract, cruds *map[string]*DbResource) *ExchangeExecution
type ExchangeInterface ¶
type ExternalExchange ¶
type ExternalExchange interface {
ExecuteTarget(row map[string]interface{}) (map[string]interface{}, error)
}
func NewActionExchangeHandler ¶ added in v0.9.9
func NewActionExchangeHandler(exchangeContract ExchangeContract, cruds map[string]*DbResource) ExternalExchange
func NewRestExchangeHandler ¶
func NewRestExchangeHandler(exchangeContext ExchangeContract) (ExternalExchange, error)
type FsmManager ¶
type FsmManager interface {
ApplyEvent(subject map[string]interface{}, stateMachineEvent StateMachineEvent) (string, error)
}
func NewFsmManager ¶
func NewFsmManager(db database.DatabaseConnection, cruds map[string]*DbResource) FsmManager
type Integration ¶ added in v0.9.0
type LoopbackEventDesc ¶
type LoopbackEventDesc struct { // Name is the event name used when calling for a transition. Name string Label string Color string // Src is a slice of source states that the FSM must be in to perform a // state transition. Src []string // Dst is the destination state that the FSM will be in if the transition // succeeds. Dst string }
type LoopbookFsmDescription ¶
type LoopbookFsmDescription struct { InitialState string Name string Label string Events []LoopbackEventDesc }
type MiddlewareSet ¶
type MiddlewareSet struct { BeforeCreate []DatabaseRequestInterceptor BeforeFindAll []DatabaseRequestInterceptor BeforeFindOne []DatabaseRequestInterceptor BeforeUpdate []DatabaseRequestInterceptor BeforeDelete []DatabaseRequestInterceptor AfterCreate []DatabaseRequestInterceptor AfterFindAll []DatabaseRequestInterceptor AfterFindOne []DatabaseRequestInterceptor AfterUpdate []DatabaseRequestInterceptor AfterDelete []DatabaseRequestInterceptor }
type ObjectAccessPermissionChecker ¶ added in v0.2.1
type ObjectAccessPermissionChecker struct { }
func (*ObjectAccessPermissionChecker) InterceptAfter ¶ added in v0.2.1
func (pc *ObjectAccessPermissionChecker) InterceptAfter(dr *DbResource, req *api2go.Request, results []map[string]interface{}, transaction *sqlx.Tx) ([]map[string]interface{}, error)
func (*ObjectAccessPermissionChecker) InterceptBefore ¶ added in v0.2.1
func (pc *ObjectAccessPermissionChecker) InterceptBefore(dr *DbResource, req *api2go.Request, results []map[string]interface{}, transaction *sqlx.Tx) ([]map[string]interface{}, error)
func (*ObjectAccessPermissionChecker) String ¶ added in v0.2.1
func (pc *ObjectAccessPermissionChecker) String() string
type Outcome ¶
type Outcome struct { Type string Method string // method name Reference string SkipInResponse bool Condition string Attributes map[string]interface{} ContinueOnError bool }
Outcome is call to a internal function with attributes as parameters Outcome has a particular `type`, it can be one of the data entities already defined Method is the type of outcome: GET/PUT/POST/DELETE/UPDATE/PATCH/EXECUTE/INTEGRATION Condition can be specified in JS to be checked, false condition will skip processing the outcome set SkipInResponse to true to not include action outcome in the http response of the action call reference is a name you can assign to the outcome of, which can be used in furthur chained outcomes Attributes is a map of string to interface{} which will be used by the action The attributes are evaluated to generate the actual data to be sent to execution JS scripting can be used to reference existing outcomes by reference names
type PaginationData ¶ added in v0.6.5
type PermissionInstance ¶ added in v0.5.7
type PermissionInstance struct { UserId string UserGroupId []auth.GroupPermission Permission auth.AuthPermission }
func GetObjectPermissionByReferenceIdWithTransaction ¶ added in v0.9.9
func GetObjectPermissionByReferenceIdWithTransaction(objectType string, referenceId string, transaction *sqlx.Tx) PermissionInstance
GetObjectPermissionByReferenceId Gets permission of an Object by typeName and string referenceId Loads the owner, usergroup and guest permission of the action from the database Return a PermissionInstance Return a NoPermissionToAnyone if no such object exist
func (PermissionInstance) CanCreate ¶ added in v0.5.7
func (p PermissionInstance) CanCreate(userId string, usergroupId []auth.GroupPermission) bool
func (PermissionInstance) CanDelete ¶ added in v0.5.7
func (p PermissionInstance) CanDelete(userId string, usergroupId []auth.GroupPermission) bool
func (PermissionInstance) CanExecute ¶ added in v0.5.7
func (p PermissionInstance) CanExecute(userId string, usergroupId []auth.GroupPermission) bool
func (PermissionInstance) CanPeek ¶ added in v0.5.7
func (p PermissionInstance) CanPeek(userId string, usergroupId []auth.GroupPermission) bool
func (PermissionInstance) CanRead ¶ added in v0.5.7
func (p PermissionInstance) CanRead(userId string, usergroupId []auth.GroupPermission) bool
func (PermissionInstance) CanRefer ¶ added in v0.5.7
func (p PermissionInstance) CanRefer(userId string, usergroupId []auth.GroupPermission) bool
func (PermissionInstance) CanUpdate ¶ added in v0.5.7
func (p PermissionInstance) CanUpdate(userId string, usergroupId []auth.GroupPermission) bool
type RestExchange ¶
type RestExternalExchange ¶
type RestExternalExchange struct {
// contains filtered or unexported fields
}
func (*RestExternalExchange) ExecuteTarget ¶
func (g *RestExternalExchange) ExecuteTarget(row map[string]interface{}) (map[string]interface{}, error)
type StateMachineEvent ¶
func NewStateMachineEvent ¶ added in v0.2.1
func NewStateMachineEvent(machineId string, eventName string) StateMachineEvent
type StateMachineInstance ¶
type StatusResponse ¶
type StatusResponse struct {
Message string
}
type StreamContract ¶ added in v0.4.0
type StreamContract struct { StreamName string RootEntityName string Columns []api2go.ColumnInfo Relations []api2go.TableRelation Transformations []Transformation QueryParams map[string][]string }
Stream contract defines column mappings and transformations. Also includes the query params which are to be used in the first place
type StreamProcessor ¶ added in v0.4.0
type StreamProcessor struct {
// contains filtered or unexported fields
}
StreamProcess handles the Read operations, and applies transformations on the data the create a new view
func NewStreamProcessor ¶ added in v0.4.0
func NewStreamProcessor(stream StreamContract, cruds map[string]*DbResource) *StreamProcessor
Creates a new stream processor which will apply the given contract
func (*StreamProcessor) Create ¶ added in v0.4.0
Create implementation in accordance with JSONAPI Create is not implemented for streams
func (*StreamProcessor) Delete ¶ added in v0.4.0
Delete implementation in accordance with JSONAPI Delete is not implemented for streams
func (*StreamProcessor) FindOne ¶ added in v0.4.0
FindOne implementation in accordance with JSONAPI FindOne is not implemented for streams
func (*StreamProcessor) GetContract ¶ added in v0.4.0
func (dr *StreamProcessor) GetContract() StreamContract
Get the contract
func (*StreamProcessor) GetName ¶ added in v0.9.0
func (dr *StreamProcessor) GetName() string
Get the contract
func (*StreamProcessor) PaginatedFindAll ¶ added in v0.4.0
func (dr *StreamProcessor) PaginatedFindAll(req api2go.Request) (totalCount uint, response api2go.Responder, err error)
FindAll implementation in accordance with JSONAPI FindAll does the initial query to the database and applites the transformation contract on the result rows
type SubSite ¶ added in v0.2.1
type SubSite struct { Id int64 Name string Hostname string Path string CloudStoreId *int64 `db:"cloud_store_id"` Permission PermissionInstance SiteType string `db:"site_type"` FtpEnabled bool `db:"ftp_enabled"` UserId *int64 `db:"user_account_id"` ReferenceId string `db:"reference_id"` Enable bool `db:"enable"` }
type SubSiteInformation ¶ added in v0.2.1
type SubSiteInformation struct { SubSite SubSite CloudStore CloudStore SourceRoot string }
type TableAccessPermissionChecker ¶
type TableAccessPermissionChecker struct { }
The TableAccessPermissionChecker middleware is resposible for entity level authorization check, before and after the changes
func (*TableAccessPermissionChecker) InterceptAfter ¶
func (pc *TableAccessPermissionChecker) InterceptAfter(dr *DbResource, req *api2go.Request, results []map[string]interface{}, transaction *sqlx.Tx) ([]map[string]interface{}, error)
Intercept after check implements if the data should be returned after the data change is complete
func (*TableAccessPermissionChecker) InterceptBefore ¶
func (pc *TableAccessPermissionChecker) InterceptBefore(dr *DbResource, req *api2go.Request, results []map[string]interface{}, transaction *sqlx.Tx) ([]map[string]interface{}, error)
Intercept before implemetation for entity level authentication check
func (*TableAccessPermissionChecker) String ¶
func (pc *TableAccessPermissionChecker) String() string
type TableInfo ¶
type TableInfo struct { TableName string `db:"table_name"` TableId int DefaultPermission auth.AuthPermission `db:"default_permission"` Columns []api2go.ColumnInfo StateMachines []LoopbookFsmDescription Relations []api2go.TableRelation IsTopLevel bool `db:"is_top_level"` Permission auth.AuthPermission UserId uint64 `db:"user_account_id"` IsHidden bool `db:"is_hidden"` IsJoinTable bool `db:"is_join_table"` IsStateTrackingEnabled bool `db:"is_state_tracking_enabled"` IsAuditEnabled bool `db:"is_audit_enabled"` TranslationsEnabled bool `db:"translation_enabled"` DefaultGroups []string `db:"default_groups"` DefaultRelations map[string][]string `db:"default_relations"` Validations []ColumnTag Conformations []ColumnTag DefaultOrder string Icon string CompositeKeys [][]string }
func (*TableInfo) AddRelation ¶ added in v0.5.7
func (ti *TableInfo) AddRelation(relations ...api2go.TableRelation)
func (*TableInfo) GetColumnByName ¶ added in v0.6.6
func (ti *TableInfo) GetColumnByName(name string) (*api2go.ColumnInfo, bool)
func (*TableInfo) GetRelationByName ¶ added in v0.9.9
func (ti *TableInfo) GetRelationByName(name string) (*api2go.TableRelation, bool)
type TableRelation ¶ added in v0.9.1
type TableRelation struct { api2go.TableRelation OnDelete string }
type Task ¶ added in v0.6.9
type TaskScheduler ¶ added in v0.6.9
func NewTaskScheduler ¶ added in v0.6.9
func NewTaskScheduler(cmsConfig *CmsConfig, cruds map[string]*DbResource, configStore *ConfigStore) TaskScheduler
type TokenResponse ¶ added in v0.6.5
type Transformation ¶ added in v0.4.0
A Transformation is the representation of column data changing its values according to the attribute map
Source Files ¶
- action_become_admin.go
- action_cloudstore_file_delete.go
- action_cloudstore_file_upload.go
- action_cloudstore_folder_create.go
- action_cloudstore_path_move.go
- action_cloudstore_site_create.go
- action_column_sync_storage.go
- action_csv_to_entity.go
- action_delete_column.go
- action_delete_table.go
- action_download_cms_config.go
- action_enable_graphql.go
- action_execute_process.go
- action_export_csv_data.go
- action_export_data.go
- action_generate_acme_tls_certificate.go
- action_generate_jwt_token.go
- action_generate_oauth2_token.go
- action_generate_password_reset_flow.go
- action_generate_password_reset_verify_flow.go
- action_generate_random_data.go
- action_generate_self_tls_certificate.go
- action_import_cloudstore_files.go
- action_import_data.go
- action_integration_execute.go
- action_integration_install.go
- action_mail_send.go
- action_mail_servers_sync.go
- action_make_response.go
- action_network_request.go
- action_oauth_login_begin.go
- action_oauth_login_response.go
- action_oauth_profile_exchange.go
- action_otp_generate.go
- action_otp_login_verify.go
- action_random_value_generate.go
- action_rename_column.go
- action_restart_system.go
- action_site_file_get.go
- action_site_file_list.go
- action_site_sync_storage.go
- action_xls_to_entity.go
- actions.go
- bcrypt_utils.go
- certificate_manager.go
- cms_config.go
- column_types.go
- columns.go
- constants.go
- dbfunctions_check.go
- dbfunctions_create.go
- dbfunctions_get.go
- dbfunctions_update.go
- dbmethods.go
- dbresource.go
- encryption_decryption.go
- event_create.go
- event_delete.go
- event_update.go
- exchange.go
- exchange_action.go
- exchange_rest.go
- fsm.go
- fsm_manager.go
- handle_action.go
- imap_backend.go
- imap_mailbox.go
- imap_user.go
- mail_functions.go
- middleware_datavalidation.go
- middleware_eventgenerator.go
- middleware_exchangegenerator.go
- middleware_objectaccess_permission.go
- middleware_tableaccess_permission.go
- middleware_yjsgenerator.go
- middlewares.go
- oauth_server.go
- permission.go
- reserved_words.go
- resource.go
- resource_create.go
- resource_delete.go
- resource_findallpaginated.go
- resource_findone.go
- resource_stats.go
- resource_update.go
- response.go
- storage.go
- streams.go
- task_scheduler.go
- task_sync_storage.go
- translations.go
- user.go