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: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Category

type Category struct {
	Id         string   `bson:"_id"`
	Name       string   `bson:"name"`
	Route      string   `bson:"route"`
	Tags       []string `bson:"tags"`
	Sort       int64    `bson:"sort"`
	CreateTime int64    `bson:"create_time"`
	UpdateTime int64    `bson:"update_time"`
}

type CategoryDao

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

func NewCategoryDao

func NewCategoryDao(db *mongo.Database) *CategoryDao

func (*CategoryDao) GetAll

func (d *CategoryDao) GetAll(ctx context.Context) ([]*Category, error)

func (*CategoryDao) GetCategoryByName

func (d *CategoryDao) GetCategoryByName(ctx context.Context, name string) (*Category, error)

type ICategoryDao

type ICategoryDao interface {
	GetAll(ctx context.Context) ([]*Category, error)
	GetCategoryByName(ctx context.Context, name string) (*Category, error)
}

Jump to

Keyboard shortcuts

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