Documentation ¶
Index ¶
- func EnoughTime(key string, cb func(key string) error) bool
- func GetIdFromQueryString(queryString string) (string, error)
- func Hash(fields []string) string
- func Slug(i content.Identifiable) (string, error)
- func StringToSlug(s string) (string, error)
- type Author
- func (s *Author) AfterAPICreate(res http.ResponseWriter, req *http.Request) error
- func (s *Author) Approve(res http.ResponseWriter, req *http.Request) error
- func (s *Author) AutoApprove(res http.ResponseWriter, req *http.Request) error
- func (s *Author) BeforeAPICreate(res http.ResponseWriter, req *http.Request) error
- func (s *Author) Create(res http.ResponseWriter, req *http.Request) error
- func (s *Author) IndexContent() bool
- func (s *Author) MarshalEditor() ([]byte, error)
- func (s *Author) String() string
- type Deployment
- func (s *Deployment) AfterAPICreate(res http.ResponseWriter, req *http.Request) error
- func (s *Deployment) Approve(res http.ResponseWriter, req *http.Request) error
- func (s *Deployment) AutoApprove(res http.ResponseWriter, req *http.Request) error
- func (s *Deployment) BeforeAPICreate(res http.ResponseWriter, req *http.Request) error
- func (s *Deployment) Create(res http.ResponseWriter, req *http.Request) error
- func (s *Deployment) IndexContent() bool
- func (s *Deployment) MarshalEditor() ([]byte, error)
- func (s *Deployment) SelectContentTypes() []string
- func (s *Deployment) SetHash()
- func (s *Deployment) SetSelectData(data map[string][][]byte)
- func (s *Deployment) String() string
- type Domain
- func (d *Domain) AfterAPICreate(res http.ResponseWriter, req *http.Request) error
- func (d *Domain) Approve(res http.ResponseWriter, req *http.Request) error
- func (d *Domain) AutoApprove(res http.ResponseWriter, req *http.Request) error
- func (d *Domain) BeforeAPICreate(res http.ResponseWriter, req *http.Request) error
- func (d *Domain) Create(res http.ResponseWriter, req *http.Request) error
- func (d *Domain) FullDomain() string
- func (d *Domain) IndexContent() bool
- func (d *Domain) MarshalEditor() ([]byte, error)
- func (d *Domain) Name() string
- func (d *Domain) SetHash()
- func (d *Domain) String() string
- type File
- type Index
- type Item
- func (i *Item) AfterAPICreate(res http.ResponseWriter, req *http.Request) error
- func (i *Item) AfterAPIDelete(res http.ResponseWriter, req *http.Request) error
- func (i *Item) AfterAPIResponse(res http.ResponseWriter, req *http.Request, data []byte) error
- func (i *Item) AfterAPIUpdate(res http.ResponseWriter, req *http.Request) error
- func (i *Item) AfterAdminCreate(res http.ResponseWriter, req *http.Request) error
- func (i *Item) AfterAdminDelete(res http.ResponseWriter, req *http.Request) error
- func (i *Item) AfterAdminUpdate(res http.ResponseWriter, req *http.Request) error
- func (i *Item) AfterApprove(res http.ResponseWriter, req *http.Request) error
- func (i *Item) AfterDelete(res http.ResponseWriter, req *http.Request) error
- func (i *Item) AfterDisable(res http.ResponseWriter, req *http.Request) error
- func (i *Item) AfterEnable(res http.ResponseWriter, req *http.Request) error
- func (i *Item) AfterReject(res http.ResponseWriter, req *http.Request) error
- func (i *Item) AfterSave(res http.ResponseWriter, req *http.Request) error
- func (i *Item) BeforeAPICreate(res http.ResponseWriter, req *http.Request) error
- func (i *Item) BeforeAPIDelete(res http.ResponseWriter, req *http.Request) error
- func (i *Item) BeforeAPIResponse(res http.ResponseWriter, req *http.Request, data []byte) ([]byte, error)
- func (i *Item) BeforeAPIUpdate(res http.ResponseWriter, req *http.Request) error
- func (i *Item) BeforeAdminCreate(res http.ResponseWriter, req *http.Request) error
- func (i *Item) BeforeAdminDelete(res http.ResponseWriter, req *http.Request) error
- func (i *Item) BeforeAdminUpdate(res http.ResponseWriter, req *http.Request) error
- func (i *Item) BeforeApprove(res http.ResponseWriter, req *http.Request) error
- func (i *Item) BeforeDelete(res http.ResponseWriter, req *http.Request) error
- func (i *Item) BeforeDisable(res http.ResponseWriter, req *http.Request) error
- func (i *Item) BeforeEnable(res http.ResponseWriter, req *http.Request) error
- func (i *Item) BeforeReject(res http.ResponseWriter, req *http.Request) error
- func (i *Item) BeforeSave(res http.ResponseWriter, req *http.Request) error
- func (i *Item) IndexContent() bool
- func (i *Item) ItemHash() string
- func (i *Item) ItemID() int
- func (i *Item) ItemName() string
- func (i *Item) ItemSlug() string
- func (i *Item) ItemStatus() content.Status
- func (i *Item) QueryString() string
- func (i *Item) SearchMapping() (*mapping.IndexMappingImpl, error)
- func (i *Item) SetItemID(id int)
- func (i *Item) SetItemStatus(status content.Status)
- func (i *Item) SetSlug(slug string)
- func (i *Item) SetUniqueID(uuid uuid.UUID)
- func (i *Item) String() string
- func (i *Item) Time() int64
- func (i *Item) Touch() int64
- func (i *Item) UniqueID() uuid.UUID
- func (i *Item) UpdateTime() time.Time
- type Language
- type Post
- func (s *Post) AfterAPICreate(res http.ResponseWriter, req *http.Request) error
- func (s *Post) Approve(res http.ResponseWriter, req *http.Request) error
- func (s *Post) AutoApprove(res http.ResponseWriter, req *http.Request) error
- func (s *Post) BeforeAPICreate(res http.ResponseWriter, req *http.Request) error
- func (s *Post) Create(res http.ResponseWriter, req *http.Request) error
- func (s *Post) FrontMatter() string
- func (s *Post) FullContent() string
- func (s *Post) IndexContent() bool
- func (s *Post) Markdown() ([]byte, error)
- func (s *Post) MarshalEditor() ([]byte, error)
- func (s *Post) Push(http.ResponseWriter, *http.Request) ([]string, error)
- func (s *Post) String() string
- type Resource
- func (s *Resource) AfterAPICreate(res http.ResponseWriter, req *http.Request) error
- func (s *Resource) Approve(res http.ResponseWriter, req *http.Request) error
- func (s *Resource) AutoApprove(res http.ResponseWriter, req *http.Request) error
- func (s *Resource) BeforeAPICreate(res http.ResponseWriter, req *http.Request) error
- func (s *Resource) Create(res http.ResponseWriter, req *http.Request) error
- func (s *Resource) IndexContent() bool
- func (s *Resource) MarshalEditor() ([]byte, error)
- func (s *Resource) String() string
- type Site
- func (s *Site) AfterAPICreate(res http.ResponseWriter, req *http.Request) error
- func (s *Site) Approve(res http.ResponseWriter, req *http.Request) error
- func (s *Site) AutoApprove(res http.ResponseWriter, req *http.Request) error
- func (s *Site) BeforeAPICreate(res http.ResponseWriter, req *http.Request) error
- func (s *Site) Build() bool
- func (s *Site) Create(res http.ResponseWriter, req *http.Request) error
- func (s *Site) Deploy() bool
- func (s *Site) HasMenus() bool
- func (s *Site) IndexContent() bool
- func (s *Site) IsMultiLanguages() bool
- func (s *Site) MarshalEditor() ([]byte, error)
- func (s *Site) String() string
- func (s *Site) Toml() ([]byte, error)
- func (s *Site) UnmarshalJSON(data []byte) error
- type SiteLanguage
- func (s *SiteLanguage) AfterAPICreate(res http.ResponseWriter, req *http.Request) error
- func (s *SiteLanguage) Approve(res http.ResponseWriter, req *http.Request) error
- func (s *SiteLanguage) AutoApprove(res http.ResponseWriter, req *http.Request) error
- func (s *SiteLanguage) BeforeAPICreate(res http.ResponseWriter, req *http.Request) error
- func (s *SiteLanguage) Create(res http.ResponseWriter, req *http.Request) error
- func (s *SiteLanguage) IndexContent() bool
- func (s *SiteLanguage) MarshalEditor() ([]byte, error)
- func (s *SiteLanguage) SelectContentTypes() []string
- func (s *SiteLanguage) SetSelectData(data map[string][][]byte)
- func (s *SiteLanguage) String() string
- type SitePost
- func (s *SitePost) AfterAPICreate(res http.ResponseWriter, req *http.Request) error
- func (s *SitePost) Approve(res http.ResponseWriter, req *http.Request) error
- func (s *SitePost) AutoApprove(res http.ResponseWriter, req *http.Request) error
- func (s *SitePost) BeforeAPICreate(res http.ResponseWriter, req *http.Request) error
- func (s *SitePost) Create(res http.ResponseWriter, req *http.Request) error
- func (s *SitePost) IndexContent() bool
- func (s *SitePost) MarshalEditor() ([]byte, error)
- func (s *SitePost) SelectContentTypes() []string
- func (s *SitePost) SetSelectData(data map[string][][]byte)
- func (s *SitePost) String() string
- type SiteResource
- func (s *SiteResource) AfterAPICreate(res http.ResponseWriter, req *http.Request) error
- func (s *SiteResource) Approve(res http.ResponseWriter, req *http.Request) error
- func (s *SiteResource) AutoApprove(res http.ResponseWriter, req *http.Request) error
- func (s *SiteResource) BeforeAPICreate(res http.ResponseWriter, req *http.Request) error
- func (s *SiteResource) Create(res http.ResponseWriter, req *http.Request) error
- func (s *SiteResource) IndexContent() bool
- func (s *SiteResource) MarshalEditor() ([]byte, error)
- func (s *SiteResource) SelectContentTypes() []string
- func (s *SiteResource) SetSelectData(data map[string][][]byte)
- func (s *SiteResource) String() string
- type SortableContent
- type Theme
- func (s *Theme) AfterAPICreate(res http.ResponseWriter, req *http.Request) error
- func (s *Theme) Approve(res http.ResponseWriter, req *http.Request) error
- func (s *Theme) AutoApprove(res http.ResponseWriter, req *http.Request) error
- func (s *Theme) BeforeAPICreate(res http.ResponseWriter, req *http.Request) error
- func (s *Theme) Create(res http.ResponseWriter, req *http.Request) error
- func (s *Theme) IndexContent() bool
- func (s *Theme) MarshalEditor() ([]byte, error)
- func (s *Theme) SelectContentTypes() []string
- func (s *Theme) SetSelectData(data map[string][][]byte)
- func (s *Theme) String() string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetIdFromQueryString ¶
func Slug ¶ added in v0.1.0
func Slug(i content.Identifiable) (string, error)
Slug returns a URL friendly string from the title of a post item
func StringToSlug ¶ added in v0.1.0
Types ¶
type Author ¶
type Author struct { Item FirstName string `json:"first_name"` LastName string `json:"last_name"` Email string `json:"email"` SiteURL string `json:"site_url"` Avatar string `json:"avatar"` }
func (*Author) AfterAPICreate ¶
AfterAPICreate is called after Create, and is useful for logging or triggering notifications, etc. after the data is saved to the database, etc. The request has a context containing the databse 'target' affected by the request. Ex. Song__pending:3 or Song:8 depending if Song implements api.Trustable
func (*Author) Approve ¶
Approve implements editor.Mergeable, which enables content supplied by external clients to be approved and thus added to the public content API. Before content is approved, it is waiting in the Pending bucket, and can only be approved in the CMS if the Mergeable interface is satisfied. If not, you will not see this content show up in the CMS.
func (*Author) AutoApprove ¶
AutoApprove implements api.Trustable, and will automatically approve content that has been submitted by an external client via api.Createable. Be careful when using AutoApprove, because content will immediately be available through your public content API. If the Trustable interface is satisfied, the AfterApprove method is bypassed. The
func (*Author) BeforeAPICreate ¶
BeforeAPICreate is only called if the Song type implements api.Createable It is called before Create, and returning an error will cancel the request causing the system to reject the data sent in the POST
func (*Author) Create ¶
Create implements api.Createable, and allows external POST requests from clients to add content as long as the request contains the json tag names of the Song struct fields, and is multipart encoded
func (*Author) IndexContent ¶
func (*Author) MarshalEditor ¶
MarshalEditor writes a buffer of html to edit a Song within the CMS and implements editor.Editable
type Deployment ¶ added in v0.1.0
type Deployment struct { Item Domain string `json:"domain"` SiteID string `json:"site_id"` SiteName string `json:"site_name"` SitePath string `json:"site_path"` HostName string `json:"host_name"` Status string `json:"status"` // contains filtered or unexported fields }
func (*Deployment) AfterAPICreate ¶ added in v0.1.0
func (s *Deployment) AfterAPICreate(res http.ResponseWriter, req *http.Request) error
AfterAPICreate is called after Create, and is useful for logging or triggering notifications, etc. after the data is saved to the database, etc. The request has a context containing the databse 'target' affected by the request. Ex. Song__pending:3 or Song:8 depending if Song implements api.Trustable
func (*Deployment) Approve ¶ added in v0.1.0
func (s *Deployment) Approve(res http.ResponseWriter, req *http.Request) error
Approve implements editor.Mergeable, which enables content supplied by external clients to be approved and thus added to the public content API. Before content is approved, it is waiting in the Pending bucket, and can only be approved in the CMS if the Mergeable interface is satisfied. If not, you will not see this content show up in the CMS.
func (*Deployment) AutoApprove ¶ added in v0.1.0
func (s *Deployment) AutoApprove(res http.ResponseWriter, req *http.Request) error
AutoApprove implements api.Trustable, and will automatically approve content that has been submitted by an external client via api.Createable. Be careful when using AutoApprove, because content will immediately be available through your public content API. If the Trustable interface is satisfied, the AfterApprove method is bypassed. The
func (*Deployment) BeforeAPICreate ¶ added in v0.1.0
func (s *Deployment) BeforeAPICreate(res http.ResponseWriter, req *http.Request) error
BeforeAPICreate is only called if the Song type implements api.Createable It is called before Create, and returning an error will cancel the request causing the system to reject the data sent in the POST
func (*Deployment) Create ¶ added in v0.1.0
func (s *Deployment) Create(res http.ResponseWriter, req *http.Request) error
Create implements api.Createable, and allows external POST requests from clients to add content as long as the request contains the json tag names of the Song struct fields, and is multipart encoded
func (*Deployment) IndexContent ¶ added in v0.1.0
func (s *Deployment) IndexContent() bool
func (*Deployment) MarshalEditor ¶ added in v0.1.0
func (s *Deployment) MarshalEditor() ([]byte, error)
MarshalEditor writes a buffer of html to edit a Song within the CMS and implements editor.Editable
func (*Deployment) SelectContentTypes ¶ added in v0.1.0
func (s *Deployment) SelectContentTypes() []string
func (*Deployment) SetHash ¶ added in v0.1.0
func (s *Deployment) SetHash()
func (*Deployment) SetSelectData ¶ added in v0.1.0
func (s *Deployment) SetSelectData(data map[string][][]byte)
func (*Deployment) String ¶ added in v0.1.0
func (s *Deployment) String() string
String defines the display name of a Song in the CMS list-view
type Domain ¶ added in v0.0.5
type Domain struct { Item Root string `json:"root"` Sub string `json:"sub"` Owner string `json:"owner"` }
func (*Domain) AfterAPICreate ¶ added in v0.0.5
AfterAPICreate is called after Create, and is useful for logging or triggering notifications, etc. after the data is saved to the database, etc. The request has a context containing the databse 'target' affected by the request. Ex. Song__pending:3 or Song:8 depending if Song implements api.Trustable
func (*Domain) Approve ¶ added in v0.0.5
Approve implements editor.Mergeable, which enables content supplied by external clients to be approved and thus added to the public content API. Before content is approved, it is waiting in the Pending bucket, and can only be approved in the CMS if the Mergeable interface is satisfied. If not, you will not see this content show up in the CMS.
func (*Domain) AutoApprove ¶ added in v0.0.5
AutoApprove implements api.Trustable, and will automatically approve content that has been submitted by an external client via api.Createable. Be careful when using AutoApprove, because content will immediately be available through your public content API. If the Trustable interface is satisfied, the AfterApprove method is bypassed. The
func (*Domain) BeforeAPICreate ¶ added in v0.0.5
BeforeAPICreate is only called if the Song type implements api.Createable It is called before Create, and returning an error will cancel the request causing the system to reject the data sent in the POST
func (*Domain) Create ¶ added in v0.0.5
Create implements api.Createable, and allows external POST requests from clients to add content as long as the request contains the json tag names of the Song struct fields, and is multipart encoded
func (*Domain) FullDomain ¶ added in v0.1.0
func (*Domain) IndexContent ¶ added in v0.1.0
func (*Domain) MarshalEditor ¶ added in v0.0.5
MarshalEditor writes a buffer of html to edit a Song within the CMS and implements editor.Editable
type Index ¶
type Index struct {
// contains filtered or unexported fields
}
func CreateIndex ¶
func (*Index) ContentType ¶
type Item ¶
type Item struct { UUID uuid.UUID `json:"uuid"` Status content.Status `json:"status"` Namespace string `json:"namespace"` ID int `json:"id"` Slug string `json:"slug"` Hash string `json:"hash"` Timestamp int64 `json:"timestamp"` Updated int64 `json:"updated"` }
Item should only be embedded into content type structs.
func NewItemWithNamespace ¶
func (*Item) AfterAPICreate ¶
AfterAPICreate is a no-op to ensure structs which embed *Item implement Hookable
func (*Item) AfterAPIDelete ¶
AfterAPIDelete is a no-op to ensure structs which embed *Item implement Hookable
func (*Item) AfterAPIResponse ¶
AfterAPIResponse is a no-op to ensure structs which embed *Item implement Hookable
func (*Item) AfterAPIUpdate ¶
AfterAPIUpdate is a no-op to ensure structs which embed *Item implement Hookable
func (*Item) AfterAdminCreate ¶
AfterAdminCreate is a no-op to ensure structs which embed *Item implement Hookable
func (*Item) AfterAdminDelete ¶
AfterAdminDelete is a no-op to ensure structs which embed *Item implement Hookable
func (*Item) AfterAdminUpdate ¶
AfterAdminUpdate is a no-op to ensure structs which embed *Item implement Hookable
func (*Item) AfterApprove ¶
AfterApprove is a no-op to ensure structs which embed *Item implement Hookable
func (*Item) AfterDelete ¶
AfterDelete is a no-op to ensure structs which embed *Item implement Hookable
func (*Item) AfterDisable ¶
AfterDisable is a no-op to ensure structs which embed *Item implement Hookable
func (*Item) AfterEnable ¶
AfterEnable is a no-op to ensure structs which embed *Item implement Hookable
func (*Item) AfterReject ¶
AfterReject is a no-op to ensure structs which embed *Item implement Hookable
func (*Item) AfterSave ¶
AfterSave is a no-op to ensure structs which embed *Item implement Hookable
func (*Item) BeforeAPICreate ¶
BeforeAPICreate is a no-op to ensure structs which embed *Item implement Hookable
func (*Item) BeforeAPIDelete ¶
BeforeAPIDelete is a no-op to ensure structs which embed *Item implement Hookable
func (*Item) BeforeAPIResponse ¶
func (i *Item) BeforeAPIResponse(res http.ResponseWriter, req *http.Request, data []byte) ([]byte, error)
BeforeAPIResponse is a no-op to ensure structs which embed *Item implement Hookable
func (*Item) BeforeAPIUpdate ¶
BeforeAPIUpdate is a no-op to ensure structs which embed *Item implement Hookable
func (*Item) BeforeAdminCreate ¶
BeforeAdminCreate is a no-op to ensure structs which embed *Item implement Hookable
func (*Item) BeforeAdminDelete ¶
BeforeAdminDelete is a no-op to ensure structs which embed *Item implement Hookable
func (*Item) BeforeAdminUpdate ¶
BeforeAdminUpdate is a no-op to ensure structs which embed *Item implement Hookable
func (*Item) BeforeApprove ¶
BeforeApprove is a no-op to ensure structs which embed *Item implement Hookable
func (*Item) BeforeDelete ¶
BeforeDelete is a no-op to ensure structs which embed *Item implement Hookable
func (*Item) BeforeDisable ¶
BeforeDisable is a no-op to ensure structs which embed *Item implement Hookable
func (*Item) BeforeEnable ¶
BeforeEnable is a no-op to ensure structs which embed *Item implement Hookable
func (*Item) BeforeReject ¶
BeforeReject is a no-op to ensure structs which embed *Item implement Hookable
func (*Item) BeforeSave ¶
BeforeSave is a no-op to ensure structs which embed *Item implement Hookable
func (*Item) IndexContent ¶
IndexContent determines if a type should be indexed for searching partially implements search.Searchable
func (*Item) ItemID ¶
ItemID gets the *Item's ID field partially implements the Identifiable interface
func (*Item) ItemName ¶
ItemName gets the *Item's Namespace field partially implements the Identifiable interface
func (*Item) ItemStatus ¶
ItemStatus gets the *Item's Status field partially implements the Identifiable interface
func (*Item) QueryString ¶
func (*Item) SearchMapping ¶
func (i *Item) SearchMapping() (*mapping.IndexMappingImpl, error)
SearchMapping returns a default implementation of a Bleve IndexMappingImpl partially implements search.Searchable
func (*Item) SetItemID ¶
SetItemID sets the *Item's ID field partially implements the Identifiable interface
func (*Item) SetItemStatus ¶
SetItemStatus sets the *Item's Status field partially implements the Identifiable interface
func (*Item) SetUniqueID ¶
func (*Item) String ¶
String formats an *Item into a printable value partially implements the Identifiable interface
func (*Item) UniqueID ¶
UniqueID gets the *Item's UUID field partially implements the Identifiable interface
func (*Item) UpdateTime ¶
type Language ¶
func (*Language) IndexContent ¶
func (*Language) MarshalEditor ¶
MarshalEditor writes a buffer of html to edit a Artist within the CMS and implements editor.Editable
type Post ¶
type Post struct { Item Title string `json:"title"` Content string `json:"content"` Author string `json:"author"` Params string `json:"params"` Assets []string `json:"assets"` }
func (*Post) AfterAPICreate ¶
AfterAPICreate is called after Create, and is useful for logging or triggering notifications, etc. after the data is saved to the database, etc. The request has a context containing the databse 'target' affected by the request. Ex. Song__pending:3 or Song:8 depending if Song implements api.Trustable
func (*Post) Approve ¶
Approve implements editor.Mergeable, which enables content supplied by external clients to be approved and thus added to the public content API. Before content is approved, it is waiting in the Pending bucket, and can only be approved in the CMS if the Mergeable interface is satisfied. If not, you will not see this content show up in the CMS.
func (*Post) AutoApprove ¶
AutoApprove implements api.Trustable, and will automatically approve content that has been submitted by an external client via api.Createable. Be careful when using AutoApprove, because content will immediately be available through your public content API. If the Trustable interface is satisfied, the AfterApprove method is bypassed. The
func (*Post) BeforeAPICreate ¶
BeforeAPICreate is only called if the Song type implements api.Createable It is called before Create, and returning an error will cancel the request causing the system to reject the data sent in the POST
func (*Post) Create ¶
Create implements api.Createable, and allows external POST requests from clients to add content as long as the request contains the json tag names of the Song struct fields, and is multipart encoded
func (*Post) FrontMatter ¶
func (*Post) FullContent ¶
func (*Post) IndexContent ¶
func (*Post) MarshalEditor ¶
MarshalEditor writes a buffer of html to edit a Song within the CMS and implements editor.Editable
type Resource ¶ added in v0.0.13
func (*Resource) AfterAPICreate ¶ added in v0.0.13
AfterAPICreate is called after Create, and is useful for logging or triggering notifications, etc. after the data is saved to the database, etc. The request has a context containing the databse 'target' affected by the request. Ex. Song__pending:3 or Song:8 depending if Song implements api.Trustable
func (*Resource) Approve ¶ added in v0.0.13
Approve implements editor.Mergeable, which enables content supplied by external clients to be approved and thus added to the public content API. Before content is approved, it is waiting in the Pending bucket, and can only be approved in the CMS if the Mergeable interface is satisfied. If not, you will not see this content show up in the CMS.
func (*Resource) AutoApprove ¶ added in v0.0.13
AutoApprove implements api.Trustable, and will automatically approve content that has been submitted by an external client via api.Createable. Be careful when using AutoApprove, because content will immediately be available through your public content API. If the Trustable interface is satisfied, the AfterApprove method is bypassed. The
func (*Resource) BeforeAPICreate ¶ added in v0.0.13
BeforeAPICreate is only called if the Song type implements api.Createable It is called before Create, and returning an error will cancel the request causing the system to reject the data sent in the POST
func (*Resource) Create ¶ added in v0.0.13
Create implements api.Createable, and allows external POST requests from clients to add content as long as the request contains the json tag names of the Song struct fields, and is multipart encoded
func (*Resource) IndexContent ¶ added in v0.0.13
func (*Resource) MarshalEditor ¶ added in v0.0.13
MarshalEditor writes a buffer of html to edit a Song within the CMS and implements editor.Editable
type Site ¶
type Site struct { Item Title string `json:"title"` Description string `json:"description"` BaseURL string `json:"base_url"` Theme string `json:"theme"` Params string `json:"params"` Owner string `json:"owner"` WorkingDir string `json:"working_dir"` Languages []string `json:"languages"` Menus []string `json:"menus"` }
func (*Site) AfterAPICreate ¶
AfterAPICreate is called after Create, and is useful for logging or triggering notifications, etc. after the data is saved to the database, etc. The request has a context containing the databse 'target' affected by the request. Ex. Song__pending:3 or Song:8 depending if Song implements api.Trustable
func (*Site) Approve ¶
Approve implements editor.Mergeable, which enables content supplied by external clients to be approved and thus added to the public content API. Before content is approved, it is waiting in the Pending bucket, and can only be approved in the CMS if the Mergeable interface is satisfied. If not, you will not see this content show up in the CMS.
func (*Site) AutoApprove ¶
AutoApprove implements api.Trustable, and will automatically approve content that has been submitted by an external client via api.Createable. Be careful when using AutoApprove, because content will immediately be available through your public content API. If the Trustable interface is satisfied, the AfterApprove method is bypassed. The
func (*Site) BeforeAPICreate ¶
BeforeAPICreate is only called if the Song type implements api.Createable It is called before Create, and returning an error will cancel the request causing the system to reject the data sent in the POST
func (*Site) Create ¶
Create implements api.Createable, and allows external POST requests from clients to add content as long as the request contains the json tag names of the Song struct fields, and is multipart encoded
func (*Site) IndexContent ¶
func (*Site) IsMultiLanguages ¶ added in v0.1.1
func (*Site) MarshalEditor ¶
MarshalEditor writes a buffer of html to edit a Song within the CMS and implements editor.Editable
func (*Site) UnmarshalJSON ¶ added in v0.1.1
type SiteLanguage ¶
type SiteLanguage struct { Item Site string `json:"site"` Language string `json:"language"` Default bool `json:"default"` Folder string `json:"folder"` // contains filtered or unexported fields }
func (*SiteLanguage) AfterAPICreate ¶
func (s *SiteLanguage) AfterAPICreate(res http.ResponseWriter, req *http.Request) error
AfterAPICreate is called after Create, and is useful for logging or triggering notifications, etc. after the data is saved to the database, etc. The request has a context containing the databse 'target' affected by the request. Ex. Song__pending:3 or Song:8 depending if Song implements api.Trustable
func (*SiteLanguage) Approve ¶
func (s *SiteLanguage) Approve(res http.ResponseWriter, req *http.Request) error
Approve implements editor.Mergeable, which enables content supplied by external clients to be approved and thus added to the public content API. Before content is approved, it is waiting in the Pending bucket, and can only be approved in the CMS if the Mergeable interface is satisfied. If not, you will not see this content show up in the CMS.
func (*SiteLanguage) AutoApprove ¶
func (s *SiteLanguage) AutoApprove(res http.ResponseWriter, req *http.Request) error
AutoApprove implements api.Trustable, and will automatically approve content that has been submitted by an external client via api.Createable. Be careful when using AutoApprove, because content will immediately be available through your public content API. If the Trustable interface is satisfied, the AfterApprove method is bypassed. The
func (*SiteLanguage) BeforeAPICreate ¶
func (s *SiteLanguage) BeforeAPICreate(res http.ResponseWriter, req *http.Request) error
BeforeAPICreate is only called if the Song type implements api.Createable It is called before Create, and returning an error will cancel the request causing the system to reject the data sent in the POST
func (*SiteLanguage) Create ¶
func (s *SiteLanguage) Create(res http.ResponseWriter, req *http.Request) error
Create implements api.Createable, and allows external POST requests from clients to add content as long as the request contains the json tag names of the Song struct fields, and is multipart encoded
func (*SiteLanguage) IndexContent ¶
func (s *SiteLanguage) IndexContent() bool
func (*SiteLanguage) MarshalEditor ¶
func (s *SiteLanguage) MarshalEditor() ([]byte, error)
MarshalEditor writes a buffer of html to edit a Song within the CMS and implements editor.Editable
func (*SiteLanguage) SelectContentTypes ¶
func (s *SiteLanguage) SelectContentTypes() []string
func (*SiteLanguage) SetSelectData ¶
func (s *SiteLanguage) SetSelectData(data map[string][][]byte)
func (*SiteLanguage) String ¶
func (s *SiteLanguage) String() string
String defines the display name of a Song in the CMS list-view
type SitePost ¶
type SitePost struct { Item Site string `json:"site"` Post string `json:"post"` Path string `json:"path"` // contains filtered or unexported fields }
func (*SitePost) AfterAPICreate ¶
AfterAPICreate is called after Create, and is useful for logging or triggering notifications, etc. after the data is saved to the database, etc. The request has a context containing the databse 'target' affected by the request. Ex. Song__pending:3 or Song:8 depending if Song implements api.Trustable
func (*SitePost) Approve ¶
Approve implements editor.Mergeable, which enables content supplied by external clients to be approved and thus added to the public content API. Before content is approved, it is waiting in the Pending bucket, and can only be approved in the CMS if the Mergeable interface is satisfied. If not, you will not see this content show up in the CMS.
func (*SitePost) AutoApprove ¶
AutoApprove implements api.Trustable, and will automatically approve content that has been submitted by an external client via api.Createable. Be careful when using AutoApprove, because content will immediately be available through your public content API. If the Trustable interface is satisfied, the AfterApprove method is bypassed. The
func (*SitePost) BeforeAPICreate ¶
BeforeAPICreate is only called if the Song type implements api.Createable It is called before Create, and returning an error will cancel the request causing the system to reject the data sent in the POST
func (*SitePost) Create ¶
Create implements api.Createable, and allows external POST requests from clients to add content as long as the request contains the json tag names of the Song struct fields, and is multipart encoded
func (*SitePost) IndexContent ¶
func (*SitePost) MarshalEditor ¶
MarshalEditor writes a buffer of html to edit a Song within the CMS and implements editor.Editable
func (*SitePost) SelectContentTypes ¶
func (*SitePost) SetSelectData ¶
type SiteResource ¶ added in v0.0.13
type SiteResource struct { Item Site string `json:"site"` Resource string `json:"resource"` Path string `json:"path"` // contains filtered or unexported fields }
func (*SiteResource) AfterAPICreate ¶ added in v0.0.13
func (s *SiteResource) AfterAPICreate(res http.ResponseWriter, req *http.Request) error
AfterAPICreate is called after Create, and is useful for logging or triggering notifications, etc. after the data is saved to the database, etc. The request has a context containing the databse 'target' affected by the request. Ex. Song__pending:3 or Song:8 depending if Song implements api.Trustable
func (*SiteResource) Approve ¶ added in v0.0.13
func (s *SiteResource) Approve(res http.ResponseWriter, req *http.Request) error
Approve implements editor.Mergeable, which enables content supplied by external clients to be approved and thus added to the public content API. Before content is approved, it is waiting in the Pending bucket, and can only be approved in the CMS if the Mergeable interface is satisfied. If not, you will not see this content show up in the CMS.
func (*SiteResource) AutoApprove ¶ added in v0.0.13
func (s *SiteResource) AutoApprove(res http.ResponseWriter, req *http.Request) error
AutoApprove implements api.Trustable, and will automatically approve content that has been submitted by an external client via api.Createable. Be careful when using AutoApprove, because content will immediately be available through your public content API. If the Trustable interface is satisfied, the AfterApprove method is bypassed. The
func (*SiteResource) BeforeAPICreate ¶ added in v0.0.13
func (s *SiteResource) BeforeAPICreate(res http.ResponseWriter, req *http.Request) error
BeforeAPICreate is only called if the Song type implements api.Createable It is called before Create, and returning an error will cancel the request causing the system to reject the data sent in the POST
func (*SiteResource) Create ¶ added in v0.0.13
func (s *SiteResource) Create(res http.ResponseWriter, req *http.Request) error
Create implements api.Createable, and allows external POST requests from clients to add content as long as the request contains the json tag names of the Song struct fields, and is multipart encoded
func (*SiteResource) IndexContent ¶ added in v0.0.13
func (s *SiteResource) IndexContent() bool
func (*SiteResource) MarshalEditor ¶ added in v0.0.13
func (s *SiteResource) MarshalEditor() ([]byte, error)
MarshalEditor writes a buffer of html to edit a Song within the CMS and implements editor.Editable
func (*SiteResource) SelectContentTypes ¶ added in v0.0.13
func (s *SiteResource) SelectContentTypes() []string
func (*SiteResource) SetSelectData ¶ added in v0.0.13
func (s *SiteResource) SetSelectData(data map[string][][]byte)
func (*SiteResource) String ¶ added in v0.0.13
func (s *SiteResource) String() string
String defines the display name of a Song in the CMS list-view
type SortableContent ¶
func (SortableContent) Len ¶
func (s SortableContent) Len() int
func (SortableContent) Less ¶
func (s SortableContent) Less(i, j int) bool
func (SortableContent) Swap ¶
func (s SortableContent) Swap(i, j int)
type Theme ¶
type Theme struct { Item Name string `json:"name"` ModuleURL string `json:"module_url"` Author string `json:"author"` Screenshots string `json:"screenshots"` // contains filtered or unexported fields }
func (*Theme) AfterAPICreate ¶
AfterAPICreate is called after Create, and is useful for logging or triggering notifications, etc. after the data is saved to the database, etc. The request has a context containing the databse 'target' affected by the request. Ex. Song__pending:3 or Song:8 depending if Song implements api.Trustable
func (*Theme) Approve ¶
Approve implements editor.Mergeable, which enables content supplied by external clients to be approved and thus added to the public content API. Before content is approved, it is waiting in the Pending bucket, and can only be approved in the CMS if the Mergeable interface is satisfied. If not, you will not see this content show up in the CMS.
func (*Theme) AutoApprove ¶
AutoApprove implements api.Trustable, and will automatically approve content that has been submitted by an external client via api.Createable. Be careful when using AutoApprove, because content will immediately be available through your public content API. If the Trustable interface is satisfied, the AfterApprove method is bypassed. The
func (*Theme) BeforeAPICreate ¶
BeforeAPICreate is only called if the Song type implements api.Createable It is called before Create, and returning an error will cancel the request causing the system to reject the data sent in the POST
func (*Theme) Create ¶
Create implements api.Createable, and allows external POST requests from clients to add content as long as the request contains the json tag names of the Song struct fields, and is multipart encoded
func (*Theme) IndexContent ¶
func (*Theme) MarshalEditor ¶
MarshalEditor writes a buffer of html to edit a Song within the CMS and implements editor.Editable