database

package
v0.0.0-...-c4c9469 Latest Latest
Warning

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

Go to latest
Published: Oct 11, 2023 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DB

type DB struct {
	// contains filtered or unexported fields
}

func ConnectDB

func ConnectDB() (*DB, error)

func (*DB) CreateChatboard

func (db *DB) CreateChatboard(input *model.NewChatboard) (*model.Chatboard, error)

func (*DB) CreateMessage

func (db *DB) CreateMessage(input *model.NewMessage) (*model.Message, error)

func (*DB) DeleteChatboard

func (db *DB) DeleteChatboard(ID string) (*model.DeleteChatboard, error)

func (*DB) DeleteMessage

func (db *DB) DeleteMessage(ID string) (*model.DeleteMessage, error)

func (*DB) GetMessages

func (db *DB) GetMessages(ID string) ([]*model.Message, error)

func (*DB) SingleChatboard

func (db *DB) SingleChatboard(ID string) (*model.Chatboard, error)

func (*DB) UpdateChatboard

func (db *DB) UpdateChatboard(ID string, input *model.UpdateChatboard) (*model.Chatboard, error)

func (*DB) UpdateMessage

func (db *DB) UpdateMessage(ID string, input *model.UpdateMessage) (*model.Message, error)

type User

type User struct {
	ID       string `json:"id"`
	Username string `json:"username"`
	Password string `json:"password"`
}

Jump to

Keyboard shortcuts

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