service

package
v0.0.0-...-d32eb86 Latest Latest
Warning

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

Go to latest
Published: Feb 28, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Service

type Service interface {
	Users() UserSrv // Users returns an instance of UserSrv which handles user-related operations.
}

Service is the interface that abstracts the functionalities of your services.

func NewService

func NewService(store store.Factory) Service

NewService is a constructor function for creating a new instance of service. It takes a store.Factory as an argument and returns a Service.

type UserSrv

type UserSrv interface {
	Create(ctx context.Context, user *model.User, opts model.CreateOptions) error
	Update(ctx context.Context, user *model.User, opts model.UpdateOptions) error
	Delete(ctx context.Context, userId uint64, opts model.DeleteOptions) error
	// DeleteCollection(ctx context.Context, userIds []uint64, opts model.DeleteOptions) error
	Get(ctx context.Context, userId uint64, opts model.GetOptions) (*model.User, error)
	List(ctx context.Context, opts model.ListOptions) (*model.UserList, error)
	ChangePassword(ctx context.Context, user *model.User) error
}

UserSrv defines functions used to handle user request.

Jump to

Keyboard shortcuts

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