Documentation ¶
Index ¶
Constants ¶
View Source
const ( SchemaURL = "https://github.com/http-everything/httpe/main/pkg/rules/schema.json" RunScript = "run.script" SendEmail = "send.email" AnswerContent = "answer.content" AnswerFile = "answer.file" RedirectPermanent = "redirect.permanent" RedirectTemporary = "redirect.temporary" ServeDirectory = "serve.directory" RenderButtons = "render.buttons" )
Variables ¶
View Source
var ValidActions = []string{ RunScript, SendEmail, AnswerFile, AnswerContent, RedirectPermanent, RedirectTemporary, ServeDirectory, RenderButtons, }
View Source
var ValidPostActions = []string{ SendEmail, RunScript, }
Functions ¶
func YamlToJSON ¶
Types ¶
type Args ¶
type Args struct { Interpreter string `yaml:"interpreter" json:"interpreter"` Timeout int `yaml:"timeout" json:"timeout"` Cwd string `yaml:"cwd" json:"cwd"` Template string `yaml:"template" json:"template"` FileUploads bool `yaml:"file_uploads" json:"file_uploads"` Templating bool `yaml:"templating" json:"templating"` }
type Email ¶
type Email struct { From string `yaml:"from,omitempty" json:"from,omitempty"` To string `yaml:"to,omitempty" json:"to,omitempty"` Cc string `yaml:"cc,omitempty" json:"cc,omitempty"` Bcc string `yaml:"bcc,omitempty" json:"bcc,omitempty"` Subject string `yaml:"subject,omitempty" json:"subject,omitempty"` Body string `yaml:"body,omitempty" json:"body,omitempty"` }
type PostAction ¶
type Respond ¶
type Rule ¶
type Rule struct { Name string `yaml:"name,omitempty" json:"name,omitempty"` On *On `yaml:"on" json:"on"` RunScript string `yaml:"run.script,omitempty" json:"run.script,omitempty"` SendEmail *Email `yaml:"send.email,omitempty" json:"send.email,omitempty"` AnswerContent string `yaml:"answer.content,omitempty" json:"answer.content,omitempty"` AnswerFile string `yaml:"answer.file,omitempty" json:"answer.file,omitempty"` RedirectPermanent string `yaml:"redirect.permanent,omitempty" json:"redirect.permanent,omitempty"` RedirectTemporary string `yaml:"redirect.temporary,omitempty" json:"redirect.temporary,omitempty"` ServeDirectory string `yaml:"serve.directory,omitempty" json:"serve.directory,omitempty"` RenderButtons []Button `yaml:"render.buttons,omitempty" json:"render.buttons,omitempty"` Args Args `yaml:"args" json:"args"` With *With `yaml:"with" json:"with,omitempty"` PostAction *PostAction `yaml:"postaction" json:"postaction,omitempty"` Respond Respond `yaml:"respond" json:"respond"` }
func (*Rule) MatchesURI ¶
func (*Rule) MaxRequestBody ¶
type Rules ¶
type Rules struct { Rules *[]Rule `yaml:"rules" json:"rules"` // contains filtered or unexported fields }
Click to show internal directories.
Click to hide internal directories.