books

package
v0.0.0-...-07c665c Latest Latest
Warning

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

Go to latest
Published: Nov 8, 2023 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Convertor

type Convertor interface {
	ConvertListE2D(c context.Context, src []*Entity) ([]*DTO, error)
	ConvertE2D(c context.Context, src *Entity) (*DTO, error)
	ConvertD2E(c context.Context, src *DTO) (*Entity, error)
}

Convertor ...

type DAO

type DAO interface {
	Find(db *gorm.DB, id ID) (*Entity, error)
	List(db *gorm.DB, q *Query) ([]*Entity, error)

	Insert(db *gorm.DB, o *Entity) (*Entity, error)
	Update(db *gorm.DB, id ID, callback func(*Entity) error) (*Entity, error)
	Remove(db *gorm.DB, id ID) error
}

DAO ...

type DTO

type DTO struct {
	ID ID `json:"id"`

	rbac.BaseDTO
}

DTO 是表示密码本的数据传输对象

type Entity

type Entity struct {
	ID ID

	rbacdb.BaseEntity
}

Entity 是表示密码本的实体

func (Entity) TableName

func (Entity) TableName() string

TableName ...

type ID

type ID int64

ID ...

type Query

type Query struct {
	Conditions rbac.Conditions
	Pagination rbac.Pagination
	All        bool
}

Query ...

type Service

type Service interface {
	Find(c context.Context, id ID) (*DTO, error)
	List(c context.Context, q *Query) ([]*DTO, error)

	Insert(c context.Context, o *DTO) (*DTO, error)
	Update(c context.Context, id ID, src *DTO) (*DTO, error)
	Remove(c context.Context, id ID) error
}

Service ...

type VO

type VO struct {
	rbac.BaseVO

	Items []*DTO `json:"books"`
}

VO 是表示密码本的视图对象

Jump to

Keyboard shortcuts

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