logic

package
v0.0.0-...-9042724 Latest Latest
Warning

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

Go to latest
Published: Nov 22, 2023 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckPasswordHash

func CheckPasswordHash(password, hash string) bool

CheckPasswordHash compare password with hash

func HashPassword

func HashPassword(password string) (string, error)

Creates Hashed Password

Types

type ManagementQuery

type ManagementQuery struct {
	*sqlx.DB
}

func (*ManagementQuery) GetManagements

func (q *ManagementQuery) GetManagements() ([]model.Management, error)

func (*ManagementQuery) UpdateManagement

func (q *ManagementQuery) UpdateManagement() (model.Management, error)

type PortfolioQuery

type PortfolioQuery struct {
	*sqlx.DB
}

func (*PortfolioQuery) CreatePortfolio

func (q *PortfolioQuery) CreatePortfolio(portfolio model.Portfolio) error

create new user

func (*PortfolioQuery) DeletePortfolio

func (q *PortfolioQuery) DeletePortfolio(id string) error

******************************************* delete portfolio by id

func (*PortfolioQuery) GetAllPortolios

func (q *PortfolioQuery) GetAllPortolios() ([]model.Portfolio, error)

func (*PortfolioQuery) GetPortfolio

func (q *PortfolioQuery) GetPortfolio(id string) (model.Portfolio, error)

func (*PortfolioQuery) UpdatePortfolio

func (q *PortfolioQuery) UpdatePortfolio(portfolio model.Portfolio, id string) error

********************************************* update existing main portfolio

func (*PortfolioQuery) UpdateProjectsOfPortfolio

func (q *PortfolioQuery) UpdateProjectsOfPortfolio(portfolio model.Portfolio, id string) error

update existing projects of portfolio

func (*PortfolioQuery) UpdateSkillsOfPortfolio

func (q *PortfolioQuery) UpdateSkillsOfPortfolio(portfolio model.Portfolio, id string) error

update existing skills of portfolio

type PostQuery

type PostQuery struct {
	*sqlx.DB
}

func (*PostQuery) CreatePost

func (q *PostQuery) CreatePost(post model.Post) error

create new user

func (*PostQuery) DeletePost

func (q *PostQuery) DeletePost(id string) error

delete user by id

func (*PostQuery) GetAllPosts

func (q *PostQuery) GetAllPosts() ([]model.Post, error)

func (*PostQuery) GetOnePost

func (q *PostQuery) GetOnePost(id string) (model.Post, error)

func (*PostQuery) GetPublishedPosts

func (q *PostQuery) GetPublishedPosts() ([]model.Post, error)

*************************************************

func (*PostQuery) PublishPost

func (q *PostQuery) PublishPost(post model.Post, id string) error

func (*PostQuery) UpdatePost

func (q *PostQuery) UpdatePost(post model.Post, id string) error

update existing user

type UserQuery

type UserQuery struct {
	*sqlx.DB
}

func (*UserQuery) CreateUser

func (q *UserQuery) CreateUser(user model.User) error

create new user

func (*UserQuery) DeleteUser

func (q *UserQuery) DeleteUser(id string) error

delete user by id

func (*UserQuery) GetAllUsers

func (q *UserQuery) GetAllUsers() ([]model.User, error)

list all users

func (*UserQuery) GetOneUser

func (q *UserQuery) GetOneUser(id string) (model.User, error)

get user by id

func (*UserQuery) UpdateUser

func (q *UserQuery) UpdateUser(user model.User, id string) error

update existing user

Jump to

Keyboard shortcuts

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