server

package
v0.0.0-...-5f4f256 Latest Latest
Warning

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

Go to latest
Published: Dec 13, 2019 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ChangePasswordPasswordAuthPath

func ChangePasswordPasswordAuthPath() string

ChangePasswordPasswordAuthPath returns the URL path to the password-auth service change-password HTTP endpoint.

func CheckEmailAvailablePasswordAuthPath

func CheckEmailAvailablePasswordAuthPath() string

CheckEmailAvailablePasswordAuthPath returns the URL path to the password-auth service check-email-available HTTP endpoint.

func CheckPhoneAvailablePasswordAuthPath

func CheckPhoneAvailablePasswordAuthPath() string

CheckPhoneAvailablePasswordAuthPath returns the URL path to the password-auth service check-phone-available HTTP endpoint.

func CheckUsernameAvailablePasswordAuthPath

func CheckUsernameAvailablePasswordAuthPath() string

CheckUsernameAvailablePasswordAuthPath returns the URL path to the password-auth service check-username-available HTTP endpoint.

func ConfirmResetPasswordAuthPath

func ConfirmResetPasswordAuthPath() string

ConfirmResetPasswordAuthPath returns the URL path to the password-auth service confirm-reset HTTP endpoint.

func DecodeChangePasswordRequest

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

DecodeChangePasswordRequest returns a decoder for requests sent to the password-auth change-password endpoint.

func DecodeCheckEmailAvailableRequest

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

DecodeCheckEmailAvailableRequest returns a decoder for requests sent to the password-auth check-email-available endpoint.

func DecodeCheckPhoneAvailableRequest

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

DecodeCheckPhoneAvailableRequest returns a decoder for requests sent to the password-auth check-phone-available endpoint.

func DecodeCheckUsernameAvailableRequest

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

DecodeCheckUsernameAvailableRequest returns a decoder for requests sent to the password-auth check-username-available endpoint.

func DecodeConfirmResetRequest

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

DecodeConfirmResetRequest returns a decoder for requests sent to the password-auth confirm-reset endpoint.

func DecodeLoginRequest

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

DecodeLoginRequest returns a decoder for requests sent to the password-auth login endpoint.

func DecodeRegisterRequest

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

DecodeRegisterRequest returns a decoder for requests sent to the password-auth register endpoint.

func DecodeRemoveRequest

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

DecodeRemoveRequest returns a decoder for requests sent to the password-auth remove endpoint.

func DecodeResetRequest

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

DecodeResetRequest returns a decoder for requests sent to the password-auth reset endpoint.

func EncodeChangePasswordResponse

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

EncodeChangePasswordResponse returns an encoder for responses returned by the password-auth change-password endpoint.

func EncodeCheckEmailAvailableResponse

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

EncodeCheckEmailAvailableResponse returns an encoder for responses returned by the password-auth check-email-available endpoint.

func EncodeCheckPhoneAvailableResponse

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

EncodeCheckPhoneAvailableResponse returns an encoder for responses returned by the password-auth check-phone-available endpoint.

func EncodeCheckUsernameAvailableResponse

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

EncodeCheckUsernameAvailableResponse returns an encoder for responses returned by the password-auth check-username-available endpoint.

func EncodeConfirmResetResponse

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

EncodeConfirmResetResponse returns an encoder for responses returned by the password-auth confirm-reset endpoint.

func EncodeLoginResponse

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

EncodeLoginResponse returns an encoder for responses returned by the password-auth login endpoint.

func EncodeRegisterResponse

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

EncodeRegisterResponse returns an encoder for responses returned by the password-auth register endpoint.

func EncodeRemoveResponse

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

EncodeRemoveResponse returns an encoder for responses returned by the password-auth remove endpoint.

func EncodeResetResponse

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

EncodeResetResponse returns an encoder for responses returned by the password-auth reset endpoint.

func LoginPasswordAuthPath

func LoginPasswordAuthPath() string

LoginPasswordAuthPath returns the URL path to the password-auth service login HTTP endpoint.

func Mount

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

Mount configures the mux to serve the password-auth endpoints.

func MountCORSHandler

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

MountCORSHandler configures the mux to serve the CORS endpoints for the service password-auth.

func MountChangePasswordHandler

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

MountChangePasswordHandler configures the mux to serve the "password-auth" service "change-password" endpoint.

func MountCheckEmailAvailableHandler

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

MountCheckEmailAvailableHandler configures the mux to serve the "password-auth" service "check-email-available" endpoint.

func MountCheckPhoneAvailableHandler

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

MountCheckPhoneAvailableHandler configures the mux to serve the "password-auth" service "check-phone-available" endpoint.

func MountCheckUsernameAvailableHandler

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

MountCheckUsernameAvailableHandler configures the mux to serve the "password-auth" service "check-username-available" endpoint.

func MountConfirmResetHandler

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

MountConfirmResetHandler configures the mux to serve the "password-auth" service "confirm-reset" endpoint.

func MountLoginHandler

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

MountLoginHandler configures the mux to serve the "password-auth" service "login" endpoint.

func MountRegisterHandler

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

MountRegisterHandler configures the mux to serve the "password-auth" service "register" endpoint.

func MountRemoveHandler

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

MountRemoveHandler configures the mux to serve the "password-auth" service "remove" endpoint.

func MountResetHandler

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

MountResetHandler configures the mux to serve the "password-auth" service "reset" endpoint.

func NewCORSHandler

func NewCORSHandler() http.Handler

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

func NewChangePasswordHandler

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

NewChangePasswordHandler creates a HTTP handler which loads the HTTP request and calls the "password-auth" service "change-password" endpoint.

func NewChangePasswordParams

func NewChangePasswordParams(body *ChangePasswordRequestBody, authorization string, xSession string, aPIKey *string) *passwordauth.ChangePasswordParams

NewChangePasswordParams builds a password-auth service change-password endpoint payload.

func NewCheckEmailAvailableHandler

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

NewCheckEmailAvailableHandler creates a HTTP handler which loads the HTTP request and calls the "password-auth" service "check-email-available" endpoint.

func NewCheckEmailAvailablePayload

func NewCheckEmailAvailablePayload(email *string, aPIKey *string) *passwordauth.CheckEmailAvailablePayload

NewCheckEmailAvailablePayload builds a password-auth service check-email-available endpoint payload.

func NewCheckPhoneAvailableHandler

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

NewCheckPhoneAvailableHandler creates a HTTP handler which loads the HTTP request and calls the "password-auth" service "check-phone-available" endpoint.

func NewCheckPhoneAvailablePayload

func NewCheckPhoneAvailablePayload(phone *string, aPIKey *string) *passwordauth.CheckPhoneAvailablePayload

NewCheckPhoneAvailablePayload builds a password-auth service check-phone-available endpoint payload.

func NewCheckUsernameAvailableHandler

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

NewCheckUsernameAvailableHandler creates a HTTP handler which loads the HTTP request and calls the "password-auth" service "check-username-available" endpoint.

func NewCheckUsernameAvailablePayload

func NewCheckUsernameAvailablePayload(username *string, aPIKey *string) *passwordauth.CheckUsernameAvailablePayload

NewCheckUsernameAvailablePayload builds a password-auth service check-username-available endpoint payload.

func NewConfirmResetHandler

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

NewConfirmResetHandler creates a HTTP handler which loads the HTTP request and calls the "password-auth" service "confirm-reset" endpoint.

func NewConfirmResetResetPasswordParams

func NewConfirmResetResetPasswordParams(body *ConfirmResetRequestBody, aPIKey *string) *passwordauth.ResetPasswordParams

NewConfirmResetResetPasswordParams builds a password-auth service confirm-reset endpoint payload.

func NewLoginHandler

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

NewLoginHandler creates a HTTP handler which loads the HTTP request and calls the "password-auth" service "login" endpoint.

func NewLoginParams

func NewLoginParams(body *LoginRequestBody, token *string, aPIKey *string) *passwordauth.LoginParams

NewLoginParams builds a password-auth service login endpoint payload.

func NewRegisterHandler

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

NewRegisterHandler creates a HTTP handler which loads the HTTP request and calls the "password-auth" service "register" endpoint.

func NewRegisterParams

func NewRegisterParams(body *RegisterRequestBody, authorization *string, xSession *string, aPIKey *string) *passwordauth.RegisterParams

NewRegisterParams builds a password-auth service register endpoint payload.

func NewRemoveHandler

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

NewRemoveHandler creates a HTTP handler which loads the HTTP request and calls the "password-auth" service "remove" endpoint.

func NewRemovePayload

func NewRemovePayload(authorization *string, xSession *string, aPIKey *string) *passwordauth.RemovePayload

NewRemovePayload builds a password-auth service remove endpoint payload.

func NewResetHandler

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

NewResetHandler creates a HTTP handler which loads the HTTP request and calls the "password-auth" service "reset" endpoint.

func NewResetPayload

func NewResetPayload(email string, redirectURL string, aPIKey *string) *passwordauth.ResetPayload

NewResetPayload builds a password-auth service reset endpoint payload.

func RegisterPasswordAuthPath

func RegisterPasswordAuthPath() string

RegisterPasswordAuthPath returns the URL path to the password-auth service register HTTP endpoint.

func RemovePasswordAuthPath

func RemovePasswordAuthPath() string

RemovePasswordAuthPath returns the URL path to the password-auth service remove HTTP endpoint.

func ResetPasswordAuthPath

func ResetPasswordAuthPath() string

ResetPasswordAuthPath returns the URL path to the password-auth service reset HTTP endpoint.

func ValidateChangePasswordRequestBody

func ValidateChangePasswordRequestBody(body *ChangePasswordRequestBody) (err error)

ValidateChangePasswordRequestBody runs the validations defined on Change-PasswordRequestBody

func ValidateConfirmResetRequestBody

func ValidateConfirmResetRequestBody(body *ConfirmResetRequestBody) (err error)

ValidateConfirmResetRequestBody runs the validations defined on Confirm-ResetRequestBody

func ValidateLoginRequestBody

func ValidateLoginRequestBody(body *LoginRequestBody) (err error)

ValidateLoginRequestBody runs the validations defined on LoginRequestBody

func ValidateRegisterRequestBody

func ValidateRegisterRequestBody(body *RegisterRequestBody) (err error)

ValidateRegisterRequestBody runs the validations defined on RegisterRequestBody

Types

type AggCampaignMediaResponseBody

type AggCampaignMediaResponseBody struct {
	Rejected    []interface{} `form:"rejected,omitempty" json:"rejected,omitempty" xml:"rejected,omitempty"`
	Invited     []interface{} `form:"invited,omitempty" json:"invited,omitempty" xml:"invited,omitempty"`
	Applied     []interface{} `form:"applied,omitempty" json:"applied,omitempty" xml:"applied,omitempty"`
	Shortlisted []interface{} `form:"shortlisted,omitempty" json:"shortlisted,omitempty" xml:"shortlisted,omitempty"`
	Selected    []interface{} `form:"selected,omitempty" json:"selected,omitempty" xml:"selected,omitempty"`
	Previous    []interface{} `form:"previous,omitempty" json:"previous,omitempty" xml:"previous,omitempty"`
}

AggCampaignMediaResponseBody is used to define fields on response body types.

type AggInstagramMediaResponseBody

type AggInstagramMediaResponseBody struct {
	Website        *string                        `form:"website,omitempty" json:"website,omitempty" xml:"website,omitempty"`
	SelectedPlan   *SelectedPlanMediaResponseBody `form:"selectedPlan,omitempty" json:"selectedPlan,omitempty" xml:"selectedPlan,omitempty"`
	Username       *string                        `form:"username,omitempty" json:"username,omitempty" xml:"username,omitempty"`
	ProfilePicture *string                        `form:"profilePicture,omitempty" json:"profilePicture,omitempty" xml:"profilePicture,omitempty"`
	Bio            *string                        `form:"bio,omitempty" json:"bio,omitempty" xml:"bio,omitempty"`
	ID             *string                        `form:"id,omitempty" json:"id,omitempty" xml:"id,omitempty"`
	IsBusiness     *bool                          `form:"isBusiness,omitempty" json:"isBusiness,omitempty" xml:"isBusiness,omitempty"`
	FullName       *string                        `form:"fullName,omitempty" json:"fullName,omitempty" xml:"fullName,omitempty"`
}

AggInstagramMediaResponseBody is used to define fields on response body types.

type AggSocialMediaResponseBody

type AggSocialMediaResponseBody struct {
	Instagram *AggInstagramMediaResponseBody `form:"instagram,omitempty" json:"instagram,omitempty" xml:"instagram,omitempty"`
}

AggSocialMediaResponseBody is used to define fields on response body types.

type ChangePasswordRequestBody

type ChangePasswordRequestBody struct {
	// The old password for the current user account
	OldPassword *string `form:"oldPassword,omitempty" json:"oldPassword,omitempty" xml:"oldPassword,omitempty"`
	// The new password for the current user account
	NewPassword *string `form:"newPassword,omitempty" json:"newPassword,omitempty" xml:"newPassword,omitempty"`
}

ChangePasswordRequestBody is the type of the "password-auth" service "change-password" endpoint HTTP request body.

type ConfirmResetRequestBody

type ConfirmResetRequestBody struct {
	// The UUID of the password reset, send from the user's email
	ResetCode *string `form:"resetCode,omitempty" json:"resetCode,omitempty" xml:"resetCode,omitempty"`
	// The ID of the user to reset the password of
	UserID *string `form:"userID,omitempty" json:"userID,omitempty" xml:"userID,omitempty"`
	// The new password that will be used to login to the account
	NewPassword *string `form:"newPassword,omitempty" json:"newPassword,omitempty" xml:"newPassword,omitempty"`
}

ConfirmResetRequestBody is the type of the "password-auth" service "confirm-reset" endpoint HTTP request body.

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 LoginRequestBody

type LoginRequestBody struct {
	// The email address of the account to login to
	Email *string `form:"email,omitempty" json:"email,omitempty" xml:"email,omitempty"`
	// The password of the account to login to
	Password *string `form:"password,omitempty" json:"password,omitempty" xml:"password,omitempty"`
	// 2 Factor Auth if user has enabled the feature
	TwoFactor *string `form:"TwoFactor,omitempty" json:"TwoFactor,omitempty" xml:"TwoFactor,omitempty"`
}

LoginRequestBody is the type of the "password-auth" service "login" endpoint HTTP request body.

type LoginResponseBody

type LoginResponseBody 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"`
	UID       *string `form:"uid,omitempty" json:"uid,omitempty" xml:"uid,omitempty"`
	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"`
	// Category of the user generated by our algorithms
	Category     *string                       `form:"category,omitempty" json:"category,omitempty" xml:"category,omitempty"`
	IsActive     *bool                         `form:"isActive,omitempty" json:"isActive,omitempty" xml:"isActive,omitempty"`
	AggCampaigns *AggCampaignMediaResponseBody `form:"aggCampaigns,omitempty" json:"aggCampaigns,omitempty" xml:"aggCampaigns,omitempty"`
	Genres       []string                      `form:"genres,omitempty" json:"genres,omitempty" xml:"genres,omitempty"`
	// Phone Number Of the user
	Username  string                          `form:"username" json:"username" xml:"username"`
	Gender    *string                         `form:"gender,omitempty" json:"gender,omitempty" xml:"gender,omitempty"`
	Onboarded *UserOnboardedMediaResponseBody `form:"onboarded,omitempty" json:"onboarded,omitempty" xml:"onboarded,omitempty"`
	Location  *UserLocationMediaResponseBody  `form:"location,omitempty" json:"location,omitempty" xml:"location,omitempty"`
	Dob       *string                         `form:"dob,omitempty" json:"dob,omitempty" xml:"dob,omitempty"`
	CreatedAt *string                         `form:"createdAt,omitempty" json:"createdAt,omitempty" xml:"createdAt,omitempty"`
	AggSocial *AggSocialMediaResponseBody     `form:"aggSocial,omitempty" json:"aggSocial,omitempty" xml:"aggSocial,omitempty"`
	// Given name for the user
	FirstName          string      `form:"firstName" json:"firstName" xml:"firstName"`
	SocialMediaRawData interface{} `form:"socialMediaRawData,omitempty" json:"socialMediaRawData,omitempty" xml:"socialMediaRawData,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" json:"isAdmin" xml:"isAdmin"`
	// Whether the user is a brand manager on the site
	IsBrandManager bool `form:"isBrandManager" json:"isBrandManager" xml:"isBrandManager"`
	// Whether the user has verified their email
	VerifiedEmail bool `form:"verifiedEmail" json:"verifiedEmail" xml:"verifiedEmail"`
}

LoginResponseBody is the type of the "password-auth" service "login" endpoint HTTP response body.

func NewLoginResponseBody

func NewLoginResponseBody(res *passwordauthviews.UserMediaView) *LoginResponseBody

NewLoginResponseBody builds the HTTP response body from the result of the "login" endpoint of the "password-auth" service.

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 RegisterRequestBody

type RegisterRequestBody struct {
	// The email that will be attached to the account
	Email *string `form:"email,omitempty" json:"email,omitempty" xml:"email,omitempty"`
	// The user's given name
	FirstName *string `form:"firstName,omitempty" json:"firstName,omitempty" xml:"firstName,omitempty"`
	// The user's family name
	LastName *string `form:"lastName,omitempty" json:"lastName,omitempty" xml:"lastName,omitempty"`
	// The password associated with the new account
	Password *string `form:"password,omitempty" json:"password,omitempty" xml:"password,omitempty"`
	// The username chosen by this user
	Username *string `form:"username,omitempty" json:"username,omitempty" xml:"username,omitempty"`
	// The user's phone number
	Phone *string `form:"phone,omitempty" json:"phone,omitempty" xml:"phone,omitempty"`
	// The recaptcha response code
	GRecaptchaResponse *string `form:"gRecaptchaResponse,omitempty" json:"gRecaptchaResponse,omitempty" xml:"gRecaptchaResponse,omitempty"`
}

RegisterRequestBody is the type of the "password-auth" service "register" endpoint HTTP request body.

type RegisterResponseBody

type RegisterResponseBody 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"`
	UID       *string `form:"uid,omitempty" json:"uid,omitempty" xml:"uid,omitempty"`
	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"`
	// Category of the user generated by our algorithms
	Category     *string                       `form:"category,omitempty" json:"category,omitempty" xml:"category,omitempty"`
	IsActive     *bool                         `form:"isActive,omitempty" json:"isActive,omitempty" xml:"isActive,omitempty"`
	AggCampaigns *AggCampaignMediaResponseBody `form:"aggCampaigns,omitempty" json:"aggCampaigns,omitempty" xml:"aggCampaigns,omitempty"`
	Genres       []string                      `form:"genres,omitempty" json:"genres,omitempty" xml:"genres,omitempty"`
	// Phone Number Of the user
	Username  string                          `form:"username" json:"username" xml:"username"`
	Gender    *string                         `form:"gender,omitempty" json:"gender,omitempty" xml:"gender,omitempty"`
	Onboarded *UserOnboardedMediaResponseBody `form:"onboarded,omitempty" json:"onboarded,omitempty" xml:"onboarded,omitempty"`
	Location  *UserLocationMediaResponseBody  `form:"location,omitempty" json:"location,omitempty" xml:"location,omitempty"`
	Dob       *string                         `form:"dob,omitempty" json:"dob,omitempty" xml:"dob,omitempty"`
	CreatedAt *string                         `form:"createdAt,omitempty" json:"createdAt,omitempty" xml:"createdAt,omitempty"`
	AggSocial *AggSocialMediaResponseBody     `form:"aggSocial,omitempty" json:"aggSocial,omitempty" xml:"aggSocial,omitempty"`
	// Given name for the user
	FirstName          string      `form:"firstName" json:"firstName" xml:"firstName"`
	SocialMediaRawData interface{} `form:"socialMediaRawData,omitempty" json:"socialMediaRawData,omitempty" xml:"socialMediaRawData,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" json:"isAdmin" xml:"isAdmin"`
	// Whether the user is a brand manager on the site
	IsBrandManager bool `form:"isBrandManager" json:"isBrandManager" xml:"isBrandManager"`
	// Whether the user has verified their email
	VerifiedEmail bool `form:"verifiedEmail" json:"verifiedEmail" xml:"verifiedEmail"`
}

RegisterResponseBody is the type of the "password-auth" service "register" endpoint HTTP response body.

func NewRegisterResponseBody

func NewRegisterResponseBody(res *passwordauthviews.UserMediaView) *RegisterResponseBody

NewRegisterResponseBody builds the HTTP response body from the result of the "register" endpoint of the "password-auth" service.

type SelectedPlanMediaResponseBody

type SelectedPlanMediaResponseBody struct {
	ID          *string `json:"id"`
	Title       *string `json:"title"`
	Description *string `json:"description"`
	CPC         *int    `json:"CPC"`
	Commission  *int    `json:"commission"`
	OneP        *int    `json:"1P"`
	TwoP        *int    `json:"2P"`
	OneV        *int    `json:"1V"`
	TwoV        *int    `json:"2V"`
	OnePOneV    *int    `json:"1P + 1V"`
}

SelectedPlanMediaResponseBody is used to define fields on response body types.

type Server

type Server struct {
	Mounts                 []*MountPoint
	Register               http.Handler
	Login                  http.Handler
	Remove                 http.Handler
	ChangePassword         http.Handler
	Reset                  http.Handler
	ConfirmReset           http.Handler
	CheckEmailAvailable    http.Handler
	CheckUsernameAvailable http.Handler
	CheckPhoneAvailable    http.Handler
	CORS                   http.Handler
}

Server lists the password-auth service endpoint HTTP handlers.

func New

New instantiates HTTP handlers for all the password-auth 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 UserLocationMediaResponseBody

type UserLocationMediaResponseBody struct {
	Street   *string `form:"street,omitempty" json:"street,omitempty" xml:"street,omitempty"`
	Line2    *string `form:"line2,omitempty" json:"line2,omitempty" xml:"line2,omitempty"`
	Locality *string `form:"locality,omitempty" json:"locality,omitempty" xml:"locality,omitempty"`
	City     *string `form:"city,omitempty" json:"city,omitempty" xml:"city,omitempty"`
	State    *string `form:"state,omitempty" json:"state,omitempty" xml:"state,omitempty"`
	Country  *string `form:"country,omitempty" json:"country,omitempty" xml:"country,omitempty"`
	Postcode *string `form:"postcode,omitempty" json:"postcode,omitempty" xml:"postcode,omitempty"`
	Text     *string `form:"text,omitempty" json:"text,omitempty" xml:"text,omitempty"`
}

UserLocationMediaResponseBody is used to define fields on response body types.

type UserOnboardedMediaResponseBody

type UserOnboardedMediaResponseBody struct {
	Profile         *bool `form:"profile,omitempty" json:"profile,omitempty" xml:"profile,omitempty"`
	Signup          *bool `form:"signup,omitempty" json:"signup,omitempty" xml:"signup,omitempty"`
	Store           *bool `form:"store,omitempty" json:"store,omitempty" xml:"store,omitempty"`
	CampaignDetails *bool `form:"campaignDetails,omitempty" json:"campaignDetails,omitempty" xml:"campaignDetails,omitempty"`
}

UserOnboardedMediaResponseBody is used to define fields on response body types.

Jump to

Keyboard shortcuts

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