server

package
v0.0.0-...-69a499a Latest Latest
Warning

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

Go to latest
Published: Apr 1, 2020 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AttachToAccountGooglePath

func AttachToAccountGooglePath() string

AttachToAccountGooglePath returns the URL path to the google service attach-to-account HTTP endpoint.

func DecodeAttachToAccountRequest

func DecodeAttachToAccountRequest(mux goahttp.Muxer, decoder func(*http.Request) goahttp.Decoder) func(*http.Request) (interface{}, error)

DecodeAttachToAccountRequest returns a decoder for requests sent to the google attach-to-account endpoint.

func DecodeDetachFromAccountRequest

func DecodeDetachFromAccountRequest(mux goahttp.Muxer, decoder func(*http.Request) goahttp.Decoder) func(*http.Request) (interface{}, error)

DecodeDetachFromAccountRequest returns a decoder for requests sent to the google detach-from-account endpoint.

func DecodeReceiveRequest

func DecodeReceiveRequest(mux goahttp.Muxer, decoder func(*http.Request) goahttp.Decoder) func(*http.Request) (interface{}, error)

DecodeReceiveRequest returns a decoder for requests sent to the google receive endpoint.

func DecodeRegisterURLRequest

func DecodeRegisterURLRequest(mux goahttp.Muxer, decoder func(*http.Request) goahttp.Decoder) func(*http.Request) (interface{}, error)

DecodeRegisterURLRequest returns a decoder for requests sent to the google register-url endpoint.

func DetachFromAccountGooglePath

func DetachFromAccountGooglePath() string

DetachFromAccountGooglePath returns the URL path to the google service detach-from-account HTTP endpoint.

func EncodeAttachToAccountResponse

func EncodeAttachToAccountResponse(encoder func(context.Context, http.ResponseWriter) goahttp.Encoder) func(context.Context, http.ResponseWriter, interface{}) error

EncodeAttachToAccountResponse returns an encoder for responses returned by the google attach-to-account endpoint.

func EncodeDetachFromAccountResponse

func EncodeDetachFromAccountResponse(encoder func(context.Context, http.ResponseWriter) goahttp.Encoder) func(context.Context, http.ResponseWriter, interface{}) error

EncodeDetachFromAccountResponse returns an encoder for responses returned by the google detach-from-account endpoint.

func EncodeReceiveResponse

func EncodeReceiveResponse(encoder func(context.Context, http.ResponseWriter) goahttp.Encoder) func(context.Context, http.ResponseWriter, interface{}) error

EncodeReceiveResponse returns an encoder for responses returned by the google receive endpoint.

func EncodeRegisterURLResponse

func EncodeRegisterURLResponse(encoder func(context.Context, http.ResponseWriter) goahttp.Encoder) func(context.Context, http.ResponseWriter, interface{}) error

EncodeRegisterURLResponse returns an encoder for responses returned by the google register-url endpoint.

func Mount

func Mount(mux goahttp.Muxer, h *Server)

Mount configures the mux to serve the google endpoints.

func MountAttachToAccountHandler

func MountAttachToAccountHandler(mux goahttp.Muxer, h http.Handler)

MountAttachToAccountHandler configures the mux to serve the "google" service "attach-to-account" endpoint.

func MountCORSHandler

func MountCORSHandler(mux goahttp.Muxer, h http.Handler)

MountCORSHandler configures the mux to serve the CORS endpoints for the service google.

func MountDetachFromAccountHandler

func MountDetachFromAccountHandler(mux goahttp.Muxer, h http.Handler)

MountDetachFromAccountHandler configures the mux to serve the "google" service "detach-from-account" endpoint.

func MountReceiveHandler

func MountReceiveHandler(mux goahttp.Muxer, h http.Handler)

MountReceiveHandler configures the mux to serve the "google" service "receive" endpoint.

func MountRegisterURLHandler

func MountRegisterURLHandler(mux goahttp.Muxer, h http.Handler)

MountRegisterURLHandler configures the mux to serve the "google" service "register-url" endpoint.

func NewAttachToAccountHandler

func NewAttachToAccountHandler(
	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

NewAttachToAccountHandler creates a HTTP handler which loads the HTTP request and calls the "google" service "attach-to-account" endpoint.

func NewAttachToAccountPayload

func NewAttachToAccountPayload(authorization *string, xSession *string, aPIKey *string, redirectURL *string) *google.AttachToAccountPayload

NewAttachToAccountPayload builds a google service attach-to-account endpoint payload.

func NewCORSHandler

func NewCORSHandler() http.Handler

NewCORSHandler creates a HTTP handler which returns a simple 200 response.

func NewDetachFromAccountHandler

func NewDetachFromAccountHandler(
	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

NewDetachFromAccountHandler creates a HTTP handler which loads the HTTP request and calls the "google" service "detach-from-account" endpoint.

func NewDetachFromAccountPayload

func NewDetachFromAccountPayload(authorization *string, xSession *string, aPIKey *string) *google.DetachFromAccountPayload

NewDetachFromAccountPayload builds a google service detach-from-account endpoint payload.

func NewReceiveHandler

func NewReceiveHandler(
	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

NewReceiveHandler creates a HTTP handler which loads the HTTP request and calls the "google" service "receive" endpoint.

func NewReceivePayload

func NewReceivePayload(code string, state string, authorization *string, xSession *string, redirectURL *string, aPIKey *string) *google.ReceivePayload

NewReceivePayload builds a google service receive endpoint payload.

func NewRegisterURLHandler

func NewRegisterURLHandler(
	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

NewRegisterURLHandler creates a HTTP handler which loads the HTTP request and calls the "google" service "register-url" endpoint.

func NewRegisterURLPayload

func NewRegisterURLPayload(aPIKey *string, redirectURL *string) *google.RegisterURLPayload

NewRegisterURLPayload builds a google service register-url endpoint payload.

func ReceiveGooglePath

func ReceiveGooglePath() string

ReceiveGooglePath returns the URL path to the google service receive HTTP endpoint.

func RegisterURLGooglePath

func RegisterURLGooglePath() string

RegisterURLGooglePath returns the URL path to the google service register-url HTTP endpoint.

Types

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 ReceiveResponseBody

type ReceiveResponseBody struct {
	// Unique unchanging user ID
	ID string `form:"id" json:"id" xml:"id"`
	// Phone Number Of the user
	Phone string `form:"phone" json:"phone" xml:"phone"`
	// Family name for the user
	LastName  string  `form:"lastName" json:"lastName" xml:"lastName"`
	UpdatedAt *string `form:"updatedAt,omitempty" json:"updatedAt,omitempty" xml:"updatedAt,omitempty"`
	// Email attached to the account of the user
	Email     string  `form:"email" json:"email" xml:"email"`
	CreatedAt *string `form:"createdAt,omitempty" json:"createdAt,omitempty" xml:"createdAt,omitempty"`
	// Given name for the user
	FirstName        string  `form:"firstName" json:"firstName" xml:"firstName"`
	CountryPhoneCode *string `form:"countryPhoneCode,omitempty" json:"countryPhoneCode,omitempty" xml:"countryPhoneCode,omitempty"`
	// When the user attempts to change their email, this is what they will change
	// it to after they verify that it belongs to them
	ChangingEmail *string `form:"changingEmail,omitempty" json:"changingEmail,omitempty" xml:"changingEmail,omitempty"`
	// Whether the user is an administrator on the site
	IsAdmin *bool `form:"isAdmin,omitempty" json:"isAdmin,omitempty" xml:"isAdmin,omitempty"`
	// Whether the user has verified their email
	VerifiedEmail bool `form:"verifiedEmail" json:"verifiedEmail" xml:"verifiedEmail"`
}

ReceiveResponseBody is the type of the "google" service "receive" endpoint HTTP response body.

func NewReceiveResponseBody

func NewReceiveResponseBody(res *googleviews.UserMediaView) *ReceiveResponseBody

NewReceiveResponseBody builds the HTTP response body from the result of the "receive" endpoint of the "google" service.

type Server

type Server struct {
	Mounts            []*MountPoint
	RegisterURL       http.Handler
	AttachToAccount   http.Handler
	DetachFromAccount http.Handler
	Receive           http.Handler
	CORS              http.Handler
}

Server lists the google service endpoint HTTP handlers.

func New

New instantiates HTTP handlers for all the google 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.

Jump to

Keyboard shortcuts

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