openers

package
v1.20.1 Latest Latest
Warning

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

Go to latest
Published: Aug 21, 2025 License: MIT Imports: 31 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	EnvVar = Config{
		Endpoint:        "AWS_ENDPOINT",
		AccessKeyID:     "AWS_ACCESS_KEY_ID",
		SecretAccessKey: "AWS_SECRET_ACCESS_KEY",
		SessionToken:    "AWS_SESSION_TOKEN",
	}
)

Functions

func ListOpenersWithDescription

func ListOpenersWithDescription() []string

func Open

func Open(s string, lock bool) (io.ReadCloser, error)

Types

type Config

type Config struct {
	// mc stores scheme://endpoint as "url"
	Endpoint        string `json:"url"`
	AccessKeyID     string `json:"accessKey"`
	SecretAccessKey string `json:"secretKey"`
	SessionToken    string `json:"sessionToken"`
}

type Opener

type Opener interface {
	Open(s string, lock bool) (io.ReadCloser, error)
	Evaluate(s string) float32 // score the ability to open
	Name() string
	Description() string
}

type OpenerCollection

type OpenerCollection struct {
	Name string
	// contains filtered or unexported fields
}

Jump to

Keyboard shortcuts

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