message

package
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 9, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Message

type Message struct {
	Headers        map[string]string
	MessagePayload string
}

type RequestMessage

type RequestMessage struct {
	Message
	Method      string
	Url         string
	Path        string
	QueryParams map[string][]string
}

func Delete

func Delete(pathElements ...string) *RequestMessage

func Get

func Get(pathElements ...string) *RequestMessage
func Head(pathElements ...string) *RequestMessage

func Options

func Options(pathElements ...string) *RequestMessage

func Patch

func Patch(pathElements ...string) *RequestMessage

func Post

func Post(pathElements ...string) *RequestMessage

func Put

func Put(pathElements ...string) *RequestMessage

func Trace

func Trace(pathElements ...string) *RequestMessage

func (*RequestMessage) Authorization

func (request *RequestMessage) Authorization(value string) *RequestMessage

func (*RequestMessage) BaseUrl

func (request *RequestMessage) BaseUrl(baseUrl string) *RequestMessage

BaseUrl - While this should normally be configured only on the HTTP client, this is also allowed on the message so that a client can send a request to different targets. When used on a message passed to an HTTP server, it will do nothing.

func (*RequestMessage) Clone

func (request *RequestMessage) Clone() *RequestMessage

func (*RequestMessage) ContentType

func (request *RequestMessage) ContentType(value string) *RequestMessage

func (*RequestMessage) Equals

func (request *RequestMessage) Equals(other *RequestMessage) bool

func (*RequestMessage) Header

func (request *RequestMessage) Header(key string, value string) *RequestMessage

func (*RequestMessage) Payload

func (request *RequestMessage) Payload(payload string) *RequestMessage

func (*RequestMessage) QueryParam

func (request *RequestMessage) QueryParam(key string, values ...string) *RequestMessage

func (*RequestMessage) ToString

func (request *RequestMessage) ToString() string

type ResponseMessage

type ResponseMessage struct {
	Message
	StatusCode int
}

func Response

func Response(statusCode int) *ResponseMessage

func (*ResponseMessage) Clone

func (response *ResponseMessage) Clone() *ResponseMessage

func (*ResponseMessage) ContentType

func (response *ResponseMessage) ContentType(value string) *ResponseMessage

func (*ResponseMessage) ETag

func (response *ResponseMessage) ETag(value string) *ResponseMessage

func (*ResponseMessage) Equals

func (response *ResponseMessage) Equals(other *ResponseMessage) bool

func (*ResponseMessage) Header

func (response *ResponseMessage) Header(key string, value string) *ResponseMessage

func (*ResponseMessage) Payload

func (response *ResponseMessage) Payload(payload string) *ResponseMessage

func (*ResponseMessage) ToString

func (response *ResponseMessage) ToString() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL