api

package
v0.0.0-...-712f093 Latest Latest
Warning

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

Go to latest
Published: Aug 11, 2015 License: GPL-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var UserAgent = "Golang h2object/api package"

Functions

This section is empty.

Types

type Auth

type Auth interface {
	rpc.PreRequest
}

func NewAdminAuth

func NewAdminAuth(appid, secret string) Auth

type Client

type Client struct {
	sync.RWMutex
	// contains filtered or unexported fields
}

func NewClient

func NewClient(host string, port int) *Client

func (*Client) Delete

func (h2o *Client) Delete(l Logger, auth Auth, dest_uri string) error

func (*Client) Download

func (h2o *Client) Download(l Logger, auth Auth, dest_uri string) (io.ReadCloser, int64, error)

func (*Client) GetConfig

func (h2o *Client) GetConfig(l Logger, auth Auth, section string, ret interface{}) error

func (*Client) SetConfig

func (h2o *Client) SetConfig(l Logger, auth Auth, section string, ret interface{}) error

func (*Client) Upload

func (h2o *Client) Upload(l Logger, auth Auth, dest_uri string, contentType string, rd io.Reader, sz int64) error

func (*Client) UploadFile

func (h2o *Client) UploadFile(l Logger, auth Auth, dest_uri string, file string) error

type HeaderAuth

type HeaderAuth struct {
	// contains filtered or unexported fields
}

func NewHeaderAuth

func NewHeaderAuth() *HeaderAuth

func (*HeaderAuth) Add

func (hds *HeaderAuth) Add(key, value string)

func (*HeaderAuth) Del

func (hds *HeaderAuth) Del(key string)

func (*HeaderAuth) Do

func (hds *HeaderAuth) Do(req *http.Request) *http.Request

func (*HeaderAuth) Set

func (hds *HeaderAuth) Set(key, value string)

type Logger

type Logger interface {
	rpc.Logger
	Trace(format string, args ...interface{})
	Debug(format string, args ...interface{})
	Info(format string, args ...interface{})
	Warn(format string, args ...interface{})
	Error(format string, args ...interface{})
	Critical(format string, args ...interface{})
}

Jump to

Keyboard shortcuts

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