post

package
Version: v0.0.0-...-a94b3c4 Latest Latest
Warning

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

Go to latest
Published: Aug 18, 2019 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Add

func Add(post Post) (value interface{}, err error)

func Del

func Del(post Post, ids interface{}) (result interface{}, err error)

func DelForID

func DelForID(post Post, id int) (result interface{}, err error)

func Save

func Save(post Post, ids interface{}, update map[string]interface{}) (result interface{}, err error)

Types

type Post

type Post struct {
	gorm.Model
	Title string `json:title`
	Text  string `json:text`
}

func Get

func Get(post Post, where interface{}) (result *Post, err error)

func GetForID

func GetForID(post Post, id int) (result *Post, err error)

func SaveForID

func SaveForID(post Post, id int, update interface{}) (result *Post, err error)

Source Files

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL