repository

package
v0.0.0-...-b83c5df Latest Latest
Warning

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

Go to latest
Published: Mar 1, 2021 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DBConfig

type DBConfig struct {
	MyDB *sql.DB
}

func (*DBConfig) AddComment

func (d *DBConfig) AddComment(postID int, comment model.Comment) error

func (*DBConfig) AddMember

func (d *DBConfig) AddMember(autoID int, name string) error

func (*DBConfig) AddPost

func (d *DBConfig) AddPost(post model.Post) (int, error)

func (*DBConfig) AddProviderInfo

func (d *DBConfig) AddProviderInfo(oauth model.Oauth) (int, error)

func (*DBConfig) CheckProviderInfoExists

func (d *DBConfig) CheckProviderInfoExists(provider string, providerID string) (bool, error)

func (*DBConfig) DeleteComment

func (d *DBConfig) DeleteComment(ID int) error

func (*DBConfig) DeleteMember

func (d *DBConfig) DeleteMember(ID int) error

func (*DBConfig) DeletePost

func (d *DBConfig) DeletePost(ID int) error

func (*DBConfig) GetAllCommentsByPostId

func (d *DBConfig) GetAllCommentsByPostId(postID int) ([]model.Comment, error)

func (*DBConfig) GetAllMembers

func (d *DBConfig) GetAllMembers() ([]model.Member, error)

func (*DBConfig) GetAllPosts

func (d *DBConfig) GetAllPosts() ([]model.Post, error)

func (*DBConfig) GetComment

func (d *DBConfig) GetComment(ID int) (model.Comment, error)

func (*DBConfig) GetMember

func (d *DBConfig) GetMember(ID int) (model.Member, error)

func (*DBConfig) GetPost

func (d *DBConfig) GetPost(ID int) (model.Post, error)

func (*DBConfig) GetProviderInfo

func (d *DBConfig) GetProviderInfo(provider string, providerID string) (int, error)

func (*DBConfig) UpdateComment

func (d *DBConfig) UpdateComment(ID int, newComment model.Comment) error

func (*DBConfig) UpdateMember

func (d *DBConfig) UpdateMember(ID int, newMemberInfo model.Member) error

func (*DBConfig) UpdatePost

func (d *DBConfig) UpdatePost(ID int, newPost model.Post) error

Jump to

Keyboard shortcuts

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