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 ¶
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.
Click to show internal directories.
Click to hide internal directories.