service

package
v0.0.35 Latest Latest
Warning

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

Go to latest
Published: Sep 14, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BaseService

type BaseService struct {
}

type EntityService

type EntityService[T any] interface {
	GetById(id string) (*T, error)
	GetAll(entity *T, pageable query.Pageable) (int64, []T)
	Create(entity *T) (*T, error)
	Update(entity *T) (*T, error)
	Patch(id string, column string, value interface{}) (*T, error)
	PatchAll(id string, kv map[string]interface{}) (*T, error)
	Delete(entity *T) error
	DeleteById(id string) error
}

type InviteCodeService

type InviteCodeService interface {
	FindByInviteCode(code string) (*dto.InviteCode, error)
}

func GetInviteCodeService

func GetInviteCodeService() InviteCodeService

type RoleService

type RoleService interface {
	GetUserRoles(userId string) []string
}

func GetRoleService

func GetRoleService() RoleService

type SocialUserService

type SocialUserService interface {
	GetById(id string) (*dto.SocialUser, error)
}

func GetSocialUserService

func GetSocialUserService() SocialUserService

type UserService

type UserService interface {
	CreateUser(user *dto.User) (*dto.User, error)
	GetById(id string) (*dto.User, error)
	GetByMobile(mobile string) (*dto.User, error)
	GetByEmail(email string) (*dto.User, error)
}

func GetUserService

func GetUserService() UserService

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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