user

package
v0.0.0-...-afaedbc Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 30, 2016 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DecodeUserListRequest

func DecodeUserListRequest(_ context.Context, r *http.Request) (interface{}, error)

func DecodeUserRequest

func DecodeUserRequest(_ context.Context, r *http.Request) (interface{}, error)

func NewUserEndpoint

func NewUserEndpoint(svc UserService) endpoint.Endpoint

func NewUserHandler

func NewUserHandler(ctx context.Context, svc UserService) http.Handler

func NewUserListEndpoint

func NewUserListEndpoint(svc UserService) endpoint.Endpoint

func NewUserListHandler

func NewUserListHandler(ctx context.Context, svc UserService) http.Handler

Types

type UserListRequest

type UserListRequest struct {
}

type UserListResponse

type UserListResponse struct {
	Users []common.User
	common.ErrResponse
}

type UserRequest

type UserRequest struct {
	User string
}

type UserResponse

type UserResponse struct {
	User  string `json:"user"`
	Total int    `json:"total"`
	common.ErrResponse
}

type UserService

type UserService interface {
	Users() []User
	User(string) (int, error)
}

func NewUserService

func NewUserService(r number.NumberRepository) UserService

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL