Documentation ¶
Index ¶
- Constants
- func Do(t *testing.T, req *http.Request) *http.Response
- func GetContentData(content *pb.Content, desiredContentType string) ([]byte, error)
- func ReadResponse(t *testing.T, w io.Reader, contentType string, data interface{})
- func Unmarshal(code int, input io.Reader, v protoreflect.ProtoMessage) error
- func UnmarshalError(data []byte) error
- func UnmarshalJson(code int, input io.Reader, v any) error
- type Decoder
- type RequestBuilder
- func (c *RequestBuilder) Accept(accept string) *RequestBuilder
- func (c *RequestBuilder) AddContentQuery(content string) *RequestBuilder
- func (c *RequestBuilder) AddQuery(key string, value ...string) *RequestBuilder
- func (c *RequestBuilder) AuthToken(token string) *RequestBuilder
- func (c *RequestBuilder) Build(ctx context.Context, t *testing.T) *http.Request
- func (c *RequestBuilder) ContentType(contentType string) *RequestBuilder
- func (c *RequestBuilder) DeviceId(deviceID string) *RequestBuilder
- func (c *RequestBuilder) ID(id string) *RequestBuilder
- func (c *RequestBuilder) IDFilter(idFilter []string) *RequestBuilder
- func (c *RequestBuilder) ResourceHref(resourceHref string) *RequestBuilder
- func (c *RequestBuilder) SetQuery(value string) *RequestBuilder
- func (c *RequestBuilder) SubscriptionID(subscriptionID string) *RequestBuilder
- func (c *RequestBuilder) Version(version string) *RequestBuilder
Constants ¶
View Source
const ( HTTPS_SCHEME = "https://" IDKey = "id" IDFilterKey = "idFilter" DeviceIDKey = "deviceID" ResourceHrefKey = "resourceHref" SubscriptionIDKey = "subscriptionID" ConfigurationIDKey = "configurationId" VersionKey = "version" ContentQueryKey = "content" )
Variables ¶
This section is empty.
Functions ¶
func GetContentData ¶ added in v2.19.1
func ReadResponse ¶ added in v2.19.1
func Unmarshal ¶ added in v2.19.1
func Unmarshal(code int, input io.Reader, v protoreflect.ProtoMessage) error
func UnmarshalError ¶ added in v2.19.1
Types ¶
type RequestBuilder ¶ added in v2.19.1
type RequestBuilder struct {
// contains filtered or unexported fields
}
func NewRequest ¶ added in v2.19.1
func NewRequest(method, url string, body io.Reader) *RequestBuilder
func (*RequestBuilder) Accept ¶ added in v2.19.1
func (c *RequestBuilder) Accept(accept string) *RequestBuilder
func (*RequestBuilder) AddContentQuery ¶ added in v2.19.1
func (c *RequestBuilder) AddContentQuery(content string) *RequestBuilder
func (*RequestBuilder) AddQuery ¶ added in v2.19.1
func (c *RequestBuilder) AddQuery(key string, value ...string) *RequestBuilder
func (*RequestBuilder) AuthToken ¶ added in v2.19.1
func (c *RequestBuilder) AuthToken(token string) *RequestBuilder
func (*RequestBuilder) ContentType ¶ added in v2.19.1
func (c *RequestBuilder) ContentType(contentType string) *RequestBuilder
func (*RequestBuilder) DeviceId ¶ added in v2.19.1
func (c *RequestBuilder) DeviceId(deviceID string) *RequestBuilder
func (*RequestBuilder) ID ¶ added in v2.21.0
func (c *RequestBuilder) ID(id string) *RequestBuilder
func (*RequestBuilder) IDFilter ¶ added in v2.21.0
func (c *RequestBuilder) IDFilter(idFilter []string) *RequestBuilder
func (*RequestBuilder) ResourceHref ¶ added in v2.19.1
func (c *RequestBuilder) ResourceHref(resourceHref string) *RequestBuilder
func (*RequestBuilder) SetQuery ¶ added in v2.19.1
func (c *RequestBuilder) SetQuery(value string) *RequestBuilder
func (*RequestBuilder) SubscriptionID ¶ added in v2.19.1
func (c *RequestBuilder) SubscriptionID(subscriptionID string) *RequestBuilder
func (*RequestBuilder) Version ¶ added in v2.21.0
func (c *RequestBuilder) Version(version string) *RequestBuilder
Click to show internal directories.
Click to hide internal directories.