dao

package
v0.0.0-...-a783adc Latest Latest
Warning

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

Go to latest
Published: Dec 17, 2023 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Friend

type Friend struct {
	Id          string              `bson:"_id"`
	Name        string              `bson:"name"`
	Url         string              `bson:"url"`
	Description string              `bson:"description"`
	Email       string              `bson:"email"`
	Status      domain.FriendStatus `bson:"status"`
	Priority    int                 `bson:"priority"`
	CreateTime  int64               `bson:"create_time"`
	UpdateTime  int64               `bson:"update_time"`
}

type FriendDao

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

func NewFriendDao

func NewFriendDao(db *mongo.Database) *FriendDao

func (*FriendDao) Add

func (d *FriendDao) Add(ctx context.Context, friend Friend) error

func (*FriendDao) FindByUrl

func (d *FriendDao) FindByUrl(ctx context.Context, url string) (*Friend, error)

func (*FriendDao) FindDisplaying

func (d *FriendDao) FindDisplaying(ctx context.Context) ([]*Friend, error)

type IFriendDao

type IFriendDao interface {
	FindDisplaying(ctx context.Context) ([]*Friend, error)
	Add(ctx context.Context, friend Friend) error
	FindByUrl(ctx context.Context, url string) (*Friend, error)
}

Jump to

Keyboard shortcuts

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