dvmeta

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: May 16, 2020 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DvAction

type DvAction struct {
	Name        string            `json:"name"`
	Typ         string            `json:"type"`
	Url         string            `json:"url"`
	Method      string            `json:"method"`
	QueryParams map[string]string `json:"query"`
	Body        string            `json:"body"`
	Result      string            `json:"result"`
}

type HandlerFunc

type HandlerFunc func(request *RequestContext) bool

type MaskInfo

type MaskInfo struct {
	FixedStart        string
	FixedEnd          string
	Middle            []*MaskInfoPart
	IsNegative        bool
	IsCaseInsensitive int
}

type MaskInfoPart

type MaskInfoPart struct {
	Min       int
	Max       int
	Kind      MaskKind
	Regex     *regexp.Regexp
	Data      string
	Condition string
}

type MaskKind

type MaskKind int
const (
	MaskWord MaskKind = iota
	MaskSlashAware
	MaskSlashUnaware
	MaskRegExp
	MaskCondition
)

type MicroCoreHeaderAttribute

type MicroCoreHeaderAttribute struct {
	Kind  int
	Imap  map[string]int
	List  []string
	Plain string
}

type MicroCoreInfo

type MicroCoreInfo struct {
	sync.RWMutex
	Client                    *http.Client
	BaseFolderUsed            bool
	ExtraServerFile           bool
	ExtraServerHttp           bool
	BaseFolderUrl             string
	ExtraServerUrl            string
	ExtraServerSettings       ServerSettings
	ProxyName                 string
	HeadersStatic             map[string][]string
	HeadersExtraServer        map[string][]string
	HeadersStaticOptions      map[string][]string
	HeadersExtraServerOptions map[string][]string
	HeadersSpecial            map[string]MicroCoreHeaderAttribute
	HeadersSpecialOptions     map[string]MicroCoreHeaderAttribute
	HeadersSpecialStatic      map[string]MicroCoreHeaderAttribute
	DirectoryIndex            []string
	BaseRewrite               RewriteMap
	BaseProcessorBlocks       []ProcessorBlock
	BaseProviderBlocks        []ProcessorBlock
	PostProcessorBlocks       []ProcessorBlock
	HostHeader                string
	ServerRewrite             RewriteMap
	ModuleHandler             HandlerFunc
	ActionHandler             HandlerFunc
}

type ProcessorBlock

type ProcessorBlock struct {
	Name            string
	EndPointHandler ProcessorEndPointHandler
	Urls            []*MaskInfo
	Data            map[string]string
}

type ProcessorEndPointHandler

type ProcessorEndPointHandler func(request *RequestContext) bool

type RequestContext

type RequestContext struct {
	Extra           map[string]interface{}
	ExtraAsDvObject *dvevaluation.DvObject
	Params          map[string]string
	UrlInlineParams map[string]string
	Url             string
	Urls            []string
	UrlsLowerCase   []string
	FileName        string
	DataType        string
	Writer          http.ResponseWriter
	Reader          *http.Request
	Server          *MicroCoreInfo
	Output          []byte
	Error           error
	Action          *DvAction
	StatusCode      int
}

func (*RequestContext) SetError

func (ctx *RequestContext) SetError(err error)

func (*RequestContext) SetErrorMessage

func (ctx *RequestContext) SetErrorMessage(message string)

func (*RequestContext) SetHttpErrorCode

func (ctx *RequestContext) SetHttpErrorCode(errorCode int, message string)

type RewriteMap

type RewriteMap map[string][]*RewriteMapItem

type RewriteMapItem

type RewriteMapItem struct {
	Url    string
	UrlLen int
	Full   bool
	Src    string
}

type ServerSettings

type ServerSettings struct {
	MaxIdleConns          int  `json:"maxIdleConnections"`
	IdleConnTimeout       int  `json:"idleConnectionTimeout"`
	DisableCompression    bool `json:"disableCompression"`
	DisableKeepAlives     bool `json:"disableKeepAlives"`
	MaxIdleConnsPerHost   int  `json:"maxIdleConnectionsPerHost"`
	ResponseHeaderTimeout int  `json:"responseHeaderTimeout"`
	ExpectContinueTimeout int  `json:"expectContinueTimeout"`
}

Jump to

Keyboard shortcuts

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