github.com/goadesign/goa/examples/security/gen/http/secured_service/server
server
import "github.com/goadesign/goa/examples/security/gen/http/secured_service/server"
Overview
Index
- func AlsoDoublySecureSecuredServicePath() string
- func DecodeAlsoDoublySecureRequest(mux goahttp.Muxer, decoder func(*http.Request) goahttp.Decoder) func(*http.Request) (interface{}, error)
- func DecodeDoublySecureRequest(mux goahttp.Muxer, decoder func(*http.Request) goahttp.Decoder) func(*http.Request) (interface{}, error)
- func DecodeSecureRequest(mux goahttp.Muxer, decoder func(*http.Request) goahttp.Decoder) func(*http.Request) (interface{}, error)
- func DecodeSigninRequest(mux goahttp.Muxer, decoder func(*http.Request) goahttp.Decoder) func(*http.Request) (interface{}, error)
- func DoublySecureSecuredServicePath() string
- func EncodeAlsoDoublySecureError(encoder func(context.Context, http.ResponseWriter) goahttp.Encoder) func(context.Context, http.ResponseWriter, error) error
- func EncodeAlsoDoublySecureResponse(encoder func(context.Context, http.ResponseWriter) goahttp.Encoder) func(context.Context, http.ResponseWriter, interface{}) error
- func EncodeDoublySecureError(encoder func(context.Context, http.ResponseWriter) goahttp.Encoder) func(context.Context, http.ResponseWriter, error) error
- func EncodeDoublySecureResponse(encoder func(context.Context, http.ResponseWriter) goahttp.Encoder) func(context.Context, http.ResponseWriter, interface{}) error
- func EncodeSecureError(encoder func(context.Context, http.ResponseWriter) goahttp.Encoder) func(context.Context, http.ResponseWriter, error) error
- func EncodeSecureResponse(encoder func(context.Context, http.ResponseWriter) goahttp.Encoder) func(context.Context, http.ResponseWriter, interface{}) error
- func EncodeSigninError(encoder func(context.Context, http.ResponseWriter) goahttp.Encoder) func(context.Context, http.ResponseWriter, error) error
- func EncodeSigninResponse(encoder func(context.Context, http.ResponseWriter) goahttp.Encoder) func(context.Context, http.ResponseWriter, interface{}) error
- func Mount(mux goahttp.Muxer, h *Server)
- func MountAlsoDoublySecureHandler(mux goahttp.Muxer, h http.Handler)
- func MountDoublySecureHandler(mux goahttp.Muxer, h http.Handler)
- func MountSecureHandler(mux goahttp.Muxer, h http.Handler)
- func MountSigninHandler(mux goahttp.Muxer, h http.Handler)
- func NewAlsoDoublySecureHandler(endpoint goa.Endpoint, mux goahttp.Muxer, dec func(*http.Request) goahttp.Decoder, enc func(context.Context, http.ResponseWriter) goahttp.Encoder, eh func(context.Context, http.ResponseWriter, error)) http.Handler
- func NewAlsoDoublySecurePayload(key *string, oauthToken *string, token *string) *securedservice.AlsoDoublySecurePayload
- func NewDoublySecureHandler(endpoint goa.Endpoint, mux goahttp.Muxer, dec func(*http.Request) goahttp.Decoder, enc func(context.Context, http.ResponseWriter) goahttp.Encoder, eh func(context.Context, http.ResponseWriter, error)) http.Handler
- func NewDoublySecurePayload(key *string, token *string) *securedservice.DoublySecurePayload
- func NewSecureHandler(endpoint goa.Endpoint, mux goahttp.Muxer, dec func(*http.Request) goahttp.Decoder, enc func(context.Context, http.ResponseWriter) goahttp.Encoder, eh func(context.Context, http.ResponseWriter, error)) http.Handler
- func NewSecurePayload(fail *bool, token *string) *securedservice.SecurePayload
- func NewSigninHandler(endpoint goa.Endpoint, mux goahttp.Muxer, dec func(*http.Request) goahttp.Decoder, enc func(context.Context, http.ResponseWriter) goahttp.Encoder, eh func(context.Context, http.ResponseWriter, error)) http.Handler
- func NewSigninPayload() *securedservice.SigninPayload
- func SecureSecuredServicePath() string
- func SigninSecuredServicePath() string
- type AlsoDoublySecureUnauthorizedResponseBody
- type DoublySecureUnauthorizedResponseBody
- type ErrorNamer
- type MountPoint
- type SecureUnauthorizedResponseBody
- type Server
- func New(e *securedservice.Endpoints, mux goahttp.Muxer, dec func(*http.Request) goahttp.Decoder, enc func(context.Context, http.ResponseWriter) goahttp.Encoder, eh func(context.Context, http.ResponseWriter, error)) *Server
- func (s *Server) Service() string
- func (s *Server) Use(m func(http.Handler) http.Handler)
- type SigninUnauthorizedResponseBody
Package files
encode_decode.go paths.go server.go types.go
func AlsoDoublySecureSecuredServicePath
func AlsoDoublySecureSecuredServicePath() string
AlsoDoublySecureSecuredServicePath returns the URL path to the secured_service service also_doubly_secure HTTP endpoint.
func DecodeAlsoDoublySecureRequest
func DecodeAlsoDoublySecureRequest(mux goahttp.Muxer, decoder func(*http.Request) goahttp.Decoder) func(*http.Request) (interface{}, error)
DecodeAlsoDoublySecureRequest returns a decoder for requests sent to the secured_service also_doubly_secure endpoint.
func DecodeDoublySecureRequest
func DecodeDoublySecureRequest(mux goahttp.Muxer, decoder func(*http.Request) goahttp.Decoder) func(*http.Request) (interface{}, error)
DecodeDoublySecureRequest returns a decoder for requests sent to the secured_service doubly_secure endpoint.
func DecodeSecureRequest
func DecodeSecureRequest(mux goahttp.Muxer, decoder func(*http.Request) goahttp.Decoder) func(*http.Request) (interface{}, error)
DecodeSecureRequest returns a decoder for requests sent to the secured_service secure endpoint.
func DecodeSigninRequest
func DecodeSigninRequest(mux goahttp.Muxer, decoder func(*http.Request) goahttp.Decoder) func(*http.Request) (interface{}, error)
DecodeSigninRequest returns a decoder for requests sent to the secured_service signin endpoint.
func DoublySecureSecuredServicePath
func DoublySecureSecuredServicePath() string
DoublySecureSecuredServicePath returns the URL path to the secured_service service doubly_secure HTTP endpoint.
func EncodeAlsoDoublySecureError
func EncodeAlsoDoublySecureError(encoder func(context.Context, http.ResponseWriter) goahttp.Encoder) func(context.Context, http.ResponseWriter, error) error
EncodeAlsoDoublySecureError returns an encoder for errors returned by the also_doubly_secure secured_service endpoint.
func EncodeAlsoDoublySecureResponse
func EncodeAlsoDoublySecureResponse(encoder func(context.Context, http.ResponseWriter) goahttp.Encoder) func(context.Context, http.ResponseWriter, interface{}) error
EncodeAlsoDoublySecureResponse returns an encoder for responses returned by the secured_service also_doubly_secure endpoint.
func EncodeDoublySecureError
func EncodeDoublySecureError(encoder func(context.Context, http.ResponseWriter) goahttp.Encoder) func(context.Context, http.ResponseWriter, error) error
EncodeDoublySecureError returns an encoder for errors returned by the doubly_secure secured_service endpoint.
func EncodeDoublySecureResponse
func EncodeDoublySecureResponse(encoder func(context.Context, http.ResponseWriter) goahttp.Encoder) func(context.Context, http.ResponseWriter, interface{}) error
EncodeDoublySecureResponse returns an encoder for responses returned by the secured_service doubly_secure endpoint.
func EncodeSecureError
func EncodeSecureError(encoder func(context.Context, http.ResponseWriter) goahttp.Encoder) func(context.Context, http.ResponseWriter, error) error
EncodeSecureError returns an encoder for errors returned by the secure secured_service endpoint.
func EncodeSecureResponse
func EncodeSecureResponse(encoder func(context.Context, http.ResponseWriter) goahttp.Encoder) func(context.Context, http.ResponseWriter, interface{}) error
EncodeSecureResponse returns an encoder for responses returned by the secured_service secure endpoint.
func EncodeSigninError
func EncodeSigninError(encoder func(context.Context, http.ResponseWriter) goahttp.Encoder) func(context.Context, http.ResponseWriter, error) error
EncodeSigninError returns an encoder for errors returned by the signin secured_service endpoint.
func EncodeSigninResponse
func EncodeSigninResponse(encoder func(context.Context, http.ResponseWriter) goahttp.Encoder) func(context.Context, http.ResponseWriter, interface{}) error
EncodeSigninResponse returns an encoder for responses returned by the secured_service signin endpoint.
func Mount
func Mount(mux goahttp.Muxer, h *Server)
Mount configures the mux to serve the secured_service endpoints.
func MountAlsoDoublySecureHandler
func MountAlsoDoublySecureHandler(mux goahttp.Muxer, h http.Handler)
MountAlsoDoublySecureHandler configures the mux to serve the “secured_service” service “also_doubly_secure” endpoint.
func MountDoublySecureHandler
func MountDoublySecureHandler(mux goahttp.Muxer, h http.Handler)
MountDoublySecureHandler configures the mux to serve the “secured_service” service “doubly_secure” endpoint.
func MountSecureHandler
func MountSecureHandler(mux goahttp.Muxer, h http.Handler)
MountSecureHandler configures the mux to serve the “secured_service” service “secure” endpoint.
func MountSigninHandler
func MountSigninHandler(mux goahttp.Muxer, h http.Handler)
MountSigninHandler configures the mux to serve the “secured_service” service “signin” endpoint.
func NewAlsoDoublySecureHandler
func NewAlsoDoublySecureHandler(
endpoint goa.Endpoint,
mux goahttp.Muxer,
dec func(*http.Request) goahttp.Decoder,
enc func(context.Context, http.ResponseWriter) goahttp.Encoder,
eh func(context.Context, http.ResponseWriter, error),
) http.Handler
NewAlsoDoublySecureHandler creates a HTTP handler which loads the HTTP request and calls the “secured_service” service “also_doubly_secure” endpoint.
func NewAlsoDoublySecurePayload
func NewAlsoDoublySecurePayload(key *string, oauthToken *string, token *string) *securedservice.AlsoDoublySecurePayload
NewAlsoDoublySecurePayload builds a secured_service service also_doubly_secure endpoint payload.
func NewDoublySecureHandler
func NewDoublySecureHandler(
endpoint goa.Endpoint,
mux goahttp.Muxer,
dec func(*http.Request) goahttp.Decoder,
enc func(context.Context, http.ResponseWriter) goahttp.Encoder,
eh func(context.Context, http.ResponseWriter, error),
) http.Handler
NewDoublySecureHandler creates a HTTP handler which loads the HTTP request and calls the “secured_service” service “doubly_secure” endpoint.
func NewDoublySecurePayload
func NewDoublySecurePayload(key *string, token *string) *securedservice.DoublySecurePayload
NewDoublySecurePayload builds a secured_service service doubly_secure endpoint payload.
func NewSecureHandler
func NewSecureHandler(
endpoint goa.Endpoint,
mux goahttp.Muxer,
dec func(*http.Request) goahttp.Decoder,
enc func(context.Context, http.ResponseWriter) goahttp.Encoder,
eh func(context.Context, http.ResponseWriter, error),
) http.Handler
NewSecureHandler creates a HTTP handler which loads the HTTP request and calls the “secured_service” service “secure” endpoint.
func NewSecurePayload
func NewSecurePayload(fail *bool, token *string) *securedservice.SecurePayload
NewSecurePayload builds a secured_service service secure endpoint payload.
func NewSigninHandler
func NewSigninHandler(
endpoint goa.Endpoint,
mux goahttp.Muxer,
dec func(*http.Request) goahttp.Decoder,
enc func(context.Context, http.ResponseWriter) goahttp.Encoder,
eh func(context.Context, http.ResponseWriter, error),
) http.Handler
NewSigninHandler creates a HTTP handler which loads the HTTP request and calls the “secured_service” service “signin” endpoint.
func NewSigninPayload
func NewSigninPayload() *securedservice.SigninPayload
NewSigninPayload builds a secured_service service signin endpoint payload.
func SecureSecuredServicePath
func SecureSecuredServicePath() string
SecureSecuredServicePath returns the URL path to the secured_service service secure HTTP endpoint.
func SigninSecuredServicePath
func SigninSecuredServicePath() string
SigninSecuredServicePath returns the URL path to the secured_service service signin HTTP endpoint.
type AlsoDoublySecureUnauthorizedResponseBody
type AlsoDoublySecureUnauthorizedResponseBody string
AlsoDoublySecureUnauthorizedResponseBody is the type of the “secured_service” service “also_doubly_secure” endpoint HTTP response body for the “unauthorized” error.
func NewAlsoDoublySecureUnauthorizedResponseBody
func NewAlsoDoublySecureUnauthorizedResponseBody(res securedservice.Unauthorized) AlsoDoublySecureUnauthorizedResponseBody
NewAlsoDoublySecureUnauthorizedResponseBody builds the HTTP response body from the result of the “also_doubly_secure” endpoint of the “secured_service” service.
type DoublySecureUnauthorizedResponseBody
type DoublySecureUnauthorizedResponseBody string
DoublySecureUnauthorizedResponseBody is the type of the “secured_service” service “doubly_secure” endpoint HTTP response body for the “unauthorized” error.
func NewDoublySecureUnauthorizedResponseBody
func NewDoublySecureUnauthorizedResponseBody(res securedservice.Unauthorized) DoublySecureUnauthorizedResponseBody
NewDoublySecureUnauthorizedResponseBody builds the HTTP response body from the result of the “doubly_secure” endpoint of the “secured_service” service.
type ErrorNamer
type ErrorNamer interface {
ErrorName() string
}
ErrorNamer is an interface implemented by generated error structs that exposes the name of the error as defined in the design.
type MountPoint
type MountPoint struct {
// Method is the name of the service method served by the mounted HTTP handler.
Method string
// Verb is the HTTP method used to match requests to the mounted handler.
Verb string
// Pattern is the HTTP request path pattern used to match requests to the
// mounted handler.
Pattern string
}
MountPoint holds information about the mounted endpoints.
type SecureUnauthorizedResponseBody
type SecureUnauthorizedResponseBody string
SecureUnauthorizedResponseBody is the type of the “secured_service” service “secure” endpoint HTTP response body for the “unauthorized” error.
func NewSecureUnauthorizedResponseBody
func NewSecureUnauthorizedResponseBody(res securedservice.Unauthorized) SecureUnauthorizedResponseBody
NewSecureUnauthorizedResponseBody builds the HTTP response body from the result of the “secure” endpoint of the “secured_service” service.
type Server
type Server struct {
Mounts []*MountPoint
Signin http.Handler
Secure http.Handler
DoublySecure http.Handler
AlsoDoublySecure http.Handler
}
Server lists the secured_service service endpoint HTTP handlers.
func New
func New(
e *securedservice.Endpoints,
mux goahttp.Muxer,
dec func(*http.Request) goahttp.Decoder,
enc func(context.Context, http.ResponseWriter) goahttp.Encoder,
eh func(context.Context, http.ResponseWriter, error),
) *Server
New instantiates HTTP handlers for all the secured_service service endpoints.
func (*Server) Service
func (s *Server) Service() string
Service returns the name of the service served.
func (*Server) Use
func (s *Server) Use(m func(http.Handler) http.Handler)
Use wraps the server handlers with the given middleware.
type SigninUnauthorizedResponseBody
type SigninUnauthorizedResponseBody string
SigninUnauthorizedResponseBody is the type of the “secured_service” service “signin” endpoint HTTP response body for the “unauthorized” error.
func NewSigninUnauthorizedResponseBody
func NewSigninUnauthorizedResponseBody(res securedservice.Unauthorized) SigninUnauthorizedResponseBody
NewSigninUnauthorizedResponseBody builds the HTTP response body from the result of the “signin” endpoint of the “secured_service” service.
Generated by godoc2md