methods

package
v1.5.0 Latest Latest
Warning

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

Go to latest
Published: Jan 30, 2026 License: Apache-2.0 Imports: 31 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetEtcdKey

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

Types

type BlobMethod

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

func (BlobMethod) Get

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

func (*BlobMethod) SetStorageAccount added in v1.4.1

func (b *BlobMethod) SetStorageAccount(a string)

func (*BlobMethod) SetStorageKey added in v1.4.1

func (b *BlobMethod) SetStorageKey(k string)

type BlobMethodOpts added in v1.4.1

type BlobMethodOpts struct {
	Scheme      string
	AccountName string
	AccountKey  string
}

func (BlobMethodOpts) GetScheme added in v1.4.1

func (o BlobMethodOpts) GetScheme() string

type EtcdMethod

type EtcdMethod struct {
	Endpoints             []string       `mapstructure:"endpoints" json:"endpoints"`
	CfgInsecureSkipVerify string         `mapstructure:"insecure-skip-verify" json:"-"`
	InsecureSkipVerify    bool           `json:"insecure-skip-verify"`
	KeysAPI               client.KeysAPI `json:"-"`
	Manager               *string        `json:"-"`
}

func (EtcdMethod) Get

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

type EtcdMethodOpts added in v1.4.1

type EtcdMethodOpts struct {
	Endpoints []string
	Scheme    string
}

func (EtcdMethodOpts) GetScheme added in v1.4.1

func (o EtcdMethodOpts) GetScheme() string

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 FileMethodOpts added in v1.4.1

type FileMethodOpts struct {
	Scheme string
}

func (FileMethodOpts) GetScheme added in v1.4.1

func (o FileMethodOpts) GetScheme() string

type GenericMethod

type GenericMethod struct {
}

func (GenericMethod) Get

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

type GenericMethodOpts added in v1.4.1

type GenericMethodOpts struct {
	Scheme string
}

func (GenericMethodOpts) GetScheme added in v1.4.1

func (o GenericMethodOpts) GetScheme() string

type HTTPMethod added in v1.4.1

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"`
	CfgInsecureSkipVerify string                `mapstructure:"insecure-skip-verify" json:"-"`
	InsecureSkipVerify    bool                  `json:"insecure-skip-verify"`
}

func (HTTPMethod) Get added in v1.4.1

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

func (*HTTPMethod) MethodRetryPolicy added in v1.4.1

func (h *HTTPMethod) MethodRetryPolicy(ctx context.Context, resp *http.Response, err error) (bool, error)

type HTTPMethodOpts added in v1.4.1

type HTTPMethodOpts struct {
	HTTPAuthType  string
	HTTPAuthToken string
	HTTPAuthUser  string
	Retries       int
	RetryWaitMin  int
	RetryWaitMax  int
	Scheme        string
	Timeout       int
}

func (HTTPMethodOpts) GetScheme added in v1.4.1

func (o HTTPMethodOpts) GetScheme() string

type Method

type Method interface {
	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 NewBlobMethodWithAccountAndKey added in v1.4.1

func NewBlobMethodWithAccountAndKey(account string, key string) (Method, error)

func NewEtcdMethod

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

func NewEtcdMethodWithEndpoints

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

func NewFileMethod

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

func NewFileMethodWithURL added in v1.4.1

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

func NewGenericMethod

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

func NewHTTPMethod added in v1.4.1

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

func NewS3Method

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

func NewS3MethodWithOpts added in v1.4.1

func NewS3MethodWithOpts(opts S3MethodOpts) (Method, error)

type MethodOpts added in v1.4.1

type MethodOpts interface {
	GetScheme() string
}

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 {
	AccessKeyID     string                `mapstructure:"access-key-id" json:"access-key-id"`
	Bucket          string                `mapstructure:"bucket" json:"bucket"`
	Downloader      *s3manager.Downloader `json:"-"`
	Manager         *string               `json:"-"`
	Region          string                `mapstructure:"region" json:"region"`
	SecretAccessKey string                `mapstructure:"secret-access-key" json:"-"`
	SessionToken    string                `mapstructure:"session-token" json:"-"`
}

func (S3Method) Get

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

type S3MethodOpts added in v1.4.1

type S3MethodOpts struct {
	AccessKeyID     string
	Bucket          string
	Region          string
	Scheme          string
	SecretAccessKey string
	SessionToken    string
}

func (S3MethodOpts) GetScheme added in v1.4.1

func (o S3MethodOpts) GetScheme() string

Jump to

Keyboard shortcuts

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