entity

package
v0.0.0-...-39374da Latest Latest
Warning

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

Go to latest
Published: Dec 19, 2019 License: MIT Imports: 7 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Body

type Body struct {
	ContentType string
	Body        io.ReadCloser
	ParseValue  url.Values
	Param       *value.Param
}

Body HTTP requestのbodyを提供します

func CreateBody

func CreateBody(ctype string, body io.ReadCloser, pvalue url.Values) *Body

CreateBody 新規でBodyを提供する

func (*Body) ChangeParam

func (b *Body) ChangeParam(key, value string)

ChangeParam Keyを元にBodyのvalueを変更します JSON形式の値を変更する場合は key1/key2/key3 のような形でスラッシュでkeyをわたしてください

func (*Body) Fetch

func (b *Body) Fetch() io.ReadCloser

Fetch Request内部のデータを*http.Requestに変換して取得します

type Header struct {
	http.Header
}

Header http.Headerのwrap

func CreateHeader

func CreateHeader(header http.Header) *Header

CreateHeader 新規でHeaderを返します

func (*Header) Fetch

func (h *Header) Fetch() http.Header

Fetch Request内部のデータを*http.Requestに変換して取得します

type URL

type URL struct {
	*url.URL
	Path     string
	Query    url.Values
	Fragment string
}

URL Core内部で利用するURLを定義している

func CreateURL

func CreateURL(u *url.URL) *URL

CreateURL URLをwrapします

func (*URL) AddQuery

func (u *URL) AddQuery(key, val string)

AddQuery urlのQuery を新規追加します

func (*URL) Fetch

func (u *URL) Fetch() *url.URL

Fetch Request内部のデータを*http.Requestに変換して取得します

func (*URL) SetQuery

func (u *URL) SetQuery(key, val string)

SetQuery urlのquery stringを追加する

Jump to

Keyboard shortcuts

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