model

package
v0.0.0-...-ea9379f Latest Latest
Warning

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

Go to latest
Published: May 10, 2020 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BlogPost

type BlogPost struct {
	ID                string `json:"id"`
	Title             string `json:"title"`
	Description       string `json:"description"`
	Tags              string `json:"tags"`
	Body              string `json:"body"`
	Template          string `json:"template"`
	Category          string `json:"category"`
	Revision          int64  `json:"revision"`
	CreationTimestamp int64  `json:"creationTimestamp"`
	UpdateTimestamp   int64  `json:"updateTimestamp"`
}

BlogPost represents a blog post.

func (BlogPost) Validate

func (post BlogPost) Validate() []string

Validate checks if a BlogPost instance is valid and returns an error. If it's valid, it returns nil.

type Page

type Page struct {
	Posts  []BlogPost `json:"posts"`
	Cursor string     `json:"cursor"`
}

Page represents a page of blog posts.

Jump to

Keyboard shortcuts

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