Documentation ¶
Index ¶
- Constants
- Variables
- func Apply(url, data, placeholder string, config PlaceholderConfig) (*http.Request, error)
- func RandomHex(n int) (string, error)
- type BadPlaceholderConfigError
- type GRPC
- type HTMLForm
- type HTMLMultipartForm
- type Header
- type JSONBody
- type JSONRequest
- type NonCRUDHeader
- type NonCRUDRequestBody
- type NonCrudUrlParam
- type NonCrudUrlPath
- type Placeholder
- type PlaceholderConfig
- type RawRequest
- type RawRequestConfig
- type RequestBody
- type SOAPBody
- type URLParam
- type URLPath
- type UnknownPlaceholderError
- type UserAgent
- type XMLBody
Constants ¶
View Source
const (
Seed = 5
)
View Source
const UAHeader = "User-Agent"
Variables ¶
View Source
var DefaultGRPC = GRPC{/* contains filtered or unexported fields */}
View Source
var DefaultHTMLForm = HTMLForm{/* contains filtered or unexported fields */}
View Source
var DefaultHTMLMultipartForm = HTMLMultipartForm{/* contains filtered or unexported fields */}
View Source
var DefaultHeader = Header{/* contains filtered or unexported fields */}
View Source
var DefaultJSONBody = JSONBody{/* contains filtered or unexported fields */}
View Source
var DefaultJSONRequest = JSONRequest{/* contains filtered or unexported fields */}
View Source
var DefaultNonCRUDHeader = NonCRUDHeader{/* contains filtered or unexported fields */}
View Source
var DefaultNonCRUDRequestBody = NonCRUDRequestBody{/* contains filtered or unexported fields */}
View Source
var DefaultNonCrudUrlParam = NonCrudUrlParam{/* contains filtered or unexported fields */}
View Source
var DefaultNonCrudUrlPath = NonCrudUrlPath{/* contains filtered or unexported fields */}
View Source
var DefaultRawRequest = RawRequest{/* contains filtered or unexported fields */}
View Source
var DefaultRequestBody = RequestBody{/* contains filtered or unexported fields */}
View Source
var DefaultSOAPBody = SOAPBody{/* contains filtered or unexported fields */}
View Source
var DefaultURLParam = URLParam{/* contains filtered or unexported fields */}
View Source
var DefaultURLPath = URLPath{/* contains filtered or unexported fields */}
View Source
var DefaultUserAgent = UserAgent{/* contains filtered or unexported fields */}
View Source
var DefaultXMLBody = XMLBody{/* contains filtered or unexported fields */}
View Source
var Placeholders map[string]Placeholder
Functions ¶
Types ¶
type BadPlaceholderConfigError ¶ added in v0.4.4
type BadPlaceholderConfigError struct {
// contains filtered or unexported fields
}
func (*BadPlaceholderConfigError) Error ¶ added in v0.4.4
func (e *BadPlaceholderConfigError) Error() string
func (*BadPlaceholderConfigError) Unwrap ¶ added in v0.4.4
func (e *BadPlaceholderConfigError) Unwrap() error
type GRPC ¶ added in v0.4.0
type GRPC struct {
// contains filtered or unexported fields
}
func (GRPC) CreateRequest ¶ added in v0.4.0
type HTMLForm ¶ added in v0.4.0
type HTMLForm struct {
// contains filtered or unexported fields
}
func (HTMLForm) CreateRequest ¶ added in v0.4.0
type HTMLMultipartForm ¶ added in v0.4.0
type HTMLMultipartForm struct {
// contains filtered or unexported fields
}
func (HTMLMultipartForm) CreateRequest ¶ added in v0.4.0
func (p HTMLMultipartForm) CreateRequest(requestURL, payload string, _ PlaceholderConfig) (*http.Request, error)
func (HTMLMultipartForm) GetName ¶ added in v0.4.0
func (p HTMLMultipartForm) GetName() string
type Header ¶
type Header struct {
// contains filtered or unexported fields
}
func (Header) CreateRequest ¶ added in v0.4.0
type JSONBody ¶
type JSONBody struct {
// contains filtered or unexported fields
}
func (JSONBody) CreateRequest ¶ added in v0.4.0
type JSONRequest ¶ added in v0.4.0
type JSONRequest struct {
// contains filtered or unexported fields
}
func (JSONRequest) CreateRequest ¶ added in v0.4.0
func (p JSONRequest) CreateRequest(requestURL, payload string, _ PlaceholderConfig) (*http.Request, error)
func (JSONRequest) GetName ¶ added in v0.4.0
func (p JSONRequest) GetName() string
type NonCRUDHeader ¶ added in v0.4.0
type NonCRUDHeader struct {
// contains filtered or unexported fields
}
func (NonCRUDHeader) CreateRequest ¶ added in v0.4.0
func (p NonCRUDHeader) CreateRequest(requestURL, payload string, _ PlaceholderConfig) (*http.Request, error)
func (NonCRUDHeader) GetName ¶ added in v0.4.0
func (p NonCRUDHeader) GetName() string
type NonCRUDRequestBody ¶ added in v0.4.0
type NonCRUDRequestBody struct {
// contains filtered or unexported fields
}
func (NonCRUDRequestBody) CreateRequest ¶ added in v0.4.0
func (p NonCRUDRequestBody) CreateRequest(requestURL, payload string, _ PlaceholderConfig) (*http.Request, error)
func (NonCRUDRequestBody) GetName ¶ added in v0.4.0
func (p NonCRUDRequestBody) GetName() string
type NonCrudUrlParam ¶ added in v0.4.0
type NonCrudUrlParam struct {
// contains filtered or unexported fields
}
func (NonCrudUrlParam) CreateRequest ¶ added in v0.4.0
func (p NonCrudUrlParam) CreateRequest(requestURL, payload string, _ PlaceholderConfig) (*http.Request, error)
func (NonCrudUrlParam) GetName ¶ added in v0.4.0
func (p NonCrudUrlParam) GetName() string
type NonCrudUrlPath ¶ added in v0.4.0
type NonCrudUrlPath struct {
// contains filtered or unexported fields
}
func (NonCrudUrlPath) CreateRequest ¶ added in v0.4.0
func (p NonCrudUrlPath) CreateRequest(requestURL, payload string, _ PlaceholderConfig) (*http.Request, error)
func (NonCrudUrlPath) GetName ¶ added in v0.4.0
func (p NonCrudUrlPath) GetName() string
type Placeholder ¶
type PlaceholderConfig ¶ added in v0.4.12
func GetPlaceholderConfig ¶ added in v0.4.4
func GetPlaceholderConfig(name string, conf any) (PlaceholderConfig, error)
type RawRequest ¶ added in v0.4.4
type RawRequest struct {
// contains filtered or unexported fields
}
func (RawRequest) CreateRequest ¶ added in v0.4.4
func (p RawRequest) CreateRequest(requestURL, payload string, config PlaceholderConfig) (*http.Request, error)
CreateRequest creates a new request from config. config must be a RawRequestConfig struct.
func (RawRequest) GetName ¶ added in v0.4.4
func (p RawRequest) GetName() string
type RawRequestConfig ¶ added in v0.4.4
func (*RawRequestConfig) Hash ¶ added in v0.4.12
func (r *RawRequestConfig) Hash() []byte
type RequestBody ¶
type RequestBody struct {
// contains filtered or unexported fields
}
func (RequestBody) CreateRequest ¶ added in v0.4.0
func (p RequestBody) CreateRequest(requestURL, payload string, _ PlaceholderConfig) (*http.Request, error)
func (RequestBody) GetName ¶ added in v0.4.0
func (p RequestBody) GetName() string
type SOAPBody ¶
type SOAPBody struct {
// contains filtered or unexported fields
}
func (SOAPBody) CreateRequest ¶ added in v0.4.0
type URLParam ¶
type URLParam struct {
// contains filtered or unexported fields
}
func (URLParam) CreateRequest ¶ added in v0.4.0
type URLPath ¶
type URLPath struct {
// contains filtered or unexported fields
}
func (URLPath) CreateRequest ¶ added in v0.4.0
type UnknownPlaceholderError ¶ added in v0.4.3
type UnknownPlaceholderError struct {
// contains filtered or unexported fields
}
func (*UnknownPlaceholderError) Error ¶ added in v0.4.3
func (e *UnknownPlaceholderError) Error() string
type UserAgent ¶ added in v0.4.3
type UserAgent struct {
// contains filtered or unexported fields
}
func (UserAgent) CreateRequest ¶ added in v0.4.3
type XMLBody ¶ added in v0.4.0
type XMLBody struct {
// contains filtered or unexported fields
}
func (XMLBody) CreateRequest ¶ added in v0.4.0
Source Files ¶
Click to show internal directories.
Click to hide internal directories.