Documentation ¶
Index ¶
- func AddResourcesToApi2Go(api *api2go.API, tables []resource.TableInfo, db *sqlx.DB, ...) map[string]*resource.DbResource
- func AddStreamsToApi2Go(api *api2go.API, processors []*resource.StreamProcessor, db *sqlx.DB, ...)
- func BuildMiddlewareSet(cmsConfig *resource.CmsConfig) resource.MiddlewareSet
- 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) func(*gin.Context)
- func CreateMetaHandler(initConfig *resource.CmsConfig) func(*gin.Context)
- func CreateReclineModelHandler() 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 *sqlx.DB) ([]resource.TableInfo, error)
- func Main(boxRoot, boxStatic http.FileSystem, db *sqlx.DB, wg *sync.WaitGroup, ...)
- type CorsInfo
- type CorsMiddleware
- type GrapeAsset
- type GrapeSaveRequest
- type HostSwitch
- type JsModel
- type JsonApiError
- type JsonApiRelation
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddResourcesToApi2Go ¶
func AddResourcesToApi2Go(api *api2go.API, tables []resource.TableInfo, db *sqlx.DB, ms *resource.MiddlewareSet, configStore *resource.ConfigStore) map[string]*resource.DbResource
func AddStreamsToApi2Go ¶ added in v0.4.0
func AddStreamsToApi2Go(api *api2go.API, processors []*resource.StreamProcessor, db *sqlx.DB, middlewareSet *resource.MiddlewareSet, configStore *resource.ConfigStore)
func BuildMiddlewareSet ¶
func BuildMiddlewareSet(cmsConfig *resource.CmsConfig) resource.MiddlewareSet
func CheckSystemSecrets ¶ added in v0.2.1
func CheckSystemSecrets(store *resource.ConfigStore) error
func CleanUpConfigFiles ¶
func CleanUpConfigFiles()
func CorsMiddlewareFunc ¶
func CorsMiddlewareFunc(c *gin.Context)
func CreateApiBlueprintHandler ¶ added in v0.2.1
func CreateApiBlueprintHandler(initConfig *resource.CmsConfig, cruds map[string]*resource.DbResource) func(ctx *gin.Context)
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 *sqlx.DB) func(context *gin.Context)
func CreateEventStartHandler ¶
func CreateEventStartHandler(fsmManager resource.FsmManager, cruds map[string]*resource.DbResource, db *sqlx.DB) func(context *gin.Context)
func CreateJsModelHandler ¶
func CreateMetaHandler ¶ added in v0.4.0
func CreateReclineModelHandler ¶ added in v0.4.0
func CreateReclineModelHandler() func(*gin.Context)
func CreateSubSiteContentHandler ¶ added in v0.2.1
func CreateSubSiteSaveContentHandler ¶ added in v0.2.1
func EndsWithCheck ¶ added in v0.2.1
func GetActionPerformers ¶
func GetActionPerformers(initConfig *resource.CmsConfig, configStore *resource.ConfigStore) []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)
Types ¶
type CorsMiddleware ¶
type CorsMiddleware struct { // Reject non CORS requests if true. See CorsInfo.IsCors. RejectNonCorsRequests bool // Function excecuted 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 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(config *resource.CmsConfig, db *sqlx.DB, cruds map[string]*resource.DbResource) 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
Source Files ¶
Click to show internal directories.
Click to hide internal directories.