goblog_data

package
v0.0.0-...-ad17495 Latest Latest
Warning

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

Go to latest
Published: Nov 16, 2022 License: Unlicense Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TIME_FORMAT              string = "02-01-2006 15:04:05"
	CONNECTION_STRING_FORMAT string = "%v:%v@tcp(%v:%d)/%v"

	FAILED_TO_LOAD_CONFIG_ERROR          string = "Failed to load configuration."
	FAILED_TO_CONNECT_TO_DB_ERROR_FORMAT string = "Failed to connect to database with error: %v"

	INSERT_BLOG_POST_QUERY string = "call InsertNewBlogPost(?, ?, ?, ?)"
	SELECT_BLOG_POST_QUERY string = "SELECT * FROM BlogPosts WHERE Id = ?"
	UPDATE_BLOG_POST_QUERY string = "call UpdateBlogPost(?, ?, ?, ?)"
	DELETE_BLOG_POST_QUERY string = "DELETE FROM BlogPosts WHERE Id = ?"
)

Variables

This section is empty.

Functions

func CreateNewBlogPost

func CreateNewBlogPost(post BlogPost) (bool, int)

func DeleteBlogPostById

func DeleteBlogPostById(id int) bool

func UpdateBlogPost

func UpdateBlogPost(post BlogPost) bool

Types

This section is empty.

Jump to

Keyboard shortcuts

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