Documentation ¶
Index ¶
- Variables
- type Handler
- func (h *Handler) Create(ctx context.Context, req *pb.CreateRequest, rsp *pb.CreateResponse) error
- func (h *Handler) Delete(ctx context.Context, req *pb.DeleteRequest, rsp *pb.DeleteResponse) error
- func (h *Handler) Read(ctx context.Context, req *pb.ReadRequest, rsp *pb.ReadResponse) error
- func (h *Handler) Search(ctx context.Context, req *pb.SearchRequest, rsp *pb.SearchResponse) error
- func (h *Handler) Update(ctx context.Context, req *pb.UpdateRequest, rsp *pb.UpdateResponse) error
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // URLSafeRegex is a function which returns true if a string is URL safe URLSafeRegex = regexp.MustCompile(`^[A-Za-z0-9_-].*?$`).MatchString )
Functions ¶
This section is empty.
Types ¶
type Handler ¶
type Handler struct {
// contains filtered or unexported fields
}
Handler implements the users service interface
func NewHandler ¶
NewHandler returns an initialised handler
func (*Handler) Create ¶
func (h *Handler) Create(ctx context.Context, req *pb.CreateRequest, rsp *pb.CreateResponse) error
Create inserts a new user into the the store
func (*Handler) Delete ¶
func (h *Handler) Delete(ctx context.Context, req *pb.DeleteRequest, rsp *pb.DeleteResponse) error
Delete a user in the store
func (*Handler) Read ¶
func (h *Handler) Read(ctx context.Context, req *pb.ReadRequest, rsp *pb.ReadResponse) error
Read retirves a user from the store
func (*Handler) Search ¶
func (h *Handler) Search(ctx context.Context, req *pb.SearchRequest, rsp *pb.SearchResponse) error
Search the users in th store, using username
func (*Handler) Update ¶
func (h *Handler) Update(ctx context.Context, req *pb.UpdateRequest, rsp *pb.UpdateResponse) error
Update modifies a user in the store
Click to show internal directories.
Click to hide internal directories.