v1

package
v0.0.0-...-c820190 Latest Latest
Warning

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

Go to latest
Published: Jun 25, 2023 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewService

func NewService(store v1.DataFactory) *service

Types

type ServiceFactory

type ServiceFactory interface {
	User() UserSrv
}

type UserDTO

type UserDTO struct {
	//不应该这样做,目前这样做是因为跟底层的逻辑一致了。减少冗余而已
	dv1.UserDO
}

type UserDTOList

type UserDTOList struct {
	TotalCount int64      `json:"totalCount,omitempty"`
	Items      []*UserDTO `json:"data"`
}

type UserSrv

type UserSrv interface {
	List(ctx context.Context, orderby []string, opts metav1.ListMeta) (*UserDTOList, error)
	Create(ctx context.Context, user *UserDTO) error
	Update(ctx context.Context, user *UserDTO) error
	GetByID(ctx context.Context, ID uint64) (*UserDTO, error)
	GetByMobile(ctx context.Context, mobile string) (*UserDTO, error)
}

Jump to

Keyboard shortcuts

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