builder_params.go 743 B

1234567891011121314151617181920212223242526
  1. package gateway
  2. type builderParams struct {
  3. httpMethod string
  4. relativePath string
  5. requestItems []*builderRequestItem
  6. globalRequestCallbackFunc GlobalRequestCallbackFunc
  7. }
  8. func newBuilderParams() *builderParams {
  9. return &builderParams{
  10. httpMethod: "",
  11. relativePath: "",
  12. requestItems: make([]*builderRequestItem, 0),
  13. globalRequestCallbackFunc: nil,
  14. }
  15. }
  16. func (params *builderParams) copy() *builderParams {
  17. return &builderParams{
  18. httpMethod: params.httpMethod,
  19. relativePath: params.relativePath,
  20. requestItems: params.requestItems,
  21. globalRequestCallbackFunc: params.globalRequestCallbackFunc,
  22. }
  23. }