cmd

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Jun 6, 2023 License: MIT Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AddFile

type AddFile struct {
	Meta4
	Args AddFileArgs `positional-args:"true" required:"true"`
}

func (*AddFile) Execute

func (c *AddFile) Execute(_ []string) error

type AddFileArgs

type AddFileArgs struct {
	Name string `positional-arg-name:"NAME" description:"File name"`
}

type Checksums added in v0.3.0

type Checksums struct {
	Meta4

	Type metalink.HashType `long:"type" description:"Hash type to show" default:"sha-256"`
}

func (*Checksums) Execute added in v0.3.0

func (c *Checksums) Execute(_ []string) error

type Create

type Create struct {
	Meta4
}

func (*Create) Execute

func (c *Create) Execute(_ []string) error

type FileDownload

type FileDownload struct {
	Meta4File
	URLLoader     url.Loader                      `no-flag:"true"`
	MetaURLLoader metaurl.Loader                  `no-flag:"true"`
	Verification  cliverification.DynamicVerifier `no-flag:"true"`

	SkipHashVerification      bool   `long:"skip-hash-verification" description:"Skip hash verification after download"`
	SkipSignatureVerification bool   `long:"skip-signature-verification" description:"Skip signature verification after download"`
	SignatureTrustStore       string `long:"signature-trust-store" description:"Path to file with signature trust store"`

	Args FileDownloadArgs `positional-args:"true" required:"true"`
}

func (*FileDownload) Execute

func (c *FileDownload) Execute(_ []string) error

type FileDownloadArgs

type FileDownloadArgs struct {
	Local string `positional-arg-name:"PATH" description:"Path to the blob file"`
}

type FileHash

type FileHash struct {
	Meta4File
	Args FileHashArgs `positional-args:"true" required:"true"`
}

func (*FileHash) Execute

func (c *FileHash) Execute(_ []string) error

type FileHashArgs

type FileHashArgs struct {
	Type metalink.HashType `positional-arg-name:"TYPE" description:"Hash algorithm (md5 sha-256 sha-512)"`
}

type FileHashes

type FileHashes struct {
	Meta4File
}

func (*FileHashes) Execute

func (c *FileHashes) Execute(_ []string) error

type FileRemoveURL

type FileRemoveURL struct {
	Meta4File
	Args FileRemoveURLArgs `positional-args:"true" required:"true"`
}

func (*FileRemoveURL) Execute

func (c *FileRemoveURL) Execute(_ []string) error

type FileRemoveURLArgs

type FileRemoveURLArgs struct {
	URL string `positional-arg-name:"URL" description:"Download URI"`
}

type FileSetHash

type FileSetHash struct {
	Meta4File
	Args FileSetHashArgs `positional-args:"true" required:"true"`
}

func (*FileSetHash) Execute

func (c *FileSetHash) Execute(_ []string) error

type FileSetHashArgs

type FileSetHashArgs struct {
	Type metalink.HashType `positional-arg-name:"TYPE" description:"Hash algorithm (md5 sha-256 sha-512)"`
	Hash string            `positional-arg-name:"HASH" description:"Hash"`
}

type FileSetSignature

type FileSetSignature struct {
	Meta4File
	FS   boshsys.FileSystem
	Args FileSetSignatureArgs `positional-args:"true" required:"true"`
}

func (*FileSetSignature) Execute

func (c *FileSetSignature) Execute(_ []string) error

type FileSetSignatureArgs

type FileSetSignatureArgs struct {
	MediaType string `positional-arg-name:"MEDIA-TYPE" description:"Signature media type"`
	File      string `positional-arg-name:"FILE" description:"Path to file with signature contents"`
}

type FileSetSize

type FileSetSize struct {
	Meta4File
	Args FileSetSizeArgs `positional-args:"true" required:"true"`
}

func (*FileSetSize) Execute

func (c *FileSetSize) Execute(_ []string) error

type FileSetSizeArgs

type FileSetSizeArgs struct {
	Size uint64 `positional-arg-name:"SIZE" description:"File size"`
}

type FileSetURL

type FileSetURL struct {
	Meta4File
	Location string         `long:"location" description:"ISO3166-1 country code for the geographical location"`
	Priority *uint          `long:"priority" description:"Priority value between 1 and 999999. Lower values indicate a higher priority."`
	Args     FileSetURLArgs `positional-args:"true" required:"true"`
}

func (*FileSetURL) Execute

func (c *FileSetURL) Execute(_ []string) error

type FileSetURLArgs

type FileSetURLArgs struct {
	URL string `positional-arg-name:"URL" description:"Download URI"`
}

type FileSetVersion

type FileSetVersion struct {
	Meta4File
	Args FileSetVersionArgs `positional-args:"true" required:"true"`
}

func (*FileSetVersion) Execute

func (c *FileSetVersion) Execute(_ []string) error

type FileSetVersionArgs

type FileSetVersionArgs struct {
	Version string `positional-arg-name:"VERSION" description:"File version"`
}

type FileURLs

type FileURLs struct {
	Meta4File
}

func (*FileURLs) Execute

func (c *FileURLs) Execute(_ []string) error

type FileUpload

type FileUpload struct {
	Meta4File
	URLLoader url.Loader `no-flag:"true"`

	Location string         `long:"location" description:"ISO3166-1 country code for the geographical location"`
	Priority *uint          `long:"priority" description:"Priority value between 1 and 999999. Lower values indicate a higher priority."`
	Args     FileUploadArgs `positional-args:"true" required:"true"`
}

func (*FileUpload) Execute

func (c *FileUpload) Execute(_ []string) error

type FileUploadArgs

type FileUploadArgs struct {
	Local  string `positional-arg-name:"PATH" description:"Path to the blob file"`
	Remote string `positional-arg-name:"URI" description:"Origin URI for uploading"`
}

type FileVerify

type FileVerify struct {
	Meta4File
	FileLoader   url.Loader                      `no-flag:"true"`
	Verification cliverification.DynamicVerifier `no-flag:"true"`

	SkipHashVerification      bool   `long:"skip-hash-verification" description:"Skip hash verification after download"`
	SkipSignatureVerification bool   `long:"skip-signature-verification" description:"Skip signature verification after download"`
	SignatureTrustStore       string `long:"signature-trust-store" description:"Path to file with signature trust store"`

	Args FileVerifyArgs `positional-args:"true" required:"true"`
}

func (*FileVerify) Execute

func (c *FileVerify) Execute(_ []string) error

type FileVerifyArgs

type FileVerifyArgs struct {
	Local string `positional-arg-name:"PATH" description:"Path to the blob file"`
}

type FileVersion

type FileVersion struct {
	Meta4File
}

func (*FileVersion) Execute

func (c *FileVersion) Execute(_ []string) error

type Files

type Files struct {
	Meta4
}

func (*Files) Execute

func (c *Files) Execute(_ []string) error

type ImportFile

type ImportFile struct {
	Meta4File
	URLLoader url.Loader

	Merge   bool           `long:"merge" description:"If existing file, overwrite fields"`
	Hashes  []string       `long:"hash" description:"Specific hashes to calculate" default:"md5" default:"sha-1" default:"sha-256" default:"sha-512"`
	Version string         `long:"version" description:"File version"`
	Args    ImportFileArgs `positional-args:"true" required:"true"`
}

func (*ImportFile) Execute

func (c *ImportFile) Execute(_ []string) error

type ImportFileArgs

type ImportFileArgs struct {
	Path string `positional-arg-name:"PATH" description:"File path"`
}
type ImportMetalink struct {
	Meta4
	StorageFactory storage.StorageFactory `no-flag:"true"`

	Merge bool           `long:"merge" description:"If existing file, overwrite fields"`
	Args  ImportFileArgs `positional-args:"true" required:"true"`
}

func (*ImportMetalink) Execute added in v0.2.0

func (c *ImportMetalink) Execute(_ []string) error

type ImportMetalinkArgs added in v0.2.0

type ImportMetalinkArgs struct {
	Path string `positional-arg-name:"PATH" description:"Metalink path"`
}

type Meta4

type Meta4 struct {
	Metalink string `long:"metalink" description:"The metalink.meta4 file"`

	StorageFactory storage.StorageFactory `no-flag:"true"`
}

func (Meta4) Exists

func (f Meta4) Exists() (bool, error)

func (Meta4) Get

func (f Meta4) Get() (metalink.Metalink, error)

func (Meta4) Put

func (f Meta4) Put(put metalink.Metalink) error

type Meta4File

type Meta4File struct {
	Meta4

	File string `long:"file" description:"The file name"`
}

func (Meta4File) Get

func (f Meta4File) Get() (metalink.File, error)

func (Meta4File) Put

func (f Meta4File) Put(put metalink.File) error

type RemoveFile

type RemoveFile struct {
	Meta4
	Args RemoveFileArgs `positional-args:"true" required:"true"`
}

func (*RemoveFile) Execute

func (c *RemoveFile) Execute(_ []string) error

type RemoveFileArgs

type RemoveFileArgs struct {
	Name string `positional-arg-name:"NAME" description:"File name"`
}

type SetOrigin

type SetOrigin struct {
	Meta4
	Dynamic *bool         `long:"dynamic" description:"If origin contains dynamic updated information"`
	Args    SetOriginArgs `positional-args:"true" required:"true"`
}

func (*SetOrigin) Execute

func (c *SetOrigin) Execute(_ []string) error

type SetOriginArgs

type SetOriginArgs struct {
	URL string `positional-arg-name:"URL" description:"Origin IRI"`
}

type SetPublished

type SetPublished struct {
	Meta4
	Args SetPublishedArgs `positional-args:"true" required:"true"`
}

func (*SetPublished) Execute

func (c *SetPublished) Execute(_ []string) error

type SetPublishedArgs

type SetPublishedArgs struct {
	Time args.Time `positional-arg-name:"TIME" description:"A date/time"`
}

type SetUpdated

type SetUpdated struct {
	Meta4
	Args SetUpdatedArgs `positional-args:"true" required:"true"`
}

func (*SetUpdated) Execute

func (c *SetUpdated) Execute(_ []string) error

type SetUpdatedArgs

type SetUpdatedArgs struct {
	Time args.Time `positional-arg-name:"TIME" description:"A date/time"`
}

Jump to

Keyboard shortcuts

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