contract

package
v0.0.28 Latest Latest
Warning

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

Go to latest
Published: Jun 20, 2024 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Action

type Action interface {
	Dispatch(ctx *Context, res http.ResponseWriter) (bool, error)
	HasResponse() bool
}

type Context

type Context struct {
	Env     map[string]string
	Webhook *WebhookContext
	Request *RequestContext
}

type RequestContext

type RequestContext struct {
	Body       string
	Method     string
	Json       interface{}
	Uri        string
	Host       string
	RemoteAddr string
	Query      string
	Scheme     string
	Username   string
	Password   string
	Header     map[string]string
	Get        map[string][]string
	Cookie     map[string]*http.Cookie
}

type Security

type Security interface {
	IsGranted(ctx *Context) bool
}

type Webhook

type Webhook interface {
	GetName() string
	GetFormat() string
	GetSecurity() Security
	GetAction() Action
}

type WebhookContext

type WebhookContext struct {
	Name   string
	Format string
}

Jump to

Keyboard shortcuts

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