repo

package
v0.0.0-...-6d66e07 Latest Latest
Warning

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

Go to latest
Published: Oct 14, 2021 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ContentRepo

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

func NewContentRepo

func NewContentRepo(repo *Repo, logger log.Logger) *ContentRepo

func (*ContentRepo) CreateContent

func (cr *ContentRepo) CreateContent(ctx context.Context, content *domain.Content) (int32, error)

func (*ContentRepo) GetContent

func (cr *ContentRepo) GetContent(ctx context.Context, id int32) (*domain.Content, error)

func (*ContentRepo) UpdateContent

func (cr *ContentRepo) UpdateContent(ctx context.Context, id int32, content *domain.Content) error

type IndexRepo

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

func NewIndexRepo

func NewIndexRepo(repo *Repo, logger log.Logger) *IndexRepo

func (*IndexRepo) CreateIndex

func (ir *IndexRepo) CreateIndex(ctx context.Context, index *domain.Index) error

TODO: 事务

func (*IndexRepo) DeleteIndex

func (ir *IndexRepo) DeleteIndex(ctx context.Context, id int32) error

func (*IndexRepo) ListIndex

func (ir *IndexRepo) ListIndex(ctx context.Context, page, pageSize int) ([]*domain.Index, error)

func (*IndexRepo) UpdateIndex

func (ir *IndexRepo) UpdateIndex(ctx context.Context, id int32, index *domain.Index) (int32, error)

type Repo

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

func NewRepo

func NewRepo(conf *conf.Repo, logger log.Logger) (*Repo, func(), error)

Directories

Path Synopsis
ent

Jump to

Keyboard shortcuts

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