Documentation ¶
Index ¶
- Variables
- func AddResourcesToApi2Go(api *api2go.API, tables []resource.TableInfo, db database.DatabaseConnection, ...) map[string]*resource.DbResource
- func AddStreamsToApi2Go(api *api2go.API, processors []*resource.StreamProcessor, ...)
- func BeginsWithCheck(str string, beginsWith string) bool
- func BuildMiddlewareSet(cmsConfig *resource.CmsConfig, cruds *map[string]*resource.DbResource) resource.MiddlewareSet
- func Capitalize(s string) string
- func CheckSystemSecrets(store *resource.ConfigStore) error
- func CleanUpConfigFiles()
- func CorsMiddlewareFunc(c *gin.Context)
- func CreateApiBlueprintHandler(initConfig *resource.CmsConfig, cruds map[string]*resource.DbResource) func(ctx *gin.Context)
- func CreateConfigHandler(configStore *resource.ConfigStore) func(context *gin.Context)
- func CreateEventHandler(initConfig *resource.CmsConfig, fsmManager resource.FsmManager, ...) func(context *gin.Context)
- func CreateEventStartHandler(fsmManager resource.FsmManager, cruds map[string]*resource.DbResource, ...) func(context *gin.Context)
- func CreateJsModelHandler(initConfig *resource.CmsConfig, cruds map[string]*resource.DbResource) func(*gin.Context)
- func CreateMetaHandler(initConfig *resource.CmsConfig) func(*gin.Context)
- func CreateReclineModelHandler() func(*gin.Context)
- func CreateStatsHandler(initConfig *resource.CmsConfig, cruds map[string]*resource.DbResource) func(*gin.Context)
- func CreateSubSiteContentHandler(initConfig *resource.CmsConfig, cruds map[string]*resource.DbResource, ...) func(context *gin.Context)
- func CreateSubSiteSaveContentHandler(initConfig *resource.CmsConfig, cruds map[string]*resource.DbResource, ...) func(context *gin.Context)
- func EndsWith(str string, endsWith string) (string, bool)
- func EndsWithCheck(str string, endsWith string) bool
- func GetActionPerformers(initConfig *resource.CmsConfig, configStore *resource.ConfigStore, ...) []resource.ActionPerformerInterface
- func GetDbConnection(dbType string, connectionString string) (*sqlx.DB, error)
- func GetFilePath(sourceRoot string, path string) (string, bool)
- func GetStreamProcessors(config *resource.CmsConfig, store *resource.ConfigStore, ...) []*resource.StreamProcessor
- func GetSubSiteFromContext(context *gin.Context, siteMap map[string]resource.SubSiteInformation) (resource.SubSiteInformation, bool)
- func GetTablesFromWorld(db database.DatabaseConnection) ([]resource.TableInfo, error)
- func InArrayIndex(val interface{}, array interface{}) (index int)
- func IsStandardColumn(s string) bool
- func LoadConfigFiles() (resource.CmsConfig, []error)
- func MakeGraphqlSchema(cmsConfig *resource.CmsConfig, resources map[string]*resource.DbResource) *graphql.Schema
- func MergeTables(existingTables []resource.TableInfo, initConfigTables []resource.TableInfo) []resource.TableInfo
- func NewStaticFsWithDefaultIndex(system http.Dir, pageOn404 string) http.FileSystem
- func NewSubPathFs(system http.FileSystem, s string) http.FileSystem
- type CorsInfo
- type CorsMiddleware
- type ErrorResponse
- type GrapeAsset
- type GrapeSaveRequest
- type HostSwitch
- type JsModel
- type JsonApiError
- type JsonApiRelation
- type StaticFsWithDefaultIndex
- type SubPathFs
- type WebSocketConnectionHandlerImpl
Constants ¶
This section is empty.
Variables ¶
View Source
var Schema graphql.Schema
View Source
var Stats = stats.New()
View Source
var TaskScheduler resource.TaskScheduler
Functions ¶
func AddResourcesToApi2Go ¶
func AddResourcesToApi2Go(api *api2go.API, tables []resource.TableInfo, db database.DatabaseConnection, ms *resource.MiddlewareSet, configStore *resource.ConfigStore, cruds map[string]*resource.DbResource) map[string]*resource.DbResource
func AddStreamsToApi2Go ¶ added in v0.4.0
func AddStreamsToApi2Go(api *api2go.API, processors []*resource.StreamProcessor, db database.DatabaseConnection, middlewareSet *resource.MiddlewareSet, configStore *resource.ConfigStore)
func BeginsWithCheck ¶ added in v0.6.3
func BuildMiddlewareSet ¶
func BuildMiddlewareSet(cmsConfig *resource.CmsConfig, cruds *map[string]*resource.DbResource) resource.MiddlewareSet
func Capitalize ¶ added in v0.6.9
Capitalize capitalizes the first character of the string.
func CheckSystemSecrets ¶ added in v0.2.1
func CheckSystemSecrets(store *resource.ConfigStore) error
func CleanUpConfigFiles ¶
func CleanUpConfigFiles()
func CorsMiddlewareFunc ¶
func CreateApiBlueprintHandler ¶ added in v0.2.1
func CreateConfigHandler ¶
func CreateConfigHandler(configStore *resource.ConfigStore) func(context *gin.Context)
func CreateEventHandler ¶
func CreateEventHandler(initConfig *resource.CmsConfig, fsmManager resource.FsmManager, cruds map[string]*resource.DbResource, db database.DatabaseConnection) func(context *gin.Context)
func CreateEventStartHandler ¶
func CreateEventStartHandler(fsmManager resource.FsmManager, cruds map[string]*resource.DbResource, db database.DatabaseConnection) func(context *gin.Context)
func CreateJsModelHandler ¶
func CreateMetaHandler ¶ added in v0.4.0
func CreateReclineModelHandler ¶ added in v0.4.0
func CreateStatsHandler ¶ added in v0.6.2
func CreateSubSiteContentHandler ¶ added in v0.2.1
func CreateSubSiteContentHandler(initConfig *resource.CmsConfig, cruds map[string]*resource.DbResource, db database.DatabaseConnection) func(context *gin.Context)
func CreateSubSiteSaveContentHandler ¶ added in v0.2.1
func CreateSubSiteSaveContentHandler(initConfig *resource.CmsConfig, cruds map[string]*resource.DbResource, db database.DatabaseConnection) func(context *gin.Context)
func EndsWithCheck ¶ added in v0.2.1
func GetActionPerformers ¶
func GetActionPerformers(initConfig *resource.CmsConfig, configStore *resource.ConfigStore, cruds map[string]*resource.DbResource) []resource.ActionPerformerInterface
func GetDbConnection ¶ added in v0.2.1
func GetStreamProcessors ¶ added in v0.4.0
func GetStreamProcessors(config *resource.CmsConfig, store *resource.ConfigStore, cruds map[string]*resource.DbResource) []*resource.StreamProcessor
func GetSubSiteFromContext ¶ added in v0.2.1
func GetSubSiteFromContext(context *gin.Context, siteMap map[string]resource.SubSiteInformation) (resource.SubSiteInformation, bool)
func GetTablesFromWorld ¶
func GetTablesFromWorld(db database.DatabaseConnection) ([]resource.TableInfo, error)
func InArrayIndex ¶ added in v0.6.8
func InArrayIndex(val interface{}, array interface{}) (index int)
func IsStandardColumn ¶ added in v0.6.9
func LoadConfigFiles ¶ added in v0.6.8
Load config files which have the naming of the form schema_*_daptin.json/yaml
func MakeGraphqlSchema ¶ added in v0.6.9
func MergeTables ¶ added in v0.6.4
func NewStaticFsWithDefaultIndex ¶ added in v0.6.5
func NewStaticFsWithDefaultIndex(system http.Dir, pageOn404 string) http.FileSystem
func NewSubPathFs ¶ added in v0.6.4
func NewSubPathFs(system http.FileSystem, s string) http.FileSystem
Types ¶
type CorsMiddleware ¶
type CorsMiddleware struct { // Reject non CORS requests if true. See CorsInfo.IsCors. RejectNonCorsRequests bool // Function executed for every CORS requests to validate the Origin. (Required) // Must return true if valid, false if invalid. // For instance: simple equality, regexp, DB lookup, ... OriginValidator func(origin string, request *http.Request) bool // List of allowed HTTP methods. Note that the comparison will be made in // uppercase to avoid common mistakes. And that the // Access-Control-Allow-Methods response header also uses uppercase. // (see CorsInfo.AccessControlRequestMethod) AllowedMethods []string // List of allowed HTTP Headers. Note that the comparison will be made with // noarmalized names (http.CanonicalHeaderKey). And that the response header // also uses normalized names. // (see CorsInfo.AccessControlRequestHeaders) AllowedHeaders []string // List of headers used to set the Access-Control-Expose-Headers header. AccessControlExposeHeaders []string // User to se the Access-Control-Allow-Credentials response header. AccessControlAllowCredentials bool // Used to set the Access-Control-Max-Age response header, in seconds. AccessControlMaxAge int // contains filtered or unexported fields }
CorsMiddleware provides a configurable CORS implementation.
type ErrorResponse ¶ added in v0.6.2
type ErrorResponse struct {
Message string
}
type GrapeAsset ¶ added in v0.2.1
type GrapeAsset struct { Src string `json:"src"` Type string `json:"type"` UnitDimension string `json:"unitDim"` Height int `json:"height"` Width int `json:"width"` }
func NewImageGrapeAsset ¶ added in v0.2.1
func NewImageGrapeAsset(src string) GrapeAsset
func NewScriptGrapeAsset ¶ added in v0.2.1
func NewScriptGrapeAsset(src string) GrapeAsset
func NewStyleGrapeAsset ¶ added in v0.2.1
func NewStyleGrapeAsset(src string) GrapeAsset
type GrapeSaveRequest ¶ added in v0.2.1
type GrapeSaveRequest struct { Css string `json:"gjs-css"` Assets []GrapeAsset `json:"gjs-assets"` Html string `json:"gjs-html"` }
type HostSwitch ¶ added in v0.2.1
type HostSwitch struct {
// contains filtered or unexported fields
}
func CreateSubSites ¶ added in v0.2.1
func CreateSubSites(cmsConfig *resource.CmsConfig, db database.DatabaseConnection, cruds map[string]*resource.DbResource, authMiddleware *auth.AuthMiddleware) HostSwitch
func Main ¶
func Main(boxRoot http.FileSystem, db database.DatabaseConnection) HostSwitch
func (HostSwitch) ServeHTTP ¶ added in v0.2.1
func (hs HostSwitch) ServeHTTP(w http.ResponseWriter, r *http.Request)
Implement the ServerHTTP method on our new type
type JsonApiError ¶ added in v0.2.1
type JsonApiError struct {
Message string
}
type JsonApiRelation ¶
type JsonApiRelation struct { JsonApi string `json:"jsonApi,omitempty"` ColumnType string `json:"columnType"` Type string `json:"type,omitempty"` ColumnName string `json:"ColumnName"` }
func NewJsonApiRelation ¶
func NewJsonApiRelation(name string, relationName string, relationType string, columnType string) JsonApiRelation
type StaticFsWithDefaultIndex ¶ added in v0.6.5
type StaticFsWithDefaultIndex struct {
// contains filtered or unexported fields
}
type SubPathFs ¶ added in v0.6.4
type SubPathFs struct {
// contains filtered or unexported fields
}
type WebSocketConnectionHandlerImpl ¶ added in v0.6.2
type WebSocketConnectionHandlerImpl struct { }
func (*WebSocketConnectionHandlerImpl) MessageFromClient ¶ added in v0.6.2
func (wsch *WebSocketConnectionHandlerImpl) MessageFromClient(message websockets.WebSocketPayload, request *http.Request)
Source Files ¶
Click to show internal directories.
Click to hide internal directories.