database

package
v0.1.9 Latest Latest
Warning

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

Go to latest
Published: May 12, 2015 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DeletePostById

func DeletePostById(id int64) error

func DeletePostTagsForPostId

func DeletePostTagsForPostId(post_id int64) error

func Initialize

func Initialize() error

func InsertPost

func InsertPost(title []byte, slug string, markdown []byte, html []byte, featured bool, isPage bool, published bool, image []byte, created_at time.Time, created_by int64) (int64, error)

func InsertPostTag

func InsertPostTag(post_id int64, tag_id int64) error

func InsertRoleUser

func InsertRoleUser(role_id int, user_id int64) error

func InsertTag

func InsertTag(name []byte, slug string, created_at time.Time, created_by int64) (int64, error)

func InsertUser

func InsertUser(name []byte, slug string, password string, email []byte, image []byte, cover []byte, created_at time.Time, created_by int64) (int64, error)

func RetrieveActiveTheme

func RetrieveActiveTheme() (*string, error)

func RetrieveBlog

func RetrieveBlog() (*structure.Blog, error)

func RetrieveHashedPasswordForUser

func RetrieveHashedPasswordForUser(name []byte) ([]byte, error)

func RetrieveNumberOfPosts

func RetrieveNumberOfPosts() (int64, error)

func RetrieveNumberOfPostsByTag

func RetrieveNumberOfPostsByTag(tag_id int64) (int64, error)

func RetrieveNumberOfPostsByUser

func RetrieveNumberOfPostsByUser(user_id int64) (int64, error)

func RetrievePostById

func RetrievePostById(id int64) (*structure.Post, error)

func RetrievePostBySlug

func RetrievePostBySlug(slug string) (*structure.Post, error)

func RetrievePostsByTag

func RetrievePostsByTag(tag_id int64, limit int64, offset int64) ([]structure.Post, error)

func RetrievePostsByUser

func RetrievePostsByUser(user_id int64, limit int64, offset int64) ([]structure.Post, error)

func RetrievePostsForApi

func RetrievePostsForApi(limit int64, offset int64) ([]structure.Post, error)

func RetrievePostsForIndex

func RetrievePostsForIndex(limit int64, offset int64) ([]structure.Post, error)

func RetrieveTag

func RetrieveTag(tagId int64) (*structure.Tag, error)

func RetrieveTagBySlug

func RetrieveTagBySlug(slug string) (*structure.Tag, error)

func RetrieveTagIdBySlug

func RetrieveTagIdBySlug(slug string) (int64, error)

func RetrieveTags

func RetrieveTags(postId int64) ([]structure.Tag, error)

func RetrieveUser

func RetrieveUser(id int64) (*structure.User, error)

func RetrieveUserByName

func RetrieveUserByName(name []byte) (*structure.User, error)

func RetrieveUserBySlug

func RetrieveUserBySlug(slug string) (*structure.User, error)

func RetrieveUsersCount

func RetrieveUsersCount() int

func UpdateActiveTheme added in v0.1.6

func UpdateActiveTheme(activeTheme string, updated_at time.Time, updated_by int64) error

func UpdateLastLogin added in v0.1.7

func UpdateLastLogin(date time.Time, userId int64) error

func UpdatePost

func UpdatePost(id int64, title []byte, slug string, markdown []byte, html []byte, featured bool, isPage bool, published bool, image []byte, updated_at time.Time, updated_by int64) error

func UpdateSettings

func UpdateSettings(title []byte, description []byte, logo []byte, cover []byte, postsPerPage int64, activeTheme string, navigation []byte, updated_at time.Time, updated_by int64) error

func UpdateUser

func UpdateUser(id int64, name []byte, slug string, email []byte, image []byte, cover []byte, bio []byte, website []byte, location []byte, updated_at time.Time, updated_by int64) error

func UpdateUserPassword

func UpdateUserPassword(id int64, password string, updated_at time.Time, updated_by int64) error

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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