object

package
v0.0.0-...-9cff73d Latest Latest
Warning

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

Go to latest
Published: May 17, 2022 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type File

type File struct {
	// contains filtered or unexported fields
}

func (File) Hash

func (f File) Hash() (*Hash, error)

func (File) Metadata

func (f File) Metadata() (*Metadata, error)

func (File) Open

func (f File) Open(fnc func(io.Reader) error) error

type Hash

type Hash struct {
	Size     int64
	PartSize int64
	Hash     string
}

func GenerateHash

func GenerateHash(o Object) (*Hash, error)

func (Hash) String

func (h Hash) String() string

type Metadata

type Metadata struct {
	CacheControl            *string
	ContentType             *string
	WebsiteRedirectLocation *string
}

type Object

type Object interface {
	Hash() (*Hash, error)
	Metadata() (*Metadata, error)
	Open(func(io.Reader) error) error
}

func Empty

func Empty(metadata Metadata) Object

func NewString

func NewString(contents string) Object

type Set

type Set map[string]Object

func FS

func FS(filesystem fs.FS, skipGit bool) (Set, error)

func (Set) Diff

func (s Set) Diff(new Set) (Set, Set, error)

func (Set) Paths

func (s Set) Paths() []string

func (Set) String

func (s Set) String() string

Jump to

Keyboard shortcuts

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