ulext

package
v1.117.4 Latest Latest
Warning

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

Go to latest
Published: Nov 12, 2024 License: AGPL-3.0 Imports: 12 Imported by: 0

Documentation

Overview

Package ulext provides an interface for the CLI to interface with the external world.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterAccess

func RegisterAccess(ctx context.Context, access *uplink.Access, authService string, public bool, timeout time.Duration) (accessKey, secretKey, endpoint string, err error)

RegisterAccess registers an access grant with a Gateway Authorization Service.

Types

type External

type External interface {
	OpenFilesystem(ctx context.Context, accessName string, options ...Option) (ulfs.Filesystem, error)
	OpenProject(ctx context.Context, accessName string, options ...Option) (*uplink.Project, error)

	AccessInfoFile() string
	OpenAccess(accessName string) (access *uplink.Access, err error)
	GetAccessInfo(required bool) (string, map[string]string, error)
	SaveAccessInfo(defaultName string, accesses map[string]string) error
	RequestAccess(ctx context.Context, satelliteAddress, apiKey, passphrase string, unencryptedObjectKeys bool) (*uplink.Access, error)
	ExportAccess(ctx context.Context, access *uplink.Access, filename string) error

	ConfigFile() string
	SaveConfig(values map[string]string) error

	PromptInput(ctx context.Context, prompt string) (input string, err error)
	PromptSecret(ctx context.Context, prompt string) (secret string, err error)
}

External is the interface for all of the ways that the uplink command may interact with any external state.

type Option

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

Option is a single option that controls the Options struct.

func BypassEncryption

func BypassEncryption(bypass bool) Option

BypassEncryption will disable decrypting of path names if bypass is true.

func ConcurrentSegmentUploadsConfig added in v1.78.1

func ConcurrentSegmentUploadsConfig(config testuplink.ConcurrentSegmentUploadsConfig) Option

ConcurrentSegmentUploadsConfig will initialize the concurrent segment uploads config with config.

func ConnectionPoolOptions added in v1.54.1

func ConnectionPoolOptions(options rpcpool.Options) Option

ConnectionPoolOptions will initialize the connection pool with options.

type Options

type Options struct {
	EncryptionBypass               bool
	ConnectionPoolOptions          rpcpool.Options
	ConcurrentSegmentUploadsConfig testuplink.ConcurrentSegmentUploadsConfig
}

Options contains all of the possible options for opening a filesystem or project.

func LoadOptions

func LoadOptions(options ...Option) (opts Options)

LoadOptions takes a slice of Option values and returns a filled out Options struct.

Jump to

Keyboard shortcuts

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