Documentation ¶
Index ¶
- type EventData
- type HeaderInterface
- type LogData
- type LoggerInterface
- type Request
- func GetEmptyRequest(ctx webFramework.WebFramework) (int, string, []response.ErrorResponse, Request, error)
- func GetRequest[Q any](ctx webFramework.WebFramework, isJson bool) (int, string, []response.ErrorResponse, Q, Request, error)
- func Req[Req any, Header HeaderInterface](ctx webFramework.WebFramework, isJson bool) (int, string, []response.ErrorResponse, Req, Request, error)
- type RequestHeader
- func (r RequestHeader) GetId() string
- func (r RequestHeader) GetMethod() string
- func (r RequestHeader) GetModule() string
- func (r RequestHeader) GetProgram() string
- func (r RequestHeader) GetUser() string
- func (r *RequestHeader) SetMethod(method string)
- func (r *RequestHeader) SetModule(module string)
- func (r *RequestHeader) SetProgram(program string)
- func (r *RequestHeader) SetUser(user string)
- type RequestInterface
- type RequestModel
- func (m RequestModel) AddLogEvent(method, log string, req *Request)
- func (m RequestModel) AddRequestEvent(w webFramework.WebFramework, branch, method, log string, req *Request)
- func (m RequestModel) AddRequestLog(method, log string, req *Request)
- func (m RequestModel) CheckDuplicateRequest(request Request) error
- func (m RequestModel) Initialize(c webFramework.WebFramework, method, url string, req *Request, args ...any) (int, map[string]string, error)
- func (m RequestModel) InitializeNoLog(c webFramework.WebFramework, method, url string, req *Request, args ...any) (int, map[string]string, error)
- func (m RequestModel) InsertRequest(request Request) error
- func (m RequestModel) LogEnd(method, log string, r *Request)
- func (m RequestModel) LogStart(w webFramework.WebFramework, method, log string) *Request
- func (m RequestModel) UpdateRequest(request Request) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type HeaderInterface ¶ added in v0.2.0
type LoggerInterface ¶ added in v0.3.0
type Request ¶
type Request struct { Header HeaderInterface `json:"header"` Id string `json:"id"` RequestId string `json:"request_id"` Time time.Time `json:"dt"` Incoming any `json:"incoming"` NationalId string `json:"national_id"` UrlPath string `json:"url_path"` ServiceId string `json:"service_id"` ActionId string `json:"action_id"` BankId string `json:"bank_id"` BranchId string `json:"branch_id"` PersonId string `json:"person_id"` UserId string `json:"user_id"` Req string `json:"req"` Resp string `json:"resp"` Outgoing any `json:"outgoing"` Result string `json:"result"` Events []EventData `json:"events"` }
func GetEmptyRequest ¶
func GetEmptyRequest(ctx webFramework.WebFramework) (int, string, []response.ErrorResponse, Request, error)
func GetRequest ¶
func GetRequest[Q any](ctx webFramework.WebFramework, isJson bool) (int, string, []response.ErrorResponse, Q, Request, error)
func Req ¶ added in v0.2.0
func Req[Req any, Header HeaderInterface](ctx webFramework.WebFramework, isJson bool) (int, string, []response.ErrorResponse, Req, Request, error)
type RequestHeader ¶
type RequestHeader struct { RequestId string `header:"Request-Id" reqHeader:"Request-Id" validate:"required,min=10,max=64"` Program string `header:"Program-Id" reqHeader:"Program-Id"` Module string `header:"Module-Id" reqHeader:"Module-Id"` Method string `header:"Method-Id" reqHeader:"Method-Id"` User string `header:"User-Id" reqHeader:"User-Id"` Branch string `header:"Branch-Id" reqHeader:"Branch-Id"` Person string `header:"Person-Id" reqHeader:"Person-Id"` }
func (RequestHeader) GetId ¶ added in v0.2.0
func (r RequestHeader) GetId() string
func (RequestHeader) GetMethod ¶ added in v0.2.0
func (r RequestHeader) GetMethod() string
func (RequestHeader) GetModule ¶ added in v0.2.0
func (r RequestHeader) GetModule() string
func (RequestHeader) GetProgram ¶ added in v0.2.0
func (r RequestHeader) GetProgram() string
func (RequestHeader) GetUser ¶ added in v0.2.0
func (r RequestHeader) GetUser() string
func (*RequestHeader) SetMethod ¶ added in v0.2.0
func (r *RequestHeader) SetMethod(method string)
func (*RequestHeader) SetModule ¶ added in v0.2.0
func (r *RequestHeader) SetModule(module string)
func (*RequestHeader) SetProgram ¶ added in v0.2.0
func (r *RequestHeader) SetProgram(program string)
func (*RequestHeader) SetUser ¶ added in v0.2.0
func (r *RequestHeader) SetUser(user string)
type RequestInterface ¶
type RequestInterface interface { Initialize(c webFramework.WebFramework, method, url string, req *Request, args ...any) (int, map[string]string, error) InitializeNoLog(c webFramework.WebFramework, method, url string, req *Request, args ...any) (int, map[string]string, error) AddRequestLog(method, log string, req *Request) LogEnd(method, log string, req *Request) AddRequestEvent(c webFramework.WebFramework, branch, method, log string, req *Request) LogStart(c webFramework.WebFramework, method, log string) *Request InsertRequest(request Request) error CheckDuplicateRequest(request Request) error UpdateRequest(request Request) error }
type RequestModel ¶
type RequestModel struct { QueryInterface libQuery.QueryRunnerInterface InsertInDb string UpdateInDb string QueryInDb string }
func (RequestModel) AddLogEvent ¶
func (m RequestModel) AddLogEvent(method, log string, req *Request)
func (RequestModel) AddRequestEvent ¶
func (m RequestModel) AddRequestEvent(w webFramework.WebFramework, branch, method, log string, req *Request)
func (RequestModel) AddRequestLog ¶
func (m RequestModel) AddRequestLog(method, log string, req *Request)
func (RequestModel) CheckDuplicateRequest ¶
func (m RequestModel) CheckDuplicateRequest(request Request) error
func (RequestModel) Initialize ¶
func (m RequestModel) Initialize(c webFramework.WebFramework, method, url string, req *Request, args ...any) (int, map[string]string, error)
func (RequestModel) InitializeNoLog ¶
func (m RequestModel) InitializeNoLog(c webFramework.WebFramework, method, url string, req *Request, args ...any) (int, map[string]string, error)
func (RequestModel) InsertRequest ¶
func (m RequestModel) InsertRequest(request Request) error
func (RequestModel) LogEnd ¶
func (m RequestModel) LogEnd(method, log string, r *Request)
func (RequestModel) LogStart ¶
func (m RequestModel) LogStart(w webFramework.WebFramework, method, log string) *Request
func (RequestModel) UpdateRequest ¶
func (m RequestModel) UpdateRequest(request Request) error
Click to show internal directories.
Click to hide internal directories.