api

package
v0.13.16 Latest Latest
Warning

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

Go to latest
Published: Sep 9, 2021 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FindSubexpression added in v0.13.0

func FindSubexpression(subexps []string, searchFor string) (int, bool)

func URLAppendTimeStamp

func URLAppendTimeStamp(baseURL string, snapshot time.Time) (string, error)

Types

type Check

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

func NewCheck

func NewCheck(azureClient azureClient) Check

func (Check) VersionsSince

func (c Check) VersionsSince(filename string, snapshot time.Time) ([]Version, error)

func (Check) VersionsSinceRegexp

func (c Check) VersionsSinceRegexp(expr, currentVersion string) ([]Version, error)

type In

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

func NewIn

func NewIn(azureClient azureClient) In

func (In) CopyBlobToDestination

func (i In) CopyBlobToDestination(destinationDir, blobName string, snapshot *time.Time, blockSize int64, retryTryTimeout time.Duration) error

func (In) UnpackBlob

func (i In) UnpackBlob(filename string) error

type InParams

type InParams struct {
	Unpack       bool        `json:"unpack"`
	SkipDownload bool        `json:"skip_download"`
	BlockSize    *int64      `json:"block_size,omitempty"`
	Retry        ParamsRetry `json:"retry,omitempty"`
}

type InRequest

type InRequest struct {
	Source  RequestSource    `json:"source"`
	Version InRequestVersion `json:"version"`
	Params  InParams         `json:"params"`
}

type InRequestVersion

type InRequestVersion struct {
	Snapshot time.Time `json:"snapshot,omitempty"`
	Path     string    `json:"path,omitempty"`
	Version  string    `json:"version,omitempty"`
}

type Out

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

func NewOut

func NewOut(azureClient azureClient) Out

func (Out) UploadFileToBlobstore

func (o Out) UploadFileToBlobstore(sourceDirectory string, filename string, blobName string, createSnapshot bool, blockSize int, retryTryTimeout time.Duration) (string, *time.Time, error)

type OutParams

type OutParams struct {
	File      string      `json:"file"`
	BlockSize *int        `json:"block_size,omitempty"`
	Retry     ParamsRetry `json:"retry,omitempty"`
}

type OutRequest

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

type ParamsRetry added in v0.4.0

type ParamsRetry struct {
	TryTimeout *types.MarshalableDuration `json:"try_timeout,omitempty"`
}

type RequestSource

type RequestSource struct {
	BaseURL            string `json:"base_url"`
	StorageAccountName string `json:"storage_account_name"`
	StorageAccountKey  string `json:"storage_account_key"`
	Container          string `json:"container"`
	VersionedFile      string `json:"versioned_file"`
	Regexp             string `json:"regexp"`
}

type Response

type Response struct {
	Version  ResponseVersion    `json:"version"`
	Metadata []ResponseMetadata `json:"metadata"`
}

type ResponseMetadata

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

type ResponseVersion

type ResponseVersion struct {
	Snapshot *time.Time `json:"snapshot,omitempty"`
	Path     string     `json:"path,omitempty"`
	Version  string     `json:"version,omitempty"`
}

type Version

type Version struct {
	Snapshot *time.Time `json:"snapshot,omitempty"`
	Path     *string    `json:"path,omitempty"`
	Version  *string    `json:"version,omitempty"`
	// contains filtered or unexported fields
}

Directories

Path Synopsis
internal

Jump to

Keyboard shortcuts

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