payload

package
v0.25.0 Latest Latest
Warning

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

Go to latest
Published: Jan 29, 2025 License: GPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Payload

type Payload struct {
	RootPath    string
	Files       []PayloadFile
	DefaultMode fs.FileMode
}

func (*Payload) Add

func (p *Payload) Add(f PayloadFile)

func (*Payload) AddReader

func (p *Payload) AddReader(path string, reader io.Reader)

func (*Payload) AddString

func (p *Payload) AddString(path string, body string)

func (*Payload) AddTemplate

func (p *Payload) AddTemplate(path string, tmpl *template.Template, data any) error

func (*Payload) NewWriter

func (p *Payload) NewWriter(info PayloadFile) io.Writer

type PayloadFile

type PayloadFile struct {
	Path   string
	Reader io.Reader
	Mode   fs.FileMode
}

Jump to

Keyboard shortcuts

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