profile

package
v2.1.8 Latest Latest
Warning

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

Go to latest
Published: Sep 2, 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 IProfileService

type IProfileService[Model, CreateInput, UpdateInput, UpdateProfileInput any] interface {
	Trx(db *gorm.DB) IProfileService[Model, CreateInput, UpdateInput, UpdateProfileInput]
	GetById(ctx context.Context, userID int) (*Model, error)
	GetByIds(ctx context.Context, userID ...int) ([]Model, error)
	Create(ctx context.Context, userID int, input CreateInput) (*Model, error)
	Update(ctx context.Context, userID int, input UpdateInput) error
	UpdateProfile(ctx context.Context, userID int, input UpdateProfileInput) error
	Delete(ctx context.Context, userID int) error
}

type IRequest

type IRequest[CreateInput, UpdateInput, UpdateProfileInput any] interface {
	CreateRequest(c *gin.Context) (*CreateInput, error)
	UpdateRequest(c *gin.Context) (*UpdateInput, error)
	UpdateProfileRequest(c *gin.Context) (*UpdateProfileInput, error)
}

type ITransformer

type ITransformer[Model any] interface {
	Transform(m *Model) interface{}
	TransformList(m *Model) interface{}
	TransformProfile(m *Model) interface{}
}

type Profile

type Profile[Model, CreateInput, UpdateInput, UpdateProfileInput any] struct {
	Service     IProfileService[Model, CreateInput, UpdateInput, UpdateProfileInput]
	Request     IRequest[CreateInput, UpdateInput, UpdateProfileInput]
	Transformer ITransformer[Model]
}

Jump to

Keyboard shortcuts

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