app

package
v1.3.8 Latest Latest
Warning

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

Go to latest
Published: Apr 3, 2020 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Config struct {
	Port               int    `json:"port"`
	Port_Secure        int    `json:"port_secure"`
	Chunk_Size         int    `json:"chunk_size"`
	Cluster_Name       string `json:"cluster_name"`
	Iovarr_Size        int    `json:"iovarr_size"`
	Tenant_Name        string `json:"tenant_name"`
	Number_of_versions int    `json:"number_of_versions"`
	Debug              bool   `json:"debug"`
	No_Cleanup         bool   `json:"no_cleanup"`
	Need_MD5           bool   `json:"need_md5"`
	Region             string `json:"region"`
	Domain             string `json:"domain"`
}
View Source
var Routes map[string]Controller
View Source
var Supported map[string]bool

Functions

func Error

func Error(code string) error

func Read_Config

func Read_Config(home string)

func Register

func Register(method, resource string, handler Controller)

func Route_Request

func Route_Request(ctx *Context) error

func Set_Request_Id

func Set_Request_Id(ctx *Context) error

Types

type AWSError

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

func (AWSError) Error

func (e AWSError) Error() string

type CcowError

type CcowError interface {
	Errno() int
}

type Context

type Context struct {
	Cluster     string
	Tenant      string
	Method      string
	Bucket      string
	Object      string
	Subresource string
	Resource    string
	Query       map[string]string
	Headers     map[string]string
	Vhost       bool
	// contains filtered or unexported fields
}

func Parse_Request

func Parse_Request(req *http.Request, res http.ResponseWriter) *Context

func (*Context) Empty

func (ctx *Context) Empty(code int) error

func (*Context) Finalize

func (ctx *Context) Finalize(err error)

func (*Context) Read

func (ctx *Context) Read(chunk []byte) (int, error)

func (*Context) Set

func (ctx *Context) Set(key, val string)

func (*Context) Set_Uint

func (ctx *Context) Set_Uint(key string, val uint64)

func (*Context) Write

func (ctx *Context) Write(chunk []byte) error

func (*Context) XML

func (ctx *Context) XML(tag string, needns bool) *XML_Writer

type Controller

type Controller func(*Context) error

type XML_Writer

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

func (*XML_Writer) Encode

func (xw *XML_Writer) Encode(v interface{})

func (*XML_Writer) End

func (xw *XML_Writer) End()

func (*XML_Writer) Tag

func (xw *XML_Writer) Tag(k, v string)

Jump to

Keyboard shortcuts

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