Documentation
¶
Index ¶
Constants ¶
View Source
const ChallengeResponseFormat = `{"challenge":"%s"}`
View Source
const ResponseFormat = `{"codemsg":"%s"}`
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type OapiHeader ¶
type OapiHeader struct {
// contains filtered or unexported fields
}
func NewOapiHeader ¶
func NewOapiHeader(m map[string][]string) *OapiHeader
func (OapiHeader) GetFirstValue ¶ added in v1.1.12
func (h OapiHeader) GetFirstValue(name string) string
func (OapiHeader) GetMultiValues ¶
func (h OapiHeader) GetMultiValues(name string) []string
func (OapiHeader) GetNames ¶
func (h OapiHeader) GetNames() []string
type OapiRequest ¶
type OapiRequest struct { Ctx context.Context Uri string Header *OapiHeader Body string }
func ToOapiRequest ¶
func ToOapiRequest(request *http.Request) (*OapiRequest, error)
type OapiResponse ¶
type OapiResponse struct { StatusCode int ContentType string Header map[string][]string Body string }
func NewOapiResponseOfErr ¶
func NewOapiResponseOfErr(err error) *OapiResponse
func (*OapiResponse) Write ¶
func (r *OapiResponse) Write(statusCode int, contentType string, body string)
func (OapiResponse) WriteTo ¶
func (r OapiResponse) WriteTo(response http.ResponseWriter) error
Click to show internal directories.
Click to hide internal directories.