Documentation ¶
Index ¶
- type Server
- func (p *Server) CreateUser(ctx context.Context, in *pb_req.CreateUserReq) (*pb_resp.CreateUserResp, error)
- func (p *Server) DeleteUser(ctx context.Context, req *pb_req.DeleteUserReq) (*pb_resp.DeleteUserResp, error)
- func (p *Server) GetUser(ctx context.Context, req *pb_req.GetUserReq) (*pb_resp.GetUserResp, error)
- func (p *Server) GetUsers(ctx context.Context, _ *pb_req.GetUsersReq) (*pb_resp.GetUsersResp, error)
- func (p *Server) UpdateSelf(ctx context.Context, req *pb_req.UpdateSelfReq) (*pb_resp.UpdateSelfResp, error)
- func (p *Server) UpdateUser(ctx context.Context, req *pb_req.UpdateUserReq) (*pb_resp.UpdateUserResp, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
Server is the server interface
func NewServer ¶
func NewServer(users local_user.UsersMgmtClient) *Server
NewServer creates a server with its client.
func (*Server) CreateUser ¶
func (p *Server) CreateUser( ctx context.Context, in *pb_req.CreateUserReq) (*pb_resp.CreateUserResp, error)
CreateUser creates a new user.
func (*Server) DeleteUser ¶
func (p *Server) DeleteUser( ctx context.Context, req *pb_req.DeleteUserReq) (*pb_resp.DeleteUserResp, error)
func (*Server) GetUser ¶
func (p *Server) GetUser( ctx context.Context, req *pb_req.GetUserReq) (*pb_resp.GetUserResp, error)
func (*Server) GetUsers ¶
func (p *Server) GetUsers( ctx context.Context, _ *pb_req.GetUsersReq) (*pb_resp.GetUsersResp, error)
func (*Server) UpdateSelf ¶
func (p *Server) UpdateSelf( ctx context.Context, req *pb_req.UpdateSelfReq) (*pb_resp.UpdateSelfResp, error)
UpdateSelf allows a user to update their own info, requiring the previous password if they want to change password.
func (*Server) UpdateUser ¶
func (p *Server) UpdateUser( ctx context.Context, req *pb_req.UpdateUserReq) (*pb_resp.UpdateUserResp, error)
Note: this isn't patchy: all fields need to be provided
Click to show internal directories.
Click to hide internal directories.