$30 GRAYBYTE WORDPRESS FILE MANAGER $97

SERVER : in-mum-web1330.main-hosting.eu #1 SMP Mon Feb 10 22:45:17 UTC 2025
SERVER IP : 147.79.69.146 | ADMIN IP 216.73.216.215
OPTIONS : CRL = ON | WGT = ON | SDO = OFF | PKEX = OFF
DEACTIVATED : NONE

/opt/go/pkg/mod/github.com/go-openapi/runtime@v0.26.0/

HOME
Current File : /opt/go/pkg/mod/github.com/go-openapi/runtime@v0.26.0//client_request.go
// Copyright 2015 go-swagger maintainers
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//    http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

package runtime

import (
	"io"
	"net/http"
	"net/url"
	"time"

	"github.com/go-openapi/strfmt"
)

// ClientRequestWriterFunc converts a function to a request writer interface
type ClientRequestWriterFunc func(ClientRequest, strfmt.Registry) error

// WriteToRequest adds data to the request
func (fn ClientRequestWriterFunc) WriteToRequest(req ClientRequest, reg strfmt.Registry) error {
	return fn(req, reg)
}

// ClientRequestWriter is an interface for things that know how to write to a request
type ClientRequestWriter interface {
	WriteToRequest(ClientRequest, strfmt.Registry) error
}

// ClientRequest is an interface for things that know how to
// add information to a swagger client request
type ClientRequest interface {
	SetHeaderParam(string, ...string) error

	GetHeaderParams() http.Header

	SetQueryParam(string, ...string) error

	SetFormParam(string, ...string) error

	SetPathParam(string, string) error

	GetQueryParams() url.Values

	SetFileParam(string, ...NamedReadCloser) error

	SetBodyParam(interface{}) error

	SetTimeout(time.Duration) error

	GetMethod() string

	GetPath() string

	GetBody() []byte

	GetBodyParam() interface{}

	GetFileParam() map[string][]NamedReadCloser
}

// NamedReadCloser represents a named ReadCloser interface
type NamedReadCloser interface {
	io.ReadCloser
	Name() string
}

// NamedReader creates a NamedReadCloser for use as file upload
func NamedReader(name string, rdr io.Reader) NamedReadCloser {
	rc, ok := rdr.(io.ReadCloser)
	if !ok {
		rc = io.NopCloser(rdr)
	}
	return &namedReadCloser{
		name: name,
		cr:   rc,
	}
}

type namedReadCloser struct {
	name string
	cr   io.ReadCloser
}

func (n *namedReadCloser) Close() error {
	return n.cr.Close()
}
func (n *namedReadCloser) Read(p []byte) (int, error) {
	return n.cr.Read(p)
}
func (n *namedReadCloser) Name() string {
	return n.name
}

type TestClientRequest struct {
	Headers http.Header
	Body    interface{}
}

func (t *TestClientRequest) SetHeaderParam(name string, values ...string) error {
	if t.Headers == nil {
		t.Headers = make(http.Header)
	}
	t.Headers.Set(name, values[0])
	return nil
}

func (t *TestClientRequest) SetQueryParam(_ string, _ ...string) error { return nil }

func (t *TestClientRequest) SetFormParam(_ string, _ ...string) error { return nil }

func (t *TestClientRequest) SetPathParam(_ string, _ string) error { return nil }

func (t *TestClientRequest) SetFileParam(_ string, _ ...NamedReadCloser) error { return nil }

func (t *TestClientRequest) SetBodyParam(body interface{}) error {
	t.Body = body
	return nil
}

func (t *TestClientRequest) SetTimeout(time.Duration) error {
	return nil
}

func (t *TestClientRequest) GetQueryParams() url.Values { return nil }

func (t *TestClientRequest) GetMethod() string { return "" }

func (t *TestClientRequest) GetPath() string { return "" }

func (t *TestClientRequest) GetBody() []byte { return nil }

func (t *TestClientRequest) GetBodyParam() interface{} {
	return t.Body
}

func (t *TestClientRequest) GetFileParam() map[string][]NamedReadCloser {
	return nil
}

func (t *TestClientRequest) GetHeaderParams() http.Header {
	return t.Headers
}

Current_dir [ NOT WRITEABLE ] Document_root [ WRITEABLE ]


[ Back ]
NAME
SIZE
LAST TOUCH
USER
CAN-I?
FUNCTIONS
..
--
25 Jan 2024 4.43 PM
root / root
0755
.github
--
25 Jan 2024 4.43 PM
root / root
0555
client
--
25 Jan 2024 4.43 PM
root / root
0555
fixtures
--
25 Jan 2024 4.43 PM
root / root
0555
flagext
--
25 Jan 2024 4.43 PM
root / root
0555
hack
--
25 Jan 2024 4.43 PM
root / root
0555
internal
--
25 Jan 2024 4.43 PM
root / root
0555
logger
--
25 Jan 2024 4.43 PM
root / root
0555
middleware
--
25 Jan 2024 4.43 PM
root / root
0555
security
--
25 Jan 2024 4.43 PM
root / root
0555
yamlpc
--
25 Jan 2024 4.43 PM
root / root
0555
.editorconfig
0.526 KB
25 Jan 2024 4.43 PM
root / root
0444
.gitattributes
0.017 KB
25 Jan 2024 4.43 PM
root / root
0444
.gitignore
0.047 KB
25 Jan 2024 4.43 PM
root / root
0444
.golangci.yml
0.699 KB
25 Jan 2024 4.43 PM
root / root
0444
CODE_OF_CONDUCT.md
3.157 KB
25 Jan 2024 4.43 PM
root / root
0444
LICENSE
11.092 KB
25 Jan 2024 4.43 PM
root / root
0444
README.md
0.705 KB
25 Jan 2024 4.43 PM
root / root
0444
authinfo_test.go
1.071 KB
25 Jan 2024 4.43 PM
root / root
0444
bytestream.go
4.137 KB
25 Jan 2024 4.43 PM
root / root
0444
bytestream_test.go
6.246 KB
25 Jan 2024 4.43 PM
root / root
0444
client_auth_info.go
1.16 KB
25 Jan 2024 4.43 PM
root / root
0444
client_operation.go
1.366 KB
25 Jan 2024 4.43 PM
root / root
0444
client_request.go
3.655 KB
25 Jan 2024 4.43 PM
root / root
0444
client_request_test.go
1.113 KB
25 Jan 2024 4.43 PM
root / root
0444
client_response.go
3.201 KB
25 Jan 2024 4.43 PM
root / root
0444
client_response_test.go
2.477 KB
25 Jan 2024 4.43 PM
root / root
0444
constants.go
1.664 KB
25 Jan 2024 4.43 PM
root / root
0444
csv.go
1.865 KB
25 Jan 2024 4.43 PM
root / root
0444
csv_test.go
1.764 KB
25 Jan 2024 4.43 PM
root / root
0444
discard.go
0.329 KB
25 Jan 2024 4.43 PM
root / root
0444
file.go
0.659 KB
25 Jan 2024 4.43 PM
root / root
0444
file_test.go
0.584 KB
25 Jan 2024 4.43 PM
root / root
0444
go.mod
1.254 KB
25 Jan 2024 4.43 PM
root / root
0444
go.sum
19.355 KB
25 Jan 2024 4.43 PM
root / root
0444
headers.go
1.114 KB
25 Jan 2024 4.43 PM
root / root
0444
headers_test.go
2.018 KB
25 Jan 2024 4.43 PM
root / root
0444
interfaces.go
3.99 KB
25 Jan 2024 4.43 PM
root / root
0444
json.go
1.117 KB
25 Jan 2024 4.43 PM
root / root
0444
json_test.go
1.471 KB
25 Jan 2024 4.43 PM
root / root
0444
request.go
3.33 KB
25 Jan 2024 4.43 PM
root / root
0444
request_test.go
5.06 KB
25 Jan 2024 4.43 PM
root / root
0444
statuses.go
2.515 KB
25 Jan 2024 4.43 PM
root / root
0444
text.go
2.821 KB
25 Jan 2024 4.43 PM
root / root
0444
text_test.go
4.952 KB
25 Jan 2024 4.43 PM
root / root
0444
values.go
0.483 KB
25 Jan 2024 4.43 PM
root / root
0444
values_test.go
0.596 KB
25 Jan 2024 4.43 PM
root / root
0444
xml.go
1.038 KB
25 Jan 2024 4.43 PM
root / root
0444
xml_test.go
1.438 KB
25 Jan 2024 4.43 PM
root / root
0444

GRAYBYTE WORDPRESS FILE MANAGER @ 2026 CONTACT ME
Static GIF