Documentation
¶
Index ¶
- Constants
- Variables
- type AuthType
- type BodyString
- type HttpClientCtx
- func (ctx HttpClientCtx) Delete(authType AuthType, url string, reqBody, resp interface{}) error
- func (ctx HttpClientCtx) Get(authType AuthType, url string, body interface{}, target interface{}) error
- func (ctx HttpClientCtx) GetBlobStream(url string) (io.ReadCloser, int64, error)
- func (ctx HttpClientCtx) GetStream(authType AuthType, url string) (io.ReadCloser, error)
- func (ctx HttpClientCtx) Post(authType AuthType, url string, reqBody, resp interface{}) error
- func (ctx HttpClientCtx) Put(authType AuthType, url string, reqBody, resp interface{}) error
- func (ctx HttpClientCtx) PutBlobStream(url string, reader io.Reader, maxRequestSize int64) (err error)
- func (ctx HttpClientCtx) PutRootBlobStream(url string, gen, maxRequestSize int64, reader io.Reader) (newGeneration int64, err error)
- func (ctx HttpClientCtx) PutStream(authType AuthType, url string, reqBody io.Reader) error
- func (ctx HttpClientCtx) Request(authType AuthType, verb, url string, body io.Reader) (*http.Response, error)
Constants ¶
View Source
const (
EmptyBody string = ""
)
View Source
const HeaderContentLengthRange = "x-goog-content-length-range"
View Source
const HeaderContentMD5 = "Content-MD5"
View Source
const HeaderGeneration = "x-goog-generation"
those headers are case sensitive
View Source
const HeaderGenerationIfMatch = "x-goog-if-generation-match"
Variables ¶
View Source
var ErrConflict = errors.New("409 Conflict")
View Source
var ErrNotFound = errors.New("not found")
View Source
var ErrWrongGeneration = errors.New("wrong generation")
View Source
var RmapiUserAGent = "rmapi"
Functions ¶
This section is empty.
Types ¶
type BodyString ¶
type BodyString struct {
Content string
}
type HttpClientCtx ¶
type HttpClientCtx struct { Client *http.Client Tokens model.AuthTokens }
func CreateHttpClientCtx ¶
func CreateHttpClientCtx(tokens model.AuthTokens) HttpClientCtx
func (HttpClientCtx) Delete ¶
func (ctx HttpClientCtx) Delete(authType AuthType, url string, reqBody, resp interface{}) error
func (HttpClientCtx) Get ¶
func (ctx HttpClientCtx) Get(authType AuthType, url string, body interface{}, target interface{}) error
func (HttpClientCtx) GetBlobStream ¶ added in v0.0.16
func (ctx HttpClientCtx) GetBlobStream(url string) (io.ReadCloser, int64, error)
func (HttpClientCtx) GetStream ¶
func (ctx HttpClientCtx) GetStream(authType AuthType, url string) (io.ReadCloser, error)
func (HttpClientCtx) Post ¶
func (ctx HttpClientCtx) Post(authType AuthType, url string, reqBody, resp interface{}) error
func (HttpClientCtx) Put ¶
func (ctx HttpClientCtx) Put(authType AuthType, url string, reqBody, resp interface{}) error
func (HttpClientCtx) PutBlobStream ¶ added in v0.0.16
func (HttpClientCtx) PutRootBlobStream ¶ added in v0.0.22
Click to show internal directories.
Click to hide internal directories.