content

package
v0.0.0-...-0e3259e Latest Latest
Warning

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

Go to latest
Published: Jan 11, 2020 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrDatastoreDoneContentID = errors.New("Datastore done at PageContent")
	ErrDatastoreDoneContent   = errors.New("Can't find any content for given content " +
		"id.")
)

Errors

Functions

This section is empty.

Types

type Content

type Content struct {
	ID     string            `datastore:"-"`
	Values map[string]string `json:"values"`
}

Add isInvalidate and set it true for all pages when language changed. And add this control at the top of shouldFatch function. Group contents by page in Store as root. CONSIDERING TO ADD LANG CODE TO THE CONTENT

type Contents

type Contents []Content

func Get

func Get(ctx context.Context, page string) (Contents, error)

Use Key List method instead of this one.

type Language

type Language struct {
	ID     string            `datastore:"-"`
	Values map[string]string `json:"values"`
}

en-us, en-au, en-ca, tr...

type Languages

type Languages []Language

type Page

type Page struct {
	Name string `json:"name"`
}

type PageContent

type PageContent struct {
	ContentKey *datastore.Key
}

PageID is Parent Key

type Pages

type Pages []Page

Jump to

Keyboard shortcuts

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