Documentation ¶
Index ¶
- Constants
- type ConnectionInterface
- type DatabaseInterface
- type Dispatcher
- type EmailFormatter
- type EmailHandler
- type EmailValidator
- type EveryoneHandler
- type GUIDValidator
- type HTML
- type HTMLExtractor
- type Notify
- type NotifyParams
- type OrganizationHandler
- type Routes
- type SpaceHandler
- type UAAScopeHandler
- type UserHandler
- type ValidatorInterface
Constants ¶
View Source
const ( VCAPRequestIDKey = "vcap_request_id" RequestReceivedTime = "request_received_time" )
View Source
const InvalidEmail = "<>InvalidEmail<>"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ConnectionInterface ¶
type ConnectionInterface interface { services.ConnectionInterface }
type DatabaseInterface ¶
type DatabaseInterface interface { services.DatabaseInterface }
type Dispatcher ¶
type EmailFormatter ¶
type EmailFormatter struct{}
func (EmailFormatter) Format ¶
func (EmailFormatter) Format(email string) string
type EmailHandler ¶
type EmailHandler struct {
// contains filtered or unexported fields
}
func NewEmailHandler ¶
func NewEmailHandler(notify notifyExecutor, errWriter errorWriter, strategy Dispatcher) EmailHandler
func (EmailHandler) ServeHTTP ¶
func (h EmailHandler) ServeHTTP(w http.ResponseWriter, req *http.Request, context stack.Context)
type EmailValidator ¶
type EmailValidator struct{}
func (EmailValidator) Validate ¶
func (validator EmailValidator) Validate(notify *NotifyParams) bool
type EveryoneHandler ¶
type EveryoneHandler struct {
// contains filtered or unexported fields
}
func NewEveryoneHandler ¶
func NewEveryoneHandler(notify notifyExecutor, errWriter errorWriter, strategy Dispatcher) EveryoneHandler
func (EveryoneHandler) ServeHTTP ¶
func (h EveryoneHandler) ServeHTTP(w http.ResponseWriter, req *http.Request, context stack.Context)
type GUIDValidator ¶
type GUIDValidator struct{}
func (GUIDValidator) Validate ¶
func (validator GUIDValidator) Validate(notify *NotifyParams) bool
type HTMLExtractor ¶
type HTMLExtractor struct{}
type Notify ¶
type Notify struct {
// contains filtered or unexported fields
}
func (Notify) Execute ¶
func (h Notify) Execute(connection ConnectionInterface, req *http.Request, context stack.Context, guid string, strategy Dispatcher, validator ValidatorInterface, vcapRequestID string) ([]byte, error)
type NotifyParams ¶
type NotifyParams struct { ReplyTo string `json:"reply_to"` Subject string `json:"subject"` Text string `json:"text"` RawHTML string `json:"html"` KindID string `json:"kind_id"` To string `json:"to"` Role string `json:"role"` ParsedHTML HTML KindDescription string SourceDescription string Errors []string }
func NewNotifyParams ¶
func NewNotifyParams(body io.ReadCloser) (NotifyParams, error)
func (*NotifyParams) FormatEmailAndExtractHTML ¶
func (notify *NotifyParams) FormatEmailAndExtractHTML() error
type OrganizationHandler ¶
type OrganizationHandler struct {
// contains filtered or unexported fields
}
func NewOrganizationHandler ¶
func NewOrganizationHandler(notify notifyExecutor, errWriter errorWriter, strategy Dispatcher) OrganizationHandler
func (OrganizationHandler) ServeHTTP ¶
func (h OrganizationHandler) ServeHTTP(w http.ResponseWriter, req *http.Request, context stack.Context)
type Routes ¶
type Routes struct { RequestCounter stack.Middleware RequestLogging stack.Middleware DatabaseAllocator stack.Middleware NotificationsWriteAuthenticator stack.Middleware EmailsWriteAuthenticator stack.Middleware Notify notifyExecutor ErrorWriter errorWriter UserStrategy Dispatcher SpaceStrategy Dispatcher OrganizationStrategy Dispatcher EveryoneStrategy Dispatcher UAAScopeStrategy Dispatcher EmailStrategy Dispatcher }
type SpaceHandler ¶
type SpaceHandler struct {
// contains filtered or unexported fields
}
func NewSpaceHandler ¶
func NewSpaceHandler(notify notifyExecutor, errWriter errorWriter, strategy Dispatcher) SpaceHandler
func (SpaceHandler) ServeHTTP ¶
func (h SpaceHandler) ServeHTTP(w http.ResponseWriter, req *http.Request, context stack.Context)
type UAAScopeHandler ¶
type UAAScopeHandler struct {
// contains filtered or unexported fields
}
func NewUAAScopeHandler ¶
func NewUAAScopeHandler(notify notifyExecutor, errWriter errorWriter, strategy Dispatcher) UAAScopeHandler
func (UAAScopeHandler) ServeHTTP ¶
func (h UAAScopeHandler) ServeHTTP(w http.ResponseWriter, req *http.Request, context stack.Context)
type UserHandler ¶
type UserHandler struct {
// contains filtered or unexported fields
}
func NewUserHandler ¶
func NewUserHandler(notify notifyExecutor, errWriter errorWriter, strategy Dispatcher) UserHandler
func (UserHandler) ServeHTTP ¶
func (h UserHandler) ServeHTTP(w http.ResponseWriter, req *http.Request, context stack.Context)
type ValidatorInterface ¶
type ValidatorInterface interface {
Validate(*NotifyParams) bool
}
Click to show internal directories.
Click to hide internal directories.