api

package
v0.0.0-...-eb76b16 Latest Latest
Warning

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

Go to latest
Published: Mar 1, 2024 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CT_FORM = "application/x-www-form-urlencoded"
	CT_JSON = "application/json"
)

Variables

This section is empty.

Functions

func IncomingMessageHandler

func IncomingMessageHandler(config *conf.Config) http.Handler

Types

type MessageRequest

type MessageRequest struct {
	SenderName    string   `json:"sender-name" form:"sender-name"`
	SenderAddress string   `json:"sender-address" form:"sender-address"`
	To            []Person `json:"to" form:"to"`
	Cc            []Person `json:"cc" form:"cc"`
	Bcc           []Person `json:"bcc" form:"bcc"`
	Subject       string   `json:"subject" form:"subject"`
	Message       string   `json:"message" form:"message"`

	ContentType string `json:"_content-type" form:"_content-type"`
	Redirect    string `json:"_redirect" form:"_redirect"`
}

func (*MessageRequest) FieldMap

func (mr *MessageRequest) FieldMap(req *http.Request) binding.FieldMap

func (MessageRequest) Validate

func (mr MessageRequest) Validate() error

type Person

type Person struct {
	Name    string `json:"name" form:"name"`
	Address string `json:"address" form:"address"`
}

Jump to

Keyboard shortcuts

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