file

package
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2024 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const TYPE = "file"

Variables

This section is empty.

Functions

func AddConfig

func AddConfig(opts flagsets.ConfigOptions, config flagsets.Config) error

func Usage

func Usage(head string) string

Types

type FileProcessSpec

type FileProcessSpec struct {
	cpi.MediaFileSpec
	Transformer func(ctx inputs.Context, inputDir string, data []byte) ([]byte, error)
}

func (*FileProcessSpec) GetBlob

func (*FileProcessSpec) Validate

func (s *FileProcessSpec) Validate(fldPath *field.Path, ctx inputs.Context, inputFilePath string) field.ErrorList

type Spec

type Spec struct {
	cpi.MediaFileSpec `json:",inline"`
}

func New

func New(path, mediatype string, compress bool) *Spec

func (*Spec) GetBlob

func (*Spec) Validate

func (s *Spec) Validate(fldPath *field.Path, ctx inputs.Context, inputFilePath string) field.ErrorList

Jump to

Keyboard shortcuts

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