page

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: 2

Documentation

Overview

Package page "Every package should have a package comment, a block comment preceding the package clause. For multi-file packages, the package comment only needs to be present in one file, and any one will do. The package comment should introduce the package and provide information relevant to the package as a whole. It will appear first on the godoc page and should set up the detailed documentation that follows."

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrFindPage = errors.New("error while getting page")
)

Errors

Functions

func Delete

func Delete(ctx context.Context, ek string) error

Delete removes the entity and all the corresponding pageContext entities by the provided encoded key and if a context only been included in that page also gonna be removed. As a return returns an error.

func DeleteMulti

func DeleteMulti(ctx context.Context, ekx []string) error

DeleteMulti removes the entities and all the corresponding pageContext entities by the provided encoded keys. And if a context only been included in one of the deleted pages also gonna be removed. As a return returns an error.

Types

type Page

type Page struct {
	ID           string    `datastore:"-"`
	Name         string    `json:"name"`
	Created      time.Time `json:"created"`
	LastModified time.Time `json:"lastModified"`
}

Page is one of the pages in the app. datastore: ",noindex" causes json naming problems !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

func Update

func Update(ctx context.Context, p *Page, ek string) (*Page, error)

Update updates and returns (only with "ID" and "LastModified") the entity by the given encoded entity key "ek" and also returns an error.

type Pages

type Pages map[string]*Page

Pages "Exports should have a comment"

func GetAll

func GetAll(ctx context.Context) (Pages, error)

GetAll returns all the entities with some projections from the begining of the kind.

Jump to

Keyboard shortcuts

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