entity

package
v0.0.0-...-e8f5a11 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 29, 2024 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetNamespace

func GetNamespace(contentType, status string) string

func Slug

func Slug(i content.Identifiable) (string, error)

Slug returns a URL friendly string from the title of a post item

Types

type Content

type Content struct {
	Types map[string]content.Creator
	Repo  repository.Repository
}

func (*Content) AllContentTypeNames

func (c *Content) AllContentTypeNames() []string

func (*Content) AllContentTypes

func (c *Content) AllContentTypes() map[string]content.Creator

func (*Content) DeleteContent

func (c *Content) DeleteContent(contentType, id, status string) error

func (*Content) GetContent

func (c *Content) GetContent(contentType, id, status string) ([]byte, error)

func (*Content) GetContentCreator

func (c *Content) GetContentCreator(name string) (content.Creator, bool)

func (*Content) GetContents

func (c *Content) GetContents(ids []content.Identifier) ([][]byte, error)

func (*Content) Marshal

func (c *Content) Marshal(content any) ([]byte, error)

func (*Content) NewContent

func (c *Content) NewContent(contentType string, data url.Values) (string, error)

func (*Content) NormalizeString

func (c *Content) NormalizeString(s string) (string, error)

func (*Content) SortContent

func (c *Content) SortContent(contentType string) error

func (*Content) Unmarshal

func (c *Content) Unmarshal(data []byte, content any) error

func (*Content) UpdateContent

func (c *Content) UpdateContent(contentType string, data url.Values) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL