webFramework

package
v0.9.41 Latest Latest
Warning

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

Go to latest
Published: Jan 7, 2024 License: GPL-3.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FieldParser added in v0.7.1

type FieldParser interface {
	Parse(string) string
}

type HeaderInterface added in v0.8.4

type HeaderInterface interface {
	GetId() string
	GetUser() string
	GetBranch() string
	GetBank() string
	GetPerson() string
	GetProgram() string
	GetModule() string
	GetMethod() string
	SetUser(string)
	SetBranch(string)
	SetBank(string)
	SetPerson(string)
	SetProgram(string)
	SetModule(string)
	SetMethod(string)
}

type RecordData added in v0.7.1

type RecordData interface {
	GetId() string
	GetControlId(string) string
	GetIdList() []any
	SetId(string)
	SetValue(string)
	GetSubCategory() string
	GetValue() any
	GetValueMap() map[string]string
}

type RequestHandler

type RequestHandler interface {
	Respond(code, status int, message string, data any, abort bool)
	HandleErrorState(err error, status int, message string, data any)
}

type RequestParser

type RequestParser interface {
	GetMethod() string
	GetPath() string
	GetHeader(target HeaderInterface) error
	GetHeaderValue(name string) string
	GetHttpHeader() http.Header
	GetBody(target any) error
	GetUri(target any) error
	GetUrlQuery(target any) error
	GetRawUrlQuery() string
	GetLocal(name string) any
	GetLocalString(name string) string
	GetUrlParam(name string) string
	GetUrlParams() map[string]string
	CheckUrlParam(name string) (string, bool)
	SetLocal(name string, value any)
	SetReqHeader(name string, value string)
	GetArgs(args ...any) map[string]string
	ParseCommand(command, title string, request RecordData, parser FieldParser) string
	SendJSONRespBody(status int, resp any) error
	Next() error
	Abort() error
}

type WebFramework

type WebFramework struct {
	Ctx context.Context
	//Handler response.ResponseHandler
	Parser RequestParser
}

Jump to

Keyboard shortcuts

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