user

package
v0.0.0-...-4d5d728 Latest Latest
Warning

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

Go to latest
Published: Jul 9, 2020 License: AGPL-3.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Param

func Param(ctx context.Context, param string) string

Param gets the path parameter from the specified Context. Returns an empty string if the parameter was not found.

func StartAuthService

func StartAuthService()

User Service content served in front of a Proxy (like nginx)

func StartSimpleAuthService

func StartSimpleAuthService()

Server Server using simple routing .. as oer Matt Ryer

func StartUserService

func StartUserService()

Try various server implementation; integration tests? User Service content served in front of a Proxy (like nginx)

Types

type ComplexServer

type ComplexServer struct {
	// contains filtered or unexported fields
}

type Router

type Router struct {

	// NotFound is the http.Handler to call when no routes
	// match. By default uses http.NotFoundHandler().
	NotFound http.Handler
	// contains filtered or unexported fields
}

Router routes HTTP requests.

func NewRouter

func NewRouter() *Router

NewRouter makes a new Router.

func (*Router) Handle

func (r *Router) Handle(method, pattern string, handler http.Handler)

Handle adds a handler with the specified method and pattern. Method can be any HTTP method string or "*" to match all methods. Pattern can contain path segments such as: /item/:id which is accessible via the Param function. If pattern ends with trailing /, it acts as a prefix.

func (*Router) HandleFunc

func (r *Router) HandleFunc(method, pattern string, fn http.HandlerFunc)

HandleFunc is the http.HandlerFunc alternative to http.Handle.

func (*Router) ServeHTTP

func (r *Router) ServeHTTP(w http.ResponseWriter, req *http.Request)

ServeHTTP routes the incoming http.Request based on method and path extracting path parameters as it goes.

type Server

type Server struct {
	// contains filtered or unexported fields
}

type UserServiceClient

type UserServiceClient struct {
	// contains filtered or unexported fields
}

func NewUserServiceClient

func NewUserServiceClient(baseURL string) UserServiceClient

Client that does the operations; start with no timeout first ..

func (UserServiceClient) HealthUserService

func (usc UserServiceClient) HealthUserService() error

func (UserServiceClient) QueryExternal

func (usc UserServiceClient) QueryExternal() error

func (UserServiceClient) QueryUserService

func (usc UserServiceClient) QueryUserService() error

func (UserServiceClient) SlowUserService

func (usc UserServiceClient) SlowUserService() error

Jump to

Keyboard shortcuts

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