dal

package
v0.0.0-...-966265d Latest Latest
Warning

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

Go to latest
Published: Jun 15, 2023 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type LikedPost

type LikedPost struct {
	MemberId  string `gorm:"primaryKey"`
	PostId    string `gorm:"primaryKey"`
	CreatedAt time.Time
}

type LikedPostsDAO

type LikedPostsDAO interface {
	Has(record LikedPost) (bool, error)
	Add(record LikedPost) error
}

func NewDBLikedPostsDAO

func NewDBLikedPostsDAO(db *gorm.DB) LikedPostsDAO

type NullLikedPostsDAO

type NullLikedPostsDAO struct{}

func (NullLikedPostsDAO) Add

func (o NullLikedPostsDAO) Add(record LikedPost) error

func (NullLikedPostsDAO) Has

func (o NullLikedPostsDAO) Has(record LikedPost) (bool, error)

type NullSelectedCommunitiesDAO

type NullSelectedCommunitiesDAO struct{}

func (NullSelectedCommunitiesDAO) Add

func (NullSelectedCommunitiesDAO) Delete

func (NullSelectedCommunitiesDAO) FindAll

func (o NullSelectedCommunitiesDAO) FindAll(userId string) ([]string, error)

type SelectedCommunitiesDAO

type SelectedCommunitiesDAO interface {
	// FindAll returns all the selected member ids
	FindAll(userId string) ([]string, error)
	// Add returns true if the record is inserted
	Add(record SelectedCommunity) (bool, error)
	Delete(record SelectedCommunity) error
}

func NewSelectedCommunitiesDAO

func NewSelectedCommunitiesDAO(db *gorm.DB) SelectedCommunitiesDAO

type SelectedCommunity

type SelectedCommunity struct {
	UserId   string `gorm:"primaryKey"`
	MemberId string `gorm:"primaryKey"`
}

Jump to

Keyboard shortcuts

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