mirror of
https://github.com/gl-inet/glkvm-cloud.git
synced 2026-09-16 15:45:16 +00:00
2d2658383b
Rename handlers to remove the misleading 'admin' term and better reflect their actual responsibilities, avoiding confusion with admin roles. Signed-off-by: GL.iNet-Yongping.Xie <yongping.xie@gl-inet.com>
20 lines
641 B
Go
Executable File
20 lines
641 B
Go
Executable File
package handler
|
|
|
|
import (
|
|
"context"
|
|
)
|
|
|
|
type UserGroupAdminHandler struct {
|
|
create func(ctx context.Context, name, description string) (int64, error)
|
|
update func(ctx context.Context, id int64, name, description string) error
|
|
delete func(ctx context.Context, id int64) error
|
|
}
|
|
|
|
func NewUserGroupAdminHandler(
|
|
create func(ctx context.Context, name, description string) (int64, error),
|
|
update func(ctx context.Context, id int64, name, description string) error,
|
|
del func(ctx context.Context, id int64) error,
|
|
) *UserGroupAdminHandler {
|
|
return &UserGroupAdminHandler{create: create, update: update, delete: del}
|
|
}
|