templates

package
v0.0.0-...-f08e3d1 Latest Latest
Warning

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

Go to latest
Published: Sep 13, 2024 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CreateHandler

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

func NewCreateHandler

func NewCreateHandler(creator templateCreator, errWriter errorWriter) CreateHandler

func (CreateHandler) ServeHTTP

func (h CreateHandler) ServeHTTP(w http.ResponseWriter, req *http.Request, context stack.Context)

type DatabaseInterface

type DatabaseInterface interface {
	services.DatabaseInterface
}

type DeleteHandler

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

func NewDeleteHandler

func NewDeleteHandler(deleter templateDeleter, errWriter errorWriter) DeleteHandler

func (DeleteHandler) ServeHTTP

func (h DeleteHandler) ServeHTTP(w http.ResponseWriter, req *http.Request, context stack.Context)

type GetDefaultHandler

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

func NewGetDefaultHandler

func NewGetDefaultHandler(finder templateFinder, errWriter errorWriter) GetDefaultHandler

func (GetDefaultHandler) ServeHTTP

func (h GetDefaultHandler) ServeHTTP(w http.ResponseWriter, req *http.Request, context stack.Context)

type GetHandler

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

func NewGetHandler

func NewGetHandler(templateFinder templateFinder, errWriter errorWriter) GetHandler

func (GetHandler) ServeHTTP

func (h GetHandler) ServeHTTP(w http.ResponseWriter, req *http.Request, context stack.Context)

type ListAssociationsHandler

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

func NewListAssociationsHandler

func NewListAssociationsHandler(lister templateAssociationLister, errWriter errorWriter) ListAssociationsHandler

func (ListAssociationsHandler) ServeHTTP

func (h ListAssociationsHandler) ServeHTTP(w http.ResponseWriter, req *http.Request, context stack.Context)

type ListHandler

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

func NewListHandler

func NewListHandler(lister templateLister, errWriter errorWriter) ListHandler

func (ListHandler) ServeHTTP

func (h ListHandler) ServeHTTP(w http.ResponseWriter, req *http.Request, context stack.Context)

type Routes

type Routes struct {
	RequestCounter                          stack.Middleware
	RequestLogging                          stack.Middleware
	DatabaseAllocator                       stack.Middleware
	NotificationTemplatesReadAuthenticator  stack.Middleware
	NotificationTemplatesWriteAuthenticator stack.Middleware
	NotificationsManageAuthenticator        stack.Middleware

	ErrorWriter               errorWriter
	TemplateFinder            templateFinder
	TemplateLister            templateLister
	TemplateUpdater           templateUpdater
	TemplateCreator           templateCreator
	TemplateDeleter           templateDeleter
	TemplateAssociationLister templateAssociationLister
}

func (Routes) Register

func (r Routes) Register(m muxer)

type TemplateAssociation

type TemplateAssociation struct {
	Client       string `json:"client"`
	Notification string `json:"notification,omitempty"`
}

type TemplateOutput

type TemplateOutput struct {
	Name     string                 `json:"name"`
	Subject  string                 `json:"subject"`
	HTML     string                 `json:"html"`
	Text     string                 `json:"text"`
	Metadata map[string]interface{} `json:"metadata"`
}

type TemplateParams

type TemplateParams struct {
	Name     string          `json:"name" validate-required:"true"`
	Text     string          `json:"text"`
	HTML     string          `json:"html" validate-required:"true"`
	Subject  string          `json:"subject"`
	Metadata json.RawMessage `json:"metadata"`
}

func NewTemplateParams

func NewTemplateParams(body io.ReadCloser) (TemplateParams, error)

func (TemplateParams) ToModel

func (t TemplateParams) ToModel() models.Template

type UpdateDefaultHandler

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

func NewUpdateDefaultHandler

func NewUpdateDefaultHandler(updater templateUpdater, errWriter errorWriter) UpdateDefaultHandler

func (UpdateDefaultHandler) ServeHTTP

func (h UpdateDefaultHandler) ServeHTTP(w http.ResponseWriter, req *http.Request, context stack.Context)

type UpdateHandler

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

func NewUpdateHandler

func NewUpdateHandler(updater templateUpdater, errWriter errorWriter) UpdateHandler

func (UpdateHandler) ServeHTTP

func (h UpdateHandler) ServeHTTP(w http.ResponseWriter, req *http.Request, context stack.Context)

Jump to

Keyboard shortcuts

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