services

package
v0.0.0-...-45d6836 Latest Latest
Warning

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

Go to latest
Published: Sep 14, 2020 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckUserCredentials

func CheckUserCredentials(username string, password []byte) error

CheckUserCredentials check to see if credentials of a user is correct

func CreateNewUser

func CreateNewUser(user model.User, password string) error

CreateNewUser is the service that creates new users - for now only

func GetLatestPosts

func GetLatestPosts(numberOfPosts uint) ([]model.Post, error)

GetLatestPosts return a array with the latest posts created

func GetPost

func GetPost(id int64) (model.Post, *utils.ErrorAPI)

GetPost return a post of the specified id

func NewPost

func NewPost(post model.Post) error

NewPost trys to Create a new post

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