methods

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Sep 6, 2018 License: Apache-2.0 Imports: 28 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetEtcdKey

func GetEtcdKey(e EtcdMethod, ctx context.Context, key string, opts *client.GetOptions) (*client.Response, error)

Types

type BlobMethod

type BlobMethod struct {
	StorageAccount string                    `mapstructure:"storage-account-name" json:"storage-account-name"`
	AzureClient    storage.Client            `json:"-"`
	BlobClient     storage.BlobStorageClient `json:"-"`
}

func (BlobMethod) Get

func (b BlobMethod) Get(u *url.URL) (*Response, error)

type EtcdMethod

type EtcdMethod struct {
	Endpoints []string       `mapstructure:"endpoints" json:"endpoints"`
	KeysAPI   client.KeysAPI `json:"-"`
	Manager   *string        `json:"-"`
}

func (EtcdMethod) Get

func (e EtcdMethod) Get(u *url.URL) (*Response, error)

type FileMethod

type FileMethod struct {
	Url  *url.URL `json:"-"`
	Path string   `mapstructure:"path" json:"path"`
}

func (FileMethod) Get

func (f FileMethod) Get(u *url.URL) (*Response, error)

type GenericMethod

type GenericMethod struct {
}

func (GenericMethod) Get

func (m GenericMethod) Get(u *url.URL) (*Response, error)

type HttpMethod

type HttpMethod struct {
	Client       *retryablehttp.Client `json:"-"`
	Manager      *string               `json:"-"`
	Host         string                `mapstruecture:"host" json:"host,omitempty"`
	Retries      string                `mapstructure:"retries" json:"retries"`
	RetryWaitMax string                `mapstructure:"retry-wait-max" json:"retry-wait-max"`
	RetryWaitMin string                `mapstructure:"retry-wait-min" json:"retry-wait-min"`
	Timeout      string                `mapstructure:"timeout" json:"timeout"`
	AuthType     string                `mapstructure:"auth-type" json"auth-type,omitempty"`
	AuthToken    string                `mapstructure:"auth-token" json:"-"`
	AuthUser     string                `mapstructure:"auth-user" json:"auth-user,omitempty"`
}

func (HttpMethod) Get

func (h HttpMethod) Get(u *url.URL) (*Response, error)

func (*HttpMethod) MethodRetryPolicy

func (h *HttpMethod) MethodRetryPolicy(resp *http.Response, err error) (bool, error)

type Method

type Method interface {
	//Get(string) (*Response, error)
	Get(*url.URL) (*Response, error)
}

func New

func New(manager *string, method string, entry *string) (Method, error)

func NewBlobMethod

func NewBlobMethod(manager *string, entry *string) (Method, error)

func NewBlobMethodWithAccount

func NewBlobMethodWithAccount(account string) (Method, error)

func NewEtcdMethod

func NewEtcdMethod(manager *string, entry *string) (Method, error)

func NewEtcdMethodWithEndpoints

func NewEtcdMethodWithEndpoints(endpoints []string) (Method, error)

func NewFileMethod

func NewFileMethod(manager *string, entry *string) (Method, error)

func NewFileMethodWithUrl

func NewFileMethodWithUrl(u *url.URL) (Method, error)

func NewGenericMethod

func NewGenericMethod(manager *string, entry *string) (Method, error)

func NewHttpMethod

func NewHttpMethod(manager *string, entry *string) (Method, error)

func NewS3Method

func NewS3Method(manager *string, entry *string) (Method, error)

func NewS3MethodWithRegionAndBucket

func NewS3MethodWithRegionAndBucket(region string, bucket string) (Method, error)

type Response

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

func (Response) GetResponseBody

func (r Response) GetResponseBody() io.ReadCloser

func (Response) GetResponseStatusCode

func (r Response) GetResponseStatusCode() int

type S3Method

type S3Method struct {
	Bucket     string                `mapstructure:"bucket" json:"bucket"`
	Manager    *string               `json:"-"`
	Region     string                `mapstructure:"region" json:"region"`
	Downloader *s3manager.Downloader `json:"-"`
}

func (S3Method) Get

func (s S3Method) Get(u *url.URL) (*Response, error)

Jump to

Keyboard shortcuts

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