Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
Functions ¶
func MakeHTTPHandler ¶
MakeHTTPHandler mounts all of the service endpoints into an http.Handler. Useful in a profilesvc server.
func MakeLoginEndpoint ¶
MakeLoginEndpoint returns the Login endpoint on the service.
Types ¶
type Endpoints ¶
Endpoints is a container to hold all of our Transport routes (HTTP, RPC etc.).
func MakeServerEndpoints ¶
MakeServerEndpoints creates all of the routes.
type Middleware ¶
Middleware describes a service (as opposed to endpoint) middleware.
func LoggingMiddleware ¶
func LoggingMiddleware(logger log.Logger) Middleware
LoggingMiddleware wraps our service and logs stuff about our services.
type Service ¶
Service provides operations on Users.
func NewInmemService ¶
func NewInmemService() Service
NewInmemService gets you a shiny new UserService!
type User ¶
type User struct { Name string `json:"name"` Type string `json:"type"` // contains filtered or unexported fields }
User is a representation of a User. Dah.
type UserRepository ¶
type UserRepository struct {
// contains filtered or unexported fields
}
UserRepository is an in-memory user database.
func (*UserRepository) ByUsername ¶
func (u *UserRepository) ByUsername(username string) (*User, error)
ByUsername finds a user by their username.
Source Files ¶
Click to show internal directories.
Click to hide internal directories.