wd

package
v0.0.0-...-9004d47 Latest Latest
Warning

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

Go to latest
Published: Apr 27, 2024 License: MIT Imports: 21 Imported by: 0

Documentation

Overview

Package wd GENERATED BY gengo:runtimedoc DON'T EDIT THIS FILE

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GoArch

func GoArch(os string, unameM string) (string, bool)

func GoOS

func GoOS(id string) (string, bool)

func ListFile

func ListFile(f filesystem.FileSystem, root string, each func(filename string) error) error

func RealPath

func RealPath(dir WorkDir) (string, error)

func SameFileSystem

func SameFileSystem(a *url.URL, b *url.URL) bool

func WrapRigFS

func WrapRigFS(fsys rigfs.Fsys) filesystem.FileSystem

func WrapSFTP

func WrapSFTP(c *ssh.Client) (filesystem.FileSystem, error)

Types

type CanOSInfo

type CanOSInfo interface {
	OSInfo(ctx context.Context) (*OSInfo, error)
}

type Dir

type Dir string

func (Dir) RuntimeDoc

func (Dir) RuntimeDoc(names ...string) ([]string, bool)

func (Dir) String

func (d Dir) String() string

func (Dir) With

func (d Dir) With(dir string) Dir

type OSInfo

type OSInfo struct {
	rig.OSVersion

	Platform Platform

	Home string
}

func (OSInfo) RuntimeDoc

func (v OSInfo) RuntimeDoc(names ...string) ([]string, bool)

type OptionFunc

type OptionFunc func(opt *Options)

func WithDir

func WithDir(dir string) OptionFunc

func WithEnv

func WithEnv(env map[string]string) OptionFunc

func WithStderr

func WithStderr(stderr io.Writer) OptionFunc

func WithStdout

func WithStdout(stdout io.Writer) OptionFunc

func WithUser

func WithUser(user string) OptionFunc

func (OptionFunc) RuntimeDoc

func (OptionFunc) RuntimeDoc(names ...string) ([]string, bool)

type Options

type Options struct {
	BasePath Dir
	Env      map[string]string
	User     string
	Stdout   io.Writer
	Stderr   io.Writer
}

func (*Options) Build

func (o *Options) Build(optionFuncs ...OptionFunc)

func (Options) RuntimeDoc

func (v Options) RuntimeDoc(names ...string) ([]string, bool)

func (*Options) Sudo

func (o *Options) Sudo() bool

type Platform

type Platform v1.Platform

func ParsePlatform

func ParsePlatform(s string) (*Platform, error)

ParsePlatform parses a string representing a Platform, if possible.

func (Platform) Equals

func (p Platform) Equals(o Platform) bool

Equals returns true if the given platform is semantically equivalent to this one. The order of Features and OSFeatures is not important.

func (Platform) RuntimeDoc

func (v Platform) RuntimeDoc(names ...string) ([]string, bool)

func (Platform) String

func (p Platform) String() string

type WorkDir

type WorkDir interface {
	fmt.Stringer

	filesystem.FileSystem

	Options() Options

	Digest(ctx context.Context, path string) (digest.Digest, error)

	Exec(ctx context.Context, cmd string, optFns ...OptionFunc) error

	Addr() *url.URL
}

func With

func With(source WorkDir, optionFuncs ...OptionFunc) (WorkDir, error)

func Wrap

func Wrap(c *rig.Connection, optionFuncs ...OptionFunc) (WorkDir, error)

type WorkDirConnection

type WorkDirConnection interface {
	Connection() *rig.Connection
}

Jump to

Keyboard shortcuts

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