resource

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Nov 13, 2017 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CacheClientToken

func CacheClientToken(c *swift.Connection)

func Fail

func Fail(err error)

func Fatal

func Fatal(doing string, err error)

func NewClient

func NewClient(source Source) *swift.Connection

func Sayf

func Sayf(message string, args ...interface{})

Types

type CheckRequest

type CheckRequest struct {
	Resource Source  `json:"source"`
	Version  Version `json:"version"`
}

type InRequest

type InRequest struct {
	Resource Source  `json:"source"`
	Version  Version `json:"version"`
}

type InResponse

type InResponse struct {
	Version  Version    `json:"version"`
	Metadata []Metadata `json:"metadata"`
}

func In

func In(request InRequest, destinationDir string) (*InResponse, error)

type Metadata

type Metadata struct {
	Name  string `json:"name"`
	Value string `json:"value"`
}

type OutParams

type OutParams struct {
	From             string `json:"from"`
	SegmentContainer string `json:"segment_container"`
	SegmentSize      int64  `json:"segment_size"`
	DeleteAfter      int64  `json:"delete_after"`
}

type OutRequest

type OutRequest struct {
	Resource Source    `json:"source"`
	Params   OutParams `json:"params"`
}

type OutResponse

type OutResponse struct {
	Version  Version    `json:"version"`
	Metadata []Metadata `json:"metadata"`
}

func Out

func Out(request OutRequest, sourceDir string) (*OutResponse, error)

type Source

type Source struct {
	Username         string `json:"username"`
	APIKey           string `json:"api_key"`
	AuthURL          string `json:"auth_url"`
	Domain           string `json:"domain"`
	Tenant           string `json:"tenant"`
	TenantID         string `json:"tenant_id"`
	Container        string `json:"container"`
	Regex            string `json:"regex"`
	DisableTLSVerify bool   `json:"disable_tls_verify"`
}

type Version

type Version struct {
	Path string `json:"path,omitempty"`
}

func Check

func Check(request CheckRequest) ([]Version, error)

Jump to

Keyboard shortcuts

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