vimages

package module
v0.0.0-...-ea975e6 Latest Latest
Warning

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

Go to latest
Published: Jan 14, 2016 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Payload

type Payload interface {
}

type PayloadFail

type PayloadFail struct {
	Code int    `json:"error_code"`
	Msg  string `json:"error_message"`
}

type Request

type Request struct {
	Username string
	Hashword string
	Method   string
	Path     string
	URL      string
	Checksum string
	Header   map[string][]string
	// contains filtered or unexported fields
}

func (*Request) Empty

func (r *Request) Empty() bool

func (*Request) GetHeader

func (r *Request) GetHeader(header string) string

func (*Request) GetParam

func (r *Request) GetParam(param string) string

type Response

type Response struct {
	Fail     bool
	Response Payload
	Delete   []string
	Send     string
}

func NewResponseFail

func NewResponseFail(code int, msg string) *Response

type Vimages

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

func New

func New(path string, users *privileges.Privileges) (*Vimages, error)

func (*Vimages) Do

func (v *Vimages) Do(request *Request) *Response

func (*Vimages) Restore

func (v *Vimages) Restore(snapshot []byte) error

func (*Vimages) Snapshot

func (v *Vimages) Snapshot() ([]byte, error)

Jump to

Keyboard shortcuts

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